¿ªÔÆÌåÓý

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

Securities for this order were not immediately available for short sale, but not asking to short...


 

Hi,
I've been receiving this error for a long time now.
Can't find anything online regarding this issue.
?
?
In this example:
I buy 2 stocks.
I have 1 Sell OCA group with 3 orders.
I have 1 other Sell OCA group with 4 orders.
?

Any help would be much appreciated.

Thanks
?


 

@patrick.lapointe We currently have two separate OCA related topics. Let's keep your issue in this topic you created.

Which of the three are you using? It sounds like you may have a possible "overfill" situation. Two orders want to sell one unit each so that your long position of one unit would become a short position of one unit

Also, is this just an OCA with three or four independent orders, or is this a bracket order with one or more parent/child relationships?

The screen grab in your reply /g/twsapi/message/54115 suggests that you have two orders with exactly the same trigger price in OCA:

  • one LMT order at $2.24
  • one STP LMT order at $2.24

Not quite sure what you are trying to do, but I have the feeling that is part of the problem.

´³¨¹°ù²µ±ð²Ô

?

?

?

On Tue, Apr 22, 2025 at 12:20 PM, <patrick.lapointe@...> wrote:

Hi,
?
Thanks for your reply.
?
I don't have any errors/warnings.
I log all errors coming from IBKR server and there are none for that order and/or OCA Group.
?
TWS version id Trader Workstation 10.35.1g April 3 2025 17:26:33.
?

All orders have same TimeZone settings. Most orders are fine.

?

Seems as this error message is possibly the wrong error message?

?

The other error message I get that's similar but not the same is:

Rejected by System: The contract is not available for short sale.

?

?

If can try another TWS version if you think it could resolve my issue.

?

?

Thanks a lot

?

?


 

Hi,
?
Pretty sure both messages are the same issue.
?
The STP LMT 2.24$ order is active right away.
The LMT 2.24$ order becomes active in 20min(Now+20min).
?
To explain why several OCA orders, I'm gathering stats on different OCA group scenarios.
?
OCA group is supposed to cancel all other orders if 1 order is filled right?
So how is it possible to sell more than 1 order within 1 OCA group?
?
?
Thanks


 

You might want to read up on OCA details. Exchanges generally do not have native OCA implementations, so IBKR simulates them within their system. Only OCA types 1 and 2 ("with block") assure that no overfill can take place by pacing one and only one order at the exchange at a time. But possibly at the expense of reaction time when one of the other orders in the OCA triggers.

OCA type 3 routes multiple orders to the exchange and might result in overfill.

´³¨¹°ù²µ±ð²Ô

?

On Tue, Apr 22, 2025 at 02:45 PM, <patrick.lapointe@...> wrote:

Hi,
?
Pretty sure both messages are the same issue.
?
The STP LMT 2.24$ order is active right away.
The LMT 2.24$ order becomes active in 20min(Now+20min).
?
To explain why several OCA orders, I'm gathering stats on different OCA group scenarios.
?
OCA group is supposed to cancel all other orders if 1 order is filled right?
So how is it possible to sell more than 1 order within 1 OCA group?
?
?
Thanks


 

I had already looked at the documentation, I could of missed something or just misunderstood.
?
Can I specify the 'type' ?
?
Would type 1 or 2 be the only way to do what I'm trying to do ?
1 OCA group with 3 orders. I want 1 sell to cancel all other orders...
?
?
Thanks


 

You control the OCA behavior with the field in each order object. The default value is 0, which let's IBKR pick the mode. Check the Order objects you receive from openOrder() callbacks or set the field explicitly to:
1 for "Cancel all remaining orders with block."
or
2 for "Remaining orders are proportionately reduced in size with block."
?
Type 1 sounds like what you want to go with.
?
´³¨¹°ù²µ±ð²Ô
?
On Tue, Apr 22, 2025 at 03:10 PM, <patrick.lapointe@...> wrote:

I had already looked at the documentation, I could of missed something or just misunderstood.
?
Can I specify the 'type' ?
?
Would type 1 or 2 be the only way to do what I'm trying to do ?
1 OCA group with 3 orders. I want 1 sell to cancel all other orders...
?
?
Thanks


 

Just checked the code, all OCAType=1 for all orders in all OCA groups.
?
Could they still be crossing somehow?
?
Is having 3 orders in 1 OCA group an issue?
I had read it wasn't.
?
Pretty sure this never happened when I only had 2 orders in 1 OCA group.


 

The number of orders in the OCA does not matter (other than the max number of open orders for one instrument which was 20 at one time).

I am still not sure what the IBKR OCA implementation does when it sees two different orders (LMT and STP LMT) with the same trigger price. Even if one of them has a time condition.

´³¨¹°ù²µ±ð²Ô

?

On Tue, Apr 22, 2025 at 03:24 PM, <patrick.lapointe@...> wrote:

Just checked the code, all OCAType=1 for all orders in all OCA groups.
?
Could they still be crossing somehow?
?
Is having 3 orders in 1 OCA group an issue?
I had read it wasn't.
?
Pretty sure this never happened when I only had 2 orders in 1 OCA group.


 

OK, well if 'same price' could be an issue I can certainly change that, just put 0.01$ difference and see if that resolves my issue.
I'll start there and post back.
Thanks


 

Changing the price so all orders have different prices doesn't change anything.
Here is an example of this morning where 3 OCA groups on 3 have the same issue.
Bought 3 stocks, trying to sell 1 stock in each OCA group with all orders having OcaType=1.
Any help would be much appreciated.
Thanks
?