rave-trading docs
Local

API Reference

Generated reference from the repo's route, schema, and config contracts.

Generated from the repository contracts listed in x-rave-source-manifest. Runtime data is used only to annotate examples — see apps/docs/src/lib/content.ts for the annotation-only policy.

Source manifest

Generation hash: f7842d2e734735234bf0835caf1dbe8caf30f10ba568e33d8dc349ea2f2ca2e6

  • engine/src/api/handlers.rs
  • engine/src/operator/handlers.rs
  • packages/shared-types/src/quotes.ts
  • packages/shared-types/src/runtime.ts
  • packages/shared-types/src/config.ts
  • config/assets.json
  • config/spreads.json
  • config/limits.json
  • config/market-closure.json
  • config/engine.toml

Servers

  • https://api.rave-trading.com — Production engine API (release branch)
  • https://staging.api.rave-trading.com — Staging engine API (main branch)
  • http://localhost:8080 — Local development engine

Endpoints

/health

GETHealth check

Unauthenticated liveness probe used by Railway healthchecks. Returns `{ "status": "ok" }` when the engine is accepting traffic.

/api/v1/quotes/soft

POSTRequest an indicative soft quote

Returns a non-binding quote useful for aggregators and the operator quote tester. Soft quotes do not carry settlement calldata.

/api/v1/quotes/firm

POSTRequest a firm quote with settlement calldata

Returns a firm quote carrying ABI-encoded calldata targeting the SettlementRouter contract. Track A enforces an explicit safety label via `FirmQuoteSafetyLabel` in shared-types: `quote-only`, `execution-preparatory`, or `blocked`. Production firm-quote execution is gated on `FIRM_QUOTES_PROD_ENABLED`.

/api/v1/quotes/{quote_id}

GETFetch a stored quote by id

Returns the stored quote payload plus a status field (`active` or `expired`).

/api/v1/assets

GETList tradeable GM tokens with live pricing

/api/v1/limits

GETEngine and Ondo trading limits

/api/v1/runtime/capabilities

GETRuntime source of truth for soft/firm/execution availability

Used by the operator console home page and docs surfaces to render accurate availability without caching. Mirrors `RuntimeCapabilities` in packages/shared-types.

/api/v1/operator/config/{section}

GETRead an operator-editable config section

Sections: `spreads`, `limits`, `assets`, `market-closure`, `whitelist`. The `whitelist` section requires the `x-operator-secret` header.

/api/v1/operator/config/{section}

PUTUpdate an operator-editable config section

Requires the `x-operator-secret` header and a non-empty `reason` field for audit. Checksum conflicts return 409.

Schemas

  • HealthResponse
  • Side
  • SettlementPath
  • QuoteRequest
  • SoftQuoteResponse
  • FirmQuoteResponse
  • QuoteLookupResponse
  • AssetInfo
  • LimitsResponse
  • CapabilityStatus
  • ContractAddresses
  • RuntimeCapabilities
  • ConfigSection
  • ConfigResponse
  • ConfigUpdateRequest
  • ConfigUpdateResponse

Staging runtime annotation

Taken at 2026-04-17T00:00:00.000Z from staging. This is example annotation only — it cannot redefine the contract above.

{
  "capabilities": {
    "soft_quotes": {
      "available": true,
      "reason": null
    },
    "firm_quotes": {
      "available": true,
      "reason": null
    },
    "execution": {
      "available": false,
      "reason": "FIRM_QUOTES_PROD_ENABLED=false"
    }
  },
  "takenAt": "2026-04-17T00:00:00.000Z",
  "source": "staging",
  "note": "Annotation-only. MUST NOT redefine openapi.json schemas, paths, or security."
}