CFDs | Oanda

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 Oanda trading platform.
With Oanda, you can trade CFDs on multiple asset classes:
Let’s get started 🚀

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

The traders can write the webhook payload for setting up market orders using these three payload fields:
  • Symbol
  • Action
  • Quantity

Symbol

The tickersymbol of the asset. Oanda represents this asset by a single ticker symbol of the commodities. For e.g GOLD, OILBRNT and NATGAS.

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": "GOLD",
  "action": "buy",
  "quantity": 123
}

II. Sell

{
  "symbol": "GOLD",
  "action": "sell",
  "quantity": 123
}

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. Oanda represents this asset by a single ticker symbol of the commodities. For e.g GOLD, OILBRNT and NATGAS.

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": "GOLD",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98
}

II. Sell

{
  "symbol": "GOLD",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98
}

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. Oanda represents this asset by a single ticker symbol of the commodities. For e.g GOLD, OILBRNT and NATGAS.

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": "GOLD",
  "action": "buy",
  "quantity": 123,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "GOLD",
  "action": "sell",
  "quantity": 123,
  "Stop_price": 123.98
}

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. Oanda representsthis asset by a single ticker symbol of the commodities. For e.g GOLD, OILBRNT and NATGAS.

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": "GOLD",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "GOLD",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

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

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. Oanda represents this asset by pairing a cryptocurrency ticker symbol with the US dollar. e.g. BTCUSD, ETHUSD, and BCHUSD etc.

Action

The signal action indicates the type of trade to be executed. It can be one of the following:
  • Buy: Triggers an action to buy the asset.
  • Sell: Triggers an action to sell the asset.

Quantity

The number of crypto trades to be traded. If this field is omitted, the quantity will be automatically calculated or set to a default value of 1.

Example

I. Buy

{
  "symbol": "BTCUSD",
  "action": "buy",
  "quantity": 123
}

II. Sell

{
  "symbol": "BTCUSD",
  "action": "sell",
  "quantity": 123
}

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. Oanda represents this asset by pairing a cryptocurrency ticker symbol with the US dollar. e.g. BTCUSD, ETHUSD, and BCHUSD etc.

Action

The signal action indicates the type of trade to be executed. It can be one of the following:
  • Buy: Triggers an action to buy the asset.
  • Sell: Triggers an action to sell the asset.

Quantity

The number of crypto trades to be traded. If this field is omitted, the quantity will be automatically calculated or set to a default value of 1.

Limit_price

An optional field specifying the execution price for a "BUY" or "SELL" trade. If specified, the trade will be executed at the specified limit price. If not, the trade will be executed at the current market price.

EXAMPLE

I. Buy

{
  "symbol": "BTCUSD",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98
}

II. Sell

{
  "symbol": "BTCUSD",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98
}

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. Oanda represents this asset by pairing a cryptocurrency ticker symbol with the US dollar. e.g. BTCUSD, ETHUSD, and BCHUSD etc.

Action

The signal action indicates the type of trade to be executed. It can be one of the following:
  • Buy: Triggers an action to buy the asset.
  • Sell: Triggers an action to sell the asset.

Quantity

The number of crypto trades to be traded. If this field is omitted, the quantity will be automatically calculated or set to a default value of 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": "BTCUSD",
  "action": "buy",
  "quantity": 123,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "BTCUSD",
  "action": "sell",
  "quantity": 123,
  "Stop_price": 123.98
}

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. Oanda represents this asset by pairing a cryptocurrency ticker symbol with the US dollar. e.g. BTCUSD, ETHUSD, and BCHUSD etc.

Action

The signal action indicates the type of trade to be executed. It can be one of the following:
  • Buy: Triggers an action to buy the asset.
  • Sell: Triggers an action to sell the asset.

Quantity

The number of crypto trades to be traded. If this field is omitted, the quantity will be automatically calculated or set to a default value of 1.

Limit_price

An optional field specifying the execution price for a "BUY" or "SELL" trade. If specified, the trade will be executed at the specified limit price. If not, 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": "BTCUSD",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "BTCUSD",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

This document 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 Oanda.

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. Oanda represents this asset class by single ticker symbols of the index for trading CFDs in the Indices Market. For example, AU200, UK100, DE20.

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.

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. Oanda represents this asset class by single ticker symbols of the index for trading CFDs in the Indices Market. For example, AU200, UK100, DE20.

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": "AU200",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98
}

II. Sell

{
  "symbol": "AU200",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98
}

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. Oanda represents this asset class by single ticker symbols of the index for trading CFDs in the Indices Market. For example, AU200, UK100, DE20.

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": "AU200",
  "action": "buy",
  "quantity": 123,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "AU200",
  "action": "sell",
  "quantity": 123,
  "Stop_price": 123.98
}

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. Oanda represents this asset class by single ticker symbols of the index for trading CFDs in the Indices Market. For example, AU200, UK100, DE20.

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": "AU200",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "AU200",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

The following outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of Shares orders to be executed into Oanda.

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\\\\\\\\. Oanda represents this asset class by pairing the share ticker symbol with CFD and binds with an underscore \\\\\\\\( \\\\\\\\_ \\\\\\\\)\\\\\\\\. For e\\\\\\\\.g AAPL\\\\\\\\_CFD, AMZN\\\\\\\\_CFD and EBAY\\\\\\\\_CFD\\\\\\\\.

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_CFD",
  "action": "buy",
  "quantity": 123
}

II. Sell

{
  "symbol": "AAPL_CFD",
  "action": "sell",
  "quantity": 123
}

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\\\\\\\\. Oanda represents this asset class by pairing the share ticker symbol with CFD and bind with an underscore \\\\\\\\( \\\\\\\\_ \\\\\\\\)\\\\\\\\. For e\\\\\\\\.g AAPL\\\\\\\\_CFD, AMZN\\\\\\\\_CFD and EBAY\\\\\\\\_CFD\\\\\\\\.

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 specified, the trade will be executed at the specified limit price. If not, the trade will be executed at the current market price.

EXAMPLE

I. Buy

{
  "symbol": "AAPL_CFD",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98
}

II. Sell

{
  "symbol": "AAPL_CFD",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98
}

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\\\\\\\\. Oanda represents this asset class by pairing the share ticker symbol with CFD and bind with an underscore \\\\\\\\( \\\\\\\\_ \\\\\\\\)\\\\\\\\. For e\\\\\\\\.g AAPL\\\\\\\\_CFD, AMZN\\\\\\\\_CFD and EBAY\\\\\\\\_CFD\\\\\\\\.

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_CFD",
  "action": "buy",
  "quantity": 123,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "AAPL_CFD",
  "action": "sell",
  "quantity": 123,
  "Stop_price": 123.98
}

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\\\\\\\\. Oanda represents this asset class by pairing the share ticker symbol with CFD and bind with an underscore \\\\\\\\( \\\\\\\\_ \\\\\\\\)\\\\\\\\. For e\\\\\\\\.g AAPL\\\\\\\\_CFD, AMZN\\\\\\\\_CFD and EBAY\\\\\\\\_CFD\\\\\\\\.

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 specified, the trade will be executed at the specified limit price. If not, 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_CFD",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

II. Sell

{
  "symbol": "AAPL_CFD",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "Stop_price": 123.98
}

Contact Us

Not finding what you're looking for? Contact Us Directly