> ## Documentation Index
> Fetch the complete documentation index at: https://cobo.com/products/agentic-wallet/manual/llms.txt
> Use this file to discover all available pages before exploring further.

# Get wallet pact history

> Retrieve time-bucketed pact activity history for a wallet, suitable for charting. Data is derived from persisted transaction records. Use `range` to select the time window and `metric` to control the sort order.



## OpenAPI

````yaml get /api/v1/wallets/{wallet_id}/pacts/history
openapi: 3.1.0
info:
  title: Cobo Agentic Wallet Service
  description: Unified wallet engine for human and agent principals
  version: 1.3.0
servers: []
security: []
paths:
  /api/v1/wallets/{wallet_id}/pacts/history:
    get:
      tags:
        - Pacts
      summary: Get wallet pact history
      description: >-
        Retrieve time-bucketed pact activity history for a wallet, suitable for
        charting. Data is derived from persisted transaction records. Use
        `range` to select the time window and `metric` to control the sort
        order.
      operationId: get_wallet_pact_history
      parameters:
        - name: wallet_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The UUID of the wallet to retrieve pact history for.
            title: Wallet Id
          description: The UUID of the wallet to retrieve pact history for.
        - name: range
          in: query
          required: true
          schema:
            type: string
            description: >-
              Time window for the history chart. Allowed values: `1d`, `7d`,
              `30d`.
            title: Range
          description: >-
            Time window for the history chart. Allowed values: `1d`, `7d`,
            `30d`.
        - name: metric
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/WalletPactHistoryMetric'
            description: >-
              Metric used to sort pacts within each bucket. Possible values:
              `tx_count`, `tx_amount`.
            default: tx_count
          description: >-
            Metric used to sort pacts within each bucket. Possible values:
            `tx_count`, `tx_amount`.
        - name: lang
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/PactStatsLanguage'
            description: 'Language for localized pact titles. Possible values: `en`, `zh`.'
            default: en
          description: 'Language for localized pact titles. Possible values: `en`, `zh`.'
        - name: X-API-Key
          in: header
          required: false
          schema:
            title: X-Api-Key
            type: string
            nullable: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse_WalletPactHistoryRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WrappedValidationError'
components:
  schemas:
    WalletPactHistoryMetric:
      type: string
      enum:
        - tx_count
        - tx_amount
      title: WalletPactHistoryMetric
      description: Primary chart metric hint used for pact ranking in buckets.
    PactStatsLanguage:
      type: string
      enum:
        - zh
        - en
      title: PactStatsLanguage
      description: Language option for localized pact display fields.
    StandardResponse_WalletPactHistoryRead_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        result:
          $ref: '#/components/schemas/WalletPactHistoryRead'
        suggestion:
          type: string
          title: Suggestion
          default: ''
        message:
          type: string
          title: Message
          default: ''
        meta:
          $ref: '#/components/schemas/PaginationMeta'
          nullable: true
      type: object
      required:
        - result
      title: StandardResponse[WalletPactHistoryRead]
    WrappedValidationError:
      title: WrappedValidationError
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
          default: false
          title: Success
        error:
          type: object
          title: Error
          required:
            - detail
          properties:
            detail:
              type: array
              title: Detail
              items:
                $ref: '#/components/schemas/ValidationError'
    WalletPactHistoryRead:
      properties:
        wallet_id:
          type: string
          format: uuid
          title: Wallet Id
          description: Wallet UUID.
        range:
          $ref: '#/components/schemas/WalletPactHistoryRange'
          description: Echoed query range.
        currency:
          $ref: '#/components/schemas/WalletPactCurrency'
          description: Display currency code.
        summary:
          $ref: '#/components/schemas/WalletPactHistorySummaryRead'
          description: Range summary metrics.
        buckets:
          items:
            $ref: '#/components/schemas/WalletPactHistoryBucketRead'
          type: array
          title: Buckets
          description: Time-ordered buckets covering the full requested range.
        as_of:
          type: string
          format: date-time
          title: As Of
          description: Timestamp when this payload was generated.
      type: object
      required:
        - wallet_id
        - range
        - currency
        - summary
        - buckets
        - as_of
      title: WalletPactHistoryRead
      description: Wallet pact history payload for chart rendering.
    PaginationMeta:
      properties:
        total:
          title: Total
          type: integer
          nullable: true
        offset:
          title: Offset
          type: integer
          nullable: true
        limit:
          title: Limit
          type: integer
          nullable: true
        has_more:
          title: Has More
          type: boolean
          nullable: true
        after:
          title: After
          type: string
          nullable: true
        before:
          title: Before
          type: string
          nullable: true
      type: object
      title: PaginationMeta
      description: |-
        Pagination metadata for list responses.

        Supports both legacy offset-based and cursor-based pagination.
        Cursor fields (``has_more``, ``after``, ``before``) are populated for
        cursor-paginated endpoints.  Legacy fields (``offset``, ``limit``) are
        populated when the caller uses the deprecated ``offset`` parameter.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WalletPactHistoryRange:
      type: string
      enum:
        - 1d
        - 7d
        - 30d
      title: WalletPactHistoryRange
      description: Supported history windows for pact charting.
    WalletPactCurrency:
      type: string
      enum:
        - USD
      title: WalletPactCurrency
      description: Currency code for pact statistics.
    WalletPactHistorySummaryRead:
      properties:
        total_tx_count:
          type: integer
          title: Total Tx Count
          description: Total tx count across all buckets in the range.
        total_tx_amount:
          type: string
          title: Total Tx Amount
          description: Total tx amount across all buckets in the range, decimal string.
      type: object
      required:
        - total_tx_count
        - total_tx_amount
      title: WalletPactHistorySummaryRead
      description: Summary metrics for the selected history window.
    WalletPactHistoryBucketRead:
      properties:
        bucket_start:
          type: string
          format: date-time
          title: Bucket Start
          description: UTC bucket start time.
        label:
          type: string
          title: Label
          description: Preformatted bucket label for x-axis rendering.
        tx_count:
          type: integer
          title: Tx Count
          description: Bucket total tx count.
        tx_amount:
          type: string
          title: Tx Amount
          description: Bucket total tx amount, decimal string.
        pacts:
          items:
            $ref: '#/components/schemas/WalletPactHistoryBucketPactRead'
          type: array
          title: Pacts
          description: Per-pact contributions in this bucket.
      type: object
      required:
        - bucket_start
        - label
        - tx_count
        - tx_amount
        - pacts
      title: WalletPactHistoryBucketRead
      description: One chart bucket in wallet pact history.
    WalletPactHistoryBucketPactRead:
      properties:
        pact_id:
          title: Pact Id
          description: Pact UUID. Null for synthetic rows.
          type: string
          format: uuid
          nullable: true
        title:
          type: string
          title: Title
          description: Localized pact title for display.
        tx_count:
          type: integer
          title: Tx Count
          description: Pact tx count in this bucket.
        tx_amount:
          type: string
          title: Tx Amount
          description: Pact tx amount in this bucket, decimal string.
      type: object
      required:
        - title
        - tx_count
        - tx_amount
      title: WalletPactHistoryBucketPactRead
      description: Per-pact contribution within one history bucket.

````