Bonds | E-Trade

This document outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of Bond orders to be executed into E-trade.

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 asset. E-Trade represents this asset using a specific bond identifier format that combines the ticker symbol, currency, and maturity year.

The format is like [Ticker Symbol][currency][Maturity Year]

For instance, TradeStation uses symbols like "TMUBMUSD10Y," "TMUBMUSD30Y," and "TMUBMUSD5Y" to represent various U.S. Treasury Bonds.

Let's break down TMUBMUSD10Y for demonstration purposes.

  • TMUBM: This is the ticker symbol used to identify and track the performance of the bond in financial markets.
  • USD: United States Dollar, the currency in which the bond is denominated.
  • 10Y: Represents the maturity period of 10 years, which matches the "10 Year" part.

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.
  • Buy-to Cover: Triggers an action to buy back and close a previously sold asset (ending a short trade).
  • Sell-Short: Triggers an action to sell borrowed assets with the expectation of buying them back at a lower price.
  • 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.

Note: You can also use the JSON field- quantity_type.

This is an optional field indicating the type of quantity being specified. We have three options - fixed, cash, and percent_of_equity.

Fixed (Default): The trade quantity will be set as a fixed quantity, such as “100” shares or “10” shares.

{
 "quantity": 100,
 "quantity_type": "fixed"
}

Cash: The trade quantity is represented by the available cash amount. For instance, if the quantity_type is set to "cash", and the trader specifies a value of 100, it means they are trading 100 units of the currency value, such as 100 USD or 100 GBP, depending on the currency locale of the trader.

{
 "quantity": 100,
 "quantity_type": "cash"
}

Percent_of_equity: The quantity is calculated as a percentage of the total equity (account balance, not including unrealized p/l). For instance, if the total equity is $50,000 and the quantity_type is set to “percent_of_equity” with the value of “2” then the trade quantity would be $50,000*0.02 = $1000.

{
  "quantity": 2,
  "quantity_type": "percent_of_equity"
}

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

II. Sell

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell",
  "quantity": 123,
  "class": "bond"
}

III. Buy-To-Cover

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_cover",
  "quantity": 123,
  "class": "bond"
}

IV. Sell-Short

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_short",
  "quantity": 123,
  "class": "bond"
}

V. Buy-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_open",
  "quantity": 123,
  "class": "bond"
}

VI. Buy-To-Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_close",
  "quantity": 123,
  "class": "bond"
}

VII. Sell-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_open",
  "quantity": 123,
  "class": "bond"
}

VIII. Sell-To-Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_close",
  "quantity": 123,
  "class": "bond"
}

IX. Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "close",
  "class": "bond"
}

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 asset. E-Trade represents this asset using a specific bond identifier format that combines the ticker symbol, currency, and maturity year.

The format is like [Ticker Symbol][currency][Maturity Year]

For instance, TradeStation uses symbols like "TMUBMUSD10Y," "TMUBMUSD30Y," and "TMUBMUSD5Y" to represent various U.S. Treasury Bonds.

Let's break down TMUBMUSD10Y for demonstration purposes.

  • TMUBM: This is the ticker symbol used to identify and track the performance of the bond in financial markets.
  • USD: United States Dollar, the currency in which the bond is denominated.
  • 10Y: Represents the maturity period of 10 years, which matches the "10 Year" part.

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.
  • Buy-to-Cover: Triggers an action to buy back and close a previously sold asset (ending a short trade).
  • Sell-Short: Triggers an action to sell borrowed assets with the expectation of buying them back at a lower price.
  • 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.

Note: You can also use the JSON field- quantity_type.

This is an optional field indicating the type of quantity being specified. We have three options - fixed, cash, and percent_of_equity.

Fixed (Default): The trade quantity will be set as a fixed quantity, such as “100” shares or “10” shares.

{
 "quantity": 100,
 "quantity_type": "fixed"
}

Cash: The trade quantity is represented by the available cash amount. For instance, if the quantity_type is set to "cash", and the trader specifies a value of 100, it means they are trading 100 units of the currency value, such as 100 USD or 100 GBP, depending on the currency locale of the trader.

{
 "quantity": 100,
 "quantity_type": "cash"
}

Percent_of_equity: The quantity is calculated as a percentage of the total equity (account balance, not including unrealized p/l). For instance, if the total equity is $50,000 and the quantity_type is set to “percent_of_equity” with the value of “2” then the trade quantity would be $50,000*0.02 = $1000.

{
  "quantity": 2,
  "quantity_type": "percent_of_equity"
}

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

EXAMPLE

I. Buy

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

II. Sell

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

III. Buy-To-Cover

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_cover",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

IV. Sell-Short

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_short",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

V. Buy-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

VI. Buy-To-close

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

VII. Sell-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

VIII. Sell-To-Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "class": "bond"
}

IX. Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "close",
  "limit_price": 123.98,
  "class": "bond"
}

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 asset. E-Trade represents this asset using a specific bond identifier format that combines the ticker symbol, currency, and maturity year.

