¿ªÔÆÌåÓý

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

ReqHistoricalTicks() & Futures Data Limitations, Rolling Expiring Contracts

 

Hi all,

The TWS API docs say that 2 years of expired futures contracts is available for historical data. Is that true for tick data? I am wondering if I could actually get multiple years, even 2, of tick data on NQ using this. I assume I would have to write a script to handle contract rolling. I haven't wrote a script yet to get around the max 1,000 data points per request limit, but I saw threads on here discussing how to do just that.

For people who commented on that thread, or anyone with information on acquiring large amounts of affordable tick data, is it even possible to get 2 years worth of tick data on futures contracts like NQ & ES using IB? Assuming I could handle the contract rolling and other necessary steps to format the data. Or should I look to get it another way? Is there any cheap tick data banks even out there? I am only willing to consider that if this option is completely exhausted/impossible.

Thanks,
Brendan


Re: Confusion between "adjustedStopPrice" and "adjustedTrailingAmount" when attaching "Adjusted to Trail" to a Stop order.

 

The adjusted "stop" is when the trailing algorithm is activated. It is thus not a property of the trailing algorithm per se, strictly speaking. Once activated at this "stop" ("trigger" might be a better term perhaps), the algorithm will continuously compute a trailing stop by adding or subtracting the trail amount from current last price, depending on the order side (short/long), but only if the price improves. This is when the trailing amount starts to work. If the price deteriorates, the trailing stop stays the same and can eventually activate the ordered action once penetrated, otherwise it keeps improving as the last traded price improves. Overall it's a pretty complicated scheme which I believe might merit a few test runs in manual and api modes to get a firmer understanding its workings

§á§ä, 15 §ã§Ö§ß§ä. 2023 §Ô., 0:23 amar <amardes21@...>:

Hello,
I have been using a bracket order for stop-loss and profit-takers which has been working fine (C++). Now I want to attach a 'Trailing Stop'? when a specific price is reached. My confusion lies in the setting both attributes "adjustedTrailingAmount" and "adjustedStopPrice".
If I have set the "adjustedTrailingAmount" to say $0.50, why then do I need to set "adjustedStopPrice"?

Also, the does "adjustedTrailingAmount" value need to be positive (e.g. $0.50) for Short positions and negative ($-0.50) for Long positions?

Thanks.


--
Best,
DS


Re: Code: 10314 - Start Date/Time: The date, time, or time-zone entered is invalid

 

On Sun, Sep 17, 2023 at 04:19 AM, Richard L King wrote:
Central

Thank you very much for your help.
I changed the Start Date/Time from "US/Eastern" to "US/Central" in my function call. It works OK now.
Thanks a lot!


Re: Code: 10314 - Start Date/Time: The date, time, or time-zone entered is invalid

 

¿ªÔÆÌåÓý

If you specify a timezone in a historical data request, it has to be either the timezone defined in the contract details, or your local timezone.

?

For INDU, the timezone is US/Central, not US/Eastern.

?

By the way, there are still some contracts that have ¡®old¡¯ timezone identifiers like EST. For these you have to use that value rather than the sensible version ¨C so not US/Eastern where the contract says EST. I believe IB are gradually updating the contract database to use the standard form consistently, but they¡¯re not there yet.

?

It would be sensible for IB to accept any valid timezone designator and convert the end time as appropriate, but the extra two lines of code required are presumably just too much for them¡­

?


Code: 10314 - Start Date/Time: The date, time, or time-zone entered is invalid

 

I used the function ibClient.ClientSocket.reqHistoricalTicks(reqId, contract, "20230911 11:01:00 US/Eastern", "", 50, "Trades",
??????????? 0, false, null) to obtain the historical Time & Sales data of INDU (the Dow Jones 30 index) with following contract
settings:
??????????? contract.Symbol = "INDU";
??????????? contract.SecType = "IND";
??????????? contract.Exchange = "CME";
??????????? contract.Currency = "USD";
But I got the Error: "Code: -1 - Error: Start Date/Time: The date, time, or time-zone entered is invalid. The correct format is yyyymmdd hh:mm:ss xx/xxxx where yyyymmdd and xx/xxxx are optional. E.g.: 20031126 15:59:00 US/Eastern? Note that there is a space between the date and time, and between the time and time-zone.? If no date is specified, current date is assumed. If no time-zone is specified, local time-zone is assumed(deprecated).? You can also provide yyyymmddd-hh:mm:ss time is in UTC. Note that there is a dash between the date and time in UTC notation."

I don't understand this error because My Start Date/Time is "20230911 11:01:00 US/Eastern" which is the exact required format for the API.

What's wrong with my codes?

Thanks in advance.



?


Double counting of Market Data Subscription

 

Hi,
I am trying to subscribe to market data using reqMktData for SPX option chain. When I subscribe to just one option contract, TWS is showing the subscription count as 2 (Alt+Ctrl+=).

Any idea why it is double counting?

Thanks


Re: Market data sharing between Live and Paper account

 

¿ªÔÆÌåÓý

I got another reply from IBKR a couple of hours ago. They just repeated that the issue is with the developers, and stated there is no current timeline for resolution.

?

I responded pointing out that this is a significant matter, not just a trivial inconvenience. I also expressed surprise that they haven¡¯t simply rolled back whatever change they made that caused the problem.

?

I don¡¯t expect to get any meaningful further feedback until some progress is made with fixing the problem.

?

It might be worthwhile others also raising tickets to express their dissatisfaction. (Or it might not¡­)

?


Re: APIPending status?

 

Aha! That certainly looks like a plausible explanation. Thanks, ´³¨¹°ù²µ±ð²Ô! (And Franco!)


Re: APIPending status?

 

A closer look at historical TWS API source code revealed that TWS API version 161 was actually introduced more than two years ago (but less than three) n tws-api-9.85.2 and not 9.72 as I had suggested. We held on to 9.85.2 ourselves until earlier this year when we moved to API 10.19 (version 176) once our client framework and the most important applications properly supported Decimal size fields.

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


On Thu, Sep 14, 2023 at 06:58 PM, ´³¨¹°ù²µ±ð²Ô Reinold wrote:

