Quickstart

Mangrove meets you where you are. Pick the path that matches how you build.

Path A — REST API (any language)

Use the MangroveAI REST API directly. Best for backend integrations and language-agnostic clients.
1

Sign up and get an API key

Create an account at the Developer Portal. Go to Settings → API Keys and generate a key.
2

List signals

curl -H "Authorization: Bearer $MANGROVE_API_KEY" \
  "https://api.mangrovedeveloper.ai/api/v1/signals?limit=10"
3

Create a strategy and run a backtest

See the API Reference for the full request schema.

Path B — Python SDK (mangroveai)

The mangroveai package wraps the REST API with a typed Python client.
pip install mangroveai
from mangroveai import MangroveAI

client = MangroveAI()  # reads MANGROVE_API_KEY from env

# Discover signals
signals = client.signals.list(category="momentum", limit=10)

# Create a strategy
strategy = client.strategies.create(
    name="RSI mean reversion",
    entry_rules={
        "trigger": {"name": "rsi_oversold", "params": {"window": 14, "threshold": 30}},
        "filter":  {"name": "is_above_sma",  "params": {"window": 200}},
    },
)

# Run a backtest
result = client.backtesting.run(strategy_id=strategy.id, symbol="BTC-USD", timeframe="1h")
print(result.metrics)
Full reference: mangroveai SDK.

Path C — Local signals + indicators (mangrove-kb)

The open-source mangrove-kb package lets you compute signals and indicators directly from a DataFrame, no API call required. Useful for research, backtesting locally, or embedding signals in your own pipeline.
pip install mangrove-kb
from mangrove_kb import RuleRegistry, sample_ohlcv
from mangrove_kb.indicators import RSI

# Self-contained sample data — no file or download needed.
# Bring your own with: df = pd.read_csv("your_ohlcv.csv")  # columns: Open, High, Low, Close, Volume
df = sample_ohlcv()

# Compute an indicator
rsi = RSI.compute({"close": df["Close"]}, {"window": 14})["rsi"]

# Evaluate a signal
fired = RuleRegistry.evaluate(
    {"name": "rsi_oversold", "params": {"window": 14, "threshold": 30}},
    df,
)
Full reference: mangrove-kb SDK.

Path D — Agent (MCP)

Connect any MCP-capable agent (Claude, custom client, OpenClaw runtime) to one of the Mangrove MCP servers over Streamable HTTP.
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(
  new StreamableHTTPClientTransport(new URL("https://api.mangrovemarkets.com/mcp"))
);

const quote = await client.callTool({
  name: "dex_get_quote",
  arguments: { input_token: "USDC", output_token: "ETH", amount: 1000000000, chain_id: 8453 },
});
Available servers: MangroveMarkets, MangroveTrader, MangroveKnowledgeBase.

Path E — TypeScript / DEX swaps (@mangrove-ai/sdk)

For DEX aggregation, marketplace, and wallet operations from TypeScript or Node.
npm install @mangrove-ai/sdk
import { MangroveClient } from "@mangrove-ai/sdk";

const client = new MangroveClient({
  url: "https://api.mangrovemarkets.com",
  signer,                 // implements Signer interface
  transport: "mcp",       // or "rest"
});
await client.connect();

const result = await client.dex.swap({
  src: "0xA0b8...",       // USDC on Base
  dst: "0xEeee...",       // ETH
  amount: "1000000000",
  chainId: 8453,
  slippage: 0.5,
});
Full reference: @mangrove-ai/sdk.

Path F — Turnkey agent template (Mangrove Agent)

If you want a working trading bot you can deploy rather than build from scratch, clone the mangrove-agent template. FastAPI + MCP, cron-driven execution, full audit trail.
git clone https://github.com/MangroveTechnologies/mangrove-agent.git
cd mangrove-agent
./scripts/setup.sh   # prompts for your MANGROVE_API_KEY, sets up venv, starts uvicorn
Full reference: Mangrove Agent.

Next steps