开云体育

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

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


Re: IBKR Lite?

 

Yes, commissions are pretty high. Everywhere.

IBKR probably provides the best commissions rates. In forex I am certain of it.

Effective commissions rates fo winners is 20%+ or more I think with IBKR.

On the other hand, with those who don't charge commission, I hear they cheat the buyer seller by selling the supply/demand requests to third parties. So maybe they turn out to be more than 20%.

Its interesting how brokers have almost zero risk. They win from losers and from winners.

Only way you can lower your commission is by making better algorithms maybe.

The only rule I have seen that may suspend or charge you more is if your cancel to completed transactions go over a certain amount.

I can't answer your specific question.

On Fri, May 21, 2021, 9:06 AM Patrick C <zenfiretrading@...> wrote:
I haven't had the chance to test yet or switch my account over. Anyone here hook up to the API with IBKR Lite? I just recently went bust, and I'm going to take a break for a little bit from trading, but my gears are still turning and looking at everything I've been doing all these years. One of the first things I want to change coming back is to drop commissions, and get that drag out of my PL curve.?

I saw on the IBKR Lite page down on the bottom "they can charge you commissions if they find that you are doing "non-retail activity" in your trading". I actually plan on calling them and getting a definitive what they consider non-retail trading. But the first thing that popped in my head is automation.?

Anyways...hope everyone is doing better then me this year. I'm 7 years in, second time going bust. I'm not wealthy by any means.. but I've managed to not have to work over the past 3-4 years and only live off my intra-day trading in the markets. Which I am super grateful for. The break coming up is going to be nice, but I can't wait to get back into the ring! I think commissions are the first thing that's going to go. The amount of money I lost this year, was doubled because of commissions. You think its nothing.. but god damn does it creep up on you.?


Re: IBKR Lite?

 

I'm pretty sure that you cannot be an exchange member if you do not have a proper license.
If you are small - becoming a member would be much more expensive than paying a fee.
You can probably do some OTC deals without (or with minimal fee), but you still would need a counterparty that would accept a trade from you (look up "counterparty risk")

On Fri, May 21, 2021 at 6:39 PM Patrick C <zenfiretrading@...> wrote:
Lets actually continue this topic..this might turn into a good thread actually.. the original question was "Does IBKR Lite allow API access?" And the answer was no, and Goose4All said there is no such thing as "no commissions".?

So I agree.

But my next question is.. how would I get orders to an exchange with out using a broker or paying a commission? Would I have to become my own Broker-Dealer and then buy up an inventory of lets say, E-mini's and just trade them within my own dark pool??

Maybe I am flawed in thinking the Hedge Funds are just normal traders with a workforce of programmers, fancy database collectors, and fancy market modelers all under their employment.. If I had just even a team of 10 people working under me, 3 programmers, 3 people modeling, 3 people collecting information and 1 person overseeing trading... I could only imagine the jump from being a single person doing all of that. I'd imagine it would be huge.

And I also imagine, Bridgewater doesnt pay commissions on its trades.?

Anyone have any actual experience in this realm? Like I said, this could be an interesting topic instead of the usual "something isnt working LOL"

Also I've got a program script that tracks "fill status" if anyone is interesting in checking it out to learn from it for their own programs.??



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


Re: IBKR Lite?

 

Lets actually continue this topic..this might turn into a good thread actually.. the original question was "Does IBKR Lite allow API access?" And the answer was no, and Goose4All said there is no such thing as "no commissions".?

So I agree.

But my next question is.. how would I get orders to an exchange with out using a broker or paying a commission? Would I have to become my own Broker-Dealer and then buy up an inventory of lets say, E-mini's and just trade them within my own dark pool??

Maybe I am flawed in thinking the Hedge Funds are just normal traders with a workforce of programmers, fancy database collectors, and fancy market modelers all under their employment.. If I had just even a team of 10 people working under me, 3 programmers, 3 people modeling, 3 people collecting information and 1 person overseeing trading... I could only imagine the jump from being a single person doing all of that. I'd imagine it would be huge.

And I also imagine, Bridgewater doesnt pay commissions on its trades.?

Anyone have any actual experience in this realm? Like I said, this could be an interesting topic instead of the usual "something isnt working LOL"

Also I've got a program script that tracks "fill status" if anyone is interesting in checking it out to learn from it for their own programs.??


Re: IBKR Lite?

 

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


Re: IBKR Lite?

 

开云体育

and - i know its a bit of a crazy idea, but it didnt cross your mind that there is no such thing as "no commissions"..?

they always get their share, either as a commission or a slightly worse fill price.

On 5/21/21 9:06 AM, Patrick C wrote:

I haven't had the chance to test yet or switch my account over. Anyone here hook up to the API with IBKR Lite? I just recently went bust, and I'm going to take a break for a little bit from trading, but my gears are still turning and looking at everything I've been doing all these years. One of the first things I want to change coming back is to drop commissions, and get that drag out of my PL curve.?

