Developer Documentation

Build on MÓOU.

Integrate MÓOU into agents, bots, and internal tools. REST API, MCP server, OpenAPI spec, and a copy-paste LLM integration prompt. No API key during the hackathon.

Using MÓOU as a trader? See the User Guide — Playbook deploy paths are documented there, not here.

Three ways to integrate

  • REST API POST /compile, /score, /deploy-prompt
  • MCP server moou_compile, moou_score, moou_deploy_prompt for Cursor, Grok Build, Claude Code, Windsurf, Cline
  • Integration prompt — paste into ChatGPT, Claude, Grok, Codex, Gemini, or any chat LLM

Get Started in 5 Steps

  1. Try the web app — no API key, no rate limit
  2. GET /health — confirm the API is operational
  3. GET /markets — valid market, timeframe, regime labels
  4. POST /compile — your first programmatic compile
  5. Optional: MCP server (Cursor, Grok Build, Claude Code) or integration prompt (Codex, ChatGPT, Gemini)

LLM Integration Prompt

Drop this into ChatGPT, Claude, Grok, Codex, Gemini, or any LLM to fast-track API integration. Edit the last line with your goal before pasting. Also in INTEGRATION_PROMPT.md on GitHub.

You are helping me integrate with MÓOU (谋) — a natural language trading strategy compiler and risk scoring API.

## MÓOU API

Base URL: https://usemoou.xyz/api/v1
Auth: None (hackathon period)
Docs: https://usemoou.xyz/docs
OpenAPI: https://usemoou.xyz/api/v1/openapi

Rate limit: 30 POST requests per IP per hour on /compile and /score.
The website UI (usemoou.xyz) has no rate limit — only the public API is capped.
/deploy-prompt is not rate-limited and uses no AI tokens.

## Your job

Help me compile trading ideas into structured strategy specs with risk scores, then optionally deploy to Bitget Playbook.

## Workflow

1. Verify API: GET /health → expect status "operational"
2. Discover inputs: GET /markets → use label strings (not ids) for market, timeframe, regime
3. Compile: POST /compile with JSON body:
   {
     "strategy": "<plain English trading idea, 20+ chars>",
     "market": "Crypto Futures | Crypto Spot | US Stocks (Tokenized)",
     "timeframe": "Scalp (1–15m) | Swing (1H–4H) | Position (Daily+)",
     "regime": "Trending Up | Trending Down | Ranging | Unclear"
   }
4. Response includes: strategy_name, entry_conditions, exit_conditions, position_sizing, market_regime, playbook_format, risk (5 dimensions + verdict), meta
5. Optional — score only: POST /score with existing strategy object + market + timeframe
6. Optional — Playbook deploy: POST /deploy-prompt with strategy + risk → returns prompt, studio_prompt, getagent_studio URL

## MCP (agent IDEs)

MÓOU has an MCP server with tools: moou_compile, moou_score, moou_deploy_prompt
Works in: Cursor, Claude Code, Grok Build, Windsurf, Cline, and any MCP-compatible client
Setup: https://github.com/mojeebdev/moou/tree/main/mcp-server

## Bitget Playbook deploy (after compile)

Path A — Quick: copy playbook_format from compile response into Bitget Playbook UI

Path B — Coding agent:
1. User obtains Playbook API Key from Bitget Playbook → Create Agent
2. Install: npm package @bitget-ai/getagent-skill
3. Use the deploy prompt from /deploy-prompt or MÓOU web UI "Copy getagent Deploy Prompt"
4. getagent uploads, backtests, and publishes to Playbook explore

Path C — GetAgent Studio (paper trading):
1. Open https://getagent.studio/ — free, sign in with Bitget account
2. Use studio_prompt from POST /deploy-prompt or MÓOU "Copy Studio Paper-Trade Prompt"
3. Run backtest + paper trading → submit public Studio strategy link + performance metrics

## Error handling

All errors: { "error": { "code": "...", "message": "...", "docs": "https://usemoou.xyz/docs" } }
Codes: MISSING_FIELDS (400), INVALID_MARKET (400), RATE_LIMIT_EXCEEDED (429), COMPILATION_FAILED (500), SCORING_FAILED (500)

## Support

Email: support@usemoou.xyz
GitHub Issues: https://github.com/mojeebdev/moou/issues
X: @tmojeeb
Bitget Hackathon Telegram: https://t.me/+o1tYqQ_lXxllYjgy

## Rules for you

- Always use the public API base URL above — do not invent endpoints
- Show me the exact curl or fetch call before running it
- After compile, summarize: strategy name, risk verdict, overall score, and playbook_format
- If rate limited, suggest using the web UI at usemoou.xyz (unlimited) or waiting 1 hour
- Never expose or request my API keys unless I am deploying to Playbook (Playbook API Key only)