I suspect it is not since the GoLang API implements TWS API version 161 and we are at 178 now. Version 161 was introduced three years ago around TWS API 972.

Traditionally connecting clients that use "old API versions" worked just fine even if they were talking with brand-spanking-new TWS/IBGW. Client and TWS/IBGW negotiate the highest common API level during connection and limit the features they use to that level. API implementations provided by IBKR have lots of code just to make sure that works.

During the transition from 9xx versions to V10 TWS API, version 163 introduced "fractional sizes" and caused massive changes for all requests and responses that have a size/quantity field (orders, execution, commission, market data, historical data,....). Version 163 changed the data type for all those fields from Integer to Decimal and it was not just another addon-feature that can easily be ignored.

My suspicion is that your issue relates to the missing fractional size support by your client. The only real solution is to implement all missing API features up to and including to 163 (and probably even higher) in the GoLang TWS API implementation.

A short-term work-around may be that you look for the oldest standalone TWS/IBGW you can find. Hopefully that version is more tolerant to pre-163 clients. That may buy you some time to get the GoLang API upgraded but eventually, IBKR will force you to upgrade. I'd start with the current "latest" V10.19.

Massive changes took place in TWS/IBGW over the last three years and I wish I could tell you something else. But we finally moved from API 985 to 10.19 earlier in the year for similar reasons.

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

On Thu, Sep 14, 2023 at 06:06 PM, Franco Chiesa Docampo wrote:
Check if your golang implementation is compatible with the last stable version of TWS or IBGateway.

El 14 sep. 2023, a la(s) 17:46, unclekensson@... escribi¨®:

Connection:
?
{"level":"info","ts":1694722816.2040021,"caller":"[email protected]f1841ded5152/client.go:107","msg":"Connect to client","host":"[hostname].com","port":4002,"clientID":1234}
{"level":"info","ts":1694722816.293527,"caller":"[email protected]f1841ded5152/client.go:177","msg":"HandShake with TWS or GateWay"}
{"level":"info","ts":1694722816.3810427,"caller":"[email protected]f1841ded5152/client.go:223","msg":"handShake info","serverVersion":161}
{"level":"info","ts":1694722816.3811238,"caller":"[email protected]f1841ded5152/client.go:224","msg":"handShake info","connectionTime":"20230914 13:20:17 PST"}
{"level":"info","ts":1694722816.5943294,"caller":"[email protected]f1841ded5152/client.go:272","msg":"HandShake completed"}
{"level":"info","ts":1694722816.5943744,"caller":"[email protected]f1841ded5152/client.go:3047","msg":"run client"}
Order: {"OrderID":212017,"ClientID":1234,"PermID":0,"Action":"BUY","TotalQuantity":10,"OrderType":"MKT","LimitPrice":1.7976931348623157e+308,"AuxPrice":1.7976931348623157e+308,"TIF":"DAY","ActiveStartTime":"","ActiveStopTime":"","OCAGroup":"","OCAType":0,"OrderRef":"","Transmit":true,"ParentID":0,"BlockOrder":false,"SweepToFill":false,"DisplaySize":0,"TriggerMethod":0,"OutsideRTH":false,"Hidden":false,"GoodAfterTime":"","GoodTillDate":"","OverridePercentageConstraints":false,"Rule80A":"","AllOrNone":false,"MinQty":9223372036854775807,"PercentOffset":1.7976931348623157e+308,"TrailStopPrice":1.7976931348623157e+308,"TrailingPercent":1.7976931348623157e+308,"FAGroup":"","FAProfile":"","FAMethod":"","FAPercentage":"","OpenClose":"O","Origin":0,"ShortSaleSlot":0,"DesignatedLocation":"","ExemptCode":-1,"DiscretionaryAmount":0,"ETradeOnly":true,"FirmQuoteOnly":true,"NBBOPriceCap":1.7976931348623157e+308,"OptOutSmartRouting":false,"AuctionStrategy":0,"StartingPrice":1.7976931348623157e+308,"StockRefPrice":1.7976931348623157e+308,"Delta":1.7976931348623157e+308,"StockRangeLower":1.7976931348623157e+308,"StockRangeUpper":1.7976931348623157e+308,"RandomizePrice":false,"RandomizeSize":false,"Volatility":1.7976931348623157e+308,"VolatilityType":9223372036854775807,"DeltaNeutralOrderType":"","DeltaNeutralAuxPrice":1.7976931348623157e+308,"DeltaNeutralContractID":0,"DeltaNeutralSettlingFirm":"","DeltaNeutralClearingAccount":"","DeltaNeutralClearingIntent":"","DeltaNeutralOpenClose":"","DeltaNeutralShortSale":false,"DeltaNeutralShortSaleSlot":0,"DeltaNeutralDesignatedLocation":"","ContinuousUpdate":false,"ReferencePriceType":9223372036854775807,"BasisPoints":1.7976931348623157e+308,"BasisPointsType":9223372036854775807,"ScaleInitLevelSize":9223372036854775807,"ScaleSubsLevelSize":9223372036854775807,"ScalePriceIncrement":1.7976931348623157e+308,"ScalePriceAdjustValue":1.7976931348623157e+308,"ScalePriceAdjustInterval":9223372036854775807,"ScaleProfitOffset":1.7976931348623157e+308,"ScaleAutoReset":false,"ScaleInitPosition":9223372036854775807,"ScaleInitFillQty":9223372036854775807,"ScaleRandomPercent":false,"ScaleTable":"","NotSuppScaleNumComponents":0,"HedgeType":"","HedgeParam":"","Account":"","SettlingFirm":"","ClearingAccount":"","ClearingIntent":"","AlgoStrategy":"","AlgoParams":null,"SmartComboRoutingParams":null,"AlgoID":"","WhatIf":false,"NotHeld":false,"Solictied":false,"ModelCode":"","OrderComboLegs":null,"OrderMiscOptions":null,"ReferenceContractID":0,"PeggedChangeAmount":0,"IsPeggedChangeAmountDecrease":false,"ReferenceChangeAmount":0,"ReferenceExchangeID":"","AdjustedOrderType":"","TriggerPrice":1.7976931348623157e+308,"AdjustedStopPrice":1.7976931348623157e+308,"AdjustedStopLimitPrice":1.7976931348623157e+308,"AdjustedTrailingAmount":1.7976931348623157e+308,"AdjustableTrailingUnit":0,"LimitPriceOffset":1.7976931348623157e+308,"Conditions":null,"ConditionsCancelOrder":false,"ConditionsIgnoreRth":false,"ExtOperator":"","CashQty":1.7976931348623157e+308,"Mifid2DecisionMaker":"","Mifid2DecisionAlgo":"","Mifid2ExecutionTrader":"","Mifid2ExecutionAlgo":"","DontUseAutoPriceForHedge":false,"IsOmsContainer":false,"DiscretionaryUpToLimitPrice":false,"AutoCancelDate":"","FilledQuantity":1.7976931348623157e+308,"RefFuturesConID":0,"AutoCancelParent":false,"Shareholder":"","ImbalanceOnly":false,"RouteMarketableToBbo":false,"ParentPermID":0,"UsePriceMgmtAlgo":false,"Duration":9223372036854775807,"PostToAts":9223372036854775807,"SoftDollarTier":{"Name":"","Value":"","DisplayName":""}}
Contract: {"ContractID":76792991,"Symbol":"TSLA","SecurityType":"STK","Expiry":"","Strike":0,"Right":"","Multiplier":"","Exchange":"SMART","Currency":"USD","LocalSymbol":"TSLA","TradingClass":"NMS","PrimaryExchange":"NASDAQ","IncludeExpired":false,"SecurityIDType":"","SecurityID":"","ComboLegsDescription":"","ComboLegs":null,"DeltaNeutralContract":null}

