diff --git a/TARGET.md b/TARGET.md index f86992c..64cbbf0 100644 --- a/TARGET.md +++ b/TARGET.md @@ -387,3 +387,15 @@ https://docs.polymarket.com/dev-tooling/typescript.md ## NEW - Builders https://docs.polymarket.com/builders/fees.md + +## NEW - API Reference - Combo Markets (2026-06-17) +https://docs.polymarket.com/api-reference/combo-markets/get-combo-markets.md + +## NEW - API Reference - Core (Combo) (2026-06-17) +https://docs.polymarket.com/api-reference/core/get-user-combo-activity.md +https://docs.polymarket.com/api-reference/core/get-user-combo-positions.md + +## NEW - API Reference - Maker (RFQ) (2026-06-17) +https://docs.polymarket.com/api-reference/maker/cancel-a-quote.md +https://docs.polymarket.com/api-reference/maker/confirm-or-decline-last-look.md +https://docs.polymarket.com/api-reference/maker/submit-a-quote.md diff --git a/docs/api-reference/combo-markets/get-combo-markets.md b/docs/api-reference/combo-markets/get-combo-markets.md new file mode 100644 index 0000000..0db5936 --- /dev/null +++ b/docs/api-reference/combo-markets/get-combo-markets.md @@ -0,0 +1,213 @@ +# Get combo markets + +> Returns active markets that can be used as combo legs, ordered by volume +descending. This endpoint is public and does not require CLOB +authentication. + +Entries in `position_ids`, `outcomes`, and `outcome_prices` correspond by +array index (`[0]` is YES, `[1]` is NO). Use `next_cursor` unchanged in +the next request; a value of `null` indicates the final page. + + + +## OpenAPI + +````yaml /api-spec/combos-rfq-openapi.yaml get /v1/rfq/combo-markets +openapi: 3.1.0 +info: + title: Polymarket Combinatorial RFQ API + description: > + REST API for the combinatorial RFQ (Request for Quote) system. + + + This spec covers the publicly documented endpoints used by quoters (market + + makers): the combo-market catalog and the authenticated maker commands for + + submitting, cancelling, and confirming quotes. + + + Conventions: + + - All `*_e6` fields are six-decimal fixed-point values encoded as + **strings** + to avoid number precision issues. + - All timestamps are **Unix milliseconds** (integer); zero/omitted means + unset. + + - Errors return an HTTP status code with a body of the form `{ "error": + "..." }`. + license: + name: MIT + identifier: MIT + version: 1.0.0 +servers: + - url: https://combos-rfq-api.polymarket.com + description: Production combinatorial RFQ API +security: [] +tags: + - name: Combo Markets + description: Public catalog of markets that can be used as combo legs + - name: Maker + description: Authenticated quoter (maker) commands +paths: + /v1/rfq/combo-markets: + get: + tags: + - Combo Markets + summary: Get combo markets + description: > + Returns active markets that can be used as combo legs, ordered by volume + + descending. This endpoint is public and does not require CLOB + + authentication. + + + Entries in `position_ids`, `outcomes`, and `outcome_prices` correspond + by + + array index (`[0]` is YES, `[1]` is NO). Use `next_cursor` unchanged in + + the next request; a value of `null` indicates the final page. + operationId: getComboMarkets + parameters: + - name: limit + in: query + required: false + description: Number of markets to return. Defaults to `50`; maximum `100`. + schema: + type: integer + minimum: 1 + maximum: 100 + default: 50 + - name: cursor + in: query + required: false + description: Opaque cursor returned as `next_cursor` by the previous response. + schema: + type: string + - name: exclude + in: query + required: false + description: >- + Comma-separated condition IDs to omit, such as markets already + shown. + schema: + type: string + example: 0x4cd7...110ff,0x0391ab0e... + responses: + '200': + description: Catalog page of combo-able markets + content: + application/json: + schema: + $ref: '#/components/schemas/ComboMarketsResponse' + example: + markets: + - id: '1897034' + condition_id: 0x4cd7...110ff + position_ids: + - 1012585...362880 + - 1012585...362881 + slug: fifwc-mex-rsa-2026-06-11-mex + title: Will Mexico win on 2026-06-11? + outcomes: + - 'Yes' + - 'No' + outcome_prices: + - '0.685' + - '0.315' + image: https://... + volume: 330327.7128580074 + tags: + - sports + - soccer + - games + - world-cup + next_cursor: Mg + '400': + $ref: '#/components/responses/BadRequest' + security: [] +components: + schemas: + ComboMarketsResponse: + type: object + properties: + markets: + type: array + items: + $ref: '#/components/schemas/ComboMarket' + next_cursor: + type: + - string + - 'null' + description: Cursor for the next page, or `null` on the final page. + required: + - markets + - next_cursor + ComboMarket: + type: object + properties: + id: + type: string + condition_id: + type: string + position_ids: + type: array + description: Combo position IDs; `[0]` is YES, `[1]` is NO. + items: + type: string + slug: + type: string + title: + type: string + outcomes: + type: array + items: + type: string + outcome_prices: + type: array + items: + type: string + image: + type: string + volume: + type: number + format: double + tags: + type: array + items: + type: string + required: + - id + - condition_id + - position_ids + - slug + - title + - outcomes + - outcome_prices + - image + - volume + - tags + ErrorResponse: + type: object + properties: + error: + type: string + description: Human-readable error detail + required: + - error + responses: + BadRequest: + description: >- + Invalid request (malformed JSON, invalid parameters, or failed + validation) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: invalid quote + +```` diff --git a/docs/api-reference/core/get-user-combo-activity.md b/docs/api-reference/core/get-user-combo-activity.md new file mode 100644 index 0000000..1336498 --- /dev/null +++ b/docs/api-reference/core/get-user-combo-activity.md @@ -0,0 +1,263 @@ +# Get user combo activity + +> Combo lifecycle and redeem events (split / merge / convert / compress / wrap / unwrap / redeem) for a user, with per-leg breakdown. The combo counterpart to /activity trade rows. Also available at /v1/data/user/{address}/activity/combos (address from the path). + + + +## OpenAPI + +````yaml /api-spec/data-openapi.yaml get /v1/activity/combos +openapi: 3.0.3 +info: + title: Polymarket Data API + version: 1.0.0 + description: > + HTTP API for Polymarket data. This specification documents all public + routes. +servers: + - url: https://data-api.polymarket.com + description: Relative server (same host) +security: [] +tags: + - name: Data API Status + description: Data API health check + - name: Core + - name: Builders + - name: Misc +paths: + /v1/activity/combos: + get: + tags: + - Core + summary: Get user combo activity + description: >- + Combo lifecycle and redeem events (split / merge / convert / compress / + wrap / unwrap / redeem) for a user, with per-leg breakdown. The combo + counterpart to /activity trade rows. Also available at + /v1/data/user/{address}/activity/combos (address from the path). + parameters: + - in: query + name: user + required: true + schema: + $ref: '#/components/schemas/Address' + - in: query + name: market_id + style: form + explode: false + schema: + type: array + items: + $ref: '#/components/schemas/ComboConditionId' + description: >- + Comma-separated combo_condition_id values to filter to specific + combos. These equal the market_id of isCombo rows on /activity. Omit + for all of the user's combo activity. + - in: query + name: limit + schema: + type: integer + default: 50 + minimum: 0 + maximum: 500 + - in: query + name: offset + schema: + type: integer + default: 0 + minimum: 0 + maximum: 10000 + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CombosActivityResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' +components: + schemas: + Address: + type: string + description: User Profile Address (0x-prefixed, 40 hex chars) + pattern: ^0x[a-fA-F0-9]{40}$ + example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839' + ComboConditionId: + type: string + description: >- + Combo condition ID (0x-prefixed, 62 hex chars / bytes31). Equals the + market_id (unified) / conditionId (legacy) of isCombo rows on /activity. + pattern: ^0x[a-fA-F0-9]{62}$ + example: '0x0391ab0ebea17b65ba87e071b0566e816b0000000000000000000000000000' + CombosActivityResponse: + type: object + properties: + activity: + type: array + items: + $ref: '#/components/schemas/ComboActivity' + pagination: + $ref: '#/components/schemas/Pagination' + ErrorResponse: + type: object + properties: + error: + type: string + required: + - error + ComboActivity: + type: object + properties: + id: + type: string + event_kind: + type: string + description: >- + Raw on-chain event, e.g. PositionsSplit, PositionsMerged, + PositionRedeemed. + side: + type: string + description: Normalized label for rendering. + enum: + - Split + - Merge + - Convert + - Compress + - Wrap + - Unwrap + - Redeem + module_kind: + type: string + description: Always Combinatorial. + user_address: + $ref: '#/components/schemas/Address' + combo_condition_id: + $ref: '#/components/schemas/ComboConditionId' + combo_position_id: + type: string + module_id: + type: integer + amount_usdc: + type: number + nullable: true + description: Lifecycle amount; null on redeems. + payout_usdc: + type: number + nullable: true + description: Redeem payout; null on lifecycle events. + timestamp: + type: integer + format: int64 + tx_dttm: + type: string + description: RFC3339 UTC + tx_hash: + type: string + log_index: + type: integer + block_number: + type: integer + format: int64 + legs: + type: array + items: + $ref: '#/components/schemas/ComboLeg' + Pagination: + type: object + description: >- + Standard pagination metadata. No total count; has_more is derived from + page fullness. next_cursor is opaque. + properties: + limit: + type: integer + offset: + type: integer + has_more: + type: boolean + next_cursor: + type: string + nullable: true + description: Opaque cursor for the next page; null when has_more is false. + ComboLeg: + type: object + properties: + leg_index: + type: integer + leg_position_id: + type: string + leg_condition_id: + type: string + description: The leg market's condition ID (distinct from the combo's). + leg_outcome_index: + type: integer + leg_outcome_label: + type: string + leg_status: + type: string + description: Placeholder (OPEN) until leg-resolution integration ships. + leg_resolved_at: + type: string + nullable: true + leg_current_price: + type: string + description: Placeholder ("0") until live-price integration ships. + market: + $ref: '#/components/schemas/ComboMarket' + ComboMarket: + type: object + properties: + market_id: + type: string + slug: + type: string + title: + type: string + outcome: + type: string + image_url: + type: string + icon_url: + type: string + category: + type: string + subcategory: + type: string + tags: + type: array + items: + type: string + end_date: + type: string + description: RFC3339 UTC + event: + $ref: '#/components/schemas/ComboEvent' + ComboEvent: + type: object + properties: + event_id: + type: string + event_slug: + type: string + event_title: + type: string + event_image: + type: string + +```` diff --git a/docs/api-reference/core/get-user-combo-positions.md b/docs/api-reference/core/get-user-combo-positions.md new file mode 100644 index 0000000..b483e5f --- /dev/null +++ b/docs/api-reference/core/get-user-combo-positions.md @@ -0,0 +1,283 @@ +# Get user combo positions + +> Combinatorial (multi-market) positions held by a user, with per-leg breakdown. Also available at /v1/data/user/{address}/positions/combos (address from the path). + + + +## OpenAPI + +````yaml /api-spec/data-openapi.yaml get /v1/positions/combos +openapi: 3.0.3 +info: + title: Polymarket Data API + version: 1.0.0 + description: > + HTTP API for Polymarket data. This specification documents all public + routes. +servers: + - url: https://data-api.polymarket.com + description: Relative server (same host) +security: [] +tags: + - name: Data API Status + description: Data API health check + - name: Core + - name: Builders + - name: Misc +paths: + /v1/positions/combos: + get: + tags: + - Core + summary: Get user combo positions + description: >- + Combinatorial (multi-market) positions held by a user, with per-leg + breakdown. Also available at /v1/data/user/{address}/positions/combos + (address from the path). + parameters: + - in: query + name: user + required: true + schema: + $ref: '#/components/schemas/Address' + - in: query + name: status + schema: + type: string + enum: + - OPEN + - PARTIAL + - RESOLVED_WIN + - RESOLVED_LOSS + - in: query + name: sort + schema: + type: string + enum: + - current_value_desc + - first_entry_desc + - entry_cost_desc + - resolved_at_desc + default: current_value_desc + - in: query + name: market_id + style: form + explode: false + schema: + type: array + items: + $ref: '#/components/schemas/ComboConditionId' + description: >- + Comma-separated combo_condition_id values to filter to specific + combos. These equal the market_id of isCombo rows on /activity. Omit + for all of the user's combos. + - in: query + name: limit + schema: + type: integer + default: 20 + minimum: 0 + maximum: 100 + - in: query + name: offset + schema: + type: integer + default: 0 + minimum: 0 + maximum: 10000 + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CombosResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' +components: + schemas: + Address: + type: string + description: User Profile Address (0x-prefixed, 40 hex chars) + pattern: ^0x[a-fA-F0-9]{40}$ + example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839' + ComboConditionId: + type: string + description: >- + Combo condition ID (0x-prefixed, 62 hex chars / bytes31). Equals the + market_id (unified) / conditionId (legacy) of isCombo rows on /activity. + pattern: ^0x[a-fA-F0-9]{62}$ + example: '0x0391ab0ebea17b65ba87e071b0566e816b0000000000000000000000000000' + CombosResponse: + type: object + properties: + combos: + type: array + items: + $ref: '#/components/schemas/ComboPosition' + pagination: + $ref: '#/components/schemas/Pagination' + ErrorResponse: + type: object + properties: + error: + type: string + required: + - error + ComboPosition: + type: object + properties: + combo_condition_id: + $ref: '#/components/schemas/ComboConditionId' + combo_position_id: + type: string + module_id: + type: integer + description: 3 = Combinatorial + user_address: + $ref: '#/components/schemas/Address' + shares_balance: + type: string + description: Decimal string (precision-preserving). + entry_avg_price_usdc: + type: string + entry_cost_usdc: + type: string + description: >- + REMAINING cost basis (entry_avg_price × shares_balance). Reads ~0 + after a winning combo is redeemed — use total_cost_usdc to display + what was paid on closed positions. + realized_payout_usdc: + type: string + description: >- + Gross redemption proceeds (winning combo shares redeem 1:1 at $1). + "0.00" while OPEN / unredeemed / RESOLVED_LOSS; accumulates under + PARTIAL. Gross payout, not net PnL — net = realized_payout_usdc − + total_cost_usdc. + total_cost_usdc: + type: string + description: >- + Original cost basis = entry_avg_price × (shares_balance + + realized_payout). Survives redemption burning the shares; equals + entry_cost_usdc while OPEN. + status: + type: string + enum: + - OPEN + - PARTIAL + - RESOLVED_WIN + - RESOLVED_LOSS + first_entry_at: + type: string + description: RFC3339 UTC + resolved_at: + type: string + nullable: true + legs_total: + type: integer + legs_resolved: + type: integer + legs_pending: + type: integer + legs: + type: array + items: + $ref: '#/components/schemas/ComboLeg' + Pagination: + type: object + description: >- + Standard pagination metadata. No total count; has_more is derived from + page fullness. next_cursor is opaque. + properties: + limit: + type: integer + offset: + type: integer + has_more: + type: boolean + next_cursor: + type: string + nullable: true + description: Opaque cursor for the next page; null when has_more is false. + ComboLeg: + type: object + properties: + leg_index: + type: integer + leg_position_id: + type: string + leg_condition_id: + type: string + description: The leg market's condition ID (distinct from the combo's). + leg_outcome_index: + type: integer + leg_outcome_label: + type: string + leg_status: + type: string + description: Placeholder (OPEN) until leg-resolution integration ships. + leg_resolved_at: + type: string + nullable: true + leg_current_price: + type: string + description: Placeholder ("0") until live-price integration ships. + market: + $ref: '#/components/schemas/ComboMarket' + ComboMarket: + type: object + properties: + market_id: + type: string + slug: + type: string + title: + type: string + outcome: + type: string + image_url: + type: string + icon_url: + type: string + category: + type: string + subcategory: + type: string + tags: + type: array + items: + type: string + end_date: + type: string + description: RFC3339 UTC + event: + $ref: '#/components/schemas/ComboEvent' + ComboEvent: + type: object + properties: + event_id: + type: string + event_slug: + type: string + event_title: + type: string + event_image: + type: string + +```` diff --git a/docs/api-reference/maker/cancel-a-quote.md b/docs/api-reference/maker/cancel-a-quote.md new file mode 100644 index 0000000..65c5cb0 --- /dev/null +++ b/docs/api-reference/maker/cancel-a-quote.md @@ -0,0 +1,430 @@ +# Cancel a quote + +> Cancel an active maker quote before it is selected. Requires CLOB L2 +authentication for the maker role. `signer_address` and `maker_address` +must match the authenticated identity. + + + +## OpenAPI + +````yaml /api-spec/combos-rfq-openapi.yaml post /v1/maker/quotes/cancel +openapi: 3.1.0 +info: + title: Polymarket Combinatorial RFQ API + description: > + REST API for the combinatorial RFQ (Request for Quote) system. + + + This spec covers the publicly documented endpoints used by quoters (market + + makers): the combo-market catalog and the authenticated maker commands for + + submitting, cancelling, and confirming quotes. + + + Conventions: + + - All `*_e6` fields are six-decimal fixed-point values encoded as + **strings** + to avoid number precision issues. + - All timestamps are **Unix milliseconds** (integer); zero/omitted means + unset. + + - Errors return an HTTP status code with a body of the form `{ "error": + "..." }`. + license: + name: MIT + identifier: MIT + version: 1.0.0 +servers: + - url: https://combos-rfq-api.polymarket.com + description: Production combinatorial RFQ API +security: [] +tags: + - name: Combo Markets + description: Public catalog of markets that can be used as combo legs + - name: Maker + description: Authenticated quoter (maker) commands +paths: + /v1/maker/quotes/cancel: + post: + tags: + - Maker + summary: Cancel a quote + description: | + Cancel an active maker quote before it is selected. Requires CLOB L2 + authentication for the maker role. `signer_address` and `maker_address` + must match the authenticated identity. + operationId: cancelMakerQuote + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CancelQuoteRequest' + example: + rfq_id: rfq_ + quote_id: quote_ + signer_address: 0xYourSigner + maker_address: 0xYourQuoterWallet + signature_type: 0 + responses: + '200': + description: Current RFQ snapshot after the cancellation was applied + content: + application/json: + schema: + $ref: '#/components/schemas/RFQSnapshot' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '409': + $ref: '#/components/responses/Conflict' + '429': + $ref: '#/components/responses/TooManyRequests' + '503': + $ref: '#/components/responses/ServiceUnavailable' + security: + - polyApiKey: [] + polyAddress: [] + polySignature: [] + polyPassphrase: [] + polyTimestamp: [] +components: + schemas: + CancelQuoteRequest: + type: object + properties: + rfq_id: + type: string + example: rfq_ + quote_id: + type: string + example: quote_ + signer_address: + type: string + description: Must match the authenticated `signer_address`. + example: 0xYourSigner + maker_address: + type: string + description: Must match the authenticated `maker_address`. + example: 0xYourQuoterWallet + signature_type: + $ref: '#/components/schemas/SignatureType' + required: + - rfq_id + - quote_id + - signer_address + - maker_address + - signature_type + RFQSnapshot: + type: object + description: Point-in-time view of an RFQ and its competition/confirmation windows. + properties: + request: + $ref: '#/components/schemas/RFQRequest' + status: + $ref: '#/components/schemas/RFQStatus' + competition_started_at: + type: integer + format: int64 + description: Unix milliseconds. + competition_ends_at: + type: integer + format: int64 + description: Unix milliseconds. + confirmation_started_at: + type: integer + format: int64 + description: Unix milliseconds. + confirmation_ends_at: + type: integer + format: int64 + description: Unix milliseconds. + quote_id: + type: string + bundle: + $ref: '#/components/schemas/FillBundle' + maker_confirmations: + type: array + items: + $ref: '#/components/schemas/MakerConfirmationSnapshot' + required: + - request + - status + SignatureType: + type: integer + description: | + CLOB signature type: + - `0` EOA + - `1` POLY_PROXY + - `2` GNOSIS_SAFE + - `3` POLY_1271 + enum: + - 0 + - 1 + - 2 + - 3 + example: 0 + RFQRequest: + type: object + description: The RFQ request as stored by the engine. + properties: + rfq_id: + type: string + auth_address: + type: string + signer_address: + type: string + maker_address: + type: string + signature_type: + $ref: '#/components/schemas/SignatureType' + requestor_public_id: + type: string + leg_position_ids: + type: array + items: + type: string + condition_id: + type: string + yes_position_id: + type: string + no_position_id: + type: string + direction: + $ref: '#/components/schemas/Direction' + side: + $ref: '#/components/schemas/Side' + requested_size: + $ref: '#/components/schemas/RequestedSize' + created_at: + type: integer + format: int64 + description: Creation time in Unix milliseconds. + required: + - rfq_id + - leg_position_ids + - direction + - side + RFQStatus: + type: string + description: Lifecycle status of the RFQ + enum: + - CREATED + - COLLECTING_QUOTES + - AWAITING_REQUESTER_ACCEPTANCE + - AWAITING_MAKER_CONFIRMATION + - EXECUTING + - FILLED + - FAILED + - EXPIRED + - CANCELED + - REJECTED + FillBundle: + type: object + description: The selected executable bundle of maker allocations. + properties: + requested_shares_e6: + type: string + description: Requested share size in six-decimal fixed-point units. + requested_notional_e6: + type: string + description: Requested notional in six-decimal fixed-point units (BUY RFQs only). + blended_price_e6: + type: string + description: Blended bundle price in six-decimal fixed-point units. + allocations: + type: array + items: + $ref: '#/components/schemas/FillAllocation' + required: + - requested_shares_e6 + - blended_price_e6 + - allocations + MakerConfirmationSnapshot: + type: object + properties: + quote_id: + type: string + signer_address: + type: string + maker_address: + type: string + decision: + type: string + enum: + - CONFIRM + - DECLINE + - TIMED_OUT + reason: + type: string + responded_at: + type: integer + format: int64 + description: Response time in Unix milliseconds. + required: + - quote_id + - signer_address + - maker_address + ErrorResponse: + type: object + properties: + error: + type: string + description: Human-readable error detail + required: + - error + Direction: + type: string + description: Requester trade direction + enum: + - BUY + - SELL + Side: + type: string + description: Combinatorial position side. Currently only `YES` is supported. + enum: + - 'YES' + - 'NO' + RequestedSize: + type: object + description: Requested RFQ size and unit + properties: + unit: + type: string + description: > + `notional` for requester BUY RFQs and `shares` for requester SELL + RFQs. + enum: + - notional + - shares + value_e6: + type: string + description: Six-decimal fixed-point value encoded as a String. + example: '1000000' + required: + - unit + - value_e6 + FillAllocation: + type: object + properties: + maker_quote_id: + type: string + signer_address: + type: string + maker_address: + type: string + size_e6: + type: string + description: >- + Accepted fill size for this maker quote, in six-decimal fixed-point + units. + price_e6: + type: string + description: Fill price in six-decimal fixed-point units. + received_at: + type: integer + format: int64 + description: Receipt time in Unix milliseconds. + required: + - maker_quote_id + - signer_address + - maker_address + - size_e6 + - price_e6 + responses: + BadRequest: + description: >- + Invalid request (malformed JSON, invalid parameters, or failed + validation) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: invalid quote + Unauthorized: + description: Missing or invalid CLOB L2 authentication + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: unauthenticated + Forbidden: + description: >- + Authenticated identity does not match the request, or role is not + allowed + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: auth address mismatch + NotFound: + description: The referenced RFQ is not active or no longer exists + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: unknown rfq + Conflict: + description: The RFQ is not in a state that accepts this command + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: competition window closed + TooManyRequests: + description: Rate limited + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: rate limited + ServiceUnavailable: + description: An RFQ service dependency is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: service unavailable + securitySchemes: + polyApiKey: + type: apiKey + in: header + name: POLY_API_KEY + description: CLOB API key + polyAddress: + type: apiKey + in: header + name: POLY_ADDRESS + description: Wallet address associated with the API key + polySignature: + type: apiKey + in: header + name: POLY_SIGNATURE + description: HMAC-SHA256 signature of the request + polyPassphrase: + type: apiKey + in: header + name: POLY_PASSPHRASE + description: CLOB API key passphrase + polyTimestamp: + type: apiKey + in: header + name: POLY_TIMESTAMP + description: Unix timestamp of the request + +```` diff --git a/docs/api-reference/maker/confirm-or-decline-last-look.md b/docs/api-reference/maker/confirm-or-decline-last-look.md new file mode 100644 index 0000000..561e48b --- /dev/null +++ b/docs/api-reference/maker/confirm-or-decline-last-look.md @@ -0,0 +1,663 @@ +# Confirm or decline last look + +> Respond to a last-look confirmation request for a selected quote. Requires +CLOB L2 authentication for the maker role. `decision` must be `CONFIRM` or +`DECLINE`. + + + +## OpenAPI + +````yaml /api-spec/combos-rfq-openapi.yaml post /v1/maker/confirmations +openapi: 3.1.0 +info: + title: Polymarket Combinatorial RFQ API + description: > + REST API for the combinatorial RFQ (Request for Quote) system. + + + This spec covers the publicly documented endpoints used by quoters (market + + makers): the combo-market catalog and the authenticated maker commands for + + submitting, cancelling, and confirming quotes. + + + Conventions: + + - All `*_e6` fields are six-decimal fixed-point values encoded as + **strings** + to avoid number precision issues. + - All timestamps are **Unix milliseconds** (integer); zero/omitted means + unset. + + - Errors return an HTTP status code with a body of the form `{ "error": + "..." }`. + license: + name: MIT + identifier: MIT + version: 1.0.0 +servers: + - url: https://combos-rfq-api.polymarket.com + description: Production combinatorial RFQ API +security: [] +tags: + - name: Combo Markets + description: Public catalog of markets that can be used as combo legs + - name: Maker + description: Authenticated quoter (maker) commands +paths: + /v1/maker/confirmations: + post: + tags: + - Maker + summary: Confirm or decline last look + description: > + Respond to a last-look confirmation request for a selected quote. + Requires + + CLOB L2 authentication for the maker role. `decision` must be `CONFIRM` + or + + `DECLINE`. + operationId: submitMakerConfirmation + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/MakerConfirmationRequest' + example: + rfq_id: rfq_ + quote_id: quote_ + signer_address: 0xYourSigner + maker_address: 0xYourQuoterWallet + signature_type: 0 + decision: CONFIRM + responses: + '200': + description: Result of the confirmation — a snapshot and/or an execution handoff + content: + application/json: + schema: + $ref: '#/components/schemas/MakerConfirmationResult' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '409': + $ref: '#/components/responses/Conflict' + '429': + $ref: '#/components/responses/TooManyRequests' + '503': + $ref: '#/components/responses/ServiceUnavailable' + security: + - polyApiKey: [] + polyAddress: [] + polySignature: [] + polyPassphrase: [] + polyTimestamp: [] +components: + schemas: + MakerConfirmationRequest: + type: object + description: Maker last-look confirmation response. + properties: + rfq_id: + type: string + example: rfq_ + quote_id: + type: string + example: quote_ + signer_address: + type: string + example: 0xYourSigner + maker_address: + type: string + example: 0xYourQuoterWallet + signature_type: + $ref: '#/components/schemas/SignatureType' + decision: + type: string + description: Confirmation decision. + enum: + - CONFIRM + - DECLINE + required: + - rfq_id + - quote_id + - signer_address + - maker_address + - signature_type + - decision + MakerConfirmationResult: + type: object + description: >- + Result of a maker confirmation. Includes a snapshot, an execution + handoff, + + or both, depending on whether the confirmation completed the bundle. + properties: + snapshot: + $ref: '#/components/schemas/RFQSnapshot' + execution: + $ref: '#/components/schemas/ExecutionHandoff' + SignatureType: + type: integer + description: | + CLOB signature type: + - `0` EOA + - `1` POLY_PROXY + - `2` GNOSIS_SAFE + - `3` POLY_1271 + enum: + - 0 + - 1 + - 2 + - 3 + example: 0 + RFQSnapshot: + type: object + description: Point-in-time view of an RFQ and its competition/confirmation windows. + properties: + request: + $ref: '#/components/schemas/RFQRequest' + status: + $ref: '#/components/schemas/RFQStatus' + competition_started_at: + type: integer + format: int64 + description: Unix milliseconds. + competition_ends_at: + type: integer + format: int64 + description: Unix milliseconds. + confirmation_started_at: + type: integer + format: int64 + description: Unix milliseconds. + confirmation_ends_at: + type: integer + format: int64 + description: Unix milliseconds. + quote_id: + type: string + bundle: + $ref: '#/components/schemas/FillBundle' + maker_confirmations: + type: array + items: + $ref: '#/components/schemas/MakerConfirmationSnapshot' + required: + - request + - status + ExecutionHandoff: + type: object + description: Handoff produced when a confirmed RFQ is ready for onchain execution. + properties: + execution_id: + type: string + request: + $ref: '#/components/schemas/RFQRequest' + quote_id: + type: string + bundle: + $ref: '#/components/schemas/FillBundle' + requester_acceptance: + $ref: '#/components/schemas/RequesterAcceptance' + maker_quotes: + type: array + items: + $ref: '#/components/schemas/Quote' + reservations: + type: array + items: + $ref: '#/components/schemas/WalletReservation' + ready_at: + type: integer + format: int64 + description: Unix milliseconds. + required: + - execution_id + - request + - quote_id + - bundle + - requester_acceptance + ErrorResponse: + type: object + properties: + error: + type: string + description: Human-readable error detail + required: + - error + RFQRequest: + type: object + description: The RFQ request as stored by the engine. + properties: + rfq_id: + type: string + auth_address: + type: string + signer_address: + type: string + maker_address: + type: string + signature_type: + $ref: '#/components/schemas/SignatureType' + requestor_public_id: + type: string + leg_position_ids: + type: array + items: + type: string + condition_id: + type: string + yes_position_id: + type: string + no_position_id: + type: string + direction: + $ref: '#/components/schemas/Direction' + side: + $ref: '#/components/schemas/Side' + requested_size: + $ref: '#/components/schemas/RequestedSize' + created_at: + type: integer + format: int64 + description: Creation time in Unix milliseconds. + required: + - rfq_id + - leg_position_ids + - direction + - side + RFQStatus: + type: string + description: Lifecycle status of the RFQ + enum: + - CREATED + - COLLECTING_QUOTES + - AWAITING_REQUESTER_ACCEPTANCE + - AWAITING_MAKER_CONFIRMATION + - EXECUTING + - FILLED + - FAILED + - EXPIRED + - CANCELED + - REJECTED + FillBundle: + type: object + description: The selected executable bundle of maker allocations. + properties: + requested_shares_e6: + type: string + description: Requested share size in six-decimal fixed-point units. + requested_notional_e6: + type: string + description: Requested notional in six-decimal fixed-point units (BUY RFQs only). + blended_price_e6: + type: string + description: Blended bundle price in six-decimal fixed-point units. + allocations: + type: array + items: + $ref: '#/components/schemas/FillAllocation' + required: + - requested_shares_e6 + - blended_price_e6 + - allocations + MakerConfirmationSnapshot: + type: object + properties: + quote_id: + type: string + signer_address: + type: string + maker_address: + type: string + decision: + type: string + enum: + - CONFIRM + - DECLINE + - TIMED_OUT + reason: + type: string + responded_at: + type: integer + format: int64 + description: Response time in Unix milliseconds. + required: + - quote_id + - signer_address + - maker_address + RequesterAcceptance: + type: object + properties: + rfq_id: + type: string + quote_id: + type: string + auth_address: + type: string + signer_address: + type: string + maker_address: + type: string + signature_type: + $ref: '#/components/schemas/SignatureType' + signed_order: + $ref: '#/components/schemas/ExchangeV3Order' + accepted_at: + type: integer + format: int64 + description: Unix milliseconds. + required: + - rfq_id + - quote_id + - signed_order + Quote: + type: object + description: A signed maker quote. + properties: + quote_id: + type: string + description: Maker-generated quote ID (required for REST submissions). + example: quote_ + rfq_id: + type: string + description: RFQ ID from the `RFQ_REQUEST`. + example: rfq_ + auth_address: + type: string + description: Derived from the authenticated session; ignored if provided. + readOnly: true + signer_address: + type: string + example: 0xYourSigner + maker_address: + type: string + example: 0xYourQuoterWallet + signature_type: + $ref: '#/components/schemas/SignatureType' + price_e6: + type: string + description: Quote price in six-decimal fixed-point units (must be positive). + example: '450000' + size_e6: + type: string + description: >- + Fillable share count in six-decimal fixed-point units (must be + positive. + + Note this differs from the request's size field, which may be + notional or shares. + example: '1000000' + valid_until: + type: integer + format: int64 + description: Optional quote expiry in Unix milliseconds. + signed_order: + $ref: '#/components/schemas/ExchangeV3Order' + received_at: + type: integer + format: int64 + description: Server-assigned receipt time in Unix milliseconds. + readOnly: true + required: + - quote_id + - rfq_id + - signer_address + - maker_address + - signature_type + - price_e6 + - size_e6 + - signed_order + WalletReservation: + type: object + properties: + action_id: + type: string + user: + type: string + wallet_nonce: + type: integer + format: int64 + deltas: + type: array + items: + $ref: '#/components/schemas/WalletAssetDelta' + required: + - action_id + - user + - wallet_nonce + - deltas + Direction: + type: string + description: Requester trade direction + enum: + - BUY + - SELL + Side: + type: string + description: Combinatorial position side. Currently only `YES` is supported. + enum: + - 'YES' + - 'NO' + RequestedSize: + type: object + description: Requested RFQ size and unit + properties: + unit: + type: string + description: > + `notional` for requester BUY RFQs and `shares` for requester SELL + RFQs. + enum: + - notional + - shares + value_e6: + type: string + description: Six-decimal fixed-point value encoded as a string. + example: '1000000' + required: + - unit + - value_e6 + FillAllocation: + type: object + properties: + maker_quote_id: + type: string + signer_address: + type: string + maker_address: + type: string + size_e6: + type: string + description: >- + Accepted fill size for this maker quote, in six-decimal fixed-point + units. + price_e6: + type: string + description: Fill price in six-decimal fixed-point units. + received_at: + type: integer + format: int64 + description: Receipt time in Unix milliseconds. + required: + - maker_quote_id + - signer_address + - maker_address + - size_e6 + - price_e6 + ExchangeV3Order: + type: object + description: >- + Signed Exchange v3 order. Combinatorial RFQ trades settle through + Exchange v3. + properties: + salt: + type: string + description: Order salt (uint256 as a decimal string) + maker: + type: string + description: Wallet that funds the order + example: 0xYourQuoterWallet + signer: + type: string + description: Address that signs the order + example: 0xYourSigner + tokenId: + type: string + description: YES or NO combo position ID (uint256 as a decimal string) + makerAmount: + type: string + description: >- + Amount the maker pays, in six-decimal base units (uint256 as a + string) + takerAmount: + type: string + description: >- + Amount the maker receives, in six-decimal base units (uint256 as a + string) + side: + type: integer + description: Order side — `0` BUY, `1` SELL + enum: + - 0 + - 1 + signatureType: + $ref: '#/components/schemas/SignatureType' + timestamp: + type: string + description: Order timestamp in Unix seconds (as a string) + metadata: + type: string + description: 32-byte hex field; defaults to the zero value + example: '0x0000000000000000000000000000000000000000000000000000000000000000' + builder: + type: string + description: 32-byte hex field; defaults to the zero value + example: '0x0000000000000000000000000000000000000000000000000000000000000000' + signature: + type: string + description: EIP-712 signature over the order + example: 0x... + required: + - salt + - maker + - signer + - tokenId + - makerAmount + - takerAmount + - side + - signatureType + - timestamp + - signature + WalletAssetDelta: + type: object + properties: + asset: + type: string + asset_id: + type: string + amount: + type: string + required: + - asset + - asset_id + - amount + responses: + BadRequest: + description: >- + Invalid request (malformed JSON, invalid parameters, or failed + validation) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: invalid quote + Unauthorized: + description: Missing or invalid CLOB L2 authentication + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: unauthenticated + Forbidden: + description: >- + Authenticated identity does not match the request, or role is not + allowed + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: auth address mismatch + NotFound: + description: The referenced RFQ is not active or no longer exists + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: unknown rfq + Conflict: + description: The RFQ is not in a state that accepts this command + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: competition window closed + TooManyRequests: + description: Rate limited + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: rate limited + ServiceUnavailable: + description: An RFQ service dependency is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: service unavailable + securitySchemes: + polyApiKey: + type: apiKey + in: header + name: POLY_API_KEY + description: CLOB API key + polyAddress: + type: apiKey + in: header + name: POLY_ADDRESS + description: Wallet address associated with the API key + polySignature: + type: apiKey + in: header + name: POLY_SIGNATURE + description: HMAC-SHA256 signature of the request + polyPassphrase: + type: apiKey + in: header + name: POLY_PASSPHRASE + description: CLOB API key passphrase + polyTimestamp: + type: apiKey + in: header + name: POLY_TIMESTAMP + description: Unix timestamp of the request + +```` diff --git a/docs/api-reference/maker/submit-a-quote.md b/docs/api-reference/maker/submit-a-quote.md new file mode 100644 index 0000000..d5602f7 --- /dev/null +++ b/docs/api-reference/maker/submit-a-quote.md @@ -0,0 +1,545 @@ +# Submit a quote + +> Submit a signed maker quote for an active RFQ. Requires CLOB L2 +authentication for the maker role. + +REST does not assign a quote ID — generate `quote_id` client-side. + + + +## OpenAPI + +````yaml /api-spec/combos-rfq-openapi.yaml post /v1/maker/quotes +openapi: 3.1.0 +info: + title: Polymarket Combinatorial RFQ API + description: > + REST API for the combinatorial RFQ (Request for Quote) system. + + + This spec covers the publicly documented endpoints used by quoters (market + + makers): the combo-market catalog and the authenticated maker commands for + + submitting, cancelling, and confirming quotes. + + + Conventions: + + - All `*_e6` fields are six-decimal fixed-point values encoded as + **strings** + to avoid number precision issues. + - All timestamps are **Unix milliseconds** (integer); zero/omitted means + unset. + + - Errors return an HTTP status code with a body of the form `{ "error": + "..." }`. + license: + name: MIT + identifier: MIT + version: 1.0.0 +servers: + - url: https://combos-rfq-api.polymarket.com + description: Production combinatorial RFQ API +security: [] +tags: + - name: Combo Markets + description: Public catalog of markets that can be used as combo legs + - name: Maker + description: Authenticated quoter (maker) commands +paths: + /v1/maker/quotes: + post: + tags: + - Maker + summary: Submit a quote + description: | + Submit a signed maker quote for an active RFQ. Requires CLOB L2 + authentication for the maker role. + + REST does not assign a quote ID — generate `quote_id` client-side. + operationId: submitMakerQuote + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Quote' + example: + quote_id: quote_ + rfq_id: rfq_ + signer_address: 0xYourSigner + maker_address: 0xYourQuoterWallet + signature_type: 0 + price_e6: '450000' + size_e6: '1000000' + signed_order: + salt: + maker: 0xYourQuoterWallet + signer: 0xYourSigner + tokenId: + makerAmount: + takerAmount: + side: 0 + signatureType: 0 + timestamp: + metadata: >- + 0x0000000000000000000000000000000000000000000000000000000000000000 + builder: >- + 0x0000000000000000000000000000000000000000000000000000000000000000 + signature: 0x... + responses: + '200': + description: Current RFQ snapshot after the quote was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/RFQSnapshot' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '409': + $ref: '#/components/responses/Conflict' + '429': + $ref: '#/components/responses/TooManyRequests' + '503': + $ref: '#/components/responses/ServiceUnavailable' + security: + - polyApiKey: [] + polyAddress: [] + polySignature: [] + polyPassphrase: [] + polyTimestamp: [] +components: + schemas: + Quote: + type: object + description: A signed maker quote. + properties: + quote_id: + type: string + description: Maker-generated quote ID (required for REST submissions). + example: quote_ + rfq_id: + type: string + description: RFQ ID from the `RFQ_REQUEST`. + example: rfq_ + auth_address: + type: string + description: Derived from the authenticated session; ignored if provided. + readOnly: true + signer_address: + type: string + example: 0xYourSigner + maker_address: + type: string + example: 0xYourQuoterWallet + signature_type: + $ref: '#/components/schemas/SignatureType' + price_e6: + type: string + description: Quote price in six-decimal fixed-point units (must be positive). + example: '450000' + size_e6: + type: string + description: >- + Fillable share count in six-decimal fixed-point units (must be + positive. + + Note this differs from the request's size field, which may be + notional or shares. + example: '1000000' + valid_until: + type: integer + format: int64 + description: Optional quote expiry in Unix milliseconds. + signed_order: + $ref: '#/components/schemas/ExchangeV3Order' + received_at: + type: integer + format: int64 + description: Server-assigned receipt time in Unix milliseconds. + readOnly: true + required: + - quote_id + - rfq_id + - signer_address + - maker_address + - signature_type + - price_e6 + - size_e6 + - signed_order + RFQSnapshot: + type: object + description: Point-in-time view of an RFQ and its competition/confirmation windows. + properties: + request: + $ref: '#/components/schemas/RFQRequest' + status: + $ref: '#/components/schemas/RFQStatus' + competition_started_at: + type: integer + format: int64 + description: Unix milliseconds. + competition_ends_at: + type: integer + format: int64 + description: Unix milliseconds. + confirmation_started_at: + type: integer + format: int64 + description: Unix milliseconds. + confirmation_ends_at: + type: integer + format: int64 + description: Unix milliseconds. + quote_id: + type: string + bundle: + $ref: '#/components/schemas/FillBundle' + maker_confirmations: + type: array + items: + $ref: '#/components/schemas/MakerConfirmationSnapshot' + required: + - request + - status + SignatureType: + type: integer + description: | + CLOB signature type: + - `0` EOA + - `1` POLY_PROXY + - `2` GNOSIS_SAFE + - `3` POLY_1271 + enum: + - 0 + - 1 + - 2 + - 3 + example: 0 + ExchangeV3Order: + type: object + description: >- + Signed Exchange v3 order. Combinatorial RFQ trades settle through + Exchange v3. + properties: + salt: + type: string + description: Order salt (uint256 as a decimal string) + maker: + type: string + description: Wallet that funds the order + example: 0xYourQuoterWallet + signer: + type: string + description: Address that signs the order + example: 0xYourSigner + tokenId: + type: string + description: YES or NO combo position ID (uint256 as a decimal string) + makerAmount: + type: string + description: >- + Amount the maker pays, in six-decimal base units (uint256 as a + string) + takerAmount: + type: string + description: >- + Amount the maker receives, in six-decimal base units (uint256 as a + string) + side: + type: integer + description: Order side — `0` BUY, `1` SELL + enum: + - 0 + - 1 + signatureType: + $ref: '#/components/schemas/SignatureType' + timestamp: + type: string + description: Order timestamp in Unix seconds (as a string) + metadata: + type: string + description: 32-byte hex field; defaults to the zero value + example: '0x0000000000000000000000000000000000000000000000000000000000000000' + builder: + type: string + description: 32-byte hex field; defaults to the zero value + example: '0x0000000000000000000000000000000000000000000000000000000000000000' + signature: + type: string + description: EIP-712 signature over the order + example: 0x... + required: + - salt + - maker + - signer + - tokenId + - makerAmount + - takerAmount + - side + - signatureType + - timestamp + - signature + RFQRequest: + type: object + description: The RFQ request as stored by the engine. + properties: + rfq_id: + type: string + auth_address: + type: string + signer_address: + type: string + maker_address: + type: string + signature_type: + $ref: '#/components/schemas/SignatureType' + requestor_public_id: + type: string + leg_position_ids: + type: array + items: + type: string + condition_id: + type: string + yes_position_id: + type: string + no_position_id: + type: string + direction: + $ref: '#/components/schemas/Direction' + side: + $ref: '#/components/schemas/Side' + requested_size: + $ref: '#/components/schemas/RequestedSize' + created_at: + type: integer + format: int64 + description: Creation time in Unix milliseconds. + required: + - rfq_id + - leg_position_ids + - direction + - side + RFQStatus: + type: string + description: Lifecycle status of the RFQ + enum: + - CREATED + - COLLECTING_QUOTES + - AWAITING_REQUESTER_ACCEPTANCE + - AWAITING_MAKER_CONFIRMATION + - EXECUTING + - FILLED + - FAILED + - EXPIRED + - CANCELED + - REJECTED + FillBundle: + type: object + description: The selected executable bundle of maker allocations. + properties: + requested_shares_e6: + type: string + description: Requested share size in six-decimal fixed-point units. + requested_notional_e6: + type: string + description: Requested notional in six-decimal fixed-point units (BUY RFQs only). + blended_price_e6: + type: string + description: Blended bundle price in six-decimal fixed-point units. + allocations: + type: array + items: + $ref: '#/components/schemas/FillAllocation' + required: + - requested_shares_e6 + - blended_price_e6 + - allocations + MakerConfirmationSnapshot: + type: object + properties: + quote_id: + type: string + signer_address: + type: string + maker_address: + type: string + decision: + type: string + enum: + - CONFIRM + - DECLINE + - TIMED_OUT + reason: + type: string + responded_at: + type: integer + format: int64 + description: Response time in Unix milliseconds. + required: + - quote_id + - signer_address + - maker_address + ErrorResponse: + type: object + properties: + error: + type: string + description: Human-readable error detail + required: + - error + Direction: + type: string + description: Requester trade direction + enum: + - BUY + - SELL + Side: + type: string + description: Combinatorial position side. Currently only `YES` is supported. + enum: + - 'YES' + - 'NO' + RequestedSize: + type: object + description: Requested RFQ size and unit + properties: + unit: + type: string + description: > + `notional` for requester BUY RFQs and `shares` for requester SELL + RFQs. + enum: + - notional + - shares + value_e6: + type: string + description: Six-decimal fixed-point value encoded as a string. + example: '1000000' + required: + - unit + - value_e6 + FillAllocation: + type: object + properties: + maker_quote_id: + type: string + signer_address: + type: string + maker_address: + type: string + size_e6: + type: string + description: >- + Accepted fill size for this maker quote, in six-decimal fixed-point + units. + price_e6: + type: string + description: Fill price in six-decimal fixed-point units. + received_at: + type: integer + format: int64 + description: Receipt time in Unix milliseconds. + required: + - maker_quote_id + - signer_address + - maker_address + - size_e6 + - price_e6 + responses: + BadRequest: + description: >- + Invalid request (malformed JSON, invalid parameters, or failed + validation) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: invalid quote + Unauthorized: + description: Missing or invalid CLOB L2 authentication + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: unauthenticated + Forbidden: + description: >- + Authenticated identity does not match the request, or role is not + allowed + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: auth address mismatch + NotFound: + description: The referenced RFQ is not active or no longer exists + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: unknown rfq + Conflict: + description: The RFQ is not in a state that accepts this command + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: competition window closed + TooManyRequests: + description: Rate limited + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: rate limited + ServiceUnavailable: + description: An RFQ service dependency is temporarily unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + example: + error: service unavailable + securitySchemes: + polyApiKey: + type: apiKey + in: header + name: POLY_API_KEY + description: CLOB API key + polyAddress: + type: apiKey + in: header + name: POLY_ADDRESS + description: Wallet address associated with the API key + polySignature: + type: apiKey + in: header + name: POLY_SIGNATURE + description: HMAC-SHA256 signature of the request + polyPassphrase: + type: apiKey + in: header + name: POLY_PASSPHRASE + description: CLOB API key passphrase + polyTimestamp: + type: apiKey + in: header + name: POLY_TIMESTAMP + description: Unix timestamp of the request + +````