# Perpetual DEX Analytics — dYdX OI, Funding Rate, Volume (`gochujang/perp-dex-analytics`) Actor

Real-time perpetual futures data from dYdX v4 (296 markets): open interest, 8h/annualized funding rate, 24h volume, price change, and max leverage. Filter by OI, funding threshold, or ticker. No API key. $0.001/market.

- **URL**: https://apify.com/gochujang/perp-dex-analytics.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Business
- **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/actors/running/actors-in-store.md#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

### What does Perpetual DEX Analytics do?

**Perpetual DEX Analytics** aggregates live **perpetual futures market data from dYdX v4** (296+ markets) and cross-references **Hyperliquid funding rates** to deliver a deeply enriched dataset covering open interest, 24-hour volume, funding rates, liquidation cascade risk, basis trade opportunities, and cross-exchange arbitrage differentials — all without requiring any API key or authentication.

### Why use Perpetual DEX Analytics?

- **Cross-exchange funding rate arbitrage, computed automatically.** The **cross\_exchange\_arbitrage** field shows the funding rate differential (in basis points) between dYdX v4 and Hyperliquid for every matching market, so you can instantly identify funding arb opportunities without writing a single line of fetch code.
- **Liquidation risk signals before they cascade.** The **liquidation\_cascade\_risk** field (`low` / `moderate` / `high` / `extreme`) and **liquidation\_pressure\_score** (0–100) give early warning of crowded leveraged positions that could unwind violently.
- **Basis trade opportunity classification.** Each market is labeled with a **basis\_trade\_opportunity** tier (`high_yield` / `moderate` / `low` / `negative_yield`) so delta-neutral carry traders can prioritize without computing APR themselves.
- **Market structure and sentiment in one field.** **funding\_regime** (`extreme_bullish` → `extreme_bearish`), **perpetual\_vs\_spot\_premium** (`contango` / `at_par` / `backwardation`), and **market\_structure** (`trending_with_leverage` / `ranging` / `deleveraging` / `building`) give a multi-dimensional market picture.
- **Protocol economics included.** **protocol\_revenue\_sustainability**, **liquidity\_provider\_returns**, and **insurance\_fund\_health** let LPs and protocol researchers assess the long-term viability of each market.

### How to use Perpetual DEX Analytics

