OysBio Explorer has a public JSON API over HTTPS, the same API its website uses. Base URL for OysBio Chain: https://explorer.oys.bio/api (mainnet: https://explorer.oys.bio/api, testnet: https://explorer-testnet.oys.bio/api).
- Without a key, programs may make 2 requests per second per IP (bursts of up to 10). With an API key, 10 requests per second per key (bursts of up to 40). Send the key in the
X-API-Keyheader or as?apikey=. Keys are issued by the OysBio team on request. The explorer's own pages and OysBio Wallet are not counted against these limits. - Responses are JSON; amounts are strings in the smallest unit (wei, token units); timestamps are Unix seconds; addresses are lowercase.
POSTrequests take a JSON body (content-type: application/json) and are accepted from the explorer itself and from servers (browsers on other sites are refused, as protection against cross-site requests).- Heavy endpoints (
/call,/verify,/faucet) have their own lower limits. On HTTP 429, wait and retry. - Copying the website pages with download tools or scrapers is refused (HTTP 403), and so is crawling for AI training. Use this API instead.
- Errors:
{ "error": "message" }with HTTP 400 (bad input), 401/403 (sign-in needed or refused), 404 (not found), 409 (conflict), 429 (too many requests), 503 (the network's node is not ready). - For anything the API does not cover, use JSON-RPC. The SDK wraps every endpoint below (
createExplorerClient).
curl -s -H "X-API-Key: <your key>" https://explorer.oys.bio/api/stats
Network#
| Endpoint | Returns |
|---|---|
GET /stats |
Network (name, chain ID, symbol, public RPC URLs, block period), head block, average block time, base fee and gas price (wei), pending transactions, totals, burned fees (none from the fee vault block on), current validators |
GET /health |
ok, degraded (chain running on the fallback rule), head, indexed block, Safe head, validators active / required, seconds since the last block. HTTP 503 when unhealthy; ?strict=1 also fails when degraded |
GET /status |
Network status as on the explorer's Network status page, every value measured: head (height, age, index lag), block time and TPS over the last 100 blocks and 24 hours, validators (active, last sealed block), peer count of the explorer's node, latency (explorer to node, new-block arrival, public RPC round trip), Safe block and how far it trails, reorganisations recorded by the explorer (last 24 h, 7 d, recent list), and each public RPC endpoint's availability from the explorer's 60-second probes. A value that cannot be measured is null |
GET /governance |
Governance as on the explorer's Governance page (company multisig + 48-hour timelock): every timelock operation with its calls in plain words, status (queued, ready, executed, cancelled), ready time and the Safe owners who signed it (recovered from the signatures on chain); voting history of the governance and guardian Safes; proposals still collecting signatures; timelock delay and role holders; pausable contracts with their pause state and history; treasury balances |
GET /governance/treasury?page=N |
Treasury transaction history, 25 per page, newest first: native coin (transactions and contract payments such as timelock executions) and token transfers in or out of the treasury addresses |
GET /charts |
Daily transactions, active addresses and fees for the charts on the home page |
GET /validators |
Validator set with names, sealing performance, uptime, consensus mode, Safe head, next epoch |
GET /validators/performance?window=24h |
Per-validator blocks sealed, in-turn share, missed turns (1h, 24h, 7d) |
GET /validators/votes?page=1 |
Votes to add or remove validators, and past validator set changes |
GET /networks |
Networks served by this explorer and their paths (at the explorer root: /api/networks) |
Blocks and transactions#
| Endpoint | Returns |
|---|---|
GET /blocks?page=1 |
25 newest blocks: number, hash, time, transactions, gas, base fee, sealing validator, in-turn |
GET /block/{number or hash} |
One block with its transactions and receipts summary |
GET /txs?page=1 |
Latest transactions (25 per page, total) |
GET /pending |
Transactions in the RPC node's pool |
GET /tx/{hash} |
Status, block, finality (safe, safeHead), from, to, value, fee, burned fee ("0" from the fee vault block on: the whole fee goes to the fee vault), gas, fees per gas, nonce, input and decoded input (verified contracts), token transfers, logs, internal transactions |
{
"hash": "0x41f9…c388", "status": 1, "block": 38474, "confirmations": 5,
"finality": { "safe": true, "safeHead": 38477, "required": 2, "validators": 3, "mode": "normal" },
"from": "0x7640…4d31", "to": "0x342d…6c79", "value": "10000000000000000000000",
"fee": "168000", "burned": "147000", "gasUsed": "21000", "type": 2, "transfers": [], "logs": [], "internals": []
}
Credit a deposit only when finality.safe is true.
Addresses and tokens#
| Endpoint | Returns |
|---|---|
GET /address/{address}?tab=txs&page=1 |
Balance, share of supply, nonce, contract or not, verification, creator, token holdings, counts, and the page of the chosen tab: txs, internal, transfers, holdings, code |
GET /accounts?page=1 |
Top accounts by balance |
GET /tokens |
ERC-20 and ERC-721 tokens seen on the chain, with transfers and holders |
GET /token/{address}?tab=transfers&page=1 |
Token metadata, supply, and transfers or holders |
GET /search?q= |
{ type, id } for a block number, transaction hash, address or token symbol |
Contracts#
| Endpoint | Returns |
|---|---|
GET /contracts?page=1 |
Verified contracts |
GET /contract/{address} |
Verified source files, ABI, compiler and settings, constructor arguments, match (exact or partial), license |
POST /call { to, data, from? } |
Read-only eth_call at the latest block: { result } or { error } (for the Read contract tab) |
GET /solc/versions |
Compiler versions and EVM versions the verifier accepts |
POST /verify |
Source verification, see below |
Verification#
GET /auth/nonce→{ nonce }.- Sign a Sign-In with Ethereum (EIP-4361) message for the explorer's domain and this network's chain ID with any key, and
POST /auth/login { message, signature }. The response sets a session cookie for this network. POST /verifywith the cookie:
{
"address": "0x…",
"compilerVersion": "v0.8.28+commit.7893614a",
"mode": "standard-json",
"contractName": "src/MyToken.sol:MyToken",
"standardJson": "{\"language\":\"Solidity\",\"sources\":{…},\"settings\":{…}}"
}
The answer is { ok, match: "exact" | "partial", name, file }; HTTP 409 if the contract is already verified. Other modes: "single-file" with source, fileName, optimizer, runs, evmVersion. oysbio verify (SDK) does all three steps from a Foundry or Hardhat build.
Multi-Send and multisig#
| Endpoint | Returns |
|---|---|
GET /multisend?address= |
The network's OysBioMultiSender contract, block gas limit, test tokens (testnet), and the address's recent Multi-Send transactions |
GET /multisig |
The network's Safe 1.4.1 contracts (SafeL2, SafeProxyFactory, CompatibilityFallbackHandler, MultiSendCallOnly) |
GET /multisig/safes?owner={address} |
Safes created by the factory that have this owner |
GET /multisig/safe/{address} |
Owners, threshold, nonce, balance, token holdings, waiting transactions with their signatures, executed transactions, replaced proposals |
POST /multisig/propose { safe, tx: { to, value, data, operation: 0, nonce }, signature, note? } |
Stores a proposal signed (EIP-712 SafeTx) by a current owner |
POST /multisig/sign { safeTxHash, signature } |
Adds another owner's signature |
The multisig endpoints accept only signatures of current owners, only plain calls (no delegatecall) and no gas refunds. The SDK's @oysbio/sdk/multisig builds the typed data and the execTransaction call.
Faucet (testnet)#
| Endpoint | Returns |
|---|---|
GET /faucet |
Amount per request, test token, limits, faucet balance; available: false on mainnet |
POST /faucet { address } |
{ ok, txHash, amount, symbol, token: { symbol, amount, txHash } }. One request per address and one per IP address (IPv6: per /64) every 24 hours; otherwise 429 with the time to wait |
NFT pictures#
GET /nft/<contract>/<tokenId> reads tokenURI (ERC-721) or uri (ERC-1155, {id} replaced) and returns { standard, name, description, image, imageType, metadataUrl, imageUrl, sources, error }. image is a data: URI (PNG, JPEG, GIF, WebP or SVG, at most 1 MB), recognised by its bytes. Metadata and pictures stored outside the chain are fetched by the explorer: https on port 443, ipfs:// and ar:// (through public gateways) only; private, loopback and reserved addresses are refused, also after redirects. When a picture cannot be shown, error says why and the links are still given. Results are cached (6 hours, failures 10 minutes); 120 requests per minute per IP.
Private transactions (testnet preview)#
A Privacy Pools deployment: deposits are public, withdrawals are proven in zero knowledge against the list of approved deposits. Everything these endpoints return is already public on the chain; secrets and proofs are made in the user's browser.
| Endpoint | Returns |
|---|---|
GET /privacy |
Addresses (entrypoint, pool, screen), scope, limits and fees, pool balance, counts, the approved list on the chain (approval.root, approval.cid, approval.waitSeconds), the relayer (address, feeBPS); available: false where it is not deployed |
GET /privacy/events |
Every deposit (depositor, label, commitment, value, status: waiting, approved or flagged), every withdrawal (recipient, value, spentNullifier, newCommitment, relayed), every return to a depositor, and the state tree leaves in order |
GET /privacy/set |
The approved list as published: body (JSON with the deposit labels), its root and content identifier cid. The root of body and the CIDv1 (raw, sha2-256) of body are the ones stored on the chain, so anyone can check the list |
POST /privacy/relay { withdrawal: { processooor, data }, proof, scope } |
{ ok, txHash, block }. The relayer sends a withdrawal addressed to the Entrypoint whose relay data pays this relayer at least its fee. It simulates first and sends nothing the pool would refuse. 409: the approved list or the pool changed while the proof was being made, make the proof again. At most 12 per IP address per hour |
Flagged deposits are recorded in the screen contract (OysBioDepositScreen: isFlagged(label, depositor)); a flagged deposit is left out of the approved list and can only be returned to its depositor (ragequit on the pool).
Mining (testnet)#
OysBioMining pays a fixed reward from a pool for each proof-of-work solution: a nonce such that keccak256(abi.encodePacked(challenge, beneficiary, feeRecipient, uint16 feeBps, uint256 nonce)) is at or below the target. The challenge changes every epoch (100 blocks). The beneficiary, relayer and fee are part of the hash, so a solution cannot be redirected. The reference miner is oysbio-miner.mjs (download from oys.bio/miner); its core (mining-core.js) is plain JavaScript without dependencies.
| Endpoint | Returns |
|---|---|
GET /mining |
address, work (epoch, challenge, target, solved, reward, lastBlock, hashesPerSolution), params (epoch length, target and maximum per epoch, reward, period, endBlock, solutionsPerDay, rewardPerDay), pool (balance, totalPaid, daysLeft), stats (hashrate, rewards and miners in 24 hours), relayer (address, feeBps), shop (booster tiers: price, boostBps, days); enabled: false where mining is off |
GET /mining/recent |
The last 40 rewards and the top 20 miners of the last 24 hours |
GET /mining/address/<address> |
Total mined, number of solutions, the booster running on the address (bps, secondsLeft) |
POST /mining/submit { epoch, beneficiary, feeRecipient, feeBps, nonce } |
{ ok, txHash, reward, boostBps, feeBps }. Mine with feeRecipient = the relayer address and feeBps = its fee from GET /mining. The relayer checks the hash and simulates first; nothing refused is sent. 409: the round is full (keep the solution and send it in the next round) or the challenge is old. At most 900 per IP address per hour |
A miner with gas can also call submit(epoch, beneficiary, feeRecipient, feeBps, nonce) on the contract directly, with feeRecipient zero and feeBps 0. Boosters are sold by OysBioBoosterShop (tiers(), quote(account, tier), buy(tier, account) after approving the payment token).
Validator staking (testnet)#
OysBioValidatorStaking: a validator bonds at least 1,000,000 OYS with a lock term (register(signer, name, term) with the stake as value; terms() lists the lengths and rates: 6 months 15%, 1 year 17%, 3 years 20%), is checked by the company (registrar) and voted into the signer set, then earns its term's rate on its stake while active (claim()). After the lock ends, requestExit() stops rewards and withdraw() returns the stake after the unbonding period; relock(term) moves to a longer term and its rate.
| Endpoint | Returns |
|---|---|
GET /staking |
address, params (terms: days and aprBps per term, aprBps (highest), minStake, maxValidators, unbondingDays, registrar), pool (balance, owedNow, perYear, coverageYears), totals (staked, rewardsPaid, active, pending), validators (operator, signer, name, status: Pending, Active, Jailed, Exiting, Rejected or Withdrawn, term, termDays, aprBps, lockUntil, stake, pendingRewards, claimed, slashed, inSignerSet); enabled: false where staking is off |
GET /staking/operator/<address> |
One validator, same fields |
inSignerSet compares the signing key with the live Clique signer set (clique_getSigners); the contract itself cannot see it.
OysBio DeFi#
The token exchange and the NFT market of app.oys.bio. The exchange is Uniswap V2 with the standard interfaces (IUniswapV2Router02, IUniswapV2Factory, IUniswapV2Pair); the wrapped coin is WOYS. The swap fee is 0.30%, of which 0.05% goes to the Treasury as pool tokens. Compute pool addresses with the init code hash 0xf892ce409450d289d9c10b45a438dbddc03da33da8bd86b60e44b71ae98f18eb, or ask the factory (getPair).
| Contract | Mainnet (69797) | Testnet (69798) |
|---|---|---|
| WOYS | 0x1d67ee9fabd68cc2a9968073f8c2544cde8a3643 |
0x8c26420dc686bd3cc5fc721cf681a7d67e61cc68 |
| Factory | 0x3ed545a930d65ba843368bbf74c6e39ab4bcdf6d |
0xec114530621ac2028cf0d5037d96303e251b604c |
| Router | 0xee7d7d1f9e854e1ac15b91ace9d2813668f58a97 |
0xe685e20e8565891f4dd34823c32005df10e7b945 |
OysBioNFTMarket 1.2.0 |
0x00b6ac1eb22d05000a74bb1542fe05434f29f232 |
0xdbe3748bd7c8458e5d6099a8442c1f8d72a91fc9 |
| Endpoint | Returns |
|---|---|
GET /swap |
enabled, router, factory, woys, feeBps, lpFeeBps, protocolFeeBps, feeTo, pairs (address, token0, token1, reserve0, reserve1, totalSupply, symbols and decimals, price, volume24h, trades24h, change24h, liquidityUsd, empty), tokens (address, name, symbol, decimals, native, listed, logo) |
GET /swap/trades?pair=&limit= |
trades: pair, tx, block, ts, side (buy or sell), base, quote, price, trader; at most 100 |
GET /swap/candles?pair=&interval=&limit= |
candles: t, o, h, l, c, v, n; interval is 300, 900, 3600, 14400 or 86400 seconds; at most 500 |
GET /swap/account/<address> |
balances (raw units, native and one entry per token) and positions (the address's pool tokens) |
GET /market |
address, feeBps, maxRoyaltyBps, paused, listings and sales (collection, tokenId, seller, price, and for sales buyer, fee, royalty, tx), each with the collection name, symbol and whether its source is verified |
GET /market/held/<address> |
nfts the address holds with their listing state, and credit (payments waiting for the address in the market) |
listed is true for tokens OysBio has checked; anyone can create a token and a pool, so show the contract address of every other token. Prices in dollars come from the pools and are for display only. The market sells ERC-721 tokens for the native coin: list(collection, tokenId, price, expires), then approve(market, tokenId) on the collection (an approval for the whole collection does not count), buy(collection, tokenId) with the exact price as value, cancel, and withdraw() for a credit. enabled: false on a network without OysBio DeFi.
Bridge (testnet)#
The testnet bridge moves Sepolia test ETH to the OysBio testnet as sepETH and back (Hyperlane 12.3.0 warp route, HypNative on Sepolia, synthetic HypERC20 here). Send with transferRemote(uint32 destination, bytes32 recipient, uint256 amount) on the router of the sending chain (destination 69798 from Sepolia, 11155111 from here; the recipient is the address left-padded to 32 bytes; on Sepolia the amount goes as value). The message id is the DispatchId event of the sending chain's Mailbox.
| Contract | OysBio testnet (69798) | Sepolia (11155111) |
|---|---|---|
| Mailbox | 0x99eb2bc11a8e2fa980a5fb554d07986e4be672a5 |
0x98002096d59d185e63afc08e61abc9cb096251f2 |
| Route | sepETH 0xa44cce36aa09a9a077709e0b7562807c53d9dfe5 |
0xdbbda1ee70d60d53f715b31505d0e44c7f8a494f |
| Swap bridge | 0x1c3c419f5fc071bd6a261e28b1c377fe04ff355b |
|
| Pool sepETH/tOYS | 0xdf05ac99300f1c569537dde6fb91806d9017a4d4 |
Smart routing. swapAndBridge(address tokenIn, uint256 amountIn, uint256 minBridged, address[] path, uint32 destination, bytes32 recipient, uint256 deadline) on the swap bridge swaps amountIn of tokenIn along path into sepETH and bridges all of it to recipient on destination, in one transaction. For tOYS pass the zero address as tokenIn, send the amount as value and start the path at WOYS; for a token, approve exactly amountIn to the swap bridge first. msg.value also pays the bridge fee the route quotes (none at present) and anything above it comes back in the same transaction. The SwapAndBridge(sender, tokenIn, amountIn, destination, recipient, bridged, messageId) event gives the amount bridged and the bridge message id. Coming in, swap the sepETH on the router once it has arrived.
| Endpoint | Returns |
|---|---|
GET /bridge |
enabled, remote (chain ID, name, symbol, explorer, mailbox), routes (symbol, local, remote, supply, locked, backed, fee.in and fee.out in wei, swapBridge), validators, relayer (address and its gas on both chains), health (in and out, each with state ok, low, slow, down or unknown, deliveriesLeft, pending, oldestPendingSec and note), totals, recent transfers |
GET /bridge/message/<id> |
found, delivered, and for an indexed transfer its direction, amount, sender, recipient, origin transaction and delivery transaction |
GET /bridge/account/<address> |
local (sepETH balance), remote.native (Sepolia ETH balance), transfers of that address |
Test funds only: one OysBio validator per chain signs, so the testnet bridge is custodial in effect. enabled: false on the mainnet.
OysBio Intents (testnet)#
OysBio Intents works like NEAR Intents and its 1Click API: ask for a quote, send the tokens to the deposit address that comes with it, and follow its status. The deposit address is a contract made from the quote's terms (CREATE2 of the factory), known before it exists. It can only swap what it receives at or above minAmountOut and deliver as the terms say, or send everything to refundTo after deadline, so check the terms and the address before you send.
| Contract | OysBio testnet (69798) |
|---|---|
Settlement ledger OysBioIntents |
0x6d46e0a38282fa3051221d63fd9216891cf17ea1 |
Deposit addresses OysBioIntentDeposits |
0x9f6800c77850b4b4454d4dae5568ceb006311aa5 |
| Endpoint | Returns |
|---|---|
GET /intents |
enabled, verifier, deposits, solver, solverGas, tokens (address or native, symbol, decimals, bridged, the solver's inventory), actions, bridge (route, destination, name), privacy (entrypoint, pool, minimumDeposit), spreadBps, quoteTtlSec, counts |
POST /intents/quote |
Body tokenIn, amountIn (smallest unit), tokenOut (native for the coin), action, recipient, refundTo, precommitment, slippageBps (0 to 500, default 100), dry. Returns quoteId, depositAddress, terms, amountOut, minAmountOut, path, deadline, timeEstimate. At most 30 per minute per IP |
GET /intents/status?depositAddress= |
status, step, received, reason, terms, txs (deposit, execute, refund, delivered), messageId for a bridge transfer |
POST /intents/deposit-tx |
Body depositAddress, txHash, chain (oysbio or remote). Optional: the solver also finds deposits by itself |
action is pay (deliver tokenOut to recipient on this chain), bridge (tokenOut must be the bridge route, recipient is the address on Sepolia) or shield (tokenOut is native; deposit into the privacy pool with precommitment, a privacy pool precommitment below the BN254 field). The status goes PENDING_DEPOSIT, KNOWN_DEPOSIT_TX, PROCESSING (with step: "bridging" while a bridge transfer is on its way), then SUCCESS; INCOMPLETE_DEPOSIT while less than amountIn has arrived; REFUNDED after the deadline with funds, EXPIRED without. A dry quote (dry: true) is a price only, with no deposit address to use.
const q = await (await fetch('https://explorer.oys.bio/api/intents/quote', {
method: 'POST', headers: { 'content-type': 'application/json' },
body: JSON.stringify({ tokenIn: '<tUSDC address>', amountIn: '3000000', tokenOut: 'native', action: 'pay', recipient: '0x…', refundTo: '0x…' }),
})).json();
// before sending: q.terms are what you asked for, and the factory computes the same address for them
// (call addressOf(terms) on 0x9f6800c77850b4b4454d4dae5568ceb006311aa5 through a node you trust)
// then transfer exactly 3 tUSDC to q.depositAddress and poll https://explorer.oys.bio/api/intents/status?depositAddress=…
The solver is run by OysBio from its own inventory and prices from the OysBio DeFi pools less spreadBps; it cannot change where a deposit goes. Test funds only; enabled: false on the mainnet.
Live updates#
GET /live (https://explorer.oys.bio/api/live) is a Server-Sent Events stream: block events with each new block summary, reorg and safe-reorg events. At most 20 connections per IP.
const es = new EventSource('https://explorer.oys.bio/api/live');
es.addEventListener('block', (e) => console.log(JSON.parse(e.data)));