Get token price chart data
curl --request GET \
--url https://api.getnimbus.io/tokens/sui/price/chart \
--header 'x-api-key: <api-key>'import requests
url = "https://api.getnimbus.io/tokens/sui/price/chart"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.getnimbus.io/tokens/sui/price/chart', 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.getnimbus.io/tokens/sui/price/chart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.getnimbus.io/tokens/sui/price/chart"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.getnimbus.io/tokens/sui/price/chart")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getnimbus.io/tokens/sui/price/chart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"tokenMeta": {
"name": "Sui",
"symbol": "SUI",
"decimals": 9,
"logo": "https://token-logo.service.com/sui.png"
},
"data": [
{
"price": 1.23,
"updatedAt": "2024-03-20T10:30:00.000Z"
}
]
}
}Token
Get token price chart data
Retrieves historical price data for a SUI token with different time intervals based on the range Unix timestamp in seconds. If not provided, returns data for last 24 hours. Different ranges will have different intervals:
- < 1 day: 5-minute intervals
- < 7 days: 1-hour intervals
- ≥ 7 days: 1-day intervals
GET
/
tokens
/
sui
/
price
/
chart
Get token price chart data
curl --request GET \
--url https://api.getnimbus.io/tokens/sui/price/chart \
--header 'x-api-key: <api-key>'import requests
url = "https://api.getnimbus.io/tokens/sui/price/chart"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.getnimbus.io/tokens/sui/price/chart', 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.getnimbus.io/tokens/sui/price/chart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.getnimbus.io/tokens/sui/price/chart"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.getnimbus.io/tokens/sui/price/chart")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getnimbus.io/tokens/sui/price/chart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"tokenMeta": {
"name": "Sui",
"symbol": "SUI",
"decimals": 9,
"logo": "https://token-logo.service.com/sui.png"
},
"data": [
{
"price": 1.23,
"updatedAt": "2024-03-20T10:30:00.000Z"
}
]
}
}Authorizations
API key for authentication
Query Parameters
The token contract address
(recommended) The time range to get the price chart data. If not provided, defaults to using the 'from' and 'to' parameters.
Available options:
1h, 1D, 1W, 1M, YTD, ALL Start timestamp in seconds. If not provided, defaults to 24 hours ago
End timestamp in seconds. If not provided, defaults to current time
Response
Successful response with price chart data
Show child attributes
Show child attributes

