MoonMaker API

Agent Integration

How AI agents can discover and use MoonMaker API

Agent Integration Guide

MoonMaker is designed for AI agents. This guide covers how agents discover, understand, and use the API.

Discovery

When an AI agent visits moonmaker.cc, it can find:

ResourceURLPurpose
llms.txt/llms.txtAI-readable site overview
OpenAPI/openapi.jsonMachine-parseable API spec
agents.json/.well-known/agents.jsonAgent discovery metadata
Docs/docsHuman-readable documentation

The API itself also provides discovery at its root:

curl https://api.moonmaker.cc/

Returns all endpoints, pricing, and documentation links.

Agent Flow

1. DISCOVER
   Agent finds moonmaker.cc via search, ClawHub, or direct reference
   → Reads /llms.txt or /.well-known/agents.json

2. UNDERSTAND
   Agent parses /openapi.json for endpoint details
   → Knows: endpoints, parameters, response schemas, pricing

3. CHECK
   Agent hits free endpoints to verify service is live
   → GET /health → 200 OK
   → GET / → endpoint listing

4. PAY & USE
   Agent calls paid endpoint with x402 wallet
   → GET /signal/BTC → 402 → auto-pay → 200 + data

5. ACT
   Agent uses signal data for trading decisions
   → direction, confidence, entry/SL/TP levels

x402 for Agents

The x402 protocol is ideal for agent-to-agent commerce:

  • No credentials to manage — No API keys to store or rotate
  • Programmatic payment — Wallet handles payment automatically
  • Micropayments — $0.02~$0.10 per call, no minimum commitment
  • Permissionless — Any agent with USDC on Base can use it

Setting up x402 in your agent

# 1. Create or load a Base L2 wallet
from cdp import Wallet
wallet = Wallet.create(network_id="base-mainnet")

# 2. Fund with USDC (bridge from any chain or buy)
# Minimum: $0.01 USDC + tiny ETH for gas

# 3. Make authenticated requests
from x402.client import x402_fetch
response = x402_fetch(
    "https://api.moonmaker.cc/signal/BTC",
    wallet=wallet
)

OpenClaw Integration

As a Skill

Install the moonmaker skill to give your OpenClaw agent access:

# In your OpenClaw config, add the moonmaker skill
# The agent will then know how to call MoonMaker API

Direct Usage

OpenClaw agents can use web_fetch for free endpoints:

# Free: check service
web_fetch("https://api.moonmaker.cc/")
web_fetch("https://api.moonmaker.cc/health")

# Free: read API documentation
web_fetch("https://moonmaker.cc/llms.txt")

Use Cases for Agents

  • Trading bot: Get signals → execute trades automatically
  • Portfolio manager: Monitor market overview → rebalance
  • Research agent: Track ETF flows → generate reports
  • Alert agent: Check signals periodically → notify owner on strong signals
  • Multi-source aggregator: Combine MoonMaker signals with other data sources

Wallet Funding

Your agent needs USDC on Base for x402 payments. Three funding paths:

1. USDC Direct Transfer

Send USDC on Base to your agent's wallet. Works if you already hold USDC.

2. ETH → PayGate (Auto-Swap)

Send ETH to the PayGate contract on Base. It swaps to USDC and returns it to the sender.

PayGate: 0x8dcFb0F5981BE9B8943C6d6aeeed6000C44B0583
from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://mainnet.base.org"))
PAYGATE = "0x8dcFb0F5981BE9B8943C6d6aeeed6000C44B0583"

# Send ETH — USDC comes back to your wallet
tx = {
    "to": PAYGATE,
    "value": w3.to_wei(0.01, "ether"),
    "gas": 200_000,
}
signed = w3.eth.account.sign_transaction(tx, private_key=AGENT_PRIVATE_KEY)
w3.eth.send_raw_transaction(signed.raw_transaction)

3. Credit Card Onramp

Buy USDC on Base with a credit card via MoonPay or Coinbase Onramp. Set the destination to your agent's wallet address.

Requesting Funds from Owner

When balance is low, your agent can message its owner:

Wallet 0x...1234 needs more USDC on Base to pay for API calls.
Quickest option: send ETH to PayGate (0x8dcFb0F5981BE9B8943C6d6aeeed6000C44B0583) — auto-swaps to USDC.

Rate Limits

No rate limits currently. Be reasonable — the API updates every 15 minutes, so calling more frequently than that returns the same data.

On this page