make_test_trade#
API documentation for tradeexecutor.cli.testtrade.make_test_trade Python function.
- make_test_trade(web3, execution_model, pricing_model, sync_model, state, universe, routing_model, routing_state, amount=Decimal('1.0'), pair=None, buy_only=False, test_short=True, test_credit_supply=True)[source]#
Perform a test trade.
Buy and sell 1 token worth for 1 USD to check that our trade routing works.
If the pair can be shorted, open and close short position for 1 USD.
- Parameters:
web3 (Web3) –
execution_model (ExecutionModel) –
pricing_model (PricingModel) –
sync_model (SyncModel) –
state (State) –
universe (TradingStrategyUniverse) –
routing_model (RoutingModel) –
routing_state (RoutingState) –
pair (Optional[Union[Tuple[ChainId, str | None, str, str, float], Tuple[ChainId, str | None, str, str]]]) –
buy_only (bool) –
test_short (bool) –
test_credit_supply (bool) –