DAI API Documentation
This API lets a merchant hold balances on behalf of its own customers: credit incoming crypto transfers, pay out to external addresses, settle between customers, and trade — all against one integration token.
Everything an integration does happens through the calls documented here: opening a customer, issuing an address, placing an order, sending a payout.
A dashboard is available alongside the API for transaction history, reports and exports.
All requests go to https://api.example.com, and every path carries the /api prefix.
Quick Overview
- Members and accounts — open a customer, get one account per asset, read balances
- Deposit addresses — issue an address per customer and network, optionally with an expiry
- Auto-conversion — have whatever arrives on an address swapped into a chosen asset automatically
- Withdrawals — quote the fee, then pay a customer's balance out to an external address
- Transfers — move balance between two customers of the same owner
- Trading — place market and limit orders for a customer, cancel them, and read the fills
- Webhooks — register endpoints to be notified on
- Service — a public health check
Getting Your API Token
API tokens are issued manually — you receive yours rather than generating it.
- Store it server-side — it has full access to your account, payouts included
- Send it in the
Api-Tokenheader on every request except/api/health
/api/assetscurl 'https://api.example.com/api/assets' \
-H 'Api-Token: YOUR_API_TOKEN'
The catalogue you get back is the merchant's own: the fee fields on List Assets are resolved for your fee group.
Authentication covers the rest: what a token does and does not allow, and what to do when one is rejected.
Your First Four Calls
A working integration is reachable in four requests:
# 1 — what can I accept, and on which networks?
GET /api/assets
# 2 — open a customer
POST /api/members {}
# 3 — give that customer an address to be paid at
POST /api/accounts/{account_id}/deposit_addresses {"dchain_id": "trc20usdt"}
# 4 — read what arrived
GET /api/deposits?member_id=90210
Creating a member also creates one account per asset, so step 3 can use the
account of whichever currency you want to be paid in. Note that both creates answer
201, not 200.
The machine-readable specification
The API publishes an OpenAPI specification, rendered as a Swagger UI:
Use it to try a call against a live service, to import the API into Postman, or to generate a client in your language.
Next Steps
- How It Works — the end-to-end money lifecycle
- API Conventions —
POSTanswers201, lists are paginated envelopes, amounts are strings, and nothing is idempotent - Authentication — the token, and the two public endpoints
- List Assets — the only endpoint whose response is fully documented
- Create Withdrawal — the most consequential call in the API
- Swagger UI — the OpenAPI specification, for trying calls and importing the API