Added

v1.6.0 - 2025-08-20

✨ Added - Account History Endpoint

New Endpoint: GET /account_history for Complete Trading History

  • New public REST endpoint for retrieving comprehensive account trading history and events
  • Consolidated view: Access all trades and account events (deposits, withdrawals, settlements, funding) in a single request
  • Flexible filtering: Query by time range and limit results for efficient data retrieval
  • Complete audit trail: Track all account activity for reconciliation and analysis

Usage Example:

// Retrieve account history with optional filters
const response = await fetch('/account_history?' + new URLSearchParams({
  address: '0x9a2f0C371820e8BE3D64efb3E814808F231880ff',
  start_timestamp: '1704067200',  // Optional: Unix timestamp
  end_timestamp: '1704153600',    // Optional: Unix timestamp
  count: '100'                    // Optional: Max records to return
}));

const data = await response.json();
// Response structure
{
  address: '0x9a2f0C371820e8BE3D64efb3E814808F231880ff',
  history: {
    trades: [
      {
        trade_id: 'a1b2c3d4e5f678901234567890abcdef',
        instrument_name: 'BTC_USDC-29AUG25-106000-C',
        direction: 'buy',
        size: 1.5,
        average_price: 125.50,
        realised_pnl: -5.75,
        // ... full trade details including fees and greeks
      }
    ],
    account_events: [
      {
        action: 'deposit',  // Types: deposit, withdrawal, settlement, funding
        amount: 1000.0,
        symbol: 'USDC',
        timestamp: 1704067500,
        // ... complete event details
      }
    ]
  }
}