Wrapper (my local time is GMT+1):
?
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:27 ? ? ? ?<NextValidID> ? {"reqID": 211959}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:18 ? ? ? ?<ConnectAck>...
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2104, "errString": "Market data farm connection is OK:njinternal"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2107, "errString": "HMDS data farm connection is inactive but should be available upon demand.njhmdsint"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2158, "errString": "Sec-def data farm connection is OK:secdefnj"}
2023-09-14T21:20:16.685+0100 ? ?INFO ? ?ib/wrapper.go:216 ? ? ? <ContractDetails> ? ? ? {"reqID": 1, "conDetails": "ContractDetails<Contract: Contract<CondID: 76792991, Symbol: TSLA, SecurityType: STK, Exchange: SMART, Currency: USD>, MarketName: NMS, UnderContractID: 0, LongName: TESLA INC>"}
2023-09-14T21:20:16.809+0100 ? ?INFO ? ?ib/wrapper.go:222 ? ? ? <ContractDetailsEnd> ? ?{"reqID": 1}
2023-09-14T21:20:17.898+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:17.983+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:18.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:18.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:19.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:19.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
?



Re: APIPending status?

 

I suspect it is not since the GoLang API implements TWS API version 161 and we are at 178 now. Version 161 was introduced three years ago around TWS API 972.

Traditionally connecting clients that use "old API versions" worked just fine even if they were talking with brand-spanking-new TWS/IBGW. Client and TWS/IBGW negotiate the highest common API level during connection and limit the features they use to that level. API implementations provided by IBKR have lots of code just to make sure that works.

During the transition from 9xx versions to V10 TWS API, version 163 introduced "fractional sizes" and caused massive changes for all requests and responses that have a size/quantity field (orders, execution, commission, market data, historical data,....). Version 163 changed the data type for all those fields from Integer to Decimal and it was not just another addon-feature that can easily be ignored.

My suspicion is that your issue relates to the missing fractional size support by your client. The only real solution is to implement all missing API features up to and including to 163 (and probably even higher) in the GoLang TWS API implementation.

A short-term work-around may be that you look for the oldest standalone TWS/IBGW you can find. Hopefully that version is more tolerant to pre-163 clients. That may buy you some time to get the GoLang API upgraded but eventually, IBKR will force you to upgrade. I'd start with the current "latest" V10.19.

Massive changes took place in TWS/IBGW over the last three years and I wish I could tell you something else. But we finally moved from API 985 to 10.19 earlier in the year for similar reasons.

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

On Thu, Sep 14, 2023 at 06:06 PM, Franco Chiesa Docampo wrote:

Check if your golang implementation is compatible with the last stable version of TWS or IBGateway.

El 14 sep. 2023, a la(s) 17:46, unclekensson@... escribi¨®:

