Coverage

Get Supported Chains

Returns details of the chains supported by Treehouse APIs.

https://api.treehouse.finance/v1/coverage/scoped_chains
    ?access_key=yourApiKey

Scoped Chains

GET https://api.treehouse.finance/v1/coverage/scoped_chains

{
    "status": "OK",
    "data": [
        {
            "chain_id": string,
            "chain_name": string,
            "native_token_id": string,
            "wrapped_token_id": string
        }
    ],
    "message": "Get scoped chains successfully"
}

Get Supported Protocols

Returns details of the protocols supported by Treehouse APIs.

https://api.treehouse.finance/v1/coverage/scoped_protocols
    ?chain_id=eth
    &access_key=yourApiKey

Scoped Protocols

GET https://api.treehouse.finance/v1/coverage/scoped_protocols/scoped_protocols

Query Parameters

NameTypeDescription

chain_id*

String

the Treehouse chain_id representing a particular chain

{
    "status": "OK",
    "data": [
        {
            "chain_id": string,
            "protocols": [
                {
                    "protocol_id": string,
                    "protocol_name": string,
                    "url": string,
                    "protocol_token_id": string
                }
            ]
        }
    ],
    "message": "Get scoped protocol successfully!"
}

Get Supported Tokens

Returns details of the tokens supported by Treehouse APIs.

https://api.treehouse.finance/v1/coverage/scoped_tokens
    ?chain_id=eth
    &access_key=yourApiKey

Scoped Tokens

GET https://api.treehouse.finance/v1/coverage/scoped_tokens

Query Parameters

NameTypeDescription

chain_id*

String

the Treehouse chain_id representing a particular chain

{
    "status": "OK",
    "data": [
        {
            "chain_id": string,
            "tokens": [
                {
                    "token_id": string,
                    "token_name": string,
                    "token_address": string,
                    "token_symbol": string
                }
            ]
        }
    ],
    "message": "Get scoped tokens successfully!"
}

Get Supported Contracts

Returns details of the contracts supported by Treehouse APIs.

https://api.treehouse.finance/v1/coverage/scoped_contracts
    ?chain_id=eth
    &protocol_id=Balancer
    &access_key=yourApiKey

Scoped Contracts

GET https://api.treehouse.finance/v1/coverage/scoped_contracts

Query Parameters

NameTypeDescription

chain_id*

String

the Treehouse chain_id representing a particular chain

protocol_id*

String

the Treehouse protocol_id representing a particular protocol

{
    "status": "OK",
    "data": [
        {
            "chain_id": string,
            "contracts": [
                {
                    "chain_id": string,
                    "cid": string,
                    "id": string,
                    "process_from_block": integer,
                    "protocol": string,
                    "status": string
                }
            ],
            "protocol_id": string,
            "url": string
        }
    ],
    "message": "Get scoped tokens successfully!"
}

Get Method Hex by Action Type

Returns the method hexes supported by Treehouse APIs based on action type.

https://api.treehouse.finance/v1/coverage/map_action_type
    ?action_type=config
    &page=1
    &pageSize=20
    &access_key=yourApiKey

Map Action Type

GET https://api.treehouse.finance/v1/coverage/map_action_type

Query Parameters

NameTypeDescription

action_type*

String

the action type of a transaction

page

Integer

pagination in the event the number of transactions exceed page size

pageSize

Integer

number of transactions per page. Max page size = 1000

{
    "status": "OK",
    "data": [
        [
            {
                "action_type": string,
                "method_hex": string,
                "type": string
            },
        ]
    ],
    "message": "Get method map successfully"
}

Get Action Type by Method Hex

Returns the action types supported by Treehouse APIs based on method hex.

https://api.treehouse.finance/v1/coverage/map_method_hex
    ?method_hex=0x4a420138
    &page=1
    &pageSize=20
    &access_key=yourApiKey

Map Method Hex

GET https://api.treehouse.finance/v1/coverage/map_method_hex

Query Parameters

NameTypeDescription

method_hex*

String

the method hex of a transaction

page

Integer

pagination in the event the number of transactions exceed page size

pageSize

Integer

number of transactions per page. Max page size = 1000

{
    "status": "OK",
    "data": [
        {
            "action_type": string,
            "method_hex": string,
            "type": string
        }
    ],
    "message": "Get method map successfully"
}

Last updated