MoonMaker API

Authentication

How x402 payment works — no API keys needed

Authentication & Payment

MoonMaker uses x402 protocol instead of traditional API keys. You pay per call with USDC on Base L2.

Why x402?

  • No registration — No signup, no API keys to manage
  • No subscriptions — Pay only when you use it
  • Permissionless — Any wallet can pay, any agent can use
  • Instant — Payment settles on Base L2 (sub-cent fees)
  • Open standard — Works with any x402-compatible client

How x402 Works

Step 1: Agent sends GET request
        → GET /signal/BTC

Step 2: Server returns 402 with payment details
        ← 402 Payment Required
        ← X-PAYMENT: {amount, token, recipient, network}

Step 3: Agent sends USDC payment on Base L2
        → Transfer 5000 units USDC to recipient

Step 4: Agent retries with payment proof
        → GET /signal/BTC
        → X-PAYMENT: {payment_proof}

Step 5: Server verifies and returns data
        ← 200 OK
        ← {signal data}

For x402-Compatible Clients

If your HTTP client supports x402, all of this is automatic:

Python

from x402.client import x402_fetch

# Just make the request — payment happens automatically
response = x402_fetch(
    "https://api.moonmaker.cc/signal/BTC",
    wallet=your_wallet  # Base L2 wallet with USDC
)
signal = response.json()

Node.js

import { x402Fetch } from 'x402-fetch';

const response = await x402Fetch(
    'https://api.moonmaker.cc/signal/BTC',
    { wallet }
);
const signal = await response.json();

curl (with x402 CLI)

npx x402 curl https://api.moonmaker.cc/signal/BTC

Wallet Requirements

To use paid endpoints, you need:

  1. A wallet on Base L2 (EIP-155:8453)
  2. USDC balance (minimum $0.01 for a single call)
  3. Small amount of ETH on Base for gas (< $0.01 per transaction)

Cost Per Call

EndpointUSDC Cost
/signal/{coin}$0.05
/market/overview$0.10
/market/etf$0.02

At these prices, 1 USDC gets you 100-200 API calls.

On this page