# Trades As CSV

This endpoint downloads the customer's complete trade history as a CSV file.
This is useful for record-keeping and analysis and can be filtered by `account` and a trade datetime range.

Endpoint: GET /api/v1/trades.csv
Version: Version: 970cd0fc
Security: CodeBearer

## Security:

  - `CodeBearer` (unknown)
    oauth2 scopes: pockets.read

## Query parameters:

  - `book_date_from` (any)
    Filters the resulting trade list by book date from the provided ISO8601 date, inclusively

  - `book_date_to` (any)
    Filters the resulting trade list by book date to the provided ISO8601 date, inclusively

  - `settlement_date_from` (any)
    Filters the resulting trade list by settlement date from the provided ISO8601 date, inclusively

  - `settlement_date_to` (any)
    Filters the resulting trade list by settlement date to the provided ISO8601 date, inclusively

  - `account[]` (any)

  - `trade_datetime_from` (any)

  - `trade_datetime_to` (any)

## Response 200:

  - `200` (unknown)
    Successful Response

## Response 200 fields (application/json):

  - `prev_page` (any)

  - `next_page` (any)

  - `items` (array, required)

  - `items.id` (string, required)

  - `items.trade_datetime` (string, required)

  - `items.settled_date` (any, required)

  - `items.is_settled` (boolean, required)

  - `items.activity` (string, required)
    Enum: "BUY", "SELL", "MATURITY"

  - `items.cusip` (string, required)

  - `items.description` (string, required)

  - `items.notional` (object, required)

  - `items.notional.value` (integer, required)
    USD values are always in cents.

  - `items.notional.currency` (string, required)

  - `items.notional.formatted` (string)

  - `items.quantity` (integer, required)

  - `items.price` (string, required)

  - `items.maturity_date` (string, required)

  - `items.jiko_account_id` (string, required)

  - `items.tradable_id` (string, required)

  - `items.book_date` (string, required)

  - `items.object_type` (string, required)

  - `object_type` (string)

## Response 404:

  - `404` (unknown)
    Not found

## Response 422:

  - `422` (unknown)
    Validation Error

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array, required)

  - `detail.msg` (string, required)

  - `detail.type` (string, required)

  - `detail.input` (any)

  - `detail.ctx` (object)

