Access Token·InactiveLog in to your Public account to generate your access code.
Order Placement

Preflight multi leg

Calculates the estimated financial impact of a complex multi-leg trade before execution

Performs preflight calculations for a multi-leg order (a transaction involving multiple securities or options strategies such as spreads, straddles, or combinations) to provide comprehensive cost estimates and account impact details. Returns estimated commission, regulatory fees, total order value, buying power requirements, margin impact, net credit/debit amounts, and strategy-specific information to help users make informed trading decisions before order placement. This endpoint handles complex options strategies and calculates the combined effect of all legs in the trade. Note that these are estimates only, and actual execution values may vary depending on market conditions and fill prices. This endpoint may be called before submitting an actual multi-leg order to understand the potential financial implications of the strategy.

POST/userapigateway/trading/{accountId}/preflight/multi-leg

Parameters

Path Parameters

string

Request body

Required*

Parameters

NameTypeRequiredDescription
accountIdstringYes-

Body

application/json

Request Body

application/json
orderTypeenum<string>required
Available options: MARKET,LIMIT,STOP,STOP_LIMIT
expirationrequired
quantitystring
limitPricestringrequired
legsobject[]required

Responses

Response

200
application/json
baseSymbolstringrequired
strategyNamestring
legsobject[]required
estimatedCommissionstring
regulatoryFees

# GatewayRegulatoryFees Represents various regulatory fees associated with trading orders. <br/> ## Fields - **secFee** - The SEC charges a regulatory fee for sell orders that execute. The fee is based on the dollar amount of the order. - **tafFee** - The Trading Activity Fee is a FINRA fee. The fee is based on the order quantity. - **orfFee** - The Options Regulatory Fee (ORF). This is the combined exchange fee rate for all exchanges. Changes monthly. - **exchangeFee** - The exchange charges a fee for executing orders for index options. - **occFee** - The Options Clearing Corporation Fee (OCC) - **catFee** - The Consolidated Audit Trail Fee (CAT)

estimatedIndexOptionFeestring
orderValuestringrequired
estimatedQuantitystring
estimatedCoststring
buyingPowerRequirementstring
estimatedProceedsstring
marginRequirement
marginImpact
priceIncrement

Price increment information for option orders.

Response

400application/json

Invalid request parameters, unsupported strategy, or account validation failure

No response body defined

curl --request POST \
  --url https://api.public.com/userapigateway/trading/{accountId}/preflight/multi-leg \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "orderType": "MARKET",
  "expiration": {
    "timeInForce": "DAY",
    "expirationTime": "2023-11-07T05:31:56Z"
  },
  "quantity": "string",
  "limitPrice": "string",
  "legs": [
    {
      "instrument": {
        "symbol": "string",
        "type": "EQUITY"
      },
      "side": "BUY",
      "openCloseIndicator": "OPEN",
      "ratioQuantity": 123
    }
  ]
}' 
{
  "baseSymbol": "string",
  "strategyName": "string",
  "legs": [
    {
      "instrument": {
        "symbol": "string",
        "type": "EQUITY"
      },
      "side": "BUY",
      "openCloseIndicator": "OPEN",
      "ratioQuantity": 123,
      "optionDetails": {
        "baseSymbol": "string",
        "type": "CALL",
        "strikePrice": "string",
        "optionExpireDate": "2023-11-07"
      }
    }
  ],
  "estimatedCommission": "string",
  "regulatoryFees": {
    "secFee": "string",
    "tafFee": "string",
    "orfFee": "string",
    "exchangeFee": "string",
    "occFee": "string",
    "catFee": "string"
  },
  "estimatedIndexOptionFee": "string",
  "orderValue": "string",
  "estimatedQuantity": "string",
  "estimatedCost": "string",
  "buyingPowerRequirement": "string",
  "estimatedProceeds": "string",
  "marginRequirement": {
    "longMaintenanceRequirement": "string",
    "longInitialRequirement": "string"
  },
  "marginImpact": {
    "marginUsageImpact": "string",
    "initialMarginRequirement": "string"
  },
  "priceIncrement": {
    "incrementBelow3": "string",
    "incrementAbove3": "string",
    "currentIncrement": "string"
  }
}
The Public Individual API is for your own personal, non-commercial use. Unauthorized access is prohibited. You are responsible for all trades made via the API. Learn more