Developers
Indexer API
Indexed events, markets, loans and lenders over HTTP.
Taper's indexer reads every finalized block that touches the program, decodes accounts and events with the IDL, and serves them over HTTP. The app uses it for history and market summaries. The chain stays the authority: the indexer is a cache of public data, and nothing it returns should be used as slippage protection.
Conventions
- Every route is a
GETand returns JSON. - Amounts, slots and timestamps are decimal strings, so no precision is lost in JavaScript.
- List routes take
limit(1 to 200, default 50) andoffset. - Browsers can read the API from Taper's own origins; servers can read it from anywhere.
The public address of the indexer is listed here when the markets open.
Routes
| Route | Returns |
|---|---|
/health | Whether the process is up, and the program ID it indexes. |
/ready | Database, reconciliation and scan lag; 503 while catching up. |
/cursor | The last scanned and snapshot slots. |
/markets | Open market accounts, decoded. |
/markets/:address/summary | Counts of open loans and lender positions in one market. |
/bands?market= | A market's bands account. |
/loans?market=&borrower= | Open loans, filtered by market and borrower. |
/lenders?market=&owner= | Lender positions, filtered by market and owner. |
/stake-configs?admin= | Stake configs: the stake token and vault under each admin. |
/session-stakes?config=&owner= | Session signer stakes, each with releasesAt: null while it backs a role, else when it can leave. |
/session-roles?market=&signer= | Each stock market's session signer. |
/events?market=&loan=&user=&name= | Decoded program events, newest first. user matches a borrower, lender or trader; name is one of loanChange, poolChange, bandSwap, healthSnapshot, sessionWindow, sessionSignerChange or sessionStakeChange. |
/loans/:address/debt | The loan's debt projected to now. |
/loans/:address/health | Debt, band assets, the last price the market used, and the loan against holding its collateral. |
/accounts/:address | One program account, open or closed. |
/transactions | Finalized transactions that invoked the program. |
/oracle/:feedId | The latest Pyth update for one of Taper's three feeds, ready to post. |
/governance | The realm, the governance and the admin address it signs as, its voting rules, and the lock settings. Read live from chain. |
/governance/proposals | Every proposal, newest first: state, weight for and against, and how many of its transactions have run. |
/voters/:owner | A wallet's locks, each with its time left and weight, and its total voting weight now. |
Example
With TAPER_API set to the base address:
curl "$TAPER_API/events?user=YOUR_WALLET&limit=2"[
{
"signature": "3pMb…4WL",
"index": 0,
"slot": "2290",
"blockTime": "1790810987",
"name": "bandSwap",
"market": "AJPc…qrJL",
"loan": null,
"user": "3E3D…YTjf",
"data": {
"buyCollateral": true,
"input": "10199689",
"output": "115531",
"oracle": "88734492",
"crossings": 2
}
}
]In this event, a trader paid 10.199689 USDC for 0.115531 collateral tokens at an oracle price of $88.734492, crossing two bands.
Projections are estimates
/loans/:address/debt and /loans/:address/health project from the last finalized snapshot to the moment of the request. They are useful for dashboards and alerts. They do not decide anything: only the program's health and liquidate instructions, with a fresh price, do.
Prices without your own Pyth key
Fetching signed updates from Pyth's Hermes service needs an API key. /oracle/:feedId fetches the latest update for one of Taper's three feeds with the indexer's key and returns it with a parsed preview. The update still has to be posted and verified on chain like any other; the key never leaves the server.