Vault Wallet
Vault address - can be agent_address (Privy wallet) or vault_address (contract)
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Vault wallet retrieved successfully
Unique identifier for the vault wallet
vault_1234567890abcdefVault wallet address
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Vault wallet address
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Public address
0x1234567890123456789012345678901234567890Whether the vault wallet is approved for trading
falseTimestamp when the vault wallet was created
2024-01-01T00:00:00.000ZTimestamp when the vault wallet was last updated
2024-01-01T00:00:00.000ZPrivy wallet ID for creating the signer
privy_wallet_1234567890abcdefVault wallet name
My Trading VaultVault wallet description/about
This is my trading vault for automated strategiesImage URL for the vault wallet
https://example.com/images/vault-avatar.pngTransaction hash from vault creation
0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdefUnauthorized - invalid or missing token
Vault wallet not found
GET /vault-wallet?vaultAddress=0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6 HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "vault_1234567890abcdef",
"vaultAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"leader_address": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"agentAddress": "0x1234567890123456789012345678901234567890",
"isApproved": false,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"privyWalletId": "privy_wallet_1234567890abcdef",
"name": "My Trading Vault",
"about": "This is my trading vault for automated strategies",
"imageUrl": "https://example.com/images/vault-avatar.png",
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}Leader/owner address of the vault
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Name for the vault wallet
My Trading VaultDescription/about text for the vault wallet
This is my trading vault for automated strategiesImage URL for the vault wallet
https://example.com/images/vault-avatar.pngConfiguration ID for the vault from frontend (0-based index)
0Vault created successfully with onchain transaction
Unique identifier for the vault wallet
vault_1234567890abcdefLeader/owner address
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Generated vault contract address from blockchain
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Privy agent wallet address
0x1234567890123456789012345678901234567890Whether the vault wallet is approved for trading
falseVault wallet name
My Trading VaultVault wallet description/about
This is my trading vault for automated strategiesImage URL for the vault wallet
https://example.com/images/vault-avatar.pngTransaction hash from vault creation
0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdefTimestamp when the vault wallet was created
2024-01-01T00:00:00.000ZSuccess message
Vault created successfully with onchain transaction.Invalid request parameters
Unauthorized - invalid or missing token
Failed to create vault (Privy wallet creation or blockchain transaction failed)
POST /vault-wallet HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 219
{
"leader_address": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"name": "My Trading Vault",
"about": "This is my trading vault for automated strategies",
"imageUrl": "https://example.com/images/vault-avatar.png",
"configId": 0
}{
"id": "vault_1234567890abcdef",
"leader_address": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"vaultAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"agentAddress": "0x1234567890123456789012345678901234567890",
"isApproved": false,
"name": "My Trading Vault",
"about": "This is my trading vault for automated strategies",
"imageUrl": "https://example.com/images/vault-avatar.png",
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"createdAt": "2024-01-01T00:00:00.000Z",
"message": "Vault created successfully with onchain transaction."
}Vault address - can be agent_address (Privy wallet) or vault_address (contract)
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Vault wallet deleted successfully
No content
Unauthorized - invalid or missing token
Vault wallet not found
DELETE /vault-wallet?vaultAddress=0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6 HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Filter vault wallets by name (case-insensitive partial match)
My Trading VaultFilter vault wallets by address (matches agent_address or vault_address, case-insensitive partial match)
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Vault wallets retrieved successfully
Unique identifier for the vault wallet
vault_1234567890abcdefVault wallet address
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Vault wallet address
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Public address
0x1234567890123456789012345678901234567890Whether the vault wallet is approved for trading
falseTimestamp when the vault wallet was created
2024-01-01T00:00:00.000ZTimestamp when the vault wallet was last updated
2024-01-01T00:00:00.000ZPrivy wallet ID for creating the signer
privy_wallet_1234567890abcdefVault wallet name
My Trading VaultVault wallet description/about
This is my trading vault for automated strategiesImage URL for the vault wallet
https://example.com/images/vault-avatar.pngTransaction hash from vault creation
0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdefUnauthorized - invalid or missing token
GET /vault-wallet/all HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": "vault_1234567890abcdef",
"vaultAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"leader_address": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"agentAddress": "0x1234567890123456789012345678901234567890",
"isApproved": false,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"privyWalletId": "privy_wallet_1234567890abcdef",
"name": "My Trading Vault",
"about": "This is my trading vault for automated strategies",
"imageUrl": "https://example.com/images/vault-avatar.png",
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
]Vault address - can be agent_address (Privy wallet) or vault_address (contract)
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Agent wallet refreshed successfully
Unique identifier for the vault wallet
vault_1234567890abcdefOwner wallet address
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6Vault contract address
0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6New agent wallet address for backend trading
0x1234567890123456789012345678901234567890Success message
Agent wallet refreshed successfully for vault.Unauthorized - invalid or missing token
Vault wallet not found or vault not registered
POST /vault-wallet/refreshAPIforVault?vaultAddress=0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6 HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "vault_1234567890abcdef",
"leader_address": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"vaultAddress": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
"newAgentWalletAddress": "0x1234567890123456789012345678901234567890",
"message": "Agent wallet refreshed successfully for vault."
}Amount of USDC to transfer from spot to perp account
100.0Asset to transfer (default: USDC)
USDCExample: USDCTransfer completed successfully
Transfer success status
trueAmount transferred
100.0Asset transferred
USDCTransfer direction
SPOT_TO_PERPSuccess message
Transfer completed successfullyInvalid transfer amount or insufficient balance
Unauthorized - invalid or missing token
POST /vault-wallet/spot-to-perp HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"amount": "100.0",
"asset": "USDC"
}{
"success": true,
"amount": "100.0",
"asset": "USDC",
"direction": "SPOT_TO_PERP",
"message": "Transfer completed successfully"
}Amount of USDC to transfer from perp to spot account
100.0Asset to transfer (default: USDC)
USDCExample: USDCTransfer completed successfully
Transfer success status
trueAmount transferred
100.0Asset transferred
USDCTransfer direction
SPOT_TO_PERPSuccess message
Transfer completed successfullyInvalid transfer amount or insufficient balance
Unauthorized - invalid or missing token
POST /vault-wallet/perp-to-spot HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"amount": "100.0",
"asset": "USDC"
}{
"success": true,
"amount": "100.0",
"asset": "USDC",
"direction": "SPOT_TO_PERP",
"message": "Transfer completed successfully"
}Asset to swap from (e.g., ETH, SOL, BTC)
ETHAmount of the source asset to swap
0.1Asset to swap to (default: USDC)
USDCExample: USDCSwap and transfer completed successfully
Amount of source asset swapped
0.1Amount of target asset received
400.0Exchange rate used
4000Source asset
ETHTarget asset
USDCSuccess message
Swap and transfer completed successfullyInvalid swap parameters or insufficient balance
Unauthorized - invalid or missing token
POST /vault-wallet/swap-and-transfer HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"fromAsset": "ETH",
"amount": "0.1",
"toAsset": "USDC"
}{
"fromAmount": "0.1",
"toAmount": "400.0",
"exchangeRate": 4000,
"fromAsset": "ETH",
"toAsset": "USDC",
"message": "Swap and transfer completed successfully"
}Balances retrieved successfully
Spot account balances
{"USDC":"100.0","ETH":"0.1","SOL":"2.5"}Perp account balances
{"USDC":"50.0","BTC":"0.01"}Total account value in USD
150.0Unauthorized - invalid or missing token
GET /vault-wallet/balances HTTP/1.1
Host: hl-v2.pearprotocol.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"spotBalances": {
"USDC": "100.0",
"ETH": "0.1",
"SOL": "2.5"
},
"perpBalances": {
"USDC": "50.0",
"BTC": "0.01"
},
"totalValue": "150.0"
}Last updated