API Overview
Shield Yield Vaults provides a RESTful API for managing vaults, positions, and transactions.
Base URL
Development: http://localhost:5000/api
Production: https://shyield.finance/apiAuthentication
The API uses session-based authentication with wallet addresses. No API keys required for public endpoints.
Wallet-Scoped Access: All transaction endpoints require a walletAddress parameter. This ensures users can only access their own transaction data, providing privacy and security.
Endpoints Overview
Vaults
GET /api/vaults- List all vaultsGET /api/vaults/:id- Get vault detailsGET /api/vaults/:id/metrics- Get vault metrics
Positions
GET /api/positions- List user positionsPOST /api/positions/deposit- Create depositPOST /api/positions/withdraw- Create withdrawalPOST /api/positions/:id/claim- Claim rewards
Transactions
GET /api/transactions?walletAddress=<address>- List wallet-scoped transactions (REQUIRED parameter)GET /api/transactions/summary?walletAddress=<address>- Get transaction summary (REQUIRED parameter)
Wallet
POST /api/wallet/xaman/payload- Create Xaman sign-in payloadPOST /api/wallet/xaman/deposit- Create deposit payloadPOST /api/wallet/xaman/withdraw- Create withdrawal payloadPOST /api/wallet/xaman/claim- Create claim payloadGET /api/wallet/xaman/status/:uuid- Check payload statusPOST /api/wallet/balances- Get XRPL balances
Detailed Documentation
See individual endpoint documentation:
Error Responses
All endpoints return standard error responses:
Common HTTP status codes:
200- Success400- Bad Request (invalid parameters)404- Not Found500- Internal Server Error
Wallet-Scoped Security Errors
Transaction endpoints require the walletAddress parameter. Missing this parameter returns a 400 error:
Request:
Response (400):
Correct Request:
Rate Limiting
Currently no rate limiting in development. Production deployment includes:
100 requests per minute per IP
1000 requests per hour per IP
Network Support
All endpoints support network parameter:
mainnet- Production XRPL mainnettestnet- XRPL testnet for development
Pass as query parameter: ?network=testnet
Last updated