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://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"}}'
Arguments
- contract (String): The contract address of the VLP. The pair argument should be set if contract is not specified.
- pair (PairInput): The pair of tokens belonging to the VLP. The contract argument should be set if pair is not specified.
Return Fields
Field | Type | Description |
---|---|---|
pair | Pair | The token pair information. |
token_1_reserve | String | The reserve amount of the first token. |
token_2_reserve | String | The reserve amount of the second token. |
total_lp_tokens | String | The total number of liquidity provider tokens. |
Pair
Field | Type | Description |
---|---|---|
token_1 | String | The identifier of the first token in the pair. |
token_2 | String | The identifier of the second token in the pair. |