Function getMarket

  • Get market information by chain id and token addresses

    Parameters

    • __namedParameters: {
          chainId: CHAIN_IDS;
          token0: `0x${string}`;
          token1: `0x${string}`;
          options?: {
              n?: number;
              useSubgraph?: boolean;
          } & DefaultOptions;
      }
      • chainId: CHAIN_IDS
      • token0: `0x${string}`
      • token1: `0x${string}`
      • Optional options?: {
            n?: number;
            useSubgraph?: boolean;
        } & DefaultOptions

    Returns Promise<Market>

    A market Market

    Example

    import { getMarket } from '@clober/v2-sdk'

    const market = await getMarket({
    chainId: 421614,
    token0: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
    token1: '0x0000000000000000000000000000000000000000',
    })