Creating End User Accounts: Introduction
How to Create Virtual Accounts - The Introduction
After the Initial setup of your Exchange or Application is complete, it's time to create End User Accounts.
Creating End User Accounts
- When a new End User signs up in your Exchange or Application, Virtual Account (VA) ledger accounts must be created for them.
- Every new End User should have a VA for every single supported blockchain asset in the exchange.
- Every VA in the ledger must have a defined currency.
- The currency cannot be changed in the future.
- During the creation of the account, the XPUB from the Master Exchange Wallet must be entered. This is the first connection between the blockchain and the ledger.
- Every account should be created with the
externalId
of the customer. This makes it possible to list all accounts for the specific customer. An account should also have the accounting currency set up correctly.
Request example:
curl --location --request POST 'https://api.tatum.io/v3/ledger/account' \
--header 'x-api-key: {YOUR_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
"currency": "BTC",
"xpub": "tpubDE8GQ9vAXpwkp37PCCRUpCoeShpC4WiCcACxh8r3nnKjfRPRqw3w58EgkfNiBy1MaRqX1oAAxwAxauEUG7vWupSh5m15znGy7vE7aE6CWzb",
"accountingCurrency": "EUR",
"customer": {
"externalId": "SERVICE_CUSTOMER_EXTERNAL_ID"
}
}'
//Response:
{
"currency": "BTC",
"active": true,
"balance": {
"accountBalance": "0",
"availableBalance": "0"
},
"frozen": false,
"accountingCurrency": "EUR",
"xpub": "tpubDE8GQ9vAXpwkp37PCCRUpCoeShpC4WiCcACxh8r3nnKjfRPRqw3w58EgkfNiBy1MaRqX1oAAxwAxauEUG7vWupSh5m15znGy7vE7aE6CWzb",
"customerId": "5fb7bdf6e96d9ab593e191a6"
"id": "5fb7bdf6e96d9ab593e191a5"
}
Good to Know
- The customer's
externalId
should be a unique identifier of the user in your database.
Never share your Mnemonics and/or Private Keys with anyone. It is your responsibility to keep this information safe.
Updated 6 months ago