1) Sign the authorize message
Construct the message and sign it with your Ed25519 key: Message format:timestamp_ms: Unix time in millisecondsnonce: random, unique per request (replay-protected per public_key)
2) Use the token for REST
Include the token as a Bearer in the Authorization header:/api/v1/user/* and certain actions require this header.
3) Use the token for private WebSocket
Connect to the private WS endpoint and authenticate, then subscribe to private topics:- Connect:
wss://api.ekiden.fi/ws/private(or staging) - Authenticate:
- Subscribe to private topics (examples):
orderbook/{market_addr}, trade/{market_addr}, ticker/{market_addr} are available on /ws/public without auth.
Timestamp units and replay protection
timestamp_msis required in the authorize request and must be close to server time.- Each
(public_key, nonce)pair may be used once; reusing a nonce will be rejected.
Optional: curl examples
Request token:Troubleshooting
- 400 on /authorize: check signature, timestamp_ms freshness, and nonce uniqueness.
- 401 on private REST or WS auth: token expired or invalid.
- WS: authenticate before subscribing to private topics on
/ws/private.