Reference
Every environment variable, platform setting, admin endpoint, permission and background job the KuCoin provider touches, with the connection defaults the shared exchange client is built with.
Everything on this page is read from the project root .env, the settings
table, or the exchange database row. Nothing here has a KuCoin-specific admin
form beyond the Exchange screen.
Environment variables
All four live in the project root .env, not backend/.env. The three
APP_KUCOIN_* names are not hard-coded anywhere — the backend builds them at
runtime as APP_${provider.toUpperCase()}_API_* from the provider name in the
database, which for this product is always kucoin. Renaming them breaks
nothing loudly; it simply means no credentials are found.
password. NOT checked by the platform's own credential guard or by the system health check — ccxt is what rejects its absence.There is no sandbox or testnet variable for this provider. Anything you point it at is live.
Platform settings
These live in the settings table and are strings, not booleans — the value for
"off" is the string "false".
The exchange row
Provider state lives in the exchange table, seeded on install. The KuCoin row:
| Column | Value |
|---|---|
name |
kucoin — the ccxt class id, and the source of the APP_KUCOIN_* prefix |
title |
KuCoin |
type |
spot |
productId |
37179816 |
status |
The active flag. Only one row may be true |
licenseStatus |
Synced from the presence of lic/37179816.lic on every read |
proxyUrl |
Optional per-provider proxy. Credentials in it are masked on read |
Re-running the seeder refreshes productId, title, description, link and
type. It never touches status or version, so an update cannot silently
switch your provider.
Connection defaults
The shared ccxt client is built once per process with these, and none of them are configurable:
| Setting | Value | Why |
|---|---|---|
| Timeout | 30,000 ms | Per request |
enableRateLimit |
true | ccxt throttles before KuCoin has to |
recvWindow |
60,000 ms | Timestamp tolerance |
adjustForTimeDifference |
true | Clock offset applied to signed requests |
| Signing bias | 500 ms behind server time | Being slightly behind is always safe; being ahead is not |
| Fallback offset | 1,000 ms behind | Used when fetchTime itself fails |
| Clock resync | Every 5 minutes | Background, never blocks a caller |
| HTTP agent | Keep-alive, IPv4 only | Unless a proxy is configured, in which case the proxy agent replaces it |
| Init retries | 3, five seconds apart | Then a 30-minute cooldown returning nothing |
| Rate-limit ban | 1 minute, clamped to 24 hours max | Stored in Redis as exchange:ban_status with a matching TTL |
Admin endpoints
Provider lifecycle:
Data import and operations:
Permissions
Grant these to any role that operates the provider. Keys are validated against the admin route they gate — see Permissions.
| Permission | Covers |
|---|---|
view.exchange |
The Exchange provider screen |
edit.exchange |
Enable/disable, proxy, licence activation, verify |
view.exchange.market |
The market table |
create.exchange.market |
Market import |
edit.exchange.market |
Editing a market's precision, limits and fees |
delete.exchange.market |
Removing markets |
edit.ecosystem.market |
Enabling or disabling a market, single or bulk |
view.spot.currency / edit.spot.currency |
The spot currency table |
create.spot.currency |
Currency import |
view.exchange.balance |
Live exchange balances |
view.exchange.fee |
The fee comparison screen |
view.exchange.chart / manage.exchange.chart |
Candle cache read / build |
view.exchange.order / edit.exchange.order / delete.exchange.order |
The spot order table |
Background jobs
All of these depend on a working provider connection. While the Redis ban marker is set, they run and report success while doing nothing.
| Job | Every | What it does |
|---|---|---|
processPendingSpotOrders |
1 min | Reconciles open spot orders against KuCoin — credits fills, refunds cancellations, handles partials |
processCurrenciesPrices |
2 min | Refreshes exchange currency prices |
reconcileSpotWithdrawals |
5 min | Finds withdrawals stranded by a restart between the debit and the send; confirms or refunds them |
processSpotPendingDeposits |
15 min | Catch-up deposit detection for anything the live WebSocket path missed |
processPendingWithdrawals |
30 min | General pending-withdrawal sweep |
The live deposit WebSocket is not a cron: it polls every 15 seconds for 30 minutes while the user has the deposit screen open, then stops.
Log prefixes
Backend logs are tagged by module. When diagnosing this provider, these are the ones that matter:
| Tag | Emitted by |
|---|---|
EXCHANGE |
Client construction, credential checks, clock sync, ban handling, network mapping, deposit address cascade |
SPOT_DEPOSIT |
The live deposit verification WebSocket |
WITHDRAW |
The user withdrawal path |
CRON |
The reconciliation and catch-up jobs |
CURRENCY |
Currency loading and price processing |