Trading
Place orders, manage positions, and cancel orders programmatically.
Place Order
POST
/orderAuth RequiredSubmit a limit or market order to the matching engine.
asset_idstringrequiredFigure ID (e.g. "elon-musk")
sidestringrequired"Bid" (buy/long) or "Ask" (sell/short)
order_typestringrequired"Limit" or "Market"
pricestringRequired for Limit orders. Price 0-100.
amountstringNumber of shares. Use this OR quote_order_qty.
quote_order_qtystringTotal OPS to spend (Market orders). The engine calculates shares.
reduce_onlybooleanIf true, only reduces existing position.
Limit order by shares:
{
"asset_id": "elon-musk",
"side": "Bid",
"order_type": "Limit",
"price": "85.00",
"amount": "10.0"
}
Market order by cost:
{
"asset_id": "elon-musk",
"side": "Bid",
"order_type": "Market",
"quote_order_qty": "100.0"
}
Response:
{
"message": "Order Placed",
"order_id": "5fc550e5-26a8-4406-ab19-3026db06cba9",
"status": "FILLED",
"trades_executed": 3
}
Possible statuses: FILLED, PARTIAL, OPEN, REJECTED, CANCELLED.
My Orders
GET
/orders/myAuth RequiredList open and recent orders. Query params: status (active, history).
Cancel Order
POST
/orders/cancel/:idAuth RequiredCancel an open or partially filled order. Frozen balance is refunded.