A clean REST and WebSocket API for market data and account information. Consistent responses, sensible rate limits, and clear documentation — so you can build without surprises.
Get a market quote in under a minute. All you need is an API key from your dashboard.
Generate a key from your dashboard account settings. Keep it secure — treat it like a password.
Send a GET request to any endpoint with your key in the Authorization header.
All responses are JSON with consistent field names, timestamps in ISO 8601, and clear error codes.
# Fetch a live market quote curl -X GET "https://api.avantetrademiners.com/v1/markets/BTC-USD" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"
// Fetch a live market quote const res = await fetch( "https://api.avantetrademiners.com/v1/markets/BTC-USD", { headers: { "Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json" } } ); const data = await res.json(); console.log(data);
# Fetch a live market quote import requests headers = { "Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json" } res = requests.get( "https://api.avantetrademiners.com/v1/markets/BTC-USD", headers=headers ) print(res.json())
{
"symbol": "BTC-USD",
"name": "Bitcoin",
"price": 67842.10,
"change_24h": 2.14,
"change_24h_pct": 2.14,
"high_24h": 68210.00,
"low_24h": 65980.50,
"volume_24h": 1240000000,
"market": "crypto",
"updated_at": "2024-01-15T14:32:11Z"
}
All requests are authenticated using a Bearer token in the Authorization header.
Pass your API key as a Bearer token in the Authorization header of every request.
Authorization: Bearer YOUR_API_KEY
Generate, rotate, and revoke keys from your dashboard. You can create multiple keys for different environments.
A summary of the primary endpoints available in v1 of the API.
BTC-USD).Subscribe to live price updates over a persistent WebSocket connection.
// Connect and subscribe to live prices const socket = new WebSocket( "wss://stream.avantetrademiners.com/v1?token=YOUR_API_KEY" ); socket.onopen = () => { socket.send(JSON.stringify({ action: "subscribe", channels: ["prices"], symbols: ["BTC-USD", "ETH-USD"] })); }; socket.onmessage = (event) => { const msg = JSON.parse(event.data); console.log(msg); };
{
"type": "price_update",
"symbol": "BTC-USD",
"price": 67843.22,
"timestamp": "2024-01-15T14:32:12.418Z"
}
{
"type": "price_update",
"symbol": "ETH-USD",
"price": 3412.08,
"timestamp": "2024-01-15T14:32:12.421Z"
}
Rate limits are applied per API key and returned in every response header.
Every response includes headers so you can track your usage programmatically.
X-RateLimit-Limit: 600 X-RateLimit-Remaining: 597 X-RateLimit-Reset: 1705329180
All errors return a JSON body with a code, a message, and a timestamp.
{
"error": {
"code": "invalid_api_key",
"message": "The provided API key is invalid or expired.",
"timestamp": "2024-01-15T14:32:11Z"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 12s.",
"timestamp": "2024-01-15T14:32:11Z"
}
}
Small details that make working with the API a smoother experience.
Every endpoint returns the same shape — field names, timestamps, and error formats never change unexpectedly.
Test against a sandbox before going live. Same endpoints, same behaviour, no risk.
All API traffic is encrypted in transit. Plain HTTP requests are rejected.
Version-stable endpoints. Breaking changes ship under a new version, never silently.
All timestamps use ISO 8601 with UTC — no ambiguity, no locale surprises.
Direct access to our engineering team for integration questions and API issues.