KDC Open APIv1/Overview & Conventions
DEVELOPER GUIDE

Overview & Conventions

KDC Open API v1 provides programmatic access to market data, account balances, trading, and lead trading with the exact same schemas and rules as the KDC App.

Production Base URL
https://api.kdc.exchange/open/v1

All REST endpoints are served over HTTPS under the /open/v1 prefix.

Encoding & Timezone
JSON (UTF-8) · UTC ms

UTF-8 JSON payloads with UTC millisecond timestamps and decimal strings.

Data & Protocol Conventions

ConventionSpecification
Content-Typeapplication/json (UTF-8) for all POST request bodies and all responses.
Amounts, Prices & RatesAlways encoded as decimal strings (e.g. "97500.00") to avoid floating-point precision loss.
64-bit IdentifiersOrder IDs, trade IDs, and UIDs are serialized as strings to preserve precision in JavaScript.
TimestampsUnix timestamps in UTC milliseconds (int64). Sync clocks via GET /open/v1/time.
Accept-LanguageOptional header (zh-CN, zh-TW, en, ja, ko, vi, th, id, es, pt, ru, tr) localizing display names.

Unified Response Envelope

Every endpoint returns a consistent JSON wrapper. code === 0 indicates success; non-zero responses include an error key in msg, optional interpolation params, and a traceId for support.

Response Envelope Format
{
  "code": 0,
  "msg": "",
  "params": {},
  "data": {
    "serverTime": "1795400000000"
  },
  "traceId": "kdc-7f9a2c4b8e1d"
}
HTTP Status Codes: 200 for success and standard business errors; 401 for missing/invalid signature, expired timestamp, or replay; 403 for IP denied, missing permission, or disabled/expired key; 404 for unknown route; 429 for rate limit exceeded.