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/
94 stars 67 forks source link

SubscribeToOrderbookUpdatesAsync only works when depth is 1 #245

Closed q0v0p closed 19 hours ago

q0v0p commented 5 days ago

Does SubscribeToOrderbookUpdatesAsync only support a depth of 1?

image

q0v0p commented 5 days ago

I want to get data at a depth of 50 quickly with delta update.

image

q0v0p commented 1 day ago

Sorry if my method is wrong, I would be grateful if you could show me the correct way to do it. @JKorf

JKorf commented 20 hours ago

Any reason you're looking in the source? What you're looking at there is an implementation of the a book ticker subscription for a shared interface. If you're looking to just subscribe to an order book stream you can use this:

var subscriptionResult = bybitSocketClient.V5SpotApi.SubscribeToOrderbookUpdatesAsync("ETHUSDT", 50, update =>
{
    // Handle update
});
q0v0p commented 19 hours ago

Sorry, the problem has been resolved. I had mistakenly thought that the depth could be set freely. I will close this issue. Thank you for your cooperation. @JKorf