Skip to main content
An external account is a wallet address a client holds and signs for, recorded as an acc_… id with kind: "external". Register one with POST /dapi/v1/client/accounts. The routes here require X-Hevn-Account with the client’s id (Acting as a client). The same routes return sub accounts of your own account, told apart by kind.

Register an address

Call POST /dapi/v1/client/accounts with the network and the address. Fields are on Add an account.
Response 201, Location: /dapi/v1/client/accounts/acc_9f2c…
Store accountId. It names the account in accountId, sourceAccount and destinationAccount on the money routes.

Address rules

Payouts need an account on base. An account on another network receives payins and returns 409 source_account_unsupported as a payout source.

Retries

The address and the label identify the request. An Idempotency-Key is accepted and is not needed.

Read accounts

Call GET /dapi/v1/client/accounts for a page of the client’s active accounts, oldest first, or GET /dapi/v1/client/accounts/{accountId} for one. Paging follows Pagination.
The fields are on List accounts and Retrieve one account.

Balance

balance is the USDC at the address on chain. A read refreshes it from the network when the stored value is older than a minute. When the network does not respond, the route returns the last value read. syncedAt is the time of the last successful read, so compare it with the clock before you show the balance as current. External accounts have no row in GET /dapi/v1/client/balance.

Archive an account

Call DELETE /dapi/v1/client/accounts/{accountId}. The route returns the archived account. See Archive an external account.
Archiving closes the virtual accounts opened on the account. Take their account details out of use with payers before you archive.

Errors

The last three are returned by the routes in Money movement. The envelope is in Errors.