Endpoint: POST https://api.rebelfi.io/v1/allocations
This endpoint uses POST instead of GET because wallet identification requires a request body. It counts toward POST rate limits (20/min).
Get all allocations for a wallet. Identify the wallet using one of: walletAddress, walletId, or userId.
Request Body
Provide exactly one wallet identifier:
| Field | Type | Required | Description |
|---|
walletAddress | string | One of | Wallet address on the blockchain |
walletId | number | One of | Wallet ID from registration |
userId | string | One of | External user ID |
blockchain | string | No | Filter by blockchain: solana, polygon, ethereum, or base |
Example Request
curl -X POST "https://api.rebelfi.io/v1/allocations" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{ "walletId": 42 }'
Example Response
{
"allocations": [
{
"strategyId": 5,
"strategyName": "USDC Lending",
"venueId": 3,
"venueName": "AAVE V3",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"blockchain": "ethereum",
"token": "USDC",
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"principal": "5000000000",
"currentValue": "5026000000",
"yieldEarned": "26000000",
"apy": 0.052,
"lastUpdated": "2024-01-15T10:30:00Z"
}
],
"totalValue": "5026000000",
"totalYieldEarned": "26000000"
}
Response Fields
| Field | Type | Description |
|---|
allocations | Allocation[] | List of allocations |
totalValue | string | Sum of all current values (base units) |
totalYieldEarned | string | Sum of all yield earned (base units) |
Allocation Object
| Field | Type | Description |
|---|
strategyId | number | Strategy ID (use for unwind) |
strategyName | string | Strategy display name |
venueId | number | Venue identifier |
venueName | string | Venue display name |
walletAddress | string | Wallet address |
blockchain | string | Blockchain network |
token | string | Token symbol |
tokenAddress | string | Token contract address |
principal | string | Original amount deposited (base units) |
currentValue | string | Current value with yield (base units) |
yieldEarned | string | Total yield earned (base units) |
apy | number | Current APY as decimal |
lastUpdated | string | Last update timestamp (ISO 8601) |
All three identifiers (walletId, walletAddress, userId) return the same allocations for the same underlying wallet. Use whichever is most convenient for your integration.