Closed cckkaallee closed 7 months ago
Get Allowing DateTime to be null should make calling GetPositionsAsync() with no open positions possible.
client.V5Api.Trading.GetPositionsAsync() via BybitEnvironment.Testnet with 0 open positions yields error Message: [23] Deserialize JsonSerializationException: Error setting value to 'CreateTime' on 'Bybit.Net.Objects.Models.V5.BybitPosition'. data: { "retCode": 0, "retMsg": "OK", "result": { "nextPageCursor": "", "category": "linear", "list": [ { "symbol": "BTCPERP", "leverage": "10", "autoAddMargin": 0, "avgPrice": "", "liqPrice": "", "riskLimitValue": "100000", "takeProfit": "", "positionValue": "", "tpslMode": "", "isReduceOnly": false, "riskId": 10001, "trailingStop": "", "unrealisedPnl": "", "markPrice": "", "adlRankIndicator": 0, "cumRealisedPnl": "", "positionMM": "", "createdTime": "", "positionIdx": 0, "positionIM": "", "seq": -1, "updatedTime": "", "side": "", "bustPrice": "", "positionBalance": "", "leverageSysUpdatedTime": "", "size": "0", "positionStatus": "", "mmrSysUpdatedTime": "", "stopLoss": "", "tradeMode": 0 } ] }, "retExtInfo": {}, "time": 1708114419364 }
Thanks for the PR, but I did already fix this while updating the model so should be good in the latest version
Get Allowing DateTime to be null should make calling GetPositionsAsync() with no open positions possible.
client.V5Api.Trading.GetPositionsAsync() via BybitEnvironment.Testnet with 0 open positions yields error Message: [23] Deserialize JsonSerializationException: Error setting value to 'CreateTime' on 'Bybit.Net.Objects.Models.V5.BybitPosition'. data: { "retCode": 0, "retMsg": "OK", "result": { "nextPageCursor": "", "category": "linear", "list": [ { "symbol": "BTCPERP", "leverage": "10", "autoAddMargin": 0, "avgPrice": "", "liqPrice": "", "riskLimitValue": "100000", "takeProfit": "", "positionValue": "", "tpslMode": "", "isReduceOnly": false, "riskId": 10001, "trailingStop": "", "unrealisedPnl": "", "markPrice": "", "adlRankIndicator": 0, "cumRealisedPnl": "", "positionMM": "", "createdTime": "", "positionIdx": 0, "positionIM": "", "seq": -1, "updatedTime": "", "side": "", "bustPrice": "", "positionBalance": "", "leverageSysUpdatedTime": "", "size": "0", "positionStatus": "", "mmrSysUpdatedTime": "", "stopLoss": "", "tradeMode": 0 } ] }, "retExtInfo": {}, "time": 1708114419364 }