¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Re: TWS API | Options market data request issue.

 

Hello,
As I can see, in latest TWS 984.1h issue about "concurrect live session" is fixed,
I can't reproduce it. What bug with options market data do you mean?


the fields commission, max/min Commission in openOrder state are broken

 

hello friends,

i'm placing whatif orders to get the commission. it's twsapi ver 981.01 for python.?
the state received in openOrder is broken in respect to the commission fields,?
in the following way:

the paper account gives:
? > SELL 90 IWM @ LMT 230.34 [+2.00% : SELL 100.00%]
? ? profit:406.49, commission:1.7976931348623157e+308, profitable:False
? ? minCommission:0.1786933, maxCommission:0.7546933

while the live account gives:
? > BUY 11 IWM @ LMT 219.24 [+0.00% : BUY 12.50%]
? ? profit:None, commission:2.0, profitable:True
? ? minCommission:1.7976931348623157e+308, maxCommission:1.7976931348623157e+308

both accounts are at hk.

sys.float_info.max == 1.7976931348623157e+308

what do you think i'm doing wrong?

thanks in advance,
alex


bracket order , parent = 'STP' 135 errorString= Can't find order with id =101

 

Hi,

I have a classic working brakect order with parent?LMT?, takeprofit?LMT??, and stoploss?TRAIL

I changed the parent? type to STP, end recive the following error:
>>reqId= 102? ?errorCode=? 135? errorString= Can't find order with id =101
where 101 is the parent order ID.
thanks, Harris




?


Re: IBKR Lite?

Nick
 

Blame the market not. From yourself only results appear.

On 5/23/2021 7:39 AM, Patrick C wrote:
Woah! Jedi master take me under your wing! That was the coolest paragraph I've read in a long time!


TWS Historical Options Data - Python API code

 

Hi Guys,

I am looking for a code to download historical options data via Python API.
Is it possible to download or if there is any existing code already published, please share.

Your help will be?much appreciated.

Regards
Nishant Verma


Re: TWS API | Options market data request issue.

 

Hello,

As anyone received some feedback from IB about it?
As this issue still occurs with the latest release (TWS 984)
I use TWS 973 and I don't get this bug.
But this version will become deprecated at some point in the future.
So I'd like really to get this bug fixed.

Regards


Re: IBKR Lite?

 

On Fri, May 21, 2021 at 06:38 PM, Patrick C wrote:
And I also imagine, Bridgewater doesnt pay commissions on its trades.?
You imagine wrong.? Lets just say that firms at the Bridgewater level have their teams of programmers figure in commissions, slippage, execution, etc into their trading routing decisions.??

It's much more complicated though.? Models at that level generally output an idea ("Go long $5b worth of Gold in Fund1, Go Short $1.7B worth of Gold in Fund2") with a confidence interval which then get sent to an engine that determines the delta per account based on it's current gold holdings.? Then aggregates it across all of the accounts to determine they need to add $2.7B worth of gold exposure net.? Then an engine looks at all the possible ways to buy gold (/GC, GLD, physical, IAU, Mining stocks, other metals, ...) and their correlations to the desired position combined with their trading limits (Futures contract limits, max % ownership of companies before reporting, ...), average daily volumes, predictions of how much can be executed before causing an intolerable amount of market movement, and trading fees/slippage..? to come up with the predicted optimal list of trades..? Which get sent to trading, multiple times per day, global 24hr clock, multiple regions, which trades as best they can, though not always in full..? Executions get proportioned back to the appropriate fund, and the cycle continues continuously..??

When you're spending north of $250m on staff and developers every year, free commissions aren't the primary focus but are definitely included in the model.??

There is a whole system of "soft dollars" which is a sort of accounting shell game..? but that's a topic for another day.

-P


Re: TWS API earning dates..

 

have a look at this gist:

?

hope this helps,

Artyom


Re: TWS API earning dates..

 

Hi there

I tried the IB api cal for the Earnings and it had issues. We got bad dates, sometimes the dates weren't there and it seemed to be flaky. SO we gave in an signed up for the SPLENDID

this gets us IV, HV, earnings dates, earnings calcs based on prior earnings and a LOT of other data that we use to suplement and check IB data with. It's a simple API and we tend to use the overnight CSV by setting up a cronjob.

curl "

or PYTHON

import requests

