Funds | Interactive Brokers

This document outlines the appropriate format that the traders must follow while writing the webhook payload for setting up the following types of Funds orders to be executed into Interactive Brokers.

Let’s get started 🚀

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 fund. Interactive Brokers uses a single ticker symbol to express this asset. For e.g. QQQ, SPY, IWM, and VTI.

For the complete list of funds 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 four:

  • Buy: Triggers an action to buy the asset.
  • Sell: Triggers an action to sell the asset.
  • Close/Exit: Triggers an action to close an existing open position and exit the trade.
  • Cancel: Triggers an action to cancel any open orders.

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"
}

EXAMPLE

I. Buy

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

II. Sell

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

III. Close

{
  "symbol": "QQQ",
  "action": "close"
}

IV. Cancel

{
  "symbol": "QQQ",
  "action": "close"
}
Jan 19, 2024

Contact Us

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