开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
Date

Re: Question about IBKR TWS API Availability

 

开云体育

If it used to be under the login button and isn't now it's probably because the API has nothing to do with logging in, so it was a silly place to have it.

?

You don't need to search for the API software, it's the second item in the Trading menu.

?

The API is massively important to IB: I would say there is absolutely no chance of them dropping API support.

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of Obiwan23
Sent: 20 May 2021 15:51
To: [email protected]
Subject: [TWS API] Question about IBKR TWS API Availability

?

Hi everyone,

I wonder why the "Download TWS API" menu item removed from first page of ibkr.com Login button menu popup ? I remember Download TWS API was there along with Download TWS and Download Gateway but currently not.?

API pages can only be found by searching TWS API on IBKR website. Although most of the functionality exist in the current version of API but TWS desktop software renewed at least in every month, but new API since Nov 2020.?

Does someone has an idea ? Are there any hidden plans from IBKR to drop API support ?


Question about IBKR TWS API Availability

 

Hi everyone,

I wonder why the "Download TWS API" menu item removed from first page of ibkr.com Login button menu popup ? I remember Download TWS API was there along with Download TWS and Download Gateway but currently not.?

API pages can only be found by searching TWS API on IBKR website. Although most of the functionality exist in the current version of API but TWS desktop software renewed at least in every month, but new API since Nov 2020.?

Does someone has an idea ? Are there any hidden plans from IBKR to drop API support ?


ReqMktData change since TWS API 9.73

 

Hello,

Up to TWS 9.73, I'm able to request delayed market data for around 100 instruments or more.
But as soon as I use a more recent TWS release, I get erratic replies.
By erratic I mean I get bid/ask for some instruments only.

In fact, as I have 2 accounts (personal and pro), I run my trading software connected to both TWS 9.73 and TWS 9.84

My in house trading software connected to TWS 9.73
get delayed bid/ask for the options I request.
But my in house trading software connected to TWS 9.84
received delayed bid/ask for some options only.

Has anyome experienced the same problem ?

Thanks forward for any feedback. As it causes me a lot of trouble.
I still use TWS 9.73 but It will become deprecated at some point in the future.


reqFundamentalData not working today

 

Hi all,
?? For some reason, today reqFundamentalData started failing for me.? I have a subscription to the WSH data feed and yesterday was getting successful responses to reqFundamentalData.? Today however I started getting this error out of the blue:

INFO: error id=10333366 code=430 msg=The fundamentals data for the security specified is not available.Not allowed
java.lang.Exception: error id=10333366 code=430 msg=The fundamentals data for the security specified is not available.Not allowed

?? This seems to say I don't have access to the WSH feed anymore (which isn't the case, I'm still paying for it).? Let me know if anyone else is having this same problem.

thanx,
Hunter


Looking to Hire a Consultant to Help Implement Python APIs for IB and TD Ameritrade

 

Hello, I’m interested in hiring a consultant who has experience with implementing APIs for both Interactive Brokers and TD Ameritrade.?

I’ve got a trading strategy in Excel that trades a few times a day that is currently automated using the IB DDE APIs.? I’d like to convert that to Python and then implement something similar for TD Ameritrade.

If interested, please email me at davidjuday@....? Please indicate your hourly rate, your location/time zone, and any other information you’d like to provide.

Thanks,

David Juday


Re: Market Scanner Pre/Post Market Hours

 

Sorry to insist, but does it really work for you aside of RTH ?

My understanding make me feeling that people that see screener in TWS with "number" live aside of RTH are looking at an artifact.
What TWS keep displaying is variation of each stocks without updating screener, and as aside of RTH not that much does change in term of screeing it seems still relavant screening
Even Top After hours are a filter to apply on a scancode but involved yesterday move. not live move
(Hypothesis)

API Level:
The <filters>? are id of a <RangeFilter> but only work as a "moderator" (Filter) to a? selected <ScanType><scanCode>
But no scanCode seems active-able (rectification: I was not able to get any working) aside of RTH.


