Apols for replying to myself here, but just in case anyone goes
trawling the archives....
I've had a look at the prices being rejected and what I think is
happening is the market rules IB are publishing are just incomplete -
they don't go high enough, but their own logic does.
1918 says anything > 500 in increments of 0.2. There's nothing after
500. But the changes keep coming anyway.
So anything > 1000 is in increments of 0.5.
Anything > 2000 in increments of 1.
Anything > 10000 in increments of 5.
Not found any other examples yet, but I imagine this is what's
happening.
Would be good if IB could get their act together on this. In the
meantime, I guess building some override logic would be sensible.
Best,
G.
On Wed, 29 Jul 2020 20:26:50 +0100
"Graham Bygrave via groups.io" <graham@...> wrote:
Unfortunately not - I'm rounding according to the market rules right
before the price goes out (of my app).
When I go to trade the contract in TWS, the prices that appear in the
order entry screen are rounded to 0.5 (annoyingly, I originally had a
0.5 price, but I changed it to be compliant with the prescribed rules
i.e. from 1077.5 -> 1077.6).
Or to put it another way, IB's published market rules just plain
wrong.
On Wed, 29 Jul 2020 15:08:59 -0400
"Nick" <news1000@...> wrote:
You might want to check the api log files to verify what is being
sent to tws. If the price is the result of a calculation it might be
sent as something like 1077.599998.
On 7/29/2020 2:55 PM, Graham Bygrave wrote:
Hi,
Had this problem before but it seems to never go away. I'm
getting order rejects due to incorrect limit price precision,
even though I'm following the rules as I understand them.
Example:
Contract ID : 79715545)
Market Rule ID : 1918
Limit Price : 1077.6
Response to my buy? "463: You must enter a valid price".
1918 clearly states that beyond a price of 500, price increments
are 0.2 (Low Edge: 500, Increment: 0.2).
So 1077.6 is not a multiple of 0.2?
Is there any way to accurately determine what the price resolution
is via IB's API, or do I just have to go and manually look these
up whenever a new stock comes into my universe?
Really frustrating.
Best,
G.