Fix the USD/KRW minimum price variation - #9656
Merged
Martin-Molinero merged 1 commit intoAug 5, 2026
Merged
Conversation
The oanda USD/KRW entry declared a 0.00001 minimum price variation, the generic five decimal forex default, for a pair that IB quotes around 1430: three orders of magnitude finer than its real tick, and out of line with the other big number oanda pairs, which scale it (USD/JPY, USD/HUF, USD/INR and USD/THB all use 0.001). Interactive Brokers reports 0.01 as the minimum tick of its USD/KRW IDEALPRO contract, so a limit order priced at 1395.123 is rounded down to 1395.12 before it is sent. LEAN rounds order prices with the symbol properties value, so the brokerage was the only thing keeping sub tick prices from being used, and a backtest would rest limit orders at prices the venue cannot represent. The interactivebrokers entry, added by QuantConnect#9585 with the correct tick, is removed: forex resolves through the brokerage model default market, which is oanda for Interactive Brokers, so it is only reachable by passing the market explicitly and it duplicates the oanda one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Martin-Molinero
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Sets the USD/KRW minimum price variation to
0.01and removes the duplicatedinteractivebrokersentry, leaving a single row for the pair:Related Issue
Follow up of #9585 and #9652, which added the two USD/KRW entries.
Motivation and Context
The oanda entry declared
0.00001, the generic five decimal forex default, for a pairquoted around 1430. That is three orders of magnitude finer than its real tick, and out of
line with the other big number oanda pairs, which do scale it: USD/JPY, USD/HUF, USD/INR
and USD/THB all use
0.001.The
0.01comes from Interactive Brokers itself. Placing a limit order for USD/KRW at1395.123on a live IB connection, the brokerage looked the tick up withreqContractDetailsand rounded the price before sending it:Note the middle line: LEAN rounds order prices with the symbol properties value, so the
0.00001let the sub tick price through untouched and only the brokerage, which asks IBfor the real tick, kept it from being used. That is why the wrong value was invisible in
live trading. In a backtest there is no such correction and limit orders rest at prices the
venue cannot represent.
The same tick shows up in the data. Over 48 hours of USD/KRW minute history from IB, the
smallest bid to bid steps are
0.009 x8,0.010 x142,0.011 x5,0.019 x21,0.02 x104:nothing below
0.009, everything clustered on the0.01grid. The occasional third decimal(
1430.791) is a double to decimal conversion artifact, always a thousandth below a0.01grid point. For comparison, USD/JPY over the same window steps
0.001 x167,0.002 x221,0.003 x141, a dense ladder starting exactly at its declared0.001.The
interactivebrokersentry is removed because it is unreachable in practice: forexresolves through the brokerage model default market, which is
Market.Oandafor InteractiveBrokers, so only an explicit
AddForex("USDKRW", ..., Market.InteractiveBrokers)would pickit. Subscribing without the market parameter and with the entry removed keeps resolving to
the same IB contract,
CASH USD KRW IDEALPRO, with no subscription errors, and history andstreaming are unchanged.
Requires Documentation Change
No.
How Has This Been Tested?
SymbolPropertiesDatabaseTestspasses (42 tests).Live against IB: subscribed to USD/KRW without a market parameter and with the
interactivebrokersentry removed, confirming it resolves to the oanda symbol and the sameIDEALPRO contract, returns 2870 minute bars over two days with data in every hour, and
streams quotes, all identical to the behaviour before the removal. The order above provided
the tick value.
Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>🤖 Generated with Claude Code