Schwab API – anyone doing 4-leg option orders?

Discussion in 'Automated Trading' started by eric729, Aug 10, 2025 at 3:18 AM.

  1. eric729

    eric729

    Hi Everyone,

    Has anyone here actually placed a 4-leg options combo (like an iron condor or butterfly) through the Schwab API?

    Docs say it supports multi-leg orders, but I can’t find a straight answer on whether it’ll take exactly four legs in one order. Any limits, quirks, or special tricks for “CUSTOM” or “COMBO” orders?

    Thanks a lot for your advice in advance!
     
  2. traider

    traider

    yes 4 legs is supported
     
    eric729 likes this.
  3. qwerty11

    qwerty11

    4 leg is still standard (so no difference from 2/3 leg)
     
    eric729 likes this.
  4. MarkBrown

    MarkBrown

    why not 100 legs wtf pick a direction and trade
     
  5. eric729

    eric729


    Hi traider and qwerty11,

    Thank you very much for your answers.

    I’m trying to automate a four-leg option combo order using Schwab’s API, but I’m missing a few key details to get the payload right. If you have done this before or has a working example, I’d really appreciate your insight!

    1. Option Symbols Format

    What is the correct format for option symbols in Schwab’s API?
    (e.g., `SPY_081624C00500000` — is this the expected format, or is there a different convention?)

    2. Leg Instructions
    What are the valid values for `instruction` in each leg?
    (e.g., `BUY_TO_OPEN`, `SELL_TO_OPEN`, `BUY_TO_CLOSE`, etc.)

    3. Strategy Type for Custom Combos
    Is `orderStrategyType: CUSTOM` required for four-leg orders, or is there a specific strategy type for combos like iron condors or butterflies?

    4. Order Type and Pricing
    Should the order use `NET_CREDIT` or `NET_DEBIT`, and does the `price` field represent the total net for all legs?
    (Confirming that individual leg pricing is not required.)

    5. Session and Duration Values
    What are the accepted values for `session` and `duration`?
    (e.g., `NORMAL`, `DAY`, `GTC`, etc.)

    6. Any Known Limitations
    Are there any restrictions on placing four-leg orders via the API (e.g., margin requirements, account type, approval level)?

    7. Example Payload or Successful Order
    Can anyone share a working JSON payload or Python snippet for a four-leg combo order that was successfully placed?

    Anyone who knows the answer is welcome to jump in.

    Thank you all very much for your advice in advance.
     
  6. DaveN

    DaveN

    Hi Eric,

    I'll echo "Yes" with the others. I send 4-legged Butterfly and Condor orders daily through the API.

    A good starting point might be to talk about whether you are using a package in Python to interface with the API, or working with the API directly.

    I'm using SchwabDev from Tyler Bowers: https://github.com/tylerebowers/Schwabdev
    There's also schwab-py from Alex Golec: https://github.com/alexgolec/schwab-py

    Both of these will have lots of examples and support. Alex has a free Discord too where you can seek help in real time.

    Here's a code snippet from Python to build a Weekly SPX option symbol expiring today:

    # **************** Make Option Symbol *****************************
    dateToday = time.strftime('%Y%m%d', time.localtime())
    dte = 3 # use this for a longer-dated Expiry
    optDate = dateToday[2:8] # int(dateToday[2:8]) + dte
    side = 'C'
    strike = 6450

    symb = 'SPXW ' + str(optDate) + side + '0' + str(strike) + '000'

    # symb = 'SPXW 250808C06450000'
    # print(symb)
     
    eric729 likes this.
  7. eric729

    eric729

    Thanks a lot for your advice and info
     
  8. I agree. KISS. Keep it simple stupid. Just pick a direction and monitor it like a hawk.

    I'm too stupid, lazy and impatient to understand weird complex strategies.