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

# Perp market fills

> Recent fills on a perp market, sorted newest-first.



## OpenAPI

````yaml openapi-spec/history.yaml get /api/sol/perp/markets/{market_id}/trades
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    Also hosts write utilities (`/utils/sol/*`): token launch, transfer, burn,

    consolidate, fees claim/config, and agent initialize — previously on

    `router.raze.bot`. Mixer/distribute removed 2026-07-25.


    ## Batch Requests

    All endpoints with path parameters (mint, signer, address, tokenMint,
    ownerAddress) support batch queries

    via comma-separated values. For example:
    `/api/sol/trades/mint/mint1,mint2,mint3?limit=50`


    - Maximum 10 values per batch request

    - Each value must be a valid address (>= 32 characters)

    - Single values behave identically to non-batch requests

    - Batch response format: `{ "success": true, "results": { "value1": {...},
    "value2": {...} }, "count": N, "timestamp": "..." }`

    - Each key in `results` contains the full single-entity response

    - Queries run in parallel for maximum performance
  version: 1.0.0
servers:
  - url: https://api.raze.bot
    description: >-
      Raze global History API — GeoDNS routes to the nearest region
      automatically
security:
  - ApiKeyAuth: []
paths:
  /api/sol/perp/markets/{market_id}/trades:
    get:
      summary: Perp market fills
      description: Recent fills on a perp market, sorted newest-first.
      operationId: getPerpMarketTrades
      parameters:
        - name: market_id
          in: path
          required: true
          schema:
            type: string
          example: jup:SOL-PERP
        - name: from
          in: query
          schema:
            type: integer
            format: int64
          description: Start timestamp (Unix ms).
        - name: to
          in: query
          schema:
            type: integer
            format: int64
          description: End timestamp (Unix ms).
        - name: limit
          in: query
          schema:
            type: integer
            default: 200
            minimum: 1
            maximum: 1000
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerpMarketTradesResponse'
components:
  schemas:
    PerpMarketTradesResponse:
      type: object
      properties:
        market_id:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/PerpMarketTrade'
        count:
          type: integer
    PerpMarketTrade:
      type: object
      properties:
        timestamp:
          type: integer
          format: int64
        slot:
          type: integer
          format: int64
        signature:
          type: string
        signer:
          type: string
        side:
          type: string
          enum:
            - long
            - short
        size:
          type: integer
          format: int64
        price:
          type: integer
          format: int64
        fee:
          type: integer
          format: int64
        action:
          type: string
          enum:
            - open
            - add
            - reduce
            - close
            - fill
          description: >
            Position-lifecycle action derived from the fill's `extra`: `open`
            (new position), `add` (increase existing), `reduce` (partial close),
            `close` (full close). `fill` when no lifecycle fields are present
            (Phoenix bridge fills, legacy rows).
        realized_pnl_e6:
          type: integer
          format: int64
          nullable: true
          description: >
            Realized PnL in e6 USD (signed) for `reduce`/`close` fills; `null`
            for opens/adds and fills without PnL fields.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey

````