Problem with python and ib future date problem

  Kiến thức lập trình

enter image description hereThe error code how to solve?

Error 478, reqId 63412: Parameters in request conflicts with contract parameters received by contract id: requested expiry 20240627, in contract 20240626;
Canceled order: Trade(contract=ContFuture(conId=570499476, symbol=’MGC’, lastTradeDateOrContractMonth=’20240627′, multiplier=’10’, exchange=’COMEX’, currency=’USD’, localSymbol=’MGCM4′, tradingClass=’MGC’), order=Order(orderId=63412, clientId=66, action=’BUY’, totalQuantity=2, orderType=’MKT’, tif=’GTC’, outsideRth=True), orderStatus=OrderStatus(orderId=63412, status=’Cancelled’, filled=0.0, remaining=0.0, avgFillPrice=0.0, permId=0, parentId=0, lastFillPrice=0.0, clientId=0, whyHeld=”, mktCapPrice=0.0), fills=[], log=[TradeLogEntry(time=datetime.datetime(2024, 4, 12, 0, 52, 0, 99331, tzinfo=datetime.timezone.utc), status=’PendingSubmit’, message=”, errorCode=0), TradeLogEntry(time=datetime.datetime(2024, 4, 12, 0, 52, 0, 814320, tzinfo=datetime.timezone.utc), status=’Cancelled’, message=’Error 478, reqId 63412: Parameters in request conflicts with contract parameters received by contract id: requested expiry 20240627, in contract 20240626;’, errorCode=478)], advancedError=”)
wa

I asked ib cs but can’t fix

New contributor

Michael 12 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT