Developers
Open app
Trading

Place an order

POSThttps://www.slay.money/api/trade/order
Requires an API key: Authorization: Bearer spk_…Limit: 60 / min per key

Buy or sell with just your API key: Slay places the order with your account's trading key on the better venue (or the one you name). Turn on API trading at slay.money/api/keys and set your limits there. Every order must pass: a two-sided book with a spread of 10c or less, a price within 5c of the middle (a buy at most mid + 5c, a sell at least mid − 5c; for a market order that's the worst fill price), the owner's per-order and daily limits. Market orders fill what they can now and cancel the rest; limit orders rest. Hyperliquid trades whole shares, $10 minimum.

Request

curl -X POST 'https://www.slay.money/api/trade/order' \
  -H 'Authorization: Bearer $SLAY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"market":"q-669","option":0,"outcome":"yes","side":"buy","usd":20,"clientOrderId":"my-script-0001"}'

Body

marketstring
An id from /data/markets.
optioninteger
0-based option. Default 0.
outcomestring
One of yes, no
sidestring
One of buy, sell
typestring
Default market. One of market, limit
usdnumber
A market buy: dollars to spend.
sharesnumber
A sell, or a limit order's size.
pricenumber
A limit order's price; for a market order, the worst price you accept.
venuestring
Default auto: a buy goes to the better quote; a sell to the venue holding your shares (the better quote if both do). One of auto, hyperliquid, polymarket
coinstring
Instead of market/option/outcome: a venue's book, #<n> or pm:<token> (needs venue).
clientOrderIdstring
Your own id for this order (1–64 of letters, digits, . _ : -). Send the same id when you retry: you get the first order's answer (duplicate: true), never a second order.

Responses

201{ venue, coin, status: filled | partial | resting | unfilled, orderId, filledShares, avgPrice, priceLimit, id, market, quote }
403API trading is off for this account, the key is read-only, or the order is over your per-order or daily limit.
409The market fails the price guard, or this clientOrderId is still being placed (or got no answer from the venue: check /trade/orders).
422The venue refused it (balance, size, closed market).