Skip to content

Place an order

POST /api/v1/orders

Submit an order to the exchange. Matched against the book on arrival; any unfilled remainder rests.

Field Type Required Description
market_id string (uuid) yes
order_type limit | market yes
action buy | sell yes
price integer no Limit price in whole cents, 1-99. Ignored for market orders. A value above 99 is rejected with “The order’s price must be lower than 1.00” - that message describes the cap in dollars, but the field is cents.
quantity integer yes Number of contracts.
client_order_id string no Your own idempotency reference.
expiration good_till_start | good_till_time no
expiration_time integer no Unix microseconds. Required when expiration is good_till_time.
cancel_on_disconnect boolean no Cancel this order if the active_orders channel stops heartbeating. See the cancel_on_disconnect guide.
Status Description Schema
200 Success object
401 Missing, malformed or unrecognised signature, or a timestamp outside the 30-second window. Body: {“error”:“Missing or invalid API key credentials”} Error
422 The request was authenticated but rejected — for example a price above 99 cents. Error
Terminal window
curl --request POST \
--url 'https://demo.stxapp.io/api/v1/orders' \
--header 'STX-ACCESS-KEY: <key-id>' \
--header 'STX-ACCESS-TIMESTAMP: <unix-ms>' \
--header 'STX-ACCESS-SIGNATURE: <base64-ed25519>' \
--header 'Content-Type: application/json' \
--data '{ … }'

Run this in the API console →