Skip to main content
GET
/
v1
/
allocations
/
earnings
Get Earnings
curl --request GET \
  --url https://api.example.com/v1/allocations/earnings
Endpoint: GET https://api.rebelfi.io/v1/allocations/earnings
Get daily earnings history for a wallet.

Query Parameters

Provide exactly one wallet identifier, plus required filters:
ParameterTypeRequiredDefaultDescription
walletAddressstringOne of-Wallet address
walletIdnumberOne of-Wallet ID
userIdstringOne of-External user ID
blockchainstringYes-Blockchain: solana, polygon, ethereum, or base
tokenstringYes-Token symbol (e.g., USDC)
daysnumberNo30Days of history (max 365)
includeBreakdownbooleanNofalseInclude per-venue breakdown

Example Request

curl -X GET "https://api.rebelfi.io/v1/allocations/earnings?walletId=42&blockchain=ethereum&token=USDC&days=30&includeBreakdown=true" \
  -H "x-api-key: your_api_key"

Example Response

{
  "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
  "blockchain": "ethereum",
  "token": "USDC",
  "periodStart": "2024-01-01",
  "periodEnd": "2024-01-15",
  "firstActivityDate": "2024-01-05",
  "totalYieldEarned": "8500000",
  "totalYieldEarnedUsd": "8.50",
  "history": [
    {
      "date": "2024-01-05",
      "yieldEarned": "0",
      "yieldEarnedUsd": "0.00",
      "cumulativeYield": "0",
      "positionValue": "1000000000"
    },
    {
      "date": "2024-01-06",
      "yieldEarned": "850000",
      "yieldEarnedUsd": "0.85",
      "cumulativeYield": "850000",
      "positionValue": "1000850000"
    }
  ],
  "byVenue": [
    {
      "venueId": 3,
      "venueName": "AAVE V3",
      "totalYieldEarned": "8500000",
      "totalYieldEarnedUsd": "8.50",
      "history": [
        {
          "date": "2024-01-06",
          "yieldEarned": "850000",
          "yieldEarnedUsd": "0.85"
        }
      ]
    }
  ]
}

Response Fields

FieldTypeDescription
walletAddressstringQueried wallet address
blockchainstringBlockchain network
tokenstringToken symbol
periodStartstringStart of period (YYYY-MM-DD)
periodEndstringEnd of period (YYYY-MM-DD)
firstActivityDatestring?First date with data (null if never active)
totalYieldEarnedstringTotal yield in period (base units)
totalYieldEarnedUsdstringTotal yield in USD
historyEarningsDay[]Daily earnings (sparse — only dates with data)
byVenueVenueEarnings[]?Per-venue breakdown (if requested)

EarningsDay Object

FieldTypeDescription
datestringDate (YYYY-MM-DD)
yieldEarnedstringYield earned that day (base units, can be negative)
yieldEarnedUsdstringYield in USD
cumulativeYieldstringCumulative yield from first activity
positionValuestringClosing position value
The history array is sparse — it only contains entries for dates where there was activity or yield. Days without activity are omitted.