buy_event_contract
Place a real DAY limit order to buy a YES or NO prediction market contract at a set price. Look up the ask automatically or specify your own limit price and quantity.
Instructions
Buy an event contract (a YES or NO side of a prediction market) with a DAY limit order.
⚠️ This executes a real trade. Consider running preflight_buy_event_contract first. For a recurring market such as a 15-minute window, find the window with get_current_event, its contracts with get_event_details, and the result with wait_for_settlement.
Args: contract_symbol: The contract to buy, from get_event_details, e.g. "KALSHI.KXBTC15M-26OCT201200-00.Y" (".Y" = YES, ".N" = NO). Not the "-EVENTCONTRACT" symbol that get_event_contract_bars takes. quantity: Number of contracts (default "1"); at most 2 decimal places. limit_price: Most to pay per contract, in dollars with whole cents between 0.01 and 0.99 (e.g. "0.55"). If omitted, the contract's current ask is looked up via event_symbol and rounded up to a whole cent. event_symbol: The contract's eventSymbol, e.g. "KALSHI.KXBTC15M-26OCT201200". Required when limit_price is omitted. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quantity | No | 1 | |
| account_id | No | ||
| limit_price | No | ||
| event_symbol | No | ||
| contract_symbol | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |