Market rules
get_market_ruleRetrieve IBKR price increments (tick ladder) for given market rule IDs to round limit prices correctly. Get IDs from contract details and map to valid exchanges.
Instructions
Return the price increments (tick ladder) of IBKR market rules.
A contract's valid price steps can depend on the price level and exchange: each rule
lists rows of (low_edge, increment), meaning prices from low_edge up to the next row's
low_edge move in steps of increment. Get the ids from get_contract_details; its
market_rule_ids line up with valid_exchanges. Use it to round limit prices correctly.
IBKR answers each rule within a second or not at all: ids it did not answer (probably
unknown) are listed in `missing_ids`; if none was answered the call fails with
not_found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| market_rule_ids | Yes | Market rule ids from get_contract_details (market_rule_ids), e.g. [26, 239]. At most 20. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | ||
| missing_ids | No | Ids IBKR did not answer within 1 second (probably unknown ids). |