Protocol

The Protocol API allows you to easily get protocol information.

Get protocol information

Method

get

Path

/v1/protocol

Parameters

  • id : required, eg: bsc_pancakeswap, curve, uniswap, for more info.

Returns

Object - An object with following fields:

  • id : string - The protocol's id.

  • chain : string - The chain's id.

  • name : string - The protocol's name. null if not defined in the contract and not available from other sources.

  • logo_url : string - URL of the protocol's logo image. null if not available.

  • site_url : string - prioritize websites that can be interacted with, not official websites.

  • has_supported_portfolio : boolean - Is the portfolio already supported.

  • tvl: integer - User deposit value in this protocol.

Request

curl -X 'GET' \
  'https://pro-openapi.debank.com/v1/protocol?id=compound' \
  -H 'accept: application/json' -H 'AccessKey: YOUR_ACCESSKEY'

Result

{
  "id": "compound",
  "chain": "eth",
  "name": "Compound",
  "site_url": "https://app.compound.finance",
  "logo_url": "https://static.debank.com/image/project/logo_url/compound/0b792243f1f68e9ed082f5a49ee6f21d.png",
  "has_supported_portfolio": true,
  "tvl": 12763095483.420198
}

Get the list of the protocol information

Method

get

Path

/v1/protocol/list

Parameters

  • chain_id : required, chain id, eg: eth, bsc, xdai, for more info.

Returns

Array of Object - An object with following fields:

  • id : string - The protocol's id.

  • chain : string - The chain's id.

  • name : string - The protocol's name. null if not defined in the contract and not available from other sources.

  • logo_url : string - URL of the protocol's logo image. null if not available.

  • site_url : string - prioritize websites that can be interacted with, not official websites.

  • has_supported_portfolio : boolean - Is the portfolio already supported.

  • tvl: integer - User deposit value in this protocol.

Request

curl -X GET "https://pro-openapi.debank.com/v1/protocol/list?chain_id=eth" \
    -H "accept: application/json" -H 'AccessKey: YOUR_ACCESSKEY'

Result

[
  {
    "id": "0x",
    "chain": "eth",
    "name": "0x",
    "site_url": "https://0x.org",
    "logo_url": "https://static.debank.com/image/project/logo_url/0x/140b607264f4741133c35eb32c6bc314.png",
    "has_supported_portfolio": true,
    "tvl": 76569161.44038972
  },
  {
    "id": "1inch",
    "chain": "eth",
    "name": "1inch V1",
    "site_url": "https://1inch.exchange",
    "logo_url": "https://static.debank.com/image/project/logo_url/1inch/ac1216f33116fd76db915cb0b0f5c666.png",
    "has_supported_portfolio": false,
    "tvl": 0
  }
  // more...
]

Get all protocols of supported chains

Method

get

Path

/v1/protocol/all_list

Parameters

  • chain_ids : optional, list of chain id, eg: eth, bsc, xdai, for more info.

Returns

Array of Object - An object with following fields:

  • id : string - The protocol's id.

  • chain : string - The chain's id.

  • name : string - The protocol's name. null if not defined in the contract and not available from other sources.

  • logo_url : string - URL of the protocol's logo image. null if not available.

  • site_url : string - prioritize websites that can be interacted with, not official websites.

  • has_supported_portfolio : boolean - Is the portfolio already supported.

  • tvl: integer - User deposit value in this protocol.

Request

curl -X GET "https://pro-openapi.debank.com/v1/protocol/all_list?chain_ids=eth,bsc" \
    -H "accept: application/json" -H 'AccessKey: YOUR_ACCESSKEY'

Result

[
  {
    "id": "0x",
    "chain": "eth",
    "name": "0x",
    "site_url": "https://0x.org",
    "logo_url": "https://static.debank.com/image/project/logo_url/0x/140b607264f4741133c35eb32c6bc314.png",
    "has_supported_portfolio": true,
    "tvl": 76569161.44038972
  },
  {
    "id": "1inch",
    "chain": "eth",
    "name": "1inch V1",
    "site_url": "https://1inch.exchange",
    "logo_url": "https://static.debank.com/image/project/logo_url/1inch/ac1216f33116fd76db915cb0b0f5c666.png",
    "has_supported_portfolio": false,
    "tvl": 0
  }
  // more...
]

Get top holders of protocol

Method

get

Path

/v1/protocol/top_holders

Parameters

  • id : string required, protocol id

  • start: integer offset, default is 0, max is 1000.

  • limit: integer limit size, default is 100, max is 100.

Returns

Array of address with usd value.

Request

curl -X GET "https://pro-openapi.debank.com/v1/protocol/top_holders?id=curve&start=10"
    -H "accept: application/json" -H 'AccessKey: YOUR_ACCESSKEY'

Result

[
    [
        "0x08df64083cb978c8c1aa3c8772c600f9a6ee243d",
        4249240.369462844
    ],
    [
        "0x39d2d97748d61c140f9ef863557d13183b78b671",
        4188739.872648831
    ],
    [
        "0xe47099889667d62b7ad44948243fb66a47c12663",
        4093196.308588947
    ],
    [
        "0x0459dda9eb7062e6fdca6293a4c363722fca6102",
        3835413.192177386
    ]   
]

Last updated