Market makers
Authenticate every maker channel with an API key you generate yourself in the dashboard. The key maps to a stable
makerId and all of your quotes are attributed to it.Takers (traders)
Need no API key. REST trading endpoints are open, and your authorization is the on-chain
fill() call signed by your own wallet.The discovery / read endpoints —
GET /v1/markets, GET /v1/series, and GET /v1/series/{seriesId} — are fully public. They require no API key and no Privy token, even if you are a market maker. Sending an X-API-Key header to them has no effect (it is not checked). Only the /v1/mm/* maker channels require your API key.Market Maker API Keys
Each market maker is an independent entity with its own wallet and USDC. To quote on the relay, you authenticate with an API key. The key identifies yourmakerId — a stable identifier that every quote you submit is attributed to.
There is no separate market-maker role: any signed-in user can generate a key and begin quoting.
Makers integrate over a three-channel transport, and the same API key authenticates all three. How you present the key depends on the channel:
| Channel | Transport | How to authenticate |
|---|---|---|
| Quote-request stream | SSE | X-API-Key header (or ?apiKey=) |
| Quote submission + confirm | REST | X-API-Key header (or ?apiKey=) |
| Post-trade events | WebSocket | ?apiKey= on the URL, or an auth message |
Generating a key
API keys are self-serve from the Convallax dashboard:
The same actions are available programmatically via the account endpoints (
POST /v1/user/api-keys).
Key format
Keys look likemk_live_<random> and are mapped server-side to your account’s makerId (for example mm_9f8e7d6c5b). Treat your key as a secret — anyone holding it can submit quotes attributed to your makerId. The relay stores only a hash of your key; if you lose it, revoke it and generate a new one.
Authenticating the SSE Stream & REST Endpoints
The quote-request SSE stream and the REST quote endpoints (submit and confirm) authenticate with theX-API-Key header:
EventSource), pass the key as a query parameter instead:
Authenticating on the WebSocket
The post-trade WebSocket uses a different mechanism. There are two equivalent ways to present your API key when connecting towss://api.convallax.com/maker/v1/ws.
Option A — query parameter
Append your key to the connection URL:This is the simplest approach and authenticates you the moment the socket opens.
Successful authentication
On a valid key, the server replies with aconnected message that echoes your resolved makerId:
mm-alpha. You do not need to include your makerId — the relay derives it from your authenticated API key.
Invalid authentication
If the API key is missing or invalid (when the relay is configured with keys), the server closes the socket with code4001. Reconnect with a valid key.
Re-POSTing to
/v1/mm/quotes for the same requestId updates (replaces) your previous quote. Because quotes are attributed to your authenticated makerId, you cannot impersonate or overwrite another maker’s quotes.Open Dev Mode
If the relay is started without any maker keys configured and without a database, it runs in OPEN dev mode: it accepts anyone, assigns an anonymousmakerId, and does not require an apiKey. This is intended for local development and testing against your own relay instance.
In production (wss://api.convallax.com), keys are always required.
Account Endpoints (Privy JWT)
Managing your profile and API keys uses a different credential: a Privy access token, not an API key. The dashboard obtains this token when you sign in and sends it as a bearer token:| Endpoint | Purpose |
|---|---|
GET /v1/user/profile | Your account + makerId |
PUT /v1/user/username | Set your username |
GET /v1/user/api-keys | List active keys |
POST /v1/user/api-keys | Create a key (returned once) |
DELETE /v1/user/api-keys/{id} | Revoke a key |
The two credentials are distinct: a Privy token proves who you are (to manage your account), while an API key authorizes maker traffic. Creating an API key requires a Privy token; using it to quote does not.
Server Configuration
The self-serve key store requires a Postgres database (DATABASE_URL) and Privy server credentials (PRIVY_APP_ID, PRIVY_APP_SECRET). In addition, first-party / ops makers can be configured with static environment keys that work alongside self-serve keys:
The recommended way to configure multiple makers. Each entry maps an API key to a stable
makerId:Legacy single-key mode. Still supported for backwards compatibility — the key maps to the
makerId "default".Takers Need No API Key
Traders (takers) never authenticate with an API key. The REST trading endpoints are open:POST /quote-requests— open a live quote requestGET /quote-requests/:id/stream— stream the live best quote (SSE; preferred)GET /quote-requests/:id/quotes— poll for the best quote (fallback)POST /quote-requests/:id/commit— commit to the best quote
Order you receive at commit restricts settlement to your wallet, and only that wallet can call fill() on ConvallaxRFQSettlement. No funds move until you sign and broadcast that transaction yourself.
See the Quote Request Stream guide and Post-Trade WebSocket guide for the channel references, and the Market Maker guide for the complete integration flow including order signing.
