Closed dante1989 closed 6 months ago
You should check the value of BybitFuturesPositions_CheckBalance.Success. If this is false then the call wasn't successful and there is additional info in the BybitFuturesPositions_CheckBalance.Error property on why it failed
ok, i wil try now
I don't see this error appearing anymore, maybe this error comes from Bybit's server and not from our API, thank you
Dim BybitFuturesPositions_CheckBalance As WebCallResult(Of Bybit.Net.Objects.Models.V5.BybitResponse(Of Bybit.Net.Objects.Models.V5.BybitPosition)) = Nothing
Try
BybitFuturesPositions_CheckBalance = Await clientBybit.V5Api.Trading.GetPositionsAsync(Bybit.Net.Enums.Category.Inverse, "ETHUSD") For Each LongShortPosition In BybitFuturesPositions_CheckBalance.Data.list Msgbox(LongShortPosition.Quantity) Next Catch ex As Exception Msgbox (ex.Message) End Try
For Inverse, Sometimes it works very well, sometimes i got error: "Object reference not set to an instance of an object" for some hours. For Linear, it is ok