Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: reqMktdata SPX call
Under "File -> Global Configuration -> API -> Settings"
toggle quoted message
Show quoted text
闯ü谤驳别苍 On Fri, Mar 11, 2022 at 08:50 AM, dent wrote:
|
Re: reqMktdata SPX call
开云体育Hi there nope, the message is getting to IB it's just not sending anything back. I just wanted to see if I was missing anything at the highest level. As Richard says there should be not difference in call. "STK" or "IND". thanks for chipping in though but the call is fine. Which logs should I be looking at please?? I use TWS desktop running on Linux. I just want to make sure I'm looking at the right ones. thank you for taking the time cp
On 3/11/22 08:42, 闯ü谤驳别苍 Reinold via
groups.io wrote:
|
Re: reqMktdata SPX call
You provided very little context, but the word "Sending" in the error message jumped at me. Just guessing but could it be that your request fails in the Julia API implementation before it is even sent to TWS? That would explain why you get no data. You could check TWS API log to verify whether the request makes it to TWS and whether market data is sent back to you. You might want to reach out to the creators of the Julia API if TWS never sees the request. 闯ü谤驳别苍 On Thu, Mar 10, 2022 at 06:01 PM, comicpilsen wrote:
|
Re: reqMktdata SPX call
开云体育Absolutely the same. Depending on the index you may not receive some tick types, but I've never noticed anything to be missing that I'd expect to be there. The FTSE index (which IB actually no longer provide data for) used to even send out bids and asks, which always puzzled me somewhat – no idea what they were meant to mean, since the index isn't tradable. ? You know, IB provides some test ?programs with the API that enable you to just try all this sort of thing out without having to write code. There are test programs for C#, Visual Basic and Java. If you're on Linux the Java one would be the only option. I think you have to build them yourself the first time. ? They enable you to essentially call any API with any parameters you choose and see the results. I've found these things really useful over the years for trying things out before writing code in my platform. ? Regarding the Highland Games, I've lived here in the North East of Scotland for over 32 years now and have never been to them. Not really my thing! ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of dent
Sent: 11 March 2022 12:50 To: [email protected] Subject: Re: [TWS API] reqMktdata SPX call ? Thanks Richard so the results of the call for an "IND" should be the same as the results as a call for "STK". Is that a fair statement?? Also I was talking to a chum about the Aboyne highland games. I used to spend time in Banchory and used to enjoy the games and the characters. cp |
Re: reqMktdata SPX call
开云体育Thanks Richard so the results of the call for an "IND" should be the same as the
results as a call for "STK". Is that a fair statement?? Also I was
talking to a chum about the Aboyne highland games. I used to spend
time in Banchory and used to enjoy the games and the characters. cp
On 3/11/22 06:42, Richard L King wrote:
|
Re: reqMktdata SPX call
开云体育Yes, market data requests work the same way for indexes as for any other contract. ? I just tried it on my system with these parameters and it worked fine (market is closed now though so only zeros returned). ? Even if it wasn't allowed, I wouldn't expect any sort of request to result in an exception like this: clearly some work to be done in this implementation! ? ? |
Re: reqMktdata SPX call
Sorry Richard I wanted to just ask the general question if it was legitimate for me to send a reqMktData for an index. Here's the TWS connection data
I'm using a language called julia and so posting the code won't help as this language isn't supported on this forum. I'm using the same structure of call I use for "STK" so I was hoping that if I send the same call but with the following fields filled out I would get a data stream.
Is this is legitimate call please in general terms. |
Re: reqMktdata SPX call
开云体育Give us some clues please! ? Like what API implementation are you using? ? ? From: [email protected] <[email protected]> On Behalf Of comicpilsen
Sent: 11 March 2022 00:02 To: [email protected] Subject: [TWS API] reqMktdata SPX call ? Hi all is there ANY reason that calling reqMktdata using "SPX" , "CBOE","USD" as parameters would cause
and no data? I can send the same reqMktdata for any symbol and it works perfectly. |
reqMktdata SPX call
Hi all is there ANY reason that calling reqMktdata using "SPX" , "CBOE","USD" as parameters would cause
and no data? I can send the same reqMktdata for any symbol and it works perfectly. |
Re: Unexpected duplicate orders re-submitted many times within a short time
Hi WHmKK Zeng,
Just curious, what method are you using to avoid re-submitting the same orders? I'm trying to stop new orders from being created when open orders for that contract already exist, but I'm not sure how to. Thanks in advance! |
IBKR currency carry reference benchmarks + history
Hello TWS group,
Was looking into FX trading recently, and tried to source the below reference benchmark rates from the TWS API without success. I would need today's rate but also history if possible, it is available from the IBKR website, so I suppose it must be stored somewhere in the API, but can't find it. Any suggestions? Thanks, Jonathan |
Re: Place a Limit Order with 2 Profit Takers and 1 Stop Loss for a Stock
Dear Orionn,?
toggle quoted message
Show quoted text
May I ask how can we trigger the stop-loss order modification a profit taker order fills?? Thank you. Hao On Thu, Feb 4, 2021 at 09:57 AM, Orionn wrote:
My suggestion is that you create two sets of orders. Each set includes the parent limit order and two attached OCA child orders (profit taker and stop loss). The limit price of the profit taker orders is different on each set of orders. To update the stop loss orders, just monitor the status of the profit taker order in the first set (wait for a fill) and then place the stop loss orders again with modified prices. You may simply trigger the stop loss order modification when the first profit taker order fills. Hope this helps. ?Dear Orionn, I just read your reply |
Re: Connected to gateway, but no response from API via gateway
Are you sure you are using the correct gateway, Eric? It feels like you are trying to make "Client Portal API" calls to the ":TWS API Gateway".
The Client Portal API comes with its own little gateway and generally uses port 5000. Here a link to the section of the Client Portal API, 闯ü谤驳别苍 |
Re: Connected to gateway, but no response from API via gateway
Nick
开云体育Um, the TWS API is not a web server or http based at all. It uses a custom protocol, http is not going to work. I am not a python expert so I apologize if your example is
running a python TWS API library rather than http. On 3/9/2022 9:57 AM, Eric Eikrem via
groups.io wrote:
r = requests.post(, data='{"symbol": "GWO","secType": "STK"}') |
Connected to gateway, but no response from API via gateway
Hello,
One computer on my LAN is running the IB Gateway and another is running scripts that connect to the IB Gateway. I am able to connect to the gateway, but I am not getting responses from the API: ?curl -v " -d "{"symbol": "GWO","secType": "STK"}" *?? Trying 192.168.1.10:4002... * Connected to 192.168.1.10 (192.168.1.10) port 4002 (#0) POST /v1/api/trsrv/stocks HTTP/1.1* upload completely sent off: 26 out of 26 bytes After that, it just sits there waiting for a response. I have got log and API messages visible on the gateway and cannot see any trace of the (supposedly) incoming requests. The same result with python code (no surprise, I suppose): import requests r = requests.post(", data='{"symbol": "GWO","secType": "STK"}') No connection errors, but it just sits there. The configuration of the IB Gateway (v.10.12): - All default except that "Allow connections from localhost only" has been disabled, and I have added the client machine to the Trusted IPs list. Gateway network and firewall: inet 192.168.1.10/24 brd 192.168.1.255 scope global noprefixroute enp2s0 $ sudo ufw status Status: active To???????????????????????? Action????? From --???????????????????????? ------????? ---- 22/tcp???????????????????? ALLOW?????? Anywhere 80/tcp???????????????????? ALLOW?????? Anywhere 443/tcp??????????????????? ALLOW?????? Anywhere 4002?????????????????????? ALLOW?????? Anywhere 4001?????????????????????? ALLOW?????? Anywhere 4000?????????????????????? ALLOW?????? Anywhere 22/tcp (v6)??????????????? ALLOW?????? Anywhere (v6) 80/tcp (v6)??????????????? ALLOW?????? Anywhere (v6) 443/tcp (v6)?????????????? ALLOW?????? Anywhere (v6) 4002 (v6)????????????????? ALLOW?????? Anywhere (v6) 4001 (v6)????????????????? ALLOW?????? Anywhere (v6) 4000 (v6)????????????????? ALLOW?????? Anywhere (v6) Client machine network and firewall: inet 192.168.1.106/24 brd 192.168.1.255 scope global noprefixroute wlp0s20f3 $ sudo ufw status Status: active To???????????????????????? Action????? From --???????????????????????? ------????? ---- 22/tcp???????????????????? ALLOW?????? Anywhere 59000????????????????????? ALLOW?????? Anywhere 4002?????????????????????? ALLOW?????? Anywhere 22/tcp (v6)??????????????? ALLOW?????? Anywhere (v6) 59000 (v6)???????????????? ALLOW?????? Anywhere (v6) 4002 (v6)????????????????? ALLOW?????? Anywhere (v6) Log and ini-file enclosed. Any help much appreciated. Best regards, Eric Eikrem |
Re: bunch of reqMktData requests for options
Hi Richard,
I created a ticket. Let's see whether they will fix it. From a retrospective view, you're right and I could have saved me a lot of hassle. But to be fair, I couldn't be sure before whether this bug resides inside the TWS or anywhere else. Therefore, I didn't know whether this issue could be resolved by using realtime data. Additionally, I considered these actions as part of a test of the TWS API and thus, I wouldn't invest money into something that doesn't work properly. As for the time you and 闯ü谤驳别苍 have spent for supporting me, this is the biggest downside but to drag this into a positive light, you might have learned something new regarding the TWS. ;-) By the way, for my use case, delayed data should be fine so far. Regards Andreas |
Re: bunch of reqMktData requests for options
开云体育Andreas ? Login to Account Management and you can submit a trouble ticket there. It's easy enough to find the mechanism once you've logged in. ? The cost of the US Equity and Options Add-On Streaming Bundle is $4.50 per month and the US Futures Value PLUS Bundle (which you also need) is $5.00 per month. ? So for a monthly sum of $9.50 you could have saved yourself a lot of hassle, not to mention the amount of time I and others have spent on this topic today. Besides which I would never expect delayed data to give me any realistic indication of how the live feeds perform: they're probably pretty good, but there's no reason to expect them to be – they're free after all! ? Go figure…? ? ? ? ? From: [email protected] <[email protected]> On Behalf Of hansblafoo via groups.io
Sent: 08 March 2022 20:23 To: [email protected] Subject: Re: [TWS API] bunch of reqMktData requests for options ? Hi together, |
Re: bunch of reqMktData requests for options
Hi together,
thanks for your responses! :-) I'm running the latest TWS API version and the most recent TWS version. As described, this TWS version seems to be flawed since I cannot reliably request delayed (!) market data. I would love to use this version, really, but it drives me crazy. Later, I discovered the files section of this group and under API old versions, you can find a 972.1x TWS which I've downloaded and installed. It was built on 20th February 2020 (so roundabout two years old) and I can easily log in. There is only the message, that I should update. I then started my client without changing anything (!), I didn't even change to another TWS API version. Now, it runs absolutely fine - no problems anymore, delayed market data runs in very fast and without any issue. I guess, that this should be enough of a proof that newer TWS versions seem to be buggy regarding this type. @Richard: To be honest, my plan is to subscribe realtime data later. As for now, I want to use the delayed data because I'm still developing my application (thus I don't need realtime data for now) and ironically, I also want to check how stable and realible the TWS API is before I'm going to invest any money on that. ;-) Do you know a channel or an IB mail address I can report this issue to? I only found the contact form which allows to enter 200 characters or something like that, which is not enough to describe this problem. Best regards Andreas |
Re: reqMarketData live data lagging
Nick
While IB does sometimes mess up, these types of things are almost always due to an issue with the client app.
toggle quoted message
Show quoted text
The first step is to enable the API log and look to at the data TWS actually sends. If this is indeed a problem on IB's end I'd expect the group would have exploded with activity. On 3/8/2022 2:38 PM, movais996@... wrote:
After a certain period, this gap grows to even a 10 or more minutes lag between the price received by API and the price shown on terminal! Has anyone experienced it? |