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>" }'
  1. The answer is 200 with status: "prepared", a requestId, the unsigned transaction in base64 and the lamports the wallet pays.
  2. Sign the transaction in the wallet and send it to POST /api/solana/vaults/transactions/{requestId}/submit.
  3. Once it confirms, call POST /api/vaults/create again with the same body and the requestId. The answer is the 201 above.
AnswerMeaning
200On Solana, the wallet's transaction to sign.
201The vault is created.
400The 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.
409The 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).
503The 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.