> ## 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.

# List local terminal order history

> Requires `order:read` and an active Plus or Pro subscription. Uses cursor pagination and returns collection coverage metadata for the local 7-day continuous-collection window.



## OpenAPI

````yaml /openapi/portfobit-openapi.yaml get /order-history
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:
  /order-history:
    get:
      tags:
        - Activity
      summary: List local terminal order history
      description: >-
        Requires `order:read` and an active Plus or Pro subscription. Uses
        cursor pagination and returns collection coverage metadata for the local
        7-day continuous-collection window.
      operationId: listOrderHistory
      parameters:
        - $ref: '#/components/parameters/AccountIdQuery'
        - $ref: '#/components/parameters/Symbol'
        - $ref: '#/components/parameters/OrderStatus'
        - $ref: '#/components/parameters/From'
        - $ref: '#/components/parameters/To'
        - $ref: '#/components/parameters/CursorLimit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          $ref: '#/components/responses/OrderHistoryResponse'
        '403':
          $ref: '#/components/responses/PlanRequiredResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    AccountIdQuery:
      name: account_id
      in: query
      schema:
        type: string
      description: Restrict results to one connected CEX account.
    Symbol:
      name: symbol
      in: query
      schema:
        type: string
      description: CCXT unified symbol.
    OrderStatus:
      name: status
      in: query
      schema:
        type: string
        enum:
          - closed
          - canceled
          - expired
          - rejected
    From:
      name: from
      in: query
      schema:
        type: string
        format: date-time
      description: Inclusive RFC 3339 UTC timestamp.
    To:
      name: to
      in: query
      schema:
        type: string
        format: date-time
      description: Inclusive RFC 3339 UTC timestamp.
    CursorLimit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 50
    Cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: Cursor returned as `next_cursor` by a prior page.
  responses:
    OrderHistoryResponse:
      description: Terminal order-history response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OrderHistoryResponseSchema'
    PlanRequiredResponse:
      description: The operation requires an active Plus or Pro subscription.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlanRequiredResponseSchema'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    OrderHistoryResponseSchema:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            type: object
            required:
              - id
              - account_id
              - venue
              - venue_order_id
              - client_order_id
              - symbol
              - type
              - time_in_force
              - side
              - status
              - price
              - amount
              - filled
              - remaining
              - average
              - cost
              - fee
              - reduce_only
              - post_only
              - trigger_price
              - stop_loss_price
              - take_profit_price
              - placed_at
              - last_trade_at
              - terminal_at
              - terminal_observed_at
            properties:
              id:
                type: string
              account_id:
                type: string
              venue:
                type: string
              venue_order_id:
                type: string
              client_order_id:
                type:
                  - string
                  - 'null'
              symbol:
                type: string
              type:
                type: string
              time_in_force:
                type:
                  - string
                  - 'null'
              side:
                type: string
              status:
                type: string
              price:
                type:
                  - string
                  - 'null'
              amount:
                type:
                  - string
                  - 'null'
              filled:
                type:
                  - string
                  - 'null'
              remaining:
                type:
                  - string
                  - 'null'
              average:
                type:
                  - string
                  - 'null'
              cost:
                type:
                  - string
                  - 'null'
              fee:
                type:
                  - object
                  - 'null'
                required:
                  - cost
                  - currency
                  - rate
                properties:
                  cost:
                    type:
                      - string
                      - 'null'
                  currency:
                    type:
                      - string
                      - 'null'
                  rate:
                    type:
                      - string
                      - 'null'
              reduce_only:
                type:
                  - boolean
                  - 'null'
              post_only:
                type:
                  - boolean
                  - 'null'
              trigger_price:
                type:
                  - string
                  - 'null'
              stop_loss_price:
                type:
                  - string
                  - 'null'
              take_profit_price:
                type:
                  - string
                  - 'null'
              placed_at:
                type:
                  - string
                  - 'null'
                format: date-time
              last_trade_at:
                type:
                  - string
                  - 'null'
                format: date-time
              terminal_at:
                type:
                  - string
                  - 'null'
                format: date-time
              terminal_observed_at:
                type: string
                format: date-time
        meta:
          type: object
          required:
            - limit
            - next_cursor
            - has_next
            - activity_history_collection
            - request_id
            - generated_at
          properties:
            limit:
              type: integer
            next_cursor:
              type:
                - string
                - 'null'
            has_next:
              type: boolean
            activity_history_collection:
              type: object
              required:
                - window_days
                - status
              properties:
                window_days:
                  type: integer
                status:
                  type: string
            request_id:
              type: string
            generated_at:
              type: string
              format: date-time
      example:
        data:
          - id: ord_01J2K8O
            account_id: acc_01H8XFK9A
            venue: binance
            venue_order_id: '12345'
            client_order_id: cli_123
            symbol: BTC/USDT
            type: stop_loss_limit
            time_in_force: GTC
            side: sell
            status: closed
            price: '59000'
            amount: '0.1'
            filled: '0.1'
            remaining: '0'
            average: '59800'
            cost: '5980'
            fee:
              cost: '5.98'
              currency: USDT
              rate: '0.001'
            reduce_only: true
            post_only: false
            trigger_price: '60000'
            stop_loss_price: '59000'
            take_profit_price: '65000'
            placed_at: '2026-08-07T08:00:00Z'
            last_trade_at: '2026-08-07T08:02:00Z'
            terminal_at: '2026-08-07T08:02:00Z'
            terminal_observed_at: '2026-08-07T08:03:00Z'
        meta:
          limit: 50
          next_cursor: null
          has_next: false
          activity_history_collection:
            window_days: 7
            status: complete
          request_id: req_01J2K8B7QW
          generated_at: '2026-08-07T08:03:00Z'
    PlanRequiredResponseSchema:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              required:
                - feature
                - required_plan
                - current_plan
              properties:
                feature:
                  type: string
                required_plan:
                  type: string
                current_plan:
                  type: string
        meta:
          type: object
          required:
            - request_id
            - generated_at
          properties:
            request_id:
              type: string
            generated_at:
              type: string
              format: date-time
      example:
        error:
          code: plan_required
          message: This operation requires an active Plus or Pro subscription.
          details:
            feature: activity_history
            required_plan: Plus
            current_plan: Free
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-08-08T08:00:00Z'
    ErrorEnvelope:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
    Meta:
      type: object
      required:
        - request_id
        - generated_at
      properties:
        request_id:
          type: string
        generated_at:
          type: string
          format: date-time
  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.