BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Practical Guide: Step-by-Step Tutorial on Using OpenClaw to Connect to Hyperliquid and Polymarket

Biteye
特邀专栏作者
2026-03-17 12:00
This article is about 3926 words, reading the full article takes about 6 minutes
Let AI place orders for you.
AI Summary
Expand
  • Core Viewpoint: Through the author's practical testing of using the OpenClaw AI agent for automated trading on Hyperliquid and Polymarket, this article demonstrates the potential of AI trading tools in lowering execution barriers and improving efficiency, while also pointing out the current challenges in the skill ecosystem regarding strategy execution stability.
  • Key Elements:
    1. By integrating with Telegram and configuring exchange APIs (such as Hyperliquid's API wallet and Polymarket's Relayer Key), OpenClaw enables remote monitoring and natural language order placement, lowering the operational threshold for automated trading.
    2. In practical tests on Hyperliquid, the AI showed deviations in understanding natural language instructions like "10x leverage" and "30% position size." More precise instructions (e.g., specific amounts) and parameter confirmation processes are needed to ensure accurate execution.
    3. The author tested the Polymarket prediction market, where the AI was able to analyze market depth, spreads, and execute orders, achieving a closed loop from opportunity discovery to trade execution and optimizing the trading experience.
    4. Citing results from AI live trading competitions like "Alpha Arena," the article indicates that AI holds advantages in being emotionless and operating 24/7. However, the stability of indirectly calling exchange APIs through third-party skills still needs improvement.
    5. The core challenge lies in the fact that while analytical logic can be expressed in natural language, the immaturity of the execution-layer skill ecosystem can lead to deviations between strategy results and expectations, limiting the reliability of fully automated, unattended trading models.

Original Author: Changan, Biteye

How late did you stay up staring at the charts last time?

My longest stretch was from the US market open all the way to the Asian market close, with a two-hour nap in between. I woke up to find I had missed a perfect entry point.

That got me thinking: why does this have to be done by a human?

After OpenClaw integrated with Hyperliquid and Polymarket, we tested the answer to this question. Some things went smoother than expected, while some pitfalls were deeper than anticipated. It's all written here.

Because we've been caught in the rain before, Biteye wants to hold an umbrella for you too.

1. Installation Steps

To have AI trade for you, just installing OpenClaw isn't enough. Its core only handles scheduling; the actual execution of trades is done by skills. And for a skill to run, it needs to be fed the corresponding trading permissions.

This chapter covers installation, configuration, and notification setup all at once. Once configured, you can directly move to the practical section in Chapter 2.

1.1 Installing Skills: Finding the Capabilities You Need

For any task you want to accomplish, you can search and install the required skill keywords on ClawHub, for example:

  • hyperliquid skill
  • polymarket skill

After installation, confirm the skill has been loaded by accessing the local console page: Left sidebar Agent section → Click on 'skill'.

If you can see the skill you just installed, the installation was successful.

At this point, some skills will show 'Save key', indicating that API or private key configuration is still needed. This is normal; the next step is to fill in the corresponding permission information.

1.2 Configuring Trading APIs: Granting AI Order Placement Permissions

For the AI to place orders, it must have trading permissions.

Do not use your main account directly. It is recommended to create a separate new account for testing with only a small amount of funds.

The method differs across exchanges. Here are two examples.

1️⃣ Hyperliquid

Open Hyperliquid → More → API

Here you can generate an API wallet, which has trading permissions but no withdrawal permissions.

Enter a wallet name → Click Generate to get an API key. You can also customize the authorization period.

After generating the API wallet, let me tell you from painful experience: you do NOT need to transfer any funds to the API wallet address; keep the funds in your main account. (Funds transferred to the API wallet will be lost).

Configuration requires two pieces of information: your main account's wallet address (API Key) and the private key displayed when the API wallet was generated (API Secret). The AI signs transactions through the API wallet but operates the funds in your main account.

Test method: Have OpenClaw query your account balance. Type in the dialog: "Query my current balance on Hyperliquid."

If it returns a specific number, the API configuration is working.

2️⃣ Polymarket

Open the Polymarket settings page:

Settings → Relayer API Keys → API key → Click Create New

After creation, you will get:

  • RELAYER_API_KEY
  • RELAYER_API_KEY_ADDRESS
  • Signer Address

If you need to trade, you also need to export the wallet private key corresponding to the signer and fill it into the configuration.

Using OKX Wallet for demonstration: Click the avatar in the top left of the wallet → Manage Wallet → View Private Key

Then fill both the private key and the API key into the openclaw.json file in OpenClaw. Next, open openclaw.json (usually located at C:\Users\YourUsername\.openclaw\) and fill in the three data items in the 'env' field.

⚠️ The private key is the highest-level credential. Do not screenshot it, do not send it to anyone, and do not store it in chat logs.

After configuring the API, you also need to complete an on-chain authorization. The simplest method is: manually make a trade on Polymarket, for example, buy a 1 USDC position.

1.3 Connecting Telegram: Use It Even When You're Out

After configuring the API, OpenClaw can already trade, but you can't keep staring at your computer screen, right?

After connecting to Telegram, whether it's trade notifications, error messages, or a sudden urge to place an order, you can handle it by pulling out your phone. Whether you're out for dinner or lying in bed before sleep, OpenClaw keeps doing its thing, and you always know what it's up to.

