latestOpenAPI 3.1.02026-08-108094177.6 KB

087dcf516ce2

Delegated Contract Mode

Execute currency exchange

Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Exchanges one fiat token balance for another on behalf of the user. Amounts are smallest-unit strings (100.00 USD is "10000"). requestId is the idempotency key; keep it stable across retries.

post/v1/exchange

Headers

X-Api-Signaturestring required

Partner's EIP-191 signature (0x-prefixed hex).

X-Api-Deadlinestring required

Unix seconds when the request signature expires (within 5 minutes).

X-Api-PublicKeystring

Partner's signer Ethereum address.

Request body

urIdinteger required

UR user ID.

inputTokenstring required

Input token symbol from /v1/tokens.

outputTokenstring required

Output token symbol from /v1/tokens.

amountstring required

Exchange amount in smallest units.

requestIdstring required

Idempotency key; reuse on retry.

Response

Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.

codeinteger required

0 on success; non-zero indicates a business rejection.

messagestring required

Human-readable diagnostic; empty on success.

{"stackTrail":"components:schemas:DcEnvelope:properties:data","oasType":"schema","type":"unknown","description":"Business payload. Shape depends on the endpoint."}