Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: did something change on 9/21/22 getting 366 on a feed that "WAS" working well.
On Wed, Sep 27, 2023 at 06:43 AM, comicpilsen wrote:
I am subscribed to all the relevant data and the code hasn't changed. I was working on 9/20/22 but not since then.What do you mean ? "I" or "it" ? You should submit herewith your request in full. You have an issue which is pretty unique and unusual. It maybe that it was luck that make it working before 9/20/22 Specify the "SecType" of the contract (I guess you look for STK) , it's more important than currency (if you specify explicitly the Exchange) Then try "ISLAND" instead of "SMART", if work be ready to use NASDAQ (IB is in the process of getting ride of ISLAND) Also surprising is the very small number for reqId, do you catch the IBApi.EWrapper.nextValidID? ? |
Re: Bad Ticks
Which data feed do you observe, or? ? And what exactly does it mean, when you see a "+30ticks" trade? Does that mean that the most recent trade price 30 minTicks away from the previous trade? ´³¨¹°ù²µ±ð²Ô On Wed, Sep 27, 2023 at 05:21 PM, btw wrote:
Anybody else get a bunch of bad ticks in CL today?? I had 10+ bad ticks from 30->150 x min tick, I checked ES(ok) HO(ok) NG(1 bad). |
TWS api multiple similar orders submission delays
I have a IBGateway TWS solution which sends multiple, i.e 10 orders on the same security, but with different limit prices, for instance Option BUY order with:
- Quantity=6, LMT price= 14.50 - Quantity=1, LMT price= 14.30 - Quantity=1, LMT price= 14.10 - Quantity=10, LMT price= 13.50 - Quantity=2, LMT price= 13.10 ?-Quantity=1, LMT price= 12.50 ?-Quantity=5, LMT price= 12.10 - Quantity=1, LMT price= 11.50 - Quantity=10, LMT price= 11.10 - Quantity=3, LMT price= 10.50 I'd like them to be transmitted as soon as possible, however there is about 200ms-400ms? delay in between each order is transmitted by Gateway and has?Submitted status. So, last order will be transmitted about 3-4 seconds after placeOrder was called. Ideally, I'd like all of them to be active in less than 1 second of calling gateway. Do you also experience such delays when submitting multiple orders at the same time? I'd love any ideas on how to speed transmition of those orders. |
Re: receiving quotes from funded account, trading on paper account
There had been an issue a couple weeks ago as discussed in this topic, but for us and others who commented in the topic, data sharing between a live account and its associated paper account works fine again as long as you follow the rules described in ´³¨¹°ù²µ±ð²Ô On Wed, Sep 27, 2023 at 08:58 AM, <zlzhao22@...> wrote:
Now The IB does not let you have real time quotes on both real account and paper account.? I am thinking if it is possible to receive the quotes from the real account, while trading on the paper account to test the strategy.? I am using C#.? How to do it?? Thanks. |
receiving quotes from funded account, trading on paper account
Now The IB does not let you have real time quotes on both real account and paper account.? I am thinking if it is possible to receive the quotes from the real account, while trading on the paper account to test the strategy.? I am using C#.? How to do it?? Thanks.
|
did something change on 9/21/22 getting 366 on a feed that "WAS" working well.
been using a standard call to historical data for years but suddenly (9/21/22) I am getting
Did I miss a change in the API? I am subscribed to all the relevant data and the code hasn't changed. I was working on 9/20/22 but not since then. |
Re: APIPending status?
Franco Chiesa Docampo
Hi Uncle, I managed to place a market MKT and LMT order by completing some fields in the PlaceOrder message buffer. Check it out here: . Hope it?helps. El vie, 15 sept 2023 a las 5:06, <unclekensson@...> escribi¨®: Aha! That certainly looks like a plausible explanation. Thanks, ´³¨¹°ù²µ±ð²Ô! (And Franco!) |
Error 504 when trying to start trade after testing.
When I run my program everyday, first I connect to ib. Then I use this logic app.isConnected() to check if its connected using a python script. I run it twice, because sometimes it does not connect on the first try. Then I disconnect and run my actual trade script. However, sometimes i get a connection error 504, sometimes it works. Any idea why its like this or how i should be altering it to run properly? |
Re: IB's own SAMPLE Excel files still refer to de-supported order attributes so they don't work at all -- how do I bypass / fix??
¿ªÔÆÌåÓýOk, I¡¯ve looked into this a bit more, including stepping through the VBA with the debugger, and unfortunately I can see that the suggestions I made are not going to work, and the code change I alluded to won¡¯t help either. ? When you install the API, it installs a library called ddedll.dll in your Windows folder. This is used under the hood by the DDE mechanism to communicate with TWS. It may well be that this library needed to be amended to filter out these unsupported order attributes, or something. And maybe the version of the API you¡¯re using doesn¡¯t have that update (by which I mean you may need a newer API version). ? So which API version are you using? If less than 10.10 (which was the API version where these attributes were de-supported), I suggest you uninstall that one and then install 10.19, and try that. The legacy sample still has these unsupported attributes , but just leave them blank. ? Then if you still have the problem, I think you¡¯ll have to contact IB. ? |
Re: IB's own SAMPLE Excel files still refer to de-supported order attributes so they don't work at all -- how do I bypass / fix??
Thank you both for your replies.
@joanmarcel119 - yes, as I wrote in my OP, I went looking through all the VBA, did a ctrl-F search through every Object and Module looking for text string "NBBO", but it isn't anywhere in the VBA code. I'm guessing it's somehow renamed or something, but I don't have the coding abilities to decipher how it appears in the VBA to comment it out. And yes, I've written to IB to let them know about this...I'm surprised no one else has reported it to them because it's been broken for nearly a year! @Richard L King - yes, the first thing I tried last night was just deleting Row 39, which didn't work. Tried deleting the NBBO columns on the Basic Orders page as you suggested, but still generates that error. Can you let me know what your 'further suggestion' might be to the code? FYI I have periodically installed and test-driven the 'new' socket-based DDE API but for some reason it has never worked well for me. Performance is incredibly laggy and inconsistent, so I always find myself running back to the Legacy DDE, which is annoying because yes I'm told the socket-based DDE is supposed to be better / faster / more-functionality etc. And yet -- perhaps due to the way my workbooks are set up (I dunno?) -- Legacy DDE has always been the only one of the IB API's that has worked reliably for me. Going back 4+ years IB was saying that they were going to sunset the Legacy DDE, and I've written them periodically to ask whether that was still the plan (and to implore them not to do so)...and they've changed their tune a bit to "yeah, at one point we were going to phase it out, but for now we're keeping it but no promises for the future". |
Re: reqPositions not returning all positions
On Mon, Sep 25, 2023 at 11:02 AM, chris.bauch@... wrote:
It's not much different. Search for positionEnd in the sample code provided w/ the API (IBJts/samples/Python/Testbed/Program.py) and you'll see how to add it to your program. At the same time keep in mind that IB API programs are built on a client/server model and you'll rely on the messaging pattern a lot. Given the nature of your issue I'm guessing this isn't second nature yet. So keep in mind, whenever you see a call which looks like reqThis or reqThat, the response data should come back some (short?) time later via another function or method... often named simply this or that. Given most calls are network based, this will hold true (in some sense) even if the naming doesn't always fulfill that convention. Your code seems to be reading the position responses correctly, so positionEnd may be an example of such an exception and the reason for the mix up. Anyway... What you should absolutely not get in the habit of doing is making a request and then sleeping with the expectation that a response will show in time. It's been said a million times before on this list and here is yet another reminder... With that out of the way, and since you're a Python user, I also suggest trying Ewald de Wit's . It does a great job of hiding these network details when they're not strictly necessary, and exposing them via coroutines when they are. For example, you'd be able to easily access your positions in a traditional, rich client, manner by simply calling . Of course YMMV. Good luck. |
Re: IB's own SAMPLE Excel files still refer to de-supported order attributes so they don't work at all -- how do I bypass / fix??
¿ªÔÆÌåÓýAs far as the legacy version goes, it should be as simple as removing the relevant rows (for example row 39 for NBBO Price Cap) from the Extended Order Attributes page, and the corresponding columns (for example column BF for NBBO Price Cap) from the Basic Orders page: and I think the other ones are in rows 37 and 38 and columns BD and BE. I¡¯d have to actually work through the code to confirm that this will be sufficient, and I don¡¯t have time for that. So take a backup copy of the workbook, make these changes, and give it a whirl. I can¡¯t test this myself because I¡¯m not set up for legacy DDE. ? If it doesn¡¯t work, then I can make a further suggestion to fix the actual VBA code, but I don¡¯t think that should be necessary. ? In the longer term, the obvious answer is to switch to the ¡®new¡¯ Java-based DDE interface. The sample spreadsheet for that ¨C TwsDde.xls ¨C doesn¡¯t appear to make use of these de-supported order attributes. ? This is something you¡¯re going to have to do eventually. It may well be that IBKR aren¡¯t going to continue to support the legacy DDE going forward. It¡¯s not difficult to set it up, and it will probably save you time and trouble in the future (as well as providing more functionality, as I understand it). ? Richard |
Re: ReqHistoricalTicks() & Futures Data Limitations, Rolling Expiring Contracts
hello,
I've tried reqContractDetails with NQ future, and here is below the contract list returned in contractDetails. As you can see, there are?only non-expired contracts. So is there anything to do to get expired Contracts ? contract = Contract()
contract.symbol = "NQ"
contract.secType = "FUT"
self.reqContractDetails(self.reqID, contract) ?
def contractDetails(self, reqId: int, contractDetails: ContractDetails):
? ? super().contractDetails(reqId, contractDetails)
? ? printinstance(contractDetails)
? ? # ! [contractdetails]
|
Re: IB's own SAMPLE Excel files still refer to de-supported order attributes so they don't work at all -- how do I bypass / fix??
Hi there, you can try to modify the code by commenting the line which sets the deprecated attribute. Just place ' on the line and you could also contact IB? (so they can later fix it and help other?API users like you) and tell them this problem. Thank you El lun, 25 sept 2023 a las 6:00, grooooper (<8dave808@...>) escribi¨®: I still use the Legacy DDE API to submit orders from Excel to TWS. But a TWS update about a year ago?completely broke order submission for me, which I've been pulling my hair out troubleshooting, but I think I found the root of the problem but don't know how to fix it: |
IB's own SAMPLE Excel files still refer to de-supported order attributes so they don't work at all -- how do I bypass / fix??
I still use the Legacy DDE API to submit orders from Excel to TWS. But a TWS update about a year ago?completely broke order submission for me, which I've been pulling my hair out troubleshooting, but I think I found the root of the problem but don't know how to fix it:
When I try to use IB's Excel SAMPLE file (LegacyTwsDde.xls, which is the default one that gets downloaded with any TWS API installation), orders don't actually get submitted to TWS and the Show Errors field gives this message (screenshot below): Error code: 10270 / Message:?The NbboPriceCap' order attribute is not supported.
Googling that error found this IB Github page:?, which says this about the error code & message above: "The nbboPriceCap IBApi.Order attribute is no longer supported. Error received with TWS versions 983+" Moreover, I found what I think is a related issue discussed in a couple threads on this very forum: -?/g/insync/topic/ib_tws_beta_983_0n_version/80870459?p= -?/g/twsapi/topic/82377975?p=,,,20,0,0,0::,,,0,0,0,82377975 TLDR: I think what's going on is that 3 order attributes seem to have been deprecated in some recent TWS or TWS API update, but they never bothered to update the IB Sample Excel files, so using them to submit an order doesn't work because they still refer to an order attribute that no longer exists. So if that's the problem, how might I modify the Sample Excel file so that it no longer looks for this de-supported attribute?? I know a lot of people on this forum have good programming skills and write their own custom API code...but I still rely on the Sample excel files IB supplies. I looked through all the VBA, thinking maybe I could just comment out that NBBO order attribute, but couldn't find anything that looked relevant. Hoping someone can look at that Sample file (LegacyTwsDde.xls, it should be in the?C:\TWS API\samples\Excel folder for anyone who has downloaded TWS API) and tell me how to fix this. Thank you!! |