Connection:
?
{"level":"info","ts":1694722816.2040021,"caller":"[email protected]f1841ded5152/client.go:107","msg":"Connect to client","host":"[hostname].com","port":4002,"clientID":1234}
{"level":"info","ts":1694722816.293527,"caller":"[email protected]f1841ded5152/client.go:177","msg":"HandShake with TWS or GateWay"}
{"level":"info","ts":1694722816.3810427,"caller":"[email protected]f1841ded5152/client.go:223","msg":"handShake info","serverVersion":161}
{"level":"info","ts":1694722816.3811238,"caller":"[email protected]f1841ded5152/client.go:224","msg":"handShake info","connectionTime":"20230914 13:20:17 PST"}
{"level":"info","ts":1694722816.5943294,"caller":"[email protected]f1841ded5152/client.go:272","msg":"HandShake completed"}
{"level":"info","ts":1694722816.5943744,"caller":"[email protected]f1841ded5152/client.go:3047","msg":"run client"}
Order: {"OrderID":212017,"ClientID":1234,"PermID":0,"Action":"BUY","TotalQuantity":10,"OrderType":"MKT","LimitPrice":1.7976931348623157e+308,"AuxPrice":1.7976931348623157e+308,"TIF":"DAY","ActiveStartTime":"","ActiveStopTime":"","OCAGroup":"","OCAType":0,"OrderRef":"","Transmit":true,"ParentID":0,"BlockOrder":false,"SweepToFill":false,"DisplaySize":0,"TriggerMethod":0,"OutsideRTH":false,"Hidden":false,"GoodAfterTime":"","GoodTillDate":"","OverridePercentageConstraints":false,"Rule80A":"","AllOrNone":false,"MinQty":9223372036854775807,"PercentOffset":1.7976931348623157e+308,"TrailStopPrice":1.7976931348623157e+308,"TrailingPercent":1.7976931348623157e+308,"FAGroup":"","FAProfile":"","FAMethod":"","FAPercentage":"","OpenClose":"O","Origin":0,"ShortSaleSlot":0,"DesignatedLocation":"","ExemptCode":-1,"DiscretionaryAmount":0,"ETradeOnly":true,"FirmQuoteOnly":true,"NBBOPriceCap":1.7976931348623157e+308,"OptOutSmartRouting":false,"AuctionStrategy":0,"StartingPrice":1.7976931348623157e+308,"StockRefPrice":1.7976931348623157e+308,"Delta":1.7976931348623157e+308,"StockRangeLower":1.7976931348623157e+308,"StockRangeUpper":1.7976931348623157e+308,"RandomizePrice":false,"RandomizeSize":false,"Volatility":1.7976931348623157e+308,"VolatilityType":9223372036854775807,"DeltaNeutralOrderType":"","DeltaNeutralAuxPrice":1.7976931348623157e+308,"DeltaNeutralContractID":0,"DeltaNeutralSettlingFirm":"","DeltaNeutralClearingAccount":"","DeltaNeutralClearingIntent":"","DeltaNeutralOpenClose":"","DeltaNeutralShortSale":false,"DeltaNeutralShortSaleSlot":0,"DeltaNeutralDesignatedLocation":"","ContinuousUpdate":false,"ReferencePriceType":9223372036854775807,"BasisPoints":1.7976931348623157e+308,"BasisPointsType":9223372036854775807,"ScaleInitLevelSize":9223372036854775807,"ScaleSubsLevelSize":9223372036854775807,"ScalePriceIncrement":1.7976931348623157e+308,"ScalePriceAdjustValue":1.7976931348623157e+308,"ScalePriceAdjustInterval":9223372036854775807,"ScaleProfitOffset":1.7976931348623157e+308,"ScaleAutoReset":false,"ScaleInitPosition":9223372036854775807,"ScaleInitFillQty":9223372036854775807,"ScaleRandomPercent":false,"ScaleTable":"","NotSuppScaleNumComponents":0,"HedgeType":"","HedgeParam":"","Account":"","SettlingFirm":"","ClearingAccount":"","ClearingIntent":"","AlgoStrategy":"","AlgoParams":null,"SmartComboRoutingParams":null,"AlgoID":"","WhatIf":false,"NotHeld":false,"Solictied":false,"ModelCode":"","OrderComboLegs":null,"OrderMiscOptions":null,"ReferenceContractID":0,"PeggedChangeAmount":0,"IsPeggedChangeAmountDecrease":false,"ReferenceChangeAmount":0,"ReferenceExchangeID":"","AdjustedOrderType":"","TriggerPrice":1.7976931348623157e+308,"AdjustedStopPrice":1.7976931348623157e+308,"AdjustedStopLimitPrice":1.7976931348623157e+308,"AdjustedTrailingAmount":1.7976931348623157e+308,"AdjustableTrailingUnit":0,"LimitPriceOffset":1.7976931348623157e+308,"Conditions":null,"ConditionsCancelOrder":false,"ConditionsIgnoreRth":false,"ExtOperator":"","CashQty":1.7976931348623157e+308,"Mifid2DecisionMaker":"","Mifid2DecisionAlgo":"","Mifid2ExecutionTrader":"","Mifid2ExecutionAlgo":"","DontUseAutoPriceForHedge":false,"IsOmsContainer":false,"DiscretionaryUpToLimitPrice":false,"AutoCancelDate":"","FilledQuantity":1.7976931348623157e+308,"RefFuturesConID":0,"AutoCancelParent":false,"Shareholder":"","ImbalanceOnly":false,"RouteMarketableToBbo":false,"ParentPermID":0,"UsePriceMgmtAlgo":false,"Duration":9223372036854775807,"PostToAts":9223372036854775807,"SoftDollarTier":{"Name":"","Value":"","DisplayName":""}}
Contract: {"ContractID":76792991,"Symbol":"TSLA","SecurityType":"STK","Expiry":"","Strike":0,"Right":"","Multiplier":"","Exchange":"SMART","Currency":"USD","LocalSymbol":"TSLA","TradingClass":"NMS","PrimaryExchange":"NASDAQ","IncludeExpired":false,"SecurityIDType":"","SecurityID":"","ComboLegsDescription":"","ComboLegs":null,"DeltaNeutralContract":null}

Wrapper (my local time is GMT+1):
?
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:27 ? ? ? ?<NextValidID> ? {"reqID": 211959}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:18 ? ? ? ?<ConnectAck>...
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2104, "errString": "Market data farm connection is OK:njinternal"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2107, "errString": "HMDS data farm connection is inactive but should be available upon demand.njhmdsint"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2158, "errString": "Sec-def data farm connection is OK:secdefnj"}
2023-09-14T21:20:16.685+0100 ? ?INFO ? ?ib/wrapper.go:216 ? ? ? <ContractDetails> ? ? ? {"reqID": 1, "conDetails": "ContractDetails<Contract: Contract<CondID: 76792991, Symbol: TSLA, SecurityType: STK, Exchange: SMART, Currency: USD>, MarketName: NMS, UnderContractID: 0, LongName: TESLA INC>"}
2023-09-14T21:20:16.809+0100 ? ?INFO ? ?ib/wrapper.go:222 ? ? ? <ContractDetailsEnd> ? ?{"reqID": 1}
2023-09-14T21:20:17.898+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:17.983+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:18.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:18.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:19.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:19.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
?



Re: APIPending status?

Franco Chiesa Docampo
 

¿ªÔÆÌåÓý

Check if your golang implementation is compatible with the last stable version of TWS or IBGateway.

El 14 sep. 2023, a la(s) 17:46, unclekensson@... escribi¨®:

