Kalshi Strategies the Validator Rejects
Studio checks a Kalshi event-contract strategy (platform: kalshi) every time you save it, so a strategy with an invalid setting is refused before it can trade. Each example on this page shows a common mistake, the message you'll see, and how to fix it.
Other rejected examples sit next to the setting they involve: an unknown top-level key under Unknown and misspelled keys, selection with a pinned ticker under market.selection, and active_window combined with trading_schedule under Trading schedule.
max_loss on a built-in strategy
risk.max_loss only works on custom Kalshi strategies. Remove it from a built-in strategy, or use strategy: custom if you need a loss halt.
# Rejected: max_loss only works on custom Kalshi strategies, not built-in strategies
# error: risk.max_loss: requires durable deployment-run attribution, currently supported only for Kalshi custom strategies
version: 1
platform: kalshi
strategy: panic_fade
market:
ticker: KXSENATEGA-26-D
risk:
max_position: 2
price_floor: 0.10
price_ceiling: 0.90
max_loss: 5.00
loop:
interval: 30
params:
panic_threshold: 0.08
fade_size: 1A buy that can't fit max_notional
Every buy rule must fit inside risk.max_notional at least once at the price floor: size × price_floor must not exceed max_notional. Here that is 5 × $0.05 = $0.25. Raise max_notional to 0.25 or more, or lower size or price_floor.
# Rejected: a buy of 5 contracts at the 0.05 floor costs 0.25, more than the 0.24 budget
# error: entry cannot satisfy risk.max_notional within the configured price bounds
version: 1
platform: kalshi
strategy: custom
market:
ticker: KXNBAGAME-26NOV04LALBOS-LAL
risk:
max_position: 5
price_floor: 0.05
price_ceiling: 0.55
max_notional: 0.24
loop:
interval: 15
rules:
- name: take_profit
when:
all:
- {field: yes_position_size, op: ">", value: 0}
- {field: yes_best_bid, op: ">=", value: 0.65}
action: sell_yes
- name: enter
when:
all:
- {field: position_size, op: "==", value: 0}
- {field: yes_best_ask, op: "<=", value: 0.45}
action: buy_yes
size: 5Loop interval under 10 seconds
loop.interval must be a whole number of at least 10 seconds. Set it to 10 or more.
# Rejected: the loop interval is below the 10-second minimum
# error: loop.interval: must be >= 10 seconds
version: 1
platform: kalshi
strategy: custom
market:
series_ticker: KXBTC15M
risk:
max_position: 2
price_ceiling: 0.90
loop:
interval: 5
rules:
- name: take_profit
when:
all:
- {field: yes_position_size, op: ">", value: 0}
- {field: yes_best_bid, op: ">=", value: 0.75}
action: sell_yes
- name: enter
when:
all:
- {field: position_size, op: "==", value: 0}
- {field: yes_best_ask, op: "<=", value: 0.35}
action: buy_yesTimezone abbreviation in a schedule
trading_schedule.timezone must be UTC or an IANA name such as America/New_York. Abbreviations such as EST are rejected, so write timezone: America/New_York instead.
# Rejected: schedule timezones must be IANA names such as America/New_York, not abbreviations
# error: timezone must be an IANA name such as America/Chicago, or UTC
version: 1
platform: kalshi
strategy: custom
market:
series_ticker: KXINX
risk:
max_position: 2
price_ceiling: 0.90
loop:
interval: 30
trading_schedule:
timezone: EST
trading_hours:
- days: [mon, tue, wed, thu, fri]
start: "09:30"
end: "16:00"
rules:
- name: take_profit
when:
all:
- {field: yes_position_size, op: ">", value: 0}
- {field: yes_best_bid, op: ">=", value: 0.60}
action: sell_yes
- name: enter
when:
all:
- {field: position_size, op: "==", value: 0}
- {field: yes_best_ask, op: "<=", value: 0.30}
action: buy_yes