JKorf / Bybit.Net

A C# .netstandard client library for the Bybit REST and Websocket V5 API focusing on clear usage and models
https://jkorf.github.io/Bybit.Net/
91 stars 62 forks source link

Return value of GetUserTradesAsync #212

Open hcanak opened 1 month ago

hcanak commented 1 month ago

Hello,

GetUserTradesAsync returns BybitUserTrade which has a field name IsLeverage . I see that IsLeverage is always null in my practices. It should be true for margin trades and false for spot trades.

Can you have a look ? @JKorf Thanks for your great efford...

JKorf commented 1 month ago

Hi, it seems like the property is only listed in the socket update model here:
https://bybit-exchange.github.io/docs/v5/websocket/private/execution but not in the rest request response here:
https://bybit-exchange.github.io/docs/v5/order/execution

So it seems its not returned in the rest request, which is why it returns to null

hcanak commented 1 month ago

So how can i know if it is a spot or margin trade?