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://api.euclidprotocol.com/graphql' \
--data '{"query":"query Vlp($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":"nibi1m4ns69zvkk2zv0946mw298tlky5ckvu08rtxggtg29p784kc5sxqa9u8ly"}}'

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.