This document outlines the appropriate format that the traders must follow while writing the webhook payload for a particular CFD (Contracts for Difference) asset class on the Capital.com trading platform.
With Capital.com you can trade CFDs on multiple asset classes:
Let’s get started 🚀
Shares
The following outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of share orders to be executed into Capital.com.
Market Order
The traders can write the webhook payload for setting up Market orders using these three payload fields:
- Symbol
- Action
- Quantity
Symbol
The ticker symbol of the Share. Capital.com uses single share ticker symbols to trade CFDs in the Share Market. For example, "AAPL," "AMZN," and "META," etc.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
EXAMPLE
I. Buy
{
"symbol": "AAPL",
"action": "buy",
"quantity": 123
}
II. Sell
{
"symbol": "AAPL",
"action": "sell",
"quantity": 123
}
Limit Order
The traders can write the webhook payload for setting up Limit orders using these four payload fields:
- Symbol
- Action
- Quantity
- Limit_price
Symbol
The ticker symbol of the Share. Capital.com uses single share ticker symbols to trade CFDs in the Share Market. For example, "AAPL," "AMZN," and "META," etc.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
EXAMPLE
I. Buy
{
"symbol": "AAPL",
"action": "buy",
"quantity": 123,
"limit_price": 123.98
}
II. Sell
{
"symbol": "AAPL",
"action": "sell",
"quantity": 123,
"limit_price": 123.98
}
Stop Order
The traders can write the webhook payload for setting up Stop orders using these four payload fields:
- Symbol
- Action
- Quantity
- Stop_price
Symbol
The ticker symbol of the Share. Capital.com uses single share ticker symbols to trade CFDs in the Share Market. For example, "AAPL," "AMZN," and "META," etc.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "AAPL",
"action": "buy",
"quantity": 123,
"stop_price": 123.98
}
II. Sell
{
"symbol": "AAPL",
"action": "sell",
"quantity": 123,
"stop_price": 123.98
}
Stop-limit Order
The traders can write the webhook payload for setting up Stop-Limit orders using these five payload fields:
- Symbol
- Action
- Quantity
- Limit_price
- Stop_price
Symbol
The ticker symbol of the Share. Capital.com uses single share ticker symbols to trade CFDs in the Share Market. For example, "AAPL," "AMZN," and "META," etc.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "AAPL",
"action": "buy",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
II. Sell
{
"symbol": "AAPL",
"action": "sell",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
Commodities
The following outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of Commodities orders to be executed into Capital.com.
Market Order
The traders can write the webhook payload for setting up Market orders using these three payload fields:
- Symbol
- Action
- Quantity
I. Symbol: Ticker symbol of the asset. There are two types of commodities: Hard Commodities and Soft Commodities.
A. Hard Commodities: Hard commodities are those natural resources that need to be extracted in some form such as gold, rubber, and oil. Capital.com represents these assets by the combination of the product ticker symbol with the exchange ticker symbol and binds with a colon. E.g. GC:CMX, CL:NMX, TT:NMX, etc.
B. Soft commodities: Soft commodities are those that tend to be grown such as coffee, cocoa, sugar, corn, wheat, soybean, fruit, and livestock. Capital.com represents these assets with a single product ticker symbol. E.g. ZW, ZC, and LE.
For the complete list of commodities ticker symbols, please refer to this page.
II. Action: The signal action, indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
III. Quantity: The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
EXAMPLE
I. Buy
{
"symbol": "GC:CMX",
"action": "buy",
"quantity": 123
}
II. Sell
{
"symbol": "GC:CMX",
"action": "sell",
"quantity": 123
}
Limit Order
The traders can write the webhook payload for setting up Limit orders using these four payload fields:
- Symbol
- Action
- Quantity
- Limit_price
I. Symbol: Ticker symbol of the asset. There are two types of commodities: Hard Commodities and Soft Commodities.
A. Hard Commodities: Hard commodities are those natural resources that need to be extracted in some form such as gold, rubber, and oil. Capital.com represents these assets by the combination of the product ticker symbol with the exchange ticker symbol binds with a colon. E.g. GC:CMX, CL:NMX, TT:NMX, etc.
B. Soft commodities: Soft commodities are those that tend to be grown such as coffee, cocoa, sugar, corn, wheat, soybean, fruit, and livestock. Capital.com represents these assets with a single product ticker symbol. E.g. ZW, ZC, and LE.
For the complete list of commodities ticker symbols, please refer to this page.
II. Action: The signal action, indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
III. Quantity: The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
IV. Limit_Price: An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
EXAMPLE
I. Buy
{
"symbol": "GC:CMX",
"action": "US100",
"quantity": 123,
"limit_price": 123.98
}
II. Sell
{
"symbol": "GC:CMX",
"action": "sell",
"quantity": 123,
"limit_price": 123.98
}
Stop Order
The traders can write the webhook payload for setting up Stop orders using these four payload fields:
- Symbol
- Action
- Quantity
- Stop_price
I. Symbol: Ticker symbol of the asset. There are two types of commodities: Hard Commodities and Soft Commodities.
A. Hard Commodities: Hard commodities are those natural resources that need to be extracted in some form such as gold, rubber, and oil. Capital.com represents these assets by the combination of the product ticker symbol with the exchange ticker symbol binds with a colon. E.g. GC:CMX, CL:NMX, TT:NMX, etc.
B. Soft commodities: Soft commodities are those that tend to be grown such as coffee, cocoa, sugar, corn, wheat, soybean, fruit, and livestock. Capital.com represents these assets with a single product ticker symbol. E.g. ZW, ZC, and LE.
For the complete list of commodities ticker symbols, please refer to this page.
II. Action: The signal action, indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
III. Quantity: The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
IV. Stop_price: An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "GC:CMX",
"action": "buy",
"quantity": 123,
"stop_price": 123.98
}
II. Sell
{
"symbol": "GC:CMX",
"action": "sell",
"quantity": 123,
"stop_price": 123.98
}
Stop-Limit Order
The traders can write the webhook payload for setting up Stop-limit orders using these five payload fields:
- Symbol
- Action
- Quantity
- Limit_price
- Stop_price
I. Symbol: Ticker symbol of the asset. There are two types of commodities: Hard Commodities and Soft Commodities.
A. Hard Commodities: Hard commodities are those natural resources that need to be extracted in some form such as gold, rubber, and oil. Capital.com represents these assets by the combination of the product ticker symbol with the exchange ticker symbol binds with a colon. E.g. GC:CMX, CL:NMX, TT:NMX, etc.
B. Soft commodities: Soft commodities are those that tend to be grown such as coffee, cocoa, sugar, corn, wheat, soybean, fruit, and livestock. Capital.com represents these assets with a single product ticker symbol. E.g. ZW, ZC, and LE.
For the complete list of commodities ticker symbols, please refer to this page.
II. Action: The signal action, indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
III. Quantity: The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
IV. Limit_price: An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
V. Stop_price: An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "GC:CMX",
"action": "buy",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
II. Sell
{
"symbol": "GC:CMX",
"action": "sell",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
Indices
The following outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of indices orders to be executed into Capital.com.
Market Order
The traders can write the webhook payload for setting up Market orders using these three payload fields:
- Symbol
- Action
- Quantity
Symbol
The ticker symbol of the indices. Capital.com uses single indices ticker symbols to trade CFDs in the Indices Market. For example, US100, DE40, and US30. For the complete list of the indices symbols, please check this page.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
EXAMPLE
I. Buy
{
"symbol": "US100",
"action": "buy",
"quantity": 123
}
II. Sell
{
"symbol": "US100",
"action": "sell",
"quantity": 123
}
Limit Order
The traders can write the webhook payload for setting up Limit orders using these four payload fields:
- Symbol
- Action
- Quantity
- Limit_price
Symbol
The ticker symbol of the indices. Capital.com uses single indices ticker symbols to trade CFDs in the Indices Market. For example, US100, DE40, and US30. For the complete list of the indices symbols, please check this page.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
EXAMPLE
I. Buy
{
"symbol": "US100",
"action": "US100",
"quantity": 123,
"limit_price": 123.98
}
II. Sell
{
"symbol": "US100",
"action": "sell",
"quantity": 123,
"limit_price": 123.98
}
Stop Order
The traders can write the webhook payload for setting up Stop orders using these four payload fields:
- Symbol
- Action
- Quantity
- Stop_price
Symbol
The ticker symbol of the indices. Capital.com uses single indices ticker symbols to trade CFDs in the Indices Market. For example, US100, DE40, and US30. For the complete list of the indices symbols, please check this page.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "US100",
"action": "buy",
"quantity": 123,
"stop_price": 123.98
}
II. Sell
{
"symbol": "US100",
"action": "sell",
"quantity": 123,
"stop_price": 123.98
}
Stop-Limit Order
The traders can write the webhook payload for setting up Stop-Limit orders using these five payload fields:
- Symbol
- Action
- Quantity
- Limit_price
- Stop_price
Symbol
The ticker symbol of the indices. Capital.com uses single indices ticker symbols to trade CFDs in the Indices Market. For example, US100, DE40, and US30. For the complete list of the indices symbols, please check this page.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "US100",
"action": "buy",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
II. Sell
{
"symbol": "US100",
"action": "sell",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
Forex
The following outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of Forex orders to be executed into Capital.com.
Market Order
The traders can write the webhook payload for setting up Market orders using these three payload fields:
- Symbol
- Action
- Quantity
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of currency's ticker symbols binds using a slash (base currency/quote currency). E,g EUR/USD, USD/GPY, and EUR/GPY.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
EXAMPLE
I. Buy
{
"symbol": "EUR/USD",
"action": "buy"
"quantity": 123
}
II. Sell
{
"symbol": "EUR/USD",
"action": "sell",
"quantity": 123
}
Limit Order
The traders can write the webhook payload for setting up Limit orders using these four payload fields:
- Symbol
- Action
- Quantity
- Limit_price
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of currency's ticker symbols binds using a slash (base currency/quote currency). E,g EUR/USD, USD/GPY, and EUR/GPY.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
EXAMPLE
I. Buy
{
"symbol": "EUR/USD",
"action": "buy",
"quantity": 123,
"limit_price": 123.98
}
II. Sell
{
"symbol": "EUR/USD",
"action": "sell",
"quantity": 123,
"limit_price": 123.98
}
Stop Order
The traders can write the webhook payload for setting up Stop orders using these four payload fields:
- Symbol
- Action
- Quantity
- Stop_price
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of currency's ticker symbols binds using a slash (base currency/quote currency). E,g EUR/USD, USD/GPY, and EUR/GPY.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "EUR/USD",
"action": "buy",
"quantity": 123,
"stop_price": 123.98
}
II. Sell
{
"symbol": "EUR/USD",
"action": "sell",
"quantity": 123,
"stop_price": 123.98
}
Stop-Limit Order
The traders can write the webhook payload for setting up Stop-Limit orders using these five payload fields:
- Symbol
- Action
- Quantity
- Limit_price
- Stop_price
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of currency's ticker symbols binds using a slash (base currency/quote currency). E,g EUR/USD, USD/GPY, and EUR/GPY.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
Buy: Triggers an action to buy the asset.
Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "EUR/USD",
"action": "buy",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
II. Sell
{
"symbol": "EUR/USD",
"action": "sell",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
Cryptocurrency
The following outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of cryptocurrency orders to be executed into Capital.com.
Market Order
The traders can write the webhook payload for setting up Market orders using these three payload fields:
- Symbol
- Action
- Quantity
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of cryptocurrency ticker symbols with fiat currency bound with a slash. E,g BTC/USD, ETH/USD, and SHIB/USD.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
EXAMPLE
I. Buy
{
"symbol": "BTC/USD",
"action": "buy"
"quantity": 123
}
II. Sell
{
"symbol": "BTC/USD",
"action": "sell",
"quantity": 123
}
Limit Order
The traders can write the webhook payload for setting up Limit orders using these four payload fields:
- Symbol
- Action
- Quantity
- Limit_price
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of cryptocurrency ticker symbols with fiat currency bound with a slash. E,g BTC/USD, ETH/USD, and SHIB/USD.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
EXAMPLE
I. Buy
{
"symbol": "BTC/USD",
"action": "buy",
"quantity": 123,
"limit_price": 123.98
}
II. Sell
{
"symbol": "BTC/USD",
"action": "sell",
"quantity": 123,
"limit_price": 123.98
}
Stop Order
The traders can write the webhook payload for setting up Stop orders using these four payload fields:
- Symbol
- Action
- Quantity
- Stop_price
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of cryptocurrency ticker symbols with fiat currency bound with a slash. E,g BTC/USD, ETH/USD, and SHIB/USD.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "BTC/USD",
"action": "buy",
"quantity": 123,
"stop_price": 123.98
}
II. Sell
{
"symbol": "BTC/USD",
"action": "sell",
"quantity": 123,
"stop_price": 123.98
}
Stop-Limit Order
The traders can write the webhook payload for setting up Stop-Limit orders using these five payload fields:
- Symbol
- Action
- Quantity
- Limit_price
- Stop_price
Symbol
The ticker symbol of the asset. Capital.com represents this asset by combining the pairs of cryptocurrency ticker symbols with fiat currency bound with a slash. E,g BTC/USD, ETH/USD, and SHIB/USD.
Action
The signal action indicates the type of trade to be triggered. The action can be any of the following:
- Buy: Triggers an action to buy the asset.
- Sell: Triggers an action to sell the asset.
Quantity
The number of assets to be traded. If omitted, the quantity will be dynamically calculated or defaulted to 1.
Limit_price
An optional field specifying the execution price for a “buy” or “sell” trade. If you specify the limit price the trade will be executed at the specified limit price. Or If you choose not to specify a limit price, the trade will be executed at the current market price.
Stop_price
An optional field specifying the price level at which a stop-loss or stop-limit order should be triggered. It helps limit potential losses by automatically closing the position when the specified price is reached.
EXAMPLE
I. Buy
{
"symbol": "BTC/USD",
"action": "buy",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}
II. Sell
{
"symbol": "BTC/USD",
"action": "sell",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98
}