Grok Bot lets you spin up named agents, give each one a job, and let it run on a cloud computer with its own browser and terminal. People are already using it for research, invoicing, and social scheduling. Trading is a natural next step — but only if the agent's access is scoped correctly.

This guide walks through wiring a Grok Bot agent up to LeverUp using 1CT (gasless, intent-based trading): the agent gets a scoped signing key that can perform only the trading actions you authorize. It can't withdraw collateral or transfer tokens, and for trades submitted through the intent flow, it doesn't need a gas balance of its own.

What This Guide Covers

  • Giving a Grok Bot agent read access to LeverUp's market and portfolio data
  • Authorizing a scoped signing key the agent can use to trade (the "Hosted Agent" mode of 1CT)
  • How the agent actually submits a trade — no wallet popup, no gas
  • Where the permission boundaries are, and why they matter

This is a builder's guide to the integration pattern, based on LeverUp's published developer docs. It's not a record of a specific live deployment — treat every step as something to test with small size before trusting an agent with real collateral.

Why This Needs a Different Setup Than Trading Yourself

When you trade on LeverUp through your own wallet, trading actions typically go through a wallet popup you approve. That's a reasonable model for a human. It's a poor fit for an agent — you don't want to sit there approving every signature Grok Bot wants to send, and you shouldn't hand an autonomous process your actual wallet key either.

LeverUp's developer docs address this directly with 1CT (One-Click Trading), which supports a mode built specifically for this case: a Hosted Agent — "a backend-controlled key... optionally with per-action restrictions," documented as the intended pattern for "trading bots, copy-trading services, and managed strategies."

The key detail: the signing key you generate for the agent can only express trading intent. It can open positions, close them, and adjust orders. It cannot transfer tokens or withdraw collateral, and it can't act outside the permission bits you grant it when you authorize it. That's what makes it reasonable to let an agent hold and use it.

Step 1 — Give the Agent Read Access to Market Data

Before an agent can decide anything, it needs data. LeverUp exposes a read-only REST API at service.leverup.xyz — no authentication required, so this is the easy part.

Create a Grok Bot agent (call it something like "LeverUp Trading Analyst") and point it at:

  • GET /v1/pairs — which markets are live
  • POST /v1/oracle/price/pairs/latest — current oracle prices
  • GET /v1/user/{address}/open-positions — the agent's own open positions
  • GET /v1/portfolio/{address}/trade_overview — PnL summary

Because Grok Bot agents run on a cloud computer with a terminal, this is just the agent making HTTP calls — no special connector needed. The docs ask that you cache results and poll no more than once per second per endpoint, which is a reasonable pace for an agent checking positions between decisions anyway.

At this stage the agent can only look. Nothing it does yet can touch your funds.

Step 2 — Generate and Authorize a Hosted Agent Key

This is the step that turns "an agent that watches the market" into "an agent that can trade."

  1. Generate a fresh signing key for the agent — a keypair that lives only in the agent's environment, separate from your own wallet key
  2. From your own wallet, call authorizeAgent(botAddress, …) once, onchain, to authorize that key — optionally restricting which actions it can take
  3. Approve the Diamond contract for your collateral asset and the execution fee token — a one-time approval, same as any onchain trading setup (check the current contract addresses on docs.leverup.xyz before approving anything)

After this transaction, the agent's key is live — but only for the permission bits you granted. It still can't move your collateral anywhere except through the trade actions you authorized.

Step 3 — Wire Up the Trading Skill

Save this as a Grok Bot skill so the agent follows the same flow every time it wants to trade:

  1. Build the intent. Structure the trade parameters — pair, direction, size, leverage — into the actionData format the protocol expects
  2. Sign it. Sign the intent with the agent's key using EIP-712 — no gas, no onchain transaction yet
  3. Submit it. POST the signed intent to /v2/trading/submit-intent?blockchain=MONAD, which returns an intentHash
  4. Track it. Poll /v2/trading/{intentHash}/status until the relayer reports it executed

For submissions through this intent flow, the relayer handles fetching fresh oracle pricing and paying the gas, so the agent doesn't need to maintain its own gas balance — though execution still depends on the relayer being available. Fourteen trading actions are available this way: opening and closing positions (market or limit), partial closes, updating take-profit/stop-loss, adjusting margin, and canceling orders. That covers most of what a trading strategy actually needs to do.

Step 4 — Set Boundaries Before You Trust It

A scoped key is a real safety improvement over handing an agent your wallet — but it isn't a reason to skip guardrails on the strategy side. Before letting the agent run unattended:

  • Restrict allowed actions at authorization time, not just in the agent's instructions — and separately verify whatever position-size or exposure limits the authorization step actually supports before relying on them
  • Start small. Run the agent with size you'd be fine losing entirely while you watch how it actually behaves
  • Keep a kill switch. Know how to revoke the agent's authorization onchain, and confirm how that revocation affects any intents already in flight or positions already open
  • Log everything. Have the agent write every intent it submits and every status response to a place you can review — Notion or a spreadsheet both work fine for this

None of this is specific to Grok Bot — the same pattern applies to any agent framework with tool-calling and a place to run scripts. Grok Bot's combination of named roles, a persistent cloud environment, and phone access just makes it a convenient one to start with.

What This Doesn't Do

This setup doesn't give you a profitable strategy — it gives an agent a way to submit authorized trading intents using scoped permissions. The trading logic (when to open, when to close, how much size) is still on you or whatever model you're prompting. Framing an agent's execution plumbing as the hard part, and the actual trading decisions as solved, is how bots lose money quickly.

Trade on LeverUp: app.leverup.xyz