Futures | TastyTrade

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

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. TastyTrade expresses this asset class using a contract code format that combines the Slash ( / ), ticker symbol, month code, and year. Here month and year represent the expiration of the contract.

The format is

[ / ][Ticker Symbol][Month Code][Year]

For instance, let's consider the E-Mini S&P 500 futures contract. Its ticker symbol is "/ES," indicating the E-Mini S&P 500. 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 an E-Mini S&P 500 contract expiring in June, you will be looking for a contract that starts with "/ESM." Similarly, for a contract expiring in December, the code will start with "/ESZ."

To denote the year of the contract, you simply append the year to the code. For instance, "/ESM4" would represent the E-Mini S&P 500 contract expiring on June 2024.

Sample:

product = "ES"  represents “E-Mini S&P 500”.
month_code = "M"  represents “June”.
year = "4"  represents 2024 (using one digit to represent the year).

Keep in mind that some trading platforms may use different formats to represent the year, such as:

One digit: '4' for the year 2024
Two digits: '24' for the year 2024
Three digits: '024' for the year 2024
Four digits: '2024'

NOTE: TastyTrade uses the one-digit year format for traders to represent the year by using one digit.

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.
  • Buy-to-Open: Triggers an action to initiate a new position by buying assets.
  • Buy-to-Close: Triggers an action to exit and close an existing position.
  • Sell-to-Open: Triggers an action to initiate a new position by selling assets.
  • Sell-to-Close: Triggers an action to exit and close an existing short position.
  • Close: Triggers an action to close an existing open position and exit the trade.

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": "/ESM4",
  "action": "buy",
  "quantity": 123,
  "class": "option"
}

II. Sell

{
  "symbol": "/ESM4",
  "action": "sell",
  "quantity": 123,
  "class": "option"
}

III. Buy-To-Open

{
  "symbol": "/ESM4",
  "action": "buy_to_open",
  "quantity": 123,
  "class": "option"
}

IV. Buy-To-Close

{
  "symbol": "/ESM4",
  "action": "buy_to_close",
  "quantity": 123,
  "class": "option"
}

V. Sell-To-Open

{
  "symbol": "/ESM4",
  "action": "sell_to_open",
  "quantity": 123,
  "class": "option"
}

VI. Sell-To-Close

{
  "symbol": "/ESM4",
  "action": "sell_to_close",
  "quantity": 123,
  "class": "option"
}

VII. Close

{
  "symbol": "/ESM4",
  "action": "close",
  "class": "option"
}

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. TastyTrade expresses this asset class using a contract code format that combines the Slash ( / ), ticker symbol, month code, and year. Here month and year represent the expiration of the contract.

The format is

[ / ][Ticker Symbol][Month Code][Year]

For instance, let's consider the E-Mini S&P 500 futures contract. Its ticker symbol is "/ES," indicating the E-Mini S&P 500. 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 an E-Mini S&P 500 contract expiring in June, you will be looking for a contract that starts with "/ESM." Similarly, for a contract expiring in December, the code will start with "/ESZ."

To denote the year of the contract, you simply append the year to the code. For instance, "/ESM4" would represent the E-Mini S&P 500 contract expiring on June 2024.

Sample:

product = "ES"  represents “E-Mini S&P 500”.
month_code = "M"  represents “June”.
year = "4"  represents 2024 (using one digit to represent the year).

Keep in mind that some trading platforms may use different formats to represent the year, such as:

One digit: '4' for the year 2024
Two digits: '24' for the year 2024
Three digits: '024' for the year 2024
Four digits: '2024'

NOTE: TastyTrade uses the one-digit year format for traders to represent the year by using one digit.

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.
  • Buy-to-Open: Triggers an action to initiate a new position by buying assets.
  • Buy-to-Close: Triggers an action to exit and close an existing position.
  • Sell-to-Open: Triggers an action to initiate a new position by selling assets.
  • Sell-to-Close: Triggers an action to exit and close an existing short position.
  • Close: Triggers an action to close an existing open position and exit the trade.

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": "/ESM4",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "option"
}

II. Sell

{
  "symbol": "/ESM4",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "option"
}
I

III. Buy-To-Open

{
  "symbol": "/ESM4",
  "action": "buy_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "option"
}

IV. Buy-To-close

{
  "symbol": "/ESM4",
  "action": "buy_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "option"
}

V. Sell-To-Open

{
  "symbol": "/ESM4",
  "action": "sell_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "option"
}

VI. Sell-To-Close

{
  "symbol": "/ESM4",
  "action": "sell_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "option"
}

VII. Close

