# Liquidity

## Get Liquidity

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/analytics/liquidity/{exchange}/{market}`

Returns an object containing the total liquidity for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

<pre class="language-javascript"><code class="lang-javascript">{
<strong>    "exchange": "coinbasepro",
</strong>    "market": "BTC-USD",
    "nonce": 5640375978,
    "liquidity": 37224813.18828725
}
</code></pre>

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC-USD",
    "nonce": 5640375978,
    "liquidity": 37224813.18828725
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                     |
| -------------- | --------- | --------------------------------------------------------------- |
| exchange       | string    | The exchange id.                                                |
| market         | string    | The crypto pair.                                                |
| nonce          | integer   | The serial unique identifier of the order book on the exchange. |
| liquidity      | integer   | The total liquidity for a crypto market pair.                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abyiss.com/crypto-api/rest-apis/liquidity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
