Get token price
curl --request GET \
--url https://data-api.b3.fun/insights/v1/tokens/priceimport requests
url = "https://data-api.b3.fun/insights/v1/tokens/price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data-api.b3.fun/insights/v1/tokens/price', 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://data-api.b3.fun/insights/v1/tokens/price",
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://data-api.b3.fun/insights/v1/tokens/price"
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://data-api.b3.fun/insights/v1/tokens/price")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.b3.fun/insights/v1/tokens/price")
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{
"data": [
{
"chain_id": 1,
"address": "vitalik.eth",
"price_usd": 123,
"price_usd_cents": 123,
"percent_change_24h": 123,
"volume_24h_usd": 123,
"volume_change_24h": 123,
"market_cap_usd": 123,
"symbol": "<string>",
"historical_prices": [
{
"date": "<string>",
"price_usd": 123,
"price_usd_cents": 123
}
],
"holders": 123
}
]
}insights/tokens
Get token price
Get price in USD for given token(s)
GET
/
insights
/
v1
/
tokens
/
price
Get token price
curl --request GET \
--url https://data-api.b3.fun/insights/v1/tokens/priceimport requests
url = "https://data-api.b3.fun/insights/v1/tokens/price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data-api.b3.fun/insights/v1/tokens/price', 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://data-api.b3.fun/insights/v1/tokens/price",
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://data-api.b3.fun/insights/v1/tokens/price"
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://data-api.b3.fun/insights/v1/tokens/price")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.b3.fun/insights/v1/tokens/price")
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{
"data": [
{
"chain_id": 1,
"address": "vitalik.eth",
"price_usd": 123,
"price_usd_cents": 123,
"percent_change_24h": 123,
"volume_24h_usd": 123,
"volume_change_24h": 123,
"market_cap_usd": 123,
"symbol": "<string>",
"historical_prices": [
{
"date": "<string>",
"price_usd": 123,
"price_usd_cents": 123
}
],
"holders": 123
}
]
}Query Parameters
Use chain_id instead
Example:
[20, 56, 1]
The chain ID(s) to request the data for. You can specify multiple chain IDs, up to a maximum of 55. Use repeated query parameters, e.g., ?chain_id=20&chain_id=56. Optional, because a single chain can as well be specified as a subdomain
Example:
[20, 56, 1]
The address of the token to get the price for
Example:
[
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
]
The symbol of the token to get the price for
Example:
["ETH", "USDC"]
Timestamp in seconds or milliseconds
Required range:
x > 0Whether to include historical token prices
Available options:
true, false Example:
"true"
Whether to include the number of holders
Available options:
true, false Example:
"true"
Response
Successful response
Show child attributes
Show child attributes
HypeDuel