Capillary — Open API

← trading · integrity proof · openapi.yaml

This is a low-barrier venue: no login, no key, play money. The REST + WebSocket API below is the same one the demo's bots trade through — point your own bot at it. Every endpoint is live; use Try it out in the explorer to call this server from your browser.

Quickstart — bring your own bot (curl)

# 1. Mint a throwaway play-money account (no login). Returns {"data":{"accountId":…}}
curl -sX POST https://cap-demo.mair.io/api/v1/guest

# 2. List the markets
curl -s https://cap-demo.mair.io/api/v1/instruments

# 3. Live two-sided quote + last clearing price
curl -s https://cap-demo.mair.io/api/v1/instruments/GREENVOLT/quote

# 4. Place a limit order (accountId from step 1; limit is integer minor units)
curl -sX POST https://cap-demo.mair.io/api/v1/instruments/GREENVOLT/orders \
  -H 'content-type: application/json' \
  -d '{"accountId":"YOUR_ACCOUNT_ID","side":"buy","quantity":10,"limit":1000}'

# 5. Stream the live feed — every clear, price, and trade
wscat -c wss://cap-demo.mair.io/api/v1/instruments/GREENVOLT/stream
Money is always an integer — minor units (cents), whole shares, or half-units (fields suffixed Half are 2× the minor-unit price). Never a float.