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

# Get completed round-trip trades (server-derived)

> The trader's completed round-trip trades — one row per position episode (open-from-flat to back-to-flat), newest exit first. Scale-ins and scale-outs are merged into the episode's single trade. Render these rows as-is rather than re-pairing fills yourself.

**Semantics:**
- Trades are paired per account and contract (exact full contract symbols, e.g. `NQU6` and `MNQU6` are distinct).
- LIFO matching — a close pairs with the newest open lot.
- A flatten or liquidation always ends the episode.
- `pnl`/`gross_pnl` are gross; `fee` and `commission` are reported separately so clients can present net if preferred.
- `duration_formatted` reports sub-second round trips (e.g. an instant liquidation) as `<1s`.
- Positions still open at query time are not included (the round trip isn't complete yet).
- Orders can fill in several executions at different prices. The journal uses each order's executed quantity and volume-weighted average fill price; executed contracts still count when the rest of the order was cancelled.

**Example — partner session token:**
```bash
curl "https://api.hyperprop.com/platform/v1/user/trading/trades?since=2026-07-01T00:00:00Z" \
  -H "Authorization: Bearer <partner-session-token>"
```

**Example — partner app, with API key headers:**
```bash
curl "https://api.hyperprop.com/platform/v1/user/trading/trades?since=2026-07-01T00:00:00Z" \
  -H "X-Partner-App-Id: your-app-uuid" \
  -H "X-Partner-App-Secret: your-app-secret" \
  -H "X-Trader-Api-Key: hpk_the_traders_key" \
  -H "X-Trader-Email: trader@example.com"
```

**Partner access (read-only).** Approved partner apps can read a trader's journal on the trader's behalf, in either of two ways:

- **API key headers** — send `X-Partner-App-Id`, `X-Partner-App-Secret` and the trader's key in `X-Trader-Api-Key`. Optionally add `X-Trader-Email` (must match the key's owner) and `X-Partner-Firm` (limits results to one firm).
- **Partner session token** — send the token from `POST /trade/partner/session` as `Authorization: Bearer <token>`. A token created for one firm only returns that firm's accounts.

Without a firm, results cover the trader's accounts at every firm. Partner access is read-only: it works on the journal endpoints only. A bad app secret, trader key or email returns `401`; a firm where the trader has no accounts returns `403`; repeated failures return `429`.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/user/trading/trades
openapi: 3.0.0
info:
  title: Hyperprop Platform API
  version: 1.0.0
  description: >-
    REST API for the Hyperprop Trading Platform — provision evaluation and
    funded trading accounts, manage traders and plans, react to account
    lifecycle events via signed webhooks, and reconcile billing. Built for prop
    firms integrating from their own backend.


    Authentication, quick start, error handling, idempotency, pagination, custom
    metadata, webhooks, and the MCP connector are documented at
    https://docs.hyperprop.com.
  x-logo:
    url: https://app.hyperprop.com/logo-icon.svg
    altText: Hyperprop
    href: https://hyperprop.com
servers:
  - url: https://api.hyperprop.com/platform
    description: Production
security: []
tags:
  - name: Trading accounts
    description: Create, update, and inspect trading accounts.
  - name: Traders
    description: Look up and update the traders in your organization.
  - name: Trading plans
    description: Define the plans you sell.
  - name: Trading rules
    description: Define how accounts are evaluated.
  - name: Lockouts
    description: Pause and resume trading on an account.
  - name: Payouts
    description: Check payout eligibility and record payouts.
  - name: Purchases
    description: Purchases recorded for your organization.
  - name: Time Machine
    description: Restore accounts to an earlier trading day or instant.
  - name: Webhooks
    description: Register webhook endpoints and inspect deliveries.
  - name: Events
    description: Your organization's event history and real-time event stream.
  - name: Reconciliation
    description: Balances, end-of-day snapshots, and fills for reconciliation.
  - name: Analytics
    description: Organization performance and plan economics.
  - name: Billing
    description: 'Your Hyperprop bill: activity, billing cycles, and forecasts.'
  - name: Team and roles
    description: Manage dashboard access for your staff.
  - name: API keys
    description: Manage your organization's API key.
  - name: Logs and health
    description: API request logs, the audit log, and integration health.
  - name: Organization profile
    description: Your organization's profile and logo.
  - name: Support
    description: Open and follow up on support tickets.
  - name: Partner access
    description: >-
      Read a trader's journal as an approved partner app, with the trader's own
      key.
