Developers
Open app
Trading

Quote an order on both venues

GEThttps://www.slay.money/api/trade/quote
Public: 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 · queryrequired
Market id from /data/markets. e.g. q-198
optioninteger · query
0-based index into the market's options.
outcomestring · query
yes = the option, no = against it.
sidestring · query
buy or sell.
usdnumber · query
Buy: dollars to spend.
sharesnumber · query
Sell: shares to sell.

Responses

200Quotes per venue.
marketobject
quotesobject
hyperliquidobject
coinstring
What to trade: Hyperliquid #<n>, Polymarket pm:<token>.
assetinteger
Hyperliquid only: the order's asset number (100000000 + n).
tokenstring
Polymarket only: the CLOB token id.
negRiskboolean
tickSizenumber
sharesnumber
avgPricenumber
feeUsdnumber
Hyperliquid: 0 to buy; Slay's fee + Hyperliquid's on a sell. Polymarket: its taker fee + Slay's builder fee.
costUsdnumber
Buy: what it costs, fees included.
proceedsUsdnumber
Sell: what you receive after fees.
fullboolean
False when the book can't take the whole amount.
worstPricenumber
The deepest price the order reaches: a sensible limit.
meetsMinimumboolean
Hyperliquid: $10 an order. Polymarket: the market's minimum size (usually 5 shares).
errorstring
polymarketobject
coinstring
What to trade: Hyperliquid #<n>, Polymarket pm:<token>.
assetinteger
Hyperliquid only: the order's asset number (100000000 + n).
tokenstring
Polymarket only: the CLOB token id.
negRiskboolean
tickSizenumber
sharesnumber
avgPricenumber
feeUsdnumber
Hyperliquid: 0 to buy; Slay's fee + Hyperliquid's on a sell. Polymarket: its taker fee + Slay's builder fee.
costUsdnumber
Buy: what it costs, fees included.
proceedsUsdnumber
Sell: what you receive after fees.
fullboolean
False when the book can't take the whole amount.
worstPricenumber
The deepest price the order reaches: a sensible limit.
meetsMinimumboolean
Hyperliquid: $10 an order. Polymarket: the market's minimum size (usually 5 shares).
errorstring
beststring | null
One of hyperliquid, polymarket, null
200 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.