?
Connection:
?
{"level":"info","ts":1694722816.2040021,"caller":"[email protected]f1841ded5152/client.go:107","msg":"Connect to client","host":"[hostname].com","port":4002,"clientID":1234}
{"level":"info","ts":1694722816.293527,"caller":"[email protected]f1841ded5152/client.go:177","msg":"HandShake with TWS or GateWay"}
{"level":"info","ts":1694722816.3810427,"caller":"[email protected]f1841ded5152/client.go:223","msg":"handShake info","serverVersion":161}
{"level":"info","ts":1694722816.3811238,"caller":"[email protected]f1841ded5152/client.go:224","msg":"handShake info","connectionTime":"20230914 13:20:17 PST"}
{"level":"info","ts":1694722816.5943294,"caller":"[email protected]f1841ded5152/client.go:272","msg":"HandShake completed"}
{"level":"info","ts":1694722816.5943744,"caller":"[email protected]f1841ded5152/client.go:3047","msg":"run client"}
Order: {"OrderID":212017,"ClientID":1234,"PermID":0,"Action":"BUY","TotalQuantity":10,"OrderType":"MKT","LimitPrice":1.7976931348623157e+308,"AuxPrice":1.7976931348623157e+308,"TIF":"DAY","ActiveStartTime":"","ActiveStopTime":"","OCAGroup":"","OCAType":0,"OrderRef":"","Transmit":true,"ParentID":0,"BlockOrder":false,"SweepToFill":false,"DisplaySize":0,"TriggerMethod":0,"OutsideRTH":false,"Hidden":false,"GoodAfterTime":"","GoodTillDate":"","OverridePercentageConstraints":false,"Rule80A":"","AllOrNone":false,"MinQty":9223372036854775807,"PercentOffset":1.7976931348623157e+308,"TrailStopPrice":1.7976931348623157e+308,"TrailingPercent":1.7976931348623157e+308,"FAGroup":"","FAProfile":"","FAMethod":"","FAPercentage":"","OpenClose":"O","Origin":0,"ShortSaleSlot":0,"DesignatedLocation":"","ExemptCode":-1,"DiscretionaryAmount":0,"ETradeOnly":true,"FirmQuoteOnly":true,"NBBOPriceCap":1.7976931348623157e+308,"OptOutSmartRouting":false,"AuctionStrategy":0,"StartingPrice":1.7976931348623157e+308,"StockRefPrice":1.7976931348623157e+308,"Delta":1.7976931348623157e+308,"StockRangeLower":1.7976931348623157e+308,"StockRangeUpper":1.7976931348623157e+308,"RandomizePrice":false,"RandomizeSize":false,"Volatility":1.7976931348623157e+308,"VolatilityType":9223372036854775807,"DeltaNeutralOrderType":"","DeltaNeutralAuxPrice":1.7976931348623157e+308,"DeltaNeutralContractID":0,"DeltaNeutralSettlingFirm":"","DeltaNeutralClearingAccount":"","DeltaNeutralClearingIntent":"","DeltaNeutralOpenClose":"","DeltaNeutralShortSale":false,"DeltaNeutralShortSaleSlot":0,"DeltaNeutralDesignatedLocation":"","ContinuousUpdate":false,"ReferencePriceType":9223372036854775807,"BasisPoints":1.7976931348623157e+308,"BasisPointsType":9223372036854775807,"ScaleInitLevelSize":9223372036854775807,"ScaleSubsLevelSize":9223372036854775807,"ScalePriceIncrement":1.7976931348623157e+308,"ScalePriceAdjustValue":1.7976931348623157e+308,"ScalePriceAdjustInterval":9223372036854775807,"ScaleProfitOffset":1.7976931348623157e+308,"ScaleAutoReset":false,"ScaleInitPosition":9223372036854775807,"ScaleInitFillQty":9223372036854775807,"ScaleRandomPercent":false,"ScaleTable":"","NotSuppScaleNumComponents":0,"HedgeType":"","HedgeParam":"","Account":"","SettlingFirm":"","ClearingAccount":"","ClearingIntent":"","AlgoStrategy":"","AlgoParams":null,"SmartComboRoutingParams":null,"AlgoID":"","WhatIf":false,"NotHeld":false,"Solictied":false,"ModelCode":"","OrderComboLegs":null,"OrderMiscOptions":null,"ReferenceContractID":0,"PeggedChangeAmount":0,"IsPeggedChangeAmountDecrease":false,"ReferenceChangeAmount":0,"ReferenceExchangeID":"","AdjustedOrderType":"","TriggerPrice":1.7976931348623157e+308,"AdjustedStopPrice":1.7976931348623157e+308,"AdjustedStopLimitPrice":1.7976931348623157e+308,"AdjustedTrailingAmount":1.7976931348623157e+308,"AdjustableTrailingUnit":0,"LimitPriceOffset":1.7976931348623157e+308,"Conditions":null,"ConditionsCancelOrder":false,"ConditionsIgnoreRth":false,"ExtOperator":"","CashQty":1.7976931348623157e+308,"Mifid2DecisionMaker":"","Mifid2DecisionAlgo":"","Mifid2ExecutionTrader":"","Mifid2ExecutionAlgo":"","DontUseAutoPriceForHedge":false,"IsOmsContainer":false,"DiscretionaryUpToLimitPrice":false,"AutoCancelDate":"","FilledQuantity":1.7976931348623157e+308,"RefFuturesConID":0,"AutoCancelParent":false,"Shareholder":"","ImbalanceOnly":false,"RouteMarketableToBbo":false,"ParentPermID":0,"UsePriceMgmtAlgo":false,"Duration":9223372036854775807,"PostToAts":9223372036854775807,"SoftDollarTier":{"Name":"","Value":"","DisplayName":""}}
Contract: {"ContractID":76792991,"Symbol":"TSLA","SecurityType":"STK","Expiry":"","Strike":0,"Right":"","Multiplier":"","Exchange":"SMART","Currency":"USD","LocalSymbol":"TSLA","TradingClass":"NMS","PrimaryExchange":"NASDAQ","IncludeExpired":false,"SecurityIDType":"","SecurityID":"","ComboLegsDescription":"","ComboLegs":null,"DeltaNeutralContract":null}

