JKorf / HTX.Net

A C# .netstandard client library for the Huobi REST and Websocket Spot and Swap API focusing on clear usage and models
https://jkorf.github.io/HTX.Net/
MIT License
73 stars 52 forks source link

The returned result does not contain OrderID #89

Closed wecando168 closed 1 year ago

wecando168 commented 2 years ago

https://github.com/JKorf/Huobi.Net/blob/284f4c0f899bd36410067389f95e7e83db403955/Huobi.Net/Clients/SpotApi/HuobiClientSpotApiTrading.cs#L310 The returned result does not contain OrderID. In the official API, the returned result of querying the order through clientorderid has been triggered and OrderID will be returned

JKorf commented 2 years ago

Not sure if I understand correctly, but the result object (HuobiOrder) has an Id property, which is the order id. Isn't that what you're looking for?

wecando168 commented 2 years ago

GetConditionalOrderAsync() will return a HuobiConditionalOrder, not HuobiOrder. I see that HuobiOrder contains id, but HuobiConditionalOrder only contains ClientOrderId that is to say, when I use GetConditionalOrderAsync to get an order that has entered the trading state, I cannot get the OrderID which is in the official document, can get the OrderID,. I don't know if I have expressed it clearly, you can look at the official document The Response Content of https://huobiapi.github.io/docs/spot/v1/en/#query-a-specific-conditional-order, compared with the return type HuobiConditionalOrder you provided, your return is missing OrderID

JKorf commented 1 year ago

Has been fixed