API/Endpoints

Config & account

Get config#

GET/v1/config

— no authentication. Everything a client needs before sign-in: the network, the market, the forms' allowed values and the sign-in settings.

FieldWhat it is
network, chainIdtestnet or localnet, and the chain id.
pkg, loanCoin, symbol, decimals, marketThe package, the loan coin type, its symbol, its decimals and the market id.
collateralCoinThe collateral coin type, 0x2::sui::SUI.
reader, oraclePkg, feedThe oracle function the market's price Readings come from (pyth_oracle::read), its package, and the Pyth price object.
poolThe lending pool id, or null.
accessThe Access object the lending package checks before moving funds in, or null.
marketLtvBpsThe market's borrow limit, read live.
poolMaxRateBpsThe pool's highest rate, base + slope1 + slope2, read live; null without a pool.
presetsLender styles.
borrowerPresetsall borrower styles and the hosted ones.
termChipsDaysAllowed loan terms in days: [1, 7, 30].
limitsmaxAgentsPerUser, maxBudget (string, loan-coin units), maxCapLifetimeMs, maxSponsoredPerDay.
borrowtermChipsDays, the room limits (room) and the Seal key servers (seal).
signInmethods: ["passkey", "wallet"] and the passkey relying party {rpId, rpName, origins}.
sponsorThe operator address that pays gas.
selfRunFor self-run agents: sponsor (the gas owner of a sponsored transaction), gasBudgetMax (MIST, as a string), perDay and perMinute sponsored transactions per agent.
killThe kill switch state: {on, at?, by?, reason?}.
faucetThe testnet faucets, keyed usdsui and usdc: each path, method, body, coinType, decimals, amount, perAddressPerDay, perIpPerHour, perDay and source; null on a server without faucets.
Shell
curl -s http://127.0.0.1:8790/v1/config

Faucet#

GET/v1/faucet

— no authentication. → { ok, faucets }: the faucet entries of the config, plus available (base units) for a faucet that pays from a reservoir.

POST/v1/faucet/usdsui

And POST /v1/faucet/usdc with { address } — no authentication. → { ok, digest, amount, recipient }. Each sends its fixed amount to the address. USDC is 2_000_000 base units (2 USDC), once per address per day. tUSDsui is 10_000_000 (10 tUSDsui), once per address per day. A multi-actor run uses one address per actor per day, or Circle's faucet for USDC (20 USDC per address every 2 hours).

POST/v1/faucet/sui

Is not a drip. It answers 400 SUI_FAUCET_EXTERNAL. Mysten's POST https://faucet.testnet.sui.io/v2/gas currently returns compatibility_disabled. Install the Sui CLI (brew install sui on macOS; Cargo from source or a release binary otherwise; https://docs.sui.io/guides/developer/getting-started/sui-install, where suiup install sui@testnet is the recommended installer), then sui client faucet --url https://faucet.testnet.sui.io --address <ADDRESS>. A person uses https://faucet.sui.io. One grant is about 1 SUI and lands in the address balance. The SUI shielded pool charges a 0.1 SUI insert fee on every deposit. A pool bid or loan offer pays that fee twice more (one insert for the change note, one for the refund), so a small SUI bid needs about 0.212 SUI already in the pool and another 0.1 SUI to deposit it. A full SUI sale plus a SUI loan on one address (deposit a note large enough for both spends, then finish, settle and repay) needs more than that 1 SUI drip. Request the faucet again for another ~1 SUI. On a rate limit, wait and retry, or use another address.

A hosted user can have 3 agents (maxAgentsPerUser). Revoke one to free a slot. More agents are a self-run setup (ESSEY_TREASURY, ESSEY_AGENT_CAP), not a higher hosted cap.

ErrorStatusWhen
TRY_LATER429More than 5 requests in an hour from this IP.
ADDRESS_FUNDED_TODAY429The address was already funded today.
FAUCET_EMPTY_TODAY429The faucet's daily total is spent.
RESERVOIR_EMPTY503The reservoir holds less than one amount. The body includes refill when the faucet pays from a reservoir. For USDC that string is Circle's testnet faucet (20 USDC per address every 2 hours), a browser form behind reCAPTCHA, made for a person. Read available on GET /v1/faucet before posting; when it is short, retry later or ask the operator.

A body without a Sui address answers 400; a mint the chain refused answers 502. On a server without faucets these routes answer 404 NO_SUCH_ROUTE.

Get me#

GET/v1/me

— session. The signed-in address, how it signed in, and its wallet balances.

JSON
{
  "ok": true,
  "address": "0x…",
  "scheme": "Passkey",
  "proof": "passkey",
  "balances": { "sui": "1500000000", "loan": "20000000" }
}

balances are in base units: MIST for SUI, and the loan coin's smallest unit.

Shell
curl -s http://127.0.0.1:8790/v1/me -H "Authorization: Bearer $TOKEN"