Response envelope, pagination & money
Success envelope
Every success response is wrapped:
{ "requestId": "req_8f3c1a", "data": { } }
requestId is also returned in the X-Request-Id header on every response
(including errors) — log it and include it in support requests.
Exception: CSV/PDF export endpoints stream the file directly and are not wrapped in the envelope, but they still return the
X-Request-Idheader.
Keyset pagination
List reads return data plus a meta cursor block:
{
"data": [],
"meta": { "nextCursor": "b3JkZXJf…", "hasNextPage": true, "limit": 50 }
}
limitis 1–200 (default 50).- To page forward, resend the request with
?cursor=<meta.nextCursor>. - Stop when
hasNextPageisfalse. - Cursors are opaque — don't parse or construct them.
Money is always strings
All monetary and unit fields (usdtAmount, lockedPrice, units, netUsdt,
netUnits, statement amounts) are decimal strings at a consistent 6-decimal
scale.
Never parse amounts as floats
Parse amounts with an arbitrary-precision decimal library, never a float/double
— 0.1 + 0.2 !== 0.3 in binary floating point, and crypto amounts overflow
float64. Keep them as strings end-to-end.