Invalid KC-API-PASSPHRASE on Kucoin v2
See original GitHub issueOS: 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:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Related StackOverflow Question
Thanks, that was good to know. Thanks for this help!
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.