Skip to main content

Calculating Spot Volume

Calculate total trading volume for spot coins on Hyperliquid using the Allium API. Spot coins are identified as coins whose name starts with @.

Features

  • Fetches all fills for a user using the userFillsByTime endpoint
  • Handles pagination (max 2000 results per call)
  • Deduplicates fills using (time, coin, tid) as unique key
  • Filters for spot coins (starting with @)
  • Calculates trading volume as price * size
  • Shows progress during execution

Usage

Arguments

Output

The script displays:
  • Progress for each page fetched
  • Number of fills received and processed
  • Spot coin fills and volume per page
  • Final summary with total statistics

Source Code