ExecutionClient
The ExecutionClient handles order creation, cancellation, and status monitoring.
Creating Orders
order = await client.execution.create_order(
side="buy",
asset="BTC",
quantity=1.0,
price=50000.00,
order_type="limit",
time_in_force="GTC",
)
Batch Orders
result = await client.execution.create_batch([
{"side": "buy", "asset": "BTC", "quantity": 0.5, "price": 49000},
{"side": "buy", "asset": "ETH", "quantity": 5.0, "price": 3000},
])
Cancelling Orders
order = await client.execution.cancel_order("order_id")
cancelled = await client.execution.cancel_all(asset="BTC")
Querying Orders
order = await client.execution.get_order("order_id")
orders = await client.execution.get_orders(status=["open"])
open_orders = await client.execution.get_open_orders()
Order Statuses
| Status | Description |
|---|---|
pending | Order received |
open | Active in order book |
partially_filled | Some filled |
filled | Completely filled |
cancelled | Cancelled |
rejected | Rejected |