POST /markets/quote

Auth X-Hub-Key from API_HUB_KEYExecute POST /run/myriad/markets/quoteCache executed live on every call — a read-only POST answer is never cachedCost free · weight 0 · standard rate classSource billing free

Read-only trade quote: expected shares, average price, fees and unsigned calldata.

Body forms: exactly one market selector (`market_id` + `network_id`, or `market_slug`), `outcome_id`, `action`, then for a buy only `value`; a sell takes exactly one of `value` or `shares`. Verified on open AMM markets (HTTP 200 with shares/price/calldata). Order-book markets currently answer provider errors instead: 400 `Market is not open for trading` for id+network and 500 `Market fees configuration is invalid` for slug, on 2026-11-18. Those upstream errors are surfaced verbatim rather than hidden.

Parameters

nameintypedescription
market_idbodyintoptionalOn-chain market id (pair with network_id; exclusive with market_slug).
example: 595
network_idbodyintoptionalNetwork id, required with market_id.
example: 42220
outcome_idbodyintrequiredOn-chain outcome id.
example: 0
actionbodystr
buy | sell
requiredTrade direction being priced.
example: buy
valuebodyfloatoptionalTokens to spend (buy) or receive (sell); exclusive with shares.
example: 100
slippagebodyfloatoptionalSlippage tolerance as a decimal (0.005 = 0.5%).
default: 0.005
example: 0.01

Response

type: object
pagination: none
sample: {
  "value": "int",
  "shares": "float",
  "shares_threshold": "float",
  "price_average": "float",
  "price_before": "float",
  "price_after": "float",
  "calldata": "str",
  "net_amount": "int",
  "fees": "object"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sX POST "https://openapihub.dev/run/myriad/markets/quote" \
  -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
  -d '{"market_id": 595, "network_id": 42220, "outcome_id": 0, "action": "buy", "value": 100, "slippage": 0.01}'