Docs/Market Data·API
Latest snapshots
Return latest market snapshots for compact tickers.
- Method
- GET
- Path
- /api/v1/market/snapshots/latest
- Auth
- Bearer token
Overview
Returns latest market snapshots for one or more tickers. A snapshot is useful for market panels, but it is not an order book and it is not trade tick data.
Common use cases
- - Render market overview cards
- - Display available bid/ask high-low fields
- - Gracefully hide values that are null
Request URL
Send the request to the base API URL with your product API key in the Authorization bearer header.
GET/api/v1/market/snapshots/latest?tickers=EURUSD%2CXAUUSD
HTTP requestGET https://api.tickquote.com/api/v1/market/snapshots/latest?tickers=EURUSD%2CXAUUSD
Authorization: Bearer <tkp_api_key>Parameter
Description
tickers
Required. Comma-separated compact ticker list, for example EURUSD,XAUUSD.
Try It Out
Edit query parameters and send a demo or authenticated request from this endpoint page.
GET/api/v1/market/snapshots/latest
Live sandboxUse demo_key to try it without an account.
Response
// Response will appear here after sending a request
Response
A successful REST response uses code 0 and message success. Always check code before reading data.
response.json
Sample payload{
"code": 0,
"message": "success",
"data": {
"items": [
{
"type": "snapshot",
"ticker": "XAGUSD",
"time_msc": 1777100000000,
"bid": 75.8145,
"ask": 75.8745,
"mid": 75.8445,
"spread": 0.06,
"bid_high": null,
"bid_low": null,
"ask_high": null,
"ask_low": null,
"last": null,
"last_high": null,
"last_low": null,
"open": null,
"close": null,
"change": null,
"change_pct": null
}
]
}
}Examples
The examples below use compact tickers and the Authorization bearer header.
curl
cURLcurl "https://api.tickquote.com/api/v1/market/snapshots/latest?tickers=EURUSD%2CXAUUSD" \
-H "Authorization: Bearer $TICKQUOTE_API_KEY"request.js
JavaScriptconst response = await fetch("https://api.tickquote.com/api/v1/market/snapshots/latest?tickers=EURUSD%2CXAUUSD", {
headers: {
Authorization: `Bearer ${process.env.TICKQUOTE_API_KEY}`,
},
})
const payload = await response.json()
if (payload.code !== 0) {
throw new Error(payload.message)
}
console.log(payload.data)Field reference
Field
Sample
Description
type
snapshot
Always snapshot.
ticker
XAGUSD
Compact ticker for this snapshot.
time_msc
1777100000000
Snapshot timestamp in Unix milliseconds.
bid
75.8145
Current bid price.
ask
75.8745
Current ask price.
mid
75.8445
Mid price derived from bid and ask.
spread
0.06
Bid/ask spread.
bid_high
null
-
bid_low
null
-
ask_high
null
-
ask_low
null
-
last
null
May be null; do not treat it as trade tick price.
last_high
null
-
last_low
null
-
open
null
-
close
null
-
change
null
-
change_pct
null
Nullable percentage change field.
Important notes
- - Fields not provided by the upstream source are null.
- - last is not a trade tick price commitment.
- - Do not present snapshot as depth or order book data.