paths:
  /v1/user/trading/trades:
    get:
      tags:
        - Partner access
      summary: Get completed round-trip trades (server-derived)
      description: >-
        The trader's completed round-trip trades — one row per position episode
        (open-from-flat to back-to-flat), newest exit first. Scale-ins and
        scale-outs are merged into the episode's single trade. Render these rows
        as-is rather than re-pairing fills yourself.


        **Semantics:**

        - Trades are paired per account and contract (exact full contract
        symbols, e.g. `NQU6` and `MNQU6` are distinct).

        - LIFO matching — a close pairs with the newest open lot.

        - A flatten or liquidation always ends the episode.

        - `pnl`/`gross_pnl` are gross; `fee` and `commission` are reported
        separately so clients can present net if preferred.

        - `duration_formatted` reports sub-second round trips (e.g. an instant
        liquidation) as `<1s`.

        - Positions still open at query time are not included (the round trip
        isn't complete yet).

        - Orders can fill in several executions at different prices. The journal
        uses each order's executed quantity and volume-weighted average fill
        price; executed contracts still count when the rest of the order was
        cancelled.


        **Example — partner session token:**

        ```bash

        curl
        "https://api.hyperprop.com/platform/v1/user/trading/trades?since=2026-07-01T00:00:00Z"
        \
          -H "Authorization: Bearer <partner-session-token>"
        ```


        **Example — partner app, with API key headers:**

        ```bash

        curl
        "https://api.hyperprop.com/platform/v1/user/trading/trades?since=2026-07-01T00:00:00Z"
        \
          -H "X-Partner-App-Id: your-app-uuid" \
          -H "X-Partner-App-Secret: your-app-secret" \
          -H "X-Trader-Api-Key: hpk_the_traders_key" \
          -H "X-Trader-Email: trader@example.com"
        ```


        **Partner access (read-only).** Approved partner apps can read a
        trader's journal on the trader's behalf, in either of two ways:


        - **API key headers** — send `X-Partner-App-Id`, `X-Partner-App-Secret`
        and the trader's key in `X-Trader-Api-Key`. Optionally add
        `X-Trader-Email` (must match the key's owner) and `X-Partner-Firm`
        (limits results to one firm).

        - **Partner session token** — send the token from `POST
        /trade/partner/session` as `Authorization: Bearer <token>`. A token
        created for one firm only returns that firm's accounts.


        Without a firm, results cover the trader's accounts at every firm.
        Partner access is read-only: it works on the journal endpoints only. A
        bad app secret, trader key or email returns `401`; a firm where the
        trader has no accounts returns `403`; repeated failures return `429`.
      operationId: getV1UserTradingTrades
      parameters:
        - description: >-
            `Bearer <token>`: the trader's own session, or a partner session
            token from `POST /trade/partner/session`
          name: authorization
          in: header
          required: false
          schema:
            type: string
        - description: 'Partner access: your partner app id'
          x-format:
            guid: true
          name: x-partner-app-id
          in: header
          required: false
          schema:
            type: string
        - description: 'Partner access: your partner app secret (server-side only)'
          name: x-partner-app-secret
          in: header
          required: false
          schema:
            type: string
        - description: 'Partner access: the trader''s API key (`hpk_...`)'
          name: x-trader-api-key
          in: header
          required: false
          schema:
            type: string
        - description: >-
            Partner access, optional: the trader's sign-in email; must match the
            key's owner
          x-format:
            email: true
          name: x-trader-email
          in: header
          required: false
          schema:
            type: string
        - description: >-
            Partner access, optional: organization id, slug or name; limits
            results to the trader's accounts at that firm
          name: x-partner-firm
          in: header
          required: false
          schema:
            type: string
        - description: >-
            Restrict to one trading account (default: all of the user's
            accounts)
          x-format:
            guid: true
          name: accountId
          in: query
          required: false
          schema:
            type: string
        - description: >-
            Only trades whose exit is at/after this time (for incremental
            refreshes)
          name: since
          in: query
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Completed trades
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model399'
        '400':
          description: Unknown firm
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model400'
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model9'
        '403':
          description: No accounts at this firm for this trader
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model401'
        '429':
          description: Too many failed attempts; retry in a minute
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model402'
        '500':
          description: An unexpected error occurred
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model5'
components:
  schemas:
    Model399:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Model398'
    Model400:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: Unknown firm
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: BAD_REQUEST
    Model9:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication required
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: UNAUTHORIZED
    Model401:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: No accounts at this firm for this trader
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: FORBIDDEN
    Model402:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 429
        error:
          type: string
          example: Too Many Requests
        message:
          type: string
          example: Too many failed attempts; retry in a minute
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: TOO_MANY_REQUESTS
    Model5:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: Internal Server Error
        message:
          type: string
          example: An unexpected error occurred
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: INTERNAL_ERROR
    Model398:
      type: object
      properties:
        trades:
          $ref: '#/components/schemas/trades'
        total:
          type: number
          example: 15
        generatedAt:
          type: string
          example: '2026-07-15T19:20:00.000Z'
    trades:
      type: array
      items:
        $ref: '#/components/schemas/Model397'
    Model397:
      type: object
      properties:
        id:
          type: string
          example: trade-31023653-a76ea170
        account_id:
          type: string
        contract:
          type: string
          example: NQU6
        product:
          type: string
          example: CME
        symbol:
          type: string
          example: NQ
        side:
          $ref: '#/components/schemas/Model396'
        entry_order_id:
          type: string
        entry_price:
          type: number
          example: 29771.25
        entry_time:
          type: string
          example: '2026-07-13T10:00:22.498Z'
        exit_order_id:
          type: string
        exit_price:
          type: number
          example: 29774
        exit_time:
          type: string
          example: '2026-07-13T10:00:35.260Z'
        entry_order_ids:
          $ref: '#/components/schemas/entry_order_ids'
        exit_order_ids:
          $ref: '#/components/schemas/exit_order_ids'
        position_group:
          type: string
          description: account:contract:episode key
        quantity:
          type: number
          example: 1
        duration_ms:
          type: number
          example: 12762
        duration_formatted:
          type: string
          example: 12s
        pnl:
          type: number
          description: Gross realized P&L
          example: 55
        gross_pnl:
          type: number
          example: 55
        pnl_ticks:
          type: number
          example: 11
        pnl_percent:
          type: number
          example: 0.0092
        fee:
          type: number
          example: 3
        commission:
          type: number
          example: 0
    Model396:
      type: string
      enum:
        - long
        - short
    entry_order_ids:
      type: array
      items:
        type: string
    exit_order_ids:
      type: array
      items:
        type: string

````

## Related topics

- [Get traders for your organization](/platform-api/traders/get-traders-for-your-organization.md)
- [Send a test event](/platform-api/webhooks/send-a-test-event.md)
- [Get your organization profile](/platform-api/organization-profile/get-your-organization-profile.md)
- [Introduction](/introduction.md)
- [Partner integrations](/guides/partner-integrations.md)


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