PairUniverseTestTrader#

API documentation for tradeexecutor.testing.pairuniversetrader.PairUniverseTestTrader Python class in Trading Strategy framework.

class PairUniverseTestTrader[source]#

Bases: object

Helper class to create trades for testing.

Trades are executed by the routing model.

__init__(state)[source]#
Parameters:

state (State) –

Methods

__init__(state)

buy(pair, amount_in_usd)

Buy token (trading pair) for a certain value.

sell(pair, quantity)

Sell token token (trading pair) for a certain quantity.

__init__(state)[source]#
Parameters:

state (State) –

buy(pair, amount_in_usd)[source]#

Buy token (trading pair) for a certain value.

Parameters:
Return type:

TradeExecution

sell(pair, quantity)[source]#

Sell token token (trading pair) for a certain quantity.

Parameters:
Return type:

TradeExecution