For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connecting to the Matching Engine

How order flow reaches Reya's matching engine (ME), and the recommended connection setup for integrators.

Where the matching engine is

Reya's infrastructure — including the matching engine — runs in Google Cloud europe-west3 (Frankfurt). Plan your own placement with that region in mind to minimise round-trip latency.

How you connect

  • Orders reach the ME over the public internet via the published REST and WebSocket endpoints (see Environments).

  • You can connect over REST or WebSocket. WebSocket is recommended for most integrations: a persistent connection with lower per-operation overhead and id-correlated responses.

Run both surfaces in parallel:

Cancel-on-Disconnect (COD)

Cancel-on-Disconnect is an account-scoped dead-man's switch: you arm a countdown and refresh it on your own heartbeat, and if you stop refreshing it the matching engine cancels your open orders — except protective stops (STOP_LOSS / TAKE_PROFIT), which it leaves in place. It is not triggered by a WebSocket close: closing the socket neither fires nor disarms the timer, and only another cancelAllAfter refreshes it.

See Cancel-on-Disconnect for bounds, mechanics, and error codes.

Staying connected

Connection liveness is handled by standard protocol-level pings — see Heartbeats. On reconnect, re-subscribe to your channels and reconcile any missed state from REST (see the reconnection guidance in the WebSocket Info API Reference).

Transport failures and retrying

See Handling ambiguous outcomes for the API 3.6.2 error codes and when to retry or reconcile. An unanswered request may have been applied.

Last updated