Skip to main content
Quotes come from https://prices.rekt.trading. There is no other address. Use TLS everywhere. The stream is wss://prices.rekt.trading/v1/stream. Only the instructions that read a price need a quote: settle, stamp_book, set_take_profit and prove_price. An open, an add and a close request carry none. A quote is 80 bytes signed by several keys. The Knockout program verifies the signatures on chain, and refuses a quote that fails any check on Quotes and freshness. Nothing the service returns outside the signed bytes is authoritative.

The loop

  1. Once, at start-up. GET /v1/feeds. Take the feeds of the markets you trade. A market’s feed is market.feeds[0]; it equals the feed_id listed for that symbol. Pin it.
  2. When you are about to act. POST /v1/quote, or hold a stream open and keep the latest frame.
  3. Judge it. benchmarkQuoteView turns a quote into the view the gates judge: priceGates applies the program’s own admission rule before you spend a fee.
  4. Send it. submitBenchmarkQuoted places the quote’s ed25519 instruction immediately before yours in the same transaction and sends it. See Settling a position.
  5. On a refusal, read the status. 409 and 429 are retryable after retry_after_ms. 400 and 422 are not: fix the request.
The response carries payload (the 80 signed bytes, hex), signatures, ed25519_instruction_data (the complete instruction, ready to place before yours) and decoded, a mirror for reading. Decide on the bytes, not on decoded.

Rules that matter

  • A quote ages out. The program judges its age at execution, against market.maxOracleAgeSlots. Fetch a new quote for every attempt, with a new idempotency_key. Reuse a key only for an immediate retry after a transport failure.
  • A window quote is the first quote at or after a slot. Ask for it with min_slot and payload_version: 2. Every caller who asks for the same slot gets the same bytes.
  • A failure is never a price. A refusal has a status, a reason and a retry hint.
  • A market with trading hours says so inside the signature. A closed session signs no price. See Markets.
  • Call the service from a server, not from a browser. It sends no CORS headers, so a browser cannot call it. Keep a token out of URLs. If you have one, send it as Authorization: Bearer <token>.

Limits

Public use needs no sign-up and is rate limited per client address, so clients behind one address share a limit. A limited request gets 429 with retry_after_ms and a Retry-After header. A limit says nothing about whether a feed is healthy.
  • Use the stream rather than polling for the latest price.
  • Fetch GET /v1/feeds at start-up, not per request.
  • Back off with jitter on 429 and 503, and honour retry_after_ms.
  • Keep one stream connection per process.
For higher limits, write to support@asymmetra.xyz. These pages describe the interface. They do not describe how prices are produced.