Developer API · v1

Build on AvanteTradeMiners.

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.

REST WebSocket JSON Bearer Auth Sandbox

Make your first API call

Get a market quote in under a minute. All you need is an API key from your dashboard.

STEP 01
Get an API Key

Generate a key from your dashboard account settings. Keep it secure — treat it like a password.

STEP 02
Make a Request

Send a GET request to any endpoint with your key in the Authorization header.

STEP 03
Parse the Response

All responses are JSON with consistent field names, timestamps in ISO 8601, and clear error codes.

bash
# 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"
javascript
// 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);
python
# 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())
200 OK · application/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"
}

Simple, secure access

All requests are authenticated using a Bearer token in the Authorization header.

Bearer Token

Pass your API key as a Bearer token in the Authorization header of every request.

http
Authorization: Bearer YOUR_API_KEY

Key Management

Generate, rotate, and revoke keys from your dashboard. You can create multiple keys for different environments.

  • Scoped permissions per key
  • Instant revocation
  • Audit log of usage

Core endpoints

A summary of the primary endpoints available in v1 of the API.

GET
/v1/markets
List all available market instruments with current prices.
GET
/v1/markets/{symbol}
Retrieve a single market instrument by symbol (e.g. BTC-USD).
GET
/v1/markets/{symbol}/history
Historical price data for a given instrument.
GET
/v1/account
Retrieve account information associated with your API key.
GET
/v1/orders
List orders (open, filled, or cancelled) with filtering options.
POST
/v1/orders
Submit a new order through the API.
DELETE
/v1/orders/{id}
Cancel an existing order by ID.
GET
/v1/positions
View current open positions across all instruments.
WS
wss://stream.avantetrademiners.com/v1
Real-time streaming of market data over WebSocket.

Streaming with WebSocket

Subscribe to live price updates over a persistent WebSocket connection.

javascript
// 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);
};
stream
{
  "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"
}

Fair usage, clearly defined

Rate limits are applied per API key and returned in every response header.

Plan
Requests / min
WebSocket conns
Starter
60
2
Pro
600
10
API
3,000
50

Rate limit headers

Every response includes headers so you can track your usage programmatically.

http
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 597
X-RateLimit-Reset: 1705329180

Clear, consistent error responses

All errors return a JSON body with a code, a message, and a timestamp.

401 Unauthorized
{
  "error": {
    "code": "invalid_api_key",
    "message": "The provided API key is invalid or expired.",
    "timestamp": "2024-01-15T14:32:11Z"
  }
}
429 Too Many Requests
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 12s.",
    "timestamp": "2024-01-15T14:32:11Z"
  }
}

Everything you'd expect from a modern API

Small details that make working with the API a smoother experience.

Consistent Responses

Every endpoint returns the same shape — field names, timestamps, and error formats never change unexpectedly.

Sandbox Environment

Test against a sandbox before going live. Same endpoints, same behaviour, no risk.

HTTPS Only

All API traffic is encrypted in transit. Plain HTTP requests are rejected.

Versioned

Version-stable endpoints. Breaking changes ship under a new version, never silently.

ISO 8601 Timestamps

All timestamps use ISO 8601 with UTC — no ambiguity, no locale surprises.

Developer Support

Direct access to our engineering team for integration questions and API issues.

Start building with the API

Create a free account, generate an API key, and make your first request in minutes.

Get an API Key