tensortrade.oms.services.execution.simulated module¶
-
tensortrade.oms.services.execution.simulated.
execute_buy_order
(order: tensortrade.oms.orders.order.Order, base_wallet: tensortrade.oms.wallets.wallet.Wallet, quote_wallet: tensortrade.oms.wallets.wallet.Wallet, current_price: float, options: tensortrade.oms.exchanges.exchange.ExchangeOptions, clock: tensortrade.core.clock.Clock) → Union[None, tensortrade.oms.orders.trade.Trade][source]¶ Executes a buy order on the exchange.
Parameters: - order (Order) – The order that is being filled.
- base_wallet (Wallet) – The wallet of the base instrument.
- quote_wallet (Wallet) – The wallet of the quote instrument.
- current_price (float) – The current price of the exchange pair.
- options (ExchangeOptions) – The exchange options.
- clock (Clock) – The clock for the trading process..
Returns: Trade – The executed trade that was made.
-
tensortrade.oms.services.execution.simulated.
execute_order
(order: Order, base_wallet: Wallet, quote_wallet: Wallet, current_price: float, options: Options, clock: Clock) → Trade[source]¶ Executes an order on the exchange.
Parameters: - order (Order) – The order that is being filled.
- base_wallet (Wallet) – The wallet of the base instrument.
- quote_wallet (Wallet) – The wallet of the quote instrument.
- current_price (float) – The current price of the exchange pair.
- options (ExchangeOptions) – The exchange options.
- clock (Clock) – The clock for the trading process..
Returns: Trade – The executed trade that was made.
-
tensortrade.oms.services.execution.simulated.
execute_sell_order
(order: tensortrade.oms.orders.order.Order, base_wallet: tensortrade.oms.wallets.wallet.Wallet, quote_wallet: tensortrade.oms.wallets.wallet.Wallet, current_price: float, options: tensortrade.oms.exchanges.exchange.ExchangeOptions, clock: tensortrade.core.clock.Clock) → Union[None, tensortrade.oms.orders.trade.Trade][source]¶ Executes a sell order on the exchange.
Parameters: - order (Order) – The order that is being filled.
- base_wallet (Wallet) – The wallet of the base instrument.
- quote_wallet (Wallet) – The wallet of the quote instrument.
- current_price (float) – The current price of the exchange pair.
- options (ExchangeOptions) – The exchange options.
- clock (Clock) – The clock for the trading process..
Returns: Trade – The executed trade that was made.