Skip to main content

Liquidity

Liquidity​

Queries liquidity information for the specified VLP address.

query Vlp($contract: String, $pair: PairInput) {
vlp(contract: $contract, pair: $pair) {
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 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":"euclid1k463qf8vmdde9ynn42pahr0lgj09evc48q76gy93kg5wl8c2zthqhkcqae"}}'

Open in Playground

Arguments​

ArgumentTypeDescription
contractStringThe contract address of the VLP. Required if pair is not provided.
pairPairInputThe token pair of the VLP. Required if contract is not provided.

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.