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
/extended/v1/contract/by_trait

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

Query Parameters

trait_abi
Required
string

JSON abi of the trait.

limitinteger

max number of contracts fetch

offsetinteger

index of first contract event to fetch

Status codeDescription
200List of contracts implement given trait
Terminal
$
curl -X GET "https://api.hiro.so/extended/v1/contract/by_trait?trait_abi=string&limit=0&offset=0"

GET list of contracts

{
"limit": 0,
"offset": 0,
"results": [
{
"tx_id": "string",
"canonical": true,
"contract_id": "string",
"block_height": 0,
"source_code": "string",
"abi": "string"
}
]
}