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.

你可能也喜欢

杨歌 Gary:Agent 经济与 AI 亚微观经济学

本文探讨了AI Agent经济与AI亚微观经济学的前沿趋势。文章指出,自“奇点”爆发以来,全球AI发展迅速,形成了新的“文明代际”。当前,硅谷等前沿地区已从单机AI(Claws & Agents)的瓶颈,进入到关注“Agent经济”(由自主AI智能体参与价值创造与交换的体系)和A2A(Agent间交互)生态构建的新维度。 文章围绕几个核心要点展开: 1. **AI支付(AI Payment)的竞争与H2A经济的瓶颈**:尽管Q2涌现了大量AI支付协议,但多数仍围绕H2A(人对Agent)场景,这本质上是非AI原生的。AI Agent的核心决策能力未得到充分发挥,H2A模式很快遇到瓶颈。聪明的企业开始以AI-Native思维反推,为A2A经济做准备。 2. **Agent经济与A2A生态的必然趋势**:由自主AI Agent作为经济主体直接参与价值活动的Agent经济,以及A2A生态的构建,被视为下一个关键投资方向。其发展范式类似互联网、移动互联网和DeFi的酝酿期,但速度更快、视角更抽象(非纯人类中心),且面临更大的共识挑战。 3. **AI协议与Crypto协议的关联与鸿沟**:AI协议是Agent经济活动的基础规则,目前形态多样(如文件、API),侧重信息与能力交换。而Crypto协议更侧重资产确权。两者虽有融合为统一数字协议的趋势,但目前存在明显鸿沟,部分原因在于当前AI经济仍受制于传统金融法律框架(如KYC)等政治经济因素。然而,AI Agent遵循第一性原理和效率优先原则,将挑战现有金融法律体系。 4. **AI Agent亚微观经济学特点与生物学类比**:AI Agent经济行为具有高频小额、能量驱动、效率导向、任务导向、组织与沟通成本趋近于零等特点。文章用生物学细胞结构类比AI Agent系统(LLM如细胞核,Agent Harness如细胞质,协议栈如细胞膜),描绘了一个类似生物机体的、正在形成的亚微观经济学环境。 5. **AIFi的必然与金融芯片(FinChip)**:随着AI Agent成为价值发现的主体,AI原生金融(AIFi)应运而生,其价值核心在AI,金融是表现形式,这与DeFi/TradFi相反。作者提出的“金融芯片”(FinChip)概念,旨在构建融合AI自主性与Crypto协议、兼容H2A与A2A的AIFi基础设施。 6. **AI-Native是范式升级**:AI+的产业升级远复杂于互联网+。AI发展快速、形式抽象、与业务深度耦合,短期内难以形成通用升级方法论。构建未来商业范式需要彻底的“AI原生思维”,即遵循第一性原理和效率最高原则,这对于所有从业者都是持续的巨大挑战。

链捕手22分钟前

杨歌 Gary:Agent 经济与 AI 亚微观经济学

链捕手22分钟前

从《大空头》到旧金山:AI泡沫里的狂欢与眩晕

《从〈大空头〉到旧金山:AI泡沫里的狂欢与眩晕》一文以电影《大空头》中“闻到了钱的味道”为引,描述了作者从纽约搬到旧金山后对当前AI热潮中心地带的观察。文章指出,旧金山密集的技术公司、风险资本与狂热氛围共同构成了真实的“泡沫”现场,信息不对称与财富创造在此同时上演。 作者总结了在旧金山的几点核心感受:首先,城市中弥漫着一种“发抖”般的焦虑能量,人们被“逃离永久底层”的心态驱动,体现出“大泡沫行为”。其次,旧金山几乎只有“科技”这一种地位游戏,人们通过融资轮次、估值等虚荣指标相互比较,攀比氛围浓厚。再者,城市中充斥着关于AGI(通用人工智能)的“末日论”情绪,研究者的悲观与市场团队的乐观形成反差。最后,投资界对数学竞赛天才出身的创始人有着近乎迷恋的追捧,将其视为获取超额回报的“门票”。 文章并未简单判断泡沫是否会破裂,而是聚焦于呈现泡沫中的众生相:人们如何在亢奋、比较、投机与恐惧中寻找自己的位置。文末引用投资人的建议提醒读者:可以参与这场派对(“跳舞”),但需保持清醒(“别喝醉”),避免被泡沫行为扭曲判断。整体而言,这是一份对AI热潮中心地带的生动现场记录,描绘了技术创新、金融投机与人性交织的复杂图景。

