DigitalRuby / ExchangeSharp

ExchangeSharp is a powerful, fast and easy to use .NET/C# API for interfacing with many crypto currency exchanges. REST and web sockets are supported.
https://www.digitalruby.com
MIT License
741 stars 374 forks source link

Fail to create order: Param validation for 'symbol' failed on the 'symbol' tag #793

Closed mytran1998 closed 1 year ago

mytran1998 commented 1 year ago

Hello all, i have issue when create order with ExchangeBybitAPI My code:

var exchangeAPI = await ExchangeAPI.GetExchangeAPIAsync<ExchangeBybitAPI>();
exchangeAPI.LoadAPIKeysUnsecure("xxxxx", "yyyyyyyy");

//var rs = await exchangeAPI.GetOpenOrderDetailsAsync("BTCUSDT");
ExchangeOrderRequest orderRequest = new ExchangeOrderRequest() {
    MarketSymbol = "SOLUSDT",
    IsBuy = false,
    OrderType = ExchangeSharp.OrderType.Limit,
    Amount = System.Convert.ToDecimal(5),
    Price = System.Convert.ToDecimal(13),
};
var rs = await exchangeAPI.PlaceOrderAsync(orderRequest);

Log.Info(rs);

I checked symbol in market symbol:

var symbols = await exchangeAPI.GetMarketSymbolsAsync();
foreach(var symbol in symbols)
{
    Log.Info(symbol);
}

Have error when submit: Param validation for 'symbol' failed on the 'symbol' tag

Note: SOLUSDT have in market symbol

All pair have USDT can't create order. Please help me check it!!! Thanks team

vslee commented 1 year ago

There were some ByBit changes in the latest release (v1.0.4). Give that a try. If it is still having the same problem, feel free to reopen this issue.