Skip to main content

GET traits

/v1/traits

Returns the traits info present in a given collection.

Limit

/v1/traits?limit={maxNumber}

Get only the amount of collections you need by informing the amount through the query limit parameter.

Range: 0 → 1400

The default value of limit is 50, if you don't specify a value, this value be adopted.

Offset

/v1/traits?offset={numToAvoid}

Offset ignores the desired amount of collections starting from 1 to offset. That is, if you want to skip the first 100 collections, the offset will be set to offset 100.

The default value of offset is 0, if you don't specify a value, 0 will be adopted.

Order

1. Order by

/v1/traits?oder_by={order}

Possible values:

  • category (default)
  • value
  • score
  • adjusted_score

2. Order direction

/v1/traits?order_direction={order}

Define the ordering direction of the response with the list of collections.

Possible values:

  1. asc → represents an order that starts at the lowest value and ends at the highest reference value
  2. desc → represents an order that starts at the highest value and ends at the lowest reference value

The default value of order_direction is asc, if you don't specify a value, this value will be adopted.

Note: Values are case-insensitive

Queries

1. Collection name (required)

/v1/traits?collection_name={collection_name}

Filter by the collection name.

2. NFT id

/v1/traits?nft_id={value}

Filter by the NFT id. Multiple ids are allowed.

3. NFT index

/v1/traits?nft_index={value}

Filter by the NFT index. Multiple indexes are allowed.

4. Type

/v1/traits?type={value}

Filter by type.

5. Category

/v1/traits?category={category_name}

Filter by category.

6. Value

/v1/traits?category={category_name}&value={category_value}

Filter by a value given a category.

Expected return

An array of traits.

{
"response": [
{
"collection_name": "tron-bull-club",
"nft_id": "1",
"nft_index": 1,
"type": "meta",
"category": "Agility",
"value": "7",
"score": 4270,
"adjusted_score": 4270,
"count": 3527
}
],
"paging": {
"total": 5264,
"pages": 53,
"page": 1
}
}
Errors

400 Invalid Request

Your request is malformed. Please, check the documentation out.

401 API key is invalid

You did not pass the API key for getting authorization.

404 Data not found

Your request returned with no matches.

429 Too many requests

You are hiting the API request limit.

500 Internal server error

The server did not know how to handle this error.