x = requests.get(")

print (x.text)


Can I cancel an Order with OrderState "ApiPending"?

 

I have one question regarding the Order State "ApiPending"

ApiPending - indicates order has not yet been sent to IB server, for instance if there is a delay in receiving the security definition. Uncommonly received.

An order with ApiPending has been not yet transmitted to the IB server. How can I cancel such an order (which is not really a confirmed order)? Only published (and not fully executed) orders are cancelable. Or?


Re: IBKR Lite?

Nick
 

¿ªÔÆÌåÓý

I would submit you're looking at it backwards.

By definition you have identified numerous unprofitable trading systems since in real life commissions exist.

You need to find a strategy that works given unavoidable overhead - commissions and slippage being primary costs.


On 5/21/2021 4:00 PM, Patrick C wrote:

Its been wild now I can back test 15 years of data in 30 seconds.. how many good trading systems I have discovered that produce beautiful PL curves... but get absolutely destroyed by commissions and makes me think, that's the edge. Getting rid of all the fees and commissions


Re: IBKR Lite?

 

Its been wild now I can back test 15 years of data in 30 seconds.. how many good trading systems I have discovered that produce beautiful PL curves... but get absolutely destroyed by commissions and makes me think, that's the edge. Getting rid of all the fees and commissions


Re: TWS API earning dates..

 

You have to subscribe to the WSH data feed in market subscriptions.? Then call:

reqFundamentals(contract, FundamentalType.CalendarReport, handler);

The handler will get back a big string of XML you can parse to get the event feed.? The TWS documentation for this functionality isn't very good.? I wasn't able to find a good page to give you a link.? But reqFundaments (in the Java API) or reqFundamentalData (in the EClient) is what you want.

Hunter


On Friday, May 21, 2021, 12:32:38 PM PDT, <rajsekar37@...> wrote:


?. Does anyone know how to access this either in TWS and also In API?


Re: IBKR Lite?

 

You must be a broker-dealer integrated technically and contractually with the financial trading and clearing infrastructure to join an exchange. E.g. per NYSE Website, "Membership is available to registered and new U.S. based broker-dealers who obtain a Self Regulatory Organization (SRO) and have an established connection to a clearing firm. Individual investors are not eligible."

I would speculate Bridgewater hardly qualifies. That said, they sure must have special arrangements with brokers, market-makers and whatnot to help them optimize their trading and holding costs.


ExecutionFilter for "live" executions

 

Is it possible (how?) to define an executionFilter for the streaming executions one receives. I mean I never call reqExecutions which takes the filter as an attribute.


Re: TWS API earning dates..

 

?. Does anyone know how to access this either in TWS and also In API?


Re: IBKR Lite?

 

No, directed route is not that. Directed route is a term made by IB and all those transactions still goes through IB and then to that exact exchange.

What I said earlier is some allow to directly place order to exchange via exchange API maybe instead of broker.

Also, here is why this is important:
IB itself, citadel, or others who have access to order flow may buy your position or sell you while knowing the full tape information and hence saturating the market to effect your decision of setting a limit price. So really, is a limit price really the best limit price or one was manipulated to think it is? What if the buy or sell speed slope was much slower or faster but that info is not provided? So many ifs here.

IB forex market is totally its own and so manipulations happens. But then again it happens at all brokers. Some do it with decimal places some do it with order flow selling. This is why order flow selling is a talking point.

IB interestingly list d its own stock on an exchange that charged much lower rates while back and asked everyone else to jump on to the high precision low commission exchange but no one else did. Maybe it was a bait but they failed and came back to NYSE or whoever they are with now.

On Fri, May 21, 2021, 2:10 PM §¡§Ý§Ö§Ü§ã§Ñ§ß§Õ§â §¹§Ö§â§ß§Ú§Ü§à§Ó <me@...> wrote:
IB is actually both - you can direct your order to some venue or choose to get routed via SMART - then you can be filled anywhere.
If you are setting a limit price - do you care where you get executed? (you can be routed to some major exchange and your counterparty could be citadel anyway)


On Fri, May 21, 2021 at 7:53 PM Bruce B <bruceb444@...> wrote:
Really, they sell to citadel too? I thought they don't. Or maybe pro order flow doesn't get sold?

Some brokers(?) allow you to directly place orders to exchange apparently. Think HFT. IBKR is not that. Not sure which ones but apparently exist. They may or may not have a lower effective rate of commission.

What most people don't realize is that effective commission rate is much higher than posted rates when it comes to a winning strategy.


On Fri, May 21, 2021, 9:57 AM Patrick C <zenfiretrading@...> wrote:
I tried to delete the message but guess I cant delete the whole thread. I called IB, they said no API support and the order flow is routed to Citadel. That's all I needed to hear LOL



--
Best regards,
Chernikov Aleksandr,
e-mail:?me@...
skype:?
RU:?+7-904-179-49-78


Re: IBKR Lite?

 

Yeah IB is both, IBKR-PRO doesn't get the order flow sold.?

Bruce what would be an example of "effective commission rate is much higher then posted rates when it comes to a winning strategy?"


Re: IBKR Lite?

 

IB is actually both - you can direct your order to some venue or choose to get routed via SMART - then you can be filled anywhere.
If you are setting a limit price - do you care where you get executed? (you can be routed to some major exchange and your counterparty could be citadel anyway)


On Fri, May 21, 2021 at 7:53 PM Bruce B <bruceb444@...> wrote:
Really, they sell to citadel too? I thought they don't. Or maybe pro order flow doesn't get sold?

Some brokers(?) allow you to directly place orders to exchange apparently. Think HFT. IBKR is not that. Not sure which ones but apparently exist. They may or may not have a lower effective rate of commission.

What most people don't realize is that effective commission rate is much higher than posted rates when it comes to a winning strategy.


On Fri, May 21, 2021, 9:57 AM Patrick C <zenfiretrading@...> wrote:
I tried to delete the message but guess I cant delete the whole thread. I called IB, they said no API support and the order flow is routed to Citadel. That's all I needed to hear LOL



--
Best regards,
Chernikov Aleksandr,
e-mail:?me@...
skype:?
RU:?+7-904-179-49-78


Re: IBKR Lite?

 

Really, they sell to citadel too? I thought they don't. Or maybe pro order flow doesn't get sold?

Some brokers(?) allow you to directly place orders to exchange apparently. Think HFT. IBKR is not that. Not sure which ones but apparently exist. They may or may not have a lower effective rate of commission.

What most people don't realize is that effective commission rate is much higher than posted rates when it comes to a winning strategy.


On Fri, May 21, 2021, 9:57 AM Patrick C <zenfiretrading@...> wrote:
I tried to delete the message but guess I cant delete the whole thread. I called IB, they said no API support and the order flow is routed to Citadel. That's all I needed to hear LOL