Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
mintdart committed Oct 23, 2024
1 parent 298d2b4 commit eb25c8f
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 272 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# DefiLlama
Check it out live at [https://defillama.com](https://defillama.com)
# DefiLlama

Check it out live at [https://defillama.com](https://defillama.com)

### To Start Development


###### Installing dependencies

```bash
yarn
```

###### Running locally

```bash
yarn dev
```

### Updating API docs

1. Get the API spec in /docs/spec.yaml and paste it into https://editor.swagger.io/
2. Modify it
3. Generate a json file by clicking "File" -> "Convert and save as JSON"
4. Copy the generated json file along with the changed yml spec into this repo


At the end you should have modified both `/docs/spec.yaml` and `/docs/resolvedSpec.json`
6 changes: 3 additions & 3 deletions funding.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"opRetro": {
"projectId": "0xae07bfec2c3c90937679f8c8c5c32e80407c09903aa03d1b5e5a075e67592b86"
}
"opRetro": {
"projectId": "0xae07bfec2c3c90937679f8c8c5c32e80407c09903aa03d1b5e5a075e67592b86"
}
}
2 changes: 1 addition & 1 deletion src/api/categories/nfts/mintEarnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,5 +670,5 @@ export const NFT_MINT_EARNINGS = [
usdSales: 31000000,
startMint: '2022-04-23 1:04:48',
endMint: '2022-04-23 1:04:48'
},
}
].filter((c) => c.usdSales !== '')
126 changes: 32 additions & 94 deletions src/docs/proSpec.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
"paths": {
"/api/hourly/{protocol}": {
"get": {
"tags": [
"TVL"
],
"tags": ["TVL"],
"summary": "Lists the hourly tvl of a certain protocol",
"parameters": [
{
Expand All @@ -80,9 +78,7 @@
},
"/api/tokenProtocols/{symbol}": {
"get": {
"tags": [
"TVL"
],
"tags": ["TVL"],
"summary": "Lists the amount of a certain token within all protocols",
"parameters": [
{
Expand All @@ -105,9 +101,7 @@
},
"/api/inflows/{protocol}/{timestamp}": {
"get": {
"tags": [
"TVL"
],
"tags": ["TVL"],
"summary": "Lists the amount of inflows and outflows for a protocol at a given date",
"parameters": [
{
Expand Down Expand Up @@ -140,9 +134,7 @@
},
"/api/chainAssets": {
"get": {
"tags": [
"TVL"
],
"tags": ["TVL"],
"summary": "Get assets of all chains",
"responses": {
"200": {
Expand All @@ -153,9 +145,7 @@
},
"/stablecoins/stablecoindominance/{chain}": {
"get": {
"tags": [
"stablecoins"
],
"tags": ["stablecoins"],
"summary": "Get stablecoin dominance per chain along with the info about the larges coin in a chain",
"parameters": [
{
Expand Down Expand Up @@ -188,9 +178,7 @@
},
"/api/activeUsers": {
"get": {
"tags": [
"active users"
],
"tags": ["active users"],
"summary": "Get active users on our chains and protocols pages",
"responses": {
"200": {
Expand All @@ -201,9 +189,7 @@
},
"/api/userData/{type}/{protocolId}": {
"get": {
"tags": [
"active users"
],
"tags": ["active users"],
"summary": "Get user data by type and protocol",
"parameters": [
{
Expand Down Expand Up @@ -236,9 +222,7 @@
},
"/api/emissions": {
"get": {
"tags": [
"Unlocks"
],
"tags": ["Unlocks"],
"summary": "List of all tokens along with basic info for each",
"responses": {
"200": {
Expand All @@ -249,9 +233,7 @@
},
"/api/emission/{protocol}": {
"get": {
"tags": [
"Unlocks"
],
"tags": ["Unlocks"],
"summary": "Unlocks data for a given token/protocol. You can find a list of available slugs to query by querying /emissions and then extracting the key `gecko_id`",
"parameters": [
{
Expand All @@ -274,9 +256,7 @@
},
"/api/categories": {
"get": {
"tags": [
"main page"
],
"tags": ["main page"],
"summary": "Overview of all categories accross all protocols",
"responses": {
"200": {
Expand All @@ -287,9 +267,7 @@
},
"/api/forks": {
"get": {
"tags": [
"main page"
],
"tags": ["main page"],
"summary": "Overview of all categories accross all protocols",
"responses": {
"200": {
Expand All @@ -300,9 +278,7 @@
},
"/api/oracles": {
"get": {
"tags": [
"main page"
],
"tags": ["main page"],
"summary": "Overview of all categories accross all protocols",
"responses": {
"200": {
Expand All @@ -313,9 +289,7 @@
},
"/api/hacks": {
"get": {
"tags": [
"main page"
],
"tags": ["main page"],
"summary": "Overview of all hacks on our Hacks dashboard",
"responses": {
"200": {
Expand All @@ -326,9 +300,7 @@
},
"/api/raises": {
"get": {
"tags": [
"main page"
],
"tags": ["main page"],
"summary": "Overview of all raises on our Raises dashboard",
"responses": {
"200": {
Expand All @@ -339,9 +311,7 @@
},
"/api/treasuries": {
"get": {
"tags": [
"main page"
],
"tags": ["main page"],
"summary": "List all protocols on our Treasuries dashboard",
"responses": {
"200": {
Expand All @@ -352,9 +322,7 @@
},
"/api/entities": {
"get": {
"tags": [
"main page"
],
"tags": ["main page"],
"summary": "List all entities",
"responses": {
"200": {
Expand All @@ -365,9 +333,7 @@
},
"/api/historicalLiquidity/{token}": {
"get": {
"tags": [
"token liquidity"
],
"tags": ["token liquidity"],
"summary": "Provides the name of contracts on a determined chain",
"parameters": [
{
Expand All @@ -390,9 +356,7 @@
},
"/yields/pools": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "Retrieve the latest data for all pools, including enriched information such as predictions",
"responses": {
"200": {
Expand All @@ -403,9 +367,7 @@
},
"/yields/poolsOld": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "Same as /pools but it also includes a new parameter `pool_old` which usually contains pool address (but not guaranteed)",
"responses": {
"200": {
Expand All @@ -416,9 +378,7 @@
},
"/yields/chart/{pool}": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "Get historical APY and TVL of a pool",
"parameters": [
{
Expand All @@ -441,9 +401,7 @@
},
"/yields/chartHourly/{pool}": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "Same as /chart/{pool} but with hourly granularity",
"parameters": [
{
Expand All @@ -466,9 +424,7 @@
},
"/yields/poolsBorrow": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "Borrow costs APY of assets from lending markets",
"responses": {
"200": {
Expand All @@ -479,9 +435,7 @@
},
"/yields/chartLendBorrow/{pool}": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "Historical borrow cost APY from a pool on a lending market, pool ids should be obtained from /poolsBorrow",
"parameters": [
{
Expand All @@ -504,9 +458,7 @@
},
"/yields/perps": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "Funding rates and Open Interest of perps across exchanges, including both Decentralized and Centralized",
"responses": {
"200": {
Expand All @@ -517,9 +469,7 @@
},
"/yields/lsdRates": {
"get": {
"tags": [
"Yields"
],
"tags": ["Yields"],
"summary": "APY rates of multiple LSDs",
"responses": {
"200": {
Expand All @@ -530,9 +480,7 @@
},
"/etfs/overview": {
"get": {
"tags": [
"ETFs"
],
"tags": ["ETFs"],
"summary": "Get BTC ETFs and their metrics (aum, price, fees...)",
"responses": {
"200": {
Expand All @@ -543,9 +491,7 @@
},
"/etfs/overviewEth": {
"get": {
"tags": [
"ETFs"
],
"tags": ["ETFs"],
"summary": "Get ETH ETFs",
"responses": {
"200": {
Expand All @@ -556,9 +502,7 @@
},
"/etfs/history": {
"get": {
"tags": [
"ETFs"
],
"tags": ["ETFs"],
"summary": "Historical AUM of all BTC ETFs",
"responses": {
"200": {
Expand All @@ -569,9 +513,7 @@
},
"/etfs/historyEth": {
"get": {
"tags": [
"ETFs"
],
"tags": ["ETFs"],
"summary": "Historical AUM of all BTC ETFs",
"responses": {
"200": {
Expand All @@ -582,9 +524,7 @@
},
"/fdv/performance/{period}": {
"get": {
"tags": [
"narratives"
],
"tags": ["narratives"],
"summary": "Get chart of narratives based on category performance (with individual coins weighted by mcap)",
"parameters": [
{
Expand All @@ -607,9 +547,7 @@
},
"/usage/APIKEY": {
"get": {
"tags": [
"meta"
],
"tags": ["meta"],
"summary": "Get amount of credits left in the api key, these reset on the 1st of each month",
"servers": [
{
Expand All @@ -624,4 +562,4 @@
}
}
}
}
}
Loading

0 comments on commit eb25c8f

Please sign in to comment.