Get contracts by trait

Retrieves a list of contracts based on the following traits listed in JSON format - functions, variables, maps, fungible tokens and non-fungible tokens.

GET

Parameters

Query Parameters

trait_abi
REQUIRED
string JSON abi of the trait.
limit
integer max number of contracts fetch
offset
integer index of first contract event to fetch
Status codeDescription
200GET list of contracts
4XXDefault Response
cURL
curl -L \
"https://api.hiro.so/extended/v1/contract/by_trait?trait_abi={trait_abi}&limit={limit}&offset={offset}" \
-H 'Accept: application/json'
Response
{
"limit": 20,
"offset": 0,
"results": [
{
"tx_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"canonical": false,
"contract_id": "SP000000000000000000002Q6VF78.pox-3",
"block_height": 144000,
"clarity_version": 0,
"source_code": "string",
"abi": "string"
}
]
}

How is this guide?