List Allocations
curl --request POST \
--url https://api.example.com/v1/allocationsimport requests
url = "https://api.example.com/v1/allocations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/allocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/allocations"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/allocations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyAllocations
List Allocations
POST /v1/allocations — Get all allocations for a wallet
POST
/
v1
/
allocations
List Allocations
curl --request POST \
--url https://api.example.com/v1/allocationsimport requests
url = "https://api.example.com/v1/allocations"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/allocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/allocations"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/allocations")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEndpoint:
POST https://api.rebelfi.io/v1/allocationsThis endpoint uses POST instead of GET because wallet identification requires a request body. It counts toward POST rate limits (20/min).
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 }'
// By walletId
const result = await client.allocations.list({ walletId: 42 });
// By walletAddress
const result = await client.allocations.list({ walletAddress: '0x742d...bD18' });
// By userId
const result = await client.allocations.list({ userId: 'user-123' });
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.