Developers
Open app
Trading

Buy (simple)

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

Spend dollars on an outcome, from your API wallet (slay.money/api/keys). The market is words from its title (btc 5m), its id or its link; the outcome is one of its options (up, yes, Lakers; no Lakers bets against). Slay quotes both venues, takes the better one (or the one already holding your money when it's within 3%), moves money there if needed and places the order. Answers when the venue has: 201, or 202 with status: pending after 20 s.

Request

curl -X POST 'https://www.slay.money/api/trade/buy' \
  -H 'Authorization: Bearer $SLAY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"market":"btc 5m","outcome":"up","usd":10,"externalId":"my-0001"}'

Body

marketstringrequired
outcomestringrequired
usdnumberrequired
Dollars to spend. Hyperliquid's minimum is $10, Polymarket's $1.
maxPricenumber
The most per share (0.55 or 55). Default: 3c over the book's price for this size.
venuestring
One of hyperliquid, polymarket
paperboolean
Practice with $1,000 of fake money on the live books.
previewboolean
Every check and the venue it would go to, nothing placed (status: preview, with quote).
externalIdstring
Your id for this order (1-64 of A-Z a-z 0-9 . _ : -). A retry with it never places a second order.

Responses

201Placed.
idstring
statusstring
One of filled, partial, unfilled, failed, pending, preview
marketstring
outcomestring
venuestring
Where the order went (or would go, for a preview). One of hyperliquid, polymarket
sharesnumber
usdnumber
avgPricenumber | null
toWinnumber
Buy: what the shares pay if the outcome wins ($1 each).
offersobject
What each venue offered for this order: shares, avgPrice, cost, toWin (or error).
paperboolean
externalIdstring | null
duplicateboolean
This is the earlier answer for a retried externalId.
201 response
{
  "id": "string",
  "status": "filled",
  "market": "string",
  "outcome": "string",
  "venue": "hyperliquid",
  "shares": 0,
  "usd": 0,
  "avgPrice": 0,
  "toWin": 0,
  "offers": {},
  "paper": true,
  "externalId": "string",
  "duplicate": true
}
202Still at the venue (held in-play order): read it with /trade/order/{id}.
400Bad parameters (code says which).
404No open market matches (market_not_found).
409More than one market matches (ambiguous_market, with matches), nothing to buy at your price (no_liquidity), or not enough in the API wallet (insufficient_balance).