Skip to main content

Import

Usage

Return Type: UseQueryResult<SwapPricesWithCurrencyInfo[]>

The hook returns all properties from React Query’s UseQueryResult with swap prices data. Here’s the detailed structure:

Properties

data

SwapPricesWithCurrencyInfo[] | undefined Array of swap price objects containing:
price (SwapPrice)
  • currencyAddress: Address of the currency
  • currencyBalance: Balance of the currency
  • price: The swap price
  • maxPrice: The maximum price for the swap
  • transactionValue: The value of the transaction
info (ContractInfo)
  • chainId: Chain ID where the token exists
  • address: Token contract address
  • source: Source of the token information
  • name: Token name
  • type: Token type
  • symbol: Token symbol
  • decimals: Token decimals
  • logoURI: Token logo URL
  • deployed: Whether the token is deployed
  • bytecodeHash: Hash of the token’s bytecode
  • extensions: Additional token metadata
  • updatedAt: Last update timestamp
  • notFound: Whether token was not found
  • queuedAt: When token was queued for update
  • status: Token resource status
balance (Balance)
  • balance: User’s balance of the currency in base units

isLoading

boolean Loading state for the data fetch.

isError

boolean Error state indicating if the query failed.

error

Error | null Any error that occurred during data fetching.

Parameters

The hook accepts two parameters:

args: UseGetSwapPricesArgs

options: HooksOptions