Data costs during the specified time period for given blockchain.
cURL
curl --request GET \ --url https://api.blockworks.com/v1/metrics/costs-l2 \ --header 'x-api-key: <api-key>'
{ "projectName": [ { "date": "2025-08-10", "value": 123456.789 }, { "date": "2025-08-11", "value": 234567.89 }, { "date": "2025-08-12", "value": 345678.901 } ] }
curl -H "x-api-key: YOUR_API_KEY" \ "https://api.blockworks.com/v1/metrics/costs-l2?project=base"
{ "base": [ { "date": "2025-09-03", "value": 4324.66 }, { "date": "2025-09-04", "value": 4595.17 }, { "date": "2025-09-05", "value": 4323.34 }, { "date": "2025-09-06", "value": 4191.8 }, { "date": "2025-09-07", "value": 4246.2 } ] }
Project slug (comma-separated for multiple).
arbitrum
base
"arbitrum"
Start date (YYYY-MM-DD)
End date (YYYY-MM-DD)
OK
The response is of type object.
object