question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kucoin futures Invalid KC-API-PASSPHRASE

See original GitHub issue

MUST READ THIS BEFORE SUBMITTING ISSUES (read the links, then delete this message before submitting):

Make sure your local version of CCXT is up to date. Check by comparing the output of ccxt.version to https://github.com/ccxt/ccxt/blob/master/package.json#L3

  • OS:
  • Programming Language version:
  • CCXT version:
kucoin_futures = ccxt.kucoinfutures({
    "apiKey": config.KUCOIN_FUTURES_API_KEY,
    "secret": config.KUCOIN_FUTURES_API_KEY,
    "password": config.KUCOIN_PASSWORD
})
balance = kucoin_futures.fetch_balance()
print (balance)

Got

ccxt.base.errors.AuthenticationError: kucoinfutures Invalid KC-API-PASSPHRASE

BUT When i do same with spot, everything works

kucoin_spot = ccxt.kucoin({
        "apiKey": config.KUCOIN_API_KEY,
        "secret": config.KUCOIN_SECRET_KEY,
        "password": config.KUCOIN_PASSWORD
    })
balance = kucoin_spot.fetch_balance()
print (balance)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
KindSpideycommented, May 17, 2022

Thank you very much for wasting so much time on me. I don’t know what it it was, but now it works and I logged in Futures. Was some mistake in config file i guess. Dont know which one, but if not your exampe with direct request i would figure it out much longer. Thank you very much again!

1reaction
samgermaincommented, May 16, 2022

Yep, and i use

"apiKey": config.KUCOIN_FUTURES_API_KEY,
    "secret": config.KUCOIN_FUTURES_API_KEY,

The value for config.KUCOIN_FUTURES_API_KEY can not match config.KUCOIN_API_KEY, you must create a specific api key on kucoinfutures, which is not a kucoin spot api key. Just checking that you’re doing that

for futures, as you can see. Isnt password the same for spot and futures?

The password won’t be the same, you create specific passphrase to use with the kucoin futures api when you create the api key. Also make sure that you have Trade checked

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: {"code":"400004","msg":"Invalid KC-API-PASSPHRASE"}
Log in into your KuCoin account and navigate to the API page (https://kucoin.com/account/api); Enter 'cointracking' into the API Passphrase ...
Read more >
Kucoin Api KC-API-PASSPHRASE is Invalid - Stack Overflow
This caught me offguard too. Passphrase is the password to your account not the trading 6 digit code you use.
Read more >
KuCoin API key upgrade operation guide
KC -API-PASSPHRASE The passphrase you specified when creating the API key. KC-API-KEY-VERSION You can check the version of API key on the page...
Read more >
Invalid KC-API-PASSPHRASE trying to do basic request using ...
401 {'code': '400004', 'msg': 'Invalid KC-API-PASSPHRASE'}. This is pretty much a copy of the python example in the kucoin docs.
Read more >
How to Connect Your Kucoin Account to CoinStats
Now enter your API Name (e.g. CoinStats), enter an API Passphrase (security code for your API), and give the permissions you wish.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found