PairUniverseTestTrader#
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.
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.
- buy(pair, amount_in_usd)[source]#
Buy token (trading pair) for a certain value.
- Parameters:
pair (TradingPairIdentifier) –
amount_in_usd (Decimal) –
- Return type:
- sell(pair, quantity)[source]#
Sell token token (trading pair) for a certain quantity.
- Parameters:
pair (TradingPairIdentifier) –
quantity (Decimal) –
- Return type: