Add an asset
Create the asset vault for a new token, on an EVM chain or on Solana.
Send the chain and the token. Aqua0 runs its automatic token check and, when the token passes, creates its asset vault. On an EVM chain it does so at once. On Solana your wallet creates it, as below.
curl -X POST "$AQUA0_API/api/vaults/create" \
-H "Content-Type: application/json" \
-d '{ "chainId": '"$CHAIN_ID"', "token": "<token>" }'chainId is the chain's id, 1151111081099710 on Solana, and token is the token's address, or its mint on Solana.
The answer has status: "created", the vault's assetId, and the txHash that created it. assetId is the token's
symbol, or its mint on Solana. The API and the app offer the vault at once.
On Solana
Send owner as well, the wallet that creates the vault and pays its network fee and rent.
curl -X POST "$AQUA0_API/api/vaults/create" \
-H "Content-Type: application/json" \
-d '{ "chainId": 1151111081099710, "token": "<mint>", "owner": "<wallet>" }'- The answer is
200withstatus: "prepared", arequestId, the unsignedtransactionin base64 and thelamportsthe wallet pays. - Sign the transaction in the wallet and send it to
POST /api/solana/vaults/transactions/{requestId}/submit. - Once it confirms, call
POST /api/vaults/createagain with the same body and therequestId. The answer is the201above.
| Answer | Meaning |
|---|---|
200 | On Solana, the wallet's transaction to sign. |
201 | The vault is created. |
400 | The chain has no asset vaults, or the token is not a contract or mint, failed the token check, has a symbol that cannot name a vault, or has an issuer who can freeze or move it. On Solana, also a wallet with too little SOL (INSUFFICIENT_SOL). message says which. |
409 | The token already has an asset vault, or had one that was retired. On Solana, also the creation has not landed yet (VAULT_CREATE_PENDING) or did not land (VAULT_CREATE_FAILED). |
503 | The check or the creation cannot run right now. Try again shortly. |
A token with no market price gets its vault too. Its first market opens at an outside price when one answers, or at the
launchPriceUsd you send.
Then open a market, lock liquidity to back it and
swap.
Reference: create a vault.