Vault Wallet

Get vault wallet

get

Retrieve a specific vault wallet by address (agent_address or vault_address)

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
vaultAddressstringRequired

Vault address - can be agent_address (Privy wallet) or vault_address (contract)

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
Responses
chevron-right
200

Vault wallet retrieved successfully

application/json
get
/vault-wallet

Create a new vault wallet with onchain deployment

post

This API performs all vault creation steps in one call: 1) Creates a Privy wallet (agent), 2) Deploys vault contract via PearVaultFactory onchain, 3) Saves to database, 4) Creates backend agent wallet for trading. This replaces the old two-step process (createVaultWallet + registerVault).

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
leader_addressstringRequired

Leader/owner address of the vault

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
namestringRequired

Name for the vault wallet

Example: My Trading Vault
aboutstringOptional

Description/about text for the vault wallet

Example: This is my trading vault for automated strategies
imageUrlstringRequired

Image URL for the vault wallet

Example: https://example.com/images/vault-avatar.png
configIdnumberRequired

Configuration ID for the vault from frontend (0-based index)

Example: 0
Responses
post
/vault-wallet

Delete vault wallet

delete

Delete a specific vault wallet by address. This action cannot be undone.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
vaultAddressstringRequired

Vault address - can be agent_address (Privy wallet) or vault_address (contract)

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
Responses
delete
/vault-wallet

No content

Get all vault wallets

get

Retrieve all vault wallets for the authenticated user. Supports filtering by name and address.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
namestringOptional

Filter vault wallets by name (case-insensitive partial match)

Example: My Trading Vault
addressstringOptional

Filter vault wallets by address (matches agent_address or vault_address, case-insensitive partial match)

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
Responses
chevron-right
200

Vault wallets retrieved successfully

application/json
get
/vault-wallet/all

Refresh agent wallet for vault

post

Create a new agent wallet for a specific registered vault. This is useful when the current agent wallet needs to be refreshed or rotated.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
vaultAddressstringRequired

Vault address - can be agent_address (Privy wallet) or vault_address (contract)

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
Responses
chevron-right
200

Agent wallet refreshed successfully

application/json
post
/vault-wallet/refreshAPIforVault

Transfer USDC from spot to perp account

post

Transfer USDC directly from spot account to perp account for trading

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
amountstring Β· min: 0.01Required

Amount of USDC to transfer from spot to perp account

Example: 100.0
assetstringOptional

Asset to transfer (default: USDC)

Default: USDCExample: USDC
Responses
chevron-right
200

Transfer completed successfully

application/json
post
/vault-wallet/spot-to-perp

Transfer USDC from perp to spot account

post

Transfer USDC directly from perp account to spot account

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
amountstring Β· min: 0.01Required

Amount of USDC to transfer from perp to spot account

Example: 100.0
assetstringOptional

Asset to transfer (default: USDC)

Default: USDCExample: USDC
Responses
chevron-right
200

Transfer completed successfully

application/json
post
/vault-wallet/perp-to-spot

Swap spot token to USDC and transfer to perp

post

Swap a spot token (ETH, SOL, etc.) to USDC and transfer the USDC to perp account for trading

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
fromAssetstringRequired

Asset to swap from (e.g., ETH, SOL, BTC)

Example: ETH
amountstring Β· min: 0.001Required

Amount of the source asset to swap

Example: 0.1
toAssetstringOptional

Asset to swap to (default: USDC)

Default: USDCExample: USDC
Responses
chevron-right
200

Swap and transfer completed successfully

application/json
post
/vault-wallet/swap-and-transfer

Get spot and perp account balances

get

Retrieve balances for both spot and perp accounts

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
chevron-right
200

Balances retrieved successfully

application/json
get
/vault-wallet/balances

Last updated