Tokens
Get Token by ID
Returns token entity information given the id
GET
/
api
/
v1
/
tokens
/
{tokenId}
Get token by id
curl --request GET \
--url https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}import requests
url = "https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}', 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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}",
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}"
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}")
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{
"admin_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"auto_renew_account": "0.1.2",
"auto_renew_period": null,
"created_timestamp": "1234567890.000000001",
"deleted": false,
"decimals": 1000,
"expiry_timestamp": null,
"freeze_default": false,
"freeze_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"initial_supply": 1000000,
"kyc_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"max_supply": 9223372036854776000,
"memo": "token memo",
"modified_timestamp": "1234567890.000000001",
"name": "Token name",
"pause_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"pause_status": "UNPAUSED",
"supply_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"supply_type": "INFINITE",
"symbol": "ORIGINALRDKSE",
"token_id": "0.10.1",
"total_supply": 1000000,
"treasury_account_id": "0.1.2",
"type": "FUNGIBLE_COMMON",
"wipe_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"custom_fees": {
"created_timestamp": "1234567890.000000001",
"fixed_fees": [
{
"amount": 100,
"collector_account_id": "0.1.5",
"denominating_token_id": "0.10.8"
}
],
"fractional_fees": [
{
"amount": {
"numerator": 12,
"denominator": 29
},
"collector_account_id": "0.1.6",
"denominating_token_id": "0.10.9",
"maximum": 120,
"minimum": 30,
"net_of_transfers": true
}
]
}
}
Get Token By ID.
This method will use
20 Compute Units.
Path Parameters
Token id
Network entity ID in the format of shard.realm.num
Pattern:
^\d{1,10}\.\d{1,10}\.\d{1,10}$Example:
"0.1.2"
Query Parameters
Pattern:
^((eq|lt|lte):)?\d{1,10}(.\d{1,9})?$Response
OK
Show child attributes
Show child attributes
Network entity ID in the format of shard.realm.num
Pattern:
^\d{1,10}\.\d{1,10}\.\d{1,10}$Example:
"0.1.2"
Example:
null
Pattern:
^\d{1,10}(\.\d{1,9})?$Example:
"1586567700.453054000"
Example:
1000
Example:
true
Example:
1234567890100000
Show child attributes
Show child attributes
Example:
false
Show child attributes
Show child attributes
Example:
"1000000"
Show child attributes
Show child attributes
Example:
"9223372036854775807"
Pattern:
^\d{1,10}(\.\d{1,9})?$Example:
"1586567700.453054000"
Example:
"Token name"
Example:
"token memo"
Show child attributes
Show child attributes
Available options:
NOT_APPLICABLE, PAUSED, UNPAUSED Example:
"UNPAUSED"
Show child attributes
Show child attributes
Available options:
FINITE, INFINITE Example:
"INFINITE"
Example:
"ORIGINALRDKSE"
Network entity ID in the format of shard.realm.num
Pattern:
^\d{1,10}\.\d{1,10}\.\d{1,10}$Example:
"0.1.2"
Example:
"1000000"
Network entity ID in the format of shard.realm.num
Pattern:
^\d{1,10}\.\d{1,10}\.\d{1,10}$Example:
"0.1.2"
Available options:
FUNGIBLE_COMMON, NON_FUNGIBLE_UNIQUE Example:
"FUNGIBLE_COMMON"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Get token by id
curl --request GET \
--url https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}import requests
url = "https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}', 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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}",
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}"
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://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.hedera.validationcloud.io/v1/{API_KEY}/api/v1/tokens/{tokenId}")
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{
"admin_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"auto_renew_account": "0.1.2",
"auto_renew_period": null,
"created_timestamp": "1234567890.000000001",
"deleted": false,
"decimals": 1000,
"expiry_timestamp": null,
"freeze_default": false,
"freeze_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"initial_supply": 1000000,
"kyc_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"max_supply": 9223372036854776000,
"memo": "token memo",
"modified_timestamp": "1234567890.000000001",
"name": "Token name",
"pause_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"pause_status": "UNPAUSED",
"supply_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"supply_type": "INFINITE",
"symbol": "ORIGINALRDKSE",
"token_id": "0.10.1",
"total_supply": 1000000,
"treasury_account_id": "0.1.2",
"type": "FUNGIBLE_COMMON",
"wipe_key": {
"_type": "ProtobufEncoded",
"key": 10101
},
"custom_fees": {
"created_timestamp": "1234567890.000000001",
"fixed_fees": [
{
"amount": 100,
"collector_account_id": "0.1.5",
"denominating_token_id": "0.10.8"
}
],
"fractional_fees": [
{
"amount": {
"numerator": 12,
"denominator": 29
},
"collector_account_id": "0.1.6",
"denominating_token_id": "0.10.9",
"maximum": 120,
"minimum": 30,
"net_of_transfers": true
}
]
}
}