oasis:~/docs/api
API
Reading Oasis from your own code.
Everything that matters is on chain and public: vaults, rules, runs and their receipts. The API is a convenience layer over those records, served by this site under /api. It currently reads the test network.
Public reads
| Route | Contents |
|---|---|
GET /api/config | Network, contract addresses, tokens, fees. |
GET /api/prices | The price the vaults use for each stock. |
GET /api/runs | Every trade: vault, rule, price used, amounts in and out, who triggered it, the transaction. |
GET /api/rules/open | Open rules with their condition, slippage, runs left and expiry: what a keeper needs. |
GET /api/vault/:address | One vault: owner, agent, limits, balances, rules, trades. |
GET /api/playbooks | Shared rules with their record and how many vaults follow them. |
GET /api/listings, /api/listing/:id | Published agents: goal (if public), limits, versions, actions with reasons, result. |
GET /api/stats | Totals: vaults, runs, volume, fees. |
Signed routes
Talking to an agent, or reading a private goal you hold a license for, needs a wallet signature: GET /api/auth/challenge, sign the message, POST /api/auth/verify, then send the token as a bearer. It is a free signature, never a transaction.
Contracts
The addresses of the hub, the marketplace and the fee splitter are in /api/config. A vault is its own contract; hub.vaultsOf(owner) lists them.
Nothing is deployed on the real Robinhood Chain. Addresses on the test network are not addresses on the real one.