Skip to main content

Liquidity

Liquidity

Queries liquidity information for the specified VLP address.

query Liquidity($contract: String!) {
vlp(contract: $contract) {
liquidity {
pair {
token_1
token_2
}
token_1_reserve
token_2_reserve
total_lp_tokens
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Liquidity($contract: String!) {\n vlp(contract: $contract) {\n liquidity {\n pair {\n token_1\n token_2\n }\n token_1_reserve\n token_2_reserve\n total_lp_tokens\n }\n }\n}","variables":{"contract":"nibi1pys22jem6l222sxhexe7dmggtz8xkmhm49p7z3wjgrcdk3t46hgsle088m"}}'

Open in Playground

Arguments

  • contract (String!): The contract address of the VLP to query.

Return Fields

FieldTypeDescription
pairPairThe token pair information.
token_1_reserveStringThe reserve amount of the first token.
token_2_reserveStringThe reserve amount of the second token.
total_lp_tokensStringThe total number of liquidity provider tokens.

Pair

FieldTypeDescription
token_1StringThe identifier of the first token in the pair.
token_2StringThe identifier of the second token in the pair.