REST API reference
Base URL https://api.devnet.orrerysim.com/v1. All requests require Authorization: Bearer <api_key>. Responses are JSON. Rate limit: 600 requests/minute per organisation (429 with Retry-After when exceeded).
Create an obligation
POST /obligations
| Field | Type | Description |
|---|---|---|
leg_deliver | object | {asset, amount, to} — the asset leg |
leg_pay | object | {asset, amount, to} — the payment leg |
window | string | "next" or a window id |
curl https://api.devnet.orrerysim.com/v1/obligations \
-H "Authorization: Bearer $ORRERY_API_KEY" \
-d '{"leg_deliver":{"asset":"BTC","amount":"2.5","to":"cpty_8f31"},
"leg_pay":{"asset":"USDC","amount":"162500","to":"self"},"window":"next"}'
Get an obligation
GET /obligations/{id} → {id, status, window, legs, settled_at}. Status is one of pending, matched, settled, expired.
List settlement windows
GET /windows?status=open → the current and upcoming windows with their close times.
Policy
GET /policy, PUT /policy — read or replace your organisation's custody policy document.
Webhooks
POST /webhooks registers an endpoint; events obligation.matched, obligation.settled, obligation.expired are signed with your webhook secret (X-Orrery-Signature, HMAC-SHA256).
Errors
| Code | Meaning |
|---|---|
400 | Malformed request |
401 | Missing/invalid API key |
409 | Obligation conflicts with policy |
429 | Rate limited |