AnchorFX exposes a public, read-only REST API for escrow data, FX rates, analytics, and audit records — plus an authenticated fee sponsorship endpoint for gasless settlement. All endpoints are rate-limited per IP and validated against the on-chain contract.
/api/escrowscontract (optional)List all escrows from the on-chain contract. Accepts an optional ?contract= override.
/api/escrows/api/ratesoracle (optional)Live FX rates published on the oracle contract. Accepts an optional ?oracle= override.
/api/rates/api/fxroutefrom · to · amountQuote a cross-border route: estimated receive amount, fee, and settlement path.
/api/fxroute?from=US&to=PH&amount=1000/api/analyticscontract (optional)Aggregated on-chain analytics: escrow counts by status, total volume, events.
/api/analytics/api/healthcontract (optional)Health check for the RPC endpoint and escrow contract.
/api/health/api/auditcontract (optional)Audit trail of contract events for compliance and record-keeping.
/api/audit/api/eventscontract (optional)Server-Sent Events stream of live contract events (escrow created, settled, etc.).
/api/events?contract=<CONTRACT_ID>/api/exportformat=csv|jsonExport all escrows as CSV or JSON for record-keeping and analysis.
/api/export?format=csv/api/sponsorxdr (body)Fee sponsorship — submit a transaction XDR and AnchorFX pays the network fee (gasless users).
POST /api/sponsor { "xdr": "AAAA..." }/api/feedbackno paramsIn-memory product feedback captured from the in-app widget (session-scoped).
/api/feedbackExample — Escrow Lookup
curl -s https://anchorfx.vercel.app/api/escrows | jq
{
"escrows": [
{
"id": 1,
"sender": "G...",
"receiver": "G...",
"token": "C...",
"amount": "1000",
"fxRate": 56400,
"corridor": 1,
"status": "Settled"
}
],
"count": 1
}