The format is like [Ticker Symbol][currency][Maturity Year]

For instance, TradeStation uses symbols like "TMUBMUSD10Y," "TMUBMUSD30Y," and "TMUBMUSD5Y" to represent various U.S. Treasury Bonds.

Let's break down TMUBMUSD10Y for demonstration purposes.

  • TMUBM: This is the ticker symbol used to identify and track the performance of the bond in financial markets.
  • USD: United States Dollar, the currency in which the bond is denominated.
  • 10Y: Represents the maturity period of 10 years, which matches the "10 Year" part.

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.
  • Buy to Cover: Triggers an action to buy back and close a previously sold asset (ending a short trade).
  • Sell Short: Triggers an action to sell borrowed assets with the expectation of buying them back at a lower price.
  • 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.

Note: You can also use the JSON field- quantity_type.

This is an optional field indicating the type of quantity being specified. We have three options - fixed, cash, and percent_of_equity.

Fixed (Default): The trade quantity will be set as a fixed quantity, such as “100” shares or “10” shares.

{
 "quantity": 100,
 "quantity_type": "fixed"
}

Cash: The trade quantity is represented by the available cash amount. For instance, if the quantity_type is set to "cash", and the trader specifies a value of 100, it means they are trading 100 units of the currency value, such as 100 USD or 100 GBP, depending on the currency locale of the trader.

{
 "quantity": 100,
 "quantity_type": "cash"
}

Percent_of_equity: The quantity is calculated as a percentage of the total equity (account balance, not including unrealized p/l). For instance, if the total equity is $50,000 and the quantity_type is set to “percent_of_equity” with the value of “2” then the trade quantity would be $50,000*0.02 = $1000.

{
  "quantity": 2,
  "quantity_type": "percent_of_equity"
}

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": "TMUBMUSD10Y",
  "action": "buy",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

II. Sell

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

III. Buy-To-Cover

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_cover",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

IV. Sell-Short

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_short",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

V. Buy-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_open",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

VI. Buy-To-close

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_close",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

VII. Sell-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_open",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

VIII. Sell-To-Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_close",
  "quantity": 123,
  "stop_price": 123.98,
  "class": "bond"
}

IX. Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "close",
  "stop_price": 123.98,
  "class": "bond"
}

Stop-Limit Order

The traders can write the webhook payload for setting up Stop orders using these five payload fields:

  • Symbol
  • Action
  • Quantity
  • Limit_price
  • Stop_price
  • Class

Symbol

The ticker symbol of the asset. E-Trade represents this asset using a specific bond identifier format that combines the ticker symbol, currency, and maturity year.

The format is like [Ticker Symbol][currency][Maturity Year]

For instance, TradeStation uses symbols like "TMUBMUSD10Y," "TMUBMUSD30Y," and "TMUBMUSD5Y" to represent various U.S. Treasury Bonds.

Let's break down TMUBMUSD10Y for demonstration purposes.

  • TMUBM: This is the ticker symbol used to identify and track the performance of the bond in financial markets.
  • USD: United States Dollar, the currency in which the bond is denominated.
  • 10Y: Represents the maturity period of 10 years, which matches the "10 Year" part.

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.
  • Buy to Cover: Triggers an action to buy back and close a previously sold asset (ending a short trade).
  • Sell Short: Triggers an action to sell borrowed assets with the expectation of buying them back at a lower price.
  • 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.

Note: You can also use the JSON field- quantity_type.

This is an optional field indicating the type of quantity being specified. We have three options - fixed, cash, and percent_of_equity.

Fixed (Default): The trade quantity will be set as a fixed quantity, such as “100” shares or “10” shares.

{
 "quantity": 100,
 "quantity_type": "fixed"
}

Cash: The trade quantity is represented by the available cash amount. For instance, if the quantity_type is set to "cash", and the trader specifies a value of 100, it means they are trading 100 units of the currency value, such as 100 USD or 100 GBP, depending on the currency locale of the trader.

{
 "quantity": 100,
 "quantity_type": "cash"
}

Percent_of_equity: The quantity is calculated as a percentage of the total equity (account balance, not including unrealized p/l). For instance, if the total equity is $50,000 and the quantity_type is set to “percent_of_equity” with the value of “2” then the trade quantity would be $50,000*0.02 = $1000.

{
  "quantity": 2,
  "quantity_type": "percent_of_equity"
}

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": "TMUBMUSD10Y",
  "action": "buy",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

II. Sell

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

III. Buy-To-Cover

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_cover",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

IV. Sell-Short

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_short",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

V. Buy-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

VI. Buy-To-close

{
  "symbol": "TMUBMUSD10Y",
  "action": "buy_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

VII. Sell-To-Open

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_open",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

VIII. Sell-To-Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "sell_to_close",
  "quantity": 123,
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}

IX. Close

{
  "symbol": "TMUBMUSD10Y",
  "action": "close",
  "limit_price": 123.98,
  "stop_price": 123.98,
  "class": "bond"
}
Jan 19, 2024

Contact Us

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