Developers

Indexer API

A read-only HTTP API over every Yoke account and the YOKE realm, taken from finalized blocks. Use it to find accounts; read the chain to value them.

The indexer copies every account the Yoke program owns into PostgreSQL from finalized blocks, checks each one, and serves them over HTTP. It also copies the YOKE realm from SPL Governance: the realm, its governance, every stake and every proposal, in a snapshot of their own. It holds no keys, sends no transactions, and never reports a health number. The app's Liquidate page uses it to discover credit accounts.

Conventions

  • Every endpoint is a GET and returns JSON.
  • Amounts, debt units, shares and slots are decimal strings in base units, so they stay exact past JavaScript's safe integers.
  • Rows from a snapshot older than the freshness limit carry "stale": true.
  • 400 means bad input, 503 means the data isn't available. Errors are stable codes such as INVALID_PUBLIC_KEY.

Endpoints

GET /v1/status

The chain and snapshot the API is serving. open is true once the API serves a Yoke deployment; until then the other /v1 routes answer 503 with NOT_OPEN.

JSON
{
  "open": true,
  "programId": "…",
  "genesisHash": "…",
  "commitment": "finalized",
  "slot": "312004112",
  "blockhash": "…",
  "refreshedAt": "2026-10-01T09:12:44.000Z",
  "blockTime": "2026-10-01T09:12:40.000Z",
  "reorgCount": 0,
  "stale": false,
  "workerError": null,
  "governanceError": null
}

GET /v1/accounts

A page of accounts from one consistent snapshot, ordered by address.

QueryMeaning
kindpool, credit, lender, adapter, council or bond; all kinds when absent
limit1 to 250, default 100
afterThe next value from the previous page
JSON
{
  "slot": "312004112",
  "stale": false,
  "accounts": [
    {
      "address": "4ME1…Fvju",
      "kind": "credit",
      "lamports": "2227200",
      "state": { "kind": "credit", "owner": "…", "debtUnits": "15000000000", "nonce": "3", "active": false, … }
    }
  ],
  "next": "4ME1…Fvju"
}

next is null on the last page.

GET /v1/accounts/:address

One account, decoded, with its raw bytes in dataBase64. 404 with ACCOUNT_NOT_INDEXED if it isn't in the latest snapshot.

GET /v1/council

The guardian council: its governance account, whether it holds the pool's administrator key, and each seat's member with the YOKE they have bonded.

JSON
{
  "slot": "312004112",
  "stale": false,
  "address": "…",
  "governance": "…",
  "holdsAdministratorKey": true,
  "paused": false,
  "seatStake": "1000000000000",
  "quorum": 3,
  "seats": [{ "seat": 0, "member": "…", "staked": "1000000000000" }, { "seat": 1, "member": null, "staked": null }, …]
}

GET /v1/bonds/:owner

One owner's bond: amount and seat (null when it holds none). 404 with BOND_NOT_FOUND if they never bonded.

GET /v1/governance

The YOKE realm: its governance rules (yesVotePercentage, minWeightToPropose, votingTime, holdUpTime in seconds), the YOKE mint with its supply and authorities, the total staked, the number of voters with a stake, and proposals counted by state.

GET /v1/governance/voters

Pages of stakes, ordered by address, with limit and after as above. Each has owner, staked, unrelinquishedVotes and openProposals. GET /v1/governance/voters/:owner returns one, or 404 with NOT_STAKED.

GET /v1/governance/proposals

Pages of proposals, filterable by state: draft, signingOff, voting, succeeded, executing, completed, cancelled, defeated, executingWithErrors or vetoed. Each has its name, yes and no weights, when voting opened and closed, and how many of its instructions ran. GET /v1/governance/proposals/:address returns one.

GET /health and GET /ready

/health answers while the process runs. /ready answers 200 only when the database is reachable, the last sync succeeded and the snapshot is fresh; otherwise 503 with a reason.

Freshness and forks

The indexer reads from finalized blocks and verifies the chain's genesis hash and the previous snapshot's block hash on every pass. Each pass replaces the whole snapshot at once, so closed accounts disappear and pages never mix two snapshots. If the previous finalized block hash changes, reorgCount goes up and the cache is rebuilt.

Next

Yoke

One credit account across Save and Orca, on Solana.

Follow on X
© 2026 YokeYoke is software on Solana; every transaction is signed by your own wallet. Borrowing, lending and liquidating can lose money. Read the risks first.