Git Product home page Git Product logo

dtc-client's People

Contributors

qantau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dtc-client's Issues

Newtonsoft.Json.JsonReaderException: 'Unexpected end of content while loading JObject. Path 'BidPrice', line 1, position 40.'

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.

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.