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

# Export orders as CSV

> Exports orders as a CSV file and sends it to the specified email address. This is an asynchronous operation that returns immediately with a 202 status.



## OpenAPI

````yaml post /api/orders/export
openapi: 3.0.0
info:
  version: v1.0.0
  title: Orders API
  description: API for managing orders in the Rio platform
servers:
  - url: https://app.sandbox.rio.trade
security:
  - apiKeyAuth: []
paths:
  /api/orders/export:
    post:
      summary: Export orders as CSV
      description: >-
        Exports orders as a CSV file and sends it to the specified email
        address. This is an asynchronous operation that returns immediately with
        a 202 status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                  description: Email address to send the CSV file to
                  example: user@example.com
                id:
                  type: string
                  description: Order id by which you want to filter
                  example: b49f4084b96e4fb76f5a496e
                userId:
                  type: string
                  description: User id by which you want to filter
                  example: b49f4084b96e4fb76f5a496e
                brokerId:
                  type: string
                  description: Broker id by which you want to filter
                  example: b49f4084b96e4fb76f5a496e
                startDate:
                  type: string
                  format: date-time
                  description: Start date for filtering orders
                  example: '2024-01-01T00:00:00.000Z'
                endDate:
                  type: string
                  format: date-time
                  description: End date for filtering orders
                  example: '2024-01-31T23:59:59.999Z'
                fiat:
                  type: string
                  description: Fiat currency by which you want to filter
                  example: MXN
                crypto:
                  type: string
                  description: Crypto currency by which you want to filter
                  example: USDC
                side:
                  type: string
                  enum:
                    - Buy
                    - Sell
                  description: Order side by which you want to filter
                status:
                  type: string
                  description: Order status by which you want to filter
                  example: completed
                country:
                  type: string
                  description: Country by which you want to filter
                  example: Mexico
                minOrderSize:
                  type: number
                  minimum: 0
                  description: Minimum order size to filter by
                  example: 100
                maxOrderSize:
                  type: number
                  minimum: 0
                  description: Maximum order size to filter by
                  example: 10000
                orderStatusGroups:
                  type: array
                  items:
                    type: string
                  description: Array of order status groups to filter by
                  example:
                    - completed
                    - processing
      responses:
        '202':
          description: Export request accepted. CSV will be sent to the provided email.
        '400':
          description: Bad request - invalid parameters
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Internal server error
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````