marsbit24分钟前

从《大空头》到旧金山:AI泡沫里的狂欢与眩晕

marsbit24分钟前

黄仁勋「拯救」韩国股市:锁定SK海力士内存,芯片短缺还将持续

6月5日,韩国股市经历“黑色星期五”,KOSPI指数暴跌。6月8日盘中跌幅一度超8%,触发熔断,三星与SK海力士股价重挫。在此市场动荡之际,英伟达CEO黄仁勋的访韩起到了“救市”作用。 6月7日晚,黄仁勋与SK集团及SK海力士高层共进晚餐。餐后,他确认英伟达新款Vera CPU将采用SK海力士的DRAM,双方正为下半年及明年的“超大规模合作”做准备,并预计当前的内存芯片短缺将持续数年。随后,双方官宣了一份多年期技术合作协议,涉及AI超级计算机、机器人、数字孪生和半导体制造等领域。黄仁勋更公开表示,当前AI公司股价极具吸引力。 合作具体包括:英伟达将Vera CPU等产品线的内存供应锚定SK海力士,共同开发下一代内存以支持AI基础设施。同时,SK海力士将利用英伟达的CUDA-X库和AI技术加速其芯片设计与制造流程,如计算光刻和构建晶圆厂数字孪生,目标是实现完全自主的工厂运营。 此次合作早有铺垫。2025年10月,双方曾宣布在韩国合作建设大型AI工厂。尽管与SK海力士深化绑定,但英伟达在下一代HBM4内存上并未独家采购,三星、SK海力士和美光均已获得认证并将共同供货。黄仁勋指出,由于AI工厂建设导致需求激增,从晶圆到封装等整个半导体供应链的短缺状况预计将持续数年。 黄仁勋此行还会见了现代、LG、三星等韩国企业,表明英伟达正系统性深化与韩国科技产业的联系,SK集团是其中的关键一环。

marsbit1小时前

黄仁勋「拯救」韩国股市:锁定SK海力士内存,芯片短缺还将持续

marsbit1小时前

纳指单日跌幅4.2%,“黑色星期五”戳破美股泡沫?

2026年6月5日,美股遭遇剧烈回调,纳指重挫4.18%,创一年多最大单日跌幅,标普500指数结束九周连涨,半导体板块领跌。直接导火索是远超预期的5月非农就业数据,引发市场对经济过热和美联储推迟降息的担忧,美债收益率跳升,高估值的科技股首当其冲。 此次暴跌暴露出AI板块积聚的脆弱性。过去18个月推动股市上涨的AI叙事出现裂痕,部分云服务商削减芯片订单,企业端AI应用变现不及预期,导致前期拥挤的交易出现踩踏式平仓。 市场估值处于历史高位,多项指标(如席勒市盈率、巴菲特指标)显示美股已进入高估区间。同时,散户情绪乐观、杠杆水平高,而“聪明钱”如巴菲特的公司已囤积大量现金。技术面上,标普500指数关键支撑位被击穿,面临进一步调整压力。 华尔街对此看法分化:空方认为这可能是泡沫调整的开始,经济存在滞胀风险;多方则认为这是牛市中的健康回调,经济基本面依然稳固,企业盈利增长仍有支撑。未来走势关键取决于即将公布的5月CPI数据和6月的美联储议息会议,其结果将重塑市场对利率路径的预期。 总而言之,支撑美股高估值的核心支柱——降息预期发生动摇,AI叙事面临现实检验。市场正进入由宏观数据和盈利基本面主导的敏感阶段,投资者需保持谨慎,密切关注通胀数据与美联储政策信号。

marsbit1小时前

纳指单日跌幅4.2%,“黑色星期五”戳破美股泡沫?

marsbit1小时前

交易

现货
合约
活动图片