> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lean.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a combo RFQ

> Create a multi-leg combo on Kalshi or Polymarket US and request maker quotes for any 2 to 10 legs (elections, macro, sports, or cross-category). Waits up to `wait_seconds` for initial quotes. Set `quote_only: true` to automatically delete/cancel the RFQ on the venue after capturing quotes.



## OpenAPI

````yaml api-reference/openapi.json POST /rfqs
openapi: 3.0.0
info:
  title: Lean API
  version: 0.1.0
  description: >-
    Programmatic access to Lean: canonical sports markets, quotes, orders,
    positions and balances.
servers:
  - url: '{baseUrl}/v1'
    description: Lean API
    variables:
      baseUrl:
        default: https://api.lean.xyz
        description: >-
          The Lean API base URL, without /v1. Same value as LEAN_API_URL in the
          guides.
security:
  - apiKey: []
paths:
  /rfqs:
    post:
      tags:
        - RFQs
      summary: Create and quote a multi-leg combo RFQ
      description: >-
        Create a multi-leg combo on Kalshi or Polymarket US and request maker
        quotes for any 2 to 10 legs (elections, macro, sports, or
        cross-category). Waits up to `wait_seconds` for initial quotes. Set
        `quote_only: true` to automatically delete/cancel the RFQ on the venue
        after capturing quotes.
      operationId: createComboRfq
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_request_id:
                  type: string
                  pattern: ^[A-Za-z0-9_-]{1,64}$
                  description: Unique per API key. Replaying returns the original RFQ.
                venue:
                  type: string
                  enum:
                    - kalshi
                    - polymarket_us
                  description: 'Combo RFQ venue: kalshi or polymarket_us.'
                legs:
                  type: array
                  items:
                    type: object
                    properties:
                      ticker:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          Venue market ticker (e.g. a Kalshi ticker or pmus:...
                          slug).
                      event_ticker:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          Optional event ticker; looked up from Lean metadata
                          when omitted.
                      side:
                        type: string
                        enum:
                          - 'yes'
                          - 'no'
                        description: 'Outcome side for this leg: yes or no.'
                    required:
                      - ticker
                      - side
                    additionalProperties: false
                  minItems: 2
                  maxItems: 10
                  description: >-
                    Between 2 and 10 combo legs (works for sports, elections,
                    macro, and cross-category combos).
                budget_usd:
                  type: string
                  pattern: ^\d{1,4}(\.\d{1,2})?$
                  description: >-
                    Target combo spend in USD between $1 and $1,000 (up to 2
                    decimal places, e.g. "250").
                collection_ticker:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: >-
                    Optional Kalshi MVE collection ticker (e.g.
                    KXMVECROSSCATEGORY-R or KXMVESPORTSMULTIGAMEEXTENDED-R).
                    Auto-inferred when omitted.
                wait_seconds:
                  type: integer
                  minimum: 0
                  maximum: 10
                  default: 3
                  description: >-
                    Seconds to wait for initial maker quotes before returning (0
                    to 10, default 3).
                quote_only:
                  type: boolean
                  default: false
                  description: >-
                    When true, cancels/deletes the RFQ on the venue immediately
                    after collecting initial quotes so quote-only research never
                    leaves open RFQs.
              required:
                - client_request_id
                - venue
                - legs
                - budget_usd
              additionalProperties: false
            example: Combo legs, venue, budget, and quote options
      responses:
        '200':
          description: RFQ status, combo ticker, and any initial maker quotes
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      success:
                        type: boolean
                        enum:
                          - true
                      data:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          client_request_id:
                            type: string
                            minLength: 1
                          venue:
                            type: string
                            enum:
                              - kalshi
                              - polymarket_us
                          status:
                            type: string
                            enum:
                              - resolving
                              - pending
                              - quoted
                              - no_quote
                              - canceled
                              - unsupported_combo
                              - credentials_required
                              - error
                              - failed
                          venue_request_id:
                            type: string
                            nullable: true
                          combo_ticker:
                            type: string
                            nullable: true
                          combo_lean_url:
                            type: string
                            nullable: true
                            format: uri
                          combo_venue_url:
                            type: string
                            nullable: true
                            format: uri
                          legs:
                            type: array
                            items:
                              type: object
                              properties:
                                ticker:
                                  type: string
                                  minLength: 1
                                event_ticker:
                                  type: string
                                  minLength: 1
                                side:
                                  type: string
                                  enum:
                                    - 'yes'
                                    - 'no'
                              required:
                                - ticker
                                - event_ticker
                                - side
                          budget_usd:
                            type: string
                            pattern: ^\d{1,4}(\.\d{1,2})?$
                          quote_only:
                            type: boolean
                          quotes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                side:
                                  type: string
                                  enum:
                                    - 'yes'
                                    - 'no'
                                price_usd:
                                  type: string
                                quantity:
                                  type: string
                                  nullable: true
                                  pattern: ^\d+(?:\.\d+)?$
                                payout_usd:
                                  type: string
                                  nullable: true
                                  pattern: ^\d+(?:\.\d+)?$
                                received_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - side
                                - price_usd
                                - quantity
                                - payout_usd
                                - received_at
                          acceptance:
                            type: object
                            nullable: true
                            properties:
                              status:
                                type: string
                                enum:
                                  - order_submitted
                                  - accepted
                                  - acceptance_unconfirmed
                                  - rejected
                              quote_id:
                                type: string
                                minLength: 1
                              order_id:
                                type: string
                                nullable: true
                              reason:
                                type: string
                                nullable: true
                            required:
                              - status
                              - quote_id
                              - order_id
                              - reason
                          reason:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                            format: date-time
                          livemode:
                            type: boolean
                        required:
                          - id
                          - client_request_id
                          - venue
                          - status
                          - venue_request_id
                          - combo_ticker
                          - combo_lean_url
                          - combo_venue_url
                          - legs
                          - budget_usd
                          - quote_only
                          - quotes
                          - acceptance
                          - reason
                          - created_at
                          - livemode
                      meta:
                        type: object
                        properties:
                          timestampMs:
                            type: integer
                            minimum: 0
                          requestId:
                            type: string
                            minLength: 1
                          traceId:
                            type: string
                            minLength: 1
                          cachedAtMs:
                            type: integer
                            minimum: 0
                          source:
                            type: string
                            enum:
                              - cache
                              - database
                              - clickhouse
                              - upstream
                              - fallback
                              - internal
                        required:
                          - timestampMs
                          - requestId
                    required:
                      - success
                      - data
                      - meta
                  - $ref: '#/components/schemas/ApiError'
        '400':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Invalid request
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '401':
          description: Missing, invalid, expired or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: UNAUTHORIZED
                  message: Invalid, expired or revoked API key
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '403':
          description: The key lacks the scope this route needs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: FORBIDDEN
                  message: This API key lacks the scope this route needs
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '409':
          description: client_request_id already used with different parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: CONFLICT
                  message: client_request_id already used with different parameters
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '422':
          description: Real RFQs require a live API key or valid legs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Real RFQs require a live API key or valid legs
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '429':
          description: API error
          headers:
            Retry-After:
              description: Seconds remaining in the upstream read cooldown, when available
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: RATE_LIMITED
                  message: Too many requests for this API key
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '500':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: INTERNAL_ERROR
                  message: An internal error occurred.
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
components:
  schemas:
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_ERROR
                - NOT_FOUND
                - UNAUTHORIZED
                - FORBIDDEN
                - CONFLICT
                - UPSTREAM_ERROR
                - RATE_LIMITED
                - INTERNAL_ERROR
                - FEATURE_DISABLED
                - CONDITIONAL_SELL_REJECTED
                - CONDITIONAL_SELL_ACTIVE
            message:
              type: string
              minLength: 1
            details:
              nullable: true
          required:
            - code
            - message
        meta:
          type: object
          properties:
            timestampMs:
              type: integer
              minimum: 0
            requestId:
              type: string
              minLength: 1
            traceId:
              type: string
              minLength: 1
            cachedAtMs:
              type: integer
              minimum: 0
            source:
              type: string
              enum:
                - cache
                - database
                - clickhouse
                - upstream
                - fallback
                - internal
          required:
            - timestampMs
            - requestId
      required:
        - success
        - error
        - meta
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A Lean API key, sent as `Authorization: Bearer <key>`. A test key
        (`lean_sk_test_...`) simulates orders and fills with no money; a live
        key (`lean_sk_live_...`) trades for real within the key's limits. Every
        successful response says which mode answered in `data.livemode`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.