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.

你可能也喜歡

白宫让步扫清伦理障碍,Clarity Act赶上休会前最后的时间窗口?

北京时间7月21日,据多位消息人士透露,特朗普政府已在《数字资产市场结构法案》(Clarity Act)中同意加入伦理条款,并已将文本提交给部分参议院共和党议员。此举被视为扫清了该法案推进的最后主要障碍之一。同时,白宫数字资产顾问委员会执行主任Patrick Witt确认留任,将继续推动法案完成最后冲刺。 Clarity Act旨在为美国数字资产市场建立统一的联邦监管框架,核心目标是明确数字资产的法律属性,并划分美国证券交易委员会(SEC)与商品期货交易委员会(CFTC)的监管职责。法案将数字资产分类监管,以期结束SEC与CFTC长期的监管权争夺,为行业提供明确的合规路径。 过去一年,法案的谈判分歧主要集中在稳定币收益规则、DeFi监管边界以及政府官员与加密行业的利益冲突(即伦理问题)三方面。目前前两大分歧已基本解决,伦理条款成为最后的关键争议点。白宫的让步为法案在参议院获得两党支持并最终表决创造了可能。 然而,法案面临紧迫的时间窗口。美国国会预计在8月中旬进入夏季休会期,留给参议院审议的时间仅剩十几个工作日。行业游说组织美国区块链协会CEO表示,未来几周是关键时刻,若伦理争议得以解决,法案有望在休会前取得突破;否则可能需等待新的政治时机。 如果Clarity Act能成功通过,它将成为美国乃至全球加密货币监管的一个重要转折点,为数字资产市场提供更清晰、稳定的制度框架,降低监管不确定性,并为传统资本进入该领域奠定基础。

Odaily星球日报15 分鐘前

白宫让步扫清伦理障碍,Clarity Act赶上休会前最后的时间窗口?

Odaily星球日报15 分鐘前

AI时代、产业革命与未来文明访谈——张丁文:未来不属于追赶者

本文是对90后科技企业家张丁文的专访。他强调,决定企业命运的并非短期风口,而是时代演进的方向。真正的创业者应关注人与数字世界连接方式的根本变化,而非追逐热点。 回顾创业历程,张丁文认为早期摄影社区项目的经历教会他重要一课:用户价值不等同于商业价值,可持续的商业模式至关重要。他将创业视为不断刷新自我认知的过程,企业的边界取决于创始人的认知格局。 面对未来,张丁文将重心从单一产品转向寻找下一代生态“入口”。他深度布局智能穿戴领域,认为智能硬件如手表的价值远超越硬件本身,在于其作为连接健康、支付、社交等服务的平台潜力,是建立长期用户关系、承载复合属性的生态容器。企业的竞争最终是成为用户不可或缺的信任入口。 张丁文进一步将思考提升至产业与文明层面。他认为,企业的发展会经历产品竞争、平台竞争,最终是“文明竞争”,即定义未来运行规则的能力。真正伟大的企业致力于解决时代问题,推动社会效率与公平,其最深的护城河是价值观与长期积累的信任。 他表示,财富只是价值的计量单位,而非目标。下一代企业家不仅需要经营能力,更需要广阔的世界观,在复杂变化中坚持长期主义,保持学习和进化。企业的终极意义在于创造持久的社会价值,成为时代进步的推动者。

marsbit26 分鐘前

AI时代、产业革命与未来文明访谈——张丁文:未来不属于追赶者

marsbit26 分鐘前

交易

現貨
活动图片