AI agents
The REST-only integration. A machine-readable spec, a self-describing config, ETag polling and no keys.
The whole read surface of Motoswap is a public REST API with no authentication and aggressive ETag caching. An agent can discover the deployment, read every market and user metric, and stay current by polling, without touching an RPC. Writes are ordinary EVM transactions; if your agent trades, layer the bot loop on top of this page.
Machine-readable entry points
| Resource | Where |
|---|---|
| Every documented endpoint, with parameters and response shapes | API reference |
| Conventions: base URL, caching, pagination, errors | API overview |
| These docs as plain text for context windows | /llms.txt and /llms-full.txt |
The API reference is the route list to build against.
Orient in one call
GET /config describes the deployment an agent is talking to:
{
"chainId": 1,
"addresses": { "...": "0x..." }, // zero address = unset for this phase
"launchPhase": "dex", // "prelaunch" | "vamp" (before the DEX) | "dex"
"splitSwapEnabled": false,
"motofunEnabled": true,
"bridgeMotoEnabled": false,
"motofunUrl": "https://...", // the moto.fun site, or "" when off
"pveComboEnabled": false,
"misconfigured": []
}There is no RPC URL in it; an agent that goes on chain brings its own.
Two rules fall out of it. Interpret zero addresses as absent features, and
branch on launchPhase before assuming the AMM surface exists. The response
also carries the Uniswap V2 addresses that the launch farm (ended) and UniswapZap
use (uniswapV2Router, uniswapV2Factory, motoUniswapPair).
Status is per contract, and the table is on addresses. An endpoint that depends on a contract with no data behind it yet returns empty or zero values rather than errors, so check the shape you get back rather than assuming a failure.
The read surface in one table
| Question | Endpoint |
|---|---|
| What tokens exist, with symbol and decimals? | GET /tokens (directory; verified flags the curated set) |
| What is this token worth, and lately? | GET /tokens/{address}/chart?range=24h, GET /tokens/{address}/stats |
| What pools exist, by TVL? | GET /dex/pools (cursor-paginated) |
| One pool's state, candles, trades? | GET /dex/pools/{pair}, .../chart, .../swaps |
| Protocol-wide volume and revenue? | GET /analytics/overview, GET /stats/series |
| A wallet's Points, rank, Rakeback, portfolio? | GET /points/{address}, /rakeback/{address}, /portfolio/{address} |
| Farm pools and emissions? | GET /farms (complete bounded set, unpaginated) |
| The indexer's current tip? | GET /chain/head |
Full inventory with response shapes: API reference.
Poll politely, get speed for free
Every user-agnostic GET carries an ETag keyed to the data's actual freshness (the indexer head for chain-driven data, the wallet's own activity for per-user data). The contract:
const res = await fetch(url, { headers: etag ? { "If-None-Match": etag } : {} });
if (res.status === 304) return cached; // nothing changed, ~free
etag = res.headers.get("etag") ?? undefined; // rotate and storeA 304 means nothing changed, not "try later". Per-user endpoints only
change when that wallet transacts, so a polling agent that honors ETags gets
near-real-time data at a request cost close to zero. Details and per-tier
TTLs: caching guide.
Cursor-paginated lists return { items, nextCursor, hasMore }. Cursors are
signed and bound to their filters: reuse one with different query params and
you get 403, not silently wrong pages. Send the same filters each page.
Details: pagination guide.
moto.fun
The bonding-curve venue is on the same API, under /motofun/*, with the same ETag contract and no
keys. When motofunEnabled is false, every /motofun/* route answers 404, so branch on it
first. Four endpoints cover it:
| Question | Endpoint |
|---|---|
| What is the venue doing overall? | GET /motofun/stats |
| What coins exist, newest first? | GET /motofun/coins?cursor= (25 per page) |
| Is this token a curve coin, and has it graduated? | GET /motofun/coins/{address} |
| What has the venue earned, per bucket? | GET /motofun/revenue/series?range=&bucket= |
Plus GET /activity?venue=motofun for the unified feed and GET /creator/{address}, whose per-coin
rows carry venue: "motofun" | "deployer" ("deployer" marks coins from the retired launch product;
new coins launch on moto.fun).
Three rules an agent has to encode:
404has two meanings. On/motofun/stats,/motofun/coinsand/motofun/revenue/seriesit only ever means moto.fun is off on this deploy. On the point lookupGET /motofun/coins/{address}it can also mean the venue is on and that token never launched on the curve. Tell them apart by the error body ("moto.fun is not enabled on this deploy"versus"this token never launched on the moto.fun curve"), or read/config.motofunEnabledfirst and branch.- A coin has two phases. While
statusis"bonding"or"frozen"there is no pair and no pool:pairWethandpairMotoarenull, and nothing in the DEX endpoints knows about it. Once it is"graduated"it is an ordinary token in ordinary pools. - USD values are frozen at write time and never re-priced, except
tvlUsd, which is a live gauge. Do not reconcile a historical dollar figure against today's ETH price and report a discrepancy; there is not one.
These ETags version on the curve's own head block rather than the chain head, so a quiet venue
returns 304 through every DEX block. Polling /motofun/* on a short interval is close to free.
The app's own backend carries what this API does not: candles, holder tables, pending launches, and
an SSE stream. It serves ETags on JSON 200s, so send If-None-Match there too. It pages only the
board (GET /tokens) and the graduated feed (GET /graduated/feed), both with a signed cursor, and
some of its routes are rate-limited per IP, so poll it gently.
The API page covers both.
What an agent should not do
- Do not scrape numbers from the app. Everything rendered there comes from these endpoints; take them at the source.
- Do not infer Points math. Scoring internals are deliberately
unpublished;
/points/{address}and the leaderboard are the public truth. What is public is documented in points and referrals. - Do not cache addresses across days. Deployments change;
/configis cheap and always right.
Where to go next
- Trading bots to add execution on top of reads.
- API reference for every endpoint's exact shape.
- Caching and ETags for the freshness model.