Wrapper (my local time is GMT+1):
?
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:27 ? ? ? ?<NextValidID> ? {"reqID": 211959}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:18 ? ? ? ?<ConnectAck>...
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2104, "errString": "Market data farm connection is OK:njinternal"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2107, "errString": "HMDS data farm connection is inactive but should be available upon demand.njhmdsint"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2158, "errString": "Sec-def data farm connection is OK:secdefnj"}
2023-09-14T21:20:16.685+0100 ? ?INFO ? ?ib/wrapper.go:216 ? ? ? <ContractDetails> ? ? ? {"reqID": 1, "conDetails": "ContractDetails<Contract: Contract<CondID: 76792991, Symbol: TSLA, SecurityType: STK, Exchange: SMART, Currency: USD>, MarketName: NMS, UnderContractID: 0, LongName: TESLA INC>"}
2023-09-14T21:20:16.809+0100 ? ?INFO ? ?ib/wrapper.go:222 ? ? ? <ContractDetailsEnd> ? ?{"reqID": 1}
2023-09-14T21:20:17.898+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:17.983+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:18.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:18.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:19.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:19.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
?



Re: APIPending status?

 

Connection:
?
{"level":"info","ts":1694722816.2040021,"caller":"[email protected]f1841ded5152/client.go:107","msg":"Connect to client","host":"[hostname].com","port":4002,"clientID":1234}
{"level":"info","ts":1694722816.293527,"caller":"[email protected]f1841ded5152/client.go:177","msg":"HandShake with TWS or GateWay"}
{"level":"info","ts":1694722816.3810427,"caller":"[email protected]f1841ded5152/client.go:223","msg":"handShake info","serverVersion":161}
{"level":"info","ts":1694722816.3811238,"caller":"[email protected]f1841ded5152/client.go:224","msg":"handShake info","connectionTime":"20230914 13:20:17 PST"}
{"level":"info","ts":1694722816.5943294,"caller":"[email protected]f1841ded5152/client.go:272","msg":"HandShake completed"}
{"level":"info","ts":1694722816.5943744,"caller":"[email protected]f1841ded5152/client.go:3047","msg":"run client"}
Order: {"OrderID":212017,"ClientID":1234,"PermID":0,"Action":"BUY","TotalQuantity":10,"OrderType":"MKT","LimitPrice":1.7976931348623157e+308,"AuxPrice":1.7976931348623157e+308,"TIF":"DAY","ActiveStartTime":"","ActiveStopTime":"","OCAGroup":"","OCAType":0,"OrderRef":"","Transmit":true,"ParentID":0,"BlockOrder":false,"SweepToFill":false,"DisplaySize":0,"TriggerMethod":0,"OutsideRTH":false,"Hidden":false,"GoodAfterTime":"","GoodTillDate":"","OverridePercentageConstraints":false,"Rule80A":"","AllOrNone":false,"MinQty":9223372036854775807,"PercentOffset":1.7976931348623157e+308,"TrailStopPrice":1.7976931348623157e+308,"TrailingPercent":1.7976931348623157e+308,"FAGroup":"","FAProfile":"","FAMethod":"","FAPercentage":"","OpenClose":"O","Origin":0,"ShortSaleSlot":0,"DesignatedLocation":"","ExemptCode":-1,"DiscretionaryAmount":0,"ETradeOnly":true,"FirmQuoteOnly":true,"NBBOPriceCap":1.7976931348623157e+308,"OptOutSmartRouting":false,"AuctionStrategy":0,"StartingPrice":1.7976931348623157e+308,"StockRefPrice":1.7976931348623157e+308,"Delta":1.7976931348623157e+308,"StockRangeLower":1.7976931348623157e+308,"StockRangeUpper":1.7976931348623157e+308,"RandomizePrice":false,"RandomizeSize":false,"Volatility":1.7976931348623157e+308,"VolatilityType":9223372036854775807,"DeltaNeutralOrderType":"","DeltaNeutralAuxPrice":1.7976931348623157e+308,"DeltaNeutralContractID":0,"DeltaNeutralSettlingFirm":"","DeltaNeutralClearingAccount":"","DeltaNeutralClearingIntent":"","DeltaNeutralOpenClose":"","DeltaNeutralShortSale":false,"DeltaNeutralShortSaleSlot":0,"DeltaNeutralDesignatedLocation":"","ContinuousUpdate":false,"ReferencePriceType":9223372036854775807,"BasisPoints":1.7976931348623157e+308,"BasisPointsType":9223372036854775807,"ScaleInitLevelSize":9223372036854775807,"ScaleSubsLevelSize":9223372036854775807,"ScalePriceIncrement":1.7976931348623157e+308,"ScalePriceAdjustValue":1.7976931348623157e+308,"ScalePriceAdjustInterval":9223372036854775807,"ScaleProfitOffset":1.7976931348623157e+308,"ScaleAutoReset":false,"ScaleInitPosition":9223372036854775807,"ScaleInitFillQty":9223372036854775807,"ScaleRandomPercent":false,"ScaleTable":"","NotSuppScaleNumComponents":0,"HedgeType":"","HedgeParam":"","Account":"","SettlingFirm":"","ClearingAccount":"","ClearingIntent":"","AlgoStrategy":"","AlgoParams":null,"SmartComboRoutingParams":null,"AlgoID":"","WhatIf":false,"NotHeld":false,"Solictied":false,"ModelCode":"","OrderComboLegs":null,"OrderMiscOptions":null,"ReferenceContractID":0,"PeggedChangeAmount":0,"IsPeggedChangeAmountDecrease":false,"ReferenceChangeAmount":0,"ReferenceExchangeID":"","AdjustedOrderType":"","TriggerPrice":1.7976931348623157e+308,"AdjustedStopPrice":1.7976931348623157e+308,"AdjustedStopLimitPrice":1.7976931348623157e+308,"AdjustedTrailingAmount":1.7976931348623157e+308,"AdjustableTrailingUnit":0,"LimitPriceOffset":1.7976931348623157e+308,"Conditions":null,"ConditionsCancelOrder":false,"ConditionsIgnoreRth":false,"ExtOperator":"","CashQty":1.7976931348623157e+308,"Mifid2DecisionMaker":"","Mifid2DecisionAlgo":"","Mifid2ExecutionTrader":"","Mifid2ExecutionAlgo":"","DontUseAutoPriceForHedge":false,"IsOmsContainer":false,"DiscretionaryUpToLimitPrice":false,"AutoCancelDate":"","FilledQuantity":1.7976931348623157e+308,"RefFuturesConID":0,"AutoCancelParent":false,"Shareholder":"","ImbalanceOnly":false,"RouteMarketableToBbo":false,"ParentPermID":0,"UsePriceMgmtAlgo":false,"Duration":9223372036854775807,"PostToAts":9223372036854775807,"SoftDollarTier":{"Name":"","Value":"","DisplayName":""}}
Contract: {"ContractID":76792991,"Symbol":"TSLA","SecurityType":"STK","Expiry":"","Strike":0,"Right":"","Multiplier":"","Exchange":"SMART","Currency":"USD","LocalSymbol":"TSLA","TradingClass":"NMS","PrimaryExchange":"NASDAQ","IncludeExpired":false,"SecurityIDType":"","SecurityID":"","ComboLegsDescription":"","ComboLegs":null,"DeltaNeutralContract":null}

