Skip to main content

Bot Import Format Reference

Last updated September 23, 2026

The complete Bot Import file format: define multiple trading bots and their configurations in a single text file, with templates for shared settings. For the import workflow itself, see Clone, Share, and Import Bots.

File structure

The import file is structured in sections. Use templates to define common parameters that can be reused across multiple bots:

[templates]
template_name=my_template
param1=value1
param2=value2
...

[[trade_params]]
bot_name=My Bot
type=ShortCall
symbol=AAPL
...

[[trade_params]]
.......
  Lines that begin with # or // are ignored.
  Percentages should be entered as decimals (e.g., 0.5 for 50%).

Bot types

The import utility supports the following bot types:

Single option strategies

  • ShortCall: short call option
  • LongCall: long call option
  • ShortPut: short put option
  • LongPut: long put option

Spread strategies

  • PutCreditSpread: put credit spread
  • CallCreditSpread: call credit spread
  • CallDebitSpread: call debit spread
  • PutDebitSpread: put debit spread

Multi-leg strategies

  • ShortStrangle: short strangle
  • LongStrangle: long strangle
  • ShortIronCondor: short iron condor
  • LongIronCondor: long iron condor

Required parameters

Basic parameters

  • name: bot name (can use variables like {symbol} in the name)
  • type: bot type (see above)
  • symbol: trading symbol
  • template: template name to use (optional)
  • accountNum: account number to use for this bot (optional, can be set in template)
  • stratCode: Strategy ID to assign the bot to (optional, view available Strategy IDs on the Bot Import page)
  • entry_time: entry time in HHMM or HHMMSS format (e.g., "0933" or "093310")
  • entry_time_end: end of entry window in HHMM or HHMMSS format (e.g., "0935" or "093510")
  • entry_weekday: trading days (1-5, where 1=Monday, 5=Friday)

Position sizing

  • quantity_type: one of:
    • bpu or bpu-percent: percentage of account balance, entered as a decimal (e.g., 0.5 for 50%)
    • leverage: leverage-based sizing
    • fixed: fixed quantity
  • quantity_target: target value based on quantity_type

Strike target type

  • entry_type: one of:
    • delta: delta-based entry
    • price: price-based entry
    • minimum_premium: minimum premium-based entry
    • percent: percentage-ITM or OTM based entry, entered as a decimal (e.g., 0.5 for 50%); positive is OTM, negative is ITM
    • points: points-ITM or OTM based entry; positive is OTM, negative is ITM
  • entry_target: target value based on entry_type

Spread parameters (for spread strategies)

  • spread_type: one of:
    • delta: delta-targeted spread leg
    • percent: percentage-ITM or OTM based spread leg, entered as a decimal (e.g., 0.5 for 50%); positive is OTM, negative is ITM
    • price: price-targeted spread leg
    • points: points width from main strike of spread
    • underlying_percent_width: Vertical Width-Underlying %; the width between the main strike and wing is a percentage of the underlying's current price
  • spread_target: target value based on spread_type. For underlying_percent_width, enter a decimal such as 0.01 for a 1% width; a positive value puts the wing further out of the money and a negative value puts it further in the money.
  • spread_max_width: maximum width for price-based spreads

underlying_percent_width applies to the wing of a two-leg spread or both wings of an iron condor; the importer rejects it for other bot types. It needs a live underlying price, so it is unavailable for NDX and RUT on Tradier accounts.

DTE parameters

  • dte_min: minimum days to expiration
  • dte_max: maximum days to expiration

Entry window configuration

  • entry_window_length: entry window duration in minutes (can include fractional minutes for seconds precision, e.g., 0.5 for 30 seconds)

Optional parameters

Stop loss (algo stops only)

  • stoploss_type: one of:
    • priceOffset: price offset stop
    • percent: percentage-based stop, entered as a decimal (e.g., 0.5 for 50%)
    • delta: delta-based stop
    • none: no stop loss
  • stoploss_target: target value based on stoploss_type
  • stop-grouping: one of:
    • single: Each Leg
    • vertical: Verticals
    • shorts-one: Each Short
    • shorts-shorts: All Shorts on Short
    • shorts-all: Entire Trade on Short
    • longs-all: Entire Trade on Long

Auto conflict resolution

  • opt#-autoConflict: set to "1" to enable auto conflict resolution for the leg number # (replace # with the leg number)
  • autoConflict-to: set to the maximum points to adjust towards the money to resolve a conflict
  • autoConflict-from: set to the maximum points to adjust away from the money to resolve a conflict

Profit target

  • profittarget_type: one of:
    • percent: percentage-based target, entered as a decimal (e.g., 0.5 for 50%)
    • price: price-based target
  • profit_target: target value based on profittarget_type

Price filters

  • minimum_price (alias minPrice): minimum price for the entire trade that the bot will attempt to enter
  • maximum_price (alias maxPrice): maximum price for the entire trade that the bot will attempt to enter

