API Support » RequestBars results in: Error System.Exception: Invalid subscription Mar 31, 2014 @ 05:36 AM (Total replies: 1) | |||||
I can't get RequestBars to work, whenever I RequestBars, I'm getting Invalid subscription exception ... when I switch to RequestHistory I'm getting EOD bars without exceptions here is my request: _oec.RequestBars(Contracts[SymbolLookup.SearchText], DateTime.Now.Date.AddDays(-8), DateTime.Now.Date, OEC.Data.SubscriptionType.Bar, 1, true); and here is the error log: 11:30:49.969 Dbg System #1 Request bars for:ESM4, StartDate:2014-03-23 00:00:00, EndDate:2014-03-31 00:00:00, Type:Bar, Interval:1, IgnoreSessionBoundaries:True 11:30:52.704 Dbg System #1 ... : Error System.Exception: Invalid subscription at OEC.API.Core.AddSubscription(Subscription subscription) at OEC.API.Core.Subscribe(Subscription sub) at OEC.API.OECClient.RequestBars(Contract contract, DateTime StartDate, DateTime EndDate, SubscriptionType Type, Int32 Interval, Boolean IgnoreSessionBoundaries) at DataSource._oec_OnSymbolLookupReceived(SymbolLookupCriteria SymbolLookup, ContractList Contracts) at OEC.API.OECClient.FireOnSymbolLookup(SymbolLookupCriteria symbolLookup, ContractList contracts) at OEC.API.SymbolLookupProcessor.ProcessResponse(SymbolLookupResponse SymbolLookupResponse) at OEC.API.Core.ProcessContracts(ContractResponse res) at OEC.API.Core.DispatchClientResponse(ClientResponse response) processing <ClientResponse PacketNo=2 > <Contracts > <SymbolLookup Contracts=[<Item CurrencyID=3 TickSize=0,25 ContractSize=50 ExpirationDate=2014-06-20 00:00:00 ExpirationMonth=1406 BaseContractID=87 FirstChildOptionsID=274526638 ExpirationTime=2014-06-20 21:29:00 Initial=4758 Maintenance=4325 ID=273825720 />] BaseContracts=[<Item Description=E-Mini S&P PriceFormat=2 GroupID=15 PitStartTime=00:00:00 PitStopTime=00:00:00 StartTime=22:00:00 StopTime=21:15:00 DayClose=21:15:00 Kind=1 ExchangeID=359 Symbol=ES CurrencyID=3 ContractSize=50 FrontExpirationMonth=1406 ID=87 > <ContinuousContractRule Rule=<SM DLT="8" /> ID=87 /> </BaseContract>] > <Request SearchText=ESM4 ContractKinds= MaxRecords=1 Mode=ExactMatch ContractType=-1 CompoundType=-1 Priority=1 ID=4 /> </SymbolLookupResponse> </ContractResponse> </ClientResponse> 11:30:52.708 Dbg System #1 Out: <ClientRequest UUID=........... > <Message > <ChatMessage Message=Error System.Exception: Invalid subscription at OEC.API.Core.AddSubscription(Subscription subscription) at OEC.API.Core.Subscribe(Subscription sub) at OEC.API.OECClient.RequestBars(Contract contract, DateTime StartDate, DateTime EndDate, SubscriptionType Type, Int32 Interval, Boolean IgnoreSessionBoundaries) at DataSource._oec_OnSymbolLookupReceived(SymbolLookupCriteria SymbolLookup, ContractList Contracts) at OEC.API.OECClient.FireOnSymbolLookup(SymbolLookupCriteria symbolLookup, ContractList contracts) at OEC.API.SymbolLookupProcessor.ProcessResponse(SymbolLookupResponse SymbolLookupResponse) at OEC.API.Core.ProcessContracts(ContractResponse res) at OEC.API.Core.DispatchClientResponse(ClientResponse response) processing <ClientResponse PacketNo=2 > <Contracts > <SymbolLookup Contracts=[<Item CurrencyID=3 TickSize=0,25 ContractSize=50 ExpirationDate=2014-06-20 00:00:00 ExpirationMonth=1406 BaseContractID=87 FirstChildOptionsID=274526638 ExpirationTime=2014-06-20 21:29:00 Initial=4758 Maintenance=4325 ID=273825720 />] BaseContracts=[<Item Description=E-Mini S&P PriceFormat=2 GroupID=15 PitStartTime=00:00:00 PitStopTime=00:00:00 StartTime=22:00:00 StopTime=21:15:00 DayClose=21:15:00 Kind=1 ExchangeID=359 Symbol=ES CurrencyID=3 ContractSize=50 FrontExpirationMonth=1406 ID=87 > <ContinuousContractRule Rule=<SM DLT="8" /> ID=87 /> </BaseContract>] > <Request SearchText=ESM4 ContractKinds= MaxRecords=1 Mode=ExactMatch ContractType=-1 CompoundType=-1 Priority=1 ID=4 /> </SymbolLookupResponse> </ContractResponse> </ClientResponse> Timestamp=2014-03-31 09:30:52 Exception=System.Exception: Invalid subscription at OEC.API.Core.AddSubscription(Subscription subscription) at OEC.API.Core.Subscribe(Subscription sub) at OEC.API.OECClient.RequestBars(Contract contract, DateTime StartDate, DateTime EndDate, SubscriptionType Type, Int32 Interval, Boolean IgnoreSessionBoundaries) at DataSource._oec_OnSymbolLookupReceived(SymbolLookupCriteria SymbolLookup, ContractList Contracts) at OEC.API.OECClient.FireOnSymbolLookup(SymbolLookupCriteria symbolLookup, ContractList contracts) at OEC.API.SymbolLookupProcessor.ProcessResponse(SymbolLookupResponse SymbolLookupResponse) at OEC.API.Core.ProcessContracts(ContractResponse res) at OEC.API.Core.DispatchClientResponse(ClientResponse response) /> </MessageRequest> </ClientRequest> Konrad |