DefiLlama Fees
/api/v1/defillama/fee
Description
Get historical fee data for given protocol
and/or chain
parameters.
All fees are denominated in USD.
Method
GET
Source
Database
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
protocol | string | no | Specifies the protocol name. |
chain | string | no | Specifies the chain name. |
daily | bool | no | Specifies whether to get daily (true ) or accumulated data (default false ). |
Response Status Codes
Status | Description |
---|---|
200 OK | Success. Returns historical fee data. |
400 Bad Request |
Example: Get historical daily fees for Lido protocol
Request
GET /api/v1/defillama/fee?protocol=lido
Response
[
[
"Date",
"Usd"
],
[
"12/20/2020 00:00:00",
"0.000000"
],
[
"12/21/2020 00:00:00",
"0.000000"
],
[
"12/22/2020 00:00:00",
"0.000000"
],
[
"12/23/2020 00:00:00",
"0.000000"
],
[
"12/24/2020 00:00:00",
"0.000000"
],
...
]
Example: Get historical daily fees on Ethereum blockchain
Request
GET /api/v1/defillama/fee?chain=ethereum
Response
[
[
"Date",
"Usd"
],
[
"10/11/2019 00:00:00",
"1024247.8185639719"
],
[
"10/12/2019 00:00:00",
"1016991.2200583625"
],
[
"10/13/2019 00:00:00",
"1016241.6731416448"
],
[
"10/14/2019 00:00:00",
"1026064.6098110286"
],
[
"10/15/2019 00:00:00",
"1039665.5359144234"
],
...
]