Skip to content

dex.useTickLevel ​

Gets the tick level information at a specific tick on the Stablecoin DEX orderbook.

Usage ​

ts
import { Hooks } from 'wagmi/tempo'
import { Tick } from 'viem/tempo'

const { data: level } = Hooks.dex.useTickLevel({
  base: '0x20c0000000000000000000000000000000000001',
  tick: Tick.fromPrice('1.001'),
  isBid: true,
})

console.log('Tick level:', level)
// @log: Tick level: { head: 1n, tail: 5n, totalLiquidity: 1000000000n }
ts
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { tempoWallet } from 'wagmi/tempo'

export const config = createConfig({
  connectors: [tempoWallet()],
  chains: [tempo],
  multiInjectedProviderDiscovery: false,
  transports: {
    [tempo.id]: http(),
  },
})

Return Type ​

See TanStack Query query docs for more info hook return types.

data ​

See Wagmi Action dex.getTickLevel Return Type

Parameters ​

See Wagmi Action dex.getTickLevel Parameters

query ​

See the TanStack Query query docs for more info hook parameters.

Action ​

Released under the MIT License.