curl --request GET \
--url https://api.sunrise.xyz/v1/tokens/{address} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sunrise.xyz/v1/tokens/{address}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sunrise.xyz/v1/tokens/{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.sunrise.xyz/v1/tokens/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sunrise.xyz/v1/tokens/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sunrise.xyz/v1/tokens/{address}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sunrise.xyz/v1/tokens/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"token": {
"chain": "<string>",
"address": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 1,
"platform": "<string>",
"assetClass": "<string>",
"issuer": "<string>",
"icon": "<string>",
"tokenProgram": "<string>",
"stock": {
"ticker": "<string>",
"currency": "<string>",
"exchange": {
"marketIdentifierCode": "<string>",
"name": "<string>"
},
"earnings": [
{
"fiscalPeriodEndDate": "2023-12-25",
"reportDate": "2023-12-25",
"reportSession": "pre-market",
"eps": {
"reported": 123,
"estimated": 123,
"surpriseAmount": 123,
"surprisePercent": 123
}
}
],
"dividends": [
{
"exDividendDate": "2023-12-25",
"declarationDate": "2023-12-25",
"recordDate": "2023-12-25",
"paymentDate": "2023-12-25",
"amountPerShare": 1
}
],
"shares": {
"outstanding": {
"date": "2023-12-25",
"basic": 123,
"diluted": 123
}
},
"marketCap": 1
}
}
},
"timestamp": "<string>",
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}Get token
Returns one Sunrise-supported Solana token by mint address. Pass “native” for SOL, the native Solana token. Includes the linked stock when available. Earnings, shares, dividends and market cap are all included for keys with stock data access when no flag is passed; once any flag is passed, only sections set to true are included. Sections that fail to load are omitted.
curl --request GET \
--url https://api.sunrise.xyz/v1/tokens/{address} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sunrise.xyz/v1/tokens/{address}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sunrise.xyz/v1/tokens/{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.sunrise.xyz/v1/tokens/{address}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sunrise.xyz/v1/tokens/{address}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.sunrise.xyz/v1/tokens/{address}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sunrise.xyz/v1/tokens/{address}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"token": {
"chain": "<string>",
"address": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 1,
"platform": "<string>",
"assetClass": "<string>",
"issuer": "<string>",
"icon": "<string>",
"tokenProgram": "<string>",
"stock": {
"ticker": "<string>",
"currency": "<string>",
"exchange": {
"marketIdentifierCode": "<string>",
"name": "<string>"
},
"earnings": [
{
"fiscalPeriodEndDate": "2023-12-25",
"reportDate": "2023-12-25",
"reportSession": "pre-market",
"eps": {
"reported": 123,
"estimated": 123,
"surpriseAmount": 123,
"surprisePercent": 123
}
}
],
"dividends": [
{
"exDividendDate": "2023-12-25",
"declarationDate": "2023-12-25",
"recordDate": "2023-12-25",
"paymentDate": "2023-12-25",
"amountPerShare": 1
}
],
"shares": {
"outstanding": {
"date": "2023-12-25",
"basic": 123,
"diluted": 123
}
},
"marketCap": 1
}
}
},
"timestamp": "<string>",
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"txHash": "<string>",
"fields": [
"<string>"
]
}
},
"requestId": "<string>",
"timestamp": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Solana mint address, or "native" for SOL.
Query Parameters
When true, include the four most recently reported and the next upcoming earnings for the linked stock. When no flag is passed, every section is included for keys with stock data access; once any flag is passed, only sections set to true are included. Omitted for tokens without a linked stock or when the section fails to load.
true, false When true, include the linked stock's latest shares outstanding. When no flag is passed, every section is included for keys with stock data access; once any flag is passed, only sections set to true are included. Omitted for tokens without a linked stock or when the section fails to load.
true, false When true, include the linked stock's recent dividends. When no flag is passed, every section is included for keys with stock data access; once any flag is passed, only sections set to true are included. Omitted for tokens without a linked stock or when the section fails to load.
true, false When true, include the linked stock's market capitalization. When no flag is passed, every section is included for keys with stock data access; once any flag is passed, only sections set to true are included. Omitted for tokens without a linked stock or when the section fails to load.
true, false 
