From 1a9ae5678fdf91f41d9051d095b821a19e18237c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 13 Nov 2025 19:20:25 +0000 Subject: [PATCH] Remove deprecated table API endpoints Co-authored-by: karim --- api-reference/apis/quickstart-realtime.mdx | 527 ------------- api-reference/dex/endpoint/dex_ohlc.mdx | 34 - api-reference/dex/endpoint/dex_pair.mdx | 35 - .../eigenlayer/endpoint/avs_metadata.mdx | 21 - .../eigenlayer/endpoint/avs_metrics.mdx | 35 - .../eigenlayer/endpoint/operator_metadata.mdx | 22 - .../eigenlayer/endpoint/operator_metrics.mdx | 34 - .../endpoint/operator_to_avs_mapping.mdx | 23 - api-reference/eigenlayer/introduction.mdx | 53 -- api-reference/evm/endpoint/contracts.mdx | 34 - .../farcaster/endpoint/farcaster_channels.mdx | 55 -- .../endpoint/farcaster_memecoins.mdx | 58 -- .../farcaster/endpoint/farcaster_users.mdx | 48 -- api-reference/farcaster/introduction.mdx | 29 - .../endpoint/marketplace_marketshare.mdx | 30 - api-reference/markets/markets-openapi.json | 723 ------------------ api-reference/projects/endpoint/linea_lxp.mdx | 35 - api-reference/projects/introduction.mdx | 26 - api-reference/tables/endpoint/clear.mdx | 36 - api-reference/tables/endpoint/create.mdx | 126 --- api-reference/tables/endpoint/delete.mdx | 76 -- api-reference/tables/endpoint/insert.mdx | 133 ---- api-reference/tables/endpoint/list.mdx | 117 --- api-reference/tables/endpoint/upload.mdx | 242 ------ 24 files changed, 2552 deletions(-) delete mode 100644 api-reference/apis/quickstart-realtime.mdx delete mode 100644 api-reference/dex/endpoint/dex_ohlc.mdx delete mode 100644 api-reference/dex/endpoint/dex_pair.mdx delete mode 100644 api-reference/eigenlayer/endpoint/avs_metadata.mdx delete mode 100644 api-reference/eigenlayer/endpoint/avs_metrics.mdx delete mode 100644 api-reference/eigenlayer/endpoint/operator_metadata.mdx delete mode 100644 api-reference/eigenlayer/endpoint/operator_metrics.mdx delete mode 100644 api-reference/eigenlayer/endpoint/operator_to_avs_mapping.mdx delete mode 100644 api-reference/eigenlayer/introduction.mdx delete mode 100644 api-reference/evm/endpoint/contracts.mdx delete mode 100644 api-reference/farcaster/endpoint/farcaster_channels.mdx delete mode 100644 api-reference/farcaster/endpoint/farcaster_memecoins.mdx delete mode 100644 api-reference/farcaster/endpoint/farcaster_users.mdx delete mode 100644 api-reference/farcaster/introduction.mdx delete mode 100644 api-reference/markets/endpoint/marketplace_marketshare.mdx delete mode 100644 api-reference/markets/markets-openapi.json delete mode 100644 api-reference/projects/endpoint/linea_lxp.mdx delete mode 100644 api-reference/projects/introduction.mdx delete mode 100644 api-reference/tables/endpoint/clear.mdx delete mode 100644 api-reference/tables/endpoint/create.mdx delete mode 100644 api-reference/tables/endpoint/delete.mdx delete mode 100644 api-reference/tables/endpoint/insert.mdx delete mode 100644 api-reference/tables/endpoint/list.mdx delete mode 100644 api-reference/tables/endpoint/upload.mdx diff --git a/api-reference/apis/quickstart-realtime.mdx b/api-reference/apis/quickstart-realtime.mdx deleted file mode 100644 index 8711d69db..000000000 --- a/api-reference/apis/quickstart-realtime.mdx +++ /dev/null @@ -1,527 +0,0 @@ ---- -title: "Build Real-time Applications" -icon: "bolt" -description: "Access low-latency blockchain data for mobile apps, trading bots, and live dashboards" ---- - -## Overview - -Perfect for mobile developers, DeFi applications, and real-time monitoring systems that need fast access to the latest blockchain data. - -## What You'll Learn - -- Choose the right API for your latency needs -- Build real-time data feeds -- Optimize for mobile and web apps -- Handle live updates efficiently -- Build trading bots and monitoring systems - -## When to Use Analytics API vs Simulation APIs - - -**Analytics API** is optimized for querying historical data and running complex analytics. **Simulation APIs** are designed for real-time, low-latency access to live blockchain data. - -- **Use Analytics API when:** You need comprehensive historical analysis, complex queries with joins, or data aggregations -- **Use Simulation APIs when:** You need sub-second latency for live price feeds, real-time transaction monitoring, or instant smart contract state queries - -[Learn more about Simulation APIs →](https://docs.dune.com/api-reference/sim-api/overview) - - -## Quick Start with Analytics API - -### 1. Real-time Price Feed - -Build a live price feed for tokens: - - -```python Python -from dune_client import DuneClient -import time - -dune = DuneClient(api_key="YOUR_API_KEY") - -def get_latest_prices(tokens): - """Get latest prices for specified tokens""" - token_list = "', '".join(tokens) - - sql = f""" - SELECT - token_symbol, - price_usd, - block_time, - blockchain - FROM prices.usd - WHERE token_symbol IN ('{token_list}') - AND block_time > now() - interval '5' minute - ORDER BY block_time DESC - """ - - results = dune.execute(sql=sql) - return {row['token_symbol']: row['price_usd'] for row in results.rows} - -# Update prices every minute -while True: - prices = get_latest_prices(['WETH', 'USDC', 'WBTC']) - print(f"WETH: ${prices['WETH']:.2f}") - time.sleep(60) -``` - -```typescript TypeScript -import { DuneClient } from '@duneanalytics/client'; - -const dune = new DuneClient('YOUR_API_KEY'); - -async function getLatestPrices(tokens: string[]) { - const tokenList = tokens.map(t => `'${t}'`).join(', '); - - const sql = ` - SELECT - token_symbol, - price_usd, - block_time, - blockchain - FROM prices.usd - WHERE token_symbol IN (${tokenList}) - AND block_time > now() - interval '5' minute - ORDER BY block_time DESC - `; - - const results = await dune.execute({ sql }); - - return results.rows.reduce((acc, row) => { - acc[row.token_symbol] = row.price_usd; - return acc; - }, {}); -} - -// Update prices every minute -setInterval(async () => { - const prices = await getLatestPrices(['WETH', 'USDC', 'WBTC']); - console.log(`WETH: $${prices.WETH.toFixed(2)}`); -}, 60000); -``` - - -### 2. Live Transaction Monitoring - -Monitor transactions in real-time for specific addresses or protocols: - - -```python Python -from dune_client import DuneClient -import time - -dune = DuneClient(api_key="YOUR_API_KEY") - -def monitor_transactions(contract_address): - """Monitor transactions for a specific contract""" - sql = f""" - SELECT - block_time, - tx_hash, - "from" as sender, - "to" as recipient, - value / 1e18 as eth_value - FROM ethereum.transactions - WHERE "to" = 0x{contract_address} - AND block_time > now() - interval '5' minute - ORDER BY block_time DESC - """ - - results = dune.execute(sql=sql) - - for tx in results.rows: - print(f"New TX: {tx['tx_hash'][:10]}... - {tx['eth_value']} ETH") - # Send notification, update dashboard, etc. - -# Poll every 30 seconds -while True: - monitor_transactions("a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48") # USDC - time.sleep(30) -``` - -```typescript TypeScript -import { DuneClient } from '@duneanalytics/client'; - -const dune = new DuneClient('YOUR_API_KEY'); - -async function monitorTransactions(contractAddress: string) { - const sql = ` - SELECT - block_time, - tx_hash, - "from" as sender, - "to" as recipient, - value / 1e18 as eth_value - FROM ethereum.transactions - WHERE "to" = 0x${contractAddress} - AND block_time > now() - interval '5' minute - ORDER BY block_time DESC - `; - - const results = await dune.execute({ sql }); - - for (const tx of results.rows) { - console.log(`New TX: ${tx.tx_hash.slice(0, 10)}... - ${tx.eth_value} ETH`); - // Send notification, update dashboard, etc. - } -} - -// Poll every 30 seconds -setInterval(async () => { - await monitorTransactions("a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"); -}, 30000); -``` - - -### 3. Mobile App Integration - -Optimize API calls for mobile apps: - -```typescript -import { DuneClient } from '@duneanalytics/client'; - -class DuneMobileClient { - private dune: DuneClient; - private cache: Map; - private cacheDuration: number = 60000; // 1 minute - - constructor(apiKey: string) { - this.dune = new DuneClient(apiKey); - this.cache = new Map(); - } - - async getPortfolioValue(address: string) { - // Check cache first - const cached = this.cache.get(`portfolio_${address}`); - if (cached && Date.now() - cached.timestamp < this.cacheDuration) { - return cached.data; - } - - // Fetch fresh data - const sql = ` - SELECT - SUM(amount_usd) as total_value, - blockchain, - token_symbol - FROM tokens.balances - WHERE wallet_address = '${address}' - GROUP BY blockchain, token_symbol - `; - - const results = await this.dune.execute({ sql }); - - // Cache results - this.cache.set(`portfolio_${address}`, { - data: results, - timestamp: Date.now() - }); - - return results; - } - - async getRecentActivity(address: string, limit: number = 10) { - const sql = ` - SELECT - block_time, - tx_hash, - token_symbol, - amount, - usd_value - FROM tokens.transfers - WHERE "from" = '${address}' OR "to" = '${address}' - AND block_time > now() - interval '24' hour - ORDER BY block_time DESC - LIMIT ${limit} - `; - - return await this.dune.execute({ sql }); - } -} - -// Usage in React Native -const client = new DuneMobileClient('YOUR_API_KEY'); - -async function loadWalletData(address: string) { - const [portfolio, activity] = await Promise.all([ - client.getPortfolioValue(address), - client.getRecentActivity(address) - ]); - - // Update UI - updatePortfolio(portfolio); - updateActivity(activity); -} -``` - -### 4. Live Dashboard Updates - -Build a live dashboard with automatic updates: - -```javascript -import { DuneClient } from '@duneanalytics/client'; - -const dune = new DuneClient('YOUR_API_KEY'); - -class LiveDashboard { - constructor() { - this.updateInterval = 30000; // 30 seconds - this.metrics = {}; - } - - async updateMetrics() { - const queries = [ - { - name: 'totalVolume', - sql: `SELECT SUM(amount_usd) as volume FROM dex.trades WHERE block_time > now() - interval '24' hour` - }, - { - name: 'activeUsers', - sql: `SELECT COUNT(DISTINCT trader) as users FROM dex.trades WHERE block_time > now() - interval '1' hour` - }, - { - name: 'gasPrice', - sql: `SELECT AVG(gas_price / 1e9) as gwei FROM ethereum.transactions WHERE block_time > now() - interval '10' minute` - } - ]; - - // Execute all queries in parallel - const results = await Promise.all( - queries.map(q => dune.execute({ sql: q.sql })) - ); - - // Update metrics - queries.forEach((q, i) => { - this.metrics[q.name] = results[i].rows[0]; - }); - - // Update UI - this.render(); - } - - render() { - document.getElementById('volume').textContent = - `$${this.metrics.totalVolume?.volume.toLocaleString()}`; - document.getElementById('users').textContent = - this.metrics.activeUsers?.users.toLocaleString(); - document.getElementById('gas').textContent = - `${this.metrics.gasPrice?.gwei.toFixed(1)} gwei`; - } - - start() { - // Initial load - this.updateMetrics(); - - // Auto-refresh - setInterval(() => this.updateMetrics(), this.updateInterval); - } -} - -// Start the dashboard -const dashboard = new LiveDashboard(); -dashboard.start(); -``` - -## Building a Trading Bot - -Create an automated trading bot that monitors opportunities: - -```python -from dune_client import DuneClient -import time -from decimal import Decimal - -dune = DuneClient(api_key="YOUR_API_KEY") - -class ArbitrageBot: - def __init__(self): - self.min_profit_threshold = Decimal('100') # $100 minimum profit - - def find_arbitrage_opportunities(self): - """Find cross-DEX arbitrage opportunities""" - sql = """ - WITH dex_prices AS ( - SELECT - token_address, - token_symbol, - project as dex, - AVG(price_usd) as price, - SUM(amount_usd) as liquidity - FROM dex.trades - WHERE block_time > now() - interval '5' minute - AND blockchain = 'ethereum' - GROUP BY 1, 2, 3 - ) - SELECT - a.token_symbol, - a.dex as dex_buy, - a.price as price_buy, - b.dex as dex_sell, - b.price as price_sell, - ((b.price - a.price) / a.price * 100) as profit_percent, - LEAST(a.liquidity, b.liquidity) as available_liquidity - FROM dex_prices a - JOIN dex_prices b ON a.token_address = b.token_address - WHERE a.dex != b.dex - AND b.price > a.price * 1.01 -- At least 1% profit - ORDER BY profit_percent DESC - LIMIT 10 - """ - - results = dune.execute(sql=sql) - return results.rows - - def evaluate_opportunity(self, opp): - """Evaluate if opportunity is worth executing""" - potential_profit = ( - Decimal(str(opp['profit_percent'])) / 100 * - Decimal(str(opp['available_liquidity'])) - ) - - if potential_profit > self.min_profit_threshold: - print(f"🚨 Arbitrage Alert!") - print(f"Token: {opp['token_symbol']}") - print(f"Buy on {opp['dex_buy']} at ${opp['price_buy']:.4f}") - print(f"Sell on {opp['dex_sell']} at ${opp['price_sell']:.4f}") - print(f"Profit: {opp['profit_percent']:.2f}%") - print(f"Potential: ${potential_profit:.2f}") - - # Execute trade (implement your trading logic here) - # self.execute_trade(opp) - - def run(self): - """Main bot loop""" - print("Starting arbitrage bot...") - - while True: - try: - opportunities = self.find_arbitrage_opportunities() - - for opp in opportunities: - self.evaluate_opportunity(opp) - - time.sleep(30) # Check every 30 seconds - - except Exception as e: - print(f"Error: {e}") - time.sleep(60) - -# Run the bot -bot = ArbitrageBot() -bot.run() -``` - -## Optimization Tips - - - - - Keep queries focused on recent data (last few minutes/hours) - - Use indexed columns in WHERE clauses (block_time, blockchain, etc.) - - Limit result sets to what you actually need - - Consider materialized views for frequently-accessed data - - - - ```python - from functools import lru_cache - from datetime import datetime - - @lru_cache(maxsize=100) - def cached_price_query(token, minute): - # Cache results for each minute - sql = f"SELECT price_usd FROM prices.usd WHERE token_symbol = '{token}' LIMIT 1" - return dune.execute(sql=sql) - - # Use current minute as cache key - current_minute = datetime.now().strftime("%Y-%m-%d %H:%M") - result = cached_price_query("WETH", current_minute) - ``` - - - - ```python - # Instead of multiple single queries - # ❌ Bad - eth_price = dune.execute(sql="SELECT price FROM prices WHERE symbol='ETH'") - btc_price = dune.execute(sql="SELECT price FROM prices WHERE symbol='BTC'") - - # ✅ Good - single query - prices = dune.execute(sql=""" - SELECT symbol, price FROM prices - WHERE symbol IN ('ETH', 'BTC') - """) - ``` - - - - Instead of polling, set up webhooks to receive notifications: - - ```python - # Configure webhook for query completion - dune.create_webhook( - query_id=query_id, - webhook_url="https://your-app.com/webhook" - ) - ``` - - - -## When to Use Simulation APIs - -For ultra-low latency requirements (sub-second), consider Dune's Simulation APIs: - - - - Sub-second price updates for trading applications - - [Learn more →](https://docs.dune.com/api-reference/sim-api/prices) - - - - Simulate transactions before execution - - [Learn more →](https://docs.dune.com/api-reference/sim-api/simulate) - - - - Query current blockchain state instantly - - [Learn more →](https://docs.dune.com/api-reference/sim-api/state) - - - - Subscribe to live data streams - - [Learn more →](https://docs.dune.com/api-reference/sim-api/websockets) - - - -## Next Steps - - - - Set up webhooks for event-driven updates - - - - Understand rate limits for real-time apps - - - - Learn about caching and optimization - - - - Explore ultra-low latency options - - - -## Example Use Cases - -- **Mobile Wallets:** Display real-time portfolio values and transaction history -- **Trading Bots:** Monitor prices and execute automated trades -- **Live Dashboards:** Show real-time protocol metrics and chain activity -- **Alerting Systems:** Notify users of important events (large trades, price movements) -- **DeFi Apps:** Display current pool states, APYs, and market conditions -- **NFT Platforms:** Show live floor prices and recent sales - diff --git a/api-reference/dex/endpoint/dex_ohlc.mdx b/api-reference/dex/endpoint/dex_ohlc.mdx deleted file mode 100644 index 7f59561fc..000000000 --- a/api-reference/dex/endpoint/dex_ohlc.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: 'OHLC Price' -openapi: 'GET /v1/dex/ohlc/{token}/{chain}' ---- - - -- You must pass in `token` address in all lowercase string -- Query can be found [here](https://dune.com/queries/3582296) -- Chains included are: all [EVM chains on Dune](/data-catalog/evm/overview) -- Scheduled to update every 30 minutes -- You can apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results - - -# Use Cases - -- Construct pricing candlestick data for any arbitrary token on a given chain, from memecoins to blue chip coins alike. -- Utilize historical OHLC data for predictive modeling and price movement forecasting. -- Incorporate OHLC data into automated trading algorithms to capitalize on price movements and trends. - -# Column Descriptions - -| Column | Description | Type | -|-----------------------|-----------------------------------------------------------|--------------| -| period | Date of the pricing data | string | -| token_contract_address| Token's blockchain contract address | string | -| token_symbol | Token symbol | string | -| blockchain | Blockchain where the token is deployed | string | -| median_price | The median trading price of the token for the period | double | -| high_price | The highest trading price of the token during the period, calculated by taking the 99th percentile of the day's trades if there are more than 1000 trades for the token on that day, else 95th percentile to account for edge cases | double | -| low_price | The lowest trading price of the token during the period, calculated by taking the 1st percentile of the day's trades if there are more than 1000 trades for the token on that day, else 5th percentile to account for edge cases | double | -| opening_price | The price of the token at the start of the period, calculated by taking the first 10 trades of the day | double | -| closing_price | The price of the token at the end of the period, calculated by taking the last 10 trades of the day | double | -| sample_size | The number of trades sampled to calculate the prices | int | - diff --git a/api-reference/dex/endpoint/dex_pair.mdx b/api-reference/dex/endpoint/dex_pair.mdx deleted file mode 100644 index fb5eedb8e..000000000 --- a/api-reference/dex/endpoint/dex_pair.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: 'DEX Pair Stats' -openapi: 'GET /v1/dex/pairs/{chain}' ---- - - -- Query can be found [here](https://dune.com/queries/3568055) -- Chains included are: `arbitrum`, `base`, `bnb`, `celo`, `ethereum`, `fantom`, `gnosis`, `optimism`, `polygon`, `scroll`, `zk_sync`, `solana` -- Scheduled to update every 30 minutes -- You can apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Each row is uniquely identified by the `chain`, `token_a_address`, and `token_b_address` columns combination. - - -# Use Cases - -- Enable DEX aggregators to identify all pools for swapping specific token pairs or addresses, using filters such as `filter='USDC-WETH'` or `filters=token_a_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' or token_b_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'`. -- Identify the token pair with the highest USD liquidity on a given chain by sorting results with `sort_by=usd_liquidity desc`. -- Provide aggregated DEX pair statistics, including volume and liquidity, to algorithmic trading bots and risk management systems. - -# Column Descriptions - -| Column | Description | Type | -|---------------------------------|--------------------------------------------------------------------------|---------------| -| chain | The blockchain where the token pair is traded | string | -| token_pair | The identifier of the token pair, e.g., 'USDC-WETH' | string | -| projects | List of DEX projects offering the token pair | array(string) | -| pool_ids | Contract addresses of pools containing the token pair | array(string) | -| token_a_address | Contract address of the first token in the pair | string | -| token_b_address | Contract address of the second token in the pair | string | -| one_day_volume | 24-hour USD trading volume for the token pair across all pools on all DEXes | double | -| seven_day_volume | 7-day USD trading volume for the token pair across all pools on all DEXes | double | -| thirty_day_volume | 30-day USD trading volume for the token pair across all pools on all DEXes | double | -| all_time_volume | Total USD trading volume for the token pair since inception across all pools on all DEXes | double | -| usd_liquidity | Current USD liquidity available in all pools for the token pair on all DEXes | double | -| seven_day_volume_liquidity_ratio| 7-day trading volume to liquidity ratio for the token pair across all pools on all DEXes | double | diff --git a/api-reference/eigenlayer/endpoint/avs_metadata.mdx b/api-reference/eigenlayer/endpoint/avs_metadata.mdx deleted file mode 100644 index eac55f924..000000000 --- a/api-reference/eigenlayer/endpoint/avs_metadata.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: 'AVS Metadata' -openapi: 'GET /v1/eigenlayer/avs-metadata' ---- - - -- Query powering this endpoint can be found [here](https://dune.com/queries/3682939) -- Scheduled to update daily (_AVS registrations happen once every few days normally_) - - - -# Column Descriptions - -| Column | Description | Type | -| --------------------- | ------------------------------------- | ---------- | -| avs_name | Name of the Actively Validated Service (AVS) | string | -| avs_contract_address | Ethereum contract address of the AVS | string | -| website | Website URL of the AVS | string | -| twitter | Twitter link of the AVS | string | -| logo | URL path to the logo image of the AVS | string | -| description | Brief description of the AVS | string | diff --git a/api-reference/eigenlayer/endpoint/avs_metrics.mdx b/api-reference/eigenlayer/endpoint/avs_metrics.mdx deleted file mode 100644 index 60fb00351..000000000 --- a/api-reference/eigenlayer/endpoint/avs_metrics.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: 'AVS Metrics' -openapi: 'GET /v1/eigenlayer/avs-stats' ---- - - -- Query powering this endpoint can be found [here](https://dune.com/queries/3693850) -- Scheduled to update 15 minutes -- Apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Use a combination of `sort_by` and `limit` to grab a subset of results, see [pagination](../../executions/pagination) and [sorting](../../executions/sorting) for more info - - -# Column Descriptions - -| Column | Description | Type | -| ------------------------- | ------------------------------------------------------------------- | ---------- | -| avs_name | Name of the Actively Validated Service (AVS) | string | -| avs_contract_address | Ethereum contract address of the AVS | string | -| num_operators | Number of operators registered to the AVS | integer | -| total_TVL | Total value locked across all strategies in the AVS | double | -| num_stakers | Number of stakers currently staking to the AVS (via operators) | integer | -| cbETH_TVL | Total value locked in cbETH strategy in the AVS | double | -| stETH_TVL | Total value locked in stETH strategy in the AVS | double | -| rETH_TVL | Total value locked in rETH strategy in the AVS | double | -| ETHx_TVL | Total value locked in ETHx strategy in the AVS | double | -| ankrETH_TVL | Total value locked in ankrETH strategy in the AVS | double | -| OETH_TVL | Total value locked in OETH strategy in the AVS | double | -| osETH_TVL | Total value locked in osETH strategy in the AVS | double | -| swETH_TVL | Total value locked in swETH strategy in the AVS | double | -| wBETH_TVL | Total value locked in wBETH strategy in the AVS | double | -| sfrxETH_TVL | Total value locked in sfrxETH strategy in the AVS | double | -| lsETH_TVL | Total value locked in lsETH strategy in the AVS | double | -| mETH_TVL | Total value locked in mETH strategy in the AVS | double | -| beacon_chain_ETH_TVL | Total value locked in Beacon Chain ETH strategy in the AVS | double | - diff --git a/api-reference/eigenlayer/endpoint/operator_metadata.mdx b/api-reference/eigenlayer/endpoint/operator_metadata.mdx deleted file mode 100644 index 58714c085..000000000 --- a/api-reference/eigenlayer/endpoint/operator_metadata.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: 'Operator Metadata' -openapi: 'GET /v1/eigenlayer/operator-metadata' ---- - - -- Query powering this endpoint can be found [here](https://dune.com/queries/3685760) -- Scheduled to update every 15 minutes -- Apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Use a combination of `sort_by` and `limit` to grab a subset of results, see [pagination](../../executions/pagination) and [sorting](../../executions/sorting) for more info - - -# Column Descriptions - -| Column | Description | Type | -| ------------------------- | ---------------------------------------------- | ---------- | -| operator_name | Name of the operator | string | -| operator_contract_address | Ethereum contract address of the operator | string | -| website | Website URL of the operator | string | -| twitter | Twitter link of the operator | string | -| logo | URL to the logo image of the operator | string | -| description | Brief description of the operator | string | diff --git a/api-reference/eigenlayer/endpoint/operator_metrics.mdx b/api-reference/eigenlayer/endpoint/operator_metrics.mdx deleted file mode 100644 index ea6ee917b..000000000 --- a/api-reference/eigenlayer/endpoint/operator_metrics.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: 'Operator Metrics' -openapi: 'GET /v1/eigenlayer/operator-stats' ---- - - -- Query powering this endpoint can be found [here](https://dune.com/queries/3685928) -- Scheduled to update every 15 minutes -- Apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Use a combination of `sort_by` and `limit` to grab a subset of results, see [pagination](../../executions/pagination) and [sorting](../../executions/sorting) for more info - - -# Column Descriptions - -| Column | Description | Type | -| ------------------------- | --------------------------------------------------- | ---------- | -| operator_name | Name of the operator | string | -| operator_contract_address | Ethereum contract address of the operator | string | -| total_TVL | Total value locked in the operator across all strategies (except for EIGEN token) | double | -| num_stakers | Number of stakers currently staking to the operator | double | -| cbETH_TVL | Total value locked in cbETH strategy in the operator | double | -| stETH_TVL | Total value locked in stETH strategy in the operator | double | -| rETH_TVL | Total value locked in rETH strategy in the operator | double | -| ETHx_TVL | Total value locked in ETHx strategy in the operator | double | -| ankrETH_TVL | Total value locked in ankrETH strategy in the operator | double | -| OETH_TVL | Total value locked in OETH strategy in the operator | double | -| osETH_TVL | Total value locked in osETH strategy in the operator | double | -| swETH_TVL | Total value locked in swETH strategy in the operator | double | -| wBETH_TVL | Total value locked in wBETH strategy in the operator | double | -| sfrxETH_TVL | Total value locked in sfrxETH strategy in the operator | double | -| lsETH_TVL | Total value locked in lsETH strategy in the operator | double | -| mETH_TVL | Total value locked in mETH strategy in the operator | double | -| beacon_chain_ETH_TVL | Total value locked in Beacon Chain ETH strategy in the operator | double | -| EIGEN_TVL | Total value locked in EIGEN strategy in the operator | double | diff --git a/api-reference/eigenlayer/endpoint/operator_to_avs_mapping.mdx b/api-reference/eigenlayer/endpoint/operator_to_avs_mapping.mdx deleted file mode 100644 index 24903c8a5..000000000 --- a/api-reference/eigenlayer/endpoint/operator_to_avs_mapping.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: 'Operator <> AVS Mapping' -openapi: 'GET /v1/eigenlayer/operator-to-avs-mapping' ---- - - -- Query powering this endpoint can be found [here](https://dune.com/queries/3685583) -- Scheduled to update every 15 minutes -- Apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Use a combination of `sort_by` and `limit` to grab a subset of results, see [pagination](../../executions/pagination) and [sorting](../../executions/sorting) for more info - - -# Column Descriptions - -| Column | Description | Type | -| ------------------------- | ------------------------------------------------- | ---------- | -| avs_contract_address | Ethereum contract address of the AVS | string | -| avs_name | Name of the Actively Validated Service (AVS) | string | -| avs_website | Website URL of the AVS | string | -| operator_contract_address | Ethereum contract address of the operator | string | -| operator_name | Name of the operator | string | -| operator_website | Website URL of the operator | string | -| registered_time | Timestamp of when the operator registered to the AVS | string | diff --git a/api-reference/eigenlayer/introduction.mdx b/api-reference/eigenlayer/introduction.mdx deleted file mode 100644 index 887f82e13..000000000 --- a/api-reference/eigenlayer/introduction.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "Dune EigenLayer Endpoints" ---- - -Leverage Dune's API for direct access to [EigenLayer](https://www.eigenlayer.xyz/) data, streamlining your dApp and infrastructure development. No SQL needed—our Domain-specific API is designed for easy integration and flexible application use. - -- **JSON Format**: All endpoints deliver JSON-formatted data for straightforward integration. -- **Instant Access**: Begin immediately by [creating a free account](https://dune.com/auth/register) and [obtain an API key](.././overview/authentication). -- **Expansive Data Ecosystem**: Enhance your projects by connecting with an extensive range of on-chain and off-chain data, from [Farcaster](.././farcaster/introduction) to [DEX](../dex/endpoint/dex_pair.mdx) and more. Build alongside our vibrant community. - - - - - Get AVS metadata, including name, address, and more. - - - Get operator metadata, including name, address, and more. - - - - Get AVS metrics, including TVL, number of operators and number of stakers. - - - Get operator metrics, including TVL, number of stakers, and more. - - - Get a mapping of which operator is registered to which AVS and when it was registered. - - - -
- -To custom-build an API endpoint with SQL query, watch [this short video](https://youtu.be/o29ig849qMY) and [get started here](.././quickstart/results-eg)! diff --git a/api-reference/evm/endpoint/contracts.mdx b/api-reference/evm/endpoint/contracts.mdx deleted file mode 100644 index 9e9ec2898..000000000 --- a/api-reference/evm/endpoint/contracts.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: 'Trending Contracts' -openapi: 'GET /v1/trends/evm/contracts/{chain}' ---- - - -- Query can be found [here](https://dune.com/queries/3575084) -- Scheduled to update once a day (12am UTC) -- You can apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results - - -# Use Cases - -- Feed into a CRM of developers and projects based on contract popularity -- Build an explorer page of top trending contracts with basic metadata support. -- Track trending contracts by value and type (user facing, contract facing, token, router, safes, etc.) - -# Column Descriptions - -| Column Name | Description | Type | -|--------------------------|---------------------------------|------------------------| -| contract_address | Contract address of the contract | string | -| blockchain | Blockchain of the contract | string | -| deployer | Deployer address of the contract | string | -| contract_project | Project of the contract | string | -| contract_name | Name of the contract | string | -| created_time | Time when the contract was created | string | -| deployed_days_ago | Number of days since deployment | integer | -| token_standard | Standard of the token (ERC20, ERC721, ERC1155) if applicable | string | -| usd_value_received | Value received in USD in ETH and ERC20 tokens in last 30 days | integer | -| transaction_calls | Number of transaction calls (top level transactions) in last 30 days | integer | -| unique_callers | Number of unique callers (tx from) in last 30 days | integer | -| contract_calls | Number of calls from other contracts in last 30 days | integer | -| unique_contract_callers | Number of unique contracts calling this contract in traces in last 30 days | integer | \ No newline at end of file diff --git a/api-reference/farcaster/endpoint/farcaster_channels.mdx b/api-reference/farcaster/endpoint/farcaster_channels.mdx deleted file mode 100644 index 1a3fe2ae1..000000000 --- a/api-reference/farcaster/endpoint/farcaster_channels.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: 'Farcaster Channels' -openapi: 'GET /v1/farcaster/trends/channels' ---- - - -- Query can be found [here](https://dune.com/queries/3633434) -- Scheduled to update every 30 minutes -- You can apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Learn about channel tiers [in this article](https://read.cryptodatabytes.com/p/how-to-find-and-analyze-trends-on) - - -# Use Cases - -- Recommend trending channels based on engagement, casters, and/or domains -- Curate feeds that segment channels by type (small and growing, large and established, influencer led) -- Filter out likely bot channels (low engagement, no influencers or vips, no "onchain_experts") - -# Column Descriptions - -| Column | Description | Type | -| --------------------- | ------------------------------------- | ---------- | -| channel_tier_name | name of channel tier this week | string | -| channel_tier | farcaster channel tier this week | integer | -| channel_tier_last | farcaster channel tier last week | integer | -| channel | farcaster channel name | string | -| channel_age | age of channel in days | integer | -| influential_casters | top casters by engagement in channel| array(string) | -| top_domains | top domains in casts in channel | array(string) | -| top_casters | top casters by number of casts in channel | array(string) | -| casters | number of casters in channels in the last week | integer | -| wow_casters | week over week change in number of casters | integer | -| got_casts | number of casts in channels in the last week | integer | -| wow_cast | week over week change in number of casts | integer | -| engagement | engagement on channel casts in the last week | integer | -| wow_engage | week over week change in number of engagement | integer | -| onchain_experts | number of casters in the last week who have transacted 100+ times ever | integer | -| trading_experts | number of casters in the last week who have traded $10k+ in DEX or NFT volume ever | integer | -| contract_experts | number of casters in the last week who have deployed 10+ contracts ever | integer | -| active_npc | npc tier users that have casted in the channel | integer | -| wow_npc | week over week change in number of npc tier casters | integer | -| active_user | active tier users that have casted in the channel | integer | -| wow_active_user | week over week change in number of active tier casters | integer | -| active_star | star tier users that have casted in the channel | integer | -| wow_star | week over week change in number of star tier casters | integer | -| active_influencer | influencer tier users that have casted in the channel | integer | -| wow_influencer | week over week change in number of influencer tier casters | integer | -| active_vip | vip tier users that have casted in the channel | integer | -| wow_vip | week over week change in number of vip tier casters | integer | -| got_replies | number of replies in the last week | integer | -| wow_reply | week over week change in number of replies | integer | -| got_likes | number of likes in the last week | integer | -| wow_likes | week over week change in number of likes | integer | -| got_recasts | number of recasts in the last week | integer | -| wow_recasts | week over week change in number of recasts | integer | diff --git a/api-reference/farcaster/endpoint/farcaster_memecoins.mdx b/api-reference/farcaster/endpoint/farcaster_memecoins.mdx deleted file mode 100644 index 8f1e06083..000000000 --- a/api-reference/farcaster/endpoint/farcaster_memecoins.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: 'Farcaster Memecoins' -openapi: 'GET /v1/farcaster/trends/memecoins' ---- - - -- Query can be found [here](https://dune.com/queries/3662242) -- Scheduled to update every 30 minutes -- You can apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Learn about memecoins and categories [in this article](https://read.cryptodatabytes.com/p/a-social-and-financial-study-of-memecoins) - - -# Use Cases - -- Recommend trending memecoins based on farcaster engagement, liquidity, volume, or other onchain activity - -# Column Descriptions - -Learn more about the score and methodology [in this article](https://read.cryptodatabytes.com/p/a-social-and-financial-study-of-memecoins). - -| Column | Description | Type | -| --------------------- | --------------------------------------------------------------------- | ------- | -| word_raw | Ticker symbol of the token | string | -| related_symbol | Any symbol or word that is related to the token (i.e. the degen hat or higher arrow) | string | -| token_contract_address| Contract address of the token | string | -| blockchain | Blockchain on which the token is deployed | string | -| deployed_days_ago | Number of days since the token was deployed | integer | -| social_score | Social score of the token | integer | -| financial_score | Financial score of the token | integer | -| meme_category | Category of meme based off of social and financial score values | string | -| casters | Number of users who have casted the token ticker | integer | -| casters_wow | Change in the number of casters week over week | integer | -| percent_recipient_casters | Percentage of casters this week that have received the token before | integer | -| percent_recipient_wow | Change in the percentage of recipient casters week over week | integer | -| recipient_casters | Number of casters this week that have received the token before | integer | -| recipient_casters_wow | Change in the number of recipient casters week over week | integer | -| casts | Number of times the token ticker has been casted | integer | -| casts_wow | Change in the number of casts week over week | integer | -| channels | Number of channels the token ticker has been casted in | integer | -| channels_wow | Change in the number of channels week over week | integer | -| activity_level | Activity level of the token | integer | -| activity_wow | Change in the activity level week over week | integer | -| total_supply | Total supply of the token | integer | -| fdv | Fully diluted valuation of the token | integer | -| median_price | Median price of the token | integer | -| day_pnl | Profit and loss of the token price in the last 24 hours | integer | -| week_pnl | Profit and loss of the token price in the last 7 days | integer | -| month_pnl | Profit and loss of the token price in the last 30 days | integer | -| liquidity_usd | Liquidity of the token in USD | integer | -| liquidity_wow | Change in liquidity week over week | integer | -| rolling_one_months_trades | Number of trades in the last month | integer | -| transfers_one_month | Number of token transfers in the last month | integer | -| total_volume_week | Total trading volume of the token in the last 7 days | integer | -| total_volume_wow | Change in total trading volume week over week | integer | -| buy_volume_week | Total buying volume of the token in the last 7 days | integer | -| buy_volume_wow | Change in total buying volume week over week | integer | -| sell_volume_week | Total selling volume of the token in the last 7 days | integer | -| sell_volume_wow | Change in total selling volume week over week | integer | diff --git a/api-reference/farcaster/endpoint/farcaster_users.mdx b/api-reference/farcaster/endpoint/farcaster_users.mdx deleted file mode 100644 index e8022c00c..000000000 --- a/api-reference/farcaster/endpoint/farcaster_users.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: 'Farcaster Users' -openapi: 'GET /v1/farcaster/trends/users' ---- - - -- Query can be found [here](https://dune.com/queries/3633428) -- Scheduled to update every 30 minutes -- You can apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results -- Learn about user tiers [in this article](https://read.cryptodatabytes.com/p/how-to-find-and-analyze-trends-on) - - -# Use Cases - -- Recommend trending users based on engagement, domains, or onchain activity -- Curate feeds that segment users by type (developer, artist, memecoin trader, etc.) -- Filter out likely bot users (high number of casts, low engagement, low onchain activity) - -# Column Descriptions - -| Column | Description | Type | -| --------------------- | ------------------------------------- | ---------- | -| fid_active_tier_name | name of Farcaster tier this week | string | -| fid_active_tier | Farcaster user tier this week | integer | -| fid_active_tier_last | Farcaster user tier last week | integer | -| fid | Farcaster user id | integer | -| fname | Farcaster username of user | string | -| account_age | age of account in days | integer | -| channels | number of channels cast in during the last week | integer | -| top_channels | top channels cast in | array(string)| -| top_domains | top domains cast | array(string)| -| top_engagers | top cast engagers | array(string)| -| followers | total number of followers | integer | -| wow_followers | week over week change in number of followers | integer | -| casts | number of casts in the last week | integer | -| wow_casts | week over week change in number of casts | integer | -| engagement | engagement on user casts in the last week | integer | -| wow_engage | week over week change in number of engagements | integer | -| total_transactions | total number of wallet transactions | integer | -| trading_volume_usd | total NFT and DEX trading volume (USD)| integer | -| contracts_deployed | total number of deployed contracts | integer | -| got_likes | number of likes in the last week | integer | -| wow_likes | week over week change in number of likes | integer | -| got_recasts | number of recasts in the last week | integer | -| wow_recasts | week over week change in number of recasts | integer | -| got_replies | number of replies in the last week | integer | -| wow_replies | week over week change in number of replies | integer | -| addresses | user verified addresses | array(string) | diff --git a/api-reference/farcaster/introduction.mdx b/api-reference/farcaster/introduction.mdx deleted file mode 100644 index bb6226eac..000000000 --- a/api-reference/farcaster/introduction.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Dune Farcaster Endpoints" ---- - -While you can create/use any query as an API endpoint, we've defined three popular queries as preset endpoints (so you don't need to worry about executions or editing SQL). You should use these endpoints to provide better data to inform your algorithms, recommendations, or UI elements. - - - - Get trending users, based on farcaster engagement and onchain activity - - - Get trending channels, based on user tiers, onchain activity, and engagement. - - - Get trending memecoins, based on engagement, holders, liquidity, volume, and more. - - diff --git a/api-reference/markets/endpoint/marketplace_marketshare.mdx b/api-reference/markets/endpoint/marketplace_marketshare.mdx deleted file mode 100644 index af5b33037..000000000 --- a/api-reference/markets/endpoint/marketplace_marketshare.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: 'Marketplace Market Share' -openapi: 'GET /v1/marketshare/{market}/{chain}' ---- - - -- Query can be found [here](https://dune.com/queries/3575029) -- Chains included are: all [EVM chains on Dune](data-catalog/evm/overview) -- Scheduled to update every day (23:30 UTC) -- You can apply [filters](../../executions/filtering) like WHERE, IN, AND/OR upon results - - -# Use Cases - -- Recommend trending or emerging marketplaces by tracking shifts in the market share over time. -- Feed into a marketing ROI tracker to assess campaign impacts on marketplace market share. -- Build a competitive analysis tool to monitor marketplaces and sectors' market share over time. - - -# Column Descriptions - -| Column | Description | Type | -|------------|----------------------------------------------------------|----------| -| time | Date of the marketshare data | string | -| market | Sector identifier: 'dex' or 'nft' | string | -| blockchain | The blockchain where the marketplace operates on | string | -| project | Specific DEX or NFT marketplace name | string | -| version | Contract version of the marketplace protocol, e.g. 'v2' | string | -| volume_usd | USD volume traded on the marketplace | double | -| trades | Number of trades on the marketplace | int | diff --git a/api-reference/markets/markets-openapi.json b/api-reference/markets/markets-openapi.json deleted file mode 100644 index 90458240a..000000000 --- a/api-reference/markets/markets-openapi.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "OpenAPI for Markets API", - "description": "API for predefined DEX/AMM related endpoints", - "version": "1.0.0" - }, - "servers": [ - { - "url": "https://api.dune.com/api" - } - ], - "paths": { - "/v1/marketshare/{market}/{chain}": { - "get": { - "summary": "Get the market share for DEX or NFT market for a given chain", - "description": "Given a chain, get the market share in terms of USD transacting volume and number of trades for either `dex` or `nft` sector.", - "operationId": "marketMarketshare", - "parameters": [ - { - "in": "header", - "name": "X-DUNE-API-KEY", - "schema": { - "type": "string" - }, - "description": "API Key for the service", - "required": true - }, - { - "in": "query", - "name": "api_key", - "schema": { - "type": "string" - }, - "description": "API Key for the service, alternative to using the HTTP header X-DUNE-API-KEY.", - "required": false - }, - { - "in": "path", - "name": "chain", - "required": true, - "schema": { - "type": "string" - }, - "description": "chain name (use Dune namespace, i.e. ethereum, solana, bnb, polygon, optimsm, etc)" - }, - { - "in": "path", - "name": "market", - "required": true, - "schema": { - "type": "string" - }, - "description": "sector of the marketshare, either 'dex' or 'nft'" - }, - { - "in": "query", - "name": "limit", - "required": true, - "schema": { - "type": "integer" - }, - "example": 10, - "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through results in an incremental and efficient way. This parameter is incompatible with sampling (sample_count)." - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "type": "integer" - }, - "description": "Offset row number to start (inclusive, first row means offset=0) returning results from. This together with 'limit' allows easy pagination through results in an incremental and efficient way. This parameter is incompatible with sampling (sample_count)." - }, - { - "in": "query", - "name": "filters", - "required": false, - "schema": { - "type": "string" - }, - "description": "Expression to filter out rows from the results to return. This expression is similar to a SQL WHERE clause. More details about it in the Filtering section of the doc. This parameter is incompatible with `sample_count`." - }, - { - "in": "query", - "name": "sort_by", - "required": false, - "schema": { - "type": "string" - }, - "description": "Expression to define the order in which the results should be returned. This expression is similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc." - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "execution_id": { - "type": "string", - "description": "Unique identifier for the execution", - "example": "01HW6N7VF1H7VYQ91GC0NP673E" - }, - "query_id": { - "type": "integer", - "description": "Unique identifier for the query", - "example": 3568055 - }, - "is_execution_finished": { - "type": "boolean", - "description": "Flag to indicate if the execution is finished", - "example": true - }, - "state": { - "type": "string", - "description": "State of the query execution", - "example": "QUERY_STATE_COMPLETED" - }, - "submitted_at": { - "type": "string", - "description": "Time when the query was submitted", - "example": "2024-04-23T23:39:15.297947Z" - }, - "expires_at": { - "type": "string", - "description": "Time when the query will expire", - "example": "2024-07-22T23:39:29.38954Z" - }, - "execution_started_at": { - "type": "string", - "description": "Time when the execution started", - "example": "2024-04-23T23:39:18.83657Z" - }, - "execution_ended_at": { - "type": "string", - "description": "Time when the execution ended", - "example": "2024-04-23T23:39:29.389539Z" - }, - "result": { - "type": "object", - "description": "results from query", - "example": { - "rows": [ - { - "all_time_volume": 332594074340.3848, - "chain": "ethereum", - "one_day_volume": 92699347.47933117, - "pool_ids": [ - "0x9b208194acc0a8ccb2a8dcafeacfbb7dcc093f81", - "0xd0382ad6fe3759ab65fc4bc435f47045ffea77c7", - "0xee60ca08cca968dc1b36e7bbcc779efe34d7ef62", - "0x31ac258b911af9a0d2669ebdfc4e39d92e96b772", - "0x3ab6564d5c214bc416ee8421e05219960504eead", - "0x21e7fd84385d47076208ca3ba993ecf292691394", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0xc537e898cd774e2dcba3b14ea6f34c93d5ea45e1", - "0x4572f2554421bd64bef1c22c8a81840e8d496bea", - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb", - "0x7abd51bba7f9f6ae87ac77e1ea1c5783ada56e5c", - "0x2673099769201c08e9a5e63b25fbaf25541a6557", - "0x1033812efec8716bbae0c19e5678698d25e26edf", - "0x81b7f92c7b7d9349b989b4982588761bfa1aa627", - "0xa87e10cb085512931ccd277338e66cdacb52ca79", - "0xb93f696e5c46b6772fc2ff65e459cf9685fac782", - "0x43b4fdfd4ff969587185cdb6f0bd875c5fc83f8c", - "0xdebf20617708857ebe4f679508e7b7863a8a8eee", - "0x655edce464cc797526600a462a8154650eee4b77", - "0xec577a919fca1b682f584a50b1048331ef0f30dd", - "0x5b3b5df2bf2b6543f78e053bd91c4bdd820929f1", - "0xc50cb225e0f45e814fd41bcb3a120463ab1f04c3", - "0xd7b6d14b76595ab7938c2c781079d787ef3bd5ee", - "0x9ca2a439810524250e543ba8fb6e88578af242bc", - "0x06df3b2bbb68adc8b0e302443692037ed9f91b42", - "0xecd5e75afb02efa118af914515d6521aabd189f1", - "0xed279fdd11ca84beef15af5d39bb4d4bee23f0ca", - "0x178e029173417b1f9c8bc16dcec6f697bc323746", - "0xceaf7747579696a2f0bb206a14210e3c9e6fb269", - "0x2dded6da1bf5dbdf597c45fcfaa3194e53ecfeaf", - "0xa77d09743f77052950c4eb4e6547e9665299becd", - "0x1ee383389c621c37ee5aa476f88413a815083c5d", - "0xa5407eae9ba41422680e2e00537571bcc53efbfd", - "0x79a8c46dea5ada233abaffd40f3a0a2b1e5a4f27", - "0x02e1300a7e6c3211c65317176cf1795f9bb1daab", - "0x0f9cb53ebe405d49a0bbdbd291a65ff571bc83e1", - "0xe2f2a5c287993345a840db3b0845fbc70f5935a5", - "0x9547429c0e2c3a8b88c6833b58fce962734c0e8c", - "0x4f062658eaaf2c1ccf8c8e36d6824cdf41167956", - "0xb04f13750cd764eeceb07e19254564787c9c72bf", - "0xcc12532e95c2a6a4c53af153b9b739a3cc9218a7", - "0x080bf510fcbf18b91105470639e9561022937712", - "0x3252efd4ea2d6c78091a1f43982ee2c3659cc3d1", - "0xb5214edee5741324a13539bcc207bc549e2491ff", - "0x69d460e01070a7ba1bc363885bc8f4f0daa19bf5", - "0x1f06f01fdbdcdf1a6604878cbd90e88ad6d3c654", - "0x3e01dd8a5e1fb3481f0f589056b428fc308af0fb", - "0xe6b5cc1b4b47305c58392ce3d359b10282fc36ea", - "0xc88b0e9cbfdffc1ceac078321442d546874eb3ef", - "0x618788357d0ebd8a37e763adab3bc575d54c2c7d", - "0x5777d92f208679db4b9778590fa3cab3ac9e2168", - "0xaad387f18e015cf9be4bdf96854845be51ddc977", - "0x8ee017541375f6bcd802ba119bddc94dad6911a1", - "0x5c6a6cf9ae657a73b98454d17986af41fc7b44ee", - "0xaa5a67c256e27a5d80712c51971408db3370927d", - "0xc0b2b0c5376cb2e6f73b473a7caa341542f707ce", - "0x1b8874baceaafba9ea194a625d12e8b270d77016", - "0xc270b3b858c335b6ba5d5b10e2da8a09976005ad", - "0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5", - "0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7", - "0x57755f7dec33320bca83159c26e93751bfd30fbe", - "0x06364f10b501e868329afbc005b3492902d6c763", - "0x42d7025938bec20b69cbae5a77421082407f053a", - "0x4807862aa8b2bf68830e4c8dc86d0e9a998e085a", - "0x8038c01a0390a8c547446a0b2c18fc9aefecc10c", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0xe7b0ce0526fbe3969035a145c9e9691d4d9d216c", - "0xd9e497bd8f491fe163b42a62c296fb54caea74b7", - "0x2e9c6dcdca22a5952a88c4b18edb5b54c5155bc9", - "0x3a70dfa7d2262988064a2d051dd47521e43c9bdd", - "0x53dc703b78794b61281812f3a901918253beefee", - "0xa2b47e3d5c44877cca798226b7b8118f9bfb7a56", - "0x890f4e345b1daed0367a877a1612f86a1f86985f", - "0x5a6a4d54456819380173272a5e8e9b9904bdf41b", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0x6870f9b4dd5d34c7fc53d0d85d9dbd1aab339bf7", - "0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee", - "0x8474ddbe98f5aa3179b3b3f5942d724afcdec9f6", - "0xbc68fa58930a2f36d37d16f2f7cfebdd2b7902c6", - "0x06cb22615ba53e60d67bf6c341a0fd5e718e1655", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0x52ea46506b9cc5ef470c5bf89f17dc28bb35d85c", - "0xd632f22692fac7611d2aa1c0d552930d43caed3b", - "0xaaf5110db6e744ff70fb339de037b990a20bdace", - "0x1373e57f764a7944bdd7a4bd5ca3007d496934da", - "0x4567fc23d02fc4ba0b960639d43ecfe8cac6e68f", - "0xc74eba6863c11266dcffbbf39de34f5845e0ebe4", - "0x87650d7bbfc3a9f10587d7778206671719d9910d", - "0x72a8f00913226b49e63cb7f27bc31ee5cfd09646", - "0x79c58f70905f734641735bc61e45c19dd9ad60bc", - "0xc9c32cd16bf7efb85ff14e0c8603cc90f6f2ee49", - "0xc45a95642bc59df699364237b80057eadc8d8a14", - "0x3ef6a01a0f81d6046290f3e2a8c5b843e738e604", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0x6c6bc977e13df9b0de53b251522280bb72383700" - ], - "projects": [ - "bancor", - "carbon_defi", - "curve", - "mstable", - "clipper", - "0x API", - "defiswap", - "uniswap", - "pancakeswap", - "maverick", - "sushiswap", - "dodo", - "balancer", - "airswap" - ], - "seven_day_volume": 737039227.6180601, - "seven_day_volume_liquidity_ratio": 281.975796372453, - "thirty_day_volume": 3678990033.201309, - "token_a_address": "0x6b175474e89094c44da98b954eedeac495271d0f", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "DAI-USDC", - "usd_liquidity": 248314669.2889558 - }, - { - "all_time_volume": 116709024541.30284, - "chain": "ethereum", - "one_day_volume": 347313.65828850656, - "pool_ids": [ - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0x3ab6564d5c214bc416ee8421e05219960504eead", - "0x080bf510fcbf18b91105470639e9561022937712", - "0xc537e898cd774e2dcba3b14ea6f34c93d5ea45e1", - "0x2f9ec37d6ccfff1cab21733bdadede11c823ccb0", - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef" - ], - "projects": ["bancor", "0x API", "carbon_defi"], - "seven_day_volume": 7494228.013474621, - "seven_day_volume_liquidity_ratio": 136.4840258342926, - "thirty_day_volume": 74588861.33509746, - "token_a_address": "0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "BNT-USDC", - "usd_liquidity": 384364.36625934794 - }, - { - "all_time_volume": 94313504772.55698, - "chain": "ethereum", - "one_day_volume": 1674146.1481379208, - "pool_ids": [ - "0xe2f2a5c287993345a840db3b0845fbc70f5935a5", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0x080bf510fcbf18b91105470639e9561022937712", - "0xe55e68925809784c8234dfcf6f8fa42c3a48b2c3", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0xbc68fa58930a2f36d37d16f2f7cfebdd2b7902c6", - "0x4572f2554421bd64bef1c22c8a81840e8d496bea", - "0x1ee383389c621c37ee5aa476f88413a815083c5d", - "0xecd5e75afb02efa118af914515d6521aabd189f1", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0x39529e96c28807655b5856b3d342c6225111770e", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0x33baeda08b8afacc4d3d07cf31d49fc1f1f3e893", - "0xf1f27db872b7f6e8b873c97f785fe4f9a6c92161" - ], - "projects": [ - "mstable", - "0x API", - "airswap", - "balancer", - "uniswap", - "curve" - ], - "seven_day_volume": 9336213.926152254, - "seven_day_volume_liquidity_ratio": 3588.0000155662356, - "thirty_day_volume": 50471927.563405074, - "token_a_address": "0x0000000000085d4780b73119b644ae5ecd22b376", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "TUSD-USDC", - "usd_liquidity": 39030.994505216884 - }, - { - "all_time_volume": 94051550278.08916, - "chain": "ethereum", - "one_day_volume": 1610611.7966684166, - "pool_ids": [ - "0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee", - "0x00cef0386ed94d738c8f8a74e8bfd0376926d24c", - "0x8fdb0bb9365a46b145db80d0b1c5c5e979c84190", - "0xfe842e95f8911dcc21c943a1daa4bd641a1381c6", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0x81b7f92c7b7d9349b989b4982588761bfa1aa627", - "0x9ca2a439810524250e543ba8fb6e88578af242bc", - "0x524847c615639e76fe7d0fe0b16be8c4eac9cf3c", - "0x5e35c4eba72470ee1177dcb14dddf4d9e6d915f4", - "0x080bf510fcbf18b91105470639e9561022937712", - "0x3ab6564d5c214bc416ee8421e05219960504eead", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0x4572f2554421bd64bef1c22c8a81840e8d496bea", - "0x4807862aa8b2bf68830e4c8dc86d0e9a998e085a", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0x79a8c46dea5ada233abaffd40f3a0a2b1e5a4f27", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8" - ], - "projects": [ - "mstable", - "balancer", - "pancakeswap", - "uniswap", - "bancor", - "0x API", - "airswap", - "curve" - ], - "seven_day_volume": 9582693.692927752, - "seven_day_volume_liquidity_ratio": 5034.898797007897, - "thirty_day_volume": 52270429.14287423, - "token_a_address": "0x4fabb145d64652a948d72533023f6e7a623c7c53", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "BUSD-USDC", - "usd_liquidity": 34258.58064420375 - }, - { - "all_time_volume": 90294759705.52713, - "chain": "ethereum", - "one_day_volume": 2827504.919142756, - "pool_ids": [ - "0xd0fc8ba7e267f2bc56044a7715a489d851dc6d78", - "0xab2044f105c43c25b1de3ee27504f0b889ce5953", - "0x4572f2554421bd64bef1c22c8a81840e8d496bea", - "0x72a8f00913226b49e63cb7f27bc31ee5cfd09646", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb", - "0x080bf510fcbf18b91105470639e9561022937712", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0xc537e898cd774e2dcba3b14ea6f34c93d5ea45e1", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0x8762cb30fee5661521bd21cedbe64c5075275f2d", - "0xc50cb225e0f45e814fd41bcb3a120463ab1f04c3", - "0xe8bf7d7358a96fa870d3945bb37bfcc91a9041cc", - "0xebfb684dd2b01e698ca6c14f10e4f289934a54d6", - "0x9ca2a439810524250e543ba8fb6e88578af242bc" - ], - "projects": [ - "uniswap", - "balancer", - "bancor", - "airswap", - "carbon_defi", - "0x API", - "pancakeswap" - ], - "seven_day_volume": 20436505.74916102, - "seven_day_volume_liquidity_ratio": 51.273970307133546, - "thirty_day_volume": 100313531.19630384, - "token_a_address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "UNI-USDC", - "usd_liquidity": 6775769.374883028 - }, - { - "all_time_volume": 90092193021.80107, - "chain": "ethereum", - "one_day_volume": 1748066.5905444843, - "pool_ids": [ - "0x562c0b218cc9ba06d9eb42f3aef54c54cc5a4650", - "0x4b6b06de9a52e8a3fb91df2d1615e17705371f86", - "0x1373e57f764a7944bdd7a4bd5ca3007d496934da", - "0x8287913adfa69adca06beb00deab68a99c9e8d46", - "0xd8c8a2b125527bf97c8e4845b25de7e964468f77", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0xcb5cde8da12555bf770e185e8e323290e5c443d4", - "0xc0b2b0c5376cb2e6f73b473a7caa341542f707ce", - "0xc537e898cd774e2dcba3b14ea6f34c93d5ea45e1", - "0x1f06f01fdbdcdf1a6604878cbd90e88ad6d3c654", - "0xc88b0e9cbfdffc1ceac078321442d546874eb3ef", - "0x5f752aa9e748ffc007a15b7ca0fad8f2127f186c", - "0x68a241796628ecf44e48f0533fb00d07dd3419d2", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0xe6c2e229c763ed3e1d5d57b3648aeb1d4011eacd", - "0x9ca2a439810524250e543ba8fb6e88578af242bc", - "0x080bf510fcbf18b91105470639e9561022937712", - "0xb93f696e5c46b6772fc2ff65e459cf9685fac782", - "0xfad57d2039c21811c8f2b5d5b65308aa99d31559", - "0x1be21dd1fa2aced16656b7d765b88afa6853cc98", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0x032d9bc3f3c1042b431f29df63aaa547f5ed6ee6", - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb" - ], - "projects": [ - "dodo", - "balancer", - "carbon_defi", - "airswap", - "pancakeswap", - "uniswap", - "0x API", - "bancor" - ], - "seven_day_volume": 12528060.859976402, - "seven_day_volume_liquidity_ratio": 385.68845448165985, - "thirty_day_volume": 93276129.33738266, - "token_a_address": "0x514910771af9ca656af840dff83e8264ecf986ca", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "LINK-USDC", - "usd_liquidity": 812058.3280625618 - }, - { - "all_time_volume": 90020606554.59792, - "chain": "ethereum", - "one_day_volume": 1680068.0993446708, - "pool_ids": [ - "0xb06e7ed37cfa8f0f2888355dd1913e45412798c5", - "0xdfa42ba0130425b21a1568507b084cc246fb0c8f", - "0x080bf510fcbf18b91105470639e9561022937712", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0x14462305d211c12a736986f4e8216e28c5ea7ab4", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6" - ], - "projects": [ - "uniswap", - "balancer", - "0x API", - "bancor", - "airswap" - ], - "seven_day_volume": 11390285.80369365, - "seven_day_volume_liquidity_ratio": 976.8687139129809, - "thirty_day_volume": 72361946.88776392, - "token_a_address": "0xc944e90c64b2c07662a292be6244bdf05cda44a7", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "GRT-USDC", - "usd_liquidity": 116599.96518947062 - }, - { - "all_time_volume": 89938603799.63126, - "chain": "ethereum", - "one_day_volume": 1680424.9979594469, - "pool_ids": [ - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0x0f9d9d1cce530c91f075455efef2d9386375df3d", - "0xc88b0e9cbfdffc1ceac078321442d546874eb3ef", - "0x4572f2554421bd64bef1c22c8a81840e8d496bea", - "0xa5910940b97b7b8771a01b202583fd9331cb8be3", - "0x340a5a2f73ebaa181ec2826802fdf8ed21fc759a", - "0x5311b0bfd1eb656522ef75ea4d22ce8bcfa6fd42", - "0xeeb82fa092e3cecb1ba99f8342775b70efb40cf8", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0x21e7fd84385d47076208ca3ba993ecf292691394", - "0x080bf510fcbf18b91105470639e9561022937712", - "0xc486ad2764d55c7dc033487d634195d6e4a6917e", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0xc45a95642bc59df699364237b80057eadc8d8a14", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0xc50cb225e0f45e814fd41bcb3a120463ab1f04c3", - "0x1373e57f764a7944bdd7a4bd5ca3007d496934da", - "0x660f30293df5e2506b6a2e09ce64c1454eebd9a4" - ], - "projects": [ - "bancor", - "balancer", - "uniswap", - "airswap", - "0x API" - ], - "seven_day_volume": 11388980.237265486, - "seven_day_volume_liquidity_ratio": 6513.933534721894, - "thirty_day_volume": 72138393.39627787, - "token_a_address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "MKR-USDC", - "usd_liquidity": 34968.057861068526 - }, - { - "all_time_volume": 89589137146.34175, - "chain": "ethereum", - "one_day_volume": 1685868.3757632175, - "pool_ids": [ - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0x265b6d1a6c12873a423c177eba6dd2470f40a3b5", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0x07a6e955ba4345bae83ac2a6faa771fddd8a2011", - "0x9ca2a439810524250e543ba8fb6e88578af242bc", - "0x080bf510fcbf18b91105470639e9561022937712", - "0x7401b004f6e1553e33fd0e7a9eb67cba6daf94db", - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb" - ], - "projects": [ - "airswap", - "balancer", - "0x API", - "uniswap", - "pancakeswap", - "sushiswap", - "bancor" - ], - "seven_day_volume": 12018847.068346124, - "seven_day_volume_liquidity_ratio": 2586.896740382245, - "thirty_day_volume": 77636591.14741129, - "token_a_address": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "MATIC-USDC", - "usd_liquidity": 51106.53072772908 - }, - { - "all_time_volume": 89563986580.13017, - "chain": "ethereum", - "one_day_volume": 1683159.3662283886, - "pool_ids": [ - "0x94512fd4fb4feb63a6c0f4bedecc4a00ee260528", - "0xeeb82fa092e3cecb1ba99f8342775b70efb40cf8", - "0xd82fa167727a4dc6d6f55830a2c47abbb4b3a0f8", - "0x9ca2a439810524250e543ba8fb6e88578af242bc", - "0xeef417e1d5cc832e619ae18d2f140de2999dd4fb", - "0x61935cbdd02287b511119ddb11aeb42f1593b7ef", - "0xc549a5c701cb6e6cbc091007a80c089c49595468", - "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "0x522d6f36c95a1b6509a14272c17747bbb582f2a6", - "0x72a8f00913226b49e63cb7f27bc31ee5cfd09646", - "0x080bf510fcbf18b91105470639e9561022937712", - "0x674e114dad81838d151d9beda2271228eeae0e8b", - "0xdceaf5d0e5e0db9596a47c0c4120654e80b1d706" - ], - "projects": [ - "dodo", - "balancer", - "pancakeswap", - "bancor", - "0x API", - "airswap", - "uniswap" - ], - "seven_day_volume": 12000822.608613955, - "seven_day_volume_liquidity_ratio": 69472.9287573257, - "thirty_day_volume": 77411144.88987997, - "token_a_address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9", - "token_b_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "token_pair": "AAVE-USDC", - "usd_liquidity": 2245.632891869851 - } - ] - } - }, - "metadata": { - "type": "object", - "description": "metadata about the results", - "example": { - "column_names": [ - "chain", - "token_pair", - "projects", - "pool_ids", - "token_a_address", - "token_b_address", - "one_day_volume", - "seven_day_volume", - "thirty_day_volume", - "all_time_volume", - "usd_liquidity", - "seven_day_volume_liquidity_ratio" - ], - "row_count": 10, - "result_set_bytes": 13594, - "total_row_count": 589932, - "total_result_set_bytes": 140805054, - "datapoint_count": 136, - "pending_time_millis": 3538, - "execution_time_millis": 10552 - } - }, - "next_uri": { - "type": "string", - "description": "URI to get the next set of results", - "example": "https://api.dune.com/api/v1/execution/01HW6N7VF1H7VYQ91GC0NP673E/results?filters=chain%3D%22base%22+AND+token_a_address+%3D+%270xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48%27+or+token_b_address+%3D+%270xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48%27&limit=10&offset=10&sort_by=all_time_volume+desc" - }, - "next_offset": { - "type": "integer", - "description": "Offset to get the next set of results", - "example": 10 - } - } - } - } - } - }, - "400": { - "description": "Bad Request - The request could not be understood by the server due to malformed syntax or validation failure.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Core request validation failed, make sure you've given required columns and followed formatting rules for the CSV (no special characters or digits in column names)" - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedError" - } - } - } - }, - "500": { - "description": "Internal server error occurred. This usually happens due to unexpected issues in processing the request. It may include errors such as failure in core API execution, invalid query parameters, or issues with the customer data provided.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalServerError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "UnauthorizedError": { - "type": "object", - "properties": { - "error": { - "type": "string", - "description": "401 unauthorized error for invalid API key", - "example": "invalid API Key" - } - } - }, - "NotFoundError": { - "type": "object", - "properties": { - "error": { - "type": "string", - "description": "Error message for resource not found", - "example": "The requested resource was not found." - } - } - }, - "InternalServerError": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "internal error" - } - }, - "description": "Generic error message, given when an unexpected condition is encountered and no more specific message is available. Please consult the API documentation for more details." - } - } - } -} diff --git a/api-reference/projects/endpoint/linea_lxp.mdx b/api-reference/projects/endpoint/linea_lxp.mdx deleted file mode 100644 index 81899368d..000000000 --- a/api-reference/projects/endpoint/linea_lxp.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: 'Linea LXP' -openapi: 'GET /v1/points/linea/lxp' ---- - - -- Query powering this endpoint can be found [here](https://dune.com/queries/3672612) -- Scheduled to update daily -- Apply [filters](../../executions/filtering#filters) like WHERE, IN, AND/OR upon results -- Use a combination of `sort_by` and `limit` to grab a subset of results, see [pagination](../../executions/pagination) and [sorting](../../executions/sorting) for more info - - - -# Column Descriptions - -| Column | Description | Type | -| ----------------------- | ------------------------------------------------------- | --------------- | -| wallet | User wallet which holds LXP points | string | -| current_lxp | Current [Linea Voyage LXP](https://docs.linea.build/use-mainnet/linea-xp) balance | double | -| num_quests | Number of quests completed by the user to obtain LXP | integer | -| on_farcaster | Indicates if the wallet is connected to a Farcaster account | boolean | -| fid | Farcaster ID for the connected wallet user | integer | -| fname | Farcaster name for the connected wallet user | string | -| connected_wallets | List of wallet addresses connected to the user | array(string)| -| L14D_active_tier | The active tier of the connected wallet user over the last 14 days. Possible values are "vip", "influencer", "star", "active", "npc", and "not active" | string | -| top_channels | Top 3 channels where connected wallet user is active | array(string) | -| top_domains | Top 3 domains frequently casted by the connected wallet user | array(string) | -| top_engagers | Top 3 users who engage with this connected wallet user | array(string) | -| num_followers | Number of followers the connected wallet user has on Farcaster | integer | -| num_onchain_txns | Number of on-chain transactions performed by the connected wallet user | integer | -| days_old_onchain | Onchain age of the connected wallet users; days since the first onchain transaction | integer | -| nft_volume_usd | Volume of NFT transactions in USD of the connected wallet user | double | -| dex_volume_usd | Volume of DEX transactions in USD of the connected wallet user | double | -| contracts_deployed | Number of smart contracts deployed by the connected wallet user | integer | -| times_contracts_called | Number of times the connected wallet user's deployed contracts were called | integer | diff --git a/api-reference/projects/introduction.mdx b/api-reference/projects/introduction.mdx deleted file mode 100644 index 19e1e114d..000000000 --- a/api-reference/projects/introduction.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Project Specific API" ---- - -Utilize Dune's dedicated APIs to access specific project, protocol, or topic data with ease—no SQL required. - - -- **JSON Format**: All endpoints deliver JSON-formatted data for straightforward integration. -- **Instant Access**: Begin immediately by [creating a free account](https://dune.com/auth/register) and [obtain an API key](.././overview/authentication). -- **Expansive Data Ecosystem**: Enhance your projects by connecting with an extensive range of onchain and offchain data, from [Farcaster](.././farcaster/introduction) to [DEX](.././dex/endpoint/dex_pair) and more. Build alongside with our vibrant community. - - - - - Get LXP balance for wallet, along with social and on-chain behavior stats - - - - -
- -To custom-build an API endpoint with SQL query, watch [this short video](https://youtu.be/o29ig849qMY) and [get started here](.././quickstart/results-eg)! diff --git a/api-reference/tables/endpoint/clear.mdx b/api-reference/tables/endpoint/clear.mdx deleted file mode 100644 index 9a8eaed3a..000000000 --- a/api-reference/tables/endpoint/clear.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: 'Clear Data' -openapi: 'POST /v1/table/{namespace}/{table_name}/clear' ---- - - -**DEPRECATED**: This endpoint has been deprecated and will be removed on **March 1, 2026**. -Please use the new endpoint: [`POST /v1/uploads/:namespace/:table_name/clear`](./uploads-clear) - -See the [Migration Guide](./migration) for details on migrating to the new endpoints. - - -The `Clear` endpoint removes all the data in the specified table, but does not delete the table. - - - -```bash curl -curl --request POST \ - --url https://api.dune.com/api/v1/table/my_user/interest_rates/clear \ - --header 'X-DUNE-API-KEY: ' -``` - - -```python Python -import requests - -url = "https://api.dune.com/api/v1/table/my_user/interest_rates/clear" - -headers = { - "X-DUNE-API-KEY": "" -} - -response = requests.request("POST", url, data=data, headers=headers) -``` - - diff --git a/api-reference/tables/endpoint/create.mdx b/api-reference/tables/endpoint/create.mdx deleted file mode 100644 index 1e8cfce9d..000000000 --- a/api-reference/tables/endpoint/create.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: 'Create Table' -openapi: 'POST /v1/table/create' ---- - - -**DEPRECATED**: This endpoint has been deprecated and will be removed on **March 1, 2026**. -Please use the new endpoint: [`POST /v1/uploads`](./uploads-create) - -See the [Migration Guide](./migration) for details on migrating to the new endpoints. - - -The resulting table will be empty, and can be inserted into with the [/insert endpoint](./insert). - - -- If a table already exists with the same name, the request will fail. -- Column names in the table can't start with a special character or a digit. -- Each successful table creation consumes 10 credits. -- To delete a table, you can go to `user settings (dune.com) -> data -> delete` or use the [/delete endpoint](./delete). - - -## Schema -You need to define the schema of your data by providing `schema` array of columns in the request. Each column has three parameters: - -**name**: the name of the field - -**type**: the data type of the field - Dune supports [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp format - -**nullable**: if the column is nullable (true/false, true by default) - - - -```bash curl -curl --request POST \ - --url https://api.dune.com/api/v1/table/create \ - --header 'X-DUNE-API-KEY: ' \ - --header 'Content-Type: application/json' \ - --data '{ - "namespace":"my_user", - "table_name":"interest_rates", - "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - "is_private": false, - "schema": [{"name": "date", "type": "timestamp"}, {"name": "dgs10", "type": "double", "nullable": true}] -}' -``` - -```python Python SDK -from dune_client.client import DuneClient - -dune = DuneClient() - -table = dune.create_table( - namespace="my_user", - table_name="interest_rates", - description="10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - schema= [ - {"name": "date", "type": "timestamp"}, - {"name": "dgs10", "type": "double", "nullable": True} - ], - is_private=False -) -``` - -```typescript TS SDK -import { DuneClient, ColumnType } from "@duneanalytics/client-sdk"; - -client = new DuneClient(process.env.DUNE_API_KEY!); -const result = await client.table.create({ - namespace: "my_user", - table_name: "interest_rates", - schema: [ - {"name": "date", "type": ColumnType.Timestamp}, - {"name": "dgs10", "type": ColumnType.Double} - ] -}); -``` - -```python Python -import requests - -url = "https://api.dune.com/api/v1/table/create" - -payload = { - "namespace": "my_user", - "table_name": "interest_rates", - "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - "schema": [{"name": "date", "type": "timestamp"}, {"name": "dgs10", "type": "double", "nullable": True}], - "is_private": False -} - -headers = { - "X-DUNE-API-KEY": "", - "Content-Type": "application/json" -} - - -response = requests.request("POST", url, json=payload, headers=headers) -``` - -```javascript Javascript -const url = "https://api.dune.com/api/v1/table/create"; - -const payload = { - "namespace": "my_user", - "table_name": "interest_rates", - "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - "schema": [{"name": "date", "type": "timestamp"}, {"name": "dgs10", "type": "double", "nullable": true}], - "is_private": false -}; - -const headers = { - "X-DUNE-API-KEY": "", - "Content-Type": "application/json" -}; - -fetch(url, { - method: 'POST', - headers: headers, - body: JSON.stringify(payload) -}) -.then(response => response.json()) -.then(response => console.log(response)) -.catch(err => console.error(err)); -``` - diff --git a/api-reference/tables/endpoint/delete.mdx b/api-reference/tables/endpoint/delete.mdx deleted file mode 100644 index b360b50a5..000000000 --- a/api-reference/tables/endpoint/delete.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: 'Delete Table' -openapi: 'DELETE /v1/table/{namespace}/{table_name}' ---- - - -**DEPRECATED**: This endpoint has been deprecated and will be removed on **March 1, 2026**. -Please use the new endpoint: [`DELETE /v1/uploads/:namespace/:table_name`](./uploads-delete) - -See the [Migration Guide](./migration) for details on migrating to the new endpoints. - - - -- You must be an admin to delete the table. -- You can also delete a table through `user settings (dune.com) -> data -> delete`. -- Deleting a table does not incur credits. - - - - -```bash curl -curl --request DELETE \ - --url https://api.dune.com/api/v1/table/my_user/interest_rates \ - --header 'X-DUNE-API-KEY: ' -``` - -```python Python SDK -from dune_client.client import DuneClient - -dune = DuneClient() - -table = dune.delete_table( - namespace="my_user", - table_name="interest_rates" -) -``` - -```typescript TS SDK -import { DuneClient } from "@duneanalytics/client-sdk"; - -client = new DuneClient(process.env.DUNE_API_KEY!); -const result = await client.table.delete({ - namespace: "my_user", - table_name: "interest_rates", -}); -``` - -```python Python -import requests - -url = "https://api.dune.com/api/v1/table/my_user/interest_rates" - -headers = { - "X-DUNE-API-KEY": "" -} - -response = requests.request("DELETE", url, headers=headers) -``` - -```javascript Javascript -const url = "https://api.dune.com/api/v1/table/my_user/interest_rates"; - -const headers = { - "X-DUNE-API-KEY": "" -}; - -fetch(url, { - method: 'DELETE', - headers: headers -}) -.then(response => response.json()) -.then(response => console.log(response)) -.catch(err => console.error(err)); -``` - - diff --git a/api-reference/tables/endpoint/insert.mdx b/api-reference/tables/endpoint/insert.mdx deleted file mode 100644 index 4c3d780a8..000000000 --- a/api-reference/tables/endpoint/insert.mdx +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: 'Insert Data' -openapi: 'POST /v1/table/{namespace}/{table_name}/insert' ---- - - -**DEPRECATED**: This endpoint has been deprecated and will be removed on **March 1, 2026**. -Please use the new endpoint: [`POST /v1/uploads/:namespace/:table_name/insert`](./uploads-insert) - -See the [Migration Guide](./migration) for details on migrating to the new endpoints. - - -To be able to insert into a table, it must have been created with the [/create endpoint](./create). - - -- The data in the files must conform to the schema, and must use the same column names as the schema. -- One successful `/insert` request consumes 1 credits. -- The maximum request size is 1.2GB - - -## Consistency -A request to this endpoint has two possible outcomes: Either all of the data in the request was inserted, or none of it was. -It's not possible for parts of the request data to be inserted, while the rest is not inserted. -In other words, please use and trust the status codes that the endpoint returns. -A status code of 200 means that the data in the request was successfully inserted. -If you get any other status code, you can safely retry your request after addressing the issue that the error message indicated. - -## Concurrent requests -A limited number of concurrent insertion requests per table is supported. However, there will be a slight performance penalty as we serialize the writes behind the scenes to ensure data integrity. Larger number of concurrent requests per table may result in an increased number of failures. Therefore, we recommend managing your requests within a 5-10 threshold to maintain optimal performance. - -## Supported filetypes -### CSV files (`Content-Type: text/csv`) -CSV files must use a comma as delimiter, and the column names in the header must match the column names of the table. - -### JSON files (`Content-Type: application/x-ndjson`) -These are files where each line is a complete JSON object which creates one table row. -Each line must have keys that match the column names of the table. - -## Data types -DuneSQL supports a variety of types which are not natively supported in many data exchange formats. Here we provide guidance on how to work with such types. -### Varbinary values -When uploading varbinary data using JSON or CSV formats, you need to convert the binary data into a textual representation. Reason being, JSON or CSV don't natively support binary values. There are many ways to transform binary data to a textual representation. We support **hexadecimal** and **base64** encodings. - -#### base64 -Base64 is a binary-to-text encoding scheme that transforms binary data into a sequence of characters. All characters are taken from a set of 64 characters. - -Example: `{"varbinary_column":"SGVsbG8gd29ybGQK"}` - -#### hexadecimal -In the hexadecimal representation input data should contain an even number of characters in the range `[0-9a-fA-F]` always prefixed with `0x`. - -Example: `{"varbinary_column":"0x92b7d1031988c7af"}` - - -```bash curl -curl --request POST \ - --url https://api.dune.com/api/v1/table/my_user/interest_rates/insert \ - --header 'X-DUNE-API-KEY: ' \ - --header 'Content-Type: text/csv' \ - --upload-file interest_rates.csv -``` - -```python Python SDK -from dune_client.client import DuneClient - -dune = DuneClient() - -with open("./interest_rates.csv", "rb") as data: - response = dune.insert_table( - namespace="my_user", - table_name="interest_rates", - data=data, - content_type="text/csv" - ) -``` - -```typescript TS SDK -import * as fs from "fs/promises"; -import { DuneClient, ContentType } from "@duneanalytics/client-sdk"; - -client = new DuneClient(process.env.DUNE_API_KEY!); -const data = await fs.readFile("./sample_table_insert.csv"); -// Or JSON -// const data: Buffer = await fs.readFile("./sample_table_insert.json"); - -const result = await client.table.insert({ - namespace: "my_user", - table_name: "interest_rates", - data, - content_type: ContentType.Csv, // or ContentType.Json -}); -``` - -```python Python -import requests - -url = "https://api.dune.com/api/v1/table/my_user/interest_rates/insert" - -headers = { - "X-DUNE-API-KEY": "", - "Content-Type": "text/csv" -} - -with open("./interest_rates.csv", "rb") as data: - response = requests.request("POST", url, data=data, headers=headers) -``` - - -```javascript Javascript -const url = "https://api.dune.com/api/v1/table/my_user/interest_rates/insert"; - -const headers = { - "X-DUNE-API-KEY": "", - "Content-Type": "text/csv" -}; - -fs.readFile('./interest_rates.csv', (err, data) => { - if (err) { - console.error(err); - return; - } - - fetch(url, { - method: 'POST', - headers: headers, - body: data - }) - .then(response => response.json()) - .then(response => console.log(response)) - .catch(err => console.error(err)); -}); -``` - diff --git a/api-reference/tables/endpoint/list.mdx b/api-reference/tables/endpoint/list.mdx deleted file mode 100644 index 067baa3b7..000000000 --- a/api-reference/tables/endpoint/list.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: "List Tables" -openapi: "GET /v1/tables" -description: "Get a paginated list of uploaded tables" ---- - - -**DEPRECATED**: This endpoint has been deprecated and will be removed on **March 1, 2026**. -Please use the new endpoint: [`GET /v1/uploads`](./uploads-list) - -See the [Migration Guide](./migration) for details on migrating to the new endpoints. - - -## Description - -Retrieves a paginated list of tables uploaded by the user or their team. - -## Pagination - -Use the `limit` and `offset` parameters to paginate through large result sets: - -- To get the first 20 tables: `?limit=20&offset=0` -- To get the next 20 tables: `?limit=20&offset=20` -- Continue incrementing `offset` by `limit` to get subsequent pages - - -## Pricing - -This is a metadata endpoint and does not consume credits. - -## Related Endpoints - -- [Create Table](/api-reference/tables/endpoint/create) - Create a new table -- [Upload Data](/api-reference/tables/endpoint/upload) - Upload data to a table -- [Delete Table](/api-reference/tables/endpoint/delete) - Delete a table - - - -```bash cURL -curl -X GET "https://api.dune.com/api/v1/tables?limit=10&offset=0" \ - -H "X-DUNE-API-KEY: YOUR_API_KEY" -``` - -```python Python -import requests - -url = "https://api.dune.com/api/v1/tables" -params = { - "limit": 10, - "offset": 0 -} -headers = {"X-DUNE-API-KEY": "YOUR_API_KEY"} - -response = requests.get(url, params=params, headers=headers) -print(response.json()) -``` - -```javascript JavaScript -const url = 'https://api.dune.com/api/v1/tables'; -const params = new URLSearchParams({ - limit: 10, - offset: 0 -}); - -const response = await fetch(`${url}?${params}`, { - headers: { - 'X-DUNE-API-KEY': 'YOUR_API_KEY' - } -}); - -const data = await response.json(); -console.log(data); -``` - - - - - -```json Example Response -{ - "tables": [ - { - "full_name": "dune.dune.ai_contract_tags", - "is_private": true, - "table_size_bytes": "1152622", - "created_at": "2024-05-15T20:34:58.585Z", - "updated_at": "2024-05-16T21:19:02.459Z", - "purged_at": null, - "owner": { - "handle": "dune", - "type": "team" - }, - "columns": [ - { - "name": "blockchain", - "type": "string", - "nullable": false, - "metadata": { - "description": "Blockchain associated with the record", - "filtering_column": true - } - }, - { - "name": "contract_address", - "type": "string", - "nullable": false, - "metadata": { - "description": "Address of the smart contract" - } - } - ] - } - ] -} -``` - - diff --git a/api-reference/tables/endpoint/upload.mdx b/api-reference/tables/endpoint/upload.mdx deleted file mode 100644 index faab3b02d..000000000 --- a/api-reference/tables/endpoint/upload.mdx +++ /dev/null @@ -1,242 +0,0 @@ ---- -title: 'Upload CSV' -openapi: 'POST /v1/table/upload/csv' ---- - - -**DEPRECATED**: This endpoint has been deprecated and will be removed on **March 1, 2026**. -Please use the new endpoint: [`POST /v1/uploads/csv`](./uploads-csv) - -See the [Migration Guide](./migration) for details on migrating to the new endpoints. - - - -Consider using the [`/create`](./create) and [`/insert`](./insert) endpoints if you want more flexibility, performance, and the ability to append. - - - -You can also upload CSV through the [Dune UI](https://dune.com/) by pressing the "create" dropdown. - - - -For working with uploads, keep in mind that: -- File has to be < 200 MB -- Column names in the table can't start with a special character or digits. -- Private uploads require a Premium subscription. -- If you upload to an existing table name, it will delete the old data and overwite it with your new data. Appends are only supported for the `/create`, `/insert` endpoints. -- To delete an upload table, you must go to `user settings (dune.com) -> data -> delete`. - -If you have larger datasets you want to upload, please [contact us here](https://docs.google.com/forms/d/e/1FAIpQLSekx61WzIh-MII18zRj1G98aJeLM7U0VEBqaa6pVk_DQ7lq6Q/viewform) - - - - -```bash curl -curl --request POST \ - --url https://api.dune.com/api/v1/table/upload/csv \ - --header 'Content-Type: application/json' \ - --header 'X-DUNE-API-KEY: ' \ - --data '{ - "data": "DATE,DGS10,\n2023-12-04,4.28,\n2023-12-05,4.18,\n2023-12-06,4.12,\n2023-12-07,4.14,\n2023-12-08,4.23,\n2023-12-11,4.23", - "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - "table_name": "ten_year_us_interest_rates", - "is_private": false -}' -``` - -```python Python SDK -from dune_client.client import DuneClient - -dune = DuneClient() - -file_path = r'/data/example.csv' -with open(file_path) as file: - data = file.read() - -table = dune.upload_csv( - data=str(data), - description="10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - table_name="ten_year_us_interest_rates", - is_private=False -) -``` - -```typescript TS SDK -import * as fs from "fs/promises"; -import { DuneClient, ContentType } from "@duneanalytics/client-sdk"; - -client = new DuneClient(process.env.DUNE_API_KEY!); -const data = await fs.readFile("./sample_table_insert.csv"); - -const result = await client.table.uploadCsv({ - table_name: "ten_year_us_interest_rates", - description: "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - data, - is_private: false, -}); -``` - -```python Python -import requests - -url = "https://api.dune.com/api/v1/table/upload/csv" - -payload = { - "data": "DATE,DGS10,\n2023-12-04,4.28,\n2023-12-05,4.18,\n2023-12-06,4.12,\n2023-12-07,4.14,\n2023-12-08,4.23,\n2023-12-11,4.23", - "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", - "table_name": "ten_year_us_interest_rates", - "is_private": False -} -headers = { - "X-DUNE-API-KEY": "", - "Content-Type": "application/json" -} - -response = requests.request("POST", url, json=payload, headers=headers) - -print(response.text) -``` - -```javascript Javascript -const options = { - method: 'POST', - headers: {'X-DUNE-API-KEY': '', 'Content-Type': 'application/json'}, - body: '{"data":"DATE,DGS10,\n2023-12-04,4.28,\n2023-12-05,4.18,\n2023-12-06,4.12,\n2023-12-07,4.14,\n2023-12-08,4.23,\n2023-12-11,4.23","description":"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10","table_name":"ten_year_us_interest_rates","is_private":false}' -}; - -fetch('https://api.dune.com/api/v1/table/upload/csv', options) - .then(response => response.json()) - .then(response => console.log(response)) - .catch(err => console.error(err)); -``` - -```go Go -package main - -import ( - "fmt" - "strings" - "net/http" - "io/ioutil" -) - -func main() { - - url := "https://api.dune.com/api/v1/table/upload/csv" - - payload := strings.NewReader("{\n \"data\": \"DATE,DGS10,\\n2023-12-04,4.28,\\n2023-12-05,4.18,\\n2023-12-06,4.12,\\n2023-12-07,4.14,\\n2023-12-08,4.23,\\n2023-12-11,4.23\",\n \"description\": \"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10\",\n \"table_name\": \"ten_year_us_interest_rates\",\n \"is_private\": false\n}") - - req, _ := http.NewRequest("POST", url, payload) - - req.Header.Add("X-DUNE-API-KEY", "") - req.Header.Add("Content-Type", "application/json") - - res, _ := http.DefaultClient.Do(req) - - defer res.Body.Close() - body, _ := ioutil.ReadAll(res.Body) - - fmt.Println(res) - fmt.Println(string(body)) - -} -``` - -```php PHP - "https://api.dune.com/api/v1/table/upload/csv", - CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => "", - CURLOPT_MAXREDIRS => 10, - CURLOPT_TIMEOUT => 30, - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, - CURLOPT_CUSTOMREQUEST => "POST", - CURLOPT_POSTFIELDS => "{\n \"data\": \"DATE,DGS10,\\n2023-12-04,4.28,\\n2023-12-05,4.18,\\n2023-12-06,4.12,\\n2023-12-07,4.14,\\n2023-12-08,4.23,\\n2023-12-11,4.23\",\n \"description\": \"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10\",\n \"table_name\": \"ten_year_us_interest_rates\",\n \"is_private\": false\n}", - CURLOPT_HTTPHEADER => [ - "Content-Type: application/json", - "X-DUNE-API-KEY: " - ], -]); - -$response = curl_exec($curl); -$err = curl_error($curl); - -curl_close($curl); - -if ($err) { - echo "cURL Error #:" . $err; -} else { - echo $response; -} -``` - -```java Java -HttpResponse response = Unirest.post("https://api.dune.com/api/v1/table/upload/csv") - .header("X-DUNE-API-KEY", "") - .header("Content-Type", "application/json") - .body("{\n \"data\": \"DATE,DGS10,\\n2023-12-04,4.28,\\n2023-12-05,4.18,\\n2023-12-06,4.12,\\n2023-12-07,4.14,\\n2023-12-08,4.23,\\n2023-12-11,4.23\",\n \"description\": \"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10\",\n \"table_name\": \"ten_year_us_interest_rates\",\n \"is_private\": false\n}") - .asString(); -``` - - - - -### Upload via google sheet - -To automate the upload of a Google Sheet's contents to Dune via API, use the following Google Apps Script: - -```javascript -function uploadToDune() { - var apiKey = "YOUR_DUNE_API_KEY"; // Replace with your actual Dune API key, keep the quotes - var tableName = "example_table"; // Update with your desired table name - var description = "Example table description"; - - var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); - var range = sheet.getDataRange(); - var values = range.getValues(); - - // Convert data to CSV format - var csvData = ""; - for (var i = 0; i < values.length; i++) { - csvData += values[i].join(",") + "\n"; - } - - var payload = { - data: csvData.trim(), - description: description, - table_name: tableName, - is_private: false - }; - - var options = { - method: "post", - contentType: "application/json", - headers: { - "X-DUNE-API-KEY": apiKey - }, - payload: JSON.stringify(payload) - }; - - var response = UrlFetchApp.fetch("https://api.dune.com/api/v1/table/upload/csv", options); - Logger.log(response.getContentText()); -} -``` - -Steps to Use: - -1. Open your Google Sheet -2. Navigate to Extensions → Apps Script -3. Replace the script with the code above -4. Save and run uploadToDune -5. (Optional) For easier execution, you can assign this script to a button in your Google Sheet: - - Click "Insert" in the Google Sheets menu - - Select "Drawing" - - Create a button shape and add text like "Upload to Dune" - - Click "Save and Close" - - Right-click the button and select "Assign script" - - Enter "uploadToDune" as the function name -6. Clicking the button will now upload your active sheet's data to Dune!