I saw on the IBKR Lite page down on the bottom "they can charge you commissions if they find that you are doing "non-retail activity" in your trading". I actually plan on calling them and getting a definitive what they consider non-retail trading. But the first thing that popped in my head is automation.?

Anyways...hope everyone is doing better then me this year. I'm 7 years in, second time going bust. I'm not wealthy by any means.. but I've managed to not have to work over the past 3-4 years and only live off my intra-day trading in the markets. Which I am super grateful for. The break coming up is going to be nice, but I can't wait to get back into the ring! I think commissions are the first thing that's going to go. The amount of money I lost this year, was doubled because of commissions. You think its nothing.. but god damn does it creep up on you.?


Re: Merging stop loss orders

 

Thank you very much guys. I think you are right. I also don't want to be exposed with no stop loss or too much as mentioned in your posts.
I will stick with two individual stop loss orders then. Thanks again.


Re: Merging stop loss orders

 

开云体育

[I see Nick has beaten me to it, so consider this as an amplification of his much more concise comment.]

?

The safest way, and by far the simplest, is surely to simply keep two stop-loss orders and adjust their prices to be the same. But presumably you don't want to do that because you end up paying two commissions if the stop-loss is hit.

?

Any other approach necessarily involves a period of time where you either have too much or too little stop loss protection.

?

But I think I would favour something like this:

?

  1. Create a new 'emergency' stop-loss for the full amount at a price some distance below your lower existing stop-loss. (How far?
  2. Cancel the existing stop-loss orders.
  3. If you receive a fill for the higher existing order before its cancel status notification arrives, immediately amend the emergency stop-loss size accordingly.
  4. If you receive a fill for the lower existing order before its cancel status notification arrives, immediately cancel the emergency stop-loss.
  5. As soon as you receive the cancel status notification for the lower existing order (ie step 4 hasn't occurred), immediately update the emergency stop-loss price to your desired price.
  6. If step 4 has occurred, you might possibly get a fill for the 'emergency' stop loss before its ?cancel has taken effect. You'd have to be pretty unlucky for this to happen, especially if you priced it low enough initially. But in a 'flash crash' scenario it would be possible, and you'd end up with your original position either partly or fully reversed, depending on the exact sequence of events.

?

This sort of approach, I think, minimises the period of time during which you might end up with an unprotected ?position. ?But you really need to draw up a set of timelines showing every possible event and every sequence they can occur in, to analyse whether it's really providing much benefit.

?

Through all of this you also have to bear in mind that IB doesn't guarantee that stop orders will get filled at all, though the circumstances where they don't are presumably rare and unlikely. ?There is a residual risk in trading that you simply can't get rid of.

?

All things considered, I'd strongly recommend just sticking with the separate stop-loss orders and adjusting them as appropriate. IB's commissions are pretty reasonable, and the logic above is much more complex.

?

Richard

?

?

?

From: [email protected] <[email protected]> On Behalf Of Jan Raddatz
Sent: 21 May 2021 01:40
To: [email protected]
Subject: [TWS API] Merging stop loss orders

?

Hi everyone,

?

I am currently writing an application that allows me to issue orders with attached stop loss as bracket order. I am using it to issue multiple adds for winning trades. My question is:

?

Let's say I've added at 100,- with a stop loss at 99,- and I make another add at 105 with a stop loss at 104,-. I now have two stop loss orders, one at 99 and one at 104. If I wanted to mergen them into a single stop loss order at 104, what would be the best/safest way to do this in your opinion?

?

Thanks a lot in advance.


Re: Merging stop loss orders

Nick
 

开云体育

Changing the stop price from 99 to 104 would be the safest but would leave you with two orders.

Since there are two different oca's I don't think there is a way to prevent a window where you are either unprotected or vulnerable to an overfill.


On 5/20/2021 8:39 PM, Jan Raddatz wrote:

Hi everyone,

I am currently writing an application that allows me to issue orders with attached stop loss as bracket order. I am using it to issue multiple adds for winning trades. My question is:

Let's say I've added at 100,- with a stop loss at 99,- and I make another add at 105 with a stop loss at 104,-. I now have two stop loss orders, one at 99 and one at 104. If I wanted to mergen them into a single stop loss order at 104, what would be the best/safest way to do this in your opinion?

Thanks a lot in advance.


Merging stop loss orders

 

Hi everyone,

I am currently writing an application that allows me to issue orders with attached stop loss as bracket order. I am using it to issue multiple adds for winning trades. My question is:

Let's say I've added at 100,- with a stop loss at 99,- and I make another add at 105 with a stop loss at 104,-. I now have two stop loss orders, one at 99 and one at 104. If I wanted to mergen them into a single stop loss order at 104, what would be the best/safest way to do this in your opinion?

Thanks a lot in advance.