Forum Fills API

Trade execution history

OpenAPI Specification

forum-fills-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Forum Account Fills API
  version: '1.0'
  description: 'The Forum API provides programmatic access to the Forum perpetual futures exchange.

    Trade attention-based perpetual futures, access real-time market data, and manage your account.


    ## Base URL


    All endpoints are relative to `https://api.forum.market/v1`.


    ## Authentication


    Public endpoints (market data, exchange status) require no authentication.

    Private endpoints (orders, positions, account) require HMAC-SHA256 signed requests.


    See the [Authentication](/api-reference/authentication) guide for details.

    '
  contact:
    name: Forum Support
    email: contact@forum.market
    url: https://forum.market
  termsOfService: https://forum-legal.s3.us-east-2.amazonaws.com/terms-of-service.pdf
servers:
- url: https://api.forum.market/v1
  description: Production
security:
- ForumAccessKey: []
  ForumAccessTimestamp: []
  ForumAccessSign: []
tags:
- name: Fills
  description: Trade execution history
paths:
  /fills:
    get:
      operationId: listFills
      summary: List fills
      description: Returns trade executions (fills) for the authenticated user. Requires `read` permission.
      tags:
      - Fills
      security:
      - ForumAccessKey: []
        ForumAccessTimestamp: []
        ForumAccessSign: []
      parameters:
      - name: ticker
        in: query
        schema:
          type: string
        description: Filter by market ticker
      - name: orderId
        in: query
        schema:
          type: integer
        description: Filter by order ID
      - name: start
        in: query
        schema:
          type: string
          format: date-time
        description: Start time filter (ISO 8601)
      - name: end
        in: query
        schema:
          type: string
          format: date-time
        description: End time filter (ISO 8601)
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 500
          default: 100
      - name: cursor
        in: query
        schema:
          type: string
        description: Opaque pagination cursor from a previous response
      responses:
        '200':
          description: Paginated list of fills
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedFills'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INSUFFICIENT_PERMISSIONS
              message: API key lacks required permission
    RateLimited:
      description: Rate limit exceeded
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: RATE_LIMIT_EXCEEDED
              message: Rate limit exceeded. Try again in 5 seconds.
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing or invalid authentication
  schemas:
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: INVALID_PARAMETER
            message:
              type: string
              description: Human-readable error message
              example: Request validation failed
            details:
              type: object
              description: Additional error details
              example:
                fields:
                - field: ticker
                  message: Required
    PaginatedFills:
      type: object
      required:
      - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Fill'
        nextCursor:
          type:
          - string
          - 'null'
          description: Cursor for the next page. Null if no more results.
          example: abc123
    Fill:
      type: object
      required:
      - userId
      - tradeId
      - orderId
      - qty
      - ticker
      - isTaker
      - side
      - price
      - executedAt
      properties:
        userId:
          type: integer
          example: 42
        tradeId:
          type: integer
          description: Unique trade identifier
          example: 789
        orderId:
          type: integer
          description: Associated order ID
          example: 123
        qty:
          type: number
          description: Filled quantity
          example: 5
        ticker:
          type: string
          example: OPENAI
        isTaker:
          type: boolean
          description: Whether this fill was on the taker side
          example: true
        side:
          type: string
          enum:
          - buy
          - sell
          example: buy
        price:
          type: number
          description: Execution price in cents
          example: 10550
        executedAt:
          type: string
          format: date-time
          description: Execution timestamp
          example: '2026-02-25T12:00:01.000Z'
  securitySchemes:
    ForumAccessKey:
      type: apiKey
      in: header
      name: FORUM-ACCESS-KEY
      description: Your API key ID (e.g. `fk_a1b2c3d4e5f6...`)
    ForumAccessTimestamp:
      type: apiKey
      in: header
      name: FORUM-ACCESS-TIMESTAMP
      description: Unix epoch in seconds (UTC), as a string
    ForumAccessSign:
      type: apiKey
      in: header
      name: FORUM-ACCESS-SIGN
      description: 'Base64-encoded HMAC-SHA256 signature.


        **Signature generation:**

        ```

        prehash = timestamp + method + requestPath + body

        signature = Base64(HMAC-SHA256(secret, prehash))

        ```

        '