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
idstringRequired

Unique identifier for the vault wallet

Example: vault_1234567890abcdef
vaultAddressobjectRequired

Vault wallet address

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
leader_addressstringRequired

Vault wallet address

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
agentAddressstringRequired

Public address

Example: 0x1234567890123456789012345678901234567890
isApprovedbooleanRequired

Whether the vault wallet is approved for trading

Example: false
createdAtstringRequired

Timestamp when the vault wallet was created

Example: 2024-01-01T00:00:00.000Z
updatedAtstringRequired

Timestamp when the vault wallet was last updated

Example: 2024-01-01T00:00:00.000Z
privyWalletIdstringRequired

Privy wallet ID for creating the signer

Example: privy_wallet_1234567890abcdef
nameobject Β· nullableOptional

Vault wallet name

Example: My Trading Vault
aboutobject Β· nullableOptional

Vault wallet description/about

Example: This is my trading vault for automated strategies
imageUrlobject Β· nullableOptional

Image URL for the vault wallet

Example: https://example.com/images/vault-avatar.png
transactionHashobject Β· nullableOptional

Transaction hash from vault creation

Example: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
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
idstringRequired

Unique identifier for the vault wallet

Example: vault_1234567890abcdef
vaultAddressobjectRequired

Vault wallet address

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
leader_addressstringRequired

Vault wallet address

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
agentAddressstringRequired

Public address

Example: 0x1234567890123456789012345678901234567890
isApprovedbooleanRequired

Whether the vault wallet is approved for trading

Example: false
createdAtstringRequired

Timestamp when the vault wallet was created

Example: 2024-01-01T00:00:00.000Z
updatedAtstringRequired

Timestamp when the vault wallet was last updated

Example: 2024-01-01T00:00:00.000Z
privyWalletIdstringRequired

Privy wallet ID for creating the signer

Example: privy_wallet_1234567890abcdef
nameobject Β· nullableOptional

Vault wallet name

Example: My Trading Vault
aboutobject Β· nullableOptional

Vault wallet description/about

Example: This is my trading vault for automated strategies
imageUrlobject Β· nullableOptional

Image URL for the vault wallet

Example: https://example.com/images/vault-avatar.png
transactionHashobject Β· nullableOptional

Transaction hash from vault creation

Example: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
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
idstringRequired

Unique identifier for the vault wallet

Example: vault_1234567890abcdef
leader_addressstringRequired

Owner wallet address

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
vaultAddressstringRequired

Vault contract address

Example: 0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6
newAgentWalletAddressstringRequired

New agent wallet address for backend trading

Example: 0x1234567890123456789012345678901234567890
messagestringRequired

Success message

Example: Agent wallet refreshed successfully for vault.
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
successbooleanRequired

Transfer success status

Example: true
amountstringRequired

Amount transferred

Example: 100.0
assetstringRequired

Asset transferred

Example: USDC
directionstringRequired

Transfer direction

Example: SPOT_TO_PERP
messagestringRequired

Success message

Example: Transfer completed successfully
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
successbooleanRequired

Transfer success status

Example: true
amountstringRequired

Amount transferred

Example: 100.0
assetstringRequired

Asset transferred

Example: USDC
directionstringRequired

Transfer direction

Example: SPOT_TO_PERP
messagestringRequired

Success message

Example: Transfer completed successfully
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
fromAmountstringRequired

Amount of source asset swapped

Example: 0.1
toAmountstringRequired

Amount of target asset received

Example: 400.0
exchangeRatenumberRequired

Exchange rate used

Example: 4000
fromAssetstringRequired

Source asset

Example: ETH
toAssetstringRequired

Target asset

Example: USDC
messagestringRequired

Success message

Example: Swap and transfer completed successfully
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
spotBalancesobjectRequired

Spot account balances

Example: {"USDC":"100.0","ETH":"0.1","SOL":"2.5"}
perpBalancesobjectRequired

Perp account balances

Example: {"USDC":"50.0","BTC":"0.01"}
totalValuestringRequired

Total account value in USD

Example: 150.0
get
/vault-wallet/balances

Last updated