Capital.com strives to provide cutting-edge technologies and features which help you to interact smoothly with the platform. With our API you will be able to manage your accounts, conduct trading, watch real-time prices and build your own applications with the highest security standards applied.
Our website and Swagger documentation will help you to learn more about the functions we provide with the Capital.com API. There you will find all the parameters needed for requests together with data formats, values and responses examples.
Our Capital.com API is primarily built in the REST style which uses request-response communications. In addition to this we offer a WebSocket API for market data which gives an opportunity to get updates in real-time.
Even if you are not a developer, you may find the Capital.com API useful. It can help you to understand the way our platform works in terms of order types, markets and basic functions.
The Capital.com API allows direct access to the latest version of our trading engine. To use the API the following simple steps should be taken:
- Create a trading account
You can open an account here. Note that a demo account can be used.
- Turn on Two-Factor Authentication (2FA)
2FA should be turned on prior to API key generation. Instruction for 2FA enabling.
- Generate an API key
To generate the API key, go to Settings → API integrations → Generate new key. There you will need to enter the label of the key, set an optional expiration date, enter the 2FA code and that’s it.
- Start coding
Available functionality with the Capital.com API
- Receive real-time prices for the whole range of available assets with the REST and WebSocket API;
- Get the price history for the whole range of assets.
- Open positions, set stop and limit orders, set stop loss and take profit levels.
- Review and change financial account settings (trading modes, leverage sizes).
- Review trades and orders history.