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

# Get Polymarket Recent Trades

> Most recent N Polymarket trades for a ticker, joined with market
metadata. Powers the Live Terminal "Recent Trades" panel.

`side` is the raw label written by the WS client:
  BUY_YES / SELL_YES / BUY_NO / SELL_NO
and `outcome` is the market's `Up` or `Down` label, so the UI can
render "BUY UP" / "SELL DOWN" / etc. however it likes.

Window is fixed to the last hour — anything older is irrelevant
for a live dashboard; the historical lookup is `/v1/markets/{id}/volume`.



## OpenAPI

````yaml get /v1/polymarket/recent-trades
openapi: 3.1.0
info:
  title: PolyQuantLab API
  version: 0.1.0
  description: >-
    Sub-second Polymarket orderbook data, walk-the-book backtests, paper
    trading, and the live arb audit. Same endpoints the PolyQuantLab dashboard
    uses internally — Bearer-token auth, JSON-over-HTTPS, predictable
    pagination.
  contact:
    email: contact@polyquantlab.com
    url: https://polyquantlab.com/contact
  license:
    name: Proprietary
servers:
  - url: https://api.polyquantlab.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /v1/polymarket/recent-trades:
    get:
      summary: Get Polymarket Recent Trades
      description: >-
        Most recent N Polymarket trades for a ticker, joined with market

        metadata. Powers the Live Terminal "Recent Trades" panel.


        `side` is the raw label written by the WS client:
          BUY_YES / SELL_YES / BUY_NO / SELL_NO
        and `outcome` is the market's `Up` or `Down` label, so the UI can

        render "BUY UP" / "SELL DOWN" / etc. however it likes.


        Window is fixed to the last hour — anything older is irrelevant

        for a live dashboard; the historical lookup is
        `/v1/markets/{id}/volume`.
      operationId: get_polymarket_recent_trades_v1_polymarket_recent_trades_get
      parameters:
        - name: ticker
          in: query
          required: true
          schema:
            type: string
            examples:
              - BTC
              - ETH
              - SOL
            title: Ticker
        - name: event_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Restrict to one timeframe.
            examples:
              - 5m
              - 15m
              - 1h
              - 4h
              - daily_up_down
            title: Event Type
          description: Restrict to one timeframe.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetPolymarketRecentTradesVPolymarketRecentTradesGetResponse
              example:
                ticker: BTC
                event_type: 5m
                limit: 50
                count: 2
                trades:
                  - ts: '2026-06-06T03:58:11+00:00'
                    market_id: 0x4a8f31...c2
                    outcome: Up
                    side: BUY_YES
                    price: 0.82
                    size: 100
                    notional_usd: 82
                  - ts: '2026-06-06T03:58:05+00:00'
                    market_id: 0x4a8f31...c2
                    outcome: Up
                    side: SELL_NO
                    price: 0.19
                    size: 250
                    notional_usd: 47.5
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetPolymarketRecentTradesVPolymarketRecentTradesGetResponse:
      type: object
      properties:
        ticker:
          type: string
          enum:
            - BTC
            - ETH
            - SOL
        event_type:
          type: string
          enum:
            - 5m
            - 15m
            - 1h
            - 4h
            - daily_up_down
        limit:
          type: integer
          format: int64
        count:
          type: integer
          format: int64
        trades:
          type: array
          items:
            type: object
            properties:
              ts:
                type: string
                format: date-time
              market_id:
                type: string
                description: Polymarket market identifier (hex 0x…).
              outcome:
                type: string
                enum:
                  - Up
                  - Down
              side:
                type: string
                enum:
                  - buy_yes
                  - sell_yes
                  - buy_no
                  - sell_no
                  - BUY_YES
                  - SELL_YES
                  - BUY_NO
                  - SELL_NO
              price:
                type: number
                format: double
              size:
                type: number
                format: double
              notional_usd:
                type: number
                format: double
            required:
              - ts
              - market_id
              - outcome
              - side
              - price
              - size
              - notional_usd
      required:
        - ticker
        - event_type
        - limit
        - count
        - trades
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````