Get NFT owner history by token
curl --request GET \
--url https://api.chainbase.online/v1/nft/owner/history \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.chainbase.online/v1/nft/owner/history"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.chainbase.online/v1/nft/owner/history', 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.chainbase.online/v1/nft/owner/history",
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: <x-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.chainbase.online/v1/nft/owner/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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.chainbase.online/v1/nft/owner/history")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainbase.online/v1/nft/owner/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"block_number": 123,
"block_timestamp": "<string>",
"transaction_hash": "<string>",
"transaction_index": 123,
"log_index": 123,
"from_address": "<string>",
"to_address": "<string>",
"operator_address": "<string>",
"token_id": "<string>",
"value": "<string>"
}
],
"code": 0,
"message": "ok",
"next_page": 123,
"count": 123
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}NFT API
Get NFT owner history by token
Get the list of historical owner addresses for a specified NFT token.
GET
/
v1
/
nft
/
owner
/
history
Get NFT owner history by token
curl --request GET \
--url https://api.chainbase.online/v1/nft/owner/history \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.chainbase.online/v1/nft/owner/history"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.chainbase.online/v1/nft/owner/history', 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.chainbase.online/v1/nft/owner/history",
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: <x-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.chainbase.online/v1/nft/owner/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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.chainbase.online/v1/nft/owner/history")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainbase.online/v1/nft/owner/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"block_number": 123,
"block_timestamp": "<string>",
"transaction_hash": "<string>",
"transaction_index": 123,
"log_index": 123,
"from_address": "<string>",
"to_address": "<string>",
"operator_address": "<string>",
"token_id": "<string>",
"value": "<string>"
}
],
"code": 0,
"message": "ok",
"next_page": 123,
"count": 123
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Headers
Example:
"demo"
Query Parameters
chain network id, see list of details
The address of the NFT contract
Pattern:
^0[xX]{1}[a-fA-F0-9]{40}$NFT token id in hex or num string
Inclusive from block number (hex string or int)
Inclusive to block number (hex string, int, or 'latest')
Inclusive start timestamp
Inclusive end timestamp
The page offset
Required range:
x >= 1The desired page size limit. Less or equal than 100
Required range:
1 <= x <= 100