Platform API
TradeLocker API: guide and brokers
REST trading API for TradeLocker accounts, with an official Python client.
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.
Access, authentication and streaming
API types listed in the record: REST, Streams API (Socket.IO WebSocket), Python package.
- How you get access
Use your TradeLocker login (email, password, server) against the public REST API; no separate app registration found.
TradeLocker API connectivitychecked
- Who can use it
TradeLocker users only, via a broker or prop firm that offers TradeLocker.
- Demo
Yes: separate demo environment at demo.tradelocker.com.
- 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).
- 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.
UnverifiedTradeLocker public API, getting startedchecked
- History depth
/trade/history by resolution (1m to 1M) and from/to; max rows per request and orders history rows come from /trade/config.
TradeLocker Public API docschecked
- 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.
TradeLocker public API, getting startedchecked TradeLocker public API, index of pageschecked
TradeLocker API SDKs and wrappers
| Library | Language | Official | Note | Source |
|---|---|---|---|---|
| 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. | pypi.orgchecked |
TradeLocker API endpoints
23 documented endpoints. They belong to the platform's own API, so the calls are the same whichever broker or firm the account is with. Only the base address can differ. Grouped by what they do
- GET/auth/jwt/all-accountsList every account under the login, each with its id and the accNum that the /trade calls need as a header.
- POST/auth/jwt/refreshExchange a refresh token for a new access token and a new refresh token, without sending the password again.
- POST/auth/jwt/tokenLog in with an email, a password and a server name and receive an access token and a refresh token.
- GET/trade/accountsRead the details of the account selected by the accNum header: its name, currency, status, type, risk rules and trading rules.
- GET/trade/accounts/{accountId}/instrumentsList the instruments the account can trade, each with its tradableInstrumentId and the routes used for quotes and for trading.
- DELETE/trade/accounts/{accountId}/ordersCancel every pending order on the account, or only those in one instrument.
- GET/trade/accounts/{accountId}/ordersList the account's orders that are not yet final: those neither filled, cancelled nor rejected.
- POST/trade/accounts/{accountId}/ordersPlace 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}/ordersHistoryList the account's orders that reached a final status: filled, cancelled or rejected.
- DELETE/trade/accounts/{accountId}/positionsPlace 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}/positionsList every position currently open on the account.
- GET/trade/accounts/{accountId}/stateRead the current state of one account, such as its balance, available funds and profit and loss.
- GET/trade/configRead 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/dailyBarRead the current daily bar of one instrument: open, high, low, close and volume.
- GET/trade/historyDownload historical bars for one instrument between two times, at a resolution from one minute to one month.
- GET/trade/instruments/{tradableInstrumentId}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}Cancel one pending order. It works only before the order has been executed.
- PATCH/trade/orders/{orderId}Change a pending order: its price, size, validity, stop loss or take profit.
- DELETE/trade/positions/{positionId}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}Change the stop loss, the take profit or both on an open position. Sending null for one removes it.
- GET/trade/quotesRead the current bid and ask of one instrument, with the size at each.
- GET/trade/sessions/{sessionId}Read one trade session: its time zone, its opening periods, its holidays and whether trading is blocked.
- GET/trade/sessionStatuses/{sessionStatusId}Read which order operations and order types a trade session allows while it is in a given session status.
TradeLocker API error codes
5 decoded error codes. All TradeLocker API errors
400 Bad RequestTradeLocker 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 UnauthorizedTradeLocker lists 401 with the description "Unauthorized" as a response of its /trade routes, including placing, modifying and cancelling orders.403 ForbiddenTradeLocker lists 403 with the description "Forbidden" as a response of its /trade routes, including placing, modifying and cancelling orders.404 Not FoundTradeLocker 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_A status in the response of GET /trade/history, not an HTTP error.data
TradeLocker API: questions and answers
Each answer is read from the record on this page, not written separately. Where the record is unverified, the answer says so.
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.
TradeLocker API connectivitychecked
Who can use the TradeLocker API?
TradeLocker users only, via a broker or prop firm that offers TradeLocker.
TradeLocker API demo: is there a demo or sandbox?
Yes: separate demo environment at demo.tradelocker.com.
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.
TradeLocker public API, getting startedchecked TradeLocker public API, index of pageschecked
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).
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.
UnverifiedTradeLocker public API, getting startedchecked
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.
TradeLocker Public API docschecked
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.
tradelockerchecked
TradeLocker API questions, each answered in a sentence or two.
Everything this site records for TradeLocker API, as one JSON file. Each section of the file states its own licence. About the files. This page as Markdown.
TradeLocker API guides and reference
TradeLocker API compared
The same fields from two records, side by side. No winner is picked.
What changed recently for the TradeLocker API
Ecosystem
TradeLocker documents no streaming. From the getting started page, /docs/streaming and /docs/quotes-stream both return 404. Read 23 September 2026.
Change
Correction. This site described a TradeLocker Streams API over Socket.IO. Both streaming documentation URLs returned 404 on 23 Sep 2026, so streaming is now recorded as not documented. The rest is unchanged: JWT from /auth/jwt/token, per route limits from /trade/config/ at runtime, separate demo and live hosts, and an official Python client. The getting started page is dated 22 May 2025.
Change
TradeLocker released version 0.56.2 of its official Python client on PyPI. It is the latest release, and the client requires Python 3.11 or later.
tradelocker release history, PyPIdate last opened not recorded
The newest entries are shown. Every dated change, all brokers and platforms. Follow TradeLocker changes by RSS
Sample apps that use the TradeLocker API
- PipDeckOur Stream Deck plugin for MetaTrader 5 and TradeLocker, built as a TypeScript monorepo of six packages. The repo is private for now and goes public soon.
Partner programme
No published figure. The TradeLocker partner programme record. The programme register holds every record. This site carries no affiliate links.
Brokers that offer TradeLocker API
No broker on this register is recorded as offering TradeLocker API. That is a gap in the records, not a finding that none does.
How to cite this
TradeLocker API: guide and brokers. Broker API Hub, https://openbrokerapi.com/platforms/tradelocker, newest check .
Where you rely on a single figure, cite the source and the checked date printed beside it as well.