zerodha / gokiteconnect

Official Go client for Kite Connect API's
MIT License
178 stars 73 forks source link

Making common struct for Ticker and Connect #30

Closed VarunBatraIT closed 3 years ago

VarunBatraIT commented 3 years ago

A lot of data is common yet they are separated like two island

  1. Connect has its own market depth buried in a struct and Ticker has its own independent.
  2. [5]DepthItem for ticker VS DepthItem for connect
  3. InstrumentToken is mentioned as uint32 in ticker and int in connect
rhnvrm commented 3 years ago

Hey

Thanks for reporting the issue. I'll create a new develop branch and try to refactor this.

rhnvrm commented 3 years ago

Hey @VarunBatraIT

We have drafted a new release at https://github.com/zerodha/gokiteconnect/releases/tag/v4.0.0-beta0 which include changes relating to this issue.

Please feel free to review and try this new release out and give feedback.

VarunBatraIT commented 3 years ago

First of all, the project has been delivered and unless it breaks, I don't believe that client will come back :)

On a quick look, there are still two islands connect and ticker and uint vs int issue (3)

Now that you are breaking things up for new devs:

There were some other issues that can be said quite relative but it was kind of really helpful. Out of which I remember one as following

Imagine that you have three ticker instant running because they wanted 6K instructs directly be listened to so needed three accounts. There was a need to recognize which account ticker has been received - this isn't possible without core changes to API. At least not when I coded it. One thing is to maintain a slice to keep track of ticker is being subscribed to other way was to do core changes - done that! Breaking changes oh yes!

I am not sure if this is a change or not - while you have a centeric request, to ease things up, I implemented retry in that :)

Anyways - everything I have done - for obvious reasons, client isn't comfortable in releasing it for public, earlier I was permitted and had following but it only made them scarier. Story of my life!

https://github.com/VarunBatraIT/kiteapi_un

rhnvrm commented 3 years ago

Hey thanks for taking out time and taking a quick look. Thanks for the feedback, will keep these points in mind.

Closing this for now as its resolved in master and v4 will be released soon.