Build an AI trading agent that uses Circle Agent Wallet, USDC payments, and Arrays market data to generate a research-first trading thesis with spend tracking.

Many trading workflows start with the same problem.
You have a market question, but the useful signals are spread across many places.
You may need price data, funding rates, open interest, trader positioning, token unlocks, market sentiment, and liquidity metrics. You may also need to compare those signals before you decide whether a thesis is strong or weak.
Today, that usually means signing up for multiple data tools, managing API keys, buying credits, checking limits, and stitching the results together by hand.
That workflow is slow for a human. It is also awkward for an AI agent.
An agent can explain what data it wants, but it still needs a way to discover data services, pay for them, use the result, stay inside a budget, and return proof of what happened.
That is where Circle Agent Stack becomes useful.
In this tutorial, you will learn how to build a research-first trading thesis workflow with:
The goal is not to let an agent make investment decisions for you.
The goal is to show how an agent can use paid market data to build a better research brief, explain the signals it used, and show what it spent.
What this Trading Agent Workflow Does
You will build an agent workflow that takes one asset, pays for selected Arrays market data through Circle Agent Marketplace, and returns a trading thesis brief.
The agent will:
- Check wallet and payment readiness.
- Search Circle Agent Marketplace for Arrays services.
- Inspect the price and required inputs for each service.
- Pull the most useful market signals.
- Compare the signals.
- Return a thesis with a bull case, bear case, invalidation condition, caveats, and spend log.
This is the core pattern: Give the agent a research goal, a USDC budget, and access to paid market data. The agent then decides which data is useful, pays for it, and returns result that is useful for autonomous trading decisions.
Why This Workflow Matters
- For developers, this shows how to build agents that can do more than just generate content. The agent can acquire data as part of the workflow.
- For market intelligence teams, this makes research more traceable. The output does not only say what the agent thinks. It also shows which data was used, which services were paid for, and how much USDC was spent.
- For data providers, this shows a new distribution path. Instead of only selling subscriptions to humans, providers can expose data endpoints that agents can discover and pay for when needed.
This is what agent commerce looks like in a financial data workflow.
What Arrays Market Data Adds to a Trading Thesis Agent
Arrays provides crypto market data and analytics through Circle Agent Marketplace. It gives agents access to structured market signals that can help with research, monitoring, and thesis-building workflows.
For a trading thesis agent, Arrays can provide data such as token details, price and volume history, market cap, supply metrics, funding rates, open interest, long/short ratios, taker buy/sell volume, market sentiment, token unlock events, and holdings data where available.
This means an agent can move beyond a generic market summary. It can pay for specific signals, compare them, explain where the data agrees or conflicts, and return a research brief with a payment receipt log.
At the time of testing, Arrays exposed 15 marketplace services. Each service had a paid endpoint, accepted Base USDC through Circle Gateway, and returned a specific type of market signal. The agent should always inspect the live service terms before paying because prices, inputs, and availability can change.
You can review the Arrays docs and explore available services through the Circle Agent Marketplace.
The Prompt
Copy this prompt into your AI coding tool or agent runtime. Replace the placeholders before you run it.
Use Circle Agent Wallet to build a research-first trading thesis with Arrays market data.
Config:
- Asset symbol: <SYMBOL>
- Token id for unlock data, if different: <TOKEN_ID>
- Time window: <TIME_WINDOW>
- Max spend: <MAX_USDC_SPEND>
- Delivery email: <EMAIL_ADDRESS>
Goal:
Use Arrays services in Circle Agent Marketplace to collect paid market signals, then produce a trading thesis brief.
Do not place a trade.
Do not give financial advice.
Setup:
1. Check that Circle CLI is installed.
2. Check Circle Agent Wallet authentication.
3. Check the wallet address and wallet balance.
4. Check Circle Gateway balance if needed for marketplace payments.
5. Search Circle Agent Marketplace for Arrays crypto market data services.
6. Inspect the price, required inputs, payment chain, and response shape before paying.
Research plan:
1. Pull token detail for the asset.
2. Pull broad sentiment using the Fear and Greed Index.
3. Pull funding rates for the asset.
4. Pull open interest for the asset.
5. Pull long/short ratio where available.
6. Pull taker buy/sell volume where available.
7. Pull price and volume data where available.
8. Pull unlock events where available.
9. Compare the signals and identify where they agree or conflict.
Rules:
1. Stay under the max spend.
2. Use paid services only where they improve the thesis.
3. Do not execute trades.
4. Do not invent data.
5. Mark unavailable data clearly.
6. If a paid call fails, record it in the spend log and continue with available data.
7. Treat the output as research, not financial advice.
Return:
- wallet status
- Arrays services used
- data pulled
- signal summary
- thesis
- bull case
- bear case
- invalidation condition
- confidence level
- caveats
- payment receipt log
- total USDC spent
- email delivery status, if email delivery is available
Prompt Breakdown
Config
The config section gives the agent the basic inputs as described below.
- The symbol tells the agent which asset to research.
- The time window keeps the research focused.
- The max spend gives the agent a clear budget.
- The email address gives the agent a delivery target if email delivery is available.
Goal
The goal tells the agent what the workflow is for. It is not asking for a generic market summary. It is asking for a research-first trading thesis built from paid market signals.
Setup
The setup section makes the agent check whether it is ready to pay. This matters because a paid data workflow can fail if the wallet is not authenticated, the wallet has no USDC, or the Gateway balance is not ready. The agent should confirm this before it starts calling paid services.
Research Plan
- The research plan tells the agent which signals to collect.
- Each signal answers a different question.
- Funding rates can show whether leveraged traders are leaning long or short.
- Open interest can show whether leverage is building.
- Taker buy/sell volume can show aggressive order flow.
- Unlock events can show supply risk.
The agent should not use every endpoint by default. It should choose the calls that help the thesis and stay within the budget.
Rules
- The rules keep the workflow safe and useful.
- The agent must not place a trade.
- It must not invent data.
- It must mark unavailable data clearly.
- It must return a spend log.
This is important because a research agent should be able to explain both its conclusion and the cost of reaching that conclusion.
Example Output: What a Good Trading Thesis Brief Looks Like
A good result should not be a long generic market essay. It should be a structured brief.
Example output shape:
Wallet status:
Ready. Wallet and Gateway balance checked.
Services used:
- Arrays token detail
- Arrays funding rate
- Arrays open interest
- Arrays taker buy/sell volume
- Arrays unlock events
Signal summary:
- Funding rate suggests...
- Open interest suggests...
- Taker buy/sell volume suggests...
- Unlock schedule suggests...
Thesis:
The near-term thesis is...
Bull case:
...
Bear case:
...
Invalidation:
The thesis weakens if...
Confidence:
Medium, because...
Spend log:
- Arrays funding rate: paid ...
- Arrays open interest: paid ...
- Arrays taker buy/sell volume: paid ...
- Total USDC spent: ...
The key is that the agent returns the reasoning path and the payment path.
That makes the workflow easier to trust, debug, and repeat.
How This Can Extend to Prediction Markets
This same pattern can support prediction-market research.
For example, an agent could research a sports, election, macro, or crypto market before it forms a view.
It could use Arrays for crypto market signals, then combine that with market odds, news, social context, or other paid services available through the marketplace.
The agent can then return:
- the current market question
- the relevant signals
- where the signals agree
- where they conflict
- what data it paid for
- why the thesis is strong or weak
Next Steps: Turn This Into a Custom Research Agent
Try the prompt with one asset and a small budget.
Start with a research-only workflow.
Review the signals, receipts, and caveats before you automate anything further.
Then extend the pattern into your own agent:
- market intelligence tools
- portfolio research assistants
- prediction-market research agents
- risk monitoring workflows
- paid data dashboards
The best place to start is simple: Give the agent a question, a budget, and access to paid market data.
If you want to build this loop into a custom agent workflow, start with the Circle Agent Stack Starter Kits. The repo gives developers a practical starting point for connecting Agent Wallet, paid services, and agent frameworks in their own applications.
This tutorial is for educational purposes only. It does not provide financial, investment, legal, or tax advice. The workflow is designed for research and data collection. Always review data, assumptions, and risks before making financial decisions.
Agent Wallets, Agent Marketplace, Circle CLI, Nanopayments, and Circle Skills (together, the “Agent Stack”) are offered by Circle Technology Services, LLC (“CTS”). CTS is a software provider and does not provide financial, advisory, or marketplace services. Agent Stack enables users, developers, and their artificial intelligence agents ("AI Agents") to build, deploy, discover, hold and transact their own funds, and interact with other third-party AI Agents, applications and services. Transactions initiated by AI Agents are executed based on user-defined permissions and may occur without real-time human review. Circle does not verify, screen, monitor, or make any representations or warranties regarding the identity, legitimacy, safety, security, reliability, or performance of any AI Agent, including any AI Agent developed by you, other users, or third parties, or any AI Agent that interacts with the Agent Stack. AI Agents may operate unpredictably, may be controlled by unknown or unauthorized parties, and may expose users to security, financial, or other risks. Users are solely responsible for their use of these tools, reviewing commands before execution, and for evaluating associated risks. For additional details, please see the Agent Platform Terms of Use available at agents.circle.com/terms-of-use and the Circle Developer Terms of Service available at console.circle.com/legal/developer-terms.
USDC is issued by regulated affiliates of Circle. See Circle’s list of regulatory authorizations.




.jpg)