Create new account
POST {{baseUrl}}/v3/ledger/account
2 credits per API call.
Creates a new account for the customer. This will create an account on Tatum Private Ledger. It is possible to create an account for every supported cryptocurrency, FIAT, any ERC20 token created within a Tatum instance, and Tatum virtual currencies. When the customer field is already present, the account is added to the customer's list of accounts. If the customer field is not present, a new customer is created along with the account.
Every account has its own balance. Tatum supports 2 types of balances - accountBalance and availableBalance. The account balance represents all assets in the account, both available and blocked. The available balance in the account represents account balance minus the blocked amount in the account. The available balance should be used to determine how much a customer can send or withdraw from the account.
An account is always created with a specific currency. Once the currency is set, it cannot be changed.
When an account's currency is blockchain-based, like BTC or ETH, the account is usually created with xpub. Xpub represents an extended public key of the blockchain wallet, which will be connected to this account. Adding xpub to the account does not connect any specific blockchain address to this account. Xpub is just a generator of addresses, not an address itself.
Every blockchain has different types of xpubs:
- BTC - xpub can be obtained from generate wallet
- LTC - xpub can be obtained from generate wallet
- DOGE - xpub can be obtained from generate wallet
- BCH - xpub can be obtained from generate wallet
- ETH and ERC20 - xpub can be obtained from generate wallet
- XRP - xpub is the address field from generate account
- XLM - xpub is the address field from generate account
- BNB - xpub is the address field from generate account
- BSC - xpub is the address field from generate wallet
- MATIC - xpub is the address field from generate wallet
- CELO, cEUR, cUSD and ERC20 - xpub is the address field from generate wallet
- TRON and TRC tokens - xpub can be obtained from generate wallet
- FLOW and FUSD - xpub can be obtained from generate wallet
- If xpub is present in the account, addresses are generated for the account via Create new deposit address. This is the preferred mechanism.
- If xpub is not present in the account, addresses for this account are assigned manually via Assign address. This feature is used when there are already existing addresses to be used in Tatum.
Request Body
{"currency"=>"BTC", "xpub"=>"xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid", "customer"=>{"externalId"=>"123654", "accountingCurrency"=>"USD", "customerCountry"=>"US", "providerCountry"=>"US"}, "compliant"=>false, "accountCode"=>"AC_1011_B", "accountingCurrency"=>"USD", "accountNumber"=>"123456"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"id":"5e68c66581f2ee32bc354087","active":true,"frozen":false,"currency":"BTC","balance":{"accountBalance":"1000000","availableBalance":"1000000"},"customerId":"5e68c66581f2ee32bc354087","accountCode":"03_ACC_01","xpub":"xpub6FB4LJzdKNkkpsjggFAGS2p34G48pqjtmSktmK2Ke3k1LKqm9ULsg8bGfDakYUrdhe2EHw5uGKX9DrMbrgYnVfDwrksT4ZVQ3vmgEruo3Ka"}