¿ªÔÆÌåÓý

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

Re: unexpected keyword argument 'conid' in Contract()

 
Edited

Case sensitive bro! conId?


unexpected keyword argument 'conid' in Contract()

 

In the there is an example:?
Contract(conId=270639)
which should return a Contract Object. But I got the error:
Traceback (most recent call last):
? File "...\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
? ? exec(code_obj, self.user_global_ns, self.user_ns)
? File "<ipython-input-23-8d88e504d067>", line 1, in <module>
? ? Contract(conid=270639)
TypeError: Contract.__init__() got an unexpected keyword argument 'conid'

In the source:
...
@staticmethod
def create(**kwargs) -> "Contract":
"""
Create and a return a specialized contract based on the given secType,
or a general Contract if secType is not given.
"""
...
is no conId.

I thought if I have a conId, I dont need any further Contract description.

Am I wrong or is it a bug?

Regards
Hans


Re: Quantity for MIDPRICE orders

 

Correct. But it is possible for forex pairs. You can specify quantity in Cash. Using cashQty field of order. This is to specify the quantity in second currency in pair.


On Fri, 5 Jul, 2024, 08:39 biney59 via , <biney59=[email protected]> wrote:
No, the API does not provide it directly. You need to get your cash amount and calculate yourself.


Re: Incorrect positionEvents received

 

It's not necessarily a bug, but rather how the events are sent.

orderStatusEvent is also my go to after finding similar patterns like you.


Re: Quantity for MIDPRICE orders

 

No, the API does not provide it directly. You need to get your cash amount and calculate yourself.

https://ib-api-reloaded.github.io/ib_async/api.html#ib_async.ib.IB.accountValues


Quantity for MIDPRICE orders

 

Hello,

When placing a Midprice order via the TWS API, I do not have the quantity, since the actual price isn't known yet. But I do have the $ amount to use for the order.

I know that TWS, mobile app etc. allow placing the order using $ amount, and then the app calculates the quantity, rounded down to the nearest integer. Is this also possible via the API i.e. provide the $ amount instead of quantity?

Thank you!


Re: Incorrect positionEvents received

 

As a workaround I started verifying if the positionEvent or execDetailsEvent received matches the last verified position plus any fills since then. This is an improvement and caught some cases, but I saw one instance where I did not receive either a positionEvent or an execDetailsEvent after the second of two partial fills, but did receive an orderStatusEvent with the full fill. I will start using those in the verification as well. Also, I somehow missed the trade.fillEvent, thanks for that tip, I will start handling that as well, hopefully it is reliable.

This seems to only happen on rapid subsequent partial fills. I will look at filing an issue with ib-api-reloaded and hopefully someone can give me pointers on how to debug it further.


Re: Sell orders executing as soon as I buy

 



These are the ones. They assume the default method if not set.?
I think then mostly the problem is your prices. Some of the prices must be such that order's SL hits quickly?

On Thu, Jul 4, 2024 at 11:49?AM Pranav Lal via <pranav=[email protected]> wrote:

Hi Pratik,

?

I do have the trigger price set but not trigger method. I have not encountered this field before, what are its possible values?

?

Pranav

?

From: [email protected] <[email protected]> On Behalf Of Pratik Babhulkar
Sent: Thursday, July 4, 2024 9:15 PM
To: [email protected]
Subject: Re: [ib-async] Sell orders executing as soon as I buy

?

You need to add lines for?

triggerPrice and triggerMethod for stop order. I think that is unset.?

And check the prices again.

?

Last resort, place an order manually from IBKR TWS and then check the order object from API to know what exactly is needed in the order that you send.

?

That works

?

Pratik Babhulkar

?

On Thu, Jul 4, 2024 at 9:45?AM Pranav Lal via <pranav=[email protected]> wrote:

Hi all,

I am running a strategy, but my sell orders are being executed as soon as
the buy orders are placed.

I am trying to use trailing stop orders, but suspect am making an error
somewhere.
I did read the thread at
/g/twsapi/topic/trail_limit_orders/34461744 but it did not
help. Yes, the problem was different, but I was hoping I would get some
ideas.
Here is the order placing code.