1. Go to the [Apify Store](https://apify.com/store) and find **Perpetual DEX Analytics**.
2. Click **Try for free** to open the input configuration page.
3. Set **Min Open Interest (USD)** to filter out illiquid tail markets (default $100,000).
4. Optionally enter a **Ticker Filter** (e.g. `BTC`) to focus on BTC-USD only.
5. Enable **High Funding Rate Only** and set a threshold to return only high-carry opportunities.
6. Choose a **Sort By** field (`open_interest_usd`, `volume_24h_usd`, `funding_rate_annualized_pct`, etc.).
7. Set **Max Results** (default 100, max 300).
8. Click **Run** and consume the per-market JSON records plus the `perp_market_summary` record.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `ticker` | string | `""` | Filter to markets whose ticker contains this string (e.g. `BTC` for BTC-USD only). |
| `minOpenInterestUsd` | number | `100000` | Exclude markets with OI below this USD value. |
| `minVolume24hUsd` | number | `0` | Exclude markets with 24h volume below this USD value. |
| `highFundingOnly` | boolean | `false` | Return only markets with absolute annualized funding rate above the threshold. |
| `highFundingThresholdPct` | number | `50` | Annualized funding rate threshold (%) for the high-funding filter. |
| `sortBy` | string | `open_interest_usd` | Sort key: `open_interest_usd`, `volume_24h_usd`, `funding_rate_annualized_pct`, or `price_change_pct_24h`. |
| `limit` | integer | `100` | Maximum number of market records to return (max 300). |

### Output

```json
[
  {
    "ticker": "BTC-USD",
    "oracle_price": 98450.23,
    "price_change_pct_24h": 2.14,
    "volume_24h_usd": 312500000,
    "trades_24h": 84321,
    "open_interest_usd": 482000000,
    "funding_rate_8h": 0.012,
    "funding_rate_annualized_pct": 16.43,
    "max_leverage": 20,
    "market_share_pct": 18.4,
    "trader_loyalty_score": 71,
    "leverage_risk_index": 55,
    "leverage_risk_label": "medium",
    "liquidity_depth_rating": "deep",
    "funding_carry_signal": "mild_long_bias",
    "oi_volume_ratio": 1.541,
    "avg_trade_size_usd": 3706.82,
    "whale_activity_flag": false,
    "funding_regime": "bullish",
    "basis_trade_opportunity": "low",
    "liquidation_cascade_risk": "moderate",
    "market_structure": "building",
    "cross_exchange_arbitrage": 4.2,
    "perpetual_vs_spot_premium": "contango",
    "leverage_ratio_signal": "leveraged",
    "protocol_dominance_tier": "major",
    "trader_experience_required": "advanced",
    "liquidity_provider_returns": "moderate",
    "protocol_revenue_sustainability": "highly_sustainable",
    "cross_chain_availability": "single_chain",
    "fee_competitiveness": "competitive",
    "insurance_fund_health": "adequate",
    "trader_pnl_quality": "normal",
    "source": "dydx_v4",
    "fetched_at": "2026-09-02T10:31:00Z"
  },
  {
    "record_type": "perp_market_summary",
    "aggregate_funding_rate_8h_pct": 0.0091,
    "total_oi_usd": 1840000000,
    "market_leverage_health": "healthy",
    "best_funding_arb_bps": 12.4,
    "total_perp_dex_volume_24h_usd": 698000000,
    "perp_dex_vs_cex_ratio_pct": 4.18,
    "perp_dex_market_phase": "steady_growth",
    "top_5_by_volume": [
      {"ticker": "BTC-USD", "volume_24h_usd": 312500000, "open_interest_usd": 482000000}
    ],
    "fetched_at": "2026-09-02T10:31:00Z"
  }
]
```

### Data fields

| Field | Description |
|---|---|
| `ticker` | Market identifier (e.g. `BTC-USD`, `ETH-USD`) |
| `oracle_price` | Current oracle (spot) price in USD |
| `price_change_pct_24h` | 24-hour price change percentage |
| `volume_24h_usd` | Total notional trading volume in the last 24 hours |
| `open_interest_usd` | Total open interest in USD |
| `funding_rate_8h` | Next 8-hour funding rate as a percentage |
| `funding_rate_annualized_pct` | Funding rate annualized to yearly percentage |
| `max_leverage` | Maximum leverage allowed on this market |
| `funding_regime` | `extreme_bullish` / `bullish` / `neutral` / `bearish` / `extreme_bearish` |
| `basis_trade_opportunity` | `high_yield` / `moderate` / `low` / `negative_yield` |
| `open_interest_signal` | `oi_surge` / `oi_divergence` / `oi_normal` |
| `liquidation_cascade_risk` | `extreme` / `high` / `moderate` / `low` |
| `liquidation_pressure_score` | 0–100 composite liquidation pressure score |
| `market_structure` | `trending_with_leverage` / `ranging` / `deleveraging` / `building` |
| `cross_exchange_arbitrage` | Funding rate differential vs Hyperliquid in basis points |
| `perpetual_vs_spot_premium` | `contango` / `at_par` / `backwardation` |
| `leverage_ratio_signal` | `highly_leveraged` / `leveraged` / `moderate` / `low_leverage` |
| `funding_carry_signal` | `extreme_long_bias` → `extreme_short_bias` |
| `oi_volume_ratio` | Open interest divided by 24h volume — measures position holding duration |
| `avg_trade_size_usd` | Average notional per trade — proxy for institutional activity |
| `whale_activity_flag` | `true` if avg trade size exceeds $50,000 |
| `market_maturity` | `mature` / `established` / `emerging` / `nascent` |
| `protocol_dominance_tier` | `dominant` / `major` / `mid_tier` / `niche` / `emerging` |
| `trader_experience_required` | `expert_only` / `advanced` / `intermediate` / `beginner_friendly` |
| `liquidity_provider_returns` | `exceptional_lp` / `strong` / `moderate` / `weak` / `risky_lp` |
| `protocol_revenue_sustainability` | `highly_sustainable` / `sustainable` / `break_even` / `burning_treasury` |
| `insurance_fund_health` | `robust` / `adequate` / `minimal` / `no_insurance_fund` |
| `trader_pnl_quality` | `positive_sum` / `normal` / `negative_sum` |
| `fee_competitiveness` | `cheapest` / `competitive` / `average` / `expensive` |
| `source` | Data source label (e.g. `dydx_v4`) |
| `fetched_at` | ISO 8601 timestamp |

### Cost estimation

Pricing model: **$0.001 per market returned**.

| Scenario | Markets | Estimated cost |
|---|---|---|
| Default 100-market run | 100 markets | $0.10 |
| BTC-USD only (1 market) | 1 market | $0.001 |
| Full 300-market scan | 300 markets | $0.30 |

### FAQ

**Q: Where does the Hyperliquid funding rate data come from?**
A: The actor calls the Hyperliquid public `/info` endpoint with `type: "metaAndAssetCtxs"` — no authentication required. The per-hour HL funding rate is converted to an 8h-equivalent rate for direct comparison with dYdX's 8h funding cycle.

**Q: What does a negative `cross_exchange_arbitrage` value mean?**
A: A negative value means Hyperliquid's funding rate is higher than dYdX's for that market. A delta-neutral basis trader could pay funding on dYdX while receiving on Hyperliquid (positive carry on the HL long leg).

**Q: Can I use this to scan for high-funding carry trade opportunities automatically?**
A: Yes. Enable `highFundingOnly: true` and set `highFundingThresholdPct` to your minimum annualized threshold (e.g. 50 for 50%+ APR). The actor will return only markets exceeding that threshold, sorted by your chosen metric.

**Disclaimer:** This actor aggregates publicly available market data for research and informational purposes. Perpetual futures trading carries significant risk of loss, including liquidation. Funding rate arbitrage involves counterparty and execution risks. Nothing here constitutes financial or investment advice.

Keywords: dYdX perpetual futures data, perp DEX analytics, funding rate tracker, crypto perpetuals open interest, basis trade opportunities, liquidation cascade risk, Hyperliquid funding arb, decentralized perp exchange data, crypto derivatives analytics, perpetual swap market data

***

### Related actors

- [Long/Short OI Aggregator](https://apify.com/gochujang/long-short-oi-aggregator) — Cross-exchange long/short ratios to pair with OI data from this actor
- [Hyperliquid Whale Tracker](https://apify.com/gochujang/hyperliquid-whale-tracker) — Large position tracking on Hyperliquid for deeper analytics
- [Binance Futures Screener](https://apify.com/gochujang/binance-futures-screener) — CEX perpetuals data to cross-reference with decentralized perp analytics

### Feedback

If this actor powers your derivatives research, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/perp-dex-analytics#reviews)

# Actor input Schema

## `ticker` (type: `string`):

Filter to markets matching this ticker (e.g. 'BTC' matches BTC-USD). Leave blank for all markets.

## `minOpenInterestUsd` (type: `number`):

Only return markets with open interest >= this value.

## `minVolume24hUsd` (type: `number`):

Only return markets with 24h volume >= this value.

## `highFundingOnly` (type: `boolean`):

Only return markets with absolute annualized funding rate above the threshold.

## `highFundingThresholdPct` (type: `number`):

Annualized funding rate threshold for high funding filter.

## `sortBy` (type: `string`):

Sort results by this metric.

## `limit` (type: `integer`):

Maximum number of markets to return.

## Actor input object example

```json
{
  "ticker": "",
  "minOpenInterestUsd": 100000,
  "minVolume24hUsd": 0,
  "highFundingOnly": false,
  "highFundingThresholdPct": 50,
  "sortBy": "open_interest_usd",
  "limit": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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/perp-dex-analytics").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/perp-dex-analytics").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/perp-dex-analytics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/perp-dex-analytics"
        }
    }
}

```

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/MwEsGRQklcKk4U1pp/builds/R6J4bR6wZ01UxmgPt/openapi.json
