# TradeLocker API: guide and brokers

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/platforms/tradelocker, written from the same records as that page.

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.

REST trading API for TradeLocker accounts, with an official Python client.

- Kind: Platform API
- Newest reading: 2026-10-12
- Official documentation: [public-api.tradelocker.com](https://public-api.tradelocker.com/)
- Everything recorded for TradeLocker API, as one JSON file: https://openbrokerapi.com/data/platforms/tradelocker.json

## Access, authentication and streaming

- How you get access: Use your TradeLocker login (email, password, server) against the public REST API; no separate app registration found.
  - Status: verified. Source: [TradeLocker API connectivity](https://tradelocker.com/integrate-tradelocker/connectivity/), checked 2026-09-21.
- Who can use it: TradeLocker users only, via a broker or prop firm that offers TradeLocker.
  - Status: verified. Source: [Getting Started with TradeLocker Public API](https://public-api.tradelocker.com/), checked 2026-09-20.
- Demo: Yes: separate demo environment at demo.tradelocker.com.
  - Status: verified. Source: [Getting Started with TradeLocker Public API](https://public-api.tradelocker.com/), checked 2026-09-20.
- Authentication: POST email, password and server to /auth/jwt/token; send the JWT as Bearer token; refresh tokens issued. /trade/\* routes also need the accNum header (not the accountId).
  - Status: verified. Source: [Getting Started with TradeLocker Public API](https://public-api.tradelocker.com/), checked 2026-09-20.
- Streaming: Unverified. TradeLocker's public API documentation, re-read 12 Oct 2026, describes a request and response REST API only, and its index of pages lists no streaming page. The record's API family names a Streams API from an earlier reading that could not be confirmed on a page that opens today.
  - Status: unverified. Source: [TradeLocker public API, getting started](https://public-api.tradelocker.com/docs/getting-started), checked 2026-10-12.
- History depth: /trade/history by resolution (1m to 1M) and from/to; max rows per request and orders history rows come from /trade/config.
  - Status: verified. Source: [TradeLocker Public API docs](https://public-api.tradelocker.com/), checked 2026-09-20.
- Rate limits, as worded: Per route limits only, served at runtime by the /trade/config route as a number of requests per interval of seconds or minutes. The documentation publishes no fixed figure and gives 2 requests a second only as an example of the form. A tl-developer-api-key header, issued through the TradeLocker Developer Program, gets less restrictive limits. Separately, a request for historical bars is rejected if it would return more than 20,000 bars.
  - Status: verified. Source: [TradeLocker public API, getting started](https://public-api.tradelocker.com/docs/getting-started), checked 2026-10-12.
  - Status: verified. Source: [TradeLocker public API, index of pages](https://public-api.tradelocker.com/llms.txt), checked 2026-10-12.

## TradeLocker API endpoints

23 documented endpoints. [Grouped by what they do](https://openbrokerapi.com/platforms/tradelocker/endpoints).

- [GET /auth/jwt/all-accounts](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-auth-jwt-all-accounts): List every account under the login, each with its id and the accNum that the /trade calls need as a header.
- [POST /auth/jwt/refresh](https://openbrokerapi.com/platforms/tradelocker/endpoints/post-auth-jwt-refresh): Exchange a refresh token for a new access token and a new refresh token, without sending the password again.
- [POST /auth/jwt/token](https://openbrokerapi.com/platforms/tradelocker/endpoints/post-auth-jwt-token): Log in with an email, a password and a server name and receive an access token and a refresh token.
- [GET /trade/accounts](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-trade-accounts): Read the details of the account selected by the accNum header: its name, currency, status, type, risk rules and trading rules.
- [GET /trade/accounts/{accountId}/instruments](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-account-instruments): List the instruments the account can trade, each with its tradableInstrumentId and the routes used for quotes and for trading.
- [DELETE /trade/accounts/{accountId}/orders](https://openbrokerapi.com/platforms/tradelocker/endpoints/delete-account-orders): Cancel every pending order on the account, or only those in one instrument.
- [GET /trade/accounts/{accountId}/orders](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-account-orders): List the account's orders that are not yet final: those neither filled, cancelled nor rejected.
- [POST /trade/accounts/{accountId}/orders](https://openbrokerapi.com/platforms/tradelocker/endpoints/post-account-orders): Place a market, limit or stop order on the account, with an optional stop loss and take profit. The reply carries the new orderId.
- [GET /trade/accounts/{accountId}/ordersHistory](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-account-orders-history): List the account's orders that reached a final status: filled, cancelled or rejected.
- [DELETE /trade/accounts/{accountId}/positions](https://openbrokerapi.com/platforms/tradelocker/endpoints/delete-account-positions): Place closing orders for every open position on the account, or only those in one instrument. The page says closure is not guaranteed and may not be immediate.
- [GET /trade/accounts/{accountId}/positions](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-account-positions): List every position currently open on the account.
- [GET /trade/accounts/{accountId}/state](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-account-state): Read the current state of one account, such as its balance, available funds and profit and loss.
- [GET /trade/config](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-trade-config): Read the configuration for the account: the column names of the positions, orders and account tables, the rate limit of each route and the row limits.
- [GET /trade/dailyBar](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-daily-bar): Read the current daily bar of one instrument: open, high, low, close and volume.
- [GET /trade/history](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-history): Download historical bars for one instrument between two times, at a resolution from one minute to one month.
- [GET /trade/instruments/{tradableInstrumentId}](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-instrument-details): Read the dealing details of one instrument, such as lot size and step, smallest and largest lot, tick size, quoting currency and trade session.
- [DELETE /trade/orders/{orderId}](https://openbrokerapi.com/platforms/tradelocker/endpoints/delete-order): Cancel one pending order. It works only before the order has been executed.
- [PATCH /trade/orders/{orderId}](https://openbrokerapi.com/platforms/tradelocker/endpoints/patch-order): Change a pending order: its price, size, validity, stop loss or take profit.
- [DELETE /trade/positions/{positionId}](https://openbrokerapi.com/platforms/tradelocker/endpoints/delete-position): Place an order that closes one open position, in full or in part. The page says closure is not guaranteed and may not be immediate.
- [PATCH /trade/positions/{positionId}](https://openbrokerapi.com/platforms/tradelocker/endpoints/patch-position): Change the stop loss, the take profit or both on an open position. Sending null for one removes it.
- [GET /trade/quotes](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-quotes): Read the current bid and ask of one instrument, with the size at each.
- [GET /trade/sessions/{sessionId}](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-trade-session): Read one trade session: its time zone, its opening periods, its holidays and whether trading is blocked.
- [GET /trade/sessionStatuses/{sessionStatusId}](https://openbrokerapi.com/platforms/tradelocker/endpoints/get-session-status): Read which order operations and order types a trade session allows while it is in a given session status.

## TradeLocker API SDKs and wrappers

- tradelocker (Python, Official): Official TradeLocker Python library, 0.56.2 of 18 Dec 2024, maintained by TradeLocker and ivosluganovic, Python 3.11 and 3.12 only, MIT licence. No 2025 or 2026 release.
  - Status: verified. Source: [pypi.org](https://pypi.org/project/tradelocker/), checked 2026-09-20.

## TradeLocker API error codes

5 decoded error codes. [All TradeLocker API errors](https://openbrokerapi.com/errors/tradelocker).

- [400 Bad Request](https://openbrokerapi.com/errors/tradelocker/400-bad-request): TradeLocker lists 400 with the description "Bad Request" as a response of its authentication routes: POST /auth/jwt/token, which fetches the JWT tokens, POST /auth/jwt/refresh and GET /auth/jwt/all-accounts.
- [401 Unauthorized](https://openbrokerapi.com/errors/tradelocker/401-unauthorized): TradeLocker lists 401 with the description "Unauthorized" as a response of its /trade routes, including placing, modifying and cancelling orders.
- [403 Forbidden](https://openbrokerapi.com/errors/tradelocker/403-forbidden): TradeLocker lists 403 with the description "Forbidden" as a response of its /trade routes, including placing, modifying and cancelling orders.
- [404 Not Found](https://openbrokerapi.com/errors/tradelocker/404-not-found): TradeLocker lists 404 with the description "Not Found" as a response of many /trade routes, including placing an order, closing all positions and the account, instrument, configuration and history routes.
- [no_data](https://openbrokerapi.com/errors/tradelocker/no-data): A status in the response of GET /trade/history, not an HTTP error.

## TradeLocker API: questions and answers

### How do I get access to the TradeLocker API?

Use your TradeLocker login (email, password, server) against the public REST API; no separate app registration found.

- Status: verified. Source: [TradeLocker API connectivity](https://tradelocker.com/integrate-tradelocker/connectivity/), checked 2026-09-21.

### Who can use the TradeLocker API?

TradeLocker users only, via a broker or prop firm that offers TradeLocker.

- Status: verified. Source: [Getting Started with TradeLocker Public API](https://public-api.tradelocker.com/), checked 2026-09-20.

### TradeLocker API demo: is there a demo or sandbox?

Yes: separate demo environment at demo.tradelocker.com.

- Status: verified. Source: [Getting Started with TradeLocker Public API](https://public-api.tradelocker.com/), checked 2026-09-20.

### What are the TradeLocker API rate limits?

Per route limits only, served at runtime by the /trade/config route as a number of requests per interval of seconds or minutes. The documentation publishes no fixed figure and gives 2 requests a second only as an example of the form.

- Status: verified. Source: [TradeLocker public API, getting started](https://public-api.tradelocker.com/docs/getting-started), checked 2026-10-12.
- Status: verified. Source: [TradeLocker public API, index of pages](https://public-api.tradelocker.com/llms.txt), checked 2026-10-12.

### How does TradeLocker API authentication work?

POST email, password and server to /auth/jwt/token; send the JWT as Bearer token; refresh tokens issued. /trade/\* routes also need the accNum header (not the accountId).

- Status: verified. Source: [Getting Started with TradeLocker Public API](https://public-api.tradelocker.com/), checked 2026-09-20.

### Does the TradeLocker API support streaming?

Unverified. TradeLocker's public API documentation, re-read 12 Oct 2026, describes a request and response REST API only, and its index of pages lists no streaming page.

- Status: unverified. Source: [TradeLocker public API, getting started](https://public-api.tradelocker.com/docs/getting-started), checked 2026-10-12.

### How much history does the TradeLocker API return?

/trade/history by resolution (1m to 1M) and from/to; max rows per request and orders history rows come from /trade/config.

- Status: verified. Source: [TradeLocker Public API docs](https://public-api.tradelocker.com/), checked 2026-09-20.

### Is there a Python library for the TradeLocker API?

This register lists one Python library for the TradeLocker API. tradelocker (official, Python): Official TradeLocker Python library, 0.56.2 of 18 Dec 2024, maintained by TradeLocker and ivosluganovic, Python 3.11 and 3.12 only, MIT licence. No 2025 or 2026 release.

- Status: verified. Source: [tradelocker](https://pypi.org/project/tradelocker/), checked 2026-09-20.

[TradeLocker API questions, each answered in a sentence or two](https://openbrokerapi.com/answers/tradelocker).

## Partner programme

No published figure. [The TradeLocker partner programme record](https://openbrokerapi.com/partners/tradelocker). This site carries no affiliate links.

## Brokers that offer TradeLocker API

Unverified: no broker on this register is recorded as offering TradeLocker API. That is a gap in the records, not a finding that none does.

## Licence and how to cite

The limit records on this page come from the limits register, which is CC BY 4.0 (https://openbrokerapi.com/data/limits.json). Everything else on it comes from records that are all rights reserved. This file is the page itself, at its own address, in another format, and it is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data.

Cite as: TradeLocker API: guide and brokers. Broker API Hub, https://openbrokerapi.com/platforms/tradelocker, newest check 2026-10-12.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
