Last reviewed: 2026-08-26
End-to-end recipes against the live API. Base URL in examples:
https://stellar-intel.vercel.app (swap for http://localhost:3000 in dev).
Endpoints and shapes are defined in code — see
app/api/anddocs/INTENT_API.md. The generated OpenAPI surface lives inlib/api/openapi.ts(npm run emit-openapi).
curl -s "https://stellar-intel.vercel.app/api/rates/usdc-ngn?amount=100" | jqReturns one row per anchor with exchangeRate, fee, totalReceived, source
(sep38 firm, sep24-fee/sep6-info indicative), plus an errors[] array
explaining any anchor that could not quote.
# 1. Canonicalize the intent fields below, sha-256, ed25519-sign via Freighter
# (client-side) to get `signature` + `publicKey`. Signing is optional — see
# docs/INTENT_API.md — omit both fields to route unattested.
# 2. POST the intent (flat fields, no wrapping object; the server recomputes
# the canonical hash itself, so it is never sent on the wire):
curl -sX POST https://stellar-intel.vercel.app/api/intent/offramp \
-H 'content-type: application/json' \
-d '{
"type": "offramp",
"sourceAsset": "USDC",
"destinationAsset": "NGN",
"amount": "100",
"sender": "GAB…",
"recipient": "0800-123-456",
"signature": "<base64>",
"publicKey": "GAB…"
}'Returns { route, unsignedTx, quoteId } on success. See
docs/INTENT_API.md for the exact canonicalization/signing
steps and docs/CANONICAL_JSON.md for the hashing rules.
# One anchor
curl -s https://stellar-intel.vercel.app/api/reputation/cowrie | jq
# Per-corridor leaderboard
curl -s "https://stellar-intel.vercel.app/api/reputation/leaderboard?corridor=usdc-ngn" | jq
# History window
curl -s "https://stellar-intel.vercel.app/api/reputation/cowrie/history?window=30d" | jqScore formula: fillRate × (1 − slippage) ÷ (settleSeconds / 300) — see
docs/ANCHOR_REPUTATION.md.
Run the MCP server and let an agent price/compare, then sign with the user's
wallet to execute. See docs/MCP.md for the npx tsx scripts/mcp/server.ts
run command and tool list. The agent cannot spend without a user signature.
Read anchor scores directly from the Soroban contract
(contracts/reputation/) — no deploy or funded
account required, every call is a pure simulateTransaction against the live
testnet oracle:
node examples/consumer-contract/read-oracle.mjs cowrie usdc-ngnPrints list_anchors, get_score_for_corridor, and get_corridor_aggregate
straight from testnet, using the same pattern as the app's
lib/oracle/read.ts. To call the oracle from inside
another Soroban contract instead of a client script, see
examples/consumer-contract/README.md
for the build/deploy/invoke steps. Entrypoints are documented in
docs/ORACLE_SPEC.md. A published JS/Python SDK wrapper
around this is tracked on the roadmap; until then this script is the
zero-setup path to live data.
node scripts/anchor-survey.mjs # human summary
node scripts/anchor-survey.mjs --json # machine outputClassifies directory anchors by SEP support — see
docs/SEP_COMPLIANCE.md.