API
JSON over HTTPS. Keys are issued by an admin.
Getting started
- 1Create an account
- 2Request access from your account page
- 3Once approved, create your secret key
curl https://api.fmze.dev/v1/stats \ -H "X-API-Key: fmze_your_key"
Conventions
- Base URL
https://api.fmze.dev/v1- Auth
X-API-Keyheader orAuthorization: Bearer- Amounts
- Integers in litoshis (1 LTC =
100000000) - Pages
?page=returns{ items, page, pageSize, total }- Errors
{ "error": "..." }with a 4xx or 5xx status- Rate limits
- Per key, per minute. Check
X-RateLimit-Remaining.
Permissions
explorer- Read blocks, transactions, addresses and network stats
broadcast- Broadcast signed raw transactions
wallet:read- Read wallet balance, addresses and transactions
wallet:receive- Create new receiving addresses
wallet:send- Send LTC from the wallet
Network
/statsexplorerHeight, hashrate, difficulty, supply, mempool, fees, price, difficulty adjustment and halving.
/feesexplorerRecommended fee rates in lit/vB to confirm within about 5 minutes (fast), 15 minutes (medium) and an hour (slow), and the minimum nodes relay.
/priceexplorerLTC/USD and the 24 hour change.
/difficultyexplorerProgress to the next difficulty adjustment and the estimated change.
/halvingexplorerNext halving height, blocks left and estimated date.
/mining/pools?period=1dexplorerBlocks found per pool. period is 1d or 1w.
/search?q={query}explorerFinds a block height, block hash, txid or address. Returns { type, id }.
Blocks
/blocks?page={n}explorerLatest blocks, 25 per page.
/blocks/tipexplorerHeight, hash and time of the latest block.
/blocks/{height|hash}?page={n}explorerA block with 25 of its transactions per page.
/blocks/{height|hash}/txidsexplorerEvery transaction ID in the block.
/blocks/{height|hash}/hexexplorerThe raw block.
Transactions
/tx/{txid}explorerInputs with values, outputs with spent status, fee and confirmations.
/tx/{txid}/statusexplorerConfirmed or not, confirmations and block. Cheap to poll.
/tx/{txid}/hexexplorerThe raw transaction.
/tx/decodeexplorerDecodes a raw transaction without sending it.
{ "hex": "0200000001..." }/tx/broadcastbroadcastSends a signed transaction. Returns { txid }.
{ "hex": "0200000001..." }Mempool
/mempoolexplorerSize, total fees, fee rate buckets, the block the node would mine next and the latest transactions.
/mempool/txidsexplorerEvery transaction ID waiting in the mempool.
Addresses
/address/{address}?page={n}explorerBalance, totals and history with the change per transaction.
/address/{address}/utxosexplorerUnspent outputs.
/address/{address}/validateexplorerWhether the address is valid, and its type.
/addresses/balancesexplorerBalances for up to 100 addresses.
{ "addresses": ["ltc1q...", "M8T1..."] }Address watches
/watchesexplorerAddresses this key is watching.
/watchesexplorerWatch an address. Up to 1,000 per key.
{ "address": "ltc1q...", "label": "order-1042" }/watches/{id}explorerStop watching.
Wallet
/walletwallet:readSpendable, pending and immature balance.
/wallet/addresses?page={n}wallet:readReceiving addresses and what each has received.
/wallet/addresseswallet:receiveNew receiving address. type is bech32 (default), mweb, p2sh-segwit or legacy.
{ "label": "order-1042", "type": "bech32" }/wallet/transactions?page={n}wallet:readWallet transactions, newest first.
/wallet/transactions/{txid}wallet:readOne wallet transaction.
/wallet/utxoswallet:readUnspent outputs in the wallet.
/wallet/send/estimatewallet:sendThe fee a send would pay, without sending. Same body as /wallet/send.
/wallet/sendwallet:sendPays one or more addresses in one transaction. Use an Idempotency-Key header so a retry never pays twice.
{
"to": [{ "address": "ltc1q...", "amount": 150000000 }],
"subtractFee": false,
"feeRate": 10,
"comment": "payout 77"
}Webhooks
address.transaction- A watched address sends or receives
wallet.transaction- The key's linked wallet sends or receives
- Sent at
- 0, 1 and 6 confirmations
- Signature
X-Fmze-Signature: HMAC-SHA256 of{X-Fmze-Timestamp}.{body}- Retries
- Up to 8 times over about 2 hours
{
"event": "address.transaction",
"address": "ltc1q...",
"label": "order-1042",
"txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"amount": 150000000,
"confirmations": 1,
"blockHeight": 3104233
}import { createHmac, timingSafeEqual } from 'node:crypto';
export function verifyWebhook(rawBody, headers, secret) {
const expected = 'sha256=' + createHmac('sha256', secret)
.update(headers['x-fmze-timestamp'] + '.' + rawBody)
.digest('hex');
const given = headers['x-fmze-signature'] ?? '';
return given.length === expected.length &&
timingSafeEqual(Buffer.from(given), Buffer.from(expected));
}