POST /v1/currencies
List active assets in the catalog with per-asset precision and capabilities.
/api/v1/currenciesAuth optionalReturns the active asset catalog: every currency/network combination the engine will receive or send right now. Aggregator integrations call this on startup and re-poll every 30–60 seconds to pick up operator-side asset toggles.
The body is served from a 30-second server-side cache. Calling more often returns the cached snapshot. The empty-body convention {} is honoured for forward compatibility. No filter fields are accepted today.
Request
(empty body)object{} as the request body. Unsigned callers may omit the auth headers entirely. Signed callers must still HMAC the empty object; the signature is computed over the literal two bytes {}.Response
{
"code": 0,
"msg": "",
"data": [
{
"code": "btc",
"coin": "BTC",
"network": "Bitcoin",
"name": "Bitcoin",
"recv": true,
"send": true,
"tag": null,
"logo": null,
"color": null,
"minAmount": null,
"maxAmount": null,
"precision": 8
},
{
"code": "usdt_trc20",
"coin": "USDT",
"network": "Tron",
"name": "Tether (Tron)",
"recv": true,
"send": true,
"tag": null,
"logo": null,
"color": null,
"minAmount": null,
"maxAmount": null,
"precision": 6
}
]
}data[].codestringdata[].coinstringdata[].networkstringdata[].namestringdata[].recvbooleandata[].sendbooleansend = false.data[].tagstring | nulldata[].logostring | nulldata[].colorstring | nulldata[].minAmountstring | nulldata[].maxAmountstring | nulldata[].precisionnumberErrors
| code | msg | HTTP | Description |
|---|---|---|---|
| 11 | UPSTREAM_ERROR | 503 | A required upstream is temporarily unavailable. Retry with exponential backoff. |
Code examples
# /v1/currencies accepts anonymous calls — no signing required.
BODY='{}'
curl -sS -X POST "https://0trace.io/api/v1/currencies" \
-H "Content-Type: application/json" \
--data "$BODY"
# Authenticated call (counts toward your rate-limit budget):
APIKEY="rWqZ...Rg"
APISECRET="G1JV...n4"
NONCE=$(openssl rand -hex 16)
SIGN=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$APISECRET" | sed 's/^.* //')
curl -sS -X POST "https://0trace.io/api/v1/currencies" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $APIKEY" \
-H "X-API-SIGN: $SIGN" \
-H "X-API-NONCE: $NONCE" \
--data "$BODY"Rate limit
Weight 1 per call. Unsigned calls bypass the per-partner bucket entirely; signed calls are charged 1 weight unit each.
Notes
The response always carries Cache-Control: no-store so HTTP intermediaries do not double-cache on top of our own server-side snapshot. Treat the 30-second cache window as the only freshness guarantee.