Timed exit

  • forceclose_time: force close time (HHMM format)
  • forceclose_day: days before expiration to force close

Event day filter

  • entry_filter_special_days: a string of 1s and 0s, one digit per day category, where 1 means trade that day and 0 means do not. The string is twenty digits long: digit 0 for ordinary days, then one digit for each of the nineteen event categories.
  • Digit 0 sets the Filter Behavior. Set it to 1 for Do Not Trade Selected Days: the bot trades ordinary days and skips the event days you left at 0. Set it to 0 for Only Trade Selected Days: the bot trades only the event days you set to 1 and skips everything else, ordinary days included. Note that a set digit always means "trade that day", so the days the bot form shows as selected are the digits left at 0 under Do Not Trade Selected Days, and the digits set to 1 under Only Trade Selected Days.
  • Digit order is:
    • 0=All Other Days (the Filter Behavior, see above)
    • 1=FOMC Press Conferences, Day Before
    • 2=FOMC Press Conferences, Day Of
    • 3=FOMC Press Conferences, Day After
    • 4=Monthly CPI Report, Day Before
    • 5=Monthly CPI Report, Day Of
    • 6=Monthly CPI Report, Day After
    • 7=Last Trading Day of the Non-Quarter-End Month
    • 8=Last Trading Day of the Quarter
    • 9=Monthly OPEX, Day Before
    • 10=Monthly OPEX, Day Of
    • 11=Monthly OPEX, Day After
    • 12=Monthly Jobs Report, Day Before
    • 13=Monthly Jobs Report, Day Of
    • 14=Monthly Jobs Report, Day After
    • 15=GDP Release, Day Before
    • 16=GDP Release, Day Of
    • 17=GDP Release, Day After
    • 18=First Trading Day of Month
    • 19=Early Close Day

Worked examples:

  • 11001111111111111111: trade every day except the day of and the day after FOMC. Digit 0 is 1, and digits 2 and 3 are the only 0s.
  • 00000100000000000000: trade only on the day of the monthly CPI report, and skip every other day. Digit 0 is 0, and digit 5 is the only 1.
  • 01111111111111111111: trade only on event days, whichever event it is, and skip ordinary days.
  • 11111111111111111111: trade every day. This is the same as leaving the event day filter off.
  Hyphens are ignored, so you can group the digits for readability: 1-1001111111111111111 imports the same as 11001111111111111111.
  If a day carries more than one event, selecting any one of them counts for that day.
  Under Only Trade Selected Days, at least one event digit has to be set. A string of all zeros describes a bot that skips ordinary days and has no event day to trade on, so it could never open a trade, and the import reports it as an error. The bot form refuses the same setting when you save it there.

Twelve-digit strings from older files

The original twelve-digit string is still accepted and still means what it always did. Its digits are 0 through 11 in the list above, covering ordinary days and the first eleven event categories.

A twelve-digit string has no way to name the monthly jobs report, GDP release, first trading day of the month or early close categories, which are digits 12 through 19, so it leaves all eight unselected under either Filter Behavior. Use the twenty-digit form to set them at import time, or set them in the bot form afterward.

  When you widen an older twelve-digit string by hand, do not simply add eight zeros. Under Do Not Trade Selected Days a 0 means "skip that day", so eight trailing zeros would start skipping the eight newer days, which the twelve-digit string never did. Repeat digit 0 instead: 110011111111 widens to 11001111111111111111, and 001100000000 widens to 00110000000000000000.

Sequential trades management

  • seq_max_trades: maximum number of trades
  • seq_max_stops: maximum number of stops per day
  • seq_reentry_delay: re-entry delay in minutes (supports fractional minutes for seconds precision, e.g., 0.5 for 30 seconds)

User endpoint filter

  • user_endpoint_filter: custom endpoint filter URL for trade entry conditions

Example

Here is an example of a complete bot import file:

[templates]
template_name=default_template
entry_window_length=30
accountNum=########  <-- replace with the account number you want to use for this bot

[[trade_params]]
name={symbol} Short Put
type=ShortPut
symbol=AAPL
template=default_template
stratCode=STRAT123
entry_time=0930
entry_weekday=12345
quantity_type=bpu
quantity_target=0.1
entry_type=delta
entry_target=-0.3
dte_min=30
dte_max=45
stoploss_type=percent
stoploss_target=0.5
profittarget_type=percent
profit_target=0.3
minimum_price=10
maximum_price=20
entry_filter_special_days=11001111111111111111

[[trade_params]]
name={symbol} Put Credit Spread
type=PutCreditSpread
symbol=AAPL
template=default_template
entry_time=0930
entry_weekday=12345
quantity_type=fixed
quantity_target=1
entry_type=delta
entry_target=-0.3
spread_type=underlying_percent_width
spread_target=0.01
dte_min=30
dte_max=45