asset_id and a supported funding currency using Select an asset. Before selling, query List positions with asset_id and check available_quantity.
1. Create a quote
Call Create quote (POST /quote) with these JSON fields:
Send a new lowercase UUID in
x-idempotency-key. Save the returned quote_id; review quantity, price, cash_amount, fees, total_amount, and expires_at. Values that are null are not confirmed execution results.
2. Submit the quote
Before the quote expires, call Create order (POST /order). Set quote_id to the value returned above. Set client_reference if you want to find the order using your own reference later.
Use a new x-idempotency-key for the order, different from the quote key. Save the returned order_id. One quote can be submitted for one order.
If a request times out, retry that same operation with its original key and unchanged body. If the quote expires, obtain a new quote instead of submitting the expired identifier. The API Reference contains real request and response examples; use your newly returned identifiers when making your own calls.
3. Follow the order
Call Retrieve order (GET /order/{order_id}) or receive an order notification.
For a buy,
total_amount is the outlay including fees. For a sell, it is the proceeds after fees. Both use funding_currency.
