CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 84% of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

API Documentation

Overview

Capital.com strives to provide a cutting-edge technologies and features which help you to interact smoothly with the platform.

Description

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 Open API 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.

Explore Open API Doc

Getting started

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:

  1. Create a trading account
    You can open an account here. Note that a demo account can be used.
  2. Turn on Two-Factor Authentication (2FA)
    2FA should be turned on prior to API key generation. Instruction for 2FA enabling.
  3. 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.
  1. Start coding

Available functionality with the Capital.com API

Market data

  • 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.

Trading functionality

  • 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.

Still looking for a broker you can trust?

Join the 535.000+ traders worldwide that chose to trade with Capital.com

1. Create & verify your account 2. Make your first deposit 3. You’re all set. Start trading