API

.mdOpenAPI

Guide

Authentication and API keys

Most endpoints need no key. An API key raises your limits and gives your server your balance, ledger and orders, and orders paid from the balance.

Public endpoints need nothing. Create an API key when you want higher limits, or to work with your FeeBolt account from a server: read the balance, the ledger and your orders, and rent energy paid from the balance.

Create a key

  1. Sign in and open Settings › API keys in the app.
  2. Name the key and pick its scopes. read: balance, ledger and orders. order: rent energy paid from your balance.
  3. Copy the key. It is shown once: we keep only a hash, so it can't be shown again. Lost it? Revoke it and create another.

An account can have 10 active keys (names up to 40 characters). Use one per server or environment, so you can revoke one without touching the others.

Send it

Put the key in the Authorization header as a bearer token, on server-to-server calls only. Keep it out of browsers, apps and repositories.

Check a key
curl https://feebolt.com/api/me \
  -H "Authorization: Bearer $FEEBOLT_API_KEY"
JavaScript
const res = await fetch("https://feebolt.com/api/me/balance", {
  headers: { Authorization: `Bearer ${process.env.FEEBOLT_API_KEY}` },
});
const { balances } = await res.json();

Scopes

ScopeAllows
readBalance, ledger, your orders.
orderOrders paid from the balance. This spends money: give it only to servers that need it.
—Withdrawals are never possible with a key. They stay in the app, behind your sign-in.

Every key can call Who am I and the optional-key endpoints, whatever its scopes.

Which endpoints take a key

EndpointWhatAccess
GET /api/priceCurrent pricesOptional key
POST /api/quoteGet a quoteOptional key
POST /api/ordersCreate an orderOptional key
GET /api/orders/{id}Retrieve an orderOptional key
GET /api/meWho am IAPI key
GET /api/me/balanceGet the balanceAPI key (read)
GET /api/me/ledgerList ledger entriesAPI key (read)
GET /api/me/ordersList your ordersAPI key (read)
POST /api/me/ordersCreate an order paid from the balanceAPI key (order)
POST /api/check-addressCheck an addressOptional key
POST /api/freeze-checkCheck a USDT freezeOptional key
GET /api/tx-feeWhat a transaction paidOptional key
POST /api/send/quoteQuote a sendOptional key
POST /api/send/prepareStart a sendOptional key
GET /api/send/status/{id}Follow a sendOptional key
GET /api/fee-todayUSDT fee todayPublic
GET /api/data/energy-indexEnergy Price IndexPublic
GET /api/data/energy-index.csvEnergy Price Index (CSV)Public
GET /api/statusService statusPublic
GET /api/status/historyStatus historyPublic

Rules

  • A bad, revoked or closed-account key is refused with 401 or 403 on every endpoint that takes keys. It is never silently ignored, so a typo can't downgrade you to per-IP limits unnoticed.
  • Cookies never authenticate a key endpoint, and a key needs no CSRF token. The app's own routes (/api/account/*) take the session only; a key can't manage keys.
  • Revoking a key stops it at once. Closing your account revokes all its keys.
  • Creating and revoking keys, and every order a key pays from the balance, is recorded in your account's security log.
  • With a key, optional-key endpoints are limited per key at 5× the per-IP limits; see rate limits.

Errors

HTTPerrorWhen
401missing_api_keyThis endpoint needs an API key: Authorization: Bearer fb_live_….
401invalid_api_keyThe key is malformed or unknown. A bad key is refused on every endpoint that takes keys, never ignored.
401api_key_revokedThe key was revoked in Settings › API keys.
403insufficient_scopeThe key lacks the scope this endpoint needs (read or order).
403account_closedThe key's account is closed.

401 answers carry WWW-Authenticate: Bearer.