qantau / dtc-client Goto Github PK
View Code? Open in Web Editor NEWData and Trading Communications Protocol Client
License: MIT License
Data and Trading Communications Protocol Client
License: MIT License
When I subscribe to F.US.GCEZ20 data after a while I get errors like below at QUANT.DTC.Utils.GetMessageType Line 15:
"Newtonsoft.Json.JsonReaderException: 'Unexpected end of content while loading JObject. Path 'BidPrice', line 1, position 40.'"
The recieved string is "{"Type":117,"SymbolID":1,"BidPrice":1891".
The DTC has changed since 2018, so we need to update that, if that's what you're using here.
How did you compile and implement the protobuf for the SC DTC?
Originally posted by @QANTau in #1 (comment)
Hi There,
This is the error I get when I use your newest version:
https://prnt.sc/1g694lg
If I move on the var msg looks like this:
"Unexpected end of content while loading JObject. Path 'UnderlyingSymbol', line 1, position 271. processing '{"Type":507,"RequestID":110000000,"SecurityType":1,"MinPriceIncrement":0.009999999776482582,"PriceDisplayFormat":2,"CurrencyValuePerIncrement":10,"IsFinalMessage":1,"SecurityExpirationDate":1623110400,"RolloverDate":1623110400,"Symbol":"FGBLM21-EUREX","UnderlyingSymbol":'"
I did some research on this. It has nothing to do with the symbols. The JSON string message gets truncated. Roughly 1% of all messages are lost in my case.
Here is how my log looks like:
2021-07-23 15:01:27.0477451|Warning|ClientOnError|Message Type Unknown Not Supported. Message:{"Type":140,"SymbolID":8,"DateTime":1627045286759,"Price":25.32000160217285,
2021-07-23 15:01:27.1362853|Warning|ClientOnError|Message Type Unknown Not Supported. Message:"Quantity":1,"Side":2,"UpdateType":1,"NumOrders":1,"FinalUpdateInBatch":1}
Here you can see that the message is split into two parts. I have to make Visual Studio beak at every Common Language Runtime Exception to see the message itself.
This is how the error looks like:
https://prnt.sc/1g5ukru
PN:
I have rewritten the written the Protocol.MessageType GetMessageType(byte[] packet) to Protocol.MessageType GetMessageType(string str, LogX log = null) so it takes a string instead of byte[] but I use the same GetString(byte[] obj) method for conversion as you do.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.