---
title: "Trading on Hyperliquid with your coding agent"
type: "experiment"
number: "AW-003"
date: "2026-10-13"
built_by: ["Elton Tay"]
tags: ["Experiment"]
summary: "An agent took USDC from Arc to Hyperliquid and back, opening and closing a $10 BTC position along the way. A person approved every step that moved money."
url: "https://agentic-works.circle.com/experiments/aw-003-trading-on-hyperliquid"
---

# Trading on Hyperliquid with your coding agent

> An agent took USDC from Arc to Hyperliquid and back, opening and closing a $10 BTC position along the way. A person approved every step that moved money.

[Video: The agent routing USDC from Arc to Hyperliquid and back](https://agentic-works.circle.com/videos/experiments/aw-003-hyperliquid.mp4)

Elton Tay built this for our booth at Hyperliquid Summit in Singapore. He wanted to see if an agent could move USDC onto a trading venue, place a trade and bring the money back, with a person approving each step.

The agent doesn't trade by itself. It hires another agent. Otto is a third-party trading agent on Agent Marketplace that sells Hyperliquid actions as endpoints, paid per call over x402. Elton's agent pays Otto in USDC each time it needs something done.

The trade is decided in advance. The agent runs the steps in order, and it waits for a fresh approval whenever money is about to move.

Otto works from a Safe on Arbitrum, so the USDC starts on Arc and CCTP bridges it over first:

| step | move | action | via |
| --- | --- | --- | --- |
| 01 | Arc → Arbitrum | bridge | Circle CLI · CCTP |
| 02 | Wallet → Safe | transfer | Agent Wallet |
| 03 | Safe → Hyperliquid | deposit | otto /hl-deposit-withdraw |
| 04 | Hyperliquid | open perp | otto /trade-perpetuals |
| 05 | Hyperliquid | close | otto /close-position |
| 06 | Hyperliquid → Safe | withdraw | otto /hl-deposit-withdraw |
| 07 | Safe → Wallet | withdraw | otto /withdraw |

*Each call paid per request over x402 via Circle Gateway Nanopayments*

Writing the code wasn't the hard part. General-purpose coding agents wrote it without complaint, but they hesitated to move money straight from a chat, which is a reasonable default. What worked was a deterministic harness that sets the boundaries up front. It runs in dry-run mode by default and checks every action against preset limits. It keeps the wallet, the Safe, the Hyperliquid collateral and the Gateway fee balance separate. It also logs each proposed action next to what was actually executed.

Otto's endpoints don't have a testnet mode, so this ran on mainnet with real USDC, in very small amounts.

**Try it yourself**
Give your agent a wallet first, and then some trading instructions.

```
curl -sL https://agents.circle.com/skills/setup.md and follow the
instructions to set up Circle Agent Wallet
```

- [Otto on Agent Marketplace](https://agents.circle.com/services)
- [Bridge USDC with Circle CLI](https://developers.circle.com/agent-stack/agent-wallets/wallet-operations/bridge)

built_by: Elton Tay
shown_at: Hyperliquid Summit · Singapore · 2026-10-05
stack: Circle CLI · CCTP · Agent Wallet · Gateway · Agent Marketplace
services: otto · 6 endpoints · x402

*Product demo, not a trading recommendation.*

## Endpoints
- https://agentic-works.circle.com/experiments/aw-003-trading-on-hyperliquid.md  # this view, as Markdown
- https://agentic-works.circle.com/experiments/aw-003-trading-on-hyperliquid  # the same page for people
- https://agentic-works.circle.com/llms.txt  # the site index for agents

## Disclaimer
Circle Agentic Works is Circle’s public effort for the agentic economy: shipping experiments, demos, and research in the open. Everything published by Circle Agentic Works is experimental and is provided for informational, educational, and demonstration purposes only.

Experiments, demos, code, tools, and data published here are not Circle products or services, are not production-ready, are provided “as is” and “as available” without warranties of any kind, and may be changed, broken, paused, or withdrawn at any time without notice. Nothing here is a commitment by Circle Internet Group, Inc. or its affiliates (“Circle”) to build, launch, support, or maintain any product, feature, integration, or relationship, and publication of an experiment does not mean it will become a Circle product.

Nothing here constitutes legal, financial, investment, tax, or other advice, or an offer, solicitation, or recommendation to buy, sell, or hold any asset or to use any service. Any use of code, demos, tools, or data is at your own risk and is subject to the applicable license and terms. For references to Circle-generated products and features, see corresponding disclosures. References to third parties, their products, or services are for illustration only and do not imply endorsement, partnership, or affiliation unless expressly stated. Third-party data and statements are attributed to their sources and have not been independently verified by Circle, and Circle makes no representation as to their accuracy or completeness. Circle undertakes no obligation to update this content.
