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

# Get an activity-history import

> Requires the read scope matching the import's activity type. A failed task can retain partial counts and successfully written activity facts; interrupted tasks do not resume automatically.



## OpenAPI

````yaml /openapi/portfobit-openapi.yaml get /activity-history-imports/{import_id}
openapi: 3.1.0
info:
  title: Portfobit Open API
  version: 0.1.0
  description: >
    Public REST API for direct API clients, CI, scripts, service accounts,
    third-party agents, and developer integrations.

    Public REST requests use scoped Portfobit Open API keys. OAuth access tokens
    issued for the Portfobit MCP resource are not accepted by `/api/v1/*`
    endpoints.

    Portfobit is crypto-CEX-only. Financial values are decimal strings and
    timestamps are RFC 3339 UTC strings.

    The API never supports withdrawals, external-address transfers,
    cross-exchange transfers, or P2P transfers.
servers:
  - url: https://api.portfobit.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Context
  - name: Accounts
  - name: Portfolios
  - name: Valuation
  - name: Activity
  - name: Trading
  - name: Market data
  - name: Support
paths:
  /activity-history-imports/{import_id}:
    get:
      tags:
        - Activity
      summary: Get an activity-history import
      description: >-
        Requires the read scope matching the import's activity type. A failed
        task can retain partial counts and successfully written activity facts;
        interrupted tasks do not resume automatically.
      operationId: getActivityHistoryImport
      parameters:
        - $ref: '#/components/parameters/ActivityHistoryImportId'
      responses:
        '200':
          $ref: '#/components/responses/ActivityHistoryImportResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    ActivityHistoryImportId:
      name: import_id
      in: path
      required: true
      schema:
        type: string
      description: Activity-history import task ID.
  responses:
    ActivityHistoryImportResponse:
      description: Activity-history import task response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ActivityHistoryImportResponseSchema'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    ActivityHistoryImportResponseSchema:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          $ref: '#/components/schemas/ActivityHistoryImport'
        meta:
          $ref: '#/components/schemas/Meta'
      example:
        data:
          id: ahi_01J2K8H
          account_id: acc_01H8XFK9A
          venue: binance
          activity_type: trades
          symbol: BTC/USDT
          requested_from: '2025-01-01T00:00:00Z'
          requested_to: '2025-02-01T00:00:00Z'
          status: queued
          fetched_count: 0
          written_count: 0
          skipped_count: 0
          page_count: 0
          failure_code: null
          failure_message: null
          started_at: null
          completed_at: null
          deadline_at: '2026-09-01T10:05:00Z'
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-09-01T10:00:00Z'
    ErrorEnvelope:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    ActivityHistoryImport:
      type: object
      required:
        - id
        - account_id
        - venue
        - activity_type
        - symbol
        - requested_from
        - requested_to
        - status
        - fetched_count
        - written_count
        - skipped_count
        - page_count
        - failure_code
        - failure_message
        - started_at
        - completed_at
        - deadline_at
      properties:
        id:
          type: string
        account_id:
          type: string
        venue:
          type: string
        activity_type:
          type: string
          enum:
            - order_history
            - trades
            - ledger
            - transactions
        symbol:
          type:
            - string
            - 'null'
        requested_from:
          type: string
          format: date-time
        requested_to:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
        fetched_count:
          type: integer
          minimum: 0
        written_count:
          type: integer
          minimum: 0
        skipped_count:
          type: integer
          minimum: 0
        page_count:
          type: integer
          minimum: 0
        failure_code:
          type:
            - string
            - 'null'
        failure_message:
          type:
            - string
            - 'null'
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        deadline_at:
          type: string
          format: date-time
    Meta:
      type: object
      required:
        - request_id
        - generated_at
      properties:
        request_id:
          type: string
        generated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Portfobit Open API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.