The examples on this page use Hyperliquid (
provider: 'hyperliquid'). Replace the provider value with any supported provider from getProviders().Filtering by type
Parameters
Returns
ActivitiesResponse:
ActivityType enum
Ondo:
getActivity returns only FUNDING, LIQUIDATION, DEPOSIT, and WITHDRAWAL items. TRANSFER items come from Hyperliquid and Lighter only.Activity item fields
All items shareid, provider, type, and timestamp. Additional fields depend on type:
DEPOSIT (DepositActivity): asset (Asset; use asset.displaySymbol), amount, counterpartyAddress? (source address, when the venue’s deposit payload names one), explorerLink? (block-explorer URL for the on-chain deposit tx)
WITHDRAWAL (WithdrawalActivity): asset (Asset; use asset.displaySymbol), amount, fee? (Fee, absent when the venue reports no fee), explorerLink? (block-explorer URL for the on-chain withdrawal tx)
FUNDING (FundingActivity): market (MarketDisplay), amount (negative = paid), positionSize, fundingRate
LIQUIDATION (LiquidationActivity): liquidatedNotionalPosition?, accountValue?, leverageType? (each absent when the venue reports no such value), liquidatedPositions[] (each with market: MarketDisplay and size?; at least one entry is guaranteed)
TRANSFER (TransferActivity): direction ('IN' or 'OUT', relative to the queried account), counterpartyAccountIndex? (L2 account integer — Lighter), counterpartyAddress? (wallet address — Hyperliquid), asset (Asset), amount, fees? (Fee[], every fee the venue charged, in the order reported — absent when the venue reports no fee), meta?, explorerLink? (block-explorer URL for the on-chain transfer tx). At least one of counterpartyAccountIndex / counterpartyAddress is always present; either may appear alone or alongside the other.
Activity items carry no classification field; only Fill does.
Throws
PerpsError with one code for the account’s access state. See Account access.
SetupRequired— the venue needs a credential (a Lighter auth token or an Ondo session) and none is stored.Unauthorized— the venue rejects the credential.AccountNotFound— the wallet has no venue account.
items list.
Data shapes: getActivity — a direct-to-provider read, not a LI.FI HTTP endpoint.