getOwnersByContractAddress

Request

curl -X GET http://eth-mainnet.api.henesis.io/nft/v1/contracts/<contractAddress>/owners?clientId=<clientId>&page=<page>&size=<size>&order_by=<order_by>&order_direction=<order_direction>

Response

{
"data": [
{
"address": "0x185b257aa51fdc45176cf1ffac6a0bfb5cf28afd",
"tokenCount": 10607
},
{
"address": "0x138a35ee20e40f019e7e7c00386ab2ef42d66d1e",
"tokenCount": 4124
},
{
"address": "0xad8c2948faa3274e3f5abfdb3015819f049c02ae",
"tokenCount": 109
},
{
"address": "0xcd6fb0f2bf2476e43219e5616709adc58360a8da",
"tokenCount": 60
},
{
"address": "0xbe21a1ccc576f2978f33227d302e3123843112f0",
"tokenCount": 26
},
...
],
"pagination": {
"totalCount": 747,
"prevUrl": "",
"nextUrl": "http://api.henesis.io/nft/v1/contracts/0x273f7f8e6489682df756151f5525576e322d51a3/owners?page=1&size=10&order_by=tokens_count&order_direction=desc"
}
}

Path Parameters

Name

Type

Description

contractAddress

string

The address of account for which you want to retrieve ERC721 tokens

Query Parameters

Name

Type

Description

clientId

string

The id required for authentication

page

integer

The page of results to return

size

integer

The number of ERC721 tokens to return in one request, specified as an integer from 1 to 200

order_by

string

The field by which the results is sorted Available Values:

token_count : number of unique tokens owned by the owner (default)

order_direction

string

The order direction Available Values:

asc: Ascending Order

desc: Descending Order (default)

Response Fields

data : The response of getOwnersByContractAddress API call

Name

Type

Description

address

string

The owner of ERC721 token

tokenCount

string

Total number of tokens owned by owner

pagination: The pagination information of ERC721 token list

Name

Type

Description

totalCount

long

The number of all elements in this API request

prevUrl

string

The previous url of this API request

nextUrl

string

The next url of this API request

If prevUrl or nextUrl does not exist, it would be displayed as "".

Errors

If an error occurs, the following message is returned.

{
"error": {
"message": "Not Supported Contract",
"code": 404
}
}

The types of error handled are as follows.

code

message

description

404

Not Supported Contract

Occurs when requesting a not supported contract

401

Unauthorized user

Occurs when requesting with an unregistered clientId

400

Invalid parameter in [parameter]

Occurs when the value of the requested parameter is invalid