REST API
GET /rates, POST /quote, POST /buy, POST /sell, GET /order/:id.
Accept PIX. Deliver digital dollars. Receive stablecoins. Pay out PIX.
OpenAPI JSONGET /rates, POST /quote, POST /buy, POST /sell, GET /order/:id.
payment.created, payment.completed, payment.failed, order.confirmed, crypto.sent, crypto.confirmed, order.failed.
Use sk_test_chainfx_local with fake PIX, fake QR, fake wallet and simulated webhook payloads.
Authorization: Bearer sk_live_xxx or sk_test_xxx. Configure live keys with CHAINFX_LIVE_SECRET_KEYS.
Phase 3 includes Node and Python SDKs in the repository. Go and PHP stay on the roadmap.
Use /readyz for backend readiness and /rates for rate availability.
Phase 2: /developers/dashboard?apiKey=sk_live_xxx with API keys, logs and webhook retry operations.
GET /developers/logs reads recent buy/sell events from the gateway audit tables.
POST /webhooks/retry rebuilds a webhook payload from an order and optionally posts it to a target URL.
POST /quote
{
"side": "buy",
"fiat": "BRL",
"asset": "USDT",
"amount": 500
}
const order = await chainfx.buy({
fiat: "BRL",
asset: "USDT",
amount: 500,
wallet: "0x..."
});