Documentation

API Reference

StablecoinRoadmap API

Endpoints verified in the codebase today. The /api/v1 routes are sandbox-only and require API keys.

Quick start

All v1 endpoints expect a Bearer token. Your base URL matches the deployment you are viewing.

Base URL: https://api.stablecoinroadmap.com
curl -X GET "https://api.stablecoinroadmap.com/api/v1/wallets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Sandbox-only endpoints are available in /api/v1. Use /api/metric for dashboard metrics.

Authentication

All /api/v1 endpoints require an Authorization header using a Bearer token. Requests without a valid key return 401.

Authorization: Bearer YOUR_API_KEY

Authentication flow:

  • • Generate a sandbox key in API Composer or your account settings.
  • • Store the key in STABLECOIN_API_KEY.
  • • Use the key in request headers for all /api/v1 calls.

Pagination & rate limits

Pagination uses limit + offset query params:

GET https://api.stablecoinroadmap.com/api/v1/payments?limit=10&offset=0
Rate limits may apply in sandbox. If enforced, responses include rate-limit headers (for exampleX-RateLimit-Remaining). Back off on 429 responses.

Base paths

/api/v1

The sandbox wallet, payment, and balance endpoints live under /api/v1. Metrics data uses /api/metric.

SDK quick snippets

JavaScript (Node)

import { StablecoinSDK } from "@stablecoin/sdk";

const api = new StablecoinSDK({
  apiKey: process.env.STABLECOIN_API_KEY,
  environment: "sandbox"
});

const wallet = await api.wallets.create({ chain: "base", label: "Treasury" });
const balances = await api.balances.list();

Python

from stablecoin_sdk import StablecoinSDK
import os

api = StablecoinSDK(api_key=os.getenv("STABLECOIN_API_KEY"), environment="sandbox")
wallet = api.wallets.create(chain="base", label="Treasury")
balances = api.balances.list()

Wallets

POST/api/v1/wallets

Create a sandbox wallet for a supported chain.

  • Required body fields: chain (ethereum, polygon, base, solana).
  • Optional body fields: label.
  • Returns an id, address, chain, and balance.

Sample response (synthetic)

{
  "id": "wal_3f2d1",
  "address": "0x5f3b...7a1c",
  "chain": "base",
  "label": "Treasury Wallet",
  "balance": "1000.00",
  "createdAt": "2025-12-12T12:30:00Z"
}
GET/api/v1/wallets

List all sandbox wallets for the API key.

  • Returns wallets and total count.
  • Sandbox-only: returns 403 for non-sandbox keys.

Sample response (synthetic)

{
  "count": 2,
  "data": [{ "id": "item_1" }, { "id": "item_2" }]
}
GET/api/v1/wallets/:id

Fetch a single wallet by id.

  • Returns 404 if the wallet is missing.
  • Sandbox-only: returns 403 for non-sandbox keys.

Sample response (synthetic)

{
  "count": 2,
  "data": [{ "id": "item_1" }, { "id": "item_2" }]
}
GET/api/v1/wallets/:id/balance

Fetch stablecoin balances for a single wallet.

  • Returns balances for USDC, USDT, and DAI in the sandbox mock store.
  • Sandbox-only: returns 403 for non-sandbox keys.

Sample response (synthetic)

{
  "count": 2,
  "data": [{ "id": "item_1" }, { "id": "item_2" }]
}

Payments

POST/api/v1/payments

Create a sandbox payment and receive a mock transaction hash.

  • Required body fields: amount, stablecoin, toAddress, chain.
  • Optional body field: metadata.
  • Returns a confirmed payment object with fees.

Sample response (synthetic)

{
  "id": "pay_91a8d",
  "status": "confirmed",
  "amount": "250.00",
  "stablecoin": "USDC",
  "chain": "base",
  "txHash": "0x83e7...9b1c",
  "fees": "0.05"
}
GET/api/v1/payments?limit=10&offset=0

List payments with pagination.

  • limit defaults to 10; offset defaults to 0.
  • Sandbox-only: returns 403 for non-sandbox keys.

Sample response (synthetic)

{
  "count": 2,
  "data": [{ "id": "item_1" }, { "id": "item_2" }]
}
GET/api/v1/payments/:id

Fetch a single payment by id.

  • Returns 404 if the payment is missing.
  • Sandbox-only: returns 403 for non-sandbox keys.

Sample response (synthetic)

{
  "count": 2,
  "data": [{ "id": "item_1" }, { "id": "item_2" }]
}

Balances

GET/api/v1/balances

List aggregated balances across sandbox wallets.

  • Returns balances for USDC, USDT, and DAI with totalUSD.
  • Sandbox-only: returns 403 for non-sandbox keys.

Sample response (synthetic)

{
  "count": 2,
  "data": [{ "id": "item_1" }, { "id": "item_2" }]
}

Metrics endpoint

GET/api/metric/:metricId?range=30d

Fetch metrics points and latest values for the Stablecoin Metrics dashboard.

  • range supports 7d, 30d, 90d, and 1y.
  • Returns metric definition, points, latest, and source (live/sample).

Sample response (synthetic)

{
  "metricId": "total_supply_usd",
  "range": "30d",
  "latest": { "value": 168500000000, "timestamp": "2025-12-12T00:00:00Z" },
  "source": "sample",
  "points": [
    { "timestamp": "2025-12-05", "value": 166200000000 },
    { "timestamp": "2025-12-12", "value": 168500000000 }
  ]
}

Error handling

Common error codes:

  • • 400 — Invalid request payload
  • • 401 — Missing or invalid API key
  • • 403 — Sandbox-only endpoint accessed with production key
  • • 404 — Resource not found
  • • 429 — Rate limit exceeded
  • • 500 — Internal error
{
  "error": "Invalid request payload",
  "code": "invalid_request",
  "requestId": "req_8b1c2"
}

Need help integrating?

Use the API Composer to generate starter code or reach out via the contact form.