Wrapper (my local time is GMT+1):
?
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:27 ? ? ? ?<NextValidID> ? {"reqID": 211959}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:18 ? ? ? ?<ConnectAck>...
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2104, "errString": "Market data farm connection is OK:njinternal"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2107, "errString": "HMDS data farm connection is inactive but should be available upon demand.njhmdsint"}
2023-09-14T21:20:16.594+0100 ? ?INFO ? ?ib/wrapper.go:573 ? ? ? <Error> {"reqID": -1, "errCode": 2158, "errString": "Sec-def data farm connection is OK:secdefnj"}
2023-09-14T21:20:16.685+0100 ? ?INFO ? ?ib/wrapper.go:216 ? ? ? <ContractDetails> ? ? ? {"reqID": 1, "conDetails": "ContractDetails<Contract: Contract<CondID: 76792991, Symbol: TSLA, SecurityType: STK, Exchange: SMART, Currency: USD>, MarketName: NMS, UnderContractID: 0, LongName: TESLA INC>"}
2023-09-14T21:20:16.809+0100 ? ?INFO ? ?ib/wrapper.go:222 ? ? ? <ContractDetailsEnd> ? ?{"reqID": 1}
2023-09-14T21:20:17.898+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:17.983+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:18.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:18.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
2023-09-14T21:20:19.774+0100 ? ?INFO ? ?ib/wrapper.go:176 ? ? ? <OrderStatus> ? {"orderID": 212017, "status": "ApiPending", "filled": 0, "remaining": 10, "avgFillPrice": 0}
2023-09-14T21:20:19.858+0100 ? ?INFO ? ?ib/wrapper.go:171 ? ? ? <OpenOrderEnd>
?



Re: APIPending status?

 

Logs would be the best initial indication of where to start.


APIPending status?

 

Hello,

While I very much appreciate that you don't support golang, I wonder if you can point me in a helpful direction, because I'm unable to find any useful docs at all. I'm rather lost, so I'm hoping you have some expertise you're willing to share.

Until mid-August, I was perfectly able to place orders using placeOrder. After my vacation, I find that exactly the same orders are now failing to go through and instead landing in the APIPending state. Unhelpfully, the docs say this is "infrequent", suggesting there might be a problem with the security definition and not much else.

I still receive errors as usual if I send obviously erroneous orders.

