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.

你可能也喜歡

a16z Crypto 合伙人:现金流就是护城河

a16z Crypto合伙人Jason Rosenthal认为,现金流本身就是最强大的护城河。历史上最成功的企业往往将自己置于“资金流”的关键节点,通过促进价值在网络中的创造与转移并抽取部分价值而成长。加密货币是首个为此原生构建的现代技术,它使资金能以互联网速度全球流动,并具备可编程性。 区块链本质上是网络型业务,天然具备网络效应。设计良好的代币能协调用户、开发者等各方利益,推动网络发展,并将价值按贡献分配回参与者。这种模式并非新生事物,从历史上的铁路、石油、电信,到如今的谷歌、Meta、AWS,成功的关键都是占据价值流动的枢纽位置。 传统金融服务(如支付、托管、借贷)利润丰厚,但其中存在大量可压缩的低效成本,这为加密初创公司提供了颠覆机会。加密创始人可以构建更高效、可编程、即时全球结算的新版本。此外,机会远不止于金融,在计算、AI数据、能源、太空等新兴领域,由于没有传统基础设施的包袱,更是构建全新资金流业务的蓝海。 文章建议创始人思考:你的业务是否处于资金流中?收入是否能随网络价值增长而同步增长?目标市场中哪里存在不合理的利润抽取?抓住这些机会,融入新的价值流动浪潮,企业就能随着网络效应累积而持续成长。

marsbit5 分鐘前

a16z Crypto 合伙人:现金流就是护城河

marsbit5 分鐘前

a16z Crypto 合伙人:现金流就是护城河

a16z Crypto运营合伙人Jason Rosenthal指出,历史上许多伟大企业的成功模式,在于将自己定位在“资金流”中——促进网络内价值的创造与转移,并从中抽取部分价值。加密货币是首个为此原生构建的现代技术,它使资金能以互联网速度全天候、全球结算并端到端可编程地流动。 区块链本质上是网络型企业,其共享账本和网络效应随着使用者的增加而增强。设计良好的代币能协调用户、开发者等各方利益,共同推动网络增长,并将价值按贡献比例分配。这种“处于资金流中”的模式并非新概念,从铁路、标准石油到谷歌、Meta和AWS都遵循此道——即找到价值流动的关键节点并置身其中。 金融市场的例子更为清晰:Visa通过处理支付流获取收入,顶级做市商通过占据订单流获得丰厚利润。它们的共同点是结合了资金流与网络效应,构成了持久强大的商业结构。 传统金融服务领域存在大量利润抽取环节(如高额支付手续费、托管费),这些高利润率正是创新者的机会。加密创始人可以构建更高效、可编程、全球化的下一代金融基础设施。此外,机会远不止于金融,在计算、AI数据、能源、太空等新兴全球价值流动领域,都有从头构建资金流业务的广阔空间。 文章最后向创始人提出三个关键问题:是否已处于资金流中?收入能否随平台价值增长而同步增长?目标市场中哪些环节的价值抽取率最高?鼓励创业者抓住机遇,融入新的价值潮流,借助网络效应实现增长。

链捕手10 分鐘前

a16z Crypto 合伙人:现金流就是护城河

链捕手10 分鐘前

交易

現貨
合約
活动图片