开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
Date
Re: Spotty historical bars for TICK-AMEX and other indexes
That should work, according to the documentation. At least if your TWS is using a US time zone. Why don't you try "20210904 00:00:00 US/Eastern", that we use: * We found that 00:00:00 on the day
By Jürgen Reinold · #48127 ·
Re: Spotty historical bars for TICK-AMEX and other indexes
Actually the exact string for endDateTime is?"20210903 23:59:59" with no timezone specified.
By nshale2@... · #48126 ·
Re: Spotty historical bars for TICK-AMEX and other indexes
Thank you.? I am using: endDateTime =?"2021-09-03" durationString = "1 D" barSizeSetting = "1 min" whatToShow = "TRADES" useRTH = 1 formatDate = 1 keepUpToDate = False chartOptions = [] I believe
By nshale2@... · #48125 ·
Re: Inconsistent behaviour of WHATIF orders
This is exactly the problem. On portfolio margin IB sets the margin requirement according to their risk model and not according to some fixed rules. Meaning every new positions margin is depending on
By Despair · #48124 ·
Re: whyHeld in orderStatus
I'm also receiving 404 Order held while securities are located. in my error handler.
By misantroop · #48123 ·
whyHeld in orderStatus
In orderStatus, whyHeld is always empty when in TWS I can clearly see there are no locates. I can work around this by looking for PreSubmitted orders and assume they're most likely orders without
By misantroop · #48122 ·
Re: Why is this order invalid and rejected?
Thanks for the reply.? I am thinking about how to decouple the combo, get the margin of smaller pieces and aggregate them together.? Should I always split into calls and puts and stocks and add them
By @jiamin · #48121 ·
Re: Why is this order invalid and rejected?
That's probably the other reason they don't allow it, the orders you included don't margin against each other well. In this case, you're best off with a +4 and -1 call spread..? and then the long
By Peter Drier · #48120 ·
Re: Spotty historical bars for TICK-AMEX and other indexes
Can you be a little more specific? What bar size, duration, and duration unit are you using? And how do you specify the end time (time, time zone)? Just ran a quick test for 20210901, 20210902, and
By Jürgen Reinold · #48119 ·
Spotty historical bars for TICK-AMEX and other indexes
Has anyone else experienced day-long gaps in these type of indexes when requesting historical bars from IB API?? For example, I get no data back for September 3rd, 2021 for TICK-AMEX, but I get it
By nshale2@... · #48118 ·
Re: openOrder:orderState vs orderStatus:status
I use OrderState mostly for its CompletedStatus field which can indicate such things as "Rejected" or "Cancelled by Trader". My automation routine is stateless so it is useful for it to differentiate
By ds-avatar · #48117 ·
Re: Inconsistent behaviour of WHATIF orders
If you're on portfolio margin then the behavior is completely consistent. Not every trade increases margin if it's considered to be risk reducing by IB's PM model. Now, if you're seeing a disparity
By misantroop · #48116 ·
Re: Inconsistent behaviour of WHATIF orders
Could it be possible that you already have some positions, for example short calls, and selling 1-2 puts would not increase the margin requirement.? but when you are selling 3-4, it brings more risk
By @jiamin · #48115 ·
Re: How to get the maintenance margin of one symbol, containing multiple STK and/or OPT positions
thanks for the reply.? Actually I am no where near trading with API yet.? I am still too new for this.? ?What I am trying to do now is still "read-only".? In particular, now I want to know the
By @jiamin · #48114 ·
Re: How to get the maintenance margin of one symbol, containing multiple STK and/or OPT positions
I don't know if the API will be able to calculate what you're looking for. It doesn't seem like a good sign if you are unsure about your margin/buying power while trying to open multiple stk/opt
By Derrick Ike · #48113 ·
Re: Why is this order invalid and rejected?
Thanks for the reply. Actually I don't even need it to be guaranteed.? Smart routed or not also doesn't matter to me.? Would it be possible? What I really want to do is to check the margin
By @jiamin · #48112 ·
Re: How to get the maintenance margin of one symbol, containing multiple STK and/or OPT positions
yes exactly.? For example closing the short call on a covered call position is actually increasing margin.? ?I can see the information with what-if window in TWS or from margin report, but so far I
By @jiamin · #48111 ·
Re: Why is this order invalid and rejected?
Ultimately, that's a "custom" combo order.? Not all exchanges allow them, so TWS isn't going to allow it on a smart route.? I'm not sure if they'll allow it on a directed route either, there's so
By Peter Drier · #48110 ·
Re: How to get the maintenance margin of one symbol, containing multiple STK and/or OPT positions
I'm fighting with the same issue. I'd desperately need to get the margin for a basket of several orders. Simply running WHAT_IF on each leg and then adding altogether doesn't give the correct result
By Despair · #48109 ·
Re: Why is this order invalid and rejected?
thanks for the reply.? Hmm, I didn't know that we need equal number of contracts in each leg.? Is this a limitation for combo with >=3 legs?
By @jiamin · #48108 ·