Closed xiuxiang closed 1 year ago
Sorry for delay, I was on vacation. You can track original response with RawResponse as below.
var api = new OKXRestApiClient(new OKXRestApiClientOptions
{
RawResponse = true,
});
var call = await api.SomeMethodToCall();
var rawResponse = call.Raw;
Hello, I am encountering a similar error. The Response object appears to be empty, what could be the reason for this, do you have any information on this case? Thanks for assist
var trade_01 = await api.OrderBookTrading.Trade.PlaceOrderAsync("BTC-USDT", OkxTradeMode.Cash, OkxOrderSide.Buy, OkxPositionSide.Long, OkxOrderType.MarketOrder, 0.1m);
Hello, I am encountering a similar error. The Response object appears to be empty, what could be the reason for this, do you have any information on this case? Thanks for assist
var trade_01 = await api.OrderBookTrading.Trade.PlaceOrderAsync("BTC-USDT", OkxTradeMode.Cash, OkxOrderSide.Buy, OkxPositionSide.Long, OkxOrderType.MarketOrder, 0.1m);
When I sent a request with Postman, I received a response like below, the reason for the error is due to insufficient balance, but the error message returned in the data is not being handled, I guess an improvement is needed here.
service response:
{
"code": "1",
"data": [
{
"clOrdId": "b15",
"ordId": "",
"sCode": "51008",
"sMsg": "Order failed. Insufficient USDT balance in account. ",
"tag": ""
}
],
"inTime": "1709043826429122",
"msg": "All operations failed",
"outTime": "1709043826429623"
}
api.SetApiCredentials has been set correctly var trade_01 = api.PlaceOrder("BTC-USDT", OkexTradeMode.Cash, OkexOrderSide.Buy, OkexPositionSide.Long, OkexOrderType.MarketOrder, 0.01m); Error : 1: All operations failed There is no specific error message, I don't know how to deal with it