# Dex API

> This section provides access to PiperX decentralized exchange (DEX) statistics, including Total Value Locked (TVL) and trading volume across all liquidity pools. > Useful for dashboards, analytics

#### Overview

Use this endpoint to get **TVL** and **total volume** statistics of PiperX DEX.

***

#### &#x20;Endpoint

<mark style="color:blue;background-color:purple;">**`[GET]`**</mark>  `https://piperxdb.piperxprotocol.workers.dev/api/piperxapi/tvl`

***

#### Example Request

```bash
curl https://piperxdb.piperxprotocol.workers.dev/api/piperxapi/tvl
```

**Example Response**

```json
{
  "dex": {
    "id": "piperx",
    "name": "PiperX",
    "totalVolumeUSD": "49432841143971",
    "totalVolumeNative": "15038256415533119426220899",
    "tvlUSD": "6979210444605", 
    "tvlNative": "1034401251952740102208458" 
  }
}

```

`tvlUSD` has 6 decimals and `tvlNative` has 18 decimals.


---

# 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.piperx.xyz/developer/api/dex-api.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.
