Agentic Workflows for Crypto Research

insights.glassnodePublished on 2026-04-01Last updated on 2026-04-01

Abstract

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.

Related Questions

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.

Related Reads

When AI Begins to Audit the World: From Claude Discovering the ZEC Vulnerability, Watching the Encryption Industry Enter the 'Recursive Security Era'

**When AI Audits the World: From Claude's Discovery of a ZEC Vulnerability, Viewing the Crypto Industry Entering a "Recursive Security Era"** This article examines a pivotal shift in the blockchain security landscape, triggered by the convergence of two events: Anthropic's research on AI's "Recursive Self-Improvement" and Claude Opus 4.8's discovery of a critical vulnerability in Zcash's code. Traditionally, crypto security has relied on human experts and automated tools for periodic audits. However, the article argues AI is transitioning from a mere tool to an active participant in understanding and analyzing complex systems. Claude's ability to identify a subtle flaw in Zcash's zero-knowledge proof system demonstrates AI's potential to dramatically lower the cost and time required for risk discovery. This goes beyond finding a single bug; it signals a change in the very mechanism of how vulnerabilities are found. The core thesis introduces the concept of "Recursive Security," drawing a parallel to Anthropic's "Recursive Self-Improvement." Just as AI can accelerate its own development through feedback loops, security systems are evolving towards a continuous cycle of analysis, risk identification, remediation, and re-analysis. Security is becoming a persistent, evolving capability integrated into a system's lifecycle, rather than a one-time pre-launch audit. This shift is particularly urgent for the crypto industry, where system complexity from Layer-2 networks, modular architectures, and ZK-proofs is growing faster than human analysis capacity. AI excels at the pattern recognition and contextual understanding needed to navigate this complexity. Importantly, the article cautions that AI augments both defenders and potential attackers, accelerating the entire threat landscape. The future competitive advantage may not lie in having zero vulnerabilities, but in having the fastest risk discovery, validation, and response capabilities. The Claude-Zcash incident is thus an early signal of an era where AI-driven, recursive security systems become essential for managing risk in an increasingly complex digital world.

marsbit24m ago

When AI Begins to Audit the World: From Claude Discovering the ZEC Vulnerability, Watching the Encryption Industry Enter the 'Recursive Security Era'

marsbit24m ago

From MSTR to STRC+: Where Is the Limit of the Strategy Universe?

From MSTR to STRC+: The Evolution and Limits of the Strategy Universe This article examines the transformation of Strategy (formerly MicroStrategy) from a simple "Bitcoin treasury" company into a complex financial engineering firm building a BTC-backed credit system. **Core Thesis:** Strategy's true significance lies not just in its massive BTC holdings (~844k BTC), but in its attempt to transform this static reserve into a multi-layered credit curve within traditional capital markets and, subsequently, into on-chain yield infrastructure. **The MSTR Flywheel:** The initial model was a reflexive loop: BTC price rises → MSTR stock rises → company raises capital (debt/equity) at a premium → buys more BTC → increases per-share BTC exposure → MSTR premium grows. This "amplified Bitcoin" equity (MSTR) thrives on bullish momentum but is vulnerable to tightening premiums and rising funding costs. **Building the Credit Curve:** Strategy's innovation is slicing its single BTC balance sheet into different risk/return profiles via specialized securities: * **MSTR:** High-volatility equity layer absorbing full BTC upside/downside. * **STRC:** Key product. A perpetual preferred stock designed as "short duration high yield credit," offering ~11.5% floating monthly dividends. It attracts fixed-income investors seeking yield without direct BTC exposure, funding Strategy's operations. * **STRD/STRK/STRF:** Other preferred/share classes with varying durations, conversion rights, and fixed dividends. **Risks of the STRC Model:** STRC's high yield is not risk-free. Its stability depends on: 1) Sufficient BTC asset coverage, 2) Strategy's continued ability to pay dividends, and 3) Market faith in the MSTR/STRC funding flywheel. Stress points include deep BTC price declines eroding the asset buffer, rising dividend costs if STRC trades below par, and a broken flywheel if MSTR's premium (mNAV) falls persistently. **On-Chain Expansion: STRC+:** Projects like **Saturn** and **Apyx** aim to package STRC's (and other DAT preferred stock) cash flows into on-chain stablecoin yield (e.g., sUSDat, apyUSD). They offer DeFi a new yield source distinct from trading fees or incentives—cash dividends from traditional securities. However, this introduces compounded risks: off-chain custody, issuer credit risk, BTC volatility, and protocol execution risk. **Conclusion: The Ultimate Boundary** Strategy's endgame is not infinite BTC accumulation. It is the market's long-term acceptance of a new credit system where BTC serves as collateral for tradable securities whose cash flows can power on-chain financial applications. Its "universe" expands if this BTC-native credit curve gains legitimacy, but contracts if these instruments are repriced purely as high-risk, yield-bearing credit assets without stablecoin mythology.

marsbit43m ago

From MSTR to STRC+: Where Is the Limit of the Strategy Universe?

marsbit43m ago

Trading

Spot
Futures
活动图片