# Data Queries

## Get Mining Points

This endpoint allows querying user liquidity pool shares (lp), mining points (integral), and other data.

{% openapi src="<https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media>" path="/brc20swap/manage\_liquid\_info" method="post" %}
[global.data.json](https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media)
{% endopenapi %}

{% hint style="info" %}

1. The response includes a `protocol` field to indicate the type of pool (brc20, arc20).
   {% endhint %}

## Get Liquidity Change History

This endpoint allows querying the history of user operations related to creating, adding, and removing liquidity pools. The `txid` can be used to query the on-chain transaction status in the mempool.

{% openapi src="<https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media>" path="/brc20swap/liquid\_history" method="post" %}
[global.data.json](https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media)
{% endopenapi %}

{% hint style="info" %}

1. The response includes an array `txs`, where the `txid` field represents the transaction hash for querying transaction status. A status other than `confirmed` indicates the transaction is unconfirmed.
   {% endhint %}

## Liquidity Pool Information List

This endpoint allows querying the Total Value Locked (TVL) of pools.

{% openapi src="<https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media>" path="/brc20swap/stat/trade\_info\_list" method="post" %}
[global.data.json](https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media)
{% endopenapi %}

{% hint style="info" %}

1. Values returned with `_btc` are in BTC units; otherwise, values are in USD.
2. The TVL field includes `pool_locked_amount_btc` and `pool_locked_amount`.
   {% endhint %}

{% openapi src="<https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media>" path="/brc20swap/get\_liquid\_address" method="post" %}
[global.data.json](https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media)
{% endopenapi %}

{% openapi src="<https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media>" path="/brc20swap/external/pool/apr" method="post" %}
[global.data.json](https://2330303583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXEWf0ylbbPQ6t8CoOLdL%2Fuploads%2Fgit-blob-d5b8d0551d1e1d00f983a076657aabe2ca5a4e2c%2Fglobal.data.json?alt=media)
{% endopenapi %}
