{"openapi":"3.1.0","info":{"title":"Setryn Public API","version":"1.0.0","summary":"Versioned read and order-relay API over the Setryn contracts.","description":"Every response is derived from the same contract state and events as the Setryn platform. The API never holds user keys and never sends transactions for a user: orders and private RFQs are prepared as EIP-712 typed data, signed locally, and relayed through the platform's risk admission path, which returns the exact transactions the signer sends.\n\n**Markets.** Every catalog market listed in the deployment runtime executes onchain (`execution: ONCHAIN`) on its own series, public book, price grid (`onchain.priceScale` and `onchain.priceOffset`: priceTicks = (price - priceOffset) x priceScale), tick size, lot cap and collateral per lot. Each market is a cash-settled dated range forward: the long receives lotSize x clamp(fixing - floor, 0, cap - floor) at expiry, and the quoted price is the forward level.\n\n**Versioning.** The major version is in the path (`/api/v1`). Additive changes (new fields, endpoints, enum members announced in advance) ship within v1. Breaking changes ship as `/api/v2`, and v1 keeps serving for at least 90 days after v2 is announced, with a `Deprecation` and `Sunset` header during that window. Every response carries `Setryn-Api-Version` and `Setryn-Request-Id`.\n\n**Authentication.** `Authorization: Bearer stk_...`. Keys carry scopes `read` and `trade` and may be restricted to specific signer addresses.\n\n**Rate limits.** Per-key token bucket, default capacity 20 with 2 tokens/s refill. Every response carries RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset and RateLimit-Policy; a refused request gets 429 with Retry-After. Keys issued under a partner deployment also share that partner's apiRequestsPerMinute quota (Setryn-Partner-Quota-Limit and Setryn-Partner-Quota-Remaining headers); a paused partner's keys get 403 PARTNER_INACTIVE.\n\n**Replay protection.** Every write (POST/DELETE) needs Setryn-Timestamp (unix seconds within ±60s), a fresh Setryn-Nonce (16-128 chars of [A-Za-z0-9_-], single use per key) and Setryn-Signature: hex HMAC-SHA256 keyed with SHA-256(apiKey) (32 raw bytes) over `SETRYN-HMAC-SHA256-V1\\nMETHOD\\npath?query\\ntimestamp\\nnonce\\nhex(SHA-256(body))`.\n\n**Errors.** Always `{ \"error\": { \"code\", \"message\" } }` with a stable code.\n\n**Service objectives.** Reads answer from chain state at the current head block and are memoized per block. There is no availability commitment yet for any deployment."},"servers":[{"url":"https://setryn.vercel.app/api/v1"}],"tags":[{"name":"Markets"},{"name":"Accounts"},{"name":"Orders"},{"name":"RFQ"},{"name":"Positions"},{"name":"System"},{"name":"Keys"}],"paths":{"/status":{"get":{"summary":"Chain, head block and deployment evidence summary","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Status"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["System"],"operationId":"getStatus"}},"/markets":{"get":{"summary":"List markets","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Markets"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listMarkets"}},"/markets/{marketId}":{"get":{"summary":"Get one market","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Market"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Markets"],"parameters":[{"name":"marketId","in":"path","required":true,"schema":{"type":"string"},"example":"BTC-YC-24DEC26"}],"operationId":"getMarket"}},"/markets/{marketId}/book":{"get":{"summary":"Order book: the live direct book of the market's active series. A market the deployment does not list onchain answers 409 MARKET_NOT_ONCHAIN.","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Book"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Markets"],"parameters":[{"name":"marketId","in":"path","required":true,"schema":{"type":"string"},"example":"BTC-YC-24DEC26"}],"operationId":"getBook"}},"/markets/{marketId}/trades":{"get":{"summary":"Trade tape, newest first: onchain direct-book fills of the market's series (private RFQ fills stay off the public tape). A market the deployment does not list onchain answers 409 MARKET_NOT_ONCHAIN.","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Trade"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Markets"],"parameters":[{"name":"marketId","in":"path","required":true,"schema":{"type":"string"},"example":"BTC-YC-24DEC26"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listTrades"}},"/accounts/{accountId}":{"get":{"summary":"Collateral balance of an account","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"getAccount"}},"/accounts/{accountId}/positions":{"get":{"summary":"Live positions of an account","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Position"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listPositions"}},"/fills":{"get":{"summary":"Fills of an account, newest first","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Fill"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Accounts"],"parameters":[{"name":"accountId","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"description":"Collateral account id. Either accountId or signer is required."},{"name":"signer","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"description":"Order signer; resolves to the signer's primary account."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listFills"}},"/receipts":{"get":{"summary":"Execution receipts of an account, newest first","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Receipt"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Accounts"],"parameters":[{"name":"accountId","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"description":"Collateral account id. Either accountId or signer is required."},{"name":"signer","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"description":"Order signer; resolves to the signer's primary account."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listReceipts"}},"/orders":{"get":{"summary":"Registered orders of an account or signer, newest first","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Orders"],"parameters":[{"name":"accountId","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"description":"Collateral account id. Either accountId or signer is required."},{"name":"signer","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"description":"Order signer; resolves to the signer's primary account."},{"name":"state","in":"query","schema":{"type":"string","enum":["WORKING","PARTIALLY_FILLED","FILLED","CANCELLED","EXPIRED"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listOrders"},"post":{"summary":"Relay a signed order to risk admission and get the transactions to send","description":"Verifies the EIP-712 signature, checks marketability, and runs the platform's risk admission for the order. Returns the transactions the signer must send in order. Requires scope `trade` and replay protection headers.","tags":["Orders"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitOrderRequest"}}}},"responses":{"202":{"description":"Risk reserved; send the returned transactions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SubmitOrderResult"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Risk admission refused the order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"submitOrder"}},"/orders/prepare":{"post":{"summary":"Build an unsigned public order and its EIP-712 typed data","tags":["Orders"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareOrderRequest"}}}},"responses":{"200":{"description":"Unsigned order","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PreparedOrder"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"prepareOrder"}},"/orders/{orderHash}":{"get":{"summary":"One registered order","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Orders"],"parameters":[{"name":"orderHash","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"getOrder"}},"/orders/{orderHash}/cancel":{"post":{"summary":"Prepare the cancellation of a working order: transactions to send and the risk-release message to sign","tags":["Orders"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","parameters":[{"name":"orderHash","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Cancellation to execute from the order's signer","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/positions/exit/prepare":{"post":{"summary":"Build the full lifecycle exit of a position and its opposite closing position","description":"Pairs an open position with the opposite position that closes it (opened by an opposite-side order through /orders). Both must be between the signer's account and the same counterparty, with equal lots and no package provenance. Returns the kind-4 LifecycleAction, its inputs and collateral replacements, the counterparty's consent and consent signature, and the SetrynLifecycleActionV1 typed data for the signer to sign. The counterparty consent comes from the platform's designated maker, which consents only for positions it is the counterparty of. Nothing is sent onchain. Refusals use code EXIT_NOT_ELIGIBLE.","tags":["Positions"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareExitRequest"}}}},"responses":{"200":{"description":"Unsigned exit with counterparty consent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PreparedExit"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"prepareExit"}},"/positions/exit":{"post":{"summary":"Verify a signed lifecycle exit and get the authorize and execute transactions to send","description":"Re-derives the action id from the submitted action and checks it against the consent, checks the committed input and replacement hashes, verifies the consent and actor signatures, and simulates authorizeAction from the signer. Returns AUTHORIZE_LIFECYCLE and EXECUTE_LIFECYCLE for the signer to send in order. Requires scope `trade` and replay protection headers.","tags":["Positions"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitExitRequest"}}}},"responses":{"200":{"description":"Send the returned transactions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SubmitExitResult"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"submitExit"}},"/rfqs":{"get":{"summary":"Private RFQs requested by an account or signer, newest first","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rfq"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["RFQ"],"parameters":[{"name":"accountId","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"description":"Collateral account id. Either accountId or signer is required."},{"name":"signer","in":"query","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"description":"Order signer; resolves to the signer's primary account."},{"name":"state","in":"query","schema":{"type":"string","enum":["INVITING","COLLECTING","SELECTION_LOCKED","CAPACITY_RESERVED","AUTHORIZED","SUBMITTED","CLEARING","SETTLED","CANCELLED","EXPIRED","REJECTED"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listRfqs"},"post":{"summary":"Relay a signed private RFQ order and request to risk admission and get the transactions to send","description":"Verifies the PublicOrder and PrivateRfqRequest signatures, checks that the request is exactly the one derived from the order (taker, series, side, size, fee cap, deadline and the deployment's private RFQ privacy, execution and disclosure terms), and runs the platform's risk admission for the taker order. Returns APPROVE_LOCK_OPERATOR when missing, BIND_RISK, REGISTER_ORDER, REGISTER_RFQ and OPEN_RFQ for the requester to send in order. A key restricted to signers can only submit for those signers.","tags":["RFQ"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRfqRequest"}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SubmitRfqResult"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Risk admission refused the order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"submitRfq"}},"/rfqs/prepare":{"post":{"summary":"Build an unsigned private RFQ: the taker order and the request bound to it","description":"Builds the taker's PublicOrder on the market's series with the private RFQ execution mode, its price grid, lot cap and collateral per lot, and the PrivateRfqRequest committing to it. Returns both EIP-712 typed data (PublicOrder on OrderState, PrivateRfqRequest on the PrivateRfqBook). timeInForce defaults to IOC; FOK is refused because the RFQ book requires a no-partial-fill request to keep its remainder open. limitPrice is the worst price the requester accepts. Nothing is sent onchain.","tags":["RFQ"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareRfqRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PreparedRfq"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"prepareRfq"}},"/rfqs/{rfqId}":{"get":{"summary":"One private RFQ with its quotes","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Rfq"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["RFQ"],"parameters":[{"name":"rfqId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"getRfq"}},"/rfqs/{rfqId}/quotes":{"get":{"summary":"Quotes on an RFQ, best price for the requester first","security":[{"bearer":[]}],"x-setryn-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RfqQuote"}},"page":{"type":"object","properties":{"limit":{"type":"integer"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer"}},"required":["limit","nextCursor","total"]}},"required":["data","page"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["RFQ"],"parameters":[{"name":"rfqId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from page.nextCursor."}],"operationId":"listRfqQuotes"},"post":{"summary":"Invite the eligible solvers to quote an RFQ that is collecting","description":"The RFQ must be COLLECTING (OPEN_RFQ sent). Where the deployment runs a designated maker, it quotes from the live reference price the same way the terminal triggers it: it registers a risk-bound backing order, submits a signed firm quote and reserves its capacity. Returns the RFQ's quotes.","tags":["RFQ"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SolicitQuotesResult"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"rfqId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"solicitRfqQuotes"}},"/rfqs/{rfqId}/accept/prepare":{"post":{"summary":"Build the unsigned selection of one quote","description":"The quote must be RESERVED (firm capacity locked) and at or inside the requester's signed limit (withinLimit). Returns the RfqSelectionAuthorization typed data on the PrivateRfqBook, with a deadline no later than the RFQ's and the quote's.","tags":["RFQ"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["quoteId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PreparedRfqAcceptance"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"rfqId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"prepareRfqAcceptance"}},"/rfqs/{rfqId}/accept":{"post":{"summary":"Verify a signed quote selection and get the transactions to send","description":"Verifies the selection signature and terms, simulates lockSelection from the requester, and returns LOCK_SELECTION, CONFIRM_CAPACITY, AUTHORIZE_SUBMISSION and SUBMIT_RFQ for the requester to send in order.","tags":["RFQ"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selection":{"$ref":"#/components/schemas/SerializedRfqSelection"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"}},"required":["selection","signature"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AcceptRfqResult"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"rfqId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"acceptRfqQuote"}},"/rfqs/{rfqId}/settle":{"post":{"summary":"Hand a submitted RFQ to its permitted executor for atomic clearing","description":"The RFQ must be SUBMITTED. The executor clears the selected quote through AtomicClearingEngine.clearSeriesWithHandoff; the executor is the platform operator. Returns the fill, position and fees. Settling a SETTLED RFQ returns its settlement again.","tags":["RFQ"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RfqSettlement"}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"rfqId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"settleRfq"}},"/rfqs/{rfqId}/cancel":{"post":{"summary":"Prepare the cancellation of an unselected or expired RFQ","description":"Returns CANCEL_RFQ (cancelRfq while INVITING or COLLECTING, expireRfq past the deadline) and the risk-release message whose signature frees the collateral reserved for the taker order.","tags":["RFQ"],"security":[{"bearer":[],"timestamp":[],"nonce":[],"signature":[]}],"x-setryn-scope":"trade","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid or revoked API key, bad signature, or stale timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. See Retry-After and RateLimit-* headers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment or chain RPC unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"rfqId","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"operationId":"prepareRfqCancel"}},"/keys":{"get":{"summary":"List API keys with usage, rate-limit state and recent requests (local console only)","tags":["Keys"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["data"]}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listKeys"},"post":{"summary":"Issue an API key (local console only). The key is returned once.","tags":["Keys"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueKeyRequest"}}}},"responses":{"201":{"description":"Issued","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"key":{"type":"string"},"record":{"$ref":"#/components/schemas/ApiKey"}},"required":["key","record"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Rejected by market, book, position or replay state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"issueKey"}},"/keys/{keyId}":{"delete":{"summary":"Revoke an API key (local console only)","tags":["Keys"],"security":[],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKey"}},"required":["data"]}}}},"403":{"description":"Insufficient scope, signer not allowed, or console not local","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"revokeKey"}},"/openapi.json":{"get":{"summary":"This document","tags":["System"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1 document"}},"operationId":"getOpenApi"}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"stk_test_<id>_<secret>"},"timestamp":{"type":"apiKey","in":"header","name":"Setryn-Timestamp"},"nonce":{"type":"apiKey","in":"header","name":"Setryn-Nonce"},"signature":{"type":"apiKey","in":"header","name":"Setryn-Signature"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"Status":{"type":"object","properties":{"environment":{"type":"string"},"chainId":{"type":"integer"},"headBlock":{"type":"string","pattern":"^-?\\d+$"},"headTime":{"type":"string","format":"date-time"},"chainTime":{"type":"string","format":"date-time"},"deployment":{"type":"object","properties":{"status":{"type":"string"},"sourceCommit":{"oneOf":[{"type":"string"},{"type":"null"}]},"contracts":{"type":"integer"},"matching":{"type":"integer"},"state":{"type":"string","enum":["VERIFIED","DEGRADED"]}},"required":["status","sourceCommit","contracts","matching","state"]},"onchainMarkets":{"type":"array","items":{"type":"string"},"description":"Catalog ids of the markets that execute onchain."},"settlement":{"type":"object","properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"assetId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"collateralSymbol":{"type":"string"},"decimals":{"type":"integer"}},"required":["token","assetId","collateralSymbol","decimals"]},"contracts":{"type":"object","additionalProperties":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}},"required":["environment","chainId","headBlock","headTime","chainTime","deployment","onchainMarkets","settlement","contracts"]},"Market":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"underlying":{"type":"string"},"strategyKind":{"type":"string"},"strategyLabel":{"type":"string"},"priceUnit":{"type":"string"},"priceDecimals":{"type":"integer"},"tickSize":{"type":"number"},"tenorLabel":{"type":"string"},"expiry":{"type":"string"},"settlementClass":{"type":"string"},"settlementAsset":{"type":"string"},"fixingSource":{"type":"string"},"qualification":{"type":"string","enum":["QUALIFIED","CONDITIONAL","SUSPENDED"]},"qualificationNote":{"type":"string"},"contractMultiplier":{"type":"number"},"collateralPerLot":{"type":"number"},"maxOrderLots":{"oneOf":[{"type":"integer"},{"type":"null"}]},"execution":{"type":"string","enum":["ONCHAIN"]},"onchain":{"oneOf":[{"type":"object","properties":{"chainId":{"type":"integer"},"seriesId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"marketId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"bookId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"orderState":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"publicOrderBook":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"privateRfqBook":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"tickSizeMinor":{"type":"integer","description":"Settlement minor units per price tick per lot."},"priceScale":{"type":"integer","description":"Price ticks per unit of package price: priceTicks = (price - priceOffset) x priceScale. Prices must sit on this grid."},"priceOffset":{"type":"number","description":"Price at zero ticks (the range forward's floor)."},"maxOrderLots":{"type":"integer"},"maxLongDebitMinorPerLot":{"type":"integer"},"maxShortDebitMinorPerLot":{"type":"integer"},"seriesVersion":{"type":"integer","description":"The series' active version: the targetVersion orders sign. A fee change re-versions every series."},"feeScheduleId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"feeScheduleVersion":{"type":"integer","description":"The fee schedule version the registry has active. Orders must sign this version; the book is keyed by it."},"makerFeeRatePpm":{"type":"integer","description":"Active maker charge rate against 1,000,000 (100 = 1 bp), read from chain."},"takerFeeRatePpm":{"type":"integer","description":"Active taker charge rate against 1,000,000 (100 = 1 bp), read from chain."},"makerFlatFeeMinor":{"type":"integer","description":"Flat maker charge per fill in settlement minor units."},"takerFlatFeeMinor":{"type":"integer","description":"Flat taker charge per fill in settlement minor units."},"feeSource":{"type":"string","enum":["CHAIN","RUNTIME"],"description":"RUNTIME when the chain was unreachable and the deployment's recorded rates were used."}},"required":["chainId","seriesId","marketId","bookId","orderState","publicOrderBook","privateRfqBook","tickSizeMinor","priceScale","priceOffset","maxOrderLots","maxLongDebitMinorPerLot","maxShortDebitMinorPerLot","seriesVersion","feeScheduleId","feeScheduleVersion","makerFeeRatePpm","takerFeeRatePpm","makerFlatFeeMinor","takerFlatFeeMinor","feeSource"]},{"type":"null"}]},"quote":{"type":"object","properties":{"source":{"type":"string","enum":["MARKET_DATA","LISTING_REFERENCE"],"description":"MARKET_DATA once the live feed was read; LISTING_REFERENCE when only the listing is available."},"netPrice":{"oneOf":[{"type":"number","description":"The mark: book mid, else the last fill, else the Chainlink reference (see markSource)."},{"type":"null"}]},"markSource":{"type":"string","enum":["MID","LAST","REFERENCE","NONE"]},"priorNetPrice":{"oneOf":[{"type":"number","description":"First fill price in the last 24 hours."},{"type":"null"}]},"bestBid":{"oneOf":[{"type":"number"},{"type":"null"}]},"bestAsk":{"oneOf":[{"type":"number"},{"type":"null"}]},"referencePrice":{"oneOf":[{"type":"number","description":"Chainlink reference of the underlying on Arbitrum."},{"type":"null"}]}},"required":["source","netPrice","markSource","priorNetPrice","bestBid","bestAsk","referencePrice"]},"terms":{"type":"object","properties":{"floor":{"type":"number"},"cap":{"type":"number"},"lotSize":{"type":"number","description":"Units of the underlying per lot."},"expiryAt":{"type":"string","format":"date-time"},"lastTradingAt":{"type":"string","format":"date-time"}},"required":["floor","cap","lotSize","expiryAt","lastTradingAt"]},"legs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"side":{"type":"string","enum":["BUY","SELL"]},"ratio":{"type":"number"}},"required":["id","side","ratio"]}}},"required":["id","name","code","underlying","strategyKind","strategyLabel","priceUnit","priceDecimals","tickSize","tenorLabel","expiry","settlementClass","settlementAsset","fixingSource","qualification","qualificationNote","contractMultiplier","collateralPerLot","maxOrderLots","execution","onchain","quote","terms","legs"]},"BookLevel":{"type":"object","properties":{"price":{"type":"number"},"lots":{"type":"integer"},"priceTicks":{"type":"string","pattern":"^-?\\d+$"},"orders":{"type":"integer"}},"required":["price","lots"]},"Book":{"type":"object","properties":{"marketId":{"type":"string"},"source":{"type":"string","enum":["ONCHAIN_PUBLIC_BOOK"]},"executable":{"type":"boolean"},"seriesId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"bookId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"priceScale":{"type":"integer"},"priceOffset":{"type":"number","description":"Price at zero ticks (the range forward's floor): price = priceOffset + priceTicks / priceScale."},"headBlock":{"type":"string","pattern":"^-?\\d+$"},"chainTime":{"type":"string","format":"date-time"},"bids":{"type":"array","items":{"$ref":"#/components/schemas/BookLevel"}},"asks":{"type":"array","items":{"$ref":"#/components/schemas/BookLevel"}},"note":{"type":"string"}},"required":["marketId","source","executable","bids","asks"]},"Trade":{"type":"object","properties":{"tradeId":{"type":"string"},"marketId":{"type":"string"},"price":{"type":"number"},"priceTicks":{"type":"string","pattern":"^-?\\d+$"},"lots":{"type":"integer"},"aggressorSide":{"type":"string","enum":["BUY","SELL"]},"route":{"type":"string","enum":["DIRECT_BOOK"]},"transactionHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"time":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["ONCHAIN_FILL"]}},"required":["tradeId","marketId","price","lots","aggressorSide","time","source"]},"Account":{"type":"object","properties":{"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"exists":{"type":"boolean"},"collateralAsset":{"type":"string"},"collateralId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"postedUsd":{"type":"number"},"reservedUsd":{"type":"number"},"availableUsd":{"type":"number"},"postedMinor":{"type":"string","pattern":"^-?\\d+$"},"reservedMinor":{"type":"string","pattern":"^-?\\d+$"},"availableMinor":{"type":"string","pattern":"^-?\\d+$"}},"required":["accountId","exists","collateralAsset","collateralId","postedUsd","reservedUsd","availableUsd","postedMinor","reservedMinor","availableMinor"]},"Position":{"type":"object","properties":{"positionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"marketId":{"type":"string"},"side":{"type":"string","enum":["LONG","SHORT"]},"lots":{"type":"integer"},"entryPrice":{"type":"number"},"entryPriceTicks":{"type":"string","pattern":"^-?\\d+$"},"collateralUsd":{"type":"number"},"state":{"const":"ACTIVE"},"openedByFillId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"transactionHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"openedAt":{"type":"string","format":"date-time"}},"required":["positionId","marketId","side","lots","entryPrice","entryPriceTicks","collateralUsd","state","openedByFillId","transactionHash","openedAt"]},"Fill":{"type":"object","properties":{"fillId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"orderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"role":{"type":"string","enum":["TAKER","MAKER"]},"marketId":{"type":"string"},"side":{"type":"string","enum":["LONG","SHORT"]},"route":{"type":"string","enum":["DIRECT_BOOK","PRIVATE_RFQ"]},"requestedLots":{"type":"integer"},"filledLots":{"type":"integer"},"cancelledLots":{"type":"integer"},"price":{"type":"number"},"priceTicks":{"type":"string","pattern":"^-?\\d+$"},"feesUsd":{"type":"number"},"feesMinor":{"type":"string","pattern":"^-?\\d+$"},"positionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"positionLive":{"type":"boolean"},"outcome":{"type":"string","enum":["OPENED","CLOSED"]},"closedPositionId":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"transactionHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"createdAt":{"type":"string","format":"date-time"}},"required":["fillId","orderHash","role","marketId","side","route","requestedLots","filledLots","cancelledLots","price","priceTicks","feesUsd","feesMinor","positionId","positionLive","outcome","closedPositionId","transactionHash","createdAt"]},"Receipt":{"type":"object","properties":{"receiptId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"fillId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"orderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"transactionHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"marketId":{"type":"string"},"packageCode":{"type":"string"},"side":{"type":"string","enum":["LONG","SHORT"]},"route":{"type":"string","enum":["DIRECT_BOOK","PRIVATE_RFQ"]},"routeLabel":{"type":"string"},"lots":{"type":"integer"},"requestedLots":{"type":"integer"},"filledLots":{"type":"integer"},"cancelledLots":{"type":"integer"},"price":{"type":"number"},"feesUsd":{"type":"number"},"realizedPnlUsd":{"oneOf":[{"type":"number"},{"type":"null"}]},"collateralReleasedUsd":{"oneOf":[{"type":"number"},{"type":"null"}]},"guarantee":{"type":"string"},"evidence":{"type":"string","enum":["ONCHAIN","TESTNET","MAINNET"]},"createdAt":{"type":"string","format":"date-time"}},"required":["receiptId","fillId","orderHash","transactionHash","marketId","packageCode","side","route","routeLabel","lots","requestedLots","filledLots","cancelledLots","price","feesUsd","realizedPnlUsd","collateralReleasedUsd","guarantee","evidence","createdAt"]},"Order":{"type":"object","properties":{"orderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string"},"route":{"type":"string","enum":["DIRECT_BOOK","PRIVATE_RFQ"]},"side":{"type":"string","enum":["LONG","SHORT"]},"lots":{"type":"integer"},"filledLots":{"type":"integer"},"remainingLots":{"type":"integer"},"limitPrice":{"type":"number"},"priceTicks":{"type":"string","pattern":"^-?\\d+$"},"timeInForce":{"type":"string","enum":["GTC","GTD","IOC","FOK"]},"postOnly":{"type":"boolean"},"state":{"type":"string","enum":["WORKING","PARTIALLY_FILLED","FILLED","CANCELLED","EXPIRED"]},"statusCode":{"type":"integer","description":"Raw OrderState status enum (1 open, 2 partially filled, 3 filled, 4 cancelled, 5 expired)."},"deadline":{"type":"string","format":"date-time"},"maxFeeUsd":{"type":"number"},"collateralReservationUsd":{"type":"number"},"riskAdmissionId":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"fillIds":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"receiptIds":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"createdAt":{"type":"string","format":"date-time"}},"required":["orderHash","accountId","signer","marketId","route","side","lots","filledLots","remainingLots","limitPrice","priceTicks","timeInForce","postOnly","state","statusCode","deadline","maxFeeUsd","collateralReservationUsd","riskAdmissionId","fillIds","receiptIds","createdAt"]},"SerializedPublicOrder":{"type":"object","description":"PublicOrder with uint128/int128/uint64/uint256 fields as decimal strings.","properties":{"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"policyId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"policyContextHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"actionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"targetKind":{"const":1},"seriesId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"packageId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"targetVersion":{"type":"integer"},"side":{"type":"integer","enum":[1,2]},"lots":{"type":"string","pattern":"^-?\\d+$"},"priceTicks":{"type":"string","pattern":"^-?\\d+$"},"timeInForce":{"type":"integer","enum":[1,2,3,4]},"deadline":{"type":"string","pattern":"^-?\\d+$"},"executionModeId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"feeScheduleId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"feeScheduleVersion":{"type":"integer"},"maxFeeMinor":{"type":"string","pattern":"^-?\\d+$"},"recipient":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"permittedExecutor":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string","pattern":"^-?\\d+$"},"salt":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"allowPartialFills":{"type":"boolean"},"minimumFillLots":{"type":"string","pattern":"^-?\\d+$"},"remainderPolicy":{"type":"integer","enum":[1,2]},"postOnly":{"type":"boolean"},"reduceOnly":{"type":"boolean"}}},"PrepareOrderRequest":{"type":"object","properties":{"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string"},"side":{"type":"string","enum":["LONG","SHORT"]},"lots":{"type":"integer","minimum":1},"limitPrice":{"type":"number","description":"On the market's grid: (limitPrice - onchain.priceOffset) x onchain.priceScale must be a whole number of ticks."},"timeInForce":{"type":"string","enum":["GTC","GTD","IOC","FOK"],"default":"GTC"},"expiresAt":{"type":"string","format":"date-time","description":"Required for GTD. Capped at 240s after chain time."},"postOnly":{"type":"boolean","default":false},"maxFeeUsd":{"type":"number","minimum":0,"description":"Defaults to twice the taker fee on the full consideration."}},"required":["signer","marketId","side","lots","limitPrice"]},"TransactionRequest":{"type":"object","properties":{"step":{"type":"string","enum":["APPROVE_LOCK_OPERATOR","BIND_RISK","REGISTER_ORDER","PLACE_ON_BOOK","MATCH","CANCEL_ORDER","SYNC_BOOK","AUTHORIZE_LIFECYCLE","EXECUTE_LIFECYCLE","REGISTER_RFQ","OPEN_RFQ","LOCK_SELECTION","CONFIRM_CAPACITY","AUTHORIZE_SUBMISSION","SUBMIT_RFQ","CANCEL_RFQ"]},"description":{"type":"string"},"chainId":{"type":"integer"},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"value":{"const":"0"}},"required":["step","description","chainId","from","to","data","value"]},"PreparedOrder":{"type":"object","properties":{"orderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"marketId":{"type":"string"},"order":{"$ref":"#/components/schemas/SerializedPublicOrder"},"typedData":{"type":"object","properties":{"domain":{"type":"object","properties":{"name":{"const":"Setryn"},"version":{"const":"1"},"chainId":{"type":"integer"},"verifyingContract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["name","version","chainId","verifyingContract"]},"types":{"type":"object","properties":{"PublicOrder":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}},"required":["PublicOrder"]},"primaryType":{"const":"PublicOrder"},"message":{"$ref":"#/components/schemas/SerializedPublicOrder"}},"required":["domain","types","primaryType","message"]},"chainTime":{"type":"string","format":"date-time"},"deadline":{"type":"string","format":"date-time"},"submitWithinSeconds":{"type":"integer"},"preconditions":{"type":"object","properties":{"accountExists":{"type":"boolean"},"availableCollateralMinor":{"type":"string","pattern":"^-?\\d+$"},"requiredCollateralMinor":{"type":"string","pattern":"^-?\\d+$"},"sufficientCollateral":{"type":"boolean"},"lockOperatorsApproved":{"type":"boolean"}},"required":["accountExists","availableCollateralMinor","requiredCollateralMinor","sufficientCollateral","lockOperatorsApproved"]},"requiredTransactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionRequest"}},"next":{"type":"string"}},"required":["orderHash","accountId","marketId","order","typedData","chainTime","deadline","submitWithinSeconds","preconditions","requiredTransactions","next"]},"SubmitOrderRequest":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/SerializedPublicOrder"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"}},"required":["order","signature"]},"SubmitOrderResult":{"type":"object","properties":{"orderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string"},"status":{"const":"RISK_RESERVED"},"riskAdmissionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"riskReservationTransaction":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"validUntil":{"type":"string","format":"date-time"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionRequest"}},"next":{"type":"string"}},"required":["orderHash","accountId","signer","marketId","status","riskAdmissionId","riskReservationTransaction","validUntil","transactions","next"]},"LifecycleAction":{"type":"object","properties":{"kind":{"const":4},"actor":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"actorAccountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"policyContextHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"inputsHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"successorsHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"collateralReplacementsHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"participantSetHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"consentsHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"riskDomainId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"riskDomainVersion":{"type":"integer"},"feeScheduleId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"feeScheduleVersion":{"type":"integer"},"economicTransitionHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"compressionPlanId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"breaksPackageProvenance":{"type":"boolean"},"packageBreakPermissionHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"actorMaximumLiabilityIncreaseBaseUnits":{"type":"string","pattern":"^-?\\d+$"},"actorMaximumCollateralIncreaseBaseUnits":{"type":"string","pattern":"^-?\\d+$"},"inputCount":{"type":"integer"},"successorCount":{"type":"integer"},"participantCount":{"type":"integer"},"deadline":{"type":"string","pattern":"^-?\\d+$"},"nonce":{"type":"string","pattern":"^-?\\d+$"},"permittedExecutor":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"salt":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["kind","actor","actorAccountId","policyContextHash","inputsHash","successorsHash","collateralReplacementsHash","participantSetHash","consentsHash","riskDomainId","riskDomainVersion","feeScheduleId","feeScheduleVersion","economicTransitionHash","compressionPlanId","breaksPackageProvenance","packageBreakPermissionHash","actorMaximumLiabilityIncreaseBaseUnits","actorMaximumCollateralIncreaseBaseUnits","inputCount","successorCount","participantCount","deadline","nonce","permittedExecutor","salt"]},"LifecycleInput":{"type":"object","properties":{"positionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"expectedImmutableHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"expectedLifecycleHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"expectedPositionLots":{"type":"string","pattern":"^-?\\d+$"},"actionLots":{"type":"string","pattern":"^-?\\d+$"}},"required":["positionId","expectedImmutableHash","expectedLifecycleHash","expectedPositionLots","actionLots"]},"LifecycleCollateralReplacement":{"type":"object","properties":{"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"collateralId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"terminalLiabilityBaseUnits":{"type":"string","pattern":"^-?\\d+$"}},"required":["accountId","collateralId","terminalLiabilityBaseUnits"]},"LifecycleConsent":{"type":"object","properties":{"actionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string","pattern":"^-?\\d+$"},"deadline":{"type":"string","pattern":"^-?\\d+$"},"maximumLiabilityIncreaseBaseUnits":{"type":"string","pattern":"^-?\\d+$"},"maximumCollateralIncreaseBaseUnits":{"type":"string","pattern":"^-?\\d+$"},"allowsPackageBreak":{"type":"boolean"},"salt":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["actionId","accountId","signer","nonce","deadline","maximumLiabilityIncreaseBaseUnits","maximumCollateralIncreaseBaseUnits","allowsPackageBreak","salt"]},"PrepareExitRequest":{"type":"object","properties":{"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"positionIds":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"minItems":2,"maxItems":2,"description":"The open position and the opposite position that closes it."}},"required":["signer","positionIds"]},"PreparedExit":{"type":"object","properties":{"actionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"counterpartyAccountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"positions":{"type":"array","items":{"type":"object","properties":{"positionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"side":{"type":"string","enum":["LONG","SHORT"]},"lots":{"type":"integer"}},"required":["positionId","side","lots"]}},"action":{"$ref":"#/components/schemas/LifecycleAction"},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/LifecycleInput"}},"replacements":{"type":"array","items":{"$ref":"#/components/schemas/LifecycleCollateralReplacement"}},"consent":{"$ref":"#/components/schemas/LifecycleConsent"},"consentSignature":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"typedData":{"type":"object","properties":{"domain":{"type":"object","properties":{"name":{"const":"Setryn"},"version":{"const":"1"},"chainId":{"type":"integer"},"verifyingContract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["name","version","chainId","verifyingContract"]},"types":{"type":"object","properties":{"SetrynLifecycleActionV1":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}},"required":["SetrynLifecycleActionV1"]},"primaryType":{"const":"SetrynLifecycleActionV1"},"message":{"type":"object","description":"The action fields plus chainId (decimal string) and engine (the SignedLifecycleEngine)."}},"required":["domain","types","primaryType","message"]},"chainTime":{"type":"string","format":"date-time"},"deadline":{"type":"string","format":"date-time"},"submitWithinSeconds":{"type":"integer"},"next":{"type":"string"}},"required":["actionId","accountId","counterpartyAccountId","positions","action","inputs","replacements","consent","consentSignature","typedData","chainTime","deadline","submitWithinSeconds","next"]},"SubmitExitRequest":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/LifecycleAction"},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/LifecycleInput"}},"replacements":{"type":"array","items":{"$ref":"#/components/schemas/LifecycleCollateralReplacement"}},"consent":{"$ref":"#/components/schemas/LifecycleConsent"},"consentSignature":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"actorSignature":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"}},"required":["action","inputs","replacements","consent","consentSignature","actorSignature"]},"SubmitExitResult":{"type":"object","properties":{"actionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"positionIds":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"validUntil":{"type":"string","format":"date-time"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionRequest"}},"next":{"type":"string"}},"required":["actionId","accountId","signer","positionIds","validUntil","transactions","next"]},"RfqQuote":{"type":"object","properties":{"quoteId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"solver":{"type":"string"},"maker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"makerAccountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"price":{"type":"number","description":"The price the requester trades at: the ask for a LONG request, the bid for a SHORT request."},"priceTicks":{"type":"string","pattern":"^-?\\d+$"},"lots":{"type":"integer"},"remainingLots":{"type":"integer"},"maxFeeUsd":{"type":"number"},"maxFeeMinor":{"type":"string","pattern":"^-?\\d+$"},"maximumLiabilityUsd":{"type":"number"},"withinLimit":{"type":"boolean","description":"At or inside the requester's signed limit price. Only such a quote can be accepted."},"state":{"type":"string","enum":["OFFERED","RESERVED","SELECTED","CONSUMED","CANCELLED","EXPIRED","REJECTED"]},"statusCode":{"type":"integer","description":"Raw MakerQuoteStatus enum."},"expiresAt":{"type":"string","format":"date-time"},"capacityExpiresAt":{"type":"string","format":"date-time"},"offeredAt":{"type":"string","format":"date-time"}},"required":["quoteId","rfqId","solver","maker","makerAccountId","price","priceTicks","lots","remainingLots","maxFeeUsd","maxFeeMinor","maximumLiabilityUsd","withinLimit","state","statusCode","expiresAt","capacityExpiresAt","offeredAt"]},"Rfq":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"marketId":{"type":"string"},"seriesId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"taker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"takerOrderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"side":{"type":"string","enum":["LONG","SHORT"]},"sidePolicy":{"type":"string","enum":["BUY_ONLY","SELL_ONLY","TWO_WAY"]},"lots":{"type":"integer"},"filledLots":{"type":"integer"},"limitPrice":{"oneOf":[{"type":"number"},{"type":"null"}]},"limitPriceTicks":{"oneOf":[{"type":"string","pattern":"^-?\\d+$"},{"type":"null"}]},"timeInForce":{"oneOf":[{"type":"string","enum":["GTC","GTD","IOC","FOK"]},{"type":"null"}]},"maxFeeUsd":{"type":"number"},"state":{"type":"string","enum":["INVITING","COLLECTING","SELECTION_LOCKED","CAPACITY_RESERVED","AUTHORIZED","SUBMITTED","CLEARING","SETTLED","CANCELLED","EXPIRED","REJECTED"],"description":"Open states read EXPIRED once the chain clock passes the deadline."},"statusCode":{"type":"integer","description":"Raw RfqStatus enum."},"selectedQuoteId":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/RfqQuote"}},"fillIds":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"receiptIds":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"deadline":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["rfqId","marketId","seriesId","accountId","taker","takerOrderHash","side","sidePolicy","lots","filledLots","limitPrice","limitPriceTicks","timeInForce","maxFeeUsd","state","statusCode","selectedQuoteId","quotes","fillIds","receiptIds","deadline","createdAt"]},"SerializedRfqRequest":{"type":"object","description":"PrivateRfqRequest with uint128/uint64/uint256 fields as decimal strings.","properties":{"taker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"takerAccountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"takerOrderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"targetKind":{"const":1},"seriesId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"packageId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"targetVersion":{"type":"integer"},"hasPackageLegCommitment":{"type":"boolean"},"packageLegsHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"sidePolicy":{"type":"integer","enum":[1,2]},"lots":{"type":"string","pattern":"^-?\\d+$"},"allowPartialFills":{"type":"boolean"},"minimumFillLots":{"type":"string","pattern":"^-?\\d+$"},"remainderPolicy":{"type":"integer","enum":[1,2]},"feeScheduleId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"feeScheduleVersion":{"type":"integer"},"maxFeeMinor":{"type":"string","pattern":"^-?\\d+$"},"riskDomainId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"riskDomainVersion":{"type":"integer"},"privacyModeId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"executionModeId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"disclosurePolicyHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"eligibleMakerSetHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"deadline":{"type":"string","pattern":"^-?\\d+$"},"permittedExecutor":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string","pattern":"^-?\\d+$"},"salt":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}},"SerializedRfqSelection":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"quoteId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"taker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"executor":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string","pattern":"^-?\\d+$"},"deadline":{"type":"string","pattern":"^-?\\d+$"},"salt":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["rfqId","quoteId","taker","executor","nonce","deadline","salt"]},"PrepareRfqRequest":{"type":"object","properties":{"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string"},"side":{"type":"string","enum":["LONG","SHORT"]},"lots":{"type":"integer","minimum":1},"limitPrice":{"type":"number","description":"Worst accepted price, on the market's grid."},"timeInForce":{"type":"string","enum":["GTC","GTD","IOC"],"default":"IOC"},"expiresAt":{"type":"string","format":"date-time","description":"Required for GTD. Capped at 240s after chain time."},"maxFeeUsd":{"type":"number","minimum":0,"description":"Defaults to twice the taker fee on the full consideration."}},"required":["signer","marketId","side","lots","limitPrice"]},"PreparedRfq":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"orderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"marketId":{"type":"string"},"order":{"$ref":"#/components/schemas/SerializedPublicOrder"},"orderTypedData":{"type":"object","properties":{"domain":{"type":"object","properties":{"name":{"const":"Setryn"},"version":{"const":"1"},"chainId":{"type":"integer"},"verifyingContract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["name","version","chainId","verifyingContract"]},"types":{"type":"object","properties":{"PublicOrder":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}},"required":["PublicOrder"]},"primaryType":{"const":"PublicOrder"},"message":{"$ref":"#/components/schemas/SerializedPublicOrder"}},"required":["domain","types","primaryType","message"]},"request":{"$ref":"#/components/schemas/SerializedRfqRequest"},"requestTypedData":{"type":"object","properties":{"domain":{"type":"object","properties":{"name":{"const":"Setryn"},"version":{"const":"1"},"chainId":{"type":"integer"},"verifyingContract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["name","version","chainId","verifyingContract"]},"types":{"type":"object","properties":{"PrivateRfqRequest":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}},"required":["PrivateRfqRequest"]},"primaryType":{"const":"PrivateRfqRequest"},"message":{"$ref":"#/components/schemas/SerializedRfqRequest"}},"required":["domain","types","primaryType","message"]},"chainTime":{"type":"string","format":"date-time"},"deadline":{"type":"string","format":"date-time"},"submitWithinSeconds":{"type":"integer"},"preconditions":{"type":"object","properties":{"accountExists":{"type":"boolean"},"availableCollateralMinor":{"type":"string","pattern":"^-?\\d+$"},"requiredCollateralMinor":{"type":"string","pattern":"^-?\\d+$"},"sufficientCollateral":{"type":"boolean"},"lockOperatorsApproved":{"type":"boolean"}},"required":["accountExists","availableCollateralMinor","requiredCollateralMinor","sufficientCollateral","lockOperatorsApproved"]},"requiredTransactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionRequest"}},"next":{"type":"string"}},"required":["rfqId","orderHash","accountId","marketId","order","orderTypedData","request","requestTypedData","chainTime","deadline","submitWithinSeconds","preconditions","requiredTransactions","next"]},"SubmitRfqRequest":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/SerializedPublicOrder"},"orderSignature":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"request":{"$ref":"#/components/schemas/SerializedRfqRequest"},"requestSignature":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"}},"required":["order","orderSignature","request","requestSignature"]},"SubmitRfqResult":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"orderHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"accountId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string"},"status":{"const":"RISK_RESERVED"},"riskAdmissionId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"riskReservationTransaction":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"validUntil":{"type":"string","format":"date-time"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionRequest"}},"next":{"type":"string"}},"required":["rfqId","orderHash","accountId","signer","marketId","status","riskAdmissionId","riskReservationTransaction","validUntil","transactions","next"]},"SolicitQuotesResult":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"solicited":{"type":"array","items":{"type":"object","properties":{"solver":{"type":"string"},"quoteId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["solver","quoteId"]}},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/RfqQuote"}}},"required":["rfqId","solicited","quotes"]},"PreparedRfqAcceptance":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"quoteId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"quote":{"$ref":"#/components/schemas/RfqQuote"},"selection":{"$ref":"#/components/schemas/SerializedRfqSelection"},"typedData":{"type":"object","properties":{"domain":{"type":"object","properties":{"name":{"const":"Setryn"},"version":{"const":"1"},"chainId":{"type":"integer"},"verifyingContract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["name","version","chainId","verifyingContract"]},"types":{"type":"object","properties":{"RfqSelectionAuthorization":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}},"required":["RfqSelectionAuthorization"]},"primaryType":{"const":"RfqSelectionAuthorization"},"message":{"$ref":"#/components/schemas/SerializedRfqSelection"}},"required":["domain","types","primaryType","message"]},"chainTime":{"type":"string","format":"date-time"},"deadline":{"type":"string","format":"date-time"},"submitWithinSeconds":{"type":"integer"},"next":{"type":"string"}},"required":["rfqId","quoteId","quote","selection","typedData","chainTime","deadline","submitWithinSeconds","next"]},"AcceptRfqResult":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"quoteId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"price":{"type":"number"},"priceTicks":{"type":"string","pattern":"^-?\\d+$"},"lots":{"type":"integer"},"validUntil":{"type":"string","format":"date-time"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionRequest"}},"next":{"type":"string"}},"required":["rfqId","quoteId","signer","price","priceTicks","lots","validUntil","transactions","next"]},"RfqSettlement":{"type":"object","properties":{"rfqId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"marketId":{"type":"string"},"state":{"type":"string","enum":["INVITING","COLLECTING","SELECTION_LOCKED","CAPACITY_RESERVED","AUTHORIZED","SUBMITTED","CLEARING","SETTLED","CANCELLED","EXPIRED","REJECTED"]},"quoteId":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"fillId":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"receiptId":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"positionId":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"transactionHash":{"oneOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"filledLots":{"type":"integer"},"price":{"oneOf":[{"type":"number"},{"type":"null"}]},"priceTicks":{"oneOf":[{"type":"string","pattern":"^-?\\d+$"},{"type":"null"}]},"feesUsd":{"oneOf":[{"type":"number"},{"type":"null"}]},"feesMinor":{"oneOf":[{"type":"string","pattern":"^-?\\d+$"},{"type":"null"}]},"route":{"const":"PRIVATE_RFQ"},"guarantee":{"type":"string"},"next":{"type":"string"}},"required":["rfqId","marketId","state","quoteId","fillId","receiptId","positionId","transactionHash","filledLots","price","priceTicks","feesUsd","feesMinor","route","guarantee","next"]},"IssueKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"scopes":{"type":"array","items":{"type":"string","enum":["read","trade"]}},"signers":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"maxItems":10},"rateLimit":{"type":"object","properties":{"capacity":{"type":"integer","minimum":1,"maximum":200},"refillPerSecond":{"type":"number","exclusiveMinimum":0,"maximum":50}},"required":["capacity","refillPerSecond"]}},"required":["name"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","trade"]}},"signers":{"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"rateLimit":{"type":"object","properties":{"capacity":{"type":"integer"},"refillPerSecond":{"type":"number"},"remaining":{"type":"integer"},"resetSeconds":{"type":"integer"}},"required":["capacity","refillPerSecond","remaining","resetSeconds"]},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","REVOKED"]},"usage":{"type":"object","properties":{"requests":{"type":"integer"},"errors":{"type":"integer"},"rateLimited":{"type":"integer"},"replayRejected":{"type":"integer"}},"required":["requests","errors","rateLimited","replayRejected"]},"recentRequests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer"},"durationMs":{"type":"integer"},"code":{"type":"string"}},"required":["id","at","method","path","status","durationMs"]}}},"required":["id","name","prefix","scopes","signers","rateLimit","createdAt","lastUsedAt","revokedAt","status","usage","recentRequests"]}}}}