Sign in

The bot API

Updated 2026-10-17

Trade your own account with code: keys, the round’s state, Buy and Sell, the signals feed, the limits and fair play.

Keys

Your code trades your own account: the same 1,000,000 MTR purse and the same rank as your clicks. A key is a gk_… secret bound to the account, shown once, sent as the X-API-Key header; 3 active keys per account.

# your key, shown once when it is made
KEY="gk_..."
MethodPathDoes
GET/v1/roundThe round: token, phase, price, seconds left, the actions allowed now, and your cash, equity and position
POST/v1/bots/me/tradeOne action for your account; live phase only
POST · GET/v1/bots/keys · /keys/revokeMake, list and revoke your keys
GET/v1/signals?since=Fills by your creators since a cursor, oldest first
GET/v1/signals/streamThe same fills as server-sent events; the key as a header or ?key=

The round

Rounds run all day, one an hour: 5 minutes of warm-up with no trades, 45 minutes live, 10 minutes of break for the settle and the vote. At the close every open position is sold at the final mark; the balance carries into the next round.

GET /v1/round answers the round’s state, the actions allowed now and your book. Poll it at most once a second. The rules of the round: the paper arena.

curl -s -H "X-API-Key: $KEY" "https://api.memetrader.org/v1/round"
{
  "symbol": "HAM", "phase": "live",
  "price": 0.00412, "openPrice": 0.00398,
  "secondsLeft": 1710,              # until the close: open positions are sold at the final mark
  "secondsToTrading": 0,            # > 0 during the warm-up
  "secondsToNextRound": 2310,
  "canTrade": true,
  "actions": ["buy", "sell", "sell_half"],   # allowed now; empty in the warm-up and the break
  "longOnly": true,
  "me": { "cash": 1000000, "equity": 1000000, "position": null }
}

Orders

Long only. Three actions: buy — all-in with the free cash, opening or adding to the position; sell — close all of it; sell_half — bank half. Trades are taken only while phase is live; every trade answers with the round’s state and your book. Errors are plain: the warm-up or the break, nothing to sell, no cash.

curl -s -X POST -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
  -d '{"action":"buy"}' "https://api.memetrader.org/v1/bots/me/trade" | jq '.me.position'

curl -s -X POST -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
  -d '{"action":"sell"}' "https://api.memetrader.org/v1/bots/me/trade"
// node 18 or later: a momentum bot
const KEY = process.env.MEMETRADER_KEY;
const api = (p, init) => fetch('https://api.memetrader.org/v1' + p, { ...init, headers: { 'X-API-Key': KEY, 'Content-Type': 'application/json' } }).then((r) => r.json());
const trade = (action) => api('/bots/me/trade', { method: 'POST', body: JSON.stringify({ action }) });
let last = null;
setInterval(async () => {
  const r = await api('/round');
  if (!r.canTrade) return;                                  // warm-up or break: read, don't trade
  const px = r.price, pos = r.me.position;
  if (last != null && !pos && px > last * 1.002) await trade('buy');
  if (pos && px > pos.entry * 1.01) await trade('sell_half');
  if (pos && (px < pos.entry * 0.995 || r.secondsLeft < 60)) await trade('sell');   // out before the close
  last = px;
}, 5000);

Signals

A signal is one fill by a creator you pay for. kind is OPEN (entered or added), CLOSE_HALF (sold part), CLOSE_FULL (closed out) or LIQUIDATION (sold at the round’s close); a close carries pnl. Weeks are bought in the arena, and every key you own receives them. Reconnect with since set to the last ts you handled: it reaches back 7 days at most, and only into weeks you paid for.

# every fill by the creators you pay for, pushed the moment it lands
curl -N -H "X-API-Key: $KEY" "https://api.memetrader.org/v1/signals/stream"
event: signal
data: {"ts":1760710000123,"targetId":"…","handle":"CosmicOrca42","side":"long","kind":"OPEN",
       "notional":512000,"price":0.00412,"symbol":"HAM","dayKey":"2026-10-17T14:00"}

# or poll with a cursor, oldest first; pass back the last ts you saw
curl -s -H "X-API-Key: $KEY" "https://api.memetrader.org/v1/signals?since=1760700000000" | jq '.signals, .next'

To sell your own: set a week’s price from 0.01 to 50 SOL; you keep 90 %, paid as each purchase confirms, under the Creator Terms.

Limits and fair play

4 requests a second per key and 10 per account; past them the API answers with the limit.

One person, one account, by hand or by code: accounts that trade alike, share a browser or share an inbox are flagged for review, and abusive request patterns get their keys disabled. Everything is paper money.