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

FieldTypeDescription
leg_deliverobject{asset, amount, to} — the asset leg
leg_payobject{asset, amount, to} — the payment leg
windowstring"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

CodeMeaning
400Malformed request
401Missing/invalid API key
409Obligation conflicts with policy
429Rate limited