GET
/v1/last/quote/:venue/:symbolLast top-of-book quote
Get the latest top-of-book quote for supported stocks, FX, crypto, commodities, and DEX markets, including best bid, best ask, sizes, symbol, and timestamp.
- Auth
X-API-Keyheader- Format
- JSON
- Rate limits
- Per-key, see limits
Example
request · shell
curl -H "X-API-Key: $KEY" \
"https://api.sifting.io/v1/last/quote/forex/GBPUSD"200OKapplication/json
{ "s": "GBPUSD", "b": "1.35054", "B": "358245", "a": "1.35097", "A": "312930", "t": 1779742456412}Loading runner…
First load onlyParameters
ParameterDescription
Parameter
venuerequiredenum · path- stocks | crypto | forex | commodities | dex.
symbolrequiredstring · path- 6–12 uppercase alphanumeric, no separators.
Response fields
FieldDescription
Field
sstring- Symbol.
bstring- Best bid price.
Bstring- Best bid size.
astring- Best ask price.
Astring- Best ask size.
tint64 (epoch ms)- Exchange timestamp, Unix epoch milliseconds.
Reference
Prices and sizes are strings, cast before mathDescription
Prices and sizes are strings, cast before math
- Why
- b, B, a, and A come back as JSON strings to preserve exact precision. Only t is a number (epoch ms).
- The trap
- Math on the raw fields breaks: Python raises TypeError, JavaScript + silently joins the strings instead of adding.
- Python (trade, bid, ask)
- bid = float(data["b"]); ask = float(data["a"])
- JavaScript (trade, bid, ask)
- const bid = Number(data.b); const ask = Number(data.a);
- cURL / jq
- Cast in jq too: jq '{ bid: (.b|tonumber), ask: (.a|tonumber) }'
- Historical bars differ
- Bars from /v1/hist/* already return t, o, h, l, c, v as plain numbers, do not cast those.
Error responses
StatusCodeMeaning
- 503
stale_snapshotQuote snapshot is older than the staleness threshold (default 5s).
{ "error": "stale_snapshot", "last_t": 1746189100000, "server_now": 1746189130000}