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

# List Pool Diffs

> Returns historical miner pool record if any diff detected



## OpenAPI

````yaml /api-reference/openapi.json get /private-api/v1/{workspace_id}/farms/{farm_id}/miner-pool-diff
openapi: 3.1.0
info:
  title: Nonce Private API
  description: |-
    Nonce Private API documentation - Internal endpoints for system integration

    Generated by NestJS Swagger Module with nestjs-zod
    Scope: Private API endpoints only (/private-api/*)
    Do not edit this file manually - regenerate with: pnpm run docs:openapi
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.nonce.app
    description: Production server
security: []
tags: []
paths:
  /private-api/v1/{workspace_id}/farms/{farm_id}/miner-pool-diff:
    get:
      tags:
        - Private API
        - Farm
      summary: List Pool Diffs
      description: Returns historical miner pool record if any diff detected
      operationId: ListMinerPoolDiffs
      parameters:
        - name: workspace_id
          required: true
          in: path
          schema:
            type: string
        - name: farm_id
          required: true
          in: path
          schema:
            type: string
        - name: from_time
          required: true
          in: query
          description: >-
            Start time for the history data in ISO 8601 format with timezone
            offset.
          schema:
            format: datetime
            example: YYYY-MM-DDTHH:MM:SSZ
            type: string
        - name: to_time
          required: true
          in: query
          description: >-
            End time for the history data in ISO 8601 format with timezone
            offset.
          schema:
            format: datetime
            example: YYYY-MM-DDTHH:MM:SSZ
            type: string
        - name: granularity
          required: false
          in: query
          description: >-
            Time resolution of the returned snapshots.

            - `10min`: max range 1 day (144 data points). Requires miner_id
            (single-miner queries only).

            - `hour` (default): max range 7 days (168 data points).

            - `day`: max range 90 days (90 data points).

            - `week`: max range 365 days (52 data points).
          schema:
            enum:
              - 10min
              - hour
              - day
              - week
            type: string
      responses:
        '200':
          description: Successfully retrieved miner pool diffs
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    description: Indicates if the request was successful
                  data:
                    type: array
                    description: Array of items
                    items:
                      type: object
                      properties:
                        miner_id:
                          type: string
                          description: Miner identifier
                        before_record:
                          description: Complete miner history record before the change
                          properties:
                            id:
                              type: string
                              description: Record identifier
                            miner_id:
                              type: string
                              description: Miner Id
                              example: 002b1a50fa281efe0f320ebc39f5047b
                            agent_id:
                              type: string
                              description: Agent Id (uuid generated by nonce system)
                              example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                            farm_id:
                              type: string
                              description: Farm Id (uuid generated by nonce system)
                              example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                            workspace_id:
                              type: string
                              description: Workspace Id
                              example: org_xxxxxxxxxxxxxxxxxxxxxxxxxxx
                            hashrate:
                              description: Hashrate value in H/s
                              example: 100120000000000
                              type:
                                - number
                                - 'null'
                            wattage:
                              description: Power consumption in watts
                              example: 9771
                              type:
                                - number
                                - 'null'
                            temp:
                              description: Temperature in Celsius
                              example: 75.5
                              type:
                                - number
                                - 'null'
                            serial_number:
                              description: Serial number
                              example: HTM3FS28HD25011939878367054H36045
                              type:
                                - string
                                - 'null'
                            model:
                              description: Miner model
                              example: Antminer S19
                              type:
                                - string
                                - 'null'
                            ip:
                              type: string
                              description: IP address
                              example: 192.168.1.100
                            mac:
                              type: string
                              description: MAC address
                              example: 00:1B:44:11:3A:B7
                            firmware_version:
                              description: Firmware version
                              example: 20250304.15.REL
                              type:
                                - string
                                - 'null'
                            period:
                              type: string
                              description: The period timestamp for this metric record
                              example: '2025-09-07T00:00:00.000Z'
                              format: date-time
                            pool_url:
                              description: Mining pool URL
                              example: stratum+tcp://pool.example.com:4444
                              type:
                                - string
                                - 'null'
                            worker_id:
                              description: Worker ID for the mining pool
                              example: worker1.100x0x217
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - miner_id
                            - agent_id
                            - farm_id
                            - workspace_id
                            - hashrate
                            - wattage
                            - temp
                            - serial_number
                            - model
                            - ip
                            - mac
                            - firmware_version
                            - period
                            - pool_url
                            - worker_id
                          title: Miner History Record
                          type:
                            - object
                            - 'null'
                        after_record:
                          description: Complete miner history record after the change
                          properties:
                            id:
                              type: string
                              description: Record identifier
                            miner_id:
                              type: string
                              description: Miner Id
                              example: 002b1a50fa281efe0f320ebc39f5047b
                            agent_id:
                              type: string
                              description: Agent Id (uuid generated by nonce system)
                              example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                            farm_id:
                              type: string
                              description: Farm Id (uuid generated by nonce system)
                              example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                            workspace_id:
                              type: string
                              description: Workspace Id
                              example: org_xxxxxxxxxxxxxxxxxxxxxxxxxxx
                            hashrate:
                              description: Hashrate value in H/s
                              example: 100120000000000
                              type:
                                - number
                                - 'null'
                            wattage:
                              description: Power consumption in watts
                              example: 9771
                              type:
                                - number
                                - 'null'
                            temp:
                              description: Temperature in Celsius
                              example: 75.5
                              type:
                                - number
                                - 'null'
                            serial_number:
                              description: Serial number
                              example: HTM3FS28HD25011939878367054H36045
                              type:
                                - string
                                - 'null'
                            model:
                              description: Miner model
                              example: Antminer S19
                              type:
                                - string
                                - 'null'
                            ip:
                              type: string
                              description: IP address
                              example: 192.168.1.100
                            mac:
                              type: string
                              description: MAC address
                              example: 00:1B:44:11:3A:B7
                            firmware_version:
                              description: Firmware version
                              example: 20250304.15.REL
                              type:
                                - string
                                - 'null'
                            period:
                              type: string
                              description: The period timestamp for this metric record
                              example: '2025-09-07T00:00:00.000Z'
                              format: date-time
                            pool_url:
                              description: Mining pool URL
                              example: stratum+tcp://pool.example.com:4444
                              type:
                                - string
                                - 'null'
                            worker_id:
                              description: Worker ID for the mining pool
                              example: worker1.100x0x217
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - miner_id
                            - agent_id
                            - farm_id
                            - workspace_id
                            - hashrate
                            - wattage
                            - temp
                            - serial_number
                            - model
                            - ip
                            - mac
                            - firmware_version
                            - period
                            - pool_url
                            - worker_id
                          additionalProperties: false
                          title: Miner History Record
                          type:
                            - object
                            - 'null'
                        changes:
                          type: object
                          properties:
                            pool_url:
                              type: object
                              properties:
                                before:
                                  description: Value before the change
                                  type:
                                    - string
                                    - 'null'
                                after:
                                  description: Value after the change
                                  type:
                                    - string
                                    - 'null'
                                changed:
                                  type: boolean
                                  description: Whether the field has changed
                              required:
                                - before
                                - after
                                - changed
                              description: Pool URL changes
                            worker_id:
                              type: object
                              properties:
                                before:
                                  description: Value before the change
                                  type:
                                    - string
                                    - 'null'
                                after:
                                  description: Value after the change
                                  type:
                                    - string
                                    - 'null'
                                changed:
                                  type: boolean
                                  description: Whether the field has changed
                              required:
                                - before
                                - after
                                - changed
                              description: Worker ID changes
                          required:
                            - pool_url
                            - worker_id
                          description: Summary of changes between the two time points
                      required:
                        - miner_id
                        - before_record
                        - after_record
                        - changes
                      title: Miner Pool Diff
                      deprecated: true
                  error:
                    type: 'null'
                    example: null
                    description: Error object (null on success)
                required:
                  - success
                  - data
                  - error
        '400':
          description: Bad Request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 400
                  message:
                    type: string
                    description: Error message
                    example: Invalid request parameters
                  error:
                    type: string
                    description: Error type
                    example: Bad Request
                required:
                  - statusCode
                  - message
                  - error
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 401
                  message:
                    type: string
                    description: Error message
                    example: Invalid or missing API key
                  error:
                    type: string
                    description: Error type
                    example: Unauthorized
                required:
                  - statusCode
                  - message
                  - error
        '403':
          description: Forbidden - Valid API key but insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 403
                  message:
                    type: string
                    description: Error message
                    example: Access denied to workspace
                  error:
                    type: string
                    description: Error type
                    example: Forbidden
                required:
                  - statusCode
                  - message
                  - error
        '404':
          description: Not Found - Resource does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 404
                  message:
                    type: string
                    description: Error message
                    example: Resource not found
                  error:
                    type: string
                    description: Error type
                    example: Not Found
                required:
                  - statusCode
                  - message
                  - error
      security:
        - clerk-api-key: []
components:
  securitySchemes:
    clerk-api-key:
      scheme: bearer
      bearerFormat: API Key
      type: http
      description: Clerk Machine API Key for authentication

````