ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
32.45k stars 7.46k forks source link

okex raise an error in func:load_markets #14219

Closed ldkklj closed 2 years ago

ldkklj commented 2 years ago
okex = ccxta.okex({
    'apiKey': 'yyyyyyyyyyyyyyyyyyy',
    'secret': 'ccccccccccccccccccc',
    'password': 'ddddddddddddd',
})
market = await exchange.load_markets()

okex GET https://www.okx.com/api/v5/asset/currencies


When load_market,raise this error . Only okex raise this erro;biance/mx/ftx all run this code well.
carlosmiei commented 2 years ago

Hello @ldkklj, If you provide credentials to OKEX a private endpoint will be used to fetch currencies, one of the steps of loading the markets, so please make sure your credentials are correct. I've also tested on my side and worked fine with valid credentials.

Alternatively, you can load its markets without any credentials by doing:

okex = ccxt.okex({})
market = await exchange.load_markets()