Managing Orders
The TradeClient
supports three order management commands:
Scheduling a Trade Updating a Trade Cancelling a Trade
3.1 Scheduling a Trade
Method: submit_trade(payload: dict) -> dict
submit_trade(payload: dict) -> dict
Schedules a trade order for future execution.
Parameters
Parameter
Type
Description
symbol
str
Trading symbol (e.g., "AAPL"
)
quantity
float
Number of shares
side
str
"buy"
or "sell"
time_in_minutes
int
Time delay for execution (minutes)
Example Usage
3.2 Updating a Trade Order
Method: update_trade(payload: dict) -> dict
update_trade(payload: dict) -> dict
Updates an existing scheduled order.
Example Usage
3.3 Cancelling a Trade Order
Method: cancel_trade(order_id: str) -> dict
cancel_trade(order_id: str) -> dict
Cancels a scheduled trade order.
Example Usage
Last updated