Get tokens list
curl --request POST \
--url https://api.tokenlayer.network/functions/v1/get-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": "trending",
"hashtag_name": "defi",
"limit": 20,
"offset": 0,
"verified_only": false
}
'import requests
url = "https://api.tokenlayer.network/functions/v1/get-tokens"
payload = {
"filter": "trending",
"hashtag_name": "defi",
"limit": 20,
"offset": 0,
"verified_only": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: 'trending',
hashtag_name: 'defi',
limit: 20,
offset: 0,
verified_only: false
})
};
fetch('https://api.tokenlayer.network/functions/v1/get-tokens', 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.tokenlayer.network/functions/v1/get-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => 'trending',
'hashtag_name' => 'defi',
'limit' => 20,
'offset' => 0,
'verified_only' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tokenlayer.network/functions/v1/get-tokens"
payload := strings.NewReader("{\n \"filter\": \"trending\",\n \"hashtag_name\": \"defi\",\n \"limit\": 20,\n \"offset\": 0,\n \"verified_only\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tokenlayer.network/functions/v1/get-tokens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": \"trending\",\n \"hashtag_name\": \"defi\",\n \"limit\": 20,\n \"offset\": 0,\n \"verified_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlayer.network/functions/v1/get-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": \"trending\",\n \"hashtag_name\": \"defi\",\n \"limit\": 20,\n \"offset\": 0,\n \"verified_only\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"tokens": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"symbol": "<string>",
"slug": "<string>",
"logo": "<string>",
"banner_url": "<string>",
"video_url": "<string>",
"description": "<string>",
"token_layer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"launch_post_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_posts_count": 1,
"total_media_count": 1,
"groups_count": 1,
"holders_count": 1,
"upvotes": 1,
"downvotes": 1,
"weighted_upvotes": 1,
"weighted_downvotes": 1,
"user_vote": "upvote",
"is_live": true,
"hashtags": [
"<string>"
],
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"profile_picture": "<string>"
},
"market_cap": 123,
"token_addresses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "<string>",
"address_display": "<string>",
"address_type": "evm",
"chain": "<string>",
"platform_name": "<string>",
"is_registered": true,
"dex_name": "<string>",
"dex_address": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"launch_post": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upvotes": 1,
"downvotes": 1,
"weighted_upvotes": 1,
"weighted_downvotes": 1,
"user_vote": "upvote"
}
}
],
"pagination": {
"limit": 1,
"offset": 1,
"total_returned": 1,
"has_more": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Tokens
Get tokens list
Retrieves a list of tokens with filtering options (trending, new, popular, top_posts). Supports optional hashtag filtering and pagination.
Returns token data including:
- Holder counts
- Media counts
- Vote aggregates (upvotes/downvotes with weights)
- Livestream status
- Associated hashtags
- Creator information
Authentication is optional - unauthenticated requests receive public data without user-specific vote information.
POST
/
get-tokens
Get tokens list
curl --request POST \
--url https://api.tokenlayer.network/functions/v1/get-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": "trending",
"hashtag_name": "defi",
"limit": 20,
"offset": 0,
"verified_only": false
}
'import requests
url = "https://api.tokenlayer.network/functions/v1/get-tokens"
payload = {
"filter": "trending",
"hashtag_name": "defi",
"limit": 20,
"offset": 0,
"verified_only": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: 'trending',
hashtag_name: 'defi',
limit: 20,
offset: 0,
verified_only: false
})
};
fetch('https://api.tokenlayer.network/functions/v1/get-tokens', 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.tokenlayer.network/functions/v1/get-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => 'trending',
'hashtag_name' => 'defi',
'limit' => 20,
'offset' => 0,
'verified_only' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tokenlayer.network/functions/v1/get-tokens"
payload := strings.NewReader("{\n \"filter\": \"trending\",\n \"hashtag_name\": \"defi\",\n \"limit\": 20,\n \"offset\": 0,\n \"verified_only\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tokenlayer.network/functions/v1/get-tokens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": \"trending\",\n \"hashtag_name\": \"defi\",\n \"limit\": 20,\n \"offset\": 0,\n \"verified_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlayer.network/functions/v1/get-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": \"trending\",\n \"hashtag_name\": \"defi\",\n \"limit\": 20,\n \"offset\": 0,\n \"verified_only\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"tokens": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"symbol": "<string>",
"slug": "<string>",
"logo": "<string>",
"banner_url": "<string>",
"video_url": "<string>",
"description": "<string>",
"token_layer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"launch_post_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_posts_count": 1,
"total_media_count": 1,
"groups_count": 1,
"holders_count": 1,
"upvotes": 1,
"downvotes": 1,
"weighted_upvotes": 1,
"weighted_downvotes": 1,
"user_vote": "upvote",
"is_live": true,
"hashtags": [
"<string>"
],
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"profile_picture": "<string>"
},
"market_cap": 123,
"token_addresses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "<string>",
"address_display": "<string>",
"address_type": "evm",
"chain": "<string>",
"platform_name": "<string>",
"is_registered": true,
"dex_name": "<string>",
"dex_address": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"launch_post": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upvotes": 1,
"downvotes": 1,
"weighted_upvotes": 1,
"weighted_downvotes": 1,
"user_vote": "upvote"
}
}
],
"pagination": {
"limit": 1,
"offset": 1,
"total_returned": 1,
"has_more": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
JWT token or API key
Body
application/json
Sorting/filtering strategy for tokens
Available options:
trending, new, popular, top_posts Example:
"trending"
Filter tokens by hashtag name
Example:
"defi"
Maximum number of tokens to return
Required range:
1 <= x <= 100Example:
20
Number of tokens to skip for pagination
Required range:
x >= 0Example:
0
Only return tokens with token_layer_id (verified)
Example:
false
⌘I
