Skip to main content

Documentation Index

Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt

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

The public Hyperliquid /info API surfaces raw building blocks; you write the parser. Liquidations are buried inside fills as a thin stub, and vault, staking, and delegation activity arrives as untyped ledger updates you have to classify yourself. GoldRush ships every one of these pre-decoded and typed.

What’s pre-decoded

Liquidations

Inline with the fill that triggered them, with full context:
FieldDescription
methodMarket or Backstop.
liquidated_userThe wallet whose position was liquidated.
market_priceMark price at the moment of liquidation.
liquidated_positions[]Every position closed by the liquidation (coin + size).
account_valueAccount value at the time of liquidation.
leverage_typeCross or isolated.

20+ ledger event subtypes

SubtypeDescription
LedgerLiquidationStandalone liquidation ledger event with full position list.
LedgerVaultDepositDeposit into a vault.
LedgerVaultWithdrawWithdrawal request from a vault, with commission and basis.
LedgerVaultLeaderCommissionCommission earned by a vault leader.
LedgerVaultDistributionDistribution from a vault to depositors.
LedgerVaultCreateNew vault creation event.
LedgerCStakingTransferHyperliquid staking deposit/withdrawal.
LedgerBorrowLendBorrow or lend operation.
LedgerRewardsClaimValidator or program reward claim.
LedgerDeposit, LedgerWithdrawBridge in/out.
LedgerInternalTransferSub-account transfer.
LedgerSpotTransferSpot token transfer with USDC value.
LedgerSubAccountTransferSub-account funds movement.
LedgerSendCross-DEX send (with source_dex and destination_dex).
LedgerAccountClassTransferAccount-class movement (perp/spot).
LedgerAccountActivationGasActivation gas charged on first deposit.
LedgerSpotGenesisSpot token genesis allocation.
LedgerDeployGasAuctionHIP-3 market deployment gas auction.
LedgerPerpDexClassTransferTransfer between HIP-3 perp DEXes and core perp.
See HypercoreLedgerEvent for the full type with all fields.

Funding, deposits, withdrawals, delegations

Each gets its own typed event:

Subscribe

Pull liquidations, fills, and ledger events for a wallet (or many) in one stream:
import { GoldRushClient } from "@covalenthq/client-sdk";

const client = new GoldRushClient(process.env.GOLDRUSH_API_KEY);

const SUBSCRIPTION_QUERY = `
  subscription {
    walletTxs(
      wallet_addresses: ["0xecb63caa47c7c4e77f60f1ce858cf28dc2b82b00"]
      chain_name: HYPERCORE_MAINNET
    ) {
      tx_hash
      block_signed_at
      decoded_details {
        ... on HypercoreFillTransaction {
          coin side price size closed_pnl
          liquidation {
            method
            liquidated_user
            market_price
          }
        }
        ... on HypercoreLedgerEvent {
          ledger_type
          time
          delta {
            ... on LedgerLiquidation {
              account_value
              leverage_type
              liquidated_ntl_pos
              liquidated_positions { coin szi }
            }
            ... on LedgerVaultDeposit { vault user usdc }
            ... on LedgerVaultWithdraw {
              vault user requested_usd commission basis closing_cost
            }
            ... on LedgerVaultLeaderCommission { vault usdc }
            ... on LedgerVaultDistribution { vault usdc }
            ... on LedgerCStakingTransfer { token amount is_deposit }
            ... on LedgerBorrowLend { token amount interest_amount operation }
            ... on LedgerRewardsClaim { amount }
          }
        }
      }
    }
  }
`;

client.StreamingService.rawQuery(
  SUBSCRIPTION_QUERY,
  {},
  {
    next: (data) => console.log(JSON.stringify(data, null, 2)),
    error: (err) => console.error(err),
  }
);

Patterns

Live liquidation tape

Filter the stream on HypercoreFillTransaction where liquidation is non-null. Display each liquidation in a chronological feed with the user, mark price, method, and total position value.

”X just got liquidated for $Y” notifications

Push every non-null liquidation to a notification channel. Use account_value to compute the dollar size and liquidated_positions[] to list the markets.

Position-risk warnings

Combine clearinghouseState (read liquidationPx, marginUsed, accountValue) with live LedgerLiquidation events for similar wallets to flag at-risk positions before they liquidate.

Vault leaderboards

Aggregate LedgerVaultLeaderCommission and LedgerVaultDistribution events per vault address. Surface top-performing vaults by commission earned or distribution payout.

Staking and rewards tabs

Subscribe to LedgerCStakingTransfer, HypercoreDelegationEvent, and LedgerRewardsClaim for a user. Display delegation history, current stake, and rewards earned.

Borrow/lend position trackers

Filter on LedgerBorrowLend for operation: "borrow" | "repay" | "open" | "close". Display per-token borrow positions with cumulative interest.

Historical depth

Every fill, funding payment, and ledger event is retained back to HyperCore block 676,607,001 (2025-07-27T01:49:59Z). For warehouse delivery - every ledger event landing in your database continuously - use the Pipeline API (hl_misc_events).

Reference