A KuCoin API credential lets whoever holds it operate your KuCoin account through the API, within the permissions granted to that key. Depending on the permissions, that covers reading balances and orders, placing and cancelling trades, transferring between accounts and requesting withdrawals. It is a direct financial risk. A KuCoin API credential is made of three pieces: a key, a secret and a passphrase, and an attacker needs them together. Delete the key first, then check what was done with it.
Check your GitHub account for leaked secrets — free
- Provider
- KuCoin
- Severity
- High
- Impact
- Payments and customer data
- Checked live by LeakWatch
- No
What a KuCoin API key looks like
KuCoin shows you three values when you create an API key:
XXXXXXXXXXXXXXXXXXXXXXXX API key (24 hexadecimal characters, masked)
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX API secret (UUID format, masked)
(a passphrase you choose yourself) API passphrase
The key is 24 hexadecimal characters. The secret is a UUID: 36 characters in groups of 8, 4, 4, 4 and 12, separated by dashes. The passphrase is chosen by you at creation, so it has no fixed format. Requests are signed with the secret, and the passphrase is sent along with them. None of them has a vendor prefix, so context matters: variable names such as KUCOIN_API_KEY, KUCOIN_API_SECRET and KUCOIN_API_PASSPHRASE, or calls to api.kucoin.com. If the key and secret leaked but the passphrase did not, the credential is harder to use, but you should still treat it as exposed, because the passphrase is often in the same file.
How KuCoin API keys get leaked
- Trading bots. A bot or market-making script committed with its credentials in a configuration file.
- Environment files.
KUCOIN_API_KEY,KUCOIN_API_SECRETand the passphrase in a.envfile or compose file pushed to a repository. - Multi-exchange tools. Setups that list the keys of several exchanges in one file, which is then shared or published.
- Notebooks. Analysis notebooks that call the API, saved with the credentials visible in a cell or in its output.
- Support threads and screenshots. A key creation page captured with the secret shown, or credentials pasted into a forum post to ask for help signing requests.
What to do in the first hour
- Delete the key. Sign in to KuCoin, open API management and delete the exposed key. Do it before anything else, since the secret is only displayed once at creation and cannot be recovered anyway; a new key is the only way forward.
- Check the account security. Confirm that two-factor authentication is active and review recent logins and devices.
- Review orders and trades. Look at open orders, order history and fills since the exposure. Cancel orders you did not place.
- Check transfers and withdrawals. Review the history of transfers between sub-accounts and of withdrawals, and the withdrawal address book. An unknown address means contacting KuCoin support immediately, because crypto transfers cannot be reversed.
- Look at sub-accounts. If you use sub-accounts, check whether any have API keys you did not create.
- Create a new key with minimal permissions. Enable only what the application needs, leave withdrawal permission off unless indispensable, and restrict the key to the IP addresses of your server if the option is offered.
- Deploy the new credentials from a secret manager and clean the repository. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at KuCoin
KuCoin API keys are managed from the API management page of your account, after you sign in. Find the exposed key by its remark or its first characters and delete it; the old key, secret and passphrase then stop working together. KuCoin’s developer documentation on generating an API key explains how keys, secrets and passphrases are created. A person has not confirmed the exact menu wording for this guide, and the interface can change, so if what you see differs, look for the page where API keys are listed, and follow KuCoin’s documentation.
How LeakWatch detects it
Two rules cover this credential, and both are context based.
The rule called KuCoin Access Token looks for the word kucoin, in any letter case, followed by an assignment such as =, : or =>, optionally with quotes, and then exactly 24 hexadecimal characters. A hex string of another length, or with no kucoin name nearby, is not reported.
The rule called KuCoin Secret Key uses the same context but expects a UUID after the assignment: 8, 4, 4, 4 and 12 hexadecimal characters separated by dashes.
Both have severity high. A passphrase has no format, so LeakWatch cannot detect it. These types are not checked live: LeakWatch does not send any request to KuCoin with the values it found.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Is the key alone dangerous without the secret?
The key identifies the credential but cannot sign requests. Treat it as leaked anyway if it sat in the same file as the secret, and delete the key to be safe.
Can the passphrase be changed on an existing key?
Treat the three values as one unit. If any of them is exposed, delete the key and create a new one rather than trying to patch it.
What if I find a withdrawal I did not make?
Contact KuCoin support straight away with the transaction details. Delete the key first, so that no further operation can be made.