TradeLocker API endpoints
23 documented TradeLocker API endpoints, grouped by what they do. Each has its method, path, parameters and the source it was read from.
Independent and unofficialNewest check
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.
Account
- 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.
- GET/trade/accounts/{accountId}/ordersList the account's orders that are not yet final: those neither filled, cancelled nor rejected.
- GET/trade/accounts/{accountId}/ordersHistoryList the account's orders that reached a final status: filled, cancelled or rejected.
- 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.
Auth
- 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.
Config
Instruments and Sessions
- 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.
- 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.
Market data
- 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/quotesRead the current bid and ask of one instrument, with the size at each.
Trading
- DELETE/trade/accounts/{accountId}/ordersCancel every pending order on the account, or only those in one instrument.
- 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.
- 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.
- 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.