Skip to main content

Fetch

Imported types#

Token#

type Token {
chainId: ChainId!
address: String!
currency: Currency!
}

TokenAmount#

type TokenAmount {
token: Token!
amount: String! # UInt256!
}

ChainId#

enum ChainId {
MAINNET
ROPSTEN
RINKEBY
GOERLI
KOVAN
}

Query schemas#

fetchTokenData#

Fetches token data.

fetchTokenData(
chainId: ChainId!
address: String!
symbol: String
name: String
): Token!

fetchTotalSupply#

Fetches total supply.

fetchTotalSupply(
token: Token!
): TokenAmount!

fetchPairData#

Fetches pair data.

fetchPairData(
token0: Token!
token1: Token!
): Pair!