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.

你可能也喜欢

当AI开始审计世界:从Claude发现ZEC漏洞,看加密行业正在进入“递归安全时代”

人工智能正从生产力工具演变为复杂系统的分析者与参与者,其影响正从研发领域延伸至安全领域。近期,Anthropic提出了“递归自我改进”概念,揭示AI已开始协助人类进行模型研发、代码优化等环节,形成加速自身发展的飞轮效应。几乎同时,Claude AI在审计Zcash代码时发现了一个零知识证明系统中的关键漏洞,并促使团队快速修复。这一事件超越了单纯的技术发现,它标志着AI开始深度参与理解、分析和验证复杂系统,尤其可能重塑区块链安全范式。 传统的区块链安全高度依赖人工审计与有限工具,面对日益增长的系统复杂度存在瓶颈。AI,特别是大模型,擅长处理海量信息与复杂逻辑关联,能大幅降低风险发现成本、缩短漏洞存在时间,使安全从阶段性检查转向持续监测与响应。这种由AI与人类专家协同驱动、具备持续反馈与进化能力的机制,可被称为“递归安全”。 安全行业因其需在庞杂系统中定位少数异常点的特性,成为AI能力释放的优先领域。AI不会消除风险,而是加速了整个攻防体系的信息处理效率,对防御方和攻击方能力均有提升。未来,安全的关键可能不再是漏洞数量,而在于风险发现速度、修复效率及系统韧性。行业竞争维度将转向构建持续的风险管理能力。Claude发现ZEC漏洞正是这一趋势的早期信号,预示着一个由AI驱动、持续演化的“递归安全时代”正在开启。

marsbit24分钟前

当AI开始审计世界:从Claude发现ZEC漏洞,看加密行业正在进入“递归安全时代”

marsbit24分钟前

从 MSTR 到 STRC+:Strategy 宇宙的尽头在哪里

摘要:本文探讨了Strategy公司(前身为MicroStrategy)如何从一家持有大量比特币的上市公司,演变为围绕比特币构建复杂金融产品和链上信用体系的生态。公司核心在于通过发行普通股(MSTR)、永续优先股(STRC)及其他结构化工具,将比特币持仓转化为不同风险、久期和收益偏好的金融产品,并尝试将这些传统市场的现金流引入DeFi(如Saturn和Apyx协议),以创造链上稳定币收益。 文章分析了MSTR的估值飞轮依赖于比特币价格上涨和资本市场给予的溢价(mNAV),但其弱点在于受市场情绪、融资成本和比特币价格波动的多重制约。重点剖析了STRC作为高收益信用工具的风险来源:其股息支付能力根本上取决于比特币资产缓冲的厚度、公司的现金管理能力以及市场对整体叙事的信心。在极端市场条件下,STRC可能面临价格脱锚风险。 最后,文章展望了Strategy生态的三种可能前景:乐观情况下成为连接比特币、传统资本与DeFi的信用基础设施;中性情况下作为高风险高收益的细分产品存在;悲观情况下则在市场压力下回归为纯粹的比特币信用风险资产。其终极边界在于市场是否长期接受以比特币为抵押基础、以上市公司为中介、以优先股股息为收益来源的整套新信用体系。

marsbit43分钟前

从 MSTR 到 STRC+:Strategy 宇宙的尽头在哪里

marsbit43分钟前

交易

现货
合约
活动图片