Agentic Workflows for Crypto Research

insights.glassnode發佈於 2026-04-01更新於 2026-04-01

文章摘要

AI coding agents are transforming crypto research by automating data analysis through natural language. This article demonstrates using an agent (like Claude Code) with the Glassnode CLI to test a hypothesis: whether extreme Bitcoin exchange inflows predict 7-day price drawdowns. The agent autonomously discovers metrics, fetches data, performs statistical analysis, and generates insights. Results show a moderate association—spike days saw ~1.9% greater drawdowns—though the sample is small. A follow-up prompt produces visualizations for validation. The workflow allows rapid iteration and is applicable to various research questions using Glassnode data, requiring only an API key and an AI agent.

AI coding agents are changing the way analysts and researchers interact with data. Instead of writing scripts line by line, you provide a hypothesis or research question to an AI agent and – it writes the code, fetches the data, runs the analysis, and returns results.

In this article we present a step-by-step real-world example: Asking an AI agent to download data via the Glassnode CLI, run a statistical analysis, and generate publication-ready charts, all from natural-language prompts.

What you will need

  1. Access to an AI agent

We use Claude Code in this walkthrough, but any agent able to execute Python and shell commands will work, including ChatGPT's Codex, Cursor, Github Copilot, Google Gemini CLI, OpenClaw, or similar tools.

  1. The Glassnode CLI (gn)

A command-line interface for the Glassnode API. Install it and configure your API key by following the Glassnode CLI docs. An API key is required.

The prompt

We will evaluate the following hypothesis: Extreme BTC exchange inflow events are predictive of 7-day forward drawdowns. To do that, we will instruct Claude Code using the following prompt:

Using the Glassnode CLI, download BTC daily exchange inflows and closing price for the last year. Analyze whether inflow spikes (days with inflows > 2 standard deviations above the mean) predict drawdowns in the following 7 days. Show me a summary with statistics and results.

That's it. One sentence describing the question, and another sentence defining the methodology. The agent takes it from there.

A simple prompt for the AI agent

What the agent does

Behind the scenes, the agent executes a sequence of steps:

  1. Discovers the right metrics by running gn metric list and gn metric describe to find the correct metric paths and valid parameters.
  2. Downloads the data via gn metric get, saving CSV files for both exchange inflows (transactions/transfers_volume_to_exchanges_sum) and closing price (market/price_usd_close).
  3. Writes and runs a Python analysis that computes the spike threshold, identifies spike days, calculates forward 7-day max drawdowns, and compares spike days to normal days.

The agent comes back with a readable summary:

While this is just an illustrative example, our experiment does reveal a moderate association between exchange inflow spikes and subsequent drawdowns. Spike days see roughly 1.9 percentage points more drawdown on average. That said, with only 10 spike days in the sample and the effect concentrated in two volatile periods, the signal is suggestive rather than statistically robust. A rigorous backtest would need to account for overlapping windows, control for volatility regimes, use point-in-time data, and validate out-of-sample.

Visualizing the results

Visualizing the data is a good way to validate whether the numbers hold up. In this process, a simple follow-up prompt is enough:

Create a visualization that shows the data as a timeseries.

From here, you can keep iterating: adjust the chart, refine the analysis, or take the research in a different direction, all through natural language conversation.

The AI-generated visualisation of Glassnode data

Get started with AI Crypto Research on Glassnode Data

The Glassnode CLI requires an API key, available to Glassnode Professional subscribers.

  1. Install the Glassnode CLI and configure your API key. See documentation
  2. Open your preferred AI coding agent (Claude Code, Codex, Cursor, Gemini CLI, OpenClaw, etc.)
  3. Start prompting. Try questions such as:
    • "Download ETH staking deposits for the last 6 months and plot the trend"
    • "Compare BTC and ETH exchange netflows over the last 90 days"
    • "Find which metric has the highest correlation with BTC 30-day returns"

The Glassnode CLI allows agents to discover and retrieve metric data without requiring manual API lookup or writing boilerplate code. Combined with an AI coding agent, the Glassnode CLI turns a research question into results in minutes.

相關問答

QWhat is the main advantage of using AI coding agents for crypto research as described in the article?

AThe main advantage is that AI coding agents automate the entire research workflow, allowing analysts to provide a natural-language hypothesis or research question, and the agent handles writing the code, fetching data, running analysis, and returning results, significantly speeding up the process.

QWhich specific AI agent is used in the walkthrough example for analyzing BTC exchange inflows?

AThe walkthrough uses Claude Code, but it notes that any AI agent capable of executing Python and shell commands, such as ChatGPT's Codex, Cursor, GitHub Copilot, Google Gemini CLI, or OpenClaw, would work.

QWhat hypothesis is tested in the example prompt given to the AI agent?

AThe hypothesis tested is: 'Extreme BTC exchange inflow events (days with inflows > 2 standard deviations above the mean) are predictive of 7-day forward drawdowns.'

QWhat are the key steps the AI agent performs behind the scenes after receiving the prompt?

AThe agent discovers the right metrics using Glassnode CLI commands, downloads the data (exchange inflows and closing price), writes and runs a Python analysis to compute spike thresholds and drawdowns, and returns a statistical comparison and summary.

QWhat is required to use the Glassnode CLI for AI-assisted research as mentioned in the article?

ATo use the Glassnode CLI, you need an API key, which is available to Glassnode Professional subscribers, and you must install and configure the CLI tool following the documentation.

你可能也喜歡

全球股市的风暴点:韩国股市的去杠杆已基本完成

近期韩国股市出现剧烈波动,KOSPI指数自6月高点最大回撤达32%,成为全球AI行情调整的“风暴中心”。文章指出,市场下跌的深层原因并非基本面恶化,而是由高度集中的杠杆资金结构所驱动。 具体来看,核心风险来源于两方面: 1. **杠杆ETF大规模去化**:前期规模一度接近500亿美元的杠杆ETF,其“每日再平衡”机制在下跌中引发了“股价下跌→强制平仓”的负向循环。目前其规模已从高点收缩约240亿美元,去化进度已达约75%,剩余压力显著收敛。监管层也已出台新规,从8月起严格限制此类产品,从源头降低风险。 2. **对冲基金快速降杠杆**:通过互换交易放大敞口的对冲基金,其多空持仓比率已从峰值显著回落,净多头水平显示杠杆已下降超过50%,最剧烈的被动去杠杆阶段基本完成。 相比之下,韩国居民融资余额占股市市值比重很小(约0.5%),且不具备强制平仓机制,难以成为系统性风险的核心来源。 综合而言,最容易引发“连锁抛售”的高杠杆结构已大部分出清,市场正从“流动性驱动的下跌”过渡到“基本面驱动的定价”。只要AI产业趋势未发生根本逆转,本轮调整更接近一次拥挤交易的集中出清,而非行情的终结。 文章最后强调,AI代表的硅基革命趋势不可逆,波动是参与趋势的成本而非风险。每一次调整都是在进行筹码结构的优化,并为认清趋势的投资者提供新的参与机会。

链捕手23 分鐘前

全球股市的风暴点:韩国股市的去杠杆已基本完成

链捕手23 分鐘前

自2024年以来推出的加密货币代币中,92.9%跌破发行价:CryptoRank

加密货币数据平台CryptoRank的最新研究显示,自2024年以来发行的加密货币代币中,有高达92.9%目前正低于其代币生成事件(TGE)时的初始价格。 该分析聚焦于市值超过1亿美元的项目,在2024年至2026年间发行的113个项目中,仅有8个仍保持在发行价之上,其余105个均已跌破。这意味着只有约7.1%的项目为投资者带来了正回报,而整体样本的中位数回报率低至-95.7%。 表现最突出的项目是Hyperliquid (HYPE),自TGE以来上涨了1,519%。其次是Ondo Finance (ONDO)、EverValue Coin (EVA)和Midnight Network (NIGHT),涨幅分别为101.4%、20.32%和16.50%。 数据表明,与过去市场周期中新股常持续上涨不同,当前投资者变得更加挑剔。资本正越来越集中于少数已证明其产品采用度、生态增长或强劲市场需求的项目。许多新代币难以维持初始估值。 这一趋势反映了市场关注点的转变:投资者愈发看重代币经济学、流通供应量、解锁时间表和长期实用性,而非仅关注上市初期的价格动能。 研究结果可能影响未来项目的发行策略。项目因过高的完全稀释估值(FDV)、上市初期流通量不足以及大量未来代币解锁计划而备受审视,这些因素都可能在新供应进入市场时对价格构成下行压力。因此,开发者和投资者未来或将更重视可持续的代币分发模式和长期的生态增长,而非激进的初始估值。

ambcrypto24 分鐘前

自2024年以来推出的加密货币代币中,92.9%跌破发行价:CryptoRank

ambcrypto24 分鐘前

交易

現貨
活动图片