Kalshi Perps Sizing and Risk
This page covers how a Kalshi Perps strategy (platform: kalshi_perps) sizes its entries and limits its risk: the sizing block (margin and leverage), the risk block (the Bot's own take-profit and stop-loss), and funding_awareness. They apply to archetypes and custom strategies alike; see All Kalshi Perps parameters for every key in one table. Leverage magnifies losses as well as gains.
Sizing
sizing is required. It sets how much each entry commits: margin_usd × leverage = notional per entry, turned into whole contracts at the current price. The same amount applies to every entry and every add, on every market in markets. There is no per-market sizing, and no sizing by contract count or by share of your balance.
From margin to contracts, and what TP/SL mean on margin
margin_usd$25leverage2Entries the Bot skips
margin x leverage below one contractleverage: 7 against a market cap of about 6xChecked before every entry and add. Log: leverage exceeds market capTake-profit and stop-loss on those 7 contracts at 2x
take_profit_pct: 6mark ≥ $6.8353+6% of price · +$2.71 · about +12% of $22.57 marginstop_loss_pct: 3mark ≤ $6.2549−3% of price · −$1.35 · about −6% of $22.57 marginKXBTCPERP, where one contract is 0.0001 BTC. The margin shown is the Bot's own estimate, 7 × $6.4484 ÷ 2. For the Max dollars per order limit, this taker entry counts as 7 × $6.4806 = $45.36, because its limit price includes the slippage bound. Gains and losses are before fees, slippage and funding, and Kalshi margins and liquidates across your whole account.Leaving the block out, or leaving it empty, fails with two errors: sizing.margin_usd: must be at least 1 and sizing.leverage: must be in (0, 50]. Unknown keys such as max_notional or contracts are ignored.
sizing.margin_usd
Dollars of margin per entry, at least 1, with no maximum.
- Contracts = the notional ÷ the price, rounded down. The price is the ask for a long and the bid for a short (the mark if those are missing). Contracts are whole numbers unless Kalshi allows fractional trading on that market, in which case they are rounded down to 0.01.
- Too small to trade. If the result is below one contract, the entry is skipped with
margin x leverage below one contract. $5 × 1 against a $6.45 contract is 0 contracts. - Adds repeat it. Every
add, and everyopen_longwhile already long, commits the same amount again. - No balance check first. The Bot doesn't compare the size with your available balance before it sends the order. If Kalshi rejects it, the rejection counts toward your API error limit.
sizing.leverage
The multiplier that turns margin into notional. Above 0 and at most 50, with fractions such as 1.5 allowed. dip_reverter allows at most 2.
- Sizing only. Kalshi perp orders carry no leverage setting. Your account is cross-margined, and Kalshi sets margin and liquidation for the account as a whole. The Bot also uses leverage to estimate its own
margin_used. - The market's cap applies when the Bot runs. Before every entry and add, the Bot compares
leveragewith the market's current leverage cap. If it is higher, the entry is skipped withleverage exceeds market cap. At launch the caps were about 6x for BTC, 4.5x for ETH and 2x to 3.7x for most other markets. A leverage above the cap saves and deploys, then never enters. - Deploy warning. Studio warns when leverage is above 1 and there is no
stop_loss_pct. It is a warning only.
Take-profit and stop-loss
risk holds the Bot's own percent exits. Leave it out and the Bot has no take-profit or stop-loss (dip_reverter requires a stop-loss). Archetype exits and the ATR stop are separate and still run. Only these two keys exist: there is no exit at a fixed price, no dollar take-profit, no trailing stop and no maximum-loss key.
Both are measured as a price move from the average entry, not as a return on margin. On every tick, before the strategy runs, the Bot works out the move: (mark − average entry) ÷ average entry × 100, with the sign flipped for a short. Take-profit is checked first, then stop-loss. Either one closes the Bot's whole position with an immediate reduce-only order, and the strategy is skipped for that market on that tick. The log shows the close as take-profit <move>% or stop-loss <move>%, with the move measured on that tick.
risk.take_profit_pct
Close the whole position once the price has moved this percent in your favor from the average entry. Must be above 0 when set; unset means no take-profit.
- The average entry moves when the Bot adds, so the target moves with it.
- At leverage L, the gain on margin is roughly L × this percent before fees, slippage and funding. At 2x, a 6% take-profit is about 12% of margin.
- An archetype or a state-based custom entry can open a new position on the next tick if its signal still holds.
risk.stop_loss_pct
Close the whole position once the price has moved this percent against you from the average entry. Must be above 0 and below 100 when set; unset means no stop-loss. It is required for dip_reverter.
- The loss on margin is roughly leverage × this percent. At 2x, a 3% stop is about 6% of margin, before fees, slippage and funding.
- It is checked after take-profit, on every tick, against the mark price.
# Rejected: dip_reverter needs a stop-loss and at most 2x leverage
# error: risk.stop_loss_pct: dip_reverter requires a stop loss
# error: sizing.leverage: dip_reverter is capped at 2x leverage
version: 1
platform: kalshi_perps
strategy: dip_reverter
markets:
- ticker: KXXRPPERP
sizing:
margin_usd: 10
leverage: 3
risk:
take_profit_pct: 4Limits of Bot-enforced exits
- They only work while the Bot runs. Stopping, crashing or restarting leaves the position unprotected until the Bot is back.
- They aren't a guaranteed maximum loss. The slippage bound, price gaps between ticks, fees and funding all add to the loss.
- Liquidation can come first. Kalshi liquidates across your whole account. At high leverage, or with losses elsewhere in the account, a liquidation can happen before the stop price is reached. The Bot does not close positions to avoid liquidation.
- The mark can be up to a minute old. See
loop.interval.
Funding awareness
funding_awareness: true makes the Bot fetch Kalshi's funding-rate estimate for each market on every tick. It defaults to false. Write true or false, without quotes: "true" in quotes fails to parse.
- Entry veto. Any entry or add on the side that would currently pay funding is skipped with
funding-aware veto. A long is skipped while the estimate is above 0 (longs pay), and a short while it is below 0. An estimate of exactly 0, or one that isn't available, never blocks an entry. - Entries only. Open positions are never closed or resized because of funding.
- Custom rules. Rules can read
funding_rate_estimateonly when this istrue, so reading the estimate always turns the veto on too. - Failures don't halt trading. If a funding request fails, the estimate is unavailable for that tick. The failure doesn't count toward your API error limit.
Kalshi settles funding a few times a day (three times a day when this page was written). A crossover entry that is vetoed on its crossing tick doesn't retry.
# Rejected: rules can read funding_rate_estimate only with funding_awareness on
# error: funding_rate_estimate requires funding_awareness: true
version: 1
platform: kalshi_perps
strategy: custom
markets:
- ticker: KXETHPERP
sizing:
margin_usd: 10
leverage: 1
rules:
- name: long while longs are not paying
when:
all:
- {field: position, op: "==", value: 0}
- {field: funding_rate_estimate, op: "<", value: 0}
action: open_long