DummyTestTrader#
API documentation for tradeexecutor.testing.dummy_trader.DummyTestTrader Python class in Trading Strategy framework.
- class DummyTestTrader[source]#
- Bases: - object- Helper class to generate trades for tests. - This trade helper is not connected to any blockchain - it just simulates txid and nonce values. - Methods - __init__(state[, lp_fees, price_impact])- buy(pair, quantity, price)- buy_with_price_data(pair, quantity, ...)- create(pair, quantity, price)- Open a new trade. - create_and_execute(pair, quantity, price)- prepare_buy(pair, quantity, price)- sell(pair, quantity, price)- sell_with_price_data(pair, quantity, ...)- time_travel(timestamp)- create(pair, quantity, price)[source]#
- Open a new trade. - Parameters:
- pair (TradingPairIdentifier) – 
- quantity (Decimal) – 
- price (float) – 
 
- Return type: