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

# Get recent trades

> Returns recent public trades for a market with sequence numbers for incremental reads. Store the last processed sequence if you are building a polling-based market data feed.



## OpenAPI

````yaml /openapi/openapi.json get /partner/exchange/trades
openapi: 3.1.0
info:
  title: Stabyl API
  description: >-
    REST API for approved Stabyl accounts to automate exchange, wallet, and
    non-production simulation workflows.
  contact:
    name: Stabyl Support
    email: support@stabyl.com
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.stabyl.com/v1
    description: Production
  - url: https://api-staging.stabyl.com/v1
    description: Staging
security: []
tags:
  - name: Exchange
    description: Trading market data and order management for account automation.
  - name: Wallets
    description: >-
      Supported routes, deposit destinations, balances, transactions, and saved
      recipients.
  - name: Webhooks
    description: >-
      Outbound event delivery configuration and eventually consistent delivery
      history. Verify Standard Webhooks webhook-id, webhook-timestamp, and
      webhook-signature headers against the unchanged raw request body before
      parsing JSON.
  - name: Simulation
    description: Non-production endpoints for testing integration behavior.
paths:
  /partner/exchange/trades:
    get:
      tags:
        - Exchange
      summary: Get recent trades
      description: >-
        Returns recent public trades for a market with sequence numbers for
        incremental reads. Store the last processed sequence if you are building
        a polling-based market data feed.
      operationId: get_partner_exchange_trades
      parameters:
        - name: pair_id
          in: query
          description: >-
            Trading pair identifier returned by `GET /partner/exchange/markets`,
            for example `USD/NGN`.
          required: true
          schema:
            type: string
          example: USD/NGN
        - name: after_sequence
          in: query
          description: >-
            Resume public trade reads after a previously processed sequence
            number.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
        - name: limit
          in: query
          description: >-
            Number of trades to return. Defaults to `50` and is capped by the
            API.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
          example: 50
      responses:
        '200':
          description: Recent trades
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/TradesResponse'
                  status:
                    type: string
                    enum:
                      - success
              example:
                data:
                  trades:
                    - created_at: '2026-05-24T12:00:00Z'
                      id: 0197f1f0-0000-7000-8000-000000000010
                      pair_id: USD/NGN
                      price: '1650.00'
                      quantity: '10.00'
                      sequence: 12345
                      side: buy
                status: success
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: missing X-Api-Key header
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: UNAUTHORIZED
                  message: missing X-Api-Key header
                status: error
      security:
        - api_key: []
components:
  schemas:
    TradesResponse:
      type: object
      description: Recent public trade tape entries for a trading pair.
      required:
        - trades
      properties:
        trades:
          type: array
          items:
            $ref: '#/components/schemas/TradeInfo'
          description: List of trades
    TradeInfo:
      type: object
      description: >-
        Single public trade tape entry with price, quantity, side, sequence, and
        timestamp.
      required:
        - id
        - pair_id
        - price
        - quantity
        - side
        - sequence
        - created_at
      properties:
        created_at:
          type: string
          description: Trade timestamp
        id:
          type: string
          format: uuid
          description: Trade identifier
        pair_id:
          type: string
          description: Trading pair identifier
          example: USD/NGN
        price:
          type: string
          description: Execution price
          example: '1650.00'
        quantity:
          type: string
          description: Executed quantity
          example: '100.00'
        sequence:
          type: integer
          format: int64
          description: Sequence number for ordering
          example: 12345
        side:
          type: string
          description: 'Trade side: "buy" or "sell"'
          example: buy
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API credential. Withdrawal quote and submit operations additionally
        require the documented Ed25519 timestamp, nonce, and signature headers.
      x-default: sb_test_your_key

````