This document outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of Futures orders to be executed into Optimus Futures.
Let’s get started 🚀
Market Order
The traders can write the webhook payload for setting up market orders using these four payload fields:
- Symbol
- Action
- Quantity
- Class
Symbol
The ticker symbol of the futures contract. Optimus expresses this asset class using a contract code format that combines the Future option series with the Exchange ticker symbol binds with ( : ) Trade ticker symbol, month code, and year. Here month and year represent the expiration of the contract.
The format is like:
[Future option series][Exchnage Ticker Symbol][ : ][Trade Ticker Symbol][ . ][Month Code][Year]
For instance, You want to trade in Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange, so Its ticker symbol is XCME:MES Now, for the month component, a specific code is used to represent each month:
- January is represented by "F"
- February is represented by "G"
- March is represented by "H"
- April is represented by "J"
- May is represented by "K"
- June is represented by "M"
- July is represented by "N"
- August is represented by "Q"
- September is represented by "U"
- October is represented by "V"
- November is represented by "X"
- December is represented by "Z"
For example, if you wish to trade in the Chicago Mercantile Exchange in X series of Micro E-mini S&P 500 Index futures contract expiring in December, you will be looking for a contract that starts with “XCME:MES.Z”
To denote the year of the contract, you simply append the year to the code. For instance
“XCME:MES.Z22” would represent the Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange expiring in December 2022.
Sample:
Series = X represents the “Future option series”
Exchange Ticker Symbol = “CME” represents “Chicago Mercantile Exchange”
Trade Ticker Symbol = "MES" represents “E-Mini S&P 500”.
Month_code = "Z" represents “December”.
Year = "22" represents 2022 (using two digits to represent the year).
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.
Class
The Class is a field or property that identifies and categorizes financial instruments such as futures, options, warrants, bonds, CFDs, crypto, forex, stocks, and funds. Required to be specified for assets with time-limited contracts like futures.
EXAMPLE
I. Buy
{
"symbol": "XCME:MES.Z22",
"action": "buy",
"quantity": 123,
"class": "future"
}
II. Sell
{
"symbol": "XCME:MES.Z22",
"action": "sell",
"quantity": 123,
"class": "future"
}
Limit Order
The traders can write the webhook payload for setting up Limit orders using these five payload fields:
- Symbol
- Action
- Quantity
- Limit_price
- Class
Symbol
The ticker symbol of the futures contract. Optimus expresses this asset class using a contract code format that combines the Future option series with the Exchange ticker symbol binds with ( : ) Trade ticker symbol, month code, and year. Here month and year represent the expiration of the contract.
The format is like:
[Future option series][Exchnage Ticker Symbol][ : ][Trade Ticker Symbol][ . ][Month Code][Year]
For instance, You want to trade in Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange, so Its ticker symbol is XCME:MES Now, for the month component, a specific code is used to represent each month:
- January is represented by "F"
- February is represented by "G"
- March is represented by "H"
- April is represented by "J"
- May is represented by "K"
- June is represented by "M"
- July is represented by "N"
- August is represented by "Q"
- September is represented by "U"
- October is represented by "V"
- November is represented by "X"
- December is represented by "Z"
For example, if you wish to trade in the Chicago Mercantile Exchange in X series of Micro E-mini S&P 500 Index futures contract expiring in December, you will be looking for a contract that starts with “XCME:MES.Z”
To denote the year of the contract, you simply append the year to the code. For instance
“XCME:MES.Z22” would represent the Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange expiring in December 2022.
Sample:
Series = X represents the “Future option series”
Exchange Ticker Symbol = “CME” represents “Chicago Mercantile Exchange”
Trade Ticker Symbol = "MES" represents “E-Mini S&P 500”.
Month_code = "Z" represents “December”.
Year = "22" represents 2022 (using two digits to represent the year).
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.
Class
The Class is a field or property that identifies and categorizes financial instruments such as futures, options, warrants, bonds, CFDs, crypto, forex, stocks, and funds. Required to be specified for assets with time-limited contracts like futures.
EXAMPLE
I. Buy
{
"symbol": "XCME:MES.Z22",
"action": "buy",
"quantity": 123,
"limit_price": 123.98,
"class": "future"
}
II. Sell
{
"symbol": "XCME:MES.Z22",
"action": "sell",
"quantity": 123,
"limit_price": 123.98,
"class": "future"
}
Stop Order
The traders can write the webhook payload for setting up Stop orders using these five payload fields:
- Symbol
- Action
- Quantity
- Stop_price
- Class
Symbol
The ticker symbol of the futures contract. Optimus expresses this asset class using a contract code format that combines the Future option series with the Exchange ticker symbol binds with ( : ) Trade ticker symbol, month code, and year. Here month and year represent the expiration of the contract.
The format is like:
[Future option series][Exchnage Ticker Symbol][ : ][Trade Ticker Symbol][ . ][Month Code][Year]
For instance, You want to trade in Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange, so Its ticker symbol is XCME:MES Now, for the month component, a specific code is used to represent each month:
- January is represented by "F"
- February is represented by "G"
- March is represented by "H"
- April is represented by "J"
- May is represented by "K"
- June is represented by "M"
- July is represented by "N"
- August is represented by "Q"
- September is represented by "U"
- October is represented by "V"
- November is represented by "X"
- December is represented by "Z"
For example, if you wish to trade in the Chicago Mercantile Exchange in X series of Micro E-mini S&P 500 Index futures contract expiring in December, you will be looking for a contract that starts with “XCME:MES.Z”
To denote the year of the contract, you simply append the year to the code. For instance
“XCME:MES.Z22” would represent the Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange expiring in December 2022.
Sample:
Series = X represents the “Future option series”
Exchange Ticker Symbol = “CME” represents “Chicago Mercantile Exchange”
Trade Ticker Symbol = "MES" represents “E-Mini S&P 500”.
Month code = "Z" represents “December”.
Year = "22" represents 2022 (using two digits to represent the year).
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.
Class
The Class is a field or property that identifies and categorizes financial instruments such as futures, options, warrants, bonds, CFDs, crypto, forex, stocks, and funds. Required to be specified for assets with time-limited contracts like futures.
EXAMPLE
I. Buy
{
"symbol": "XCME:MES.Z22",
"action": "buy",
"quantity": 123,
"stop_price": 123.98,
"class": "future"
}
II. Sell
{
"symbol": "XCME:MES.Z22",
"action": "sell",
"quantity": 123,
"stop_price": 123.98,
"class": "future"
}
Stop-Limit Order
The traders can write the webhook payload for setting up Stop-Limit orders using these six payload fields:
- Symbol
- Action
- Quantity
- Limit_price
- Stop_price
- Class
Symbol
The ticker symbol of the futures contract. Optimus expresses this asset class using a contract code format that combines the Future option series with the Exchange ticker symbol binds with ( : ) Trade ticker symbol, month code, and year. Here month and year represent the expiration of the contract.
The format is like:
[Future option series][Exchnage Ticker Symbol][ : ][Trade Ticker Symbol][ . ][Month Code][Year]
For instance, You want to trade in Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange, so Its ticker symbol is XCME:MES Now, for the month component, a specific code is used to represent each month:
- January is represented by "F"
- February is represented by "G"
- March is represented by "H"
- April is represented by "J"
- May is represented by "K"
- June is represented by "M"
- July is represented by "N"
- August is represented by "Q"
- September is represented by "U"
- October is represented by "V"
- November is represented by "X"
- December is represented by "Z"
For example, if you wish to trade in the Chicago Mercantile Exchange in X series of Micro E-mini S&P 500 Index futures contract expiring in December, you will be looking for a contract that starts with “XCME:MES.Z”
To denote the year of the contract, you simply append the year to the code. For instance
“XCME:MES.Z22” would represent the Micro E-mini S&P 500 Index futures contract X series of Chicago Mercantile Exchange expiring in December 2022.
Sample:
Series = X represents the “Future option series”
Exchange Ticker Symbol = “CME” represents “Chicago Mercantile Exchange”
Trade Ticker Symbol = "MES" represents “E-Mini S&P 500”.
Month code = "Z" represents “December”.
Year = "22" represents 2022 (using two digits to represent the year).
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.
Class
The Class is a field or property that identifies and categorizes financial instruments such as futures, options, warrants, bonds, CFDs, crypto, forex, stocks, and funds. Required to be specified for assets with time-limited contracts like futures.
EXAMPLE
I. Buy
{
"symbol": "XCME:MES.Z22",
"action": "buy",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98,
"class": "future"
}
II. Sell
{
"symbol": "XCME:MES.Z22",
"action": "sell",
"quantity": 123,
"limit_price": 123.98,
"stop_price": 123.98,
"class": "future"
}