Broker API HubMenu

TradeLocker API GET /trade/quotes

GET/trade/quotesMarket data

Read the current bid and ask of one instrument, with the size at each.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Independent and unofficialpublic-api.tradelocker.comchecked

Read on 12 Oct 2026 on TradeLocker's own reference page for this call, in the Markdown version the documentation site serves at the same address with .md on the end. That page carries the call's OpenAPI definition, headed Trading API version 2.11.0: the method, path, parameters and required marks here are that definition's. In the reply ap is the ask price, as the best ask size, bp the bid price and bs the best bid size. The mock reply uses those field names with invented values.

Parameters

NameInTypeDescription
accNumrequiredheaderintegerThe account number that selects which of the login's accounts the call acts on. It is the accNum from GET /auth/jwt/all-accounts, not the accountId.
routeIdrequiredqueryintegerThe route identifier of the instrument. TradeLocker's getting started page says to use the INFO route for quote calls. Both routes are listed for each instrument by GET /trade/accounts/{accountId}/instruments.
tradableInstrumentIdrequiredqueryintegerThe identifier of the instrument, as tradableInstrumentId in the list of instruments.

Authentication headers

NameTypeDescription
AuthorizationrequiredstringSend Bearer followed by the accessToken from POST /auth/jwt/token. The reference marks the call as secured by a bearer JWT. Placeholder only: never paste a real token into this site.

Request

Written from the method, path and parameters recorded on this page, against the demo host. Not executed against a live or demo account. Credentials are read from environment variables on your own machine and are never entered on this site. The request builder writes these same snippets, from the same record.

Python
# Set TRADELOCKER_ACCESS_TOKEN, TRADELOCKER_ACC_NUM as environment variables first. Never paste real values into code.
# TRADELOCKER_ACCESS_TOKEN holds the Authorization header that POST /auth/jwt/token returns.
# Replace each {placeholder}, "..." and 0 with a real value before running.
import os
import requests

BASE_URL = "https://demo.tradelocker.com/backend-api"  # the demo host
headers = {
    "Authorization": "Bearer " + os.environ["TRADELOCKER_ACCESS_TOKEN"],
    "accNum": os.environ["TRADELOCKER_ACC_NUM"],
}
params = {"routeId": "{routeId}", "tradableInstrumentId": "{tradableInstrumentId}"}
resp = requests.get(BASE_URL + "/trade/quotes", headers=headers, params=params, timeout=10)
resp.raise_for_status()
print(resp.json())
JavaScript
// Set TRADELOCKER_ACCESS_TOKEN, TRADELOCKER_ACC_NUM as environment variables first. Never paste real values into code.
// TRADELOCKER_ACCESS_TOKEN holds the Authorization header that POST /auth/jwt/token returns.
// Replace each {placeholder}, "..." and 0 with a real value before running.
// Run as a module, for example a .mjs file, on a Node version that has fetch built in.
const BASE_URL = "https://demo.tradelocker.com/backend-api"; // the demo host
const res = await fetch(BASE_URL + "/trade/quotes" + "?routeId={routeId}&tradableInstrumentId={tradableInstrumentId}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer " + process.env.TRADELOCKER_ACCESS_TOKEN,
    "accNum": process.env.TRADELOCKER_ACC_NUM,
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());
curl
# Set TRADELOCKER_ACCESS_TOKEN, TRADELOCKER_ACC_NUM as environment variables first. Never paste real values into code.
# TRADELOCKER_ACCESS_TOKEN holds the Authorization header that POST /auth/jwt/token returns.
# Replace each {placeholder}, "..." and 0 with a real value before running.
curl -X GET "https://demo.tradelocker.com/backend-api/trade/quotes?routeId={routeId}&tradableInstrumentId={tradableInstrumentId}" \
  -H "Authorization: Bearer $TRADELOCKER_ACCESS_TOKEN" \
  -H "accNum: $TRADELOCKER_ACC_NUM"

Response

A mock response. The values are invented, so check field names against the official reference.

{
  "_mock": true,
  "d": {
    "ap": 1.1002,
    "as": 100000,
    "bp": 1.1,
    "bs": 100000
  },
  "s": "ok"
}

TradeLocker API errors you may meet

All TradeLocker API error codes.