# DeFi Protocol TVL Velocity Ranker — DefiLlama Gainers & Losers (`gochujang/defi-tvl-velocity-ranker`) Actor

Ranks 7,000+ DeFi protocols by TVL velocity: top gainers and losers over 1d/7d/30d from DefiLlama. Classifies velocity: hypergrowth/strong\_growth/growth/stable/declining/collapse. No API key. $0.005/run.

- **URL**: https://apify.com/gochujang/defi-tvl-velocity-ranker.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Developer tools, Automation, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## DeFi Protocol TVL Velocity Ranker

> Ranks 7,000+ DeFi protocols by TVL velocity (rate of change) from DefiLlama. Identifies the fastest-growing and fastest-declining protocols with 1d/7d/30d metrics. No API key required.

***

### What It Does

Processes all protocols from DefiLlama and ranks them by TVL velocity:

**Velocity Classification:**

- `hypergrowth` — 7d TVL change >+50%
- `strong_growth` — +20% to +50%
- `growth` — +5% to +20%
- `stable` — -5% to +5%
- `declining` — -20% to -5%
- `strong_decline` — -50% to -20%
- `collapse` — <-50%

**Output:**

1. `summary` — total protocols, TVL, hypergrowth/collapse counts, top category TVL breakdown
2. `top_gainer` — protocols sorted by highest 7d TVL change %
3. `top_loser` — protocols sorted by lowest 7d TVL change %

***

### Input

| Field | Default | Description |
|-------|---------|-------------|
| `minTvlUsdM` | 10 | Minimum TVL in millions USD |
| `topN` | 30 | Protocols per list (gainers/losers) |
| `category` | (all) | Optional filter: Dexes, Lending, Bridge, Yield, CDP |
| `includeCex` | false | Include CEX reserve entries |

***

### Use Cases

- Track which DeFi protocols are gaining liquidity this week
- Detect protocol stress/bank runs early (collapsing TVL)
- Compare category-level growth trends (are Lending protocols growing vs Dexes?)

***

### Pricing

**$0.005 flat per run.** Covers full 7,000+ protocol analysis.

# Actor input Schema

## `minTvlUsdM` (type: `integer`):

Minimum TVL in millions USD to include protocol (filters noise).

## `topN` (type: `integer`):

Number of protocols to return in each list (gainers, losers).

## `category` (type: `string`):

Optional: filter to specific DeFi category (e.g., Dexes, Lending, Bridge, Yield, CDP).

## `includeCex` (type: `boolean`):

Whether to include centralized exchange reserve entries (usually excluded).

## Actor input object example

```json
{
  "minTvlUsdM": 10,
  "topN": 30,
  "includeCex": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/defi-tvl-velocity-ranker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/defi-tvl-velocity-ranker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call gochujang/defi-tvl-velocity-ranker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/defi-tvl-velocity-ranker"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YOQFfVeeeSfKO5OM7/builds/XRVte8aIdWjIWP0K8/openapi.json
