create_account endpoint returns the account address and a transaction that deploys the account.
This works the same way in Earn, Credit and Tokenized Assets. Perpetual Trading doesn’t use a product account.
Request
Create an Earn Account on Base, with the user paying gas:Response
Sign and send
Thesender signs transaction and sends it to the chain. Creation is a single transaction: once it’s confirmed, the account is ready to fund. There’s no pending state to poll.
Who pays for deployment
Good to know
- Safe to call every time. If the account already exists on that chain, you get the same address and
transaction: null. You can callcreate_accountwhenever a user opens the product and skip the transaction when it’snull. - One account per product. The same wallet gets a different address for Earn, Credit and Tokenized Assets.
- Deploy once per chain. The address is the same everywhere, but the account has to be deployed on each chain where the user uses it.
- Create before anything else. Credit and Tokenized Assets endpoints return
400(Credit Account not deployedorTokenized Assets Account not deployed) until the account exists on that chain.
Next
Fund an Account
Move tokens from the user’s wallet into their new account.