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

# Get public trades

> Public settled trade prints (no maker/taker direction). **L0 — public.** Paginated.



## OpenAPI

````yaml /api-reference/openapi-clob-v1.yaml get /v1/markets/{condition_id}/trades
openapi: 3.1.0
info:
  title: Foresight CLOB Trading API v1
  version: 1.0.0
  description: >
    Public-facing CLOB (central-limit order book) REST API for the Foresight

    prediction-market platform.


    This is a **different API from the legacy AMM Trade API** (`/trade/*`). The

    CLOB API trades signed limit/market orders against an order book instead of

    swapping against an automated market maker.


    ## Base URL


    ```

    https://api.foresight.now

    ```


    All routes below are prefixed with `/v1`.


    ## Auth tiers


    - **L0** — public, no credentials (all market-data routes).

    - **L1** — Privy JWT (`Authorization: Bearer <jwt>`); used for API-key
    management.

    - **L2** — Privy JWT **or** API-key headers (`fs-api-key` +
    `fs-api-secret`); used for trading and private reads.


    ## Market identity


    A market is identified by the pair **`condition_id`** (on-chain
    ConditionalTokens

    condition hash) + **`chain_id`** (blockchain network id). Internal database

    identifiers are never exposed.


    The CLOB currently runs on **BNB Smart Chain (BSC) mainnet — `chain_id:
    56`**.

    The collateral token on BSC has **18 decimals**. Always read the
    authoritative

    `decimals` from `GET /v1/markets/{condition_id}/tokens` rather than
    hard-coding

    it — amount math signed at the wrong scale is rejected at ingest.


    ## Async matching


    `POST /v1/orders` always returns `status: OPEN`. Matching runs in a
    background

    worker; matched / partial / failed transitions arrive on the private `user`

    WebSocket channel (`wss://api.foresight.now/v1/ws`).


    ## Error envelope


    Every non-2xx response is shaped as (all field names snake_case):


    ```json

    {
      "correlation_id": "abc-123",
      "code": "NOT_FOUND",
      "message": "Market not found",
      "status_code": 404,
      "timestamp": "2026-06-03T10:15:30.000Z",
      "path": "/v1/markets/0x.../book"
    }

    ```
servers:
  - url: https://api.foresight.now
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Auth
    description: API-key lifecycle and WebSocket token issuance.
  - name: Market Data
    description: Public markets, orderbook, ticker, trades, tokens. L0 — no auth.
  - name: Orders
    description: Place, list, and cancel signed EIP-712 orders. L2.
  - name: Fills
    description: Authenticated wallet's fill history. L2.
  - name: Positions
    description: Authenticated wallet's CLOB positions. L2.
paths:
  /v1/markets/{condition_id}/trades:
    get:
      tags:
        - Market Data
      summary: Get public trades
      description: >-
        Public settled trade prints (no maker/taker direction). **L0 — public.**
        Paginated.
      parameters:
        - $ref: '#/components/parameters/ConditionIdPath'
        - $ref: '#/components/parameters/ChainIdQuery'
        - $ref: '#/components/parameters/CursorQuery'
        - $ref: '#/components/parameters/LimitQuery'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedEnvelope'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/PublicTrade'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    ConditionIdPath:
      in: path
      name: condition_id
      required: true
      schema:
        type: string
        example: '0x9cded060be358b76678e598084cf258c7257771e473dbb461cad23417302d606'
      description: On-chain ConditionalTokens condition hash.
    ChainIdQuery:
      in: query
      name: chain_id
      required: true
      schema:
        type: integer
        example: 56
      description: Blockchain network id. BSC mainnet is `56`.
    CursorQuery:
      in: query
      name: cursor
      schema:
        type: string
        nullable: true
      description: Opaque cursor from the prior response's `next_cursor`.
    LimitQuery:
      in: query
      name: limit
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
  schemas:
    PaginatedEnvelope:
      type: object
      required:
        - data
        - next_cursor
        - has_more
      properties:
        data:
          type: array
          items: {}
        next_cursor:
          type: string
          nullable: true
        has_more:
          type: boolean
    PublicTrade:
      type: object
      description: |
        Public settled trade print. Maker/taker direction is **not** exposed —
        there is no `side` field. Use the authenticated `GET /v1/fills` for
        directional data on your own trades.
      properties:
        trade_id:
          type: string
        condition_id:
          type: string
        chain_id:
          type: integer
          example: 56
        price:
          type: string
          example: '0.55'
        size:
          type: string
          example: '10'
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - correlation_id
        - code
        - message
        - status_code
        - timestamp
        - path
      properties:
        correlation_id:
          type: string
          description: Request correlation id; falls back to `"unknown"` when none is set.
        code:
          type: string
          example: NOT_FOUND
        message:
          type: string
        status_code:
          type: integer
          example: 404
        timestamp:
          type: string
          format: date-time
        path:
          type: string
          example: /v1/markets/0x.../book
  responses:
    ErrorResponse:
      description: Error envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````