Do you have any insight on what might be causing this sudden change? How would I go about finding out why the orders are no longer being submitted correctly? (There have been no changes to the golang library I'm using.) Is there any further information that might be useful to you?


Re: Market data sharing between Live and Paper account

 

One more confirmation, my setup is one PC running 24/7, with 2 TWS windows at all time, client(s) connecting via socket either to live (API trading) or paper (for code development and testing).? This has been working well for years and started failing this morning, you get one of two errors ("competing live session" or "same IP").

I also did the following, to no avail
- stopped the live TWS, connecting to the paper account works fine, bars and tickers stream as expected
- then starting the live TWS, that kills the existing tickers and bars immediately


Confusion between "adjustedStopPrice" and "adjustedTrailingAmount" when attaching "Adjusted to Trail" to a Stop order.

 

Hello,
I have been using a bracket order for stop-loss and profit-takers which has been working fine (C++). Now I want to attach a 'Trailing Stop'? when a specific price is reached. My confusion lies in the setting both attributes "adjustedTrailingAmount" and "adjustedStopPrice".
If I have set the "adjustedTrailingAmount" to say $0.50, why then do I need to set "adjustedStopPrice"?

Also, the does "adjustedTrailingAmount" value need to be positive (e.g. $0.50) for Short positions and negative ($-0.50) for Long positions?

Thanks.


Re: Market data sharing between Live and Paper account

 

Sounds like the typical HelpLess Desk answer they gave you, Richard. That is disappointing since the problem seems impact more than just API clients.

We have one remote system that constantly runs a paper account in TWS 10.19.2d and occasionally starts the corresponding live account in second TWS 10.19.2d. Worked all the time until yesterday, but this morning, for the first time, TWS with the paper account looses market data (charts go away wit "competing live session" error) as soon as TWS with the corresponding live account starts.

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


On Thu, Sep 14, 2023 at 10:23 AM, Richard L King wrote:

I got a useless interim response from IBKR to my support ticket, but they say they¡¯ve passed it to the developers, who are looking into it.

?

I¡¯ll keep you informed¡­

?

From: [email protected] <[email protected]> On Behalf Of Greg Angelow
Sent: Thursday, September 14, 2023 2:26 PM
To: [email protected]
Subject: Re: [TWS API] Market data sharing between Live and Paper account

?

Same here. I hope it's a bug - not a new feature.

14:32:11:010 <- 20-1612-540729664-DAX-FUT-20230915-0--25-EUREX--EUR-FDAX SEP 23-FDAX-0-20230911 00:00:00 MET-1 day-1 W-1-TRADES-1-0--
14:32:11:195 -> ---x4-2-1612-162-Historical Market Data Service error message:Trading TWS session is connected from a different IP address--

BTW: Does anybody know, how one can subscribe market data explicitly for the paper account (sharing disabled)?

?

On 14.09.2023 13:16, Richard L King wrote:

Interesting, I¡¯m seeing something similar.

?

I run live and paper TWS on the same computer. I have a number of API clients, some of which run on the same computer as the TWS instances, and others on several other computers.

?

Until today this has worked faultlessly for years.

?

But today the paper TWS is receiving no market data at all, while the live TWS is perfectly fine.

?

I¡¯ve checked in Account Management to ensure the data sharing option was still set, and it is (I hadn¡¯t been near Account Management for weeks, but I had to make sure it hadn¡¯t somehow been reset by IB).

?

I¡¯ve submitted a ticket to IB. I hope they fix this soon, as I used the paper TWS pretty much all the time for testing my trading platform.

?

Just for the record, live TWS is 10.19, paper TWS is 10.25.

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of Evgeni Andreyev
Sent: Thursday, September 14, 2023 11:52 AM
To: [email protected]
Subject: Re: [TWS API] Market data sharing between Live and Paper account

?

Up until today, there was no problem running both Live and Paper Trading account connections (2 IBG instances) on the same computer , and occasionally establishing a connection to a Paper trading account from an API client? on a different computer.

?

But from today, i have started getting:

Error 162, reqId 3: Historical Market Data Service error message:Trading TWS session is connected from a different IP address,...

?

when it is clearly not.

?

?


Re: Market data sharing between Live and Paper account

 

¿ªÔÆÌåÓý

I got a useless interim response from IBKR to my support ticket, but they say they¡¯ve passed it to the developers, who are looking into it.

?

I¡¯ll keep you informed¡­

?

From: [email protected] <[email protected]> On Behalf Of Greg Angelow
Sent: Thursday, September 14, 2023 2:26 PM
To: [email protected]
Subject: Re: [TWS API] Market data sharing between Live and Paper account

?

Same here. I hope it's a bug - not a new feature.

14:32:11:010 <- 20-1612-540729664-DAX-FUT-20230915-0--25-EUREX--EUR-FDAX SEP 23-FDAX-0-20230911 00:00:00 MET-1 day-1 W-1-TRADES-1-0--
14:32:11:195 -> ---x4-2-1612-162-Historical Market Data Service error message:Trading TWS session is connected from a different IP address--

BTW: Does anybody know, how one can subscribe market data explicitly for the paper account (sharing disabled)?

?

On 14.09.2023 13:16, Richard L King wrote:

Interesting, I¡¯m seeing something similar.

?

I run live and paper TWS on the same computer. I have a number of API clients, some of which run on the same computer as the TWS instances, and others on several other computers.

?

Until today this has worked faultlessly for years.

?

But today the paper TWS is receiving no market data at all, while the live TWS is perfectly fine.

?

I¡¯ve checked in Account Management to ensure the data sharing option was still set, and it is (I hadn¡¯t been near Account Management for weeks, but I had to make sure it hadn¡¯t somehow been reset by IB).

?

I¡¯ve submitted a ticket to IB. I hope they fix this soon, as I used the paper TWS pretty much all the time for testing my trading platform.

?

Just for the record, live TWS is 10.19, paper TWS is 10.25.

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of Evgeni Andreyev
Sent: Thursday, September 14, 2023 11:52 AM
To: [email protected]
Subject: Re: [TWS API] Market data sharing between Live and Paper account

?

Up until today, there was no problem running both Live and Paper Trading account connections (2 IBG instances) on the same computer , and occasionally establishing a connection to a Paper trading account from an API client? on a different computer.

?

But from today, i have started getting:

Error 162, reqId 3: Historical Market Data Service error message:Trading TWS session is connected from a different IP address,...

?

when it is clearly not.

?


Re: Market data sharing between Live and Paper account

 

¿ªÔÆÌåÓý

Same here. I hope it's a bug - not a new feature.

14:32:11:010 <- 20-1612-540729664-DAX-FUT-20230915-0--25-EUREX--EUR-FDAX SEP 23-FDAX-0-20230911 00:00:00 MET-1 day-1 W-1-TRADES-1-0--
14:32:11:195 -> ---x4-2-1612-162-Historical Market Data Service error message:Trading TWS session is connected from a different IP address--

BTW: Does anybody know, how one can subscribe market data explicitly for the paper account (sharing disabled)?


On 14.09.2023 13:16, Richard L King wrote:

Interesting, I¡¯m seeing something similar.

?

I run live and paper TWS on the same computer. I have a number of API clients, some of which run on the same computer as the TWS instances, and others on several other computers.

?

Until today this has worked faultlessly for years.

?

But today the paper TWS is receiving no market data at all, while the live TWS is perfectly fine.

?

I¡¯ve checked in Account Management to ensure the data sharing option was still set, and it is (I hadn¡¯t been near Account Management for weeks, but I had to make sure it hadn¡¯t somehow been reset by IB).

?

I¡¯ve submitted a ticket to IB. I hope they fix this soon, as I used the paper TWS pretty much all the time for testing my trading platform.

?

Just for the record, live TWS is 10.19, paper TWS is 10.25.

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of Evgeni Andreyev
Sent: Thursday, September 14, 2023 11:52 AM
To: [email protected]
Subject: Re: [TWS API] Market data sharing between Live and Paper account

?

Up until today, there was no problem running both Live and Paper Trading account connections (2 IBG instances) on the same computer , and occasionally establishing a connection to a Paper trading account from an API client? on a different computer.

?

But from today, i have started getting:

Error 162, reqId 3: Historical Market Data Service error message:Trading TWS session is connected from a different IP address,...

?

when it is clearly not.

?


Re: Market data sharing between Live and Paper account

 

I have the same problem. 1 account in 1 computer TWS Live + TWS Paper, from 2 days the Paper account is receiving no market data.?

I have version 10.25.1 on Linux 64-bit on the AWS virtual instance.

This problem never occurs before.

Please Richard, if IB will reply to you, inform us.?
Thanks in advance