Re: Options Volume and Open Interest

 

all expiry dates and strikes can be obtained with?reqSecDefOptParams, but volumes and OI you have to ask separately

?

https://interactivebrokers.github.io/tws-api/options.html#option_chains


Re: Options Volume and Open Interest

 

I tried at the last minute before markets closed. Didnt seem to work. But I can try again on Monday.

However, I was wondering if IB gives an entire json of all expiry dates/strikes/call/put volume/OI in one shot (similar to how TD or other brokers does). Calling each strike and price individually takes toooo much time.

Thanks.


Re: Options Volume and Open Interest

Nick
 

Generic tick 100 gives tick type 29 for daily call volume and type 30 for daily put volume. Don't know if these are the numbers you need.

On 5/14/2021 2:49 PM, nagabrahmam9@... wrote:
I am trying to get the options volume and option interest for a particular strike and expiry date. This is what I have:


Options Volume and Open Interest

 

Hi,
?
I am trying to get the options volume and option interest for a particular strike and expiry date. This is what I have:
?
? ? contract = Contract()
? ? contract.symbol = "AAPL"
? ? contract.secType = "OPT"
? ? contract.currency = "USD"
? ? contract.exchange = "SMART"
? ? contract.PrimaryExch = "SMART"
? ? contract.lastTradeDateOrContractMonth = "20210625"
? ? contract.strike = 122
? ? contract.right = "C"
?
Then I am using reqMktData to request the market data, and I am using the tickSize callback and trying to record the tickkType 8 (volume) and 28 (Open Interest). The code is returning the right values, however the problem seems that it doesnt always return the volume. From the docs I understood that tickSize responds only when there is a change in the tick. This is not what I am looking for. I am ok to get the "current volume". What code can I use to get the volume and Open Interest of the option?
?
app.reqMktData(1, contract, '101', False, False, [])
time.sleep(1)
app.cancelMktData(1)
?
? ? #CALLBACK:
? ? def tickSize(self, reqId, tickType, size: int):
? ? ? ? super().tickSize(reqId, tickType, size)
? ? ? ? if tickType == 8 or tickType == 28:
? ? ? ? ? ? # tickType = 8 for Volume
? ? ? ? ? ? # tickType = 27 for Calls
? ? ? ? ? ? #tickType = 28 for Puts
? ? ? ? ? ? print("TickSize. TickerId:", reqId, "TickType:", tickType, "Size:", size)
?
?
Thanks.


Re: reqMktData doesn't lead with current bid/ask

Phil K
 

Well after spending much time on this problem in last 24 hours, I have a resolution and can report that this is my fault.

reqMktData absolutely *does* lead with the current bid/ask.? In my case I had moved a block of code into a for loop,
but I neglected to change a return statement in that block to a continue statement.? The genesis of that change was
about slowing down my gui a bit because it was updating on each quote change in real-time and, frankly, in fast markets
it makes your head swim and serves no useful purpose for my application.

So I buffered the feed using a time-configurable hash, e.g. 200-500ms, just to slow it down a little.? When I process
the hash, I need to iterate over the fields and *that* is where I ran into the return statement that should have been a
continue.

Phil


Re: reqMktData doesn't lead with current bid/ask

Herve K
 

I have the exact same issue. I was fine for months because i was operating on very liquid markets, but i now have some illiquid options again.
I tried for hours yesterday and simply could not get the greeks on 2-3 contracts.

I am using the?MODEL_OPTION_COMPUTATION?parameter on my reqMktData request, I expected it to be the less reliant on market liquidity, but it seems that i was wrong.?

Hope someone can clarify that for us.


Daily historical bar data for IDEALPRO/FX and Futures and Indexes, what is the cutoff time?

 

I need to obtain daily bar data of various asset classes for some research and I could not get any satisfactory answers for some of the below questions via IB chat. I use IB's Python wrapper through TWS.

I was wondering whether any of you guys might know:

(1) when I obtain historical IDEALPRO/fx (EURUSD) daily bar data for the past 10 days (bar size = 1 day), I get the following:?


Open High Low Close
DateTime ? ? ? ?
2021-05-03 1.202850 1.207615 1.201315 1.206430
2021-05-04 1.206425 1.206440 1.199900 1.201300
2021-05-05 1.201275 1.202665 1.198605 1.200460
2021-05-06 1.200450 1.207170 1.199315 1.206525
2021-05-07 1.206300 1.217145 1.205285 1.216675
2021-05-10 1.216800 1.217830 1.212775 1.212940
2021-05-11 1.213050 1.218175 1.212305 1.214770
2021-05-12 1.214625 1.215265 1.206565 1.207005
2021-05-13 1.207075 1.210625 1.205135 1.208010
2021-05-14 1.208100 1.208495 1.207095 1.208485

It is 7pm Pacific Time on May 13 (10PM EST, and 2AM UTC). I wonder why the last bar is May 14? Is the daily rollover at UTC midnight? Do all the dates refer to UTC or Local Time? If Local Time on my machine (Pacific Time ) then I do not understand the logic here??

(2) The last bar's closing price coincides with my current real-time price for EURUSD. Does the open price of the same date pertain to exactly 24hours prior to the time the data was requested through the API? Does this mean all previous bars closing price is a multiple of 24 hours prior to the exact time the request was made? If true, does that mean that all the bars are calculated on the fly on IB's servers and returned? For daily data, my experience with other data vendors is that the vendor decises on a specific cutoff time and timezone and stores the daily data and the same daily historical data is returned regardless of when the request was made...How does IB work in this regard?

