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

# EUR/USD Forex Ghost Trader Track Record

> Full EUR/USD Forex trade history with derived stats. Paper-trading data; AIOKA EUR/USD runs in paper mode until 10 validated paper trades close.

<Note>
  This endpoint is public -- no API key required. Powers the EUR/USD tab
  on aioka.io/track-record. (Sprint 186 -- first non-crypto, non-commodity
  asset.)
</Note>

**Tier:** Public (no auth)
**Cache:** None
**Read-only:** Pure read of `forex_eurusd_trades` table.

> ⚠️ Paper-trading data. AIOKA EUR/USD Ghost Trader is a simulation in
> Sprint 186. Live capital does not flow through this loop until 10
> validated paper trades have closed AND post-validation approval is
> documented.

## Sprint 186 field-naming convention

This endpoint returns **snake\_case** field names exclusively. No
camelCase aliases.

## Response Fields

### Top-level

| Field    | Type   | Meaning                                               |
| -------- | ------ | ----------------------------------------------------- |
| `trades` | array  | List of closed validated EUR/USD trades, oldest first |
| `stats`  | object | Derived performance statistics                        |

### trades\[i] fields

| Field             | Type           | Meaning                                                       |
| ----------------- | -------------- | ------------------------------------------------------------- |
| `id`              | string         | Trade UUID                                                    |
| `entry_time`      | string         | ISO 8601 entry timestamp                                      |
| `exit_time`       | string         | ISO 8601 exit timestamp                                       |
| `entry_price`     | number         | Entry price (5 dp)                                            |
| `exit_price`      | number         | Exit price (5 dp)                                             |
| `size_units`      | number         | Position size in base-currency units (EUR)                    |
| `pnl_usd`         | number         | Total P\&L in USD (TP1 partial + final exit)                  |
| `pnl_pips`        | number         | Total P\&L in pips (Forex-native unit)                        |
| `pnl_pct`         | number         | P\&L as % of position cost                                    |
| `tp1_pnl_usd`     | number \| null | TP1 partial-sell locked P\&L in USD (null if TP1 didn't fire) |
| `session`         | string \| null | Session label at entry (`LONDON`/`OVERLAP`/`NEW_YORK`)        |
| `spread_at_entry` | number \| null | Live spread in pips at entry fill (Gate 8 audit)              |
| `is_paper`        | bool           | Always `true` until live mode unlocked                        |
| `result`          | string         | `"WIN"` (pnl\_usd > 0) or `"LOSS"`                            |
| `mode`            | string         | Entry mode (`"B"` = Balanced, currently the only mode)        |

### stats fields

| Field                     | Type   | Meaning                                                       |
| ------------------------- | ------ | ------------------------------------------------------------- |
| `total_trades`            | int    | Count of closed validated trades                              |
| `validated_paper_trades`  | int    | Closed validated paper trades (0 -- 10 milestone)             |
| `paper_validation_target` | int    | 10 -- closed validated paper trades required before live mode |
| `win_rate`                | number | Percentage 0 -- 100                                           |
| `total_pnl_usd`           | number | Sum of pnl\_usd across all trades                             |
| `total_pnl_pips`          | number | Sum of pnl\_pips across all trades                            |
| `avg_hold_minutes`        | number | Mean hold duration                                            |
| `best_trade_usd`          | number | Max pnl\_usd                                                  |
| `worst_trade_usd`         | number | Min pnl\_usd                                                  |

## Why P\&L in both pips AND USD?

EUR/USD performance has two natural units:

* **Pips** -- the Forex-native unit. Lets you compare EUR/USD performance
  across days regardless of position size and across pairs (a 30-pip
  EUR/USD trade is comparable in technical-execution terms to a 30-pip
  GBP/USD trade).
* **USD** -- the portfolio-comparable unit. Lets you stack EUR/USD P\&L
  alongside crypto / Gold P\&L on the same scale.

Both are persisted at trade close so analytical tools can pivot on either
without re-deriving from the other.


## OpenAPI

````yaml GET /v1/forex/eurusd/track-record
openapi: 3.1.0
info:
  title: AIOKA Intelligence API
  description: |

    ## AI-powered crypto market intelligence

    AIOKA Intelligence API provides real-time access to our AI Council verdicts,
    market signals, regime detection, and Ghost Trader entry signals.

    ### Tiers
    - **Free**: 100 calls/day — Verdict + Regime
    - **Basic** ($49/mo): 1,000 calls/day — + Signals
    - **Pro** ($199/mo): 10,000 calls/day — + Council + Ghost

    ### Authentication
    Pass your API key in the `X-API-Key` header:

    ```
    X-API-Key: aik_free_xxxxxxxxxxxx
    ```

    ### Get your API key
    `POST /v1/keys/generate` (free tier, no credit card)
  contact:
    name: AIOKA Support
    url: https://docs.aioka.io/
    email: api@aioka.io
  license:
    name: Commercial
    url: https://aioka.io/terms
  version: 1.0.0
servers:
  - url: https://api.aioka.io
    description: Production — AIOKA Intelligence API
security: []
paths:
  /v1/forex/eurusd/track-record:
    get:
      tags:
        - EUR/USD (Forex) Ghost Trader
      summary: EUR/USD Forex Ghost Trader Track Record
      description: |-
        Returns the full EUR/USD trade history with derived performance stats
        (total trades, validated paper trades X/10, win rate, total P&L in
        both USD and pips, avg hold time, best/worst trade in USD).

        Paper-trading data. AIOKA EUR/USD Ghost Trader runs in paper mode until
        10 validated paper trades have closed AND post-validation approval is
        documented.

        **Tier:** Free (no auth)
        **Cache:** None
        **Use:** aioka.io/track-record EUR/USD tab

        Sprint 186 -- field names use snake_case throughout.
      operationId: get_eurusd_track_record_v1_forex_eurusd_track_record_get
      responses:
        '200':
          description: EUR/USD trade history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EURUSDTrackRecordResponse'
        '429':
          description: Rate limit exceeded
      security: []
components:
  schemas:
    EURUSDTrackRecordResponse:
      properties:
        trades:
          items:
            $ref: '#/components/schemas/EURUSDTrackRecordTrade'
          type: array
          title: Trades
        stats:
          $ref: '#/components/schemas/EURUSDTrackRecordStats'
      type: object
      required:
        - stats
      title: EURUSDTrackRecordResponse
    EURUSDTrackRecordTrade:
      properties:
        id:
          type: string
          title: Id
        entry_time:
          type: string
          title: Entry Time
        exit_time:
          type: string
          title: Exit Time
        entry_price:
          type: number
          title: Entry Price
        exit_price:
          type: number
          title: Exit Price
        size_units:
          type: number
          title: Size Units
        pnl_usd:
          type: number
          title: Pnl Usd
        pnl_pips:
          type: number
          title: Pnl Pips
        pnl_pct:
          type: number
          title: Pnl Pct
          description: P&L as % of position cost (USD-based).
        tp1_pnl_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Tp1 Pnl Usd
        session:
          anyOf:
            - type: string
            - type: 'null'
          title: Session
        spread_at_entry:
          anyOf:
            - type: number
            - type: 'null'
          title: Spread At Entry
        is_paper:
          type: boolean
          title: Is Paper
        result:
          type: string
          title: Result
          description: '"WIN" or "LOSS".'
        mode:
          type: string
          title: Mode
      type: object
      required:
        - id
        - entry_time
        - exit_time
        - entry_price
        - exit_price
        - size_units
        - pnl_usd
        - pnl_pips
        - pnl_pct
        - is_paper
        - result
        - mode
      title: EURUSDTrackRecordTrade
    EURUSDTrackRecordStats:
      properties:
        total_trades:
          type: integer
          title: Total Trades
        validated_paper_trades:
          type: integer
          title: Validated Paper Trades
        paper_validation_target:
          type: integer
          title: Paper Validation Target
          description: Closed validated paper trades required before live mode.
          default: 10
        win_rate:
          type: number
          title: Win Rate
          description: Percentage 0-100.
        total_pnl_usd:
          type: number
          title: Total Pnl Usd
        total_pnl_pips:
          type: number
          title: Total Pnl Pips
        avg_hold_minutes:
          type: number
          title: Avg Hold Minutes
        best_trade_usd:
          type: number
          title: Best Trade Usd
        worst_trade_usd:
          type: number
          title: Worst Trade Usd
      type: object
      required:
        - total_trades
        - validated_paper_trades
        - win_rate
        - total_pnl_usd
        - total_pnl_pips
        - avg_hold_minutes
        - best_trade_usd
        - worst_trade_usd
      title: EURUSDTrackRecordStats

````