JKorf / Kucoin.Net

A C# .netstandard client library for the Kucoin REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/Kucoin.Net/
MIT License
113 stars 60 forks source link

please update GetSymbolsAsync() in to use v2 not v1 #184

Closed dj-jordan closed 1 year ago

dj-jordan commented 1 year ago

Hiya,

FYI.. Kucoin "/api/v1/symbols" is now depreciated, we need to now use v2 Refer notes at: docs.kucoin.com/#get-symbols-list-deprecated

  1. The baseCurrency (baseAsset) is inaccurate in v1 as can be noted from the changes in the payload sample between v1 and v2 - i.e. GALAX-USDT erroneously specifies the base asset as GALA (and not GALAX) in v1
  2. The API returns mixed case in v1 for some assets - e.g. aUSD and ECOx in v1, which is AUSD and ECOX in v2.

e.g. return await _baseClient.Execute<IEnumerable<KucoinSymbol>>(_baseClient.GetUri("symbols"**,2**), HttpMethod.Get, ct, parameters: parameters).ConfigureAwait(false);

Thanks! p.s. While making edits to GetSymbolsAsync, can you please also add the missing 'minFunds' response paramter as per issue #182

dj-jordan commented 1 year ago

Note in terms of case differences the full list of symbols with mixed case return issues see below...

In /api/v1/symbols we have:

image

In /api/v2/symbols we have:

image
dj-jordan commented 1 year ago

..and for completeness, the full set of erroneous Kucoin assets in v1 (red) with the corrected values shown as per v2 (green) of the api.

image
dj-jordan commented 1 year ago

Note: until GetSymbolsAsync() is updated to v2, I am using the following TSQL base to get correct base asset returns

`SELECT CASE baseasset WHEN 'OXEN' THEN 'LOKI' WHEN 'REV' THEN 'REVV' WHEN 'BSV' THEN 'BCHSV' WHEN 'WAXP' THEN 'WAX' WHEN 'GALA' THEN 'GALAX' ELSE upper(baseasset) END as baseasset

FROM kucoin_symbol_info_table`

JKorf commented 1 year ago

I've switched it to V2 and added the minFunds property in the latest version. Thanks for the detailed report