Giter Site home page Giter Site logo

Comments (10)

robcarver17 avatar robcarver17 commented on August 15, 2024

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.

robcarver17 avatar robcarver17 commented on August 15, 2024

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.

bug-or-feature avatar bug-or-feature commented on August 15, 2024

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.

bug-or-feature avatar bug-or-feature commented on August 15, 2024

For realExpirationDate the date format is consistent in both

from pysystemtrade.

robcarver17 avatar robcarver17 commented on August 15, 2024

What gateway version are you running? 10.23 here

from pysystemtrade.

bug-or-feature avatar bug-or-feature commented on August 15, 2024

Same 10.23

from pysystemtrade.

bug-or-feature avatar bug-or-feature commented on August 15, 2024

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.

robcarver17 avatar robcarver17 commented on August 15, 2024

Same gateway version implies it's a TWS setting or user preference problem.

from pysystemtrade.

bug-or-feature avatar bug-or-feature commented on August 15, 2024

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.

bug-or-feature avatar bug-or-feature commented on August 15, 2024

All good, closing. Thanks again

A couple of nice to have ideas that would make dealing with this sort of thing easier in future:

  1. The option to also delete child orders when deleting an order via Interactive order stack (4, 41)
  2. An email warning if a broker order gets repeatedly cancelled by the broker

from pysystemtrade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.