HTTP APIs available to agents and the Proof of Reserves / Token Explorer frontends. All endpoints return JSON. CORS is enabled for *.
When calling from a browser on this site, use relative paths (e.g. /api/reserves). From an external agent or script, use the full origin (e.g. https://www.solanaagent.app/api/reserves).
No authentication is required for the documented read and create endpoints; they are public.
Returns Bitcoin and Solana reserve addresses and balances.
Request: No parameters.
Response (200):
| Field | Type | Description |
|---|---|---|
bitcoin.address | string \| null | Reserve BTC address |
bitcoin.balanceBtc | number \| null | Balance in BTC |
bitcoin.balanceSat | number \| null | Balance in satoshis |
solana.address | string \| null | Reserve SOL address |
solana.balanceSol | number \| null | Balance in SOL |
curl "https://www.solanaagent.app/api/reserves"
Returns a dated message and Bitcoin/Solana signatures proving ownership of the reserve keys.
Response (200): message, timestamp, bitcoin.address, bitcoin.signature, solana.address, solana.signature.
Recent Bitcoin transactions for the reserve address (most recent first, up to 100).
Response (200): { "transactions": [ { "txid", "blockTime", "blockHeight" }, ... ] }
Recent Solana transactions for the reserve address.
Response (200): { "transactions": [ { "signature", "blockTime", "err" }, ... ] }
BTC/SOL prices (Hyperliquid) and ABSR supply (reserve sats, USD, on-chain token supply).
Response (200): btcPriceUsd, solPriceUsd, absrSupplySats, absrSupplyUsd, absrTokenSupply.
ABSR-related transactions (e.g. issue on swap completion).
Response (200): { "transactions": [ { "signature", "txId", "type", "amountSats", "amountUsd", "blockTime" }, ... ] }
Minimum amount for a currency pair.
Query: from, to (e.g. btc, eth, usdterc20, sol).
Response (200): { "from", "to", "minAmount": number | null }
Estimated output amount for a given input.
Query: from, to, amount (positive number).
Response (200): { "from", "to", "amount", "estimatedAmount": number | null }
Create a ChangeNOW exchange transaction. User sends from to the returned payin address and receives to at payoutAddress.
Body:
| Parameter | Type | Required |
|---|---|---|
from | string | Yes (e.g. btc, eth, sol) |
to | string | Yes |
amount | number | Yes (positive) |
payoutAddress | string | Yes (destination for "to" currency) |
Response (200): id, payinAddress, payinAmount, payinCurrency, status, statusUrl (tracker link).
curl -X POST "https://www.solanaagent.app/api/exchange/create" \
-H "Content-Type: application/json" \
-d '{"from":"btc","to":"eth","amount":0.01,"payoutAddress":"0x..."}'
Reserve SOL→BTC swap history (from Postgres).
Response (200): { "transactions": [ { "signature", "txId", "solAmount", "btcSats", "blockTime" }, ... ] }
Minimum SOL amount and current reserve SOL balance for SOL→BTC swap.
Response (200): { "minAmountSol", "balanceSol" }
Estimated BTC (sats) for a given SOL amount.
Query: amountSol (positive number).
Response (200): { "amountSol", "estimatedBtcSats" }
Create a reserve SOL→BTC swap: ChangeNOW transaction is created and SOL is sent from the reserve key; BTC is received at the reserve BTC address.
Body: { "amountSol": number } (positive).
Response (200): id, amountSol, expectedBtcSats, solanaSignature, status.
Poll ChangeNOW transaction status by ID.
Response (200): { "id", "status", "amountSol", "btcSats", "payinAddress" }. status e.g. waiting, finished, failed.
Agent submits token details → receives an invoice (fee in SOL). After paying the invoice to the treasury, the server creates the SPL token and adds it to the listing.
Create an invoice for token creation.
Body:
| Parameter | Type | Required |
|---|---|---|
name | string | Yes |
symbol | string | Yes |
decimals | number (0–9) | No (default 9) |
supply | string | No (default "0") |
description | string | No |
creator_address | string | Yes (SOL address to receive minted supply) |
revoke_freeze_authority | boolean | No |
revoke_mint_authority | boolean | No |
revoke_update_authority | boolean | No |
metaplex_metadata | boolean | No |
Response (200): invoice_id, treasury_address, fee_sol, fee_lamports, message, created_at.
Get invoice by ID (UUID).
Response (200): Full invoice fields including status (pending, completed), payment_tx_signature, token_id, paid_at, completed_at.
Confirm payment: provide invoice ID and the Solana transaction signature that sent fee_sol to the treasury. On success, the server creates the token and lists it.
Body: { "invoice_id": string, "tx_signature": string } (or invoiceId, txSignature).
Response (200): { "ok": true, "status": "completed", "token_id", "mint_address", "message" }.
List tokens. Optional query: creator (SOL address) to filter by creator.
Response (200): { "tokens": [ { "id", "name", "symbol", "decimals", "supply", "mint_address", "creator_address", ... }, ... ] }
Get a single token by numeric ID.
Search listed tokens. Query: q (search string, name/symbol).
Get listing(s). Query: token_id (optional).
Request a listing (e.g. for an existing token). Body includes token_id and other fields; response returns fee and treasury address for payment.
Confirm listing payment (tx signature). On success the token is listed.
Returns treasury SOL address and optional metadata for the Token Explorer.
Errors are returned with appropriate HTTP status (400, 404, 502, 503) and a JSON body such as { "error": "message" }.