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如何重估旧基础设施?

过去被视为增长缓慢的“老牌科技股”,如戴尔、诺基亚、思科、康宁、西部数据等,近期因AI热潮而表现亮眼。这并非简单的市场炒作,而是AI发展进入实际部署阶段的必然结果。 此前,AI投资焦点集中在英伟达等算力核心和模型上。但随着AI从理论走向实践,大规模建设数据中心和部署应用需要完整的系统工程能力。这恰恰是老牌科技公司的优势所在。它们凭借几十年积累的客户、供应链、系统集成和交付经验,在AI基础设施建设中找到了新角色。 具体而言,市场主要从三条线重估这些公司:一是服务器与系统集成(如戴尔、HPE),它们扮演着将GPU等核心部件整合成完整AI服务器并交付的“总包商”角色;二是网络与连接(如康宁、诺基亚、思科),AI算力集群的高效运行极度依赖高速互联和光纤网络;三是存储(如西部数据、希捷),AI产生的海量数据(包括训练数据、日志、冷数据)催生了对高性价比大容量硬盘的持续需求。 真正的重估需要满足几个条件:明确的AI相关订单和收入增长、公司因此上调业绩指引、以及利润质量的同步改善。AI并不会让所有传统公司重生,它只筛选出那些真正卡位关键基础设施环节、并能将新需求转化为可持续利润的企业。这轮行情标志着AI进入真实建设期,市场开始为“谁能把AI基建建起来”的能力定价。

marsbit8 分鐘前

“老登股”变“新贵”:从戴尔到诺基亚,AI如何重估旧基础设施?

marsbit8 分鐘前

突发!Anthropic呼吁全员停止AI研究

人工智能公司Anthropic在其官方博客中发布重要观点,指出其AI模型Claude已展现出显著的“自进化”能力,即递归自我提升(RSI)的早期迹象。 核心数据显示,截至2026年5月,Anthropic代码库中超过80%的代码由Claude编写,而在其代码工具发布前,这一比例仅为个位数。工程师的代码交付量达到2024年的8倍。在编程质量上,Claude处理最复杂模糊任务的成功率在半年内从26%跃升至76%,其代码质量被认为年内有望超越人类。 Anthropic提出了“AI能独立完成的任务时长”这一新衡量维度:从2024年3月的4分钟,增至2025年的1.5小时,再到2026年的至少16小时,翻倍速度已加快至每4个月一次。若趋势持续,2027年可能达到数周。 在研究层面,Claude展现强大能力:将训练小模型的代码运行速度优化了52倍,远超人类水平;在一项AI安全研究中,其将效果差距缩小了97%,而人类研究员仅缩小23%。 Anthropic认为,人类在AI开发中的角色正不断收窄,最后优势可能仅剩研究品味与方向判断。公司描绘了三种未来:能力增长停滞;AI加速但人类主导;或AI实现完全递归自我提升,自主设计下一代AI,这可能带来巨大福祉,但也存在对齐失败、最终失控的风险。 为此,Anthropic呼吁,如果存在可验证的机制确保全球AI实验室能同步暂停竞争,其愿意减速甚至暂停研发。OpenAI近期也发表了类似观点,认为自进化迹象将加剧竞争与治理挑战。这表明AI发展的“奇点”可能正在加速逼近。

marsbit37 分鐘前

突发!Anthropic呼吁全员停止AI研究

marsbit37 分鐘前

价格里的概率:世界杯赔率是怎么算出来的

本文探讨了世界杯夺冠概率数字的来源与可信度。市场预测和模型模拟是两大主要途径。 市场预测(以Polymarket、Kalshi等平台为代表)通过交易形成价格,价格直接隐含概率。例如法国合约价格17美分,即市场认为其有17%概率夺冠。该价格由做市商报价和交易者成交共同形成,并经过跨平台成交量加权平均得出。截至5月底,相关合约累计成交额超5亿美元。但市场存在“热门-冷门偏差”,即系统性地高估冷门、低估热门,且流动性深度影响价格可靠性。 模型模拟(以Opta超算为代表)则基于球队数据(如Elo评级算法)计算每场比赛胜平负概率,并通过上万次模拟得出各队夺冠频率。例如西班牙夺冠概率为16.1%。需注意,这类模型部分输入数据本身已包含博彩市场赔率信息。 文章指出,目前尚无严谨的跨届学术研究直接对比这两类方法在世界杯预测上的准确度。以2022年为例,阿根廷赛前是第二或第三热门,并非真正“冷门”,但不同来源给出的概率差异显著。此外,加密预测市场的所有交易记录公开透明,利于审计,但也可能因流动性浅而受小额资金影响。 最后,监管环境也是重要变量。美国明尼苏达州已将预测市场运营定为重罪,CFTC与各州司法管辖权存在争议,这种不确定性本身也影响着市场。 总之,“法国17%”和“西班牙16.1%”这两个数字的生产逻辑完全不同。在决赛结果揭晓前,面对任何概率数字,都应追问其生产方式。

marsbit39 分鐘前

价格里的概率:世界杯赔率是怎么算出来的

marsbit39 分鐘前

交易

現貨
合約
活动图片