Invalid KC-API-PASSPHRASE on Kucoin v2

See original GitHub issue

OS: Windows Server 2019 Datacenter Programming Language version: Node.js 15.3.0 CCXT version: 1.47.3 Exchange: All Exchanges Method: kucoin.createOrder()

Hello!

I encounter a: AuthenticationError=o=kucoin Invalid KC-API-PASSPHRASE error for kucoin when I try to createOrder() (As I use the API keys, I am not sure if I should put the verbose: true as the keys are seen there?)

I use the v2 version of kucoin. I have followed this answer for v2 but still gets the error: https://github.com/ccxt/ccxt/issues/8187

I have tried to put both the “API Secret” and the “API Passphrase” as kucoin.secret with the same error. I have tried to create 2 new API keys with the same problem. I also tried to use the kucoin.headers line.

What could be wrong in this code?

Thank you!

create_Order();
async function create_Order() { 

    const kucoin = new ccxt.kucoin({ enableRateLimit: true })
    kucoin.apiKey = "6078xxxxxxxxxxxxxxxxxxxx"; //I have confirmed that this is correct!
    kucoin.secret = "69d00xxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; //I have tried both the "API Secret" and "API Passphrase"
    kucoin.password = "1xxxxx"; //This is the trading password on kucoin which is 6 digits

    kucoin.headers = { 'KC-API-PASSPHRASE': 'myAPIpassphrase' } //I have tried to add this line of code also 

    const response = await kucoin.createOrder("TRX/USDT", "limit", "buy", 10, 0.14);
    console.log(response);
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jackpotcitycocommented, Apr 18, 2021

Thanks, that was good to know. Thanks for this help!

2reactions
IanFLeecommented, Apr 18, 2021

@IanFLee hi! Thanks for your feedback! We are investigating, will get this resolved asap.

thank you. I’ve found my solution, it was a small error hidden somewhere. However OP may find success the same way I did: the API password is different than the 6 digit trading code. thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

kucoin Invalid KC-API-PASSPHRASE · Issue #11040 · ccxt ...
You passphrase must be your API key trading password, not your funding password and not your login password. Hope that helps, let us...
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 >
Error: {"code":"400004","msg":"Invalid KC-API-PASSPHRASE"}
Enter 'cointracking' into the API Passphrase field · Create a new API key · DISABLE the trade permission for your new API key...
Read more >
Invalid KC-API-PASSPHRASE trying to do basic request using ...
Invalid KC -API-PASSPHRASE trying to do basic request using API demo in python. This is pretty much a copy of the python example...
Read more >
KuCoin API key upgrade operation guide
Step 2: After creating the V2 version of the API key, you will receive 3 pieces of information in the following: Key; Secret;...
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