{
  "symbol": "/ESM4",
  "action": "close",
  "limit_price": 123.98,
  "class": "option"
}

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. TastyTrade expresses this asset class using a contract code format that combines the Slash ( / ), ticker symbol, month code, and year. Here month and year represent the expiration of the contract.

The format is

[ / ][Ticker Symbol][Month Code][Year]

For instance, let's consider the E-Mini S&P 500 futures contract. Its ticker symbol is "/ES," indicating the E-Mini S&P 500. 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 an E-Mini S&P 500 contract expiring in June, you will be looking for a contract that starts with "/ESM." Similarly, for a contract expiring in December, the code will start with "/ESZ."

To denote the year of the contract, you simply append the year to the code. For instance, "/ESM4" would represent the E-Mini S&P 500 contract expiring on June 2024.

Sample:

product = "ES"  represents “E-Mini S&P 500”.
month_code = "M"  represents “June”.
year = "4"  represents 2024 (using one digit to represent the year).

Keep in mind that some trading platforms may use different formats to represent the year, such as:

One digit: '4' for the year 2024
Two digits: '24' for the year 2024
Three digits: '024' for the year 2024
Four digits: '2024'

NOTE: TastyTrade uses the one-digit year format for traders to represent the year by using one digit.

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.
  • Buy-to-Open: Triggers an action to initiate a new position by buying assets.
  • Buy-to-Close: Triggers an action to exit and close an existing position.
  • Sell-to-Open: Triggers an action to initiate a new position by selling assets.
  • Sell-to-Close: Triggers an action to exit and close an existing short position.
  • Close: Triggers an action to close an existing open position and exit the trade.

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": "/ESM4",
  "action": "buy",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "option"
}

II. Sell

{
  "symbol": "/ESM4",
  "action": "sell",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "option"
}

III. Buy-To-Open

{
  "symbol": "/ESM4",
  "action": "buy_to_open",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "option"
}

IV. Buy-To-close

{
  "symbol": "/ESM4",
  "action": "buy_to_close",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "option"
}

V. Sell-To-Open

{
  "symbol": "/ESM4",
  "action": "sell_to_open",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "option"
}

VI. Sell-To-Close

{
  "symbol": "/ESM4",
  "action": "sell_to_close",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "option"
}

VII. Close

{
  "symbol": "/ESM4",
  "action": "close",
  "stop_price": 123.98,
  "class": "option"
}

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. TastyTrade expresses this asset class using a contract code format that combines the Slash ( / ), ticker symbol, month code, and year. Here month and year represent the expiration of the contract.

The format is

[ / ][Ticker Symbol][Month Code][Year]

For instance, let's consider the E-Mini S&P 500 futures contract. Its ticker symbol is "/ES," indicating the E-Mini S&P 500. 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 an E-Mini S&P 500 contract expiring in June, you will be looking for a contract that starts with "/ESM." Similarly, for a contract expiring in December, the code will start with "/ESZ."

To denote the year of the contract, you simply append the year to the code. For instance, "/ESM4" would represent the E-Mini S&P 500 contract expiring on June 2024.

Sample:

product = "ES"  represents “E-Mini S&P 500”.
month_code = "M"  represents “June”.
year = "4"  represents 2024 (using one digit to represent the year).

Keep in mind that some trading platforms may use different formats to represent the year, such as:

One digit: '4' for the year 2024
Two digits: '24' for the year 2024
Three digits: '024' for the year 2024
Four digits: '2024'

NOTE: TastyTrade uses the one-digit year format for traders to represent the year by using one digit.

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.
  • Buy-to-Open: Triggers an action to initiate a new position by buying assets.
  • Buy-to-Close: Triggers an action to exit and close an existing position.
  • Sell-to-Open: Triggers an action to initiate a new position by selling assets.
  • Sell-to-Close: Triggers an action to exit and close an existing short position.
  • Close: Triggers an action to close an existing open position and exit the trade.

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

EXAMPLE

I. Buy

{
  "symbol": "/ESM4",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "option"
}

II. Sell

{
  "symbol": "/ESM4",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "option"
}

III. Buy-To-Open

{
  "symbol": "/ESM4",
  "action": "buy_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "option"
}

IV. Buy-To-close

{
  "symbol": "/ESM4",
  "action": "buy_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "option"
}

V. Sell-To-Open

{
  "symbol": "/ESM4",
  "action": "sell_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "option"
}

VI. Sell-To-Close

{
  "symbol": "/ESM4",
  "action": "sell_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "option"
}

VII. Close

{
  "symbol": "/ESM4",
  "action": "close",
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "option"
}

Contact Us

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