sammchardy / python-kucoin

Kucoin REST and Websocket API python implementation
https://python-kucoin.readthedocs.io/en/latest/
MIT License
350 stars 148 forks source link

Get_Symbols() fail #119

Open hammerjoe opened 2 years ago

hammerjoe commented 2 years ago

def get_symbols(self):

    return self._get('symbols', False)

Theres an error with the get_symbols call. It doesnt take the optional parameter to get the data for one token and it errors out with "too many parameters given. As per the docs :

GET /api/v1/symbols

PARAMETERS Param Type Description market String [Optional] The trading market.

rhubear25 commented 1 year ago

Seems like this lib is a disaster... basics don't work. Example below.... get_ticker & allTickers CODE MIXED. (I've taken out the comments from the lib, so that the Proc is easier to read).

get_ticker Proc: accesses 'market/allTickers' API path. There doesn't seem to be an allTickers Proc. Not gonna bother posting separately, seems this lib is not maintained.

def get_ticker(self, symbol=None):

    data = {}
    tick_path = 'market/allTickers'
    if symbol is not None:
        tick_path = 'market/orderbook/level1'
        data = {
            'symbol': symbol
        }

    return self._get(tick_path, False, data=data)