(3) How does the above apply to Futures in different time zones (US exchanges, London, Australia, Japan? What about Indexes that are disseminated via IB but calculated by Reuters, DJ or the like??


Re: reqMktData doesn't lead with current bid/ask

 

Do you have a side by side video of TWS windows corresponding to reqmktdata and API callback print showing the discrepancy?

Hope you are looking at corresponding TWS window.




On Thu, May 13, 2021, 4:36 PM Phil K via <pkdevel=[email protected]> wrote:
I'm just posting for confirmation on reqMktData behavior.? It seems odd to me that, for a live data request,
it doesn't lead with the current bid/ask and then send change callbacks.? For slower, less liquid markets
(I work most with option chains), you need to wait, sometimes minutes, until a refresh occurs and you see
the very first bid/ask.? If you work with fast, liquid markets you might not even notice the problem, but turn
your attention to slower markets and the issue becomes apparent.

Phil


reqMktData doesn't lead with current bid/ask

Phil K
 

I'm just posting for confirmation on reqMktData behavior.? It seems odd to me that, for a live data request,
it doesn't lead with the current bid/ask and then send change callbacks.? For slower, less liquid markets
(I work most with option chains), you need to wait, sometimes minutes, until a refresh occurs and you see
the very first bid/ask.? If you work with fast, liquid markets you might not even notice the problem, but turn
your attention to slower markets and the issue becomes apparent.

Phil


Re: IBAPI - Contract details for micro contracts MYM

 

Replacing contract.localSymbol with contract.symbol and contract.lastTradeDateOrContractMonth works for me.

Thanks for the responses.

KH


Re: IBAPI - Contract details for micro contracts MYM

 

开云体育

For most futures, you can get the contract by specifying just the sectype, the local symbol and the exchange (for example E-Mini futures on Globex). For some futures, which only trade on a single exchange, you only need the sectype and the local symbol (for example FTSE Futures and DTB futures).

?

And MYM is one of the latter: all you need is sectype="FUT" and localsymbol="MYM? JUN 21"

?

Note that the localsymbol for ECBOT contracts is a different pattern from many other exchanges, so it's not "MYMM1" as you reasonably guessed. The DTB exchange also uses this format.

?

Another ECBOT contract is ZB?? JUN 21 (there are three spaces after ZB), but in this case you have to supply the exchange as well because it also trades on QBALGO.

?

What would be handy would be a nice little program that would allow you to try various different contract requests and show you what you get back. Oh wait – I wrote one! It's called the Contract Inspector, it's free and open source, and you can acquire it from here:

?

?

I find it really useful for resolving this sort of problem.

?

Note: there's a gotcha – this program is currently Windows only, and it uses Microsoft's OneClick technology to keep itself up to date, but at the moment there is a serious problem with OneClick in that it only works via Internet Explorer in Windows 10 20H2 or later (yes, really, Internet Explorer!...). So if you go to the website above with IE the install will work fine, but with any other browser you just get a dumb page of XML displayed. Microsoft are aware of this problem but they seem to be flummoxed by it…

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of Kevin
Sent: 12 May 2021 10:15
To: [email protected]
Subject: [TWS API] IBAPI - Contract details for micro contracts MYM

?

Hello,

I'm new at this, and would like some help with Contract Definitions for the ECBOT exchange contracts.

Using the provided Python sample Program.py and am able to obtain snapshot data for GLOBEX and NYMEX, however with ECBOT I am not able to obtain any snapshot information unless I provide a conId, as per the contract definition:

contract = Contract()
contract.conId =
428519925
contract.secType = "FUT"
contract.exchange = "ECBOT"
contract.currency = "USD"
contract.localSymbol = "MYMM1"


However when the conId is omitted, as I do in all other contracts, I receive the dreaded 200 error message.

ERROR 1005 200 No security definition has been found for the request.


Is someone able to help me with the correct way of defining these contracts: MYM, YC, YK and YW?

Thanks,
KH


is it possible to invoke the ib robot command line interface through the api?

 

hello friends,

i would like to build upon the existing ib robot command line interface.

any suggestions?


Re: IBAPI - Contract details for micro contracts MYM

 

I think you still need to define the expiration and the multiplier.




-----Original Message-----
From: Kevin <kevin@...>
To: [email protected]
Sent: Wed, May 12, 2021 5:15 am
Subject: [TWS API] IBAPI - Contract details for micro contracts MYM

Hello,

I'm new at this, and would like some help with Contract Definitions for the ECBOT exchange contracts.

Using the provided Python sample Program.py and am able to obtain snapshot data for GLOBEX and NYMEX, however with ECBOT I am not able to obtain any snapshot information unless I provide a conId, as per the contract definition:

contract = Contract()
contract.conId = 428519925
contract.secType = "FUT"
contract.exchange = "ECBOT"
contract.currency = "USD"
contract.localSymbol = "MYMM1"

However when the conId is omitted, as I do in all other contracts, I receive the dreaded 200 error message.
ERROR 1005 200 No security definition has been found for the request.

Is someone able to help me with the correct way of defining these contracts: MYM, YC, YK and YW?

Thanks,
KH


Re: IBAPI - Contract details for micro contracts MYM

 

This works for me:

mym_contract?=?Contract()
mym_contract.symbol?=?'MYM'
mym_contract.secType?=?'FUT'
mym_contract.exchange?=?'ECBOT'
mym_contract.currency?=?'USD'
mym_contract.lastTradeDateOrContractMonth?=?"202106"

On Wed, May 12, 2021 at 12:04 PM Kevin <kevin@...> wrote:
Hello,

I'm new at this, and would like some help with Contract Definitions for the ECBOT exchange contracts.

Using the provided Python sample Program.py and am able to obtain snapshot data for GLOBEX and NYMEX, however with ECBOT I am not able to obtain any snapshot information unless I provide a conId, as per the contract definition:

contract = Contract()
contract.conId = 428519925
contract.secType = "FUT"
contract.exchange = "ECBOT"
contract.currency = "USD"
contract.localSymbol = "MYMM1"

However when the conId is omitted, as I do in all other contracts, I receive the dreaded 200 error message.
ERROR 1005 200 No security definition has been found for the request.

Is someone able to help me with the correct way of defining these contracts: MYM, YC, YK and YW?

Thanks,
KH