Skip to main content

Installation

npm install @rebelfi/sdk

RebelfiClient

The main SDK client class.

Constructor

import { RebelfiClient } from '@rebelfi/sdk';

const client = new RebelfiClient(config: RebelfiSDKConfig);

RebelfiSDKConfig

interface RebelfiSDKConfig {
  /** Your RebelFi API key (required) */
  apiKey: string;

  /** Set to true to use sandbox environment (sandbox-api.rebelfi.io) */
  sandbox?: boolean;

  /** Optional: Override base URL (e.g., for proxying) */
  baseUrl?: string;

  /** Request timeout in milliseconds (default: 60000) */
  timeout?: number;
}

Properties

PropertyTypeDescription
venuesVenuesAPIVenue and strategy operations
walletsWalletsAPIWallet registration and management
allocationsAllocationsAPIAllocation queries
operationsOperationsAPISupply and unwind operations
transactionsTransactionsAPITransaction submission

Example

// Production
const client = new RebelfiClient({
  apiKey: process.env.REBELFI_API_KEY
});

// Sandbox
const sandbox = new RebelfiClient({
  apiKey: process.env.REBELFI_SANDBOX_API_KEY,
  sandbox: true
});