Comments (10)
I didn't see these yesterday, but looking at todays logs there are a whole bunch of errors that look similar:
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibContractPositionData'} Reqid 79679: 354 Requested market data is not subscribed. for None
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibFuturesInstrumentData'} Reqid 79679: 354 Requested market data is not subscribed. for None
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibFuturesContractData'} Reqid 79679: 354 Requested market data is not subscribed. for None
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibFuturesContractPriceData'} Reqid 79679: 354 Requested market data is not subscribed. for None
2023-08-23 04:30:29 ERROR ib_insync.wrapper Error 300, reqId 79679: Can't find EId with tickerId:79679
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibContractPositionData'} Reqid 79679: 300 Can't find EId with tickerId:79679 for None
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibFuturesInstrumentData'} Reqid 79679: 300 Can't find EId with tickerId:79679 for None
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibFuturesContractData'} Reqid 79679: 300 Can't find EId with tickerId:79679 for None
2023-08-23 04:30:29 DEBUG stack_handler {'component': 'ibFuturesContractPriceData'} Reqid 79679: 300 Can't find EId with tickerId:79679 for None
2023-08-23 04:30:29 INFO arctic.serialization.numpy_records Index has no name, defaulting to 'index'
from pysystemtrade.
Perhaps an update to the IB API which I'm not seeing? What happens if you run native ibinsync?
Following checks the contract expiry for robusta
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ib_insync import *
>>> util.startLoop()
>>>
>>> import logging
>>> # util.logToConsole(logging.DEBUG)
>>>
>>> ib = IB()
>>> ib.connect('127.0.0.1',4001,clientId=99999)
<IB connected to 127.0.0.1:4001 clientId=99999>
>>> f = Future('D',exchange='ICEEUSOFT')
>>> c = ib.reqContractDetails(f)
>>> c[0].contract.lastTradeDateOrContractMonth
'20230925'
from pysystemtrade.
Thanks for that snippet, very useful
ContractDetails(contract=Contract(secType='FUT', conId=553444806, symbol='D', lastTradeDateOrContractMonth='20231124 12:30:00 GB', multiplier='10', exchange='ICEEUSOFT', currency='USD', localSymbol='RCX3', tradingClass='RC'), marketName='RC', minTick=1.0, orderTypes='ACTIVETIM,AD,ADJUST,ALERT,ALGO,ALLOC,AVGCOST,BASKET,BENCHPX,COND,CONDORDER,DAY,DEACT,DEACTDIS,DEACTEOD,GAT,GTC,GTD,GTT,HID,ICE,IOC,LIT,LMT,MIT,MKT,MTL,NGCOMB,NONALGO,OCA,OPENCLOSE,PEGBENCH,SCALE,SCALERST,SNAPMID,SNAPMKT,SNAPREL,STP,STPLMT,TRAIL,TRAILLIT,TRAILLMT,TRAILMIT,WHATIF', validExchanges='ICEEUSOFT', priceMagnifier=1, underConId=27655507, longName='Robusta Coffee', contractMonth='202311', industry='', category='', subcategory='', timeZoneId='GB-Eire', tradingHours='20230823:0900-20230823:1730;20230824:0900-20230824:1730;20230825:0900-20230825:1730', liquidHours='20230823:0900-20230823:1730;20230824:0900-20230824:1730;20230825:0900-20230825:1730', evRule='', evMultiplier=0, mdSizeMultiplier=1, aggGroup=2147483647, underSymbol='D', underSecType='IND', marketRuleIds='33', secIdList=[], realExpirationDate='20231124', lastTradeTime='Eire', stockType='', minSize=1.0, sizeIncrement=1.0, suggestedSizeIncrement=1.0, cusip='', ratings='', descAppend='', bondType='', couponType='', callable=False, putable=False, coupon=0, convertible=False, maturity='', issueDate='', nextOptionDate='', nextOptionType='', nextOptionPartial=False, notes='')
lastTradeDateOrContractMonth='20231124 12:30:00 GB'
So where is that date format coming from, could be a user preference or something?
from pysystemtrade.
For realExpirationDate
the date format is consistent in both
from pysystemtrade.
What gateway version are you running? 10.23 here
from pysystemtrade.
Same 10.23
from pysystemtrade.
hmmm. I can identify EURIBOR-ICE with 202509, but not 20250900
>>> euribor = Future('I',exchange='ICEEU',lastTradeDateOrContractMonth='20250900')
>>> c = ib.reqContractDetails(euribor)
Error 200, reqId 3: Invalid value in field # 541, contract: Future(symbol='I', lastTradeDateOrContractMonth='20250900', exchange='ICEEU')
>>> euribor = Future('I',exchange='ICEEU',lastTradeDateOrContractMonth='202509')
>>> c = ib.reqContractDetails(euribor)
>>> c[0]
ContractDetails(contract=Contract(secType='FUT', conId=383665193, symbol='I', lastTradeDateOrContractMonth='20250915 10:00:00 GB', multiplier='2500', exchange='ICEEU', currency='EUR', localSymbol='IU5', tradingClass='I'), marketName='I', minTick=0.005, orderTypes='ACTIVETIM,AD,ADJUST,ALERT,ALGO,ALLOC,AVGCOST,BASKET,BENCHPX,COND,CONDORDER,DAY,DEACT,DEACTDIS,DEACTEOD,GAT,GTC,GTD,GTT,HID,ICE,IOC,LIT,LMT,MIT,MKT,MTL,NGCOMB,NONALGO,OCA,OPENCLOSE,PEGBENCH,REL,RELPCTOFS,SCALE,SCALERST,SNAPMID,SNAPMKT,SNAPREL,STP,STPLMT,TRAIL,TRAILLIT,TRAILLMT,TRAILMIT,WHATIF', validExchanges='ICEEU', priceMagnifier=1, underConId=12148668, longName='3 Month EURIBOR Interest Rate', contractMonth='202509', industry='', category='', subcategory='', timeZoneId='GB-Eire', tradingHours='20230823:0100-20230823:2100;20230824:0100-20230824:2100;20230825:0100-20230825:2100;20230826:CLOSED;20230827:CLOSED;20230828:0100-20230828:2100', liquidHours='20230823:0100-20230823:2100;20230824:0100-20230824:2100;20230825:0100-20230825:2100;20230826:CLOSED;20230827:CLOSED;20230828:0100-20230828:2100', evRule='', evMultiplier=0, mdSizeMultiplier=1, aggGroup=2147483647, underSymbol='I', underSecType='IND', marketRuleIds='57', secIdList=[], realExpirationDate='20250915', lastTradeTime='Eire', stockType='', minSize=1.0, sizeIncrement=1.0, suggestedSizeIncrement=1.0, cusip='', ratings='', descAppend='', bondType='', couponType='', callable=False, putable=False, coupon=0, convertible=False, maturity='', issueDate='', nextOptionDate='', nextOptionType='', nextOptionPartial=False, notes='')
Ignore that, it works with 20250915
from pysystemtrade.
Same gateway version implies it's a TWS setting or user preference problem.
from pysystemtrade.
Yep. There's a Gateway config setting Send instrument specific attributes for dual-mode API client in with possible values operator timezone, instrument timezone, UTC. instrument timezone sends the weird format, the other two use the expected. Thank you for your help
I'll wait and check trades go through before closing
from pysystemtrade.
All good, closing. Thanks again
A couple of nice to have ideas that would make dealing with this sort of thing easier in future:
- The option to also delete child orders when deleting an order via Interactive order stack (4, 41)
- An email warning if a broker order gets repeatedly cancelled by the broker
from pysystemtrade.
Related Issues (20)
- Hold turnover calculation HOT 1
- stack handler crash - creating contract orders from instrument orders HOT 1
- Close order did not work as expected HOT 4
- Error splitting passive roll order HOT 1
- Repeatedly "Sending order ((Order ID:230) Type best for _ROLL_PSEUDO_STRATEGY/......" HOT 6
- modify auto roll code so rolls adjusted if price contract has expired HOT 2
- add correlations to duplicate markets
- remove markets report points out double counting of bad/stale/ignored/trading restriction markets
- Another trade_qty, integer issue HOT 1
- Sending Reports by Email HOT 3
- Stack Handler Crash
- Stack Handler Crash Not Resolved HOT 8
- missing get_demeanded_factor_value HOT 1
- private_config_trading_hours.yaml gets deleted by run_cleaners HOT 3
- Crash on Futures when the last Contract is expired HOT 2
- (?) csvFuturesSimData' object has no attribute 'get_instrument_object_with_meta_data HOT 1
- using current python (3.11) and current everything else is possible HOT 2
- span or com? HOT 1
- Manually setting capital for has errors with parquet HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysystemtrade.