Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rebelfi.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Base URL

All API requests use the following base URL:
https://api.rebelfi.io/v1

Authentication

Authenticate all requests with your API key in the x-api-key header:
curl -X GET "https://api.rebelfi.io/v1/venues" \
  -H "x-api-key: your_api_key_here"
There are two types of API keys:
  • Profile-scoped keys — Tied to a Wallet Profile. Can read and write (register wallets, plan operations, submit transactions) within that profile.
  • Admin keys — Organization-wide, read-only. Can list wallets and view aggregate data across all profiles. Cannot create wallets or operations.
See Authentication for details on generating each type.
Keep your API key secure. Never expose it in client-side code or commit it to version control.

Response Format

Success Responses

Successful responses return data directly (no envelope):
{
  "venues": [...],
  "count": 2,
  "strategyCount": 4
}
HTTP status codes:
  • 200 OK - Request succeeded
  • 201 Created - Resource created
  • 202 Accepted - Request accepted for processing

Error Responses

Error responses include a message and error code:
{
  "statusCode": 400,
  "message": "Insufficient balance for operation",
  "code": "INSUFFICIENT_BALANCE",
  "details": {
    "required": "1000000000",
    "available": "500000000"
  }
}
HTTP status codes:
  • 400 Bad Request - Invalid parameters
  • 401 Unauthorized - Invalid or missing API key
  • 403 Forbidden - API key disabled
  • 404 Not Found - Resource not found
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error

Error Codes

CodeDescription
INVALID_AMOUNTAmount is zero, negative, or malformed
INVALID_ADDRESSWallet address format is invalid
INVALID_TOKENToken address not recognized
INSUFFICIENT_BALANCEWallet balance too low
STRATEGY_NOT_ACTIVEStrategy is paused
ALLOCATION_NOT_FOUNDNo position at this venue
OPERATION_EXPIREDUnsigned transaction expired
OPERATION_ALREADY_SUBMITTEDTransaction already submitted
TOKEN_MISMATCHToken doesn’t match strategy
INVALID_OPERATION_STATUSOperation in wrong state for requested action
OPERATION_IN_PROGRESSAnother operation is executing for this wallet
VENUE_NOT_FOUNDVenue ID doesn’t exist
STRATEGY_NOT_FOUNDStrategy ID doesn’t exist
OPERATION_NOT_FOUNDOperation ID doesn’t exist
TRANSACTION_NOT_FOUNDTransaction ID doesn’t exist
WALLET_NOT_FOUNDWallet not registered
ORGANIZATION_NOT_FOUNDOrganization not found for API key
TOKEN_NOT_FOUNDToken not supported
INSUFFICIENT_GASNot enough native token for fees (ETH, POL, or SOL)
SIMULATION_FAILEDTransaction simulation failed
INVALID_API_KEYAPI key not recognized
API_KEY_DISABLEDAPI key has been revoked
RATE_LIMIT_EXCEEDEDToo many requests

Rate Limits

API requests are rate limited per API key:
Endpoint TypeLimit
Read (GET)100 requests/minute
Write (POST)20 requests/minute
When rate limited, you’ll receive a 429 response with RATE_LIMIT_EXCEEDED code. Implement exponential backoff for retries.

Amount Convention

All monetary amounts in the API are represented as strings in base units (smallest denomination).
TokenDecimals1 Token in Base UnitsExample
USDC6"1000000""5000000" = 5 USDC
USDT6"1000000""10000000" = 10 USDT
Amounts are always strings, never numbers, to preserve precision.

Transaction Submission

After signing a transaction, you have two options:
MethodWhen to Use
submit-signedYou want RebelFi to broadcast the transaction to the blockchain. Send the signed transaction bytes and RebelFi handles broadcasting and confirmation tracking.
submit-hashYou broadcast the transaction yourself (e.g., via your own RPC node) and just send RebelFi the transaction hash so it can track confirmation.
Most integrations should use submit-signed for simplicity. Use submit-hash if you need control over the broadcast (e.g., priority fees, custom RPC endpoints).

Sandbox Environment

For testing, use the sandbox base URL:
https://sandbox-api.rebelfi.io/v1
Sandbox API keys have the prefix rfk_sandbox_. See the Sandbox guide for details.

Supported Blockchains

BlockchainToken SupportStatus
SolanaUSDC, USDTLive
PolygonUSDC, USDTLive
EthereumUSDC, USDTLive
BaseUSDCLive
ArbitrumUSDC, USDTComing Soon

Request Examples

cURL

# List venues (Ethereum)
curl -X GET "https://api.rebelfi.io/v1/venues?blockchain=ethereum&token=USDC" \
  -H "x-api-key: your_api_key"

# Plan supply operation (Ethereum)
curl -X POST "https://api.rebelfi.io/v1/operations/supply" \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
    "strategyId": 5,
    "amount": "1000000000",
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  }'

JavaScript (fetch)

const API_KEY = process.env.REBELFI_API_KEY;
const BASE_URL = 'https://api.rebelfi.io/v1';

async function listVenues(blockchain = 'ethereum') {
  const response = await fetch(`${BASE_URL}/venues?blockchain=${blockchain}&token=USDC`, {
    headers: { 'x-api-key': API_KEY }
  });

  if (!response.ok) {
    const error = await response.json();
    throw new Error(`${error.code}: ${error.message}`);
  }

  return response.json();
}

Python (requests)

import requests
import os

API_KEY = os.environ['REBELFI_API_KEY']
BASE_URL = 'https://api.rebelfi.io/v1'

def list_venues(blockchain='ethereum'):
    response = requests.get(
        f'{BASE_URL}/venues',
        headers={'x-api-key': API_KEY},
        params={'blockchain': blockchain, 'token': 'USDC'}
    )
    response.raise_for_status()
    return response.json()

Available Resources

ResourceEndpoints
WalletsRegister, list, get, update
VenuesList, get
AllocationsList, get by strategy, earnings
OperationsSupply, unwind, get, cancel
TransactionsSubmit hash, submit signed, get, recover
Ramping — KYBStart KYB, get status
Ramping — RecipientsCreate, list, get, archive
Ramping — AccountsCreate on-ramp, create off-ramp, list off-ramp
Ramping — TransactionsList, get, summary
Ramping — SimulationSimulate on-ramp, simulate off-ramp

SDK Recommendation

For TypeScript/JavaScript projects, we recommend using the official SDK:
npm install @rebelfi/sdk
The SDK provides:
  • Full TypeScript types
  • Wallet registration and management
  • Automatic error handling with RebelfiError
  • Flexible wallet identification (walletId, walletAddress, or userId)
See the SDK documentation for details.