My goal: [describe what you want to build — e.g. "compile this RSI strategy and generate a Playbook deploy prompt"]

Base URL

https://usemoou.xyz/api/v1

Endpoints

GET

/health

Check API status and version.

{
  "status": "operational",
  "model": "qwen3.6-plus",
  "version": "1.0.0",
  "timestamp": "2026-06-13T11:32:55Z",
  "powered_by": "MÓOU 谋 · usemoou.xyz"
}
GET

/markets

Returns all supported markets, timeframes and market regimes.

GET

/stats

Returns total strategies compiled.

{
  "total_compilations": 1247,
  "status": "operational",
  "version": "1.0.0"
}
POST

/compile

Compile a plain-English trading strategy into a structured spec with risk scoring.

Typical latency: 15–30 seconds.

Request Body

{
  "strategy": "string (required) — your trade idea in plain English",
  "market": "string (required) — Crypto Futures | Crypto Spot | US Stocks (Tokenized)",
  "timeframe": "string (required) — Scalp (1–15m) | Swing (1H–4H) | Position (Daily+)",
  "regime": "string (required) — Trending Up | Trending Down | Ranging | Unclear"
}

Response

{
  "strategy_name": "Sixty-Two Range Reversal",
  "entry_conditions": "Place a limit buy...",
  "exit_conditions": "Deploy a hard stop loss...",
  "position_sizing": "Allocate exactly 2%...",
  "market_regime": "ranging",
  "regime_description": "Performs best when...",
  "playbook_format": "Exploit established...",
  "risk": {
    "overall_score": 55,
    "verdict": "MODERATE",
    "volatility_exposure": 75,
    "volatility_note": "...",
    "drawdown_risk": 40,
    "drawdown_note": "...",
    "leverage_sensitivity": 65,
    "leverage_note": "...",
    "regime_dependency": 75,
    "regime_note": "...",
    "execution_complexity": 50,
    "execution_note": "..."
  },
  "meta": {
    "compiled_at": "2026-06-13T11:32:55Z",
    "model": "qwen3.6-plus",
    "version": "1.0.0",
    "processing_ms": 1243,
    "powered_by": "MÓOU 谋",
    "docs": "https://usemoou.xyz/docs"
  }
}

Try it

curl -X POST https://usemoou.xyz/api/v1/compile \
  -H "Content-Type: application/json" \
  -d '{
    "strategy": "Buy BTC when RSI drops below 30 on the 4H chart with funding rates negative for 3 consecutive hours",
    "market": "Crypto Futures",
    "timeframe": "Swing (1H-4H)",
    "regime": "Ranging"
  }'

Error Codes

CodeStatusDescription
MISSING_FIELDS400Required field missing
INVALID_MARKET400Unrecognized market value
RATE_LIMIT_EXCEEDED42930 req/hour per IP (API only)
COMPILATION_FAILED500AI model error
POST

/score

Score risk for an existing structured strategy. Composable primitive for agents that already have a spec.

{
  "strategy": {
    "strategy_name": "...",
    "entry_conditions": "...",
    "exit_conditions": "...",
    "position_sizing": "..."
  },
  "market": "Crypto Futures",
  "timeframe": "Swing (1H-4H)"
}
POST

/deploy-prompt — Playbook Bridge

Closes the loop from MÓOU compile → Bitget Playbook. Returns prompt (getagent skill, Path B) and studio_prompt (GetAgent Studio paper trading, Path C — free at getagent.studio). Pass your own playbook_key to embed in the getagent prompt — never stored. Not rate-limited.

// Response includes:
{
  "prompt": "...",
  "studio_prompt": "...",
  "getagent_studio": "https://getagent.studio/",
  "getagent_skill": "https://www.npmjs.com/package/@bitget-ai/getagent-skill",
  "playbook_explore": "https://www.bitget.com/activity/ai-get-agent/playbook?tab=explore"
}
GET

/openapi

OpenAPI 3.1 specification for client generation and agent discovery.

MCP Server

Tools: moou_compile, moou_score, moou_deploy_prompt.

MCP clients: Cursor · Grok Build · Claude Code · Windsurf · Cline
Chat LLMs (use integration prompt above): ChatGPT · Codex · Grok · Gemini · Claude
Setup: mcp-server/README.md

Rate Limits

30 requests per IP per hour on POST /compile and POST /score. The website UI is unlimited. Each compile uses ~2 Qwen calls (~3–5k tokens). POST /deploy-prompt is free.

Support

support@usemoou.xyz · GitHub Issues · @tmojeeb · Bitget Hackathon Telegram

MÓOU 谋 is built for the Bitget AI Base Camp Hackathon S1 — Track 2: Trading Infra. Powered by Qwen3.6-plus via Bitget's hackathon API proxy.