Skip to main content
GET
/
v1
/
account
/
nfts
Get NFTs owned by address
curl --request GET \
  --url https://api.chainbase.online/v1/account/nfts \
  --header 'x-api-key: <x-api-key>'
import requests

url = "https://api.chainbase.online/v1/account/nfts"

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/account/nfts', 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/account/nfts",
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/account/nfts"

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/account/nfts")
.header("x-api-key", "<x-api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.chainbase.online/v1/account/nfts")

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
{
  "code": 0,
  "message": "ok",
  "data": [
    {
      "contract_address": "<string>",
      "erc_type": "<string>",
      "mint_time": "2023-11-07T05:31:56Z",
      "mint_transaction_hash": "<string>",
      "name": "<string>",
      "owner": "<string>",
      "symbol": "<string>",
      "token_id": "<string>",
      "token_uri": "<string>",
      "image_uri": "<string>",
      "total": 123,
      "total_string": "<string>",
      "metadata": {},
      "traits": "<unknown>",
      "rarity_score": 123,
      "rarity_rank": 123,
      "floor_prices": [
        {
          "value": "<string>",
          "symbol": "<string>",
          "address": "<string>"
        }
      ]
    }
  ],
  "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

x-api-key
string
required
Example:

"demo"

Query Parameters

chain_id
string
required

chain network id, see list of details

address
string
required

A hex string referencing a wallet address

Pattern: ^0[xX]{1}[a-fA-F0-9]{40}$
contract_address
string

The address of the NFT contract, or filter multiple addresses, (max 100), eg:contract_address=0xed5af388653567af2f388e6224dc7c4b3241c544,0x1a92f7381b9f03921564a437210bb9396471050c The address of the NFT contract, or filter multiple addresses, (max 100), eg:contract_address=0xed5af388653567af2f388e6224dc7c4b3241c545,0x1a92f7381b9f03921564a437210bb9396471050c

Pattern: ^0[xX]{1}[a-fA-F0-9]{40}$
page
integer
default:1

The page offset

Required range: x >= 1
limit
integer
default:20

The desired page size limit. Less or equal than 100

Required range: 1 <= x <= 100

Response

Successful Response

code
integer
default:0
message
string
default:ok
data
NFTDetail · object[]
next_page
integer
count
integer