Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: "update order" VS "cancel and creating order"
Hey, did you even bother to click through to order efficiency policy guidelines from the api web page you linked? "Modification vs. Cancellation - logic which acts to cancel and subsequently replace orders should be substituted with logic which simply modifies the existing orders." §ã§â, 24 §æ§Ö§Ó§â. 2021 §Ô., 01:43 <tegicof991@...>: >ds-avatar: may not count under IBKR reasonable order cancellation policy, whereas canceling it will, |
Re: "update order" VS "cancel and creating order"
According to there are no hints of any such limitations or any additional information regarding the differences of cancel_and_create versus editing order (besides the "15 active orders per contract per side per account"). It's clear that editing will have the same orderId, but in my case, that's not important for me. And I cannot find any of such costs you describe.
1. I think, (correct me if I'm wrong) IB will charge for changing or cancel orders in dependent to the exchange. 2. The threshold you have to watch with frequent modifications is a maximum of 50 orders per second being sent to the TWS - that's ok. However, I cannot find any other restrictions and the important thing, why I'm asking: I cannot find the benfits of one (cancel_and_create) over the other (editing). What are your experience? Which one you favour and why? |
Re: Shortcut for running number of subscriptions lines/rows left?
toggle quoted message
Show quoted text
Hi, |
Re: "update order" VS "cancel and creating order"
You can unconditionally reuse order id when updating it. Also I believe updating the order may not count under IBKR reasonable order cancellation policy, whereas canceling it will, but I'm not completely sure so you might want to check this if it's important for you. §ã§â, 24 §æ§Ö§Ó§â. 2021 §Ô., 00:54 <tegicof991@...>: Can someone share experience about what is prefered when editing an existing order? |
Re: "update order" VS "cancel and creating order"
I can't answer your question fully but here are two things to consider or add to your question. 2- You have to first answer if there is a benefit to modifying an order VS cancelling and resubmitting (i.e. time advantage in an HFT environment might be faster with modify OR you might still want to get executed even if couldn't modify in time). If that is the case then you want Modify only anyways. But if that is not a concern then disregard #2 and only refer to #1 above. -Bruce On Tue, Feb 23, 2021, 4:54 PM <tegicof991@...> wrote: Can someone share experience about what is prefered when editing an existing order? |
"update order" VS "cancel and creating order"
Can someone share experience about what is prefered when editing an existing order?
Should I "cancel it and create a new one" or should I only "edit it" (for example the quantity or price)? What is easier to handle? What must be take into consideration? I think (correct me if I'm wrong), for the official orderbook or the broker, "editing a limit order" is the same as "cancel the limit order and create a new one", because the order is re-queued anyway. So when using the TWS API, it does also not make any differences if "(1) editing an order" or "(2) cancel it and create a new one": (1) = (2). Am I right? Or are there hidden costs (cancellation fee or editing fee) I'm not aware of? Thanks for your feedback. |
Shortcut for running number of subscriptions lines/rows left?
Hi,
I have searched but couldn't find on the mailing list and not sure where I read it but there is a shortcut (maybe hotkey) one can use to show the number of rows subscribed to watchlist or market depth level 2. Can someone please post it? Also, is the same available via API or one has to keep their own tally in their program? Thanks, |
Re: Unable to fetch fundamental data
Most other company tickers are working, including GOOGL. I'm going to take a guess that GOOG isn't available because?it's owned by Alphabet and is not the parent company. Just a guess... On Mon, Feb 22, 2021 at 11:12 AM Mark Guglielmi via <Markag1983=[email protected]> wrote:
|
Re: Unable to fetch fundamental data
Thanks for sharing your experience, Pratik. I just tried AMZN and I was also able to receive data. Considering GOOG fundamentals are available in the app, not sure why they aren't available in the API. This might warrant a call to API support or entering a web ticket. -Mark On Sat, Feb 20, 2021 at 3:40 PM <praditik@...> wrote: Hi Mark, |
Re: Can't seem to just get the price/greeks of an option contract in Python
Probably you're defining an incorrect underlying contract on an option contract.
toggle quoted message
Show quoted text
You can see examples of working with that method in Testbed example. To try without market data select delayed data type in the beginning
|
Can't seem to just get the price/greeks of an option contract in Python
All,
I can't seem to get my script to pull down the price of an option contract. I have this overload in my class: ''' def tickOptionComputation(self, orderId, tickType, tickAttrib: int, impliedVol: float, delta: float, optPrice: float, pvDividend: float, gamma: float, vega: float, theta: float, undPrice: float):
super().tickOptionComputation(reqId, tickType, tickAttrib, impliedVol, delta, optPrice, pvDividend, gamma, vega, theta, undPrice)
print("TickOptionComputation. TickerId:", reqId, "TickType:", tickType, "TickAttrib:", tickAttrib, "ImpliedVolatility:", impliedVol, "Delta:", delta, "OptionPrice:",
optPrice, "pvDividend:", pvDividend, "Gamma: ", gamma, "Vega:", vega,
"Theta:", theta, "UnderlyingPrice:", undPrice) '''
And in my main loop I call: '''? under_contract = createUnderlyingContract(ticker) contract = createOptionContract(ticker, date, strike, right)
self.reqMktData(self.nextorderId, under_contract, '', False, False, [])
self.reqMktData(self.nextorderId, contract, '', False, False, []) ''' Is there something I'm missing here? I know I need a data subscription but I don't even get the warning message about it. Thank you in advance! |
Re: question about server support and login best practice
¿ªÔÆÌåÓýCorrect. It enables you to run TWS and Gateway with automatic login. ? It has nothing whatever to do with the TWS API. ? IBKR's introduction of the auto-relogin mechanism with TWS 974 reduces the value of IBC, though it also has other functions that may be of value. And if you don't want to have to login every Sunday, IBC in conjunction with Task Scheduler (on Windows) or crontab (on Linux) can mean the whole thing is completely automatic (I can't remember the last time I had to manually start or login to my live TWS: the only reason is just occasionally when TWS gets completely screwed and won't respond, but these are very rare events). ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of trader api
Sent: 20 February 2021 23:29 To: [email protected] Subject: Re: [TWS API] question about server support and login best practice ?
? Never really paid attention to IBC although have seen it mentioned in posts. Went on your GitHub link and from what I gather it is for logging in / maintaining the login around restarts etc.? ? It is not meant to be a replacement for IB Api right. More of augmentation to it.? ? Thanks for all you do.? ? Traderapi? ? ? |
Re: CI-testing anyone?
Matthias Frener
Thanks for all the answers so far :) A simular or any kind of moch is pretty much out of question. We are build an API client (the API interface and encoder/decoder to process the messages that go to / come from the TCP socket). The background of this exercise is ensure that out lib works across kind of different TWS versions, ideal on CI, firing up 20 dockers in parallel. (the root issue the account - we need out paper accounts for local testing, was hoping for some dev-program form IB or a reference server, or idk... =) ) |
Re: question about server support and login best practice
¿ªÔÆÌåÓýHi Richard.? Never really paid attention to IBC although have seen it mentioned in posts. Went on your GitHub link and from what I gather it is for logging in / maintaining the login around restarts etc.? It is not meant to be a replacement for IB Api right. More of augmentation to it.? Thanks for all you do.? Traderapi? On Feb 20, 2021, at 5:25 PM, Richard L King <rlking@...> wrote:
|
Locked
Re: Have you ever noticed that markets match your price but your LMT order doesn't execute?
This is yet another completely off-topic post. If you have a complaint about whether some aspect of IBKR's service is working properly, take it up with IBKR. Asking whether anyone else on this has encountered it or something like it is unlikely to yield anything useful. Let me repeat again, the purpose of this group is to assist API users in their endeavours to make good use of it. I'm going to lock this thread. Richard King Group Owner and Moderator |
Locked
Re: Have you ever noticed that markets match your price but your LMT order doesn't execute?
Joel Gross
What was your order size? I believe order sizes below the minimum ($25,000 I think) won't appear in the bid ask and end up with worse fills. I had the same reaction as you and was upset when I first saw this until I found out about the minimum order size issue. On Sat, Feb 20, 2021, 2:04 PM Bruce B <bruceb444@...> wrote: The other night, when all server farms were connected (I checked status in TWS and reset data connections multiple times), I have noticed that my LMT order was not executing while market price was matching it or even exceeding it.?The order was placed manually on TWS for a Forex pair. I am pretty certain results would have been the same if it was done through API. I could see that the order had a different color sign beside it (that was unfamiliar to me) and tooltip said IBKR did not acknowledge the order yet. |
Re: question about server support and login best practice
¿ªÔÆÌåÓýNo no no! ? IBController is a defunct project that is no longer maintained. ? It was superseded three ?years ago by IBC, which you can find at ? ? IBC is fully maintained (by me as it happens) and works with every version of TWS/Gateway (a new release is imminent to cope with a change by IBKR in the installation location for the macOS version of TWS/Gateway 981.2r). ? I don't know why the current owner of the old IBController project persists in not marking it as defunct: it is in no-one's interest to leave it in its current state. ? Richard ? ? ? From: [email protected] <[email protected]> On Behalf Of Alex Gorbachev
Sent: 20 February 2021 18:37 To: [email protected] Subject: Re: [TWS API] question about server support and login best practice ? I think you should look at IBController -? Official from IBRK. ? Or check a docker image like this -? ? I took the latter and adapted for me. I also managed to hack my way into running IB gateway on Google Colab to experiment. ? |
Locked
Have you ever noticed that markets match your price but your LMT order doesn't execute?
The other night, when all server farms were connected (I checked status in TWS and reset data connections multiple times), I have noticed that my LMT order was not executing while market price was matching it or even exceeding it.?The order was placed manually on TWS for a Forex pair. I am pretty certain results would have been the same if it was done through API. I could see that the order had a different color sign beside it (that was unfamiliar to me) and tooltip said IBKR did not acknowledge the order yet.
Given there was no connection issue between my TWS and IBKR, it seems that IBKR can at their own discretion - without any penalty to them - do one or all of below: A) Delay some users order executions (by putting certain servers on maintenance and not other servers) while other users executions are processing (be it intentionally or not). This in effect gives some users access to working servers and others not which creates an unfair advantage. B) Delay some or all users order executions while their own orders might be executed (i.e. if they are loaning user shares to other brokers or exchanges for short selling). Or they could be participating in Forex market as a corporation while user orders are not executed because they do no eat their own dog food and their own order route through different servers. OR another scenario that might be happening is that: C) IBKR's internal execution system is down for that particular security (or all types of securities) and sending process to external or internal exchange system does not work BUT they are showing data feed from exchanges which basically excludes their own exchange trading which is not happening at that time. This scenario is a maintenance issue of course and no trickery since no one is advantaged over another. It is the data that is placed through other brokers to their internal exchange or external exchanges but IBKR reflects them to their users while their order placement system is down. My questions: 1) If C above happens, do they ever show an indicator for this issue in either TWS *charts (not order window) or through API that you have seen? Something like, "Oops your LMT is matching wide market price now but our systems are down to place it and execute it - we are sorry for our horrible service). 2) If A or B happens, isn't there a regulatory body that checks their tapes and goes well at this 5 minutes you as a corporation sent millions of orders while none of your regular user orders were sent to exchanges? Or is this too in-depth for the feds still and they don't have the technical knowledge to monitor these sort of trickeries or mistakes? 3) I have seen this happening with Forex (I think it was around reset time - 12:00 am; not that reset time gives them an excuse). Have you seen this happen with regular stock (or other securities) or Forex at any other time or in another scenario? 4) Have you noticed any other serious - out of whack - data streams or order issues that you have experienced? and how do you try to remedy them? Thanks, |
Re: CI-testing anyone?
Joel Gross
I feel guilty about my approach, but it has worked and made for fast development so far without any serious production problems: I basically build and test everything on a paper account against live data and debug from there. Whenever I run it in production so far I have monitored it and occasionally found minor bugs, but nothing that caused me to lose money. This is enabled me to get to production more quickly I think, and over time I have found a lot of corner case weird production bugs that I would never have caught probably with some sort of test suite that emulates IB.? On Sat, Feb 20, 2021, 12:27 PM Jonathan S <jsheena@...> wrote: My CI testing follows what Mark outlines.?? |