{"openapi":"3.1.0","info":{"title":"Tacet API","version":"1.0.0","description":"Public and partner API of Tacet. Request bodies are JSON (max 16 KB).\n\nErrors use one envelope (`Error`) with a stable `error` code; every response carries `x-request-id`.\n\nRate limits are token buckets per client and per class (`x-rate-limit` on each operation). Sending `Authorization: Bearer sk_…` switches to the per-key quota; a bad key gets 401 INVALID_API_KEY on any endpoint.\n\nOrder IDs are access keys: anyone with the ID can read the order.\n\nAdmin, operator and metrics endpoints are not part of this API."},"servers":[{"url":"https://test.tacet.dea.web.id"}],"tags":[{"name":"Quotes & orders","description":"Quote, create and track orders."},{"name":"Receipts","description":"Signed proof of a finished order."},{"name":"Payment links","description":"Request a payment; the payer pays with any asset."},{"name":"Partner","description":"API-key holders: stats and webhook settings."},{"name":"On-chain routes","description":"Non-private LI.FI routes for EVM assets, next to the private route."},{"name":"Rewards","description":"Anonymous rewards pass: points, missions, tier perks and campaigns."},{"name":"System","description":"Status and probes."},{"name":"Testnet","description":"Only for testnet (demo) orders."},{"name":"Webhooks","description":"Requests we send to your webhook URL."}],"paths":{"/api/assets":{"get":{"operationId":"listAssets","summary":"Supported assets with USD price and per-order limits","tags":["Quotes & orders"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Assets.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsResponse"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/quote":{"post":{"operationId":"createQuote","summary":"Quote a swap or Private Send","description":"Returns a single-use quoteId valid until quote.validUntil. Send amountOut instead of amount for a reverse quote. Real-funds quotes are refused rather than priced from fallback data (503 PRICES_UNAVAILABLE).","tags":["Quotes & orders"],"x-rate-limit-bucket":"quote","x-rate-limit":{"anonymous":"30/min (burst 30)","apiKey":"300/min (burst 300)"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"},"example":{"from":"BTC","to":"ETH","amount":0.01}}}},"responses":{"200":{"description":"Quote issued.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Can't be quoted as given. INVALID_AMOUNT carries fields.amount (fields.amountOut for a reverse quote).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["UNKNOWN_ASSET","SAME_ASSET","SEND_NEEDS_SAME_ASSET","INVALID_AMOUNT","BELOW_MIN","ABOVE_MAX","OUTPUT_TOO_SMALL","NO_PRICE","FIXED_RATE_UNAVAILABLE","INVALID_REWARDS_PASS"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"Live market prices are unavailable.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["PRICES_UNAVAILABLE"]}}}]}}}}},"security":[{},{"partnerKey":[]}]}},"/api/order":{"post":{"operationId":"createOrder","summary":"Create an order from a quote","description":"Creates an order with a deposit address unique to it. The quoteId is single-use: resending it returns the existing order (200, `replayed: true`).\n\nIf the rate dropped more than 1% since the quote (0.3% for fixed rate), the response is 409 RATE_MOVED with a fresh quoteId and quote to confirm.\n\nIdempotency-Key: the same key and body within 24 hours replays the stored response (any status) with header `idempotent-replay: true`; keys are scoped per API key, or per client when anonymous.\n\nOrders created with an API key emit webhooks to that key.","tags":["Quotes & orders"],"x-rate-limit-bucket":"order","x-rate-limit":{"anonymous":"6/min (burst 30)","apiKey":"60/min (burst 100)"},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe. 8–128 characters: letters, digits, `_ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"},"example":{"quoteId":"q_AbCdEfGhIjKlMnOp","destinationAddress":"0x…","refundAddress":"bc1…"}}}},"responses":{"200":{"description":"Quote already used: the existing order (`replayed: true`).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"},"idempotent-replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreated"}}}},"201":{"description":"Order created.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"},"idempotent-replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreated"}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"403":{"description":"Address failed sanctions screening, or live trading is disabled.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["ADDRESS_BLOCKED","LIVE_DISABLED"]}}}]}}}},"409":{"description":"Conflict. RATE_MOVED includes `quoteId` and `quote`; QUOTE_IN_USE and IDEMPOTENCY_IN_PROGRESS include retryAfter.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["RATE_MOVED","QUOTE_IN_USE","IDEMPOTENCY_IN_PROGRESS","FIXED_RATE_UNAVAILABLE"]},"quoteId":{"$ref":"#/components/schemas/QuoteId"},"quote":{"$ref":"#/components/schemas/Quote"}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Invalid request, quote or address. Field errors are in `fields`.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["QUOTE_REQUIRED","QUOTE_NOT_FOUND","QUOTE_EXPIRED","QUOTE_MISMATCH","INVALID_SPLIT","LEG_TOO_SMALL","INVALID_ADDRESS","INVALID_REFUND_ADDRESS","INVALID_MEMO","INVALID_IDEMPOTENCY_KEY","IDEMPOTENCY_KEY_REUSED","INVALID_REWARDS_PASS","UNKNOWN_ASSET","SAME_ASSET","SEND_NEEDS_SAME_ASSET","INVALID_AMOUNT","BELOW_MIN","ABOVE_MAX","OUTPUT_TOO_SMALL","NO_PRICE"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"description":"The venue couldn't issue a deposit address. Retry.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["VENUE_UNAVAILABLE"]}}}]}}}},"503":{"description":"Live market prices are unavailable.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["PRICES_UNAVAILABLE"]}}}]}}}}},"security":[{},{"partnerKey":[]}]}},"/api/order/{id}":{"get":{"operationId":"getOrder","summary":"Order status","tags":["Quotes & orders"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Order.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetail"}}}},"400":{"description":"Malformed order ID.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"description":"No such order.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/order/{id}/stream":{"get":{"operationId":"streamOrder","summary":"Order status as Server-Sent Events","description":"Starts with `retry: 3000`, then `event: order` with an OrderDetail JSON payload immediately and again on every change (polled every 300 ms).\n\nEnds with `event: end` and data StreamEnd: `final` when the order is finished, `reconnect` after 10 minutes (reconnect to continue).\n\nA `: ping` comment is sent after 15 s without other output.\n\nAt most 6 open streams per client (enforced only when the server sees client IPs through a trusted proxy) and 500 in total: beyond that 429 TOO_MANY_STREAMS.","tags":["Quotes & orders"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"x-sse-events":{"order":{"$ref":"#/components/schemas/OrderDetail"},"end":{"$ref":"#/components/schemas/StreamEnd"}},"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Event stream.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"text/event-stream":{"schema":{"type":"string"},"example":"retry: 3000\n\nevent: order\ndata: {\"id\":\"aB3dE5fG7hJ9\",…}\n\nevent: end\ndata: {\"reason\":\"final\"}\n\n"}}},"400":{"description":"Malformed order ID.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"description":"No such order.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"429":{"description":"Rate limit or stream cap. Wait `retryAfter` seconds.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["RATE_LIMITED","TOO_MANY_STREAMS"]}}}]}}}},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/order/{id}/receipt":{"get":{"operationId":"getReceipt","summary":"Signed receipt for a finished order","description":"Ed25519-signed receipt for COMPLETED or REFUNDED orders. Verify with the key from /api/receipt-key.","tags":["Receipts"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Signed receipt.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedReceipt"}}}},"400":{"description":"Malformed order ID.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"description":"No such order.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"409":{"description":"Order isn't COMPLETED or REFUNDED yet.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["RECEIPT_NOT_READY"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/receipt-key":{"get":{"operationId":"getReceiptKey","summary":"Public key for verifying receipts","tags":["Receipts"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Ed25519 public key.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptKey"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/order/{id}/forget":{"post":{"operationId":"forgetOrder","summary":"Delete the order's personal data now","description":"Redacts addresses and transaction IDs without waiting for retention. Only for finished orders that aren't under review (multiswap: every part). Idempotent: an already-purged order is returned as is.","tags":["Quotes & orders"],"x-rate-limit-bucket":"order","x-rate-limit":{"anonymous":"6/min (burst 30)","apiKey":"60/min (burst 100)"},"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Order after redaction.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetail"}}}},"400":{"description":"Malformed order ID.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"description":"No such order.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"409":{"description":"Order not finished or under review.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["ORDER_ACTIVE"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/order/{id}/simulate-deposit":{"post":{"operationId":"simulateDeposit","summary":"Testnet only: simulate the deposit","description":"Records a fake deposit of exactly quote.amountIn for a testnet (demo) order. Real-funds orders get 403 NOT_DEMO.","tags":["Testnet"],"x-testnet-only":true,"x-rate-limit-bucket":"simulate","x-rate-limit":{"anonymous":"10/min (burst 10)","apiKey":"60/min (burst 60)"},"parameters":[{"$ref":"#/components/parameters/OrderId"}],"responses":{"200":{"description":"Deposit recorded; the worker picks it up.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"order":{"$ref":"#/components/schemas/Order"}},"required":["ok","order"]}}}},"400":{"description":"Malformed order ID.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"403":{"description":"Not a testnet order.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_DEMO"]}}}]}}}},"404":{"description":"No such order.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"409":{"description":"Not awaiting a deposit, or already simulated.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_AWAITING_DEPOSIT","ALREADY_DEPOSITED"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/address/validate":{"post":{"operationId":"validateAddress","summary":"Full checksum validation of an address","tags":["Quotes & orders"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/AssetId"},"address":{"type":"string"}},"required":["asset","address"]},"example":{"asset":"BTC","address":"bc1…"}}}},"responses":{"200":{"description":"Result (an invalid address is still 200).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressCheck"}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Unknown asset.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["UNKNOWN_ASSET"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/paylinks":{"post":{"operationId":"createPayLink","summary":"Create a payment link","description":"The recipient asks for `amount` of `to` at `address`; payers pay with any asset. The address is screened and never returned.","tags":["Payment links"],"x-rate-limit-bucket":"order","x-rate-limit":{"anonymous":"6/min (burst 30)","apiKey":"60/min (burst 100)"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"$ref":"#/components/schemas/AssetId"},"amount":{"type":"number","description":"Requested amount in `to` units.","exclusiveMinimum":0},"address":{"type":"string","description":"Recipient address (checksum-validated, screened)."},"memo":{"type":"string","description":"Destination tag / memo: whole number up to 4294967295.","pattern":"^\\d{1,10}$"},"description":{"type":"string","description":"Shown to the payer. Max 140 characters.","maxLength":140}},"required":["to","amount","address"]},"example":{"to":"USDT-TRX","amount":100,"address":"T…"}}}},"responses":{"201":{"description":"Link created.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/PayLink"},"url":{"type":"string","description":"Page to share with the payer.","format":"uri"}},"required":["link","url"]}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"403":{"description":"Address failed sanctions screening.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["ADDRESS_BLOCKED"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Invalid field.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["UNKNOWN_ASSET","INVALID_AMOUNT","INVALID_MEMO","INVALID_ADDRESS"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/paylinks/{id}":{"get":{"operationId":"getPayLink","summary":"Payment link for the payer","tags":["Payment links"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"parameters":[{"$ref":"#/components/parameters/PayLinkId"}],"responses":{"200":{"description":"Link.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLink"}}}},"400":{"description":"Malformed link ID.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"description":"No such link.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/paylinks/{id}/quote":{"post":{"operationId":"quotePayLink","summary":"Reverse quote to pay a link with any asset","description":"How much `from` to send so the recipient gets at least the requested amount. Floating rate only.","tags":["Payment links"],"x-rate-limit-bucket":"quote","x-rate-limit":{"anonymous":"30/min (burst 30)","apiKey":"300/min (burst 300)"},"parameters":[{"$ref":"#/components/parameters/PayLinkId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/components/schemas/AssetId"}},"required":["from"]},"example":{"from":"BTC"}}}},"responses":{"200":{"description":"Quote issued.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"$ref":"#/components/schemas/QuoteId"},"quote":{"$ref":"#/components/schemas/Quote"},"requested":{"type":"number","description":"The link's amount."}},"required":["quoteId","quote","requested"]}}}},"400":{"description":"Malformed link ID or body.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID","BAD_JSON"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"description":"No such link.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"409":{"description":"Link isn't open; `status` says why.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["PAYLINK_NOT_OPEN"]},"status":{"type":"string","enum":["pending","paid","expired"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Can't be quoted.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["UNKNOWN_ASSET","SAME_ASSET","SEND_NEEDS_SAME_ASSET","INVALID_AMOUNT","BELOW_MIN","ABOVE_MAX","OUTPUT_TOO_SMALL","NO_PRICE","FIXED_RATE_UNAVAILABLE"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"Live market prices are unavailable.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["PRICES_UNAVAILABLE"]}}}]}}}}},"security":[{},{"partnerKey":[]}]}},"/api/paylinks/{id}/order":{"post":{"operationId":"payPayLink","summary":"Create the payment order for a link","description":"Uses a quote from /api/paylinks/{id}/quote. The destination comes from the link server-side and is re-screened; the order's destinationAddress is a placeholder. One link accepts one payment at a time.\n\nThe quoteId is single-use: resending it returns the link's existing order (200, `replayed: true`).\n\nIf the recipient would get more than 1% less than the link amount, the response is 409 RATE_MOVED with a fresh reverse quote (`quoteId`, `quote`, `requested`) to confirm.\n\nIdempotency-Key: the same key and body within 24 hours replays the stored response (any status) with header `idempotent-replay: true`; keys are scoped per API key, or per client when anonymous.","tags":["Payment links"],"x-rate-limit-bucket":"order","x-rate-limit":{"anonymous":"6/min (burst 30)","apiKey":"60/min (burst 100)"},"parameters":[{"$ref":"#/components/parameters/PayLinkId"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe. 8–128 characters: letters, digits, `_ . : -`.","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"$ref":"#/components/schemas/QuoteId"},"refundAddress":{"type":"string","description":"Refund address on the `from` network."},"refundMemo":{"type":"string","description":"Destination tag / memo: whole number up to 4294967295.","pattern":"^\\d{1,10}$"},"payoutDelay":{"type":"boolean"}},"required":["quoteId","refundAddress"]}}}},"responses":{"200":{"description":"Quote already used: the link's existing order (`replayed: true`).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"},"idempotent-replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrderId"},"order":{"$ref":"#/components/schemas/Order"},"replayed":{"type":"boolean","enum":[true]}},"required":["orderId","order","replayed"]}}}},"201":{"description":"Order created.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"},"idempotent-replay":{"$ref":"#/components/headers/IdempotentReplay"}},"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrderId"},"order":{"$ref":"#/components/schemas/Order"}},"required":["orderId","order"]}}}},"400":{"description":"Malformed link ID or body.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_ID","BAD_JSON"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"403":{"description":"Refund or recipient address can't be used, or live trading is disabled.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["ADDRESS_BLOCKED","PAYLINK_UNAVAILABLE","LIVE_DISABLED"]}}}]}}}},"404":{"description":"No such link.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]}}}]}}}},"409":{"description":"Conflict. RATE_MOVED includes `quoteId`, `quote` and `requested`; QUOTE_IN_USE and IDEMPOTENCY_IN_PROGRESS include retryAfter; PAYLINK_NOT_OPEN may include `status`.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["PAYLINK_NOT_OPEN","RATE_MOVED","QUOTE_IN_USE","IDEMPOTENCY_IN_PROGRESS"]},"status":{"type":"string","enum":["pending","paid","expired"]},"quoteId":{"$ref":"#/components/schemas/QuoteId"},"quote":{"$ref":"#/components/schemas/Quote"},"requested":{"type":"number"}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Quote missing, expired or mismatched, invalid refund details, or a bad Idempotency-Key.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["QUOTE_REQUIRED","QUOTE_NOT_FOUND","QUOTE_EXPIRED","QUOTE_MISMATCH","INVALID_MEMO","INVALID_REFUND_ADDRESS","INVALID_IDEMPOTENCY_KEY","IDEMPOTENCY_KEY_REUSED","UNKNOWN_ASSET","SAME_ASSET","SEND_NEEDS_SAME_ASSET","INVALID_AMOUNT","BELOW_MIN","ABOVE_MAX","OUTPUT_TOO_SMALL","NO_PRICE","FIXED_RATE_UNAVAILABLE"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"description":"The venue couldn't issue a deposit address. Retry.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["VENUE_UNAVAILABLE"]}}}]}}}},"503":{"description":"Live market prices are unavailable.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["PRICES_UNAVAILABLE"]}}}]}}}}},"security":[{},{"partnerKey":[]}]}},"/api/routes/onchain":{"get":{"operationId":"getOnchainRoute","summary":"On-chain route via LI.FI (not private)","description":"Optional on-chain route through LI.FI (DEX aggregation and bridges) for EVM assets. It is not private: the sending and receiving wallets are linked on-chain.\n\nUnsupported pairs, no route and LI.FI outages return 200 with `available: false`, a `code` and a `reason`.\n\n`transactionRequest` and `approval` are only returned when this deployment enables on-chain execution (`executionEnabled`) and `fromAddress` is given; the wallet signs and sends them.\n\nWith a partner API key, the partner's markup is passed to LI.FI as the integrator fee.","tags":["On-chain routes"],"x-rate-limit-bucket":"quote","x-rate-limit":{"anonymous":"30/min (burst 30)","apiKey":"300/min (burst 300)"},"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","enum":["BTC","ETH","SOL","USDC-ETH","USDT-TRX","BNB","XRP","LTC","TRX","DOGE","USDT-ETH","AVAX","LINK","ADA"]}},{"name":"to","in":"query","required":true,"schema":{"type":"string","enum":["BTC","ETH","SOL","USDC-ETH","USDT-TRX","BNB","XRP","LTC","TRX","DOGE","USDT-ETH","AVAX","LINK","ADA"]}},{"name":"amount","in":"query","required":true,"description":"Amount in `from` units.","schema":{"type":"number","exclusiveMinimum":0}},{"name":"fromAddress","in":"query","description":"Sending wallet (EVM). Without it the route is an estimate only.","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"toAddress","in":"query","description":"Receiving wallet (EVM). Defaults to fromAddress.","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}],"responses":{"200":{"description":"Route, or `available: false` with a reason.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnchainRouteResult"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"422":{"description":"Invalid amount or address. Field errors are in `fields`.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_REQUEST"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]},"post":{"operationId":"createOnchainRoute","summary":"On-chain route via LI.FI (JSON body)","description":"Optional on-chain route through LI.FI (DEX aggregation and bridges) for EVM assets. It is not private: the sending and receiving wallets are linked on-chain.\n\nUnsupported pairs, no route and LI.FI outages return 200 with `available: false`, a `code` and a `reason`.\n\n`transactionRequest` and `approval` are only returned when this deployment enables on-chain execution (`executionEnabled`) and `fromAddress` is given; the wallet signs and sends them.\n\nWith a partner API key, the partner's markup is passed to LI.FI as the integrator fee.","tags":["On-chain routes"],"x-rate-limit-bucket":"quote","x-rate-limit":{"anonymous":"30/min (burst 30)","apiKey":"300/min (burst 300)"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","enum":["BTC","ETH","SOL","USDC-ETH","USDT-TRX","BNB","XRP","LTC","TRX","DOGE","USDT-ETH","AVAX","LINK","ADA"]},"to":{"type":"string","enum":["BTC","ETH","SOL","USDC-ETH","USDT-TRX","BNB","XRP","LTC","TRX","DOGE","USDT-ETH","AVAX","LINK","ADA"]},"amount":{"type":"number","description":"Amount in `from` units.","exclusiveMinimum":0},"fromAddress":{"type":"string","description":"Sending wallet (EVM).","pattern":"^0x[0-9a-fA-F]{40}$"},"toAddress":{"type":"string","description":"Receiving wallet (EVM). Defaults to fromAddress.","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["from","to","amount"]},"example":{"from":"USDC-ETH","to":"BNB","amount":100}}}},"responses":{"200":{"description":"Route, or `available: false` with a reason.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnchainRouteResult"}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Invalid amount or address. Field errors are in `fields`.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_REQUEST"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/routes/onchain/status":{"get":{"operationId":"getOnchainRouteStatus","summary":"Status of an on-chain (LI.FI) transfer","description":"Proxies LI.FI /v1/status for the source-chain transaction hash. NOT_FOUND right after sending is normal; poll every 10–30 seconds within a bounded window. Nothing is stored.","tags":["On-chain routes"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"parameters":[{"name":"txHash","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},{"name":"fromChain","in":"query","schema":{"type":"integer","description":"Source chain ID (speeds up the lookup)."}},{"name":"toChain","in":"query","schema":{"type":"integer","description":"Destination chain ID."}},{"name":"bridge","in":"query","schema":{"type":"string","description":"LI.FI tool key from the route (`tool`)."}}],"responses":{"200":{"description":"Transfer status.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnchainStatus"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"422":{"description":"Invalid transaction hash.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_REQUEST"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"description":"LI.FI status is unavailable.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["UPSTREAM_UNAVAILABLE"]}}}]}}}}},"security":[{},{"partnerKey":[]}]}},"/api/status":{"get":{"operationId":"getStatus","summary":"Public system status","description":"Cached for about 10 seconds.","tags":["System"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Status.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStatus"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/analytics":{"get":{"operationId":"getAnalytics","summary":"Public analytics","description":"Monthly completed volume (USD at quote time) and swap counts, and the latest swaps as time (minute precision), public status and route type only. Cached for about 60 seconds.","tags":["System"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Analytics.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","required":["simulated","totals","months","latest","updatedAt"],"properties":{"simulated":{"type":"boolean","description":"true = testnet data."},"totals":{"type":"object","properties":{"swaps":{"type":"number"},"volumeUsd":{"type":"number"},"orders":{"type":"number"}}},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM (UTC)"},"volumeUsd":{"type":"number"},"swaps":{"type":"number"}}}},"latest":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string","description":"Order creation time, minute precision","format":"date-time"},"status":{"type":"string","description":"Public display status"},"route":{"type":"string","enum":["private","private_delay","multiswap","send"]},"rate":{"type":"string","enum":["fixed","floating"]}}}},"updatedAt":{"type":"string","format":"date-time"}}}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/health":{"get":{"operationId":"getHealth","summary":"Health check (public view)","description":"200 when the worker is alive and the settlement layer responds, 503 otherwise. Cached for 5 seconds.","tags":["System"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Healthy.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"Unhealthy (same body, ok: false).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}},"security":[{},{"partnerKey":[]}]}},"/api/livez":{"get":{"operationId":"getLiveness","summary":"Liveness probe","tags":["System"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Process is up.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/readyz":{"get":{"operationId":"getReadiness","summary":"Readiness probe","description":"503 when the worker heartbeat is stale, the data directory isn't writable, or live trading is requested with an incomplete config.","tags":["System"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Ready.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readiness"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"description":"Not ready (same body, ok: false).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readiness"}}}}},"security":[{},{"partnerKey":[]}]}},"/api/rewards/pass":{"post":{"operationId":"createRewardsPass","summary":"Create an anonymous rewards pass","description":"Returns the pass code once. The server stores only a SHA-256 hash of it and can't recover a lost code. No body.","tags":["Rewards"],"x-rate-limit-bucket":"rewardsPass","x-rate-limit":{"anonymous":"2/min (burst 5)","apiKey":"5/min (burst 10)"},"responses":{"201":{"description":"Pass created.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/RewardsPassCode"},"note":{"type":"string"},"pass":{"$ref":"#/components/schemas/RewardsPass"}},"required":["code","pass"]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/rewards/me":{"get":{"operationId":"getRewardsPass","summary":"Points, tier, perk and missions of a pass","description":"Pass code in the `x-rewards-pass` header. Completed orders made with the pass are counted on read (once per order).","tags":["Rewards"],"x-rate-limit-bucket":"rewards","x-rate-limit":{"anonymous":"20/min (burst 30)","apiKey":"60/min (burst 60)"},"parameters":[{"name":"x-rewards-pass","in":"header","required":true,"description":"Rewards pass code.","schema":{"$ref":"#/components/schemas/RewardsPassCode"}}],"responses":{"200":{"description":"Pass.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewardsPass"}}}},"401":{"description":"No pass code sent.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_REQUIRED"]}}}]}}}},"404":{"description":"No pass with this code.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_NOT_FOUND"]}}}]}}}},"422":{"description":"Malformed pass code.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_REWARDS_PASS"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]},"post":{"operationId":"readRewardsPass","summary":"Same as GET, with the code in the body","tags":["Rewards"],"x-rate-limit-bucket":"rewards","x-rate-limit":{"anonymous":"20/min (burst 30)","apiKey":"60/min (burst 60)"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rewardsPass":{"$ref":"#/components/schemas/RewardsPassCode"}},"required":["rewardsPass"]}}}},"responses":{"200":{"description":"Pass.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewardsPass"}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"description":"No pass code sent.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_REQUIRED"]}}}]}}}},"404":{"description":"No pass with this code.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_NOT_FOUND"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Malformed pass code.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_REWARDS_PASS"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]},"delete":{"operationId":"deleteRewardsPass","summary":"Delete a pass and its points","description":"Orders made with it keep a now-orphaned hash.","tags":["Rewards"],"x-rate-limit-bucket":"rewards","x-rate-limit":{"anonymous":"20/min (burst 30)","apiKey":"60/min (burst 60)"},"parameters":[{"name":"x-rewards-pass","in":"header","required":true,"description":"Rewards pass code.","schema":{"$ref":"#/components/schemas/RewardsPassCode"}}],"responses":{"200":{"description":"Deleted.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]}}}},"401":{"description":"No pass code sent.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_REQUIRED"]}}}]}}}},"404":{"description":"No pass with this code.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_NOT_FOUND"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Malformed pass code.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_REWARDS_PASS"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/rewards/events":{"post":{"operationId":"postRewardsEvent","summary":"Report a mission event","description":"`receipt_verified` counts once per pass, and only for a completed order made with the same pass.","tags":["Rewards"],"x-rate-limit-bucket":"rewards","x-rate-limit":{"anonymous":"20/min (burst 30)","apiKey":"60/min (burst 60)"},"parameters":[{"name":"x-rewards-pass","in":"header","required":false,"description":"Pass code; or send rewardsPass in the body.","schema":{"$ref":"#/components/schemas/RewardsPassCode"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","enum":["receipt_verified"]},"orderId":{"$ref":"#/components/schemas/OrderId"},"rewardsPass":{"$ref":"#/components/schemas/RewardsPassCode"}},"required":["event","orderId"]}}}},"responses":{"200":{"description":"Recorded (or already recorded).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewardsPass"}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"description":"No pass code sent.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_REQUIRED"]}}}]}}}},"404":{"description":"No pass with this code.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["REWARDS_PASS_NOT_FOUND"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"Invalid event, malformed pass, or the order isn't a completed order on this pass.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION_ERROR","INVALID_REWARDS_PASS","ORDER_NOT_ELIGIBLE"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/rewards/campaigns":{"get":{"operationId":"listRewardsCampaigns","summary":"Live and upcoming campaigns","tags":["Rewards"],"x-rate-limit-bucket":"rewards","x-rate-limit":{"anonymous":"20/min (burst 30)","apiKey":"60/min (burst 60)"},"responses":{"200":{"description":"Campaigns, soonest first.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"testnet":{"type":"boolean"},"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/RewardsCampaign"}}},"required":["testnet","campaigns"]}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","tags":["System"],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"OpenAPI 3.1 document.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}},"security":[{},{"partnerKey":[]}]}},"/api/partner/me":{"get":{"operationId":"getPartner","summary":"Key profile, order stats and recent orders","tags":["Partner"],"security":[{"partnerKey":[]}],"x-rate-limit-bucket":"lookup","x-rate-limit":{"anonymous":"120/min (burst 120)","apiKey":"1200/min (burst 1200)"},"responses":{"200":{"description":"Partner summary.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSummary"}}}},"401":{"description":"Missing, invalid or revoked API key.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["API_KEY_REQUIRED","INVALID_API_KEY"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/webhook":{"post":{"operationId":"setPartnerWebhook","summary":"Set or clear the key's webhook URL","description":"Public https URLs only. `url: null` removes the webhook.","tags":["Partner"],"security":[{"partnerKey":[]}],"x-rate-limit-bucket":"admin","x-rate-limit":{"anonymous":"60/min (burst 60)","apiKey":"60/min (burst 60)"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":["string","null"],"format":"uri","maxLength":500}},"required":["url"]},"example":{"url":"https://partner.example/hooks/swap"}}}},"responses":{"200":{"description":"Saved.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"webhookUrl":{"type":["string","null"]}},"required":["webhookUrl"]}}}},"400":{"description":"Body is not a JSON object.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["BAD_JSON"]}}}]}}}},"401":{"description":"Missing, invalid or revoked API key.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["API_KEY_REQUIRED","INVALID_API_KEY"]}}}]}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"description":"URL rejected (not https, private host, credentials, doesn't resolve).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_WEBHOOK_URL"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/webhook/test":{"post":{"operationId":"testPartnerWebhook","summary":"Queue a signed test.ping to the webhook","tags":["Partner"],"security":[{"partnerKey":[]}],"x-rate-limit-bucket":"admin","x-rate-limit":{"anonymous":"60/min (burst 60)","apiKey":"60/min (burst 60)"},"responses":{"202":{"description":"Queued.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean","enum":[true]},"eventId":{"type":"string"}},"required":["queued","eventId"]}}}},"401":{"description":"Missing, invalid or revoked API key.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["API_KEY_REQUIRED","INVALID_API_KEY"]}}}]}}}},"409":{"description":"No webhook URL set.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["NO_WEBHOOK"]}}}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"webhooks":{"order.created":{"post":{"operationId":"orderCreatedWebhook","summary":"Order created with your key","description":"Sent once when an order is created with your API key.\n\nSent as POST with a 10 s timeout; redirects are not followed. Any 2xx acknowledges. Otherwise retried with backoff (8 attempts over about 31.2 hours). Events for one order are delivered in order.","tags":["Webhooks"],"security":[],"parameters":[{"name":"X-Webhook-Signature","in":"header","required":true,"description":"Verify every request: `t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Reject if t is more than 5 minutes off.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-Webhook-Event-Id","in":"header","required":true,"description":"Same as body `id`; deduplicate on it.","schema":{"type":"string"}},{"name":"X-Webhook-Event-Type","in":"header","required":true,"description":"Same as body `type`.","schema":{"type":"string","enum":["order.created","order.updated","test.ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreatedEvent"}}}},"responses":{"2XX":{"description":"Acknowledged."}}}},"order.updated":{"post":{"operationId":"orderUpdatedWebhook","summary":"Order displayStatus changed","description":"Sent whenever displayStatus changes on an order created with your key. Carries transaction IDs, never addresses.\n\nSent as POST with a 10 s timeout; redirects are not followed. Any 2xx acknowledges. Otherwise retried with backoff (8 attempts over about 31.2 hours). Events for one order are delivered in order.","tags":["Webhooks"],"security":[],"parameters":[{"name":"X-Webhook-Signature","in":"header","required":true,"description":"Verify every request: `t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Reject if t is more than 5 minutes off.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-Webhook-Event-Id","in":"header","required":true,"description":"Same as body `id`; deduplicate on it.","schema":{"type":"string"}},{"name":"X-Webhook-Event-Type","in":"header","required":true,"description":"Same as body `type`.","schema":{"type":"string","enum":["order.created","order.updated","test.ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdatedEvent"}}}},"responses":{"2XX":{"description":"Acknowledged."}}}},"test.ping":{"post":{"operationId":"testPingWebhook","summary":"Test event","description":"Sent by POST /api/partner/webhook/test.\n\nSent as POST with a 10 s timeout; redirects are not followed. Any 2xx acknowledges. Otherwise retried with backoff (8 attempts over about 31.2 hours). Events for one order are delivered in order.","tags":["Webhooks"],"security":[],"parameters":[{"name":"X-Webhook-Signature","in":"header","required":true,"description":"Verify every request: `t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`. Reject if t is more than 5 minutes off.","schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}},{"name":"X-Webhook-Event-Id","in":"header","required":true,"description":"Same as body `id`; deduplicate on it.","schema":{"type":"string"}},{"name":"X-Webhook-Event-Type","in":"header","required":true,"description":"Same as body `type`.","schema":{"type":"string","enum":["order.created","order.updated","test.ping"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestPingEvent"}}}},"responses":{"2XX":{"description":"Acknowledged."}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Stable machine-readable code (UPPER_SNAKE_CASE)."},"message":{"type":"string","description":"Human-readable English message. May change; don't parse it."},"requestId":{"type":"string","description":"Same value as the x-request-id header. Quote it when contacting support.","format":"uuid"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-field validation messages, keyed by request field (e.g. `recipients.1.address`)."},"retryAfter":{"type":"integer","description":"Seconds to wait before retrying (also in the Retry-After header)."}},"required":["error","message","requestId"],"additionalProperties":true,"description":"Error envelope shared by every endpoint. Some codes add fields (documented per response)."},"AssetId":{"type":"string","enum":["BTC","ETH","SOL","USDC-ETH","USDT-TRX","BNB","XRP","LTC","TRX","DOGE","USDT-ETH","AVAX","LINK","ADA"],"description":"Asset ID. Chain-specific tokens carry the network (e.g. USDT-TRX)."},"DisplayStatus":{"type":"string","enum":["WAITING_FOR_DEPOSIT","DEPOSIT_DETECTED","EXCHANGING_SOURCE","PRIVATE_SETTLEMENT","EXCHANGING_TO_DESTINATION","SENDING","COMPLETED","REFUNDING","REFUNDED","ON_HOLD","EXPIRED","FAILED"],"description":"Stable public status contract; values never change meaning. Terminal: COMPLETED, REFUNDED, EXPIRED, FAILED. Use this rather than `state`."},"PublicState":{"type":"string","enum":["awaiting_deposit","leg1","settlement","leg2","completed","failed","expired","refunding","refunded"],"description":"Coarse lifecycle state. Prefer displayStatus for UI and logic."},"HopStatus":{"type":"string","enum":["pending","in_progress","done","failed"]},"Hops":{"type":"object","properties":{"hop1":{"$ref":"#/components/schemas/HopStatus"},"hop2":{"$ref":"#/components/schemas/HopStatus"}},"required":["hop1","hop2"],"description":"Per-leg status."},"Asset":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AssetId"},"symbol":{"type":"string"},"name":{"type":"string"},"network":{"type":"string"},"decimals":{"type":"integer","description":"Decimals amounts are rounded to."},"networkFee":{"type":"number","description":"Estimated network fee to send this asset, in asset units."},"confirmMinutes":{"type":"number","description":"Estimated minutes until a deposit is final."},"addressHint":{"type":"string","description":"Address format hint for UIs."},"priceUsd":{"type":["number","null"],"description":"Mid price in USD at the first venue; null when unavailable."},"min":{"type":["number","null"],"description":"Per-order minimum in asset units; null when unpriced."},"max":{"type":["number","null"],"description":"Per-order maximum in asset units; null when unpriced."}},"required":["id","symbol","name","network","decimals","networkFee","confirmMinutes","addressHint","priceUsd","min","max"]},"AssetsResponse":{"type":"object","properties":{"priceSource":{"type":"string","enum":["live","static"],"description":"static = fallback/simulated prices."},"limitsUsd":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"]},"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}},"required":["priceSource","limitsUsd","assets"]},"FeeLine":{"type":"object","properties":{"label":{"type":"string"},"usd":{"type":"number"}},"required":["label","usd"]},"Quote":{"type":"object","properties":{"mode":{"type":"string","enum":["send"],"description":"Present only for Private Send (same asset in and out)."},"rateType":{"type":"string","enum":["fixed"],"description":"Present only for fixed-rate quotes: amountOut is guaranteed, not an estimate."},"from":{"$ref":"#/components/schemas/AssetId"},"to":{"$ref":"#/components/schemas/AssetId"},"amountIn":{"type":"number","description":"Exact amount to deposit, in `from` units."},"platformFeePct":{"type":"number","description":"Service fee as a fraction (0.01 = 1%)."},"amountOut":{"type":"number","description":"Estimated (floating) or guaranteed (fixed) amount received, in `to` units."},"fees":{"type":"array","items":{"$ref":"#/components/schemas/FeeLine"}},"totalFeeUsd":{"type":"number"},"totalFeePct":{"type":"number","description":"Total fees as a fraction of the input value."},"etaMinutes":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"]},"fastPath":{"type":"boolean","description":"ETA assumes the express path (enough liquidity when quoted)."},"priceSource":{"type":"string","enum":["live","static"]},"createdAt":{"type":"string","format":"date-time"},"validUntil":{"type":"string","description":"The quoteId can start an order until this time (about 2 minutes).","format":"date-time"},"rewardsPerk":{"type":"object","properties":{"tier":{"type":"string","description":"Rewards tier that earned the perk.","enum":["rest","fermata","coda"]},"discountPct":{"type":"number","description":"Share of the protocol fee waived (0.1 = 10%). platformFeePct is already the discounted rate."},"savedUsd":{"type":"number","description":"USD value of the waived fee at quote time; also a negative `Rewards perk` fee line."}},"required":["tier","discountPct","savedUsd"],"description":"Present when the request carried a rewards pass whose tier has a perk."}},"required":["from","to","amountIn","platformFeePct","amountOut","fees","totalFeeUsd","totalFeePct","etaMinutes","priceSource","createdAt","validUntil"]},"QuoteRequest":{"type":"object","properties":{"from":{"$ref":"#/components/schemas/AssetId"},"to":{"$ref":"#/components/schemas/AssetId"},"amount":{"type":"number","description":"Amount to send, in `from` units. Required unless amountOut is given.","exclusiveMinimum":0},"amountOut":{"type":"number","description":"Reverse quote: amount to receive, in `to` units. When present, `amount` is ignored and the result's amountOut is at least this.","exclusiveMinimum":0},"mode":{"type":"string","enum":["swap","send"],"default":"swap","description":"send = Private Send (from and to must be the same asset)."},"rateType":{"type":"string","enum":["floating","fixed"],"default":"floating","description":"fixed guarantees amountOut if exactly amountIn arrives within the deposit window; only offered with express liquidity."},"demo":{"type":"boolean","description":"true = testnet/simulated order, false = real funds. Omitted = the server's mode."},"rewardsPass":{"$ref":"#/components/schemas/RewardsPassCode","description":"Optional. Applies the pass's tier perk to the protocol fee. A well-formed but unknown pass is ignored."}},"required":["from","to"]},"QuoteResponse":{"type":"object","properties":{"demo":{"type":"boolean"},"quoteId":{"$ref":"#/components/schemas/QuoteId"},"quote":{"$ref":"#/components/schemas/Quote"}},"required":["demo","quoteId","quote"]},"QuoteId":{"type":"string","description":"Single-use quote handle.","pattern":"^q_[A-Za-z0-9_-]{16}$"},"Recipient":{"type":"object","properties":{"address":{"type":"string","description":"Destination address for this part (same asset as the quote's `to`)."},"memo":{"type":"string","description":"Destination tag / memo: whole number up to 4294967295.","pattern":"^\\d{1,10}$"},"sharePct":{"type":"number","description":"Share of the payout in percent (at least 10); all shares add up to 100.","minimum":10,"maximum":100}},"required":["address","sharePct"]},"OrderRequest":{"type":"object","properties":{"quoteId":{"$ref":"#/components/schemas/QuoteId"},"destinationAddress":{"type":"string","description":"Payout address (checksum-validated). Required unless recipients is given."},"destinationMemo":{"type":"string","description":"Destination tag / memo: whole number up to 4294967295.","pattern":"^\\d{1,10}$"},"recipients":{"type":"array","minItems":2,"maxItems":5,"items":{"$ref":"#/components/schemas/Recipient"},"description":"Multiswap: split one deposit across recipients. Each part must be worth at least $25. Replaces destinationAddress."},"refundAddress":{"type":"string","description":"Refund address on the `from` network (checksum-validated)."},"refundMemo":{"type":"string","description":"Destination tag / memo: whole number up to 4294967295.","pattern":"^\\d{1,10}$"},"payoutDelay":{"type":"boolean","description":"true = wait a random delay (operator-configured range, typically 30 min–3 h) before payout."},"demoScenario":{"type":"string","enum":["normal","hop1_fail","hop2_fail"],"description":"Testnet orders only: simulated outcome."},"from":{"$ref":"#/components/schemas/AssetId","description":"Legacy; if sent, must equal the quote's value (422 QUOTE_MISMATCH)."},"to":{"$ref":"#/components/schemas/AssetId","description":"Legacy; must match the quote."},"amount":{"type":"number","description":"Legacy; must match the quote's amountIn."},"demo":{"type":"boolean","description":"Legacy; must match the quote."},"rewardsPass":{"$ref":"#/components/schemas/RewardsPassCode","description":"Optional. The order stores only the pass hash and earns points when it completes. Its perk must match the quote's, otherwise 409 RATE_MOVED with a re-priced quote."}},"required":["quoteId","refundAddress"]},"OrderCreated":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrderId"},"order":{"$ref":"#/components/schemas/Order"},"replayed":{"type":"boolean","enum":[true],"description":"Present when the quoteId was already used: this is the existing order."}},"required":["orderId","order"]},"RewardsPassCode":{"type":"string","description":"Rewards pass code, any case, dashes optional. A secret: send it in a body or the x-rewards-pass header, never in a URL.","pattern":"^(TCT-?)?([A-Za-z2-7]{8}-?){3}[A-Za-z2-7]{8}$","maxLength":80},"RewardsPass":{"type":"object","properties":{"season":{"type":"object","properties":{"testnet":{"type":"boolean","description":"true = testnet season: points and perks apply to testnet orders."}},"required":["testnet"]},"createdAt":{"type":"string","format":"date-time"},"points":{"type":"integer","description":"Order points plus mission points."},"tier":{"type":"object","properties":{"id":{"type":"string","enum":["rest","fermata","coda"]},"minPoints":{"type":"integer"},"discountPct":{"type":"number"}},"required":["id","minPoints","discountPct"]},"nextTier":{"type":["object","null"],"properties":{"id":{"type":"string"},"minPoints":{"type":"integer"},"discountPct":{"type":"number"},"pointsToGo":{"type":"integer"}},"required":["id","minPoints","discountPct","pointsToGo"]},"progress":{"type":"number","description":"0–1 progress from the current tier to the next."},"perk":{"type":"object","properties":{"platformFeeDiscountPct":{"type":"number","description":"Share of the protocol fee waived on quotes made with this pass."}},"required":["platformFeeDiscountPct"]},"activity":{"type":"object","properties":{"completedOrders":{"type":"integer"},"pendingOrders":{"type":"integer"},"volumeUsd":{"type":"number"},"orderPoints":{"type":"integer"},"boostedOrders":{"type":"integer","description":"Completed orders that earned a campaign multiplier."}},"required":["completedOrders","pendingOrders","volumeUsd","orderPoints","boostedOrders"]},"missions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["first_swap","first_send","first_multiswap","payout_delay","fixed_rate","verify_receipt","three_assets","volume_1k"]},"points":{"type":"integer"},"target":{"type":"integer"},"current":{"type":"integer"},"done":{"type":"boolean"},"completedAt":{"type":"string","format":"date-time"}},"required":["id","points","target","current","done"]}}},"required":["season","createdAt","points","tier","nextTier","progress","perk","activity","missions"]},"RewardsCampaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"startsAt":{"type":"string","description":"Inclusive.","format":"date-time"},"endsAt":{"type":"string","description":"Exclusive.","format":"date-time"},"multiplier":{"type":"number","description":"Points multiplier for matching orders completed in the window. Overlapping campaigns don't stack: the highest applies."},"assets":{"type":"array","items":{"$ref":"#/components/schemas/AssetId"},"description":"Matches orders with one of these as input or output."},"pair":{"type":"object","properties":{"from":{"$ref":"#/components/schemas/AssetId"},"to":{"$ref":"#/components/schemas/AssetId"}},"required":["from","to"],"description":"Matches only this direction."},"phase":{"type":"string","enum":["live","upcoming"]}},"required":["id","name","description","startsAt","endsAt","multiplier","phase"]},"OrderId":{"type":"string","description":"Order ID. Also the access key to the order: treat it as a secret.","pattern":"^[A-Za-z0-9_-]{12}$"},"Deposit":{"type":"object","properties":{"address":{"type":"string","description":"Deposit address unique to this order."},"memo":{"type":"string","description":"Deposit memo/tag the sender must include, when the asset needs one."},"amount":{"type":"number","description":"Amount received."},"txid":{"type":"string"},"detectedAt":{"type":"string","format":"date-time"},"confirmedAt":{"type":"string","format":"date-time"}},"required":["address"]},"Order":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OrderId"},"demo":{"type":"boolean","description":"Testnet/simulated order."},"demoScenario":{"type":"string","enum":["normal","hop1_fail","hop2_fail"]},"state":{"$ref":"#/components/schemas/PublicState"},"final":{"type":"boolean","description":"Order will not change again."},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","description":"Deposit window end.","format":"date-time"},"from":{"$ref":"#/components/schemas/AssetId"},"to":{"$ref":"#/components/schemas/AssetId"},"quote":{"$ref":"#/components/schemas/Quote"},"destinationAddress":{"type":"string","description":"Payout address. For payment-link orders this is a fixed placeholder; the recipient is never revealed."},"destinationMemo":{"type":"string"},"paylinkId":{"type":"string"},"rateType":{"type":"string","enum":["floating","fixed"]},"fixedRate":{"type":"object","properties":{"amountOut":{"type":"number","description":"Guaranteed amount."},"status":{"type":"string","enum":["locked","voided","settled"]},"voidReason":{"type":"string","enum":["amount_mismatch"],"description":"voided: the deposit didn't match amountIn; the order continues at the floating rate."}},"required":["amountOut","status"]},"parentId":{"type":"string","description":"Multiswap child: the parent order ID."},"splitIndex":{"type":"integer","description":"Multiswap child: index of this part."},"split":{"type":"object","properties":{"spawnedAt":{"type":"string","description":"When child orders were created.","format":"date-time"},"legs":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"memo":{"type":"string"},"share":{"type":"number","description":"Fraction (0–1)."},"childId":{"$ref":"#/components/schemas/OrderId"},"fixedAmountOut":{"type":"number","description":"Fixed rate: guaranteed amount for this part."}},"required":["address","share"]}}},"required":["legs"]},"refundAddress":{"type":"string"},"deposit":{"$ref":"#/components/schemas/Deposit"},"displayStatus":{"$ref":"#/components/schemas/DisplayStatus"},"hops":{"$ref":"#/components/schemas/Hops"},"purgedAt":{"type":"string","description":"Personal data was deleted (retention or /forget); addresses and txids read `[redacted]`.","format":"date-time"},"stateSince":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"progress":{"type":"object","properties":{"depositConfirmed":{"type":"boolean"},"leg1Converted":{"type":"boolean"},"settlementSent":{"type":"boolean"},"settlementConfirmations":{"type":"integer"},"settlementConfirmedAt":{"type":"string","format":"date-time"},"leg2Deposited":{"type":"boolean"},"leg2DepositConfirmedAt":{"type":"string","format":"date-time"},"leg2Converted":{"type":"boolean"},"amountOut":{"type":"number","description":"Amount paid out (fixed rate: the guaranteed amount)."},"payoutTxid":{"type":"string","description":"Payout transaction ID. Omitted for payment-link orders."},"fastPath":{"type":"boolean","description":"Order uses the express path."},"payoutDelay":{"type":"object","properties":{"requested":{"type":"boolean","enum":[true]},"until":{"type":"string","format":"date-time"}},"required":["requested"]}},"required":["depositConfirmed","leg1Converted","settlementSent","settlementConfirmations","leg2Deposited","leg2Converted","fastPath"]},"refund":{"type":"object","properties":{"kind":{"type":"string","enum":["none","manual","auto"]},"amount":{"type":"number"},"txid":{"type":"string"}},"required":["kind"]},"failedAt":{"$ref":"#/components/schemas/PublicState","description":"State in which the order failed."},"onHold":{"type":"boolean","description":"Held for manual review."},"awaitingApproval":{"type":"string","enum":["leg1","leg2","refund","payout"],"description":"Waiting for an operator to approve this step."},"serverTime":{"type":"string","description":"Server clock; use it for countdowns.","format":"date-time"}},"required":["id","demo","state","final","createdAt","expiresAt","from","to","quote","destinationAddress","rateType","refundAddress","deposit","displayStatus","hops","stateSince","updatedAt","progress","onHold","serverTime"],"description":"Public order view. Venues, the settlement asset and internal logs are never included."},"OrderDetail":{"allOf":[{"$ref":"#/components/schemas/Order"},{"type":"object","properties":{"children":{"type":"array","description":"Multiswap parent: one entry per recipient order (progress fields are then combined across children).","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OrderId"},"displayStatus":{"$ref":"#/components/schemas/DisplayStatus"},"amountOut":{"type":"number"},"payoutTxid":{"type":"string"},"final":{"type":"boolean"}},"required":["id","displayStatus","final"]}},"settlementConfirmationsRequired":{"type":"integer"},"lateDepositWatchHours":{"type":"number","description":"How long after expiry a late deposit is still detected and refunded."}},"required":["settlementConfirmationsRequired","lateDepositWatchHours"]}],"description":"Order as returned by GET /api/order/{id}, the stream, and /forget."},"StreamEnd":{"type":"object","properties":{"reason":{"type":"string","enum":["final","reconnect"]}},"required":["reason"]},"Receipt":{"type":"object","properties":{"v":{"type":"integer","enum":[1]},"orderId":{"$ref":"#/components/schemas/OrderId"},"status":{"type":"string","enum":["COMPLETED","REFUNDED"]},"network":{"type":"string","enum":["test","main"]},"from":{"$ref":"#/components/schemas/AssetId"},"to":{"$ref":"#/components/schemas/AssetId"},"amountIn":{"type":"number"},"amountOut":{"type":["number","null"]},"payoutTxid":{"type":["string","null"]},"refundAmount":{"type":["number","null"]},"refundTxid":{"type":["string","null"]},"finalAt":{"type":"string","format":"date-time"},"issuedAt":{"type":"string","format":"date-time"}},"required":["v","orderId","status","network","from","to","amountIn","amountOut","payoutTxid","refundAmount","refundTxid","finalAt","issuedAt"]},"SignedReceipt":{"type":"object","properties":{"receipt":{"$ref":"#/components/schemas/Receipt"},"keyId":{"type":"string","description":"Matches /api/receipt-key keyId."},"alg":{"type":"string","enum":["Ed25519"]},"signature":{"type":"string","description":"base64url Ed25519 signature over JSON.stringify([v, orderId, status, network, from, to, amountIn, amountOut, payoutTxid, refundAmount, refundTxid, finalAt, issuedAt])."}},"required":["receipt","keyId","alg","signature"]},"ReceiptKey":{"type":"object","properties":{"alg":{"type":"string","enum":["Ed25519"]},"keyId":{"type":"string"},"publicKeyPem":{"type":"string","description":"SPKI PEM."}},"required":["alg","keyId","publicKeyPem"]},"AddressCheck":{"oneOf":[{"type":"object","properties":{"valid":{"type":"boolean","enum":[true]}},"required":["valid"]},{"type":"object","properties":{"valid":{"type":"boolean","enum":[false]},"reason":{"type":"string"}},"required":["valid","reason"]}]},"PayLink":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PayLinkIdValue"},"to":{"$ref":"#/components/schemas/AssetId"},"amount":{"type":"number","description":"Requested amount, in `to` units."},"description":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"demo":{"type":"boolean"},"status":{"type":"string","enum":["open","pending","paid","expired"],"description":"Only `open` links accept a quote or an order."}},"required":["id","to","amount","description","createdAt","expiresAt","demo","status"],"description":"Payment link as seen by the payer. The recipient address is never returned."},"PayLinkIdValue":{"type":"string","pattern":"^[A-Za-z0-9_-]{10}$"},"OnchainRouteResult":{"oneOf":[{"type":"object","properties":{"available":{"const":true},"provider":{"const":"lifi"},"from":{"type":"string","enum":["BTC","ETH","SOL","USDC-ETH","USDT-TRX","BNB","XRP","LTC","TRX","DOGE","USDT-ETH","AVAX","LINK","ADA"]},"to":{"type":"string","enum":["BTC","ETH","SOL","USDC-ETH","USDT-TRX","BNB","XRP","LTC","TRX","DOGE","USDT-ETH","AVAX","LINK","ADA"]},"fromChainId":{"type":"integer"},"toChainId":{"type":"integer"},"crossChain":{"type":"boolean"},"amountIn":{"type":"number"},"amountOut":{"type":"number","description":"Estimated output in `to` units."},"amountOutMin":{"type":"number","description":"Minimum output after slippage."},"amountInUsd":{"type":"number"},"amountOutUsd":{"type":"number"},"gasUsd":{"type":"number","description":"Estimated network gas in USD."},"feeUsd":{"type":"number","description":"Bridge, DEX and integrator fees in USD."},"costPct":{"type":"number","description":"Input value lost to price impact, fees and gas (fraction)."},"etaSeconds":{"type":"integer","description":"Estimated execution time."},"tools":{"type":"array","items":{"type":"string"},"description":"Bridge/DEX names in order."},"tool":{"type":"string","description":"LI.FI tool key of the main step; pass as `bridge` to the status endpoint."},"integratorFeePct":{"type":"number","description":"Integrator fee applied (fraction)."},"executionEnabled":{"type":"boolean","description":"Whether on-chain execution is enabled on this deployment."},"fromAmount":{"type":"string","description":"Amount sent in base units."},"approval":{"type":"object","properties":{"token":{"type":"string"},"spender":{"type":"string"},"amount":{"type":"string","description":"Base units."}},"required":["token","spender","amount"],"description":"ERC-20 allowance to grant before sending."},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","description":"Hex wei."},"chainId":{"type":"integer"},"gasLimit":{"type":"string","description":"Hex."}},"required":["to","data","value","chainId"]}},"required":["available","provider","from","to","amountOut","etaSeconds","tools","executionEnabled"]},{"type":"object","properties":{"available":{"const":false},"code":{"type":"string","enum":["UNSUPPORTED_ASSET","SAME_ASSET","NO_ROUTE","INVALID_AMOUNT","UPSTREAM_UNAVAILABLE"]},"reason":{"type":"string"},"executionEnabled":{"type":"boolean"}},"required":["available","code","reason","executionEnabled"]}]},"OnchainStatus":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","DONE","FAILED","NOT_FOUND","INVALID"]},"substatus":{"type":["string","null"],"description":"e.g. COMPLETED, PARTIAL, REFUNDED."},"message":{"type":["string","null"]},"receivingTxHash":{"type":["string","null"]},"explorerUrl":{"type":["string","null"]}},"required":["status","substatus","message","receivingTxHash","explorerUrl"]},"SystemStatus":{"type":"object","properties":{"network":{"type":"string","enum":["mainnet","testnet"]},"simulated":{"type":"boolean","description":"Venues and wallets are simulated."},"worker":{"type":"object","properties":{"online":{"type":"boolean"},"lastBeatSecondsAgo":{"type":["integer","null"]},"startedAt":{"type":["string","null"],"format":"date-time"}},"required":["online","lastBeatSecondsAgo","startedAt"]},"settlement":{"type":"object","properties":{"ok":{"type":"boolean"},"height":{"type":["integer","null"]},"synchronized":{"type":["boolean","null"]}},"required":["ok","height","synchronized"]},"venues":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"role":{"type":"string","enum":["hop1","hop2"]},"marketData":{"type":"string","enum":["live","unavailable"]}},"required":["label","role","marketData"]}},"orders":{"type":"object","properties":{"total":{"type":"integer"},"completed":{"type":"integer"},"refunded":{"type":"integer"},"inProgress":{"type":"integer"},"onHold":{"type":"integer"}},"required":["total","completed","refunded","inProgress","onHold"]},"fastPath":{"type":"object","properties":{"enabled":{"type":"boolean"},"liquidity":{"type":"string","enum":["available","low","off"]}},"required":["enabled","liquidity"]},"compliance":{"type":"object","properties":{"screening":{"type":"object","properties":{"provider":{"type":"string"},"entries":{"type":"integer"},"listFetched":{"type":["string","null"],"format":"date-time"}},"required":["provider","entries","listFetched"]},"audit":{"type":"object","properties":{"ok":{"type":"boolean"},"entries":{"type":"integer"},"checkedAt":{"type":["string","null"],"format":"date-time"}},"required":["ok","entries","checkedAt"]}},"required":["screening","audit"]},"checkedAt":{"type":"string","format":"date-time"}},"required":["network","simulated","worker","settlement","venues","orders","fastPath","compliance","checkedAt"]},"Health":{"type":"object","properties":{"service":{"type":"string"},"ok":{"type":"boolean"},"worker":{"type":"object","properties":{"lastBeatSecondsAgo":{"type":["integer","null"]},"alive":{"type":"boolean"}},"required":["lastBeatSecondsAgo","alive"]},"settlement":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]},"audit":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"}},"required":["ok","checkedAt"]},{"type":"null"}],"description":"Informational; not part of `ok`."},"prices":{"type":"object","properties":{"source":{"type":"string","enum":["live","static"]}},"required":["source"]}},"required":["service","ok","worker","settlement","audit","prices"],"description":"Public health view. An operator token adds an `internal` object (not documented here)."},"Readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"checks":{"type":"object","properties":{"worker":{"type":"boolean"},"storage":{"type":"boolean"},"config":{"type":"boolean"}},"required":["worker","storage","config"]}},"required":["ok","checks"]},"PartnerKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"revokedAt":{"type":"string","format":"date-time"},"webhookUrl":{"type":"string","format":"uri"}},"required":["id","name","createdAt"]},"PartnerSummary":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/PartnerKey"},"orders":{"type":"object","properties":{"total":{"type":"integer"},"completed":{"type":"integer"},"byStatus":{"type":"object","additionalProperties":{"type":"integer"},"propertyNames":{"$ref":"#/components/schemas/DisplayStatus"}}},"required":["total","completed","byStatus"]},"volumeUsd":{"type":"object","properties":{"completed":{"type":"number"},"all":{"type":"number"}},"required":["completed","all"]},"recent":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OrderId"},"from":{"$ref":"#/components/schemas/AssetId"},"to":{"$ref":"#/components/schemas/AssetId"},"amountIn":{"type":"number"},"displayStatus":{"$ref":"#/components/schemas/DisplayStatus"},"createdAt":{"type":"string","format":"date-time"},"demo":{"type":"boolean"}},"required":["id","from","to","amountIn","displayStatus","createdAt","demo"]}},"webhooks":{"type":"object","properties":{"pending":{"type":"integer"},"dead":{"type":"integer"}},"required":["pending","dead"],"description":"Webhook delivery queue counts."}},"required":["key","orders","volumeUsd","recent","webhooks"]},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"Event ID (also in X-Webhook-Event-Id). Deliveries can repeat: deduplicate on it."},"type":{"type":"string","enum":["order.created","order.updated","test.ping"]},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object"}},"required":["id","type","createdAt","data"]},"OrderCreatedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"order.created"},"data":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrderId"},"displayStatus":{"$ref":"#/components/schemas/DisplayStatus"},"hops":{"$ref":"#/components/schemas/Hops"}},"required":["orderId","displayStatus","hops"]}}}]},"OrderUpdatedEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"order.updated"},"data":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrderId"},"displayStatus":{"$ref":"#/components/schemas/DisplayStatus"},"previousStatus":{"$ref":"#/components/schemas/DisplayStatus"},"hops":{"$ref":"#/components/schemas/Hops"},"payoutTxid":{"type":"string"},"refundTxid":{"type":"string"}},"required":["orderId","displayStatus","previousStatus","hops"]}}}]},"TestPingEvent":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"test.ping"},"data":{"type":"object","properties":{"message":{"type":"string"},"keyId":{"type":"string"}},"required":["message","keyId"]}}}]}},"responses":{"PayloadTooLarge":{"description":"Request body larger than 16 KB.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["PAYLOAD_TOO_LARGE"]}}}]}}}},"RateLimited":{"description":"Rate limit exceeded. Wait `retryAfter` seconds.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["RATE_LIMITED"]}}}]}}}},"InternalError":{"description":"Unexpected error. Quote the requestId if you contact support.","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INTERNAL_ERROR"]}}}]}}}},"InvalidApiKey":{"description":"An `Authorization: Bearer sk_…` header was sent but the key is invalid or revoked (any endpoint).","headers":{"x-request-id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_API_KEY"]}}}]}}}}},"parameters":{"OrderId":{"name":"id","in":"path","required":true,"description":"Order ID.","schema":{"$ref":"#/components/schemas/OrderId"}},"PayLinkId":{"name":"id","in":"path","required":true,"description":"Payment link ID.","schema":{"$ref":"#/components/schemas/PayLinkIdValue"}}},"headers":{"XRequestId":{"description":"Request ID for support and logs.","schema":{"type":"string","format":"uuid"}},"RetryAfter":{"description":"Seconds to wait.","schema":{"type":"integer"}},"IdempotentReplay":{"description":"`true` when the response is a replay for a repeated Idempotency-Key.","schema":{"type":"string","enum":["true"]}}},"securitySchemes":{"partnerKey":{"type":"http","scheme":"bearer","bearerFormat":"sk_<12 alphanumerics>_<43 base64url>","description":"API key issued by the operator. Required for /api/partner/*, optional elsewhere (higher limits, webhooks, partner stats)."}}}}