burakoner / OKX.Api

Up-to-date, most-complete, well-organized, well-documented, easy-to-use, multi-task and multi-thread compatible OKX Cryptocurrency Exchange Rest and Websocket Api Wrapper
MIT License
39 stars 15 forks source link

GetAccountPositionsAsync error #4

Closed overstartup closed 1 year ago

overstartup commented 1 year ago

This method also has error.

 api.Wallet.GetAccountPositionsAsync(OkxInstrumentType.Swap, preOrder.Symbol)

{401:  }

It has the same issue in "GetAccountPositionsHistoryAsync" , too.

burakoner commented 1 year ago

It has been fixed with https://github.com/burakoner/OKX.Api/commit/da27018a20640b5e5ba2186311d54b3359569355 and https://www.nuget.org/packages/OKX.Api/1.0.3

overstartup commented 1 year ago

But still it has error: could you please check it again?

Sending GET signed request to https://www.okx.com/api/v5/account/positions?instId=LINK-USDT-SWAP&instType=SWAP 
2023/04/18 12:47:25:233 | Warning | OKX RestApi | [8] Error received in 279ms: {"msg":"Invalid Sign","code":"50113"}
burakoner commented 1 year ago

Inspecting...

burakoner commented 1 year ago

It was related with signature algorithm. I've fixed it. You can see commit https://github.com/burakoner/OKX.Api/commit/6f5f04f5beeb412c4aaa7a995268d5a70819d84e and use nuget package https://www.nuget.org/packages/OKX.Api/1.0.4 for new version