Get Allocation by Strategy
curl --request GET \
--url https://api.example.com/v1/allocations/strategy/{strategyId}import requests
url = "https://api.example.com/v1/allocations/strategy/{strategyId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/allocations/strategy/{strategyId}', 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/strategy/{strategyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/strategy/{strategyId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/allocations/strategy/{strategyId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/allocations/strategy/{strategyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAllocations
Get Allocation by Strategy
GET /v1/allocations/strategy/:strategyId — Get allocation at a specific strategy
GET
/
v1
/
allocations
/
strategy
/
{strategyId}
Get Allocation by Strategy
curl --request GET \
--url https://api.example.com/v1/allocations/strategy/{strategyId}import requests
url = "https://api.example.com/v1/allocations/strategy/{strategyId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/allocations/strategy/{strategyId}', 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/strategy/{strategyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/strategy/{strategyId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/allocations/strategy/{strategyId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/allocations/strategy/{strategyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyEndpoint:
GET https://api.rebelfi.io/v1/allocations/strategy/:strategyIdPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
strategyId | number | Yes | Strategy ID |
Query Parameters
Provide one wallet identifier:| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | One of | Wallet address |
walletId | number | One of | Wallet ID |
Example Request
curl -X GET "https://api.rebelfi.io/v1/allocations/strategy/1?walletId=42" \
-H "x-api-key: your_api_key"
// By walletId
const allocation = await client.allocations.get(1, 42);
// By walletAddress
const allocation = await client.allocations.get(1, 'So11...abc');
Example Response
{
"strategyId": 1,
"strategyName": "USDC Vault",
"venueId": 1,
"venueName": "Kamino",
"walletAddress": "So11...abc",
"blockchain": "solana",
"token": "USDC",
"tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"principal": "1000000000",
"currentValue": "1008500000",
"yieldEarned": "8500000",
"apy": 0.085,
"lastUpdated": "2024-01-15T10:30:00Z"
}
Errors
| Code | Description |
|---|---|
ALLOCATION_NOT_FOUND | No position at this strategy for the wallet |
WALLET_NOT_FOUND | Wallet ID doesn’t exist |