Tradoflow

Understanding Alpaca Trading Parameters in Testing

In this section, we will explore the different parameters you can configure when creating a trading template for Alpaca in Testing. These templates define the specifics of the order that will be executed, including event type, symbol, quantity, order type, and more.

Below is a breakdown of each parameter:

  • Event - Specifies the action to be performed, such as placing an order or closing a position. This defines the overall intent of the trading action.
  • Symbol - Defines the trading symbol or pair, such as XBTUSD. This specifies the market in which the trade will be executed.
  • Quantity - Specifies the amount of the asset you wish to trade. For example, a quantity of 0.01 in the case of XBTUSD represents 0.01 Bitcoin.
  • Notional - A checkbox that indicates whether the order is based on a notional amount rather than a quantity of the asset. When checked, the specified amount represents the notional value.
  • Time in Force - Determines how long the order will remain active before it is executed or expires. The options include:
    • Day - The order is valid for the current trading day and will expire at the end of the day if not executed.
    • Good 'Til Canceled (GTC) - The order remains active until it is either executed or manually canceled by the trader.
    • Fill Or Kill (FOK) - The order must be completely filled immediately, or it will be canceled entirely.
    • Immediate Or Cancel (IOC) - The order will attempt to fill immediately as much as possible. Any portion of the order that cannot be filled immediately will be canceled.
    • Market/Limit on Open - The order is placed to execute at the market open, either as a market or limit order.
    • Market/Limit on Close - The order is placed to execute at the market close, either as a market or limit order.
  • Type - Defines the order type. Includes Market or Limit orders. A Market order executes immediately at the current market price, while a Limit order will only execute at a specified price.
  • Limit Price - If you choose a Limit order type, this parameter specifies the price at which you want the order to be executed. If the market does not reach this price, the order will not be filled.
  • Side - Indicates whether you are placing a Buy or Sell order. A Buy order will purchase the specified quantity of the asset, while a Sell order will sell it.