Decentralized Exchanges Pool Liquidity
curl --request GET \
--url https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}import requests
url = "https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{Exchange: "Uniswap", Blockchain: "Ethereum", Address: "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc", Time: "0001-01-01T00:00:00Z", TotalLiquidityUSD: 97124191.13292821,
Liquidity:
{ 0: {Asset: {Symbol: "WETH", Name: "Wrapped Ether", Address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", Decimals: 18, Blockchain: "Ethereum"}, Volume: 34642.164578066426 }}
{1: {Asset: {Symbol: "USDC", Name: "USD Coin", Address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", Decimals: 6, Blockchain: "Ethereum"}, Volume: 50362947.314436}}
}
DeFi Data
Decentralized Exchanges Pool Liquidity
Get the latest state of a DEX pool’s liquidity.
GET
/
v1
/
poolLiquidity
/
{blockchain}
/
{pool_address}
Decentralized Exchanges Pool Liquidity
curl --request GET \
--url https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}import requests
url = "https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadata.org/v1/poolLiquidity/{blockchain}/{pool_address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{Exchange: "Uniswap", Blockchain: "Ethereum", Address: "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc", Time: "0001-01-01T00:00:00Z", TotalLiquidityUSD: 97124191.13292821,
Liquidity:
{ 0: {Asset: {Symbol: "WETH", Name: "Wrapped Ether", Address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", Decimals: 18, Blockchain: "Ethereum"}, Volume: 34642.164578066426 }}
{1: {Asset: {Symbol: "USDC", Name: "USD Coin", Address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", Decimals: 6, Blockchain: "Ethereum"}, Volume: 50362947.314436}}
}
Path Parameters
string
required
Name of the blockchain of the requested pool.
string
required
Address of the requested pool.
{Exchange: "Uniswap", Blockchain: "Ethereum", Address: "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc", Time: "0001-01-01T00:00:00Z", TotalLiquidityUSD: 97124191.13292821,
Liquidity:
{ 0: {Asset: {Symbol: "WETH", Name: "Wrapped Ether", Address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", Decimals: 18, Blockchain: "Ethereum"}, Volume: 34642.164578066426 }}
{1: {Asset: {Symbol: "USDC", Name: "USD Coin", Address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", Decimals: 6, Blockchain: "Ethereum"}, Volume: 50362947.314436}}
}
Was this page helpful?
⌘I