Creating a Telegram bot:

  1. Open Telegram
  2. Search for BotFather
  3. Create a Telegram bot: Send /start → /newbot → Follow prompts to create the bot → After creation, you'll get a BOT Token.
  4. Obtain Chat ID: Send a message to the bot, then open: https://api.telegram.org/bot (your token, replace this part) /getUpdates

In the returned JSON, look for chat → id. That string of numbers is your Chat ID.

Then fill both parameters into the configuration:

  • TELEGRAM_BOT_TOKEN
  • TELEGRAM_CHAT_ID

Then test: Send me a test message.

If Telegram receives it, the push notification is successful.

If you cannot receive it, common causes are proxy or network issues. You need to fill in the HTTPS proxy port in the configuration.

Open the openclaw.json file and add:

{

"HTTPS_PROXY": "http://127.0.0.1:your port",

"HTTP_PROXY": "http://127.0.0.1:your port"

}

Fill in the port according to your proxy software.

2. Executing Orders: Turning Judgment into Action (More Detailed)

Ever since AlphaGo's match against Korean Go player Lee Sedol, humans have been particularly keen on competing with AI.

In October last year, an AI research institution called Nof1 held a competition called Alpha Arena. The rules were simple: give various models $10,000 in capital, let them autonomously trade perpetual contracts on Hyperliquid, and whoever ends with the highest account balance wins.

Not long ago, Aster also hosted two "Human vs. AI" live trading competitions. Surprisingly, AI won both times.

After seeing this, I started thinking: could I set up a similar pipeline myself, using OpenClaw to run on Hyperliquid?

Thus, the following two skills were born.

2.1 Hyperliquid: Letting AI Trade Contracts

I searched on ClawHub and found the corresponding skill. The installation method can be referenced from the deployment tutorial in the previous article.

After configuration, you can directly place orders using natural language: "Go long on ETH on Hyperliquid, 10x leverage, 30% position size."

But in practice, it wasn't that smooth.

The first issue was leverage. I told it to use 10x, but it opened with 20x, and even after asking it to correct several times, it didn't get it right. Phrases like "10x leverage" are ambiguous for AI; it adjusts based on its own judgment of "reasonable leverage." Later, I switched to clearer instructions, asking it to echo the specific parameters before placing the order and confirming before execution, which stabilized the process.

The second issue was position sizing percentage: Telling OpenClaw to "use 30% of the balance" resulted in either going all-in or opening a ridiculously small position. The problem was only solved later by telling it the specific amount, like "open a 200 USDC position."

My initial goal was to replicate the Alpha Arena model: let OpenClaw run fully automatically like those AI models, 24/7, without needing supervision.

This path is theoretically feasible, but you first need to write the strategy in natural language and tell OpenClaw: which asset, under what conditions to enter, position size, stop-loss level, and when to close. After understanding, it will continuously monitor and execute based on this logic without needing manual triggering each time.

However, at this stage, the immaturity of the skill ecosystem is a real barrier. No matter how good the strategy you feed it, if the execution layer has problems, the results will deviate. It's like the difference between AI models in the Arena running on Hyperliquid's native environment versus indirectly calling through third-party skills—the stability is not on the same level.

I'll revisit this part once the skill ecosystem matures.

2.2 Polymarket: Applying the Same Logic to Prediction Markets

After experimenting on Hyperliquid for a while, I became curious: how would OpenClaw perform on prediction markets?

The underlying logic of the two markets is quite similar—both price the "probability of an event happening." The information sources are the same, the judgment framework is similar, only the execution venue is different.

The previous article only used PolyClaw for market analysis without actually placing orders. There's a psychological barrier between analysis and execution; being wrong in analysis has no cost, but being wrong in execution loses real money. This time, I wanted to take a step further.

So, after following Chapter 1's configuration process to fill in the three keys and complete on-chain authorization, I asked OpenClaw to help find a worthwhile entry opportunity.

It suggested a market: "Will the Fed keep rates unchanged after the March meeting?" The current YES price was $0.99, 24-hour volume $2.4M, with market consensus at 99% for no change. Fundamentals also supported this: stable inflation data, moderate economic growth, and the Fed's recent dovish but not urgent-to-cut stance.

Before placing an order, I habitually ask: "What's the current order book depth for this market? What's the spread? How much is suitable to buy?"

OpenClaw analyzes the current bid-ask spread. When the spread is too large, placing a limit order can save a lot of unnecessary slippage.

After confirming the depth is fine, just tell OpenClaw whether to buy and how much to execute the order: "Buy 5 USDC worth of YES position."

Checking positions after the trade is also straightforward: "OpenClaw, what positions do I currently hold?"

The entire process, from discovering the opportunity to completing the order, is done within OpenClaw, without switching pages or enduring the often-laggy Polymarket frontend.

3. Conclusion

Those AI models in Alpha Arena, running autonomously on Hyperliquid with $10,000, don't sleep, don't get emotional, and don't lose their rhythm after a losing trade.

Previously, this infrastructure was only accessible to professionals with technical backgrounds. Now, OpenClaw has lowered the barrier to a level where ordinary people can participate. You don't need to know how to code, you don't need to build your own system; a natural language command can have AI execute trades for you.

The tool is here.

The only remaining question is: when do you plan to start?

AI
Prediction Market
Welcome to Join Odaily Official Community