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

# Get user orders (v2).



## OpenAPI

````yaml /api-reference/openapi.json get /v2/get-orders/{user_address}
openapi: 3.1.0
info:
  title: BOB Gateway API
  description: BOB Gateway API for Bitcoin swaps
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://gateway-api-mainnet.gobob.xyz
    description: Production
  - url: https://gateway-api-staging.gobob.xyz
    description: Staging
security: []
tags:
  - name: v1
    description: BOB Gateway Core API (v1)
  - name: v2
    description: BOB Gateway Core API (v2)
  - name: v3
    description: BOB Gateway Core API (v3)
paths:
  /v2/get-orders/{user_address}:
    get:
      tags:
        - v2
      summary: Get user orders (v2).
      operationId: get_orders_v2
      parameters:
        - name: user_address
          in: path
          description: User address
          required: true
          schema:
            type: string
        - name: cursor
          in: query
          description: >-
            Cursor used to fetch the next page, obtained from the response's
            `next_cursor`.
          required: false
          schema:
            type: string
          style: form
        - name: limit
          in: query
          description: Number of orders to request
          required: false
          schema:
            type: integer
            minimum: 1
          style: form
      responses:
        '200':
          description: Get orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOrdersResponse'
        '400':
          description: Invalid user address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorV2'
      security:
        - api_key: []
components:
  schemas:
    PaginatedOrdersResponse:
      type: object
      required:
        - orders
      properties:
        nextCursor:
          type:
            - string
            - 'null'
        orders:
          type: array
          items:
            $ref: '#/components/schemas/GatewayOrderInfoV2'
    GatewayErrorV2:
      type: object
      description: >-
        Structured error response for V2 API.

        Contains an error code, human-readable message, and optional structured
        details.
      required:
        - code
        - error
      properties:
        code:
          $ref: '#/components/schemas/GatewayErrorCodeV2'
          description: Stable error code for frontend parsing
        details:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/GatewayErrorDetailsV2'
              description: Optional structured details specific to the error type
        error:
          type: string
          description: Human-readable error message
    GatewayOrderInfoV2:
      type: object
      description: Gateway order info (v2)
      required:
        - id
        - timestamp
        - srcInfo
        - dstInfo
        - status
      properties:
        depositAddress:
          type:
            - string
            - 'null'
        dstInfo:
          $ref: '#/components/schemas/OrderDestinationInfo'
        estimatedTimeInSecs:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        id:
          type: string
        srcInfo:
          $ref: '#/components/schemas/ChainTxInfo'
        status:
          $ref: '#/components/schemas/GatewayOrderStatusV2'
        timestamp:
          type: integer
          format: int64
    GatewayErrorCodeV2:
      oneOf:
        - $ref: '#/components/schemas/GatewayErrorCode'
        - $ref: '#/components/schemas/GatewayErrorCodeV2Variants'
      description: Error codes for V2 API - includes all V1 codes plus new ones.
    GatewayErrorDetailsV2:
      oneOf:
        - type: object
          required:
            - expected
            - actual
          properties:
            actual:
              type: string
            expected:
              type: string
        - type: object
          required:
            - required
            - available
          properties:
            available:
              type: string
            required:
              type: string
        - type: object
          required:
            - total_fees
            - available_amount
          properties:
            available_amount:
              type: string
            total_fees:
              type: string
        - type: object
          properties:
            tenderly_url:
              type:
                - string
                - 'null'
        - type: object
          required:
            - src_chain
            - src_token
            - dst_chain
            - dst_token
          properties:
            dst_chain:
              type: string
            dst_token:
              type: string
            src_chain:
              type: string
            src_token:
              type: string
        - type: object
          required:
            - limit
          properties:
            limit:
              type: string
        - type: 'null'
          default: null
        - type: object
          required:
            - minimum
            - actual
          properties:
            actual:
              type: string
            minimum:
              type: string
        - type: object
          required:
            - limit
            - token
            - chain_id
          properties:
            chain_id:
              type: string
            limit:
              type: string
            token:
              type: string
        - type: object
          required:
            - src_chain
            - src_token
            - dst_chain
            - dst_token
          properties:
            dst_chain:
              type: string
            dst_token:
              type: string
            src_chain:
              type: string
            src_token:
              type: string
        - type: object
          required:
            - message
          properties:
            message:
              type: string
      description: >-
        Structured details for V2 error types - all V1 variants plus V2-only
        ones.


        Kept as a single flat `oneOf` (not nested under V1/V2 wrappers) so
        OpenAPI clients

        (e.g. typescript-fetch) can generate type guards correctly.
    OrderDestinationInfo:
      type: object
      required:
        - chain
        - token
        - amount
      properties:
        amount:
          type: string
          description: >-
            The _estimated_ amount of the output token, as determined by initial
            create-order
        chain:
          type: string
        token:
          type: string
    ChainTxInfo:
      type: object
      required:
        - chain
        - token
        - amount
      properties:
        amount:
          type: string
        chain:
          type: string
        token:
          type: string
        txHash:
          type:
            - string
            - 'null'
    GatewayOrderStatusV2:
      oneOf:
        - type: object
          required:
            - inProgress
          properties:
            inProgress:
              type: object
              properties:
                pending_btc_payment:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/PendingBtcPayment'
                refund_tx:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/TxInfo'
        - type: object
          required:
            - failed
          properties:
            failed:
              type: object
              properties:
                refund_tx:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/TxInfo'
        - type: object
          required:
            - success
          properties:
            success:
              type: object
              required:
                - received_tokens
              properties:
                received_tokens:
                  type: array
                  items:
                    $ref: '#/components/schemas/GatewayUserTokenTransfer'
        - type: object
          required:
            - refunded
          properties:
            refunded:
              type: object
              required:
                - refunded_tokens
              properties:
                refunded_tokens:
                  type: array
                  items:
                    $ref: '#/components/schemas/GatewayUserTokenTransfer'
    GatewayErrorCode:
      type: string
      description: >-
        Error codes for structured error responses that the frontend can parse.

        These codes are stable and should not be changed without coordinating
        with the frontend.
      enum:
        - INSUFFICIENT_AMOUNT
        - QUOTE_AMOUNT_TOO_LOW
        - INSUFFICIENT_SWAP_AMOUNT
        - INSUFFICIENT_SOLVER_BALANCE
        - INSUFFICIENT_PAYMENT_AMOUNT
        - UNABLE_TO_COVER_FEES
        - INSUFFICIENT_CONFIRMED_FUNDS
        - SIMULATION_FAILED
        - GAS_ESTIMATE_FAILED
        - PER_ACCOUNT_LIMIT_EXCEEDED
        - GLOBAL_LIMIT_EXCEEDED
        - EXCEEDED_LIMIT
        - INVALID_REQUEST
        - INVALID_ORDER_ARGS
        - INVALID_AFFILIATE_FEE
        - SLIPPAGE_TOO_LOW
        - SLIPPAGE_TOO_HIGH
        - NO_ROUTE
        - DISABLED_CHAIN
        - INVALID_DESTINATION_CHAIN_ID
        - ORDER_NOT_FOUND
        - ORDER_EXPIRED
        - DUPLICATE_ORDER
        - INTERNAL_ERROR
    GatewayErrorCodeV2Variants:
      type: string
      description: New error codes for V2.
      enum:
        - INVALID_CURSOR
        - INSUFFICIENT_SOLVER_BALANCE
        - AFFILIATE_FEES_NOT_SUPPORTED_FOR_ROUTE
        - UNKNOWN
    PendingBtcPayment:
      type: object
      required:
        - txid
        - amount
      properties:
        amount:
          type: string
        txid:
          type: string
    TxInfo:
      type: object
      required:
        - to
        - data
        - value
        - chain
      properties:
        chain:
          type: string
        data:
          type: string
        to:
          type: string
        value:
          type: string
    GatewayUserTokenTransfer:
      type: object
      required:
        - token
        - amount
        - chain
        - txHash
      properties:
        amount:
          type: string
        chain:
          type: string
        token:
          type: string
        txHash:
          type: string
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````