Trading
Quote an order on both venues
GET
https://www.slay.money/api/trade/quotePublic: no session neededLimit: Not cached
What an order gets on each venue after fees, read from the live books, and which is better. Use a market id and option index from /data/markets. Public; with an API key, Slay's fee is priced at that account's own rate.
Request
curl -X GET 'https://www.slay.money/api/trade/quote'
Parameters
marketstring · queryrequiredMarket id from /data/markets. e.g.
q-198optioninteger · query0-based index into the market's options.
outcomestring · queryyes = the option, no = against it.
sidestring · querybuy or sell.
usdnumber · queryBuy: dollars to spend.
sharesnumber · querySell: shares to sell.
Responses
200Quotes per venue.
marketobjectquotesobjecthyperliquidobjectcoinstringWhat to trade: Hyperliquid
#<n>, Polymarket pm:<token>. assetintegerHyperliquid only: the order's asset number (100000000 + n).
tokenstringPolymarket only: the CLOB token id.
negRiskbooleantickSizenumbersharesnumberavgPricenumberfeeUsdnumberHyperliquid: 0 to buy; Slay's fee + Hyperliquid's on a sell. Polymarket: its taker fee + Slay's builder fee.
costUsdnumberBuy: what it costs, fees included.
proceedsUsdnumberSell: what you receive after fees.
fullbooleanFalse when the book can't take the whole amount.
worstPricenumberThe deepest price the order reaches: a sensible limit.
meetsMinimumbooleanHyperliquid: $10 an order. Polymarket: the market's minimum size (usually 5 shares).
errorstringpolymarketobjectcoinstringWhat to trade: Hyperliquid
#<n>, Polymarket pm:<token>. assetintegerHyperliquid only: the order's asset number (100000000 + n).
tokenstringPolymarket only: the CLOB token id.
negRiskbooleantickSizenumbersharesnumberavgPricenumberfeeUsdnumberHyperliquid: 0 to buy; Slay's fee + Hyperliquid's on a sell. Polymarket: its taker fee + Slay's builder fee.
costUsdnumberBuy: what it costs, fees included.
proceedsUsdnumberSell: what you receive after fees.
fullbooleanFalse when the book can't take the whole amount.
worstPricenumberThe deepest price the order reaches: a sensible limit.
meetsMinimumbooleanHyperliquid: $10 an order. Polymarket: the market's minimum size (usually 5 shares).
errorstringbeststring | null One of
hyperliquid, polymarket, null200 response
{
"market": {},
"quotes": {
"hyperliquid": {
"coin": "string",
"asset": 0,
"token": "string",
"negRisk": true,
"tickSize": 0,
"shares": 0,
"avgPrice": 0,
"feeUsd": 0,
"costUsd": 0,
"proceedsUsd": 0,
"full": true,
"worstPrice": 0,
"meetsMinimum": true,
"error": "string"
},
"polymarket": {
"coin": "string",
"asset": 0,
"token": "string",
"negRisk": true,
"tickSize": 0,
"shares": 0,
"avgPrice": 0,
"feeUsd": 0,
"costUsd": 0,
"proceedsUsd": 0,
"full": true,
"worstPrice": 0,
"meetsMinimum": true,
"error": "string"
}
},
"best": "hyperliquid"
}400Bad parameters.
404No live market with that id.