{"openapi":"3.1.0","info":{"title":"ETHBEAT API","version":"1.0.0","description":"Open to everyone, no API key needed. A key sent by an older integration is ignored.\n\nRequests are rate limited. Over the limit, the answer is HTTP 429."},"servers":[{"url":"https://api.ethbeat.org"}],"tags":[{"name":"projects","description":"Endpoints for listing projects and retrieving detailed information about individual projects."},{"name":"tvs","description":"Endpoints for retrieving Total Value Secured (TVS) data"},{"name":"activity","description":"Endpoints for retrieving activity data"},{"name":"interop","description":"Endpoints for retrieving interoperability data"}],"externalDocs":{"description":"Changelog","url":"https://l2beat.notion.site/L2BEAT-API-Changelog-2c4094a2aee7809786e6e6b6e7486e01"},"paths":{"/v1/projects":{"get":{"tags":["projects"],"summary":"List all projects","description":"`stage`, `risks` and `isUnderReview` are the assessment the ETHBEAT website shows. Only layer 2 and layer 3 projects have a stage and risks.\n\n`tvs` is `null` when we do not track TVS for the project or have not synced it yet. It leaves out restricted RWA tokens, like the website; `/v1/tvs/{projectId}` counts them unless you pass `excludeRwaRestrictedTokens=true`.","parameters":[{"name":"isArchived","in":"query","description":"When `false`, lists only active projects; when `true`, only archived ones. Lists both when left out.","required":false,"schema":{"enum":["true","false"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}}}}},"/v1/project/{projectId}":{"get":{"tags":["projects"],"summary":"Get a project by ID","description":"`stage`, `risks` and `isUnderReview` are the assessment the ETHBEAT website shows. Only layer 2 and layer 3 projects have a stage and risks.\n\n`tvs` is `null` when we do not track TVS for the project or have not synced it yet. It leaves out restricted RWA tokens, like the website; `/v1/tvs/{projectId}` counts them unless you pass `excludeRwaRestrictedTokens=true`.","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"404":{"description":"No project has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericErrorResponse"}}}}}}},"/v1/project/{projectId}/contracts":{"get":{"tags":["projects"],"summary":" List of contracts associated with the project and the chains","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contract"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"404":{"description":"No project has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericErrorResponse"}}}}}}},"/v1/project/{projectId}/tokens":{"get":{"tags":["projects"],"summary":"List of tokens associated with the project","description":"This endpoint may be affected by changes in the future.","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Token"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"404":{"description":"No project has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericErrorResponse"}}}}}}},"/v1/tvs":{"get":{"tags":["tvs"],"summary":"Total Value Secured with ability to control the time range","description":"Points are spaced by the resolution of the range: hourly up to 7 days, six-hourly below 180 days, daily otherwise.\n\nA timestamp with no data has no point: it is missing, not zero. Read each point by its `timestamp`, since the spacing can have gaps.\n\nThe timestamp of the last point is the time the data is synced until, the same value the website reports as `syncedUntil`. For a sum of many projects it is the latest time any of them has data for, so a project that lags behind is left out of the newest points.\n\n`ethPrice` is the USD price of ETH at that point, the one the website uses to show TVS in ETH: divide `totalTvs` by it. It is `null` when the price is unknown.\n\nUnlike the website, this endpoint counts restricted RWA tokens by default. To count tokens the way the website does, pass `excludeRwaRestrictedTokens=true`. The sum of all projects also includes projects the website does not list under scaling.","parameters":[{"name":"range","in":"query","required":false,"schema":{"enum":["7d","30d","90d","180d","1y","max"]}},{"name":"excludeAssociatedTokens","in":"query","description":"When `true`, leaves out tokens associated with the project, such as its own governance token. Defaults to `false`, like the website.","required":false,"schema":{"enum":["true","false"]}},{"name":"excludeRwaRestrictedTokens","in":"query","description":"When `true`, leaves out restricted real-world-asset tokens, which only approved holders may own. Defaults to `false`, which counts them. The website defaults to `true`: pass `true` to filter tokens the way it does.","required":false,"schema":{"enum":["true","false"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TvsChartDataPoint"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}}}}},"/v1/tvs/{projectId}":{"get":{"tags":["tvs"],"summary":"Total Value Secured for a specific project with ability to control the time range.","description":"Points are spaced by the resolution of the range: hourly up to 7 days, six-hourly below 180 days, daily otherwise.\n\nA timestamp with no data has no point: it is missing, not zero. Read each point by its `timestamp`, since the spacing can have gaps.\n\nThe timestamp of the last point is the time the data is synced until, the same value the website reports as `syncedUntil`. For a sum of many projects it is the latest time any of them has data for, so a project that lags behind is left out of the newest points.\n\n`ethPrice` is the USD price of ETH at that point, the one the website uses to show TVS in ETH: divide `totalTvs` by it. It is `null` when the price is unknown.\n\nUnlike the website, this endpoint counts restricted RWA tokens by default. To count tokens the way the website does, pass `excludeRwaRestrictedTokens=true`. The sum of all projects also includes projects the website does not list under scaling.","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"enum":["7d","30d","90d","180d","1y","max"]}},{"name":"excludeAssociatedTokens","in":"query","description":"When `true`, leaves out tokens associated with the project, such as its own governance token. Defaults to `false`, like the website.","required":false,"schema":{"enum":["true","false"]}},{"name":"excludeRwaRestrictedTokens","in":"query","description":"When `true`, leaves out restricted real-world-asset tokens, which only approved holders may own. Defaults to `false`, which counts them. The website defaults to `true`: pass `true` to filter tokens the way it does.","required":false,"schema":{"enum":["true","false"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TvsChartDataPoint"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"404":{"description":"No project has this id, or the project has no TVS data. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericErrorResponse"}}}}}}},"/v1/tvs/token/{tokenId}":{"get":{"tags":["tvs"],"summary":"Total Value Secured for a specific token with ability to control the time range.","description":"This endpoint may be affected by changes in the future.","parameters":[{"name":"tokenId","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"enum":["7d","30d","90d","180d","1y","max"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TokenTvsChartDataPoint"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"404":{"description":"No token has this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericErrorResponse"}}}}}}},"/v1/activity":{"get":{"tags":["activity"],"summary":"Activity data with ability to control the time range.","description":"One point per day, up to the last day the data is synced for. Later days are left out: they are missing, not zero. A synced day with no transactions is `0`.\n\nFor a sum of many projects, a day counts as synced once any of them is synced for it. A project that lags behind adds nothing to the newest days, or only part of its count for the day it is syncing.","parameters":[{"name":"range","in":"query","required":false,"schema":{"enum":["30d","90d","180d","1y","max"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivityChartDataPoint"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}}}}},"/v1/activity/{projectId}":{"get":{"tags":["activity"],"summary":"Activity data for a specific project with ability to control the time range.","description":"One point per day, up to the last day the data is synced for. Later days are left out: they are missing, not zero. A synced day with no transactions is `0`.\n\nFor a sum of many projects, a day counts as synced once any of them is synced for it. A project that lags behind adds nothing to the newest days, or only part of its count for the day it is syncing.","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"enum":["30d","90d","180d","1y","max"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivityChartDataPoint"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"404":{"description":"No project has this id, or the project has no activity data. The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericErrorResponse"}}}}}}},"/v1/interop/protocols":{"get":{"tags":["interop"],"summary":"List interop data per protocol.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InteropProtocol"}}}}}}}},"/v1/interop/chains":{"get":{"tags":["interop"],"summary":"List interop data per chain.","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InteropChain"}}}}}}}}},"components":{"schemas":{"Project":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"shortName":{"type":"string"},"chainId":{"type":"number"},"layer":{"enum":["layer2","layer3"],"description":"Layer 2 and layer 3 projects only."},"type":{"type":"string","description":"Layer 2 and layer 3 projects only, e.g. \"Optimistic Rollup\"."},"isArchived":{"type":"boolean"},"category":{"type":"string"},"hostChain":{"type":"string"},"stacks":{"type":"array","items":{"type":"string"}},"ecosystem":{"type":"string"},"gasTokens":{"type":"array","items":{"type":"string"}},"stage":{"type":"string","description":"Layer 2 and layer 3 projects only. Stages rate rollups, so a project of type \"Other\" has \"Not applicable\", as on the website."},"purposes":{"type":"array","items":{"type":"string"}},"badges":{"type":"array","items":{"type":"string"}},"isUnderReview":{"type":"boolean","description":"True while we are reviewing the project, or while its contracts changed in a way nobody has assessed yet. Its stage and risks may be out of date."},"risks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"sentiment":{"enum":["bad","warning","good","neutral","UnderReview"]},"description":{"type":"string"},"warning":{"type":"object","properties":{"value":{"type":"string"},"sentiment":{"enum":["bad","warning","neutral"]}},"required":["value","sentiment"]},"regular":{"type":"object","properties":{"value":{"type":"string"},"sentiment":{"enum":["bad","warning","good","neutral","UnderReview"]},"description":{"type":"string"}},"required":["value","description"],"description":"Exit Window only: the window for regular upgrades, when `value` is the one for emergency upgrades."}},"required":["name","value"]},"description":"Layer 2 and layer 3 projects only: the five risks of the website's risk rosette. A project without the field has no such assessment, which is not the same as having no risks."},"tvs":{"anyOf":[{"type":"object","properties":{"timestamp":{"type":"number","description":"UNIX timestamp (seconds) of the hour the values come from. The project is lagging when this is before the start of the hour that began 75 minutes ago."},"breakdown":{"type":"object","properties":{"total":{"type":"number"},"ether":{"type":"number"},"stablecoin":{"type":"number"},"associated":{"type":"number"}},"required":["total","ether","stablecoin","associated"],"description":"USD values. `total` includes the other three."},"change7d":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Change of `breakdown.total` over seven days, as a fraction (0.05 is +5%). Null when there is no value from seven days before, or that value was 0."}},"required":["timestamp","breakdown","change7d"]},{"type":"null"}],"description":"Latest Total Value Secured. Null when we do not track TVS for the project or have not synced it yet: unknown, not zero. Counts associated tokens and leaves out restricted RWA tokens, like the website's scaling summary."},"associatedTokens":{"type":"array","items":{"type":"string"},"description":"Symbols of the tokens associated with the project, e.g. its governance token."}},"required":["id","slug","name","isArchived","stacks","gasTokens","purposes","badges","isUnderReview","tvs","associatedTokens"]},"GenericErrorResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"Contract":{"type":"object","properties":{"name":{"type":"string"},"contractAddress":{"type":"string"},"chain":{"type":"string"}},"required":["name","contractAddress","chain"]},"Token":{"type":"object","properties":{"tokenId":{"type":"string"},"symbol":{"type":"string"},"source":{"enum":["canonical","external","native"]},"category":{"enum":["ether","stablecoin","btc","rwaRestricted","rwaPublic","other"]},"priceUsd":{"type":"number","description":"Token price in USD."},"valueUsd":{"type":"number","description":"USD value counted toward the project's TVS: usually amount times priceUsd, with custom rules for some tokens to avoid double counting."},"name":{"type":"string","description":"Full token name, e.g. \"Ether\"."},"amount":{"type":"number","description":"Amount of the token secured by the project, in whole tokens (decimals already applied)."},"addresses":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Token contract address."},"chain":{"type":"string","description":"Name of the chain the contract is on, e.g. \"arbitrum\"."}},"required":["address","chain"]},"description":"Token contracts the amount is read from, one per distinct address. Several entries mean the amount sums the token across several contracts; empty means it comes from a native balance or a fixed value."},"isGasToken":{"type":"boolean","description":"Whether the token pays for gas on the project's chain."},"isAssociated":{"type":"boolean","description":"Whether the token is associated with the project, e.g. its governance token. The website's \"Exclude associated tokens\" option leaves these out of TVS."},"bridgedUsing":{"anyOf":[{"type":"object","properties":{"bridges":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Bridge name."},"slug":{"type":"string","description":"Slug of the bridge project on ETHBEAT, when we list it."}},"required":["name"]}},"warning":{"type":"string","description":"Caveat about how the token is bridged."}},"required":["bridges"]},{"type":"null"}],"description":"Bridges the token reaches the project through. Null when we list none."},"timestamp":{"type":"number","description":"UNIX timestamp (seconds) of the hour priceUsd, amount and valueUsd come from. The website marks the token as not synced when this is before the start of the hour that began 75 minutes ago."}},"required":["tokenId","symbol","source","category","priceUsd","valueUsd","name","amount","addresses","isGasToken","isAssociated","bridgedUsing","timestamp"]},"TvsChartDataPoint":{"type":"object","properties":{"timestamp":{"type":"number"},"totalTvs":{"type":"number"},"bySource":{"type":"object","properties":{"native":{"type":"number"},"canonical":{"type":"number"},"external":{"type":"number"}},"required":["native","canonical","external"]},"byCategory":{"type":"object","properties":{"stablecoins":{"type":"number"},"eth":{"type":"number"},"btc":{"type":"number"},"other":{"type":"number"},"publicRwa":{"type":"number"},"restrictedRwa":{"type":"number"}},"required":["stablecoins","eth","btc","other","publicRwa","restrictedRwa"]},"ethPrice":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["timestamp","totalTvs","bySource","byCategory","ethPrice"]},"TokenTvsChartDataPoint":{"type":"object","properties":{"timestamp":{"type":"number"},"valueUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["timestamp","valueUsd","amount"]},"ActivityChartDataPoint":{"type":"object","properties":{"timestamp":{"type":"number"},"txCount":{"type":"number"},"uopsCount":{"type":"number"}},"required":["timestamp","txCount","uopsCount"]},"InteropProtocol":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"subgroupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the aggregate/root interop protocol this protocol belongs to. Null for aggregate/root protocols."},"totalVolume":{"type":"number"},"totalTransferCount":{"type":"number"},"avgTransferTime":{"anyOf":[{"type":"object","properties":{"type":{"const":"single"},"duration":{"type":"number"}},"required":["type","duration"]},{"type":"object","properties":{"type":{"const":"split"},"splits":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","duration"]}}},"required":["type","splits"]},{"type":"object","properties":{"type":{"const":"unknown"}},"required":["type"]},{"type":"null"}]},"chainsBreakdown":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"volume":{"type":"number"},"transferCount":{"type":"number"},"avgTransferTimeSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","volume","transferCount","avgTransferTimeSeconds"]}}},"required":["id","slug","name","subgroupId","totalVolume","totalTransferCount","avgTransferTime","chainsBreakdown"]},"InteropChain":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"totalVolume":{"type":"number"},"totalTransferCount":{"type":"number"},"inflowsUsd":{"type":"number"},"outflowsUsd":{"type":"number"},"avgTransferTimeSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"protocolsBreakdown":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"volume":{"type":"number"},"transferCount":{"type":"number"}},"required":["id","slug","name","volume","transferCount"]}}},"required":["id","name","totalVolume","totalTransferCount","inflowsUsd","outflowsUsd","avgTransferTimeSeconds","protocolsBreakdown"]},"BadRequestResponse":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}}}