Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next-time field missing from result of GetHistoryOrdersAsync #53

Closed
EricGarnier opened this issue Jan 3, 2021 · 2 comments
Closed

next-time field missing from result of GetHistoryOrdersAsync #53

EricGarnier opened this issue Jan 3, 2021 · 2 comments

Comments

@EricGarnier
Copy link
Contributor

EricGarnier commented Jan 3, 2021

Hi @JKorf ,
the GetHistoryOrdersAsync api returns an IEnumerable of HuobiOrder. But for pagination purpose, a next-time is also returned by the server, when the query return to much data. Unfortunately, this field is not part of the data field, but after.
Here a sample : {"status":"ok","data":[{"id":180316741408065,"symbol":"zenbtc","account-id":12156447,"client-order-id":"","amount":"4.760000000000000000","price":"0.000419830000000000","created-at":1609685999833,"type":"sell-limit","field-amount":"0.0","field-cash-amount":"0.0","field-fees":"0.0","finished-at":1609686002967,"source":"spot-api","state":"canceled","canceled-at":1609686002959}, .... ],"next-time":1609684257688}.
What is the best way to implement this?
I can change the return value of the API to return an object with this field and an IEnumerable. Something like GetTickersAsync
Do you have a better idea?

Thanks.
Eric

@JKorf
Copy link
Owner

JKorf commented Jan 4, 2021

Hm it's annoying that the field isn't part of the regular 'data' field, however it is understandable from a data point of view. I don't think there is much choice, there would need to be a wrapper object as you suggested.

@EricGarnier
Copy link
Contributor Author

Here it is.
#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants