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

# Get User Orders

> This endpoint retrieves the list of orders placed by the user, with optional filtering based on specific query parameters like userId.



## OpenAPI

````yaml /api_reference/onramp.yaml get /orders
openapi: 3.0.3
info:
  version: '1.0'
  title: Crypto API
  description: Reference for Sardine Crypto API
  contact:
    email: support@sardine.io
    name: Sardine
    url: docs.sardine.io
servers:
  - url: https://api.sandbox.sardine.ai/v1
    description: Sandbox
  - url: https://api.sardine.ai/v1
    description: Prod Server
security: []
paths:
  /orders:
    get:
      tags:
        - Order
      summary: Get User Orders
      description: >-
        This endpoint retrieves the list of orders placed by the user, with
        optional filtering based on specific query parameters like userId.
      operationId: get-user-orders
      parameters:
        - name: userId
          in: query
          required: true
          description: The ID of the user whose orders are being retrieved
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: Filter orders by status (e.g., pending, completed)
          schema:
            type: string
        - name: fromDate
          in: query
          required: false
          description: Filter orders created after this date (ISO 8601 format)
          schema:
            type: string
            format: date-time
        - name: toDate
          in: query
          required: false
          description: Filter orders created before this date (ISO 8601 format)
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Successfully retrieved user orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        orderId:
                          type: string
                          description: Unique identifier for the order
                        fromCurrency:
                          type: string
                          description: The cryptocurrency involved in the order (e.g., ETH)
                        toCurrency:
                          type: string
                          description: The fiat currency for the transaction (e.g., USD)
                        amount:
                          type: number
                          description: Amount of cryptocurrency involved
                        status:
                          type: string
                          description: >-
                            The current status of the order (e.g., pending,
                            completed)
                        createdAt:
                          type: string
                          format: date-time
                          description: The timestamp when the order was created
              examples:
                example-1:
                  value:
                    orders:
                      - orderId: OFF-20250417-001
                        fromCurrency: ETH
                        toCurrency: USD
                        amount: 0.05
                        status: pending
                        createdAt: '2025-04-17T10:00:00Z'
                      - orderId: OFF-20250416-002
                        fromCurrency: BTC
                        toCurrency: USD
                        amount: 0.2
                        status: completed
                        createdAt: '2025-04-16T14:30:00Z'

````