while not output_queue.empty():
? ? ? ? ? ? ? ? strategy_outputs.append(output_queue.get())

? ? ? ? for output in strategy_outputs:
? ? ? ? ? ? ? ? contract = output["contract"]
? ? ? ? ? ? ? ? trigger_price = round_to_multiple(output["stop_loss_price"],
broker_multiple, "nearest")
? ? ? ? ? ? ? ? price_upper_limit = 800? # Avoid buying too expensive stocks
? ? ? ? ? ? ? ? order_quantity = 5
? ? ? ? ? ? ? ? ltp = output["last_closing_price"]
? ? ? ? ? ? ? ? current_cash = getCash("U8034364")
? ? ? ? ? ? ? ? amount_required_for_transaction = order_quantity * ltp

? ? ? ? ? ? ? ? if output["current_signal"] == 1 and contract not in
[i.contract for i in ib.openTrades()] and contract not in [i.contract for i
in ib.positions()]:
? ? ? ? ? ? ? ? ? ? ? ? if current_cash > amount_required_for_transaction
and ltp < price_upper_limit:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # We have the money, so buy the stock
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order = LimitOrder("BUY",
order_quantity, ltp, outsideRth=True, transmit=False)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order.orderId = ib.client.getReqId()
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order = StopOrder("SELL",
order_quantity, trigger_price, parentId=parent_order.orderId, transmit=True)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.tif = "GTC"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.orderId =
ib.client.getReqId()
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedOrderType = "TRAIL"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? trail_amount = 0.08
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedTrailingAmount =
trail_amount
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedStopPrice =
trigger_price
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_trade = ib.placeOrder(contract,
parent_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_trade = ib.placeOrder(contract,
stop_loss_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? print("bought ",contract.symbol)
? ? ? ? ? ? ? ? elif output["current_signal"] == -1 and contract in
[i.contract for i in ib.positions()]:
? ? ? ? ? ? ? ? ? ? ? ? # Time to sell
? ? ? ? ? ? ? ? ? ? ? ? positions = ib.positions()
? ? ? ? ? ? ? ? ? ? ? ? for p in positions:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if p.contract == contract:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order_quantity = p.position
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order_price =
output["last_closing_price"]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order = LimitOrder("SELL",
order_quantity, order_price, outsideRth=True)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_trade =
ib.placeOrder(contract, parent_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? print("sold ",contract.symbol)

? ? ? ? ? ? ? ? ib.sleep(5)? # Cater to IB data downloading restrictions

? ? ? ? ib.disconnect()

? ? ? ? with
open('reports/signal_file_daily_kalman_crossover_long_only_runner.csv', 'w',
newline='') as f:
? ? ? ? ? ? ? ? writer = csv.writer(f)
? ? ? ? ? ? ? ? if strategy_outputs:
? ? ? ? ? ? ? ? ? ? ? ? writer.writerow(strategy_outputs[0].keys())
? ? ? ? ? ? ? ? ? ? ? ? for dictionary in strategy_outputs:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? writer.writerow(dictionary.values())

? ? ? ? print("Kalman crossover run complete")

Pranav






Re: Sell orders executing as soon as I buy

 

¿ªÔÆÌåÓý

Hi Pratik,

?

I do have the trigger price set but not trigger method. I have not encountered this field before, what are its possible values?

?

Pranav

?

From: [email protected] <[email protected]> On Behalf Of Pratik Babhulkar
Sent: Thursday, July 4, 2024 9:15 PM
To: [email protected]
Subject: Re: [ib-async] Sell orders executing as soon as I buy

?

You need to add lines for?

triggerPrice and triggerMethod for stop order. I think that is unset.?

And check the prices again.

?

Last resort, place an order manually from IBKR TWS and then check the order object from API to know what exactly is needed in the order that you send.

?

That works

?

Pratik Babhulkar

?

On Thu, Jul 4, 2024 at 9:45?AM Pranav Lal via <pranav=[email protected]> wrote:

Hi all,

I am running a strategy, but my sell orders are being executed as soon as
the buy orders are placed.

I am trying to use trailing stop orders, but suspect am making an error
somewhere.
I did read the thread at
/g/twsapi/topic/trail_limit_orders/34461744 but it did not
help. Yes, the problem was different, but I was hoping I would get some
ideas.
Here is the order placing code.

while not output_queue.empty():
? ? ? ? ? ? ? ? strategy_outputs.append(output_queue.get())

? ? ? ? for output in strategy_outputs:
? ? ? ? ? ? ? ? contract = output["contract"]
? ? ? ? ? ? ? ? trigger_price = round_to_multiple(output["stop_loss_price"],
broker_multiple, "nearest")
? ? ? ? ? ? ? ? price_upper_limit = 800? # Avoid buying too expensive stocks
? ? ? ? ? ? ? ? order_quantity = 5
? ? ? ? ? ? ? ? ltp = output["last_closing_price"]
? ? ? ? ? ? ? ? current_cash = getCash("U8034364")
? ? ? ? ? ? ? ? amount_required_for_transaction = order_quantity * ltp

? ? ? ? ? ? ? ? if output["current_signal"] == 1 and contract not in
[i.contract for i in ib.openTrades()] and contract not in [i.contract for i
in ib.positions()]:
? ? ? ? ? ? ? ? ? ? ? ? if current_cash > amount_required_for_transaction
and ltp < price_upper_limit:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # We have the money, so buy the stock
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order = LimitOrder("BUY",
order_quantity, ltp, outsideRth=True, transmit=False)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order.orderId = ib.client.getReqId()
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order = StopOrder("SELL",
order_quantity, trigger_price, parentId=parent_order.orderId, transmit=True)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.tif = "GTC"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.orderId =
ib.client.getReqId()
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedOrderType = "TRAIL"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? trail_amount = 0.08
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedTrailingAmount =
trail_amount
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedStopPrice =
trigger_price
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_trade = ib.placeOrder(contract,
parent_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_trade = ib.placeOrder(contract,
stop_loss_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? print("bought ",contract.symbol)
? ? ? ? ? ? ? ? elif output["current_signal"] == -1 and contract in
[i.contract for i in ib.positions()]:
? ? ? ? ? ? ? ? ? ? ? ? # Time to sell
? ? ? ? ? ? ? ? ? ? ? ? positions = ib.positions()
? ? ? ? ? ? ? ? ? ? ? ? for p in positions:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if p.contract == contract:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order_quantity = p.position
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order_price =
output["last_closing_price"]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order = LimitOrder("SELL",
order_quantity, order_price, outsideRth=True)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_trade =
ib.placeOrder(contract, parent_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? print("sold ",contract.symbol)

? ? ? ? ? ? ? ? ib.sleep(5)? # Cater to IB data downloading restrictions

? ? ? ? ib.disconnect()

? ? ? ? with
open('reports/signal_file_daily_kalman_crossover_long_only_runner.csv', 'w',
newline='') as f:
? ? ? ? ? ? ? ? writer = csv.writer(f)
? ? ? ? ? ? ? ? if strategy_outputs:
? ? ? ? ? ? ? ? ? ? ? ? writer.writerow(strategy_outputs[0].keys())
? ? ? ? ? ? ? ? ? ? ? ? for dictionary in strategy_outputs:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? writer.writerow(dictionary.values())

? ? ? ? print("Kalman crossover run complete")

Pranav






Re: Sell orders executing as soon as I buy

 

You need to add lines for?
triggerPrice and triggerMethod for stop order. I think that is unset.?
And check the prices again.

Last resort, place an order manually from IBKR TWS and then check the order object from API to know what exactly is needed in the order that you send.

That works

Pratik Babhulkar

On Thu, Jul 4, 2024 at 9:45?AM Pranav Lal via <pranav=[email protected]> wrote:
Hi all,

I am running a strategy, but my sell orders are being executed as soon as
the buy orders are placed.

I am trying to use trailing stop orders, but suspect am making an error
somewhere.
I did read the thread at
/g/twsapi/topic/trail_limit_orders/34461744 but it did not
help. Yes, the problem was different, but I was hoping I would get some
ideas.
Here is the order placing code.

while not output_queue.empty():
? ? ? ? ? ? ? ? strategy_outputs.append(output_queue.get())

? ? ? ? for output in strategy_outputs:
? ? ? ? ? ? ? ? contract = output["contract"]
? ? ? ? ? ? ? ? trigger_price = round_to_multiple(output["stop_loss_price"],
broker_multiple, "nearest")
? ? ? ? ? ? ? ? price_upper_limit = 800? # Avoid buying too expensive stocks
? ? ? ? ? ? ? ? order_quantity = 5
? ? ? ? ? ? ? ? ltp = output["last_closing_price"]
? ? ? ? ? ? ? ? current_cash = getCash("U8034364")
? ? ? ? ? ? ? ? amount_required_for_transaction = order_quantity * ltp

? ? ? ? ? ? ? ? if output["current_signal"] == 1 and contract not in
[i.contract for i in ib.openTrades()] and contract not in [i.contract for i
in ib.positions()]:
? ? ? ? ? ? ? ? ? ? ? ? if current_cash > amount_required_for_transaction
and ltp < price_upper_limit:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # We have the money, so buy the stock
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order = LimitOrder("BUY",
order_quantity, ltp, outsideRth=True, transmit=False)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order.orderId = ib.client.getReqId()
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order = StopOrder("SELL",
order_quantity, trigger_price, parentId=parent_order.orderId, transmit=True)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.tif = "GTC"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.orderId =
ib.client.getReqId()
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedOrderType = "TRAIL"
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? trail_amount = 0.08
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedTrailingAmount =
trail_amount
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_loss_order.adjustedStopPrice =
trigger_price
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_trade = ib.placeOrder(contract,
parent_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? stop_trade = ib.placeOrder(contract,
stop_loss_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? print("bought ",contract.symbol)
? ? ? ? ? ? ? ? elif output["current_signal"] == -1 and contract in
[i.contract for i in ib.positions()]:
? ? ? ? ? ? ? ? ? ? ? ? # Time to sell
? ? ? ? ? ? ? ? ? ? ? ? positions = ib.positions()
? ? ? ? ? ? ? ? ? ? ? ? for p in positions:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if p.contract == contract:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order_quantity = p.position
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? order_price =
output["last_closing_price"]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_order = LimitOrder("SELL",
order_quantity, order_price, outsideRth=True)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? parent_trade =
ib.placeOrder(contract, parent_order)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? print("sold ",contract.symbol)

? ? ? ? ? ? ? ? ib.sleep(5)? # Cater to IB data downloading restrictions

? ? ? ? ib.disconnect()

? ? ? ? with
open('reports/signal_file_daily_kalman_crossover_long_only_runner.csv', 'w',
newline='') as f:
? ? ? ? ? ? ? ? writer = csv.writer(f)
? ? ? ? ? ? ? ? if strategy_outputs:
? ? ? ? ? ? ? ? ? ? ? ? writer.writerow(strategy_outputs[0].keys())
? ? ? ? ? ? ? ? ? ? ? ? for dictionary in strategy_outputs:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? writer.writerow(dictionary.values())

? ? ? ? print("Kalman crossover run complete")

Pranav







Re: Incorrect

 

Hey honestly, I have always found positionEvent to not be so good and have a lot of latency so I personally keep track of position logic on my own. The most accurate thing is to use and use
trade.fillEvent += 

or ?
ib.execDetailsEvent+=
?to update your positions, BUT be careful since for combos it triggers for the entire combo and for each leg so you also need some logic that?
Fill.contract.secType!='BAG' (if you are only worried about positions)


Re: IB-insync library - how to invoke the priceSizeTick() function

 
Edited

Hey you can use ib.reqTickByTickData and calculate your logic with it... It does return the size of the trade... Try this in Jupyter notebook. I display the last few trades every time a new tick comes...

from IPython.display import display, clear_output

contract = Stock(symbol='TSLA', exchange='SMART', currency='USD')
ib.qualifyContracts(contract)
ticker = ib.reqTickByTickData(contract=contract, tickType='Last', numberOfTicks=0)

all_ticks = []

def onUpdateEvent(ticker):
global all_ticks
all_ticks += [tick for tick in ticker.tickByTicks]
df = util.df(all_ticks)
clear_output()
display(df.tail())

ticker.updateEvent += onUpdateEvent


See at 01:08:00 (1 hour and 8 minutes) I have an example.


Re: IB-insync library - how to invoke the priceSizeTick() function

 

From what you wrote, reqTickByTickData("Last"). It does return "size", but only for "Last". Finally you subscribe to the pendingTickersEvent event to get event on each packets of ticks.


Re: IB-insync library - how to invoke the priceSizeTick() function

 

Hey Adi/Dror

Thank you for your reply.
I'm trying to invoke events that only relates to price change - meaning a trade as been completed.
For example, I want to collect ticker data (timestamp, price, volume, etc') only when a trade in TSLA actually occurred.
ib.reqMktData() returns aggregated ticker data every 250 ms, which includes any tick type event within this time frame (for example, bid or ask change, volume change etc').
According to the docs, priceSizeTick() is suppose to be invoked only when there is a price change (same as 'priceTick' and 'sizeTick' functions in the TWS api).
So who can i do that?

By the way, I'm not sure i can use reqTickByTickData("Last") because it doesn't return the size of the trade in the callback, am i wrong?

Thank you,
Itay


Re: IB-insync library - how to invoke the priceSizeTick() function

 

Just wondering why do you need this? What are you trying to do? Maybe I can help you if I know what you are trying to do.?

I think what you are trying to do has been removed. Maybe you can get what you need by this below??

contract = Stock(symbol='TSLA', exchange='SMART', currency='USD')
ib.qualifyContracts(contract)
ticker = ib.reqMktData(contract=contract,genericTickList="",snapshot=False,regulatorySnapshot=False)

def onUpdateEvent(ticker):
? ? print(ticker)

ticker.updateEvent+=onUpdateEvent


IB-insync library - how to invoke the priceSizeTick() function

 

Hello,

IB-insync is a python library developed to make it easier to work with the TWS api.


https://ib-insync.readthedocs.io/_modules/ib_insync/client.html#

I would like to know how to invoke the method 'priceSizeTick' in the??ib_insync.wrapper class.?
or alternatively how to invoke the 'priceTick' and 'sizeTick' functions. (which are combined in the?'priceSizeTick' function)
Please attach a code script if you can.

Thank you!

Itay


Precautionary settings while sending orders via API

 

Hi guys,?

Not a specific ib_async query but a general query about precautionary settings and API orders.?

I have always bypassed precautionary settings. However, attempted to let the orders go through precautionary settings this time with Total Value Limit of $20k.?
Most of the orders go through fine. However, for some of the orders, I receive error "The Total Value Limit of the following order "ID:XYZ" can not be verified. Restriction is specified in Precautionary Settings of Global Configuration/Presets"

What does this error mean? I am trading SPX Weekly Options and spreads on that. I am placing Spread - Combo - Market Order with IBALGO. The order value is well within $20k. Also, error does not seem to state that "Order Value exceeds the limit". It instead states something like "Value limit can not be verified". Does this mean, somehow, IB server could not get an idea of the Order Value and hence cannot check that precaution pass? And hence it rejects the order?

Anyone else faced similar error and how to circumvent that with precautions in place??

?

Regards,

Pratik Babhulkar


Re: Sponsorship of group

 

¿ªÔÆÌåÓý

Great thanks.? Sorry I'm away for a couple of weeks, but I will get on that as soon as I'm back!

Mel





-------- Original message --------
From: "Sdoof via groups.io" <olivier.vanparys@...>
Date: 2024-06-25 11:37 a.m. (GMT-08:00)
Subject: Re: [ib-async] Sponsorship of group

Great, I have? made a donation. Hope that helps. Is there any update regarding teh archive from ib_insync?


Re: Sponsorship of group

 

Great, I have? made a donation. Hope that helps. Is there any update regarding teh archive from ib_insync?


Re: Same code not work for Hong Kong stock options

 

I'm also getting the 200 error via API. When placing the order via GUI it gives a friendlier message informing me that my account is ineligible to trade the contract; due to sanctions requirements!??!

And, like you, I'm not having any problems with options on other exchanges that I've tried (e.g. CDE, ASX).

So I'm left wondering... did this just start happening on the 12th? Because it seems possible that, even though on SEHK, are somehow having a ripple effect.