Skip to main content
The RebelFi API enables programmatic access to yield deployment, operation management, and wallet monitoring capabilities.

Dashboard vs. API Access

RebelFi provides two ways to interact with the platform:

Dashboard (No-Code)

Full-featured web interface for managing wallets, operations, and yield without writing code.
  • Visual wallet and operation management
  • Real-time monitoring and reporting
  • Approval workflows and notifications
  • Perfect for OTC desks and operators
Uses internal authentication (bearer tokens) - not covered in this API documentation.

API (Programmatic)

RESTful APIs for automated workflows and programmatic control.
  • Programmatic operation creation
  • Agent-based custody integration
  • Webhook events and notifications
  • Full automation capabilities
Uses API key authentication - detailed below.
Common Pattern: Many teams start with the dashboard to understand flows and manually test operations, then migrate to API-driven automation once comfortable with the platform.

Base URL

https://api.rebelfi.io
All API requests should be made to this base URL.

Authentication

API access uses API key authentication.
curl https://api.rebelfi.io/api/agent/transactions/poll \
  -H "X-API-Key: rfk_live_xxxxxxxxxxxxx"
Generate API keys from the dashboard under Settings → API Keys.
API keys have full access to your organization. Store them securely and never commit to version control.
The RebelFi dashboard uses internal bearer token (JWT) authentication, which is not used for API integration. This documentation covers only API key authentication for programmatic access.

Response Format

All API responses follow a consistent structure:

Success Response

{
  "success": true,
  "data": {
    // Response payload
  },
  "timestamp": "2025-10-23T14:30:00Z"
}

Error Response

{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Available balance is less than requested amount",
    "details": {
      "available": "500.00",
      "requested": "1000.00"
    }
  },
  "timestamp": "2025-10-23T14:30:00Z"
}

Common Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing authentication credentials
FORBIDDEN403Insufficient permissions for this action
NOT_FOUND404Resource not found
VALIDATION_ERROR400Request validation failed
INSUFFICIENT_BALANCE400Not enough available funds
OPERATION_IN_PROGRESS409Another operation is already running on this wallet
RATE_LIMIT_EXCEEDED429Too many requests
INTERNAL_ERROR500Internal server error

Rate Limits

Rate limits are applied per organization:
  • Dashboard/User APIs: 100 requests per minute
  • Agent APIs: 1000 requests per minute (for polling)
  • Allocation APIs: 10 requests per minute (for creation)
Rate limit information is included in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1698067200
Agent polling endpoints have higher rate limits to support frequent polling (every 10-30 seconds).

Core Concepts

Understanding these concepts will help you work effectively with the API:

Managed Wallets

Wallets that RebelFi monitors for yield optimization.
{
  id: number,
  orgWalletId: number,
  address: string,
  blockchain: "solana" | "ethereum",
  enableYield: boolean,
  bufferAmount: string, // Funds kept liquid
  metadata: object
}

Operations

Structured workflows that describe business intent: Types:
  • SUPPLY - Deploy funds to yield protocols
  • DISBURSE - Withdraw funds from yield
States:
  • PLANNING - Created, reservation locked
  • PENDING_APPROVAL - Awaiting manual approval
  • EXECUTING - Being signed by custody
  • CONFIRMING - Submitted to blockchain
  • COMPLETED - Confirmed and finalized

Reservations

Financial locks that prevent double-spending during operations:
{
  id: number,
  managedWalletId: number,
  token: string,
  amount: string, // Reserved amount
  operationId: number,
  status: "ACTIVE" | "CONSUMED" | "RELEASED"
}

Allocations

Deployed positions earning yield:
{
  id: number,
  managedWalletId: number,
  token: string,
  allocatedBase: string, // Original amount deployed
  currentValue: string, // Current value (with yield)
  yieldEarned: string, // Total yield earned
  status: "ACTIVE" | "UNWINDING" | "CLOSED"
}

Transaction Attempts

Blockchain transactions executing operation steps:
{
  id: number,
  operationId: number,
  unsignedTx: string, // Transaction payload for signing
  status: "CREATED" | "CLAIMED" | "SUBMITTED" | "CONFIRMED",
  txHash?: string, // Blockchain transaction hash (after submission)
}

API Structure

The RebelFi API is organized into logical sections:
  • Authentication (/api/core/auth) - User registration, login, password reset
  • API Keys (/api/core/apikeys) - Generate and manage API keys for agent authentication
  • Wallets (/api/core/wallets) - Wallet management, monitoring configuration, balance queries
  • Operations (/api/core/operations) - Operation queue, approval/rejection, history
  • Allocations (/api/v1/allocations) - List allocations, create supply operations, portfolio summary
  • Agent - Transactions (/api/agent/transactions) - Poll for pending transactions, report execution status
  • Agent - Actions (/api/agent/actions) - Poll for custody actions (wallet creation, etc.), report outcomes

SDK Support

  • TypeScript/JavaScript
  • Python
  • cURL
import { RebelFiClient } from '@rebelfi/sdk';

const client = new RebelFiClient({
  apiKey: process.env.REBELFI_API_KEY,
  baseUrl: 'https://api.rebelfi.io'
});

// Example: List allocations
const allocations = await client.allocations.list();
Use direct API calls. Contact us if you need SDK support for your language.

Quick Examples

Check Wallet Balances

const response = await fetch('https://api.rebelfi.io/api/core/wallets/monitored', {
  headers: { 'X-API-Key': 'rfk_live_xxxxxxxxxxxxx' }
});

const wallets = await response.json();
console.log(wallets.data);

Create Supply Operation

const response = await fetch('https://api.rebelfi.io/api/v1/allocations', {
  method: 'POST',
  headers: {
    'X-API-Key': 'rfk_live_xxxxxxxxxxxxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    managedWalletId: 123,
    amount: "1000.00",
    asset: "USDC"
  })
});

const result = await response.json();

Agent Polling

const response = await fetch('https://api.rebelfi.io/api/agent/transactions/poll', {
  method: 'POST',
  headers: {
    'X-API-Key': 'rfk_live_xxxxxxxxxxxxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    leaseDurationMs: 30000
  })
});

const { data } = await response.json();
if (data.transaction) {
  // Sign and execute transaction
  console.log('Transaction to execute:', data.transaction);
}

Pagination

List endpoints support pagination:
// Request
GET /api/core/operations/history?limit=20&offset=0

// Response
{
  "success": true,
  "data": {
    "items": [...],
    "total": 150,
    "limit": 20,
    "offset": 0,
    "hasMore": true
  }
}
Parameters:
  • limit - Number of items to return (default: 50, max: 100)
  • offset - Number of items to skip (default: 0)

Filtering

Many endpoints support filtering:
// Filter operations by status
GET /api/core/operations/history?status=COMPLETED

// Filter allocations by status
GET /api/v1/allocations?status=ACTIVE

Idempotency

Operation creation endpoints support idempotency keys to prevent duplicate operations:
const response = await fetch('https://api.rebelfi.io/api/v1/allocations', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
    'Idempotency-Key': 'unique-key-12345' // Optional
  },
  body: JSON.stringify({
    managedWalletId: 123,
    amount: "1000.00",
    asset: "USDC"
  })
});
If you retry with the same idempotency key, you’ll receive the same response without creating a duplicate operation.

API Sections

Support