DXtrade API endpoints
21 documented DXtrade 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.
Conversion Rates
Market Data
Reference Data
- GET/accounts/{accountCode}/instruments/queryRead the details of instruments as they are set for one account, since the platform can configure an instrument differently for different accounts.
- GET/instruments/{symbol}Read the general details of one instrument by its symbol.
- GET/instruments/querySearch the instruments the platform trades by symbol, with a wildcard, or by type, and page through the result.
Sessions
- POST/loginLog in with a username, a domain and a password and receive a session token to send with every later request.
- POST/loginByTokenCreate a session token from a single sign on token in place of a password, for a system that holds no credentials of its own.
- POST/logoutEnd a token authentication session at once, so the session token stops working.
- POST/pingReset the expiry of a token authentication session without doing anything else. Not needed with HMAC authentication.
Trading
- POST/accounts/{accountCode}/ordersPlace a market, limit or stop order, or a group of orders, on an account. The client gives each order a code of its own so a repeat is refused.
- PUT/accounts/{accountCode}/ordersChange an order that is not yet final by sending the whole order request again with the changed fields.
- DELETE/accounts/{accountCode}/orders/{orderCode}Cancel one order on an account, named by the client's order code or by the platform's own code.
Users and Accounts
- POST/accounts/{accountCode}/closeClose the open positions on an account, cancel its working orders, or both, in one step, for every instrument or for one.
- GET/accounts/{accountCode}/eventsList events on an account that a trader needs to know of, such as liquidations and margin calls.
- GET/accounts/{accountCode}/metricsRead the current metrics of an account, such as equity and profit and loss. The values move with the market, so the page expects polling or the push API.
- GET/accounts/{accountCode}/ordersList every open order on an account.
- GET/accounts/{accountCode}/orders/historyList an account's orders, both working and final, filtered by status, type, side, instrument or time.
- GET/accounts/{accountCode}/portfolioRead an account's portfolio: its open positions and working orders. Closed positions and completed orders are not in it.
- GET/accounts/{accountCode}/positionsList every open position on an account.
- GET/accounts/{accountCode}/transfersList the cash movements on an account over a period: deposits, withdrawals, commissions, financing and settled profit and loss.
- GET/users/{username}Read the details of a user, which is how a program finds the accounts a login can use.