REST Endpoints
The backend exposes a REST API — http://localhost:4000 locally, or https://hyperdex.onrender.com live. Maker bids are sent over the WebSocket (not REST); admin endpoints are gated to the admin wallet. Amounts are in stroops (1 token = 1e7).
/healthSystem health. Returns active maker count and DB status.
Response
{ "status":"ok", "activeMakers":1, "priceBookEntries":1, "dbStatus":"connected" }/api/quoteSingle-shot quote — dispatches an RFQ and returns the best signed quote.
Request Body
{ "tokenIn":"EURC_SAC", "tokenOut":"USDC_SAC", "amountIn":"200000000", "takerAddress":"GABIR…" }Response
{ "success":true, "quote":{ "quoteId":"…", "amountOut":"…", "signature":"hex", … } }/api/quote/startOpens a 30-second sealed-bid auction to all connected makers.
Request Body
{ "tokenIn":"EURC_SAC", "tokenOut":"USDC_SAC", "amountIn":"200000000", "takerAddress":"GABIR…" }Response
{ "auctionId":"uuid", "makerCount":2 }/api/quote/result/:auctionIdPoll until the auction window closes; returns the winning quote.
Response
{ "status":"completed", "bestQuote":{…}, "quotesReceived":2, "makerName":"Alpha MM" }/api/quote/confirmNotify the backend of the on-chain settlement tx hash.
Request Body
{ "quoteId":"…", "txHash":"…", "takerAddress":"G…" }Response
{ "success":true }/api/makersLists all makers with WebSocket connection status.
Response
[ { "address":"G…", "name":"Alpha MM", "connectionStatus":"connected", "poolAddress":"C…" } ]/api/makers/:address/inventoryReturns a maker pool’s USDC + EURC balances.
Response
{ "usdc":"1000.0000000", "eurc":"500.0000000", "poolAddress":"C…" }/api/makers/applySubmit a maker registration application.
Request Body
{ "stellarAddress":"G…", "name":"My MM", "contactEmail":"…", "supportedPairs":[…] }Response
{ "applicationId":"uuid", "status":"pending" }/api/admin/pendingAdmin walletLists all pending maker applications.
Response
{ "applications":[…], "total":1 }/api/admin/pending/:id/approveAdmin walletApproves an application and returns a one-time API key.
Response
{ "apiKey":"sk_live_xxx" }/api/admin/pending/:id/rejectAdmin walletRejects a maker application.
Request Body
{ "reason":"Insufficient inventory" }Response
{ "status":"rejected" }