Skip to main content

Fetch

fetchToken#

Returns token object constructed from the on-chain token contract at the given address

fetchToken(
address: String! # The Ethereum address of token's ERC20 contract
chainId: ChainId! # The id of the chain to be queried
): Token!

fetchPoolFromTokens#

Returns pool object constructed from the on-chain pool contract associated with the tokens and fee amount

fetchPoolFromTokens(
tokenA: Token! # A token in the pool
tokenB: Token! # The other token in the pool
fee: FeeAmount! # The pool's fee amount
fetchTicks: Boolean! # If true, the full list of pool ticks will be fetched
): Pool!

fetchPoolFromAddress#

Returns pool object constructed from the on-chain pool contract at the given address

fetchPoolFromAddress(
address: String! # The Ethereum address of the pool contract
chainId: ChainId! # The id of the chain to be queried
fetchTicks: Boolean! # If true, the full list of pool ticks will be fetched
): Pool!

fetchTickList#

Returns array of ticks from the on-chain pool contract at the given address

fetchTickList(
address: String! # The Ethereum address of the pool contract
chainId: ChainId! # The id of the chain to be queried
): Tick[]!