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

# Start trade (browser)

This endpoint is ideal for low-code integrations, and can be used in place of [`Fetch Trade URL`](/api-reference/onboard-connect/orders/fetch-trade-url), which returns the trade url in JSON.

Instead, the `Start trade` endpoint automatically resolves to the trade URL, and is best used to initiate trades within a browser or webview.

To initiate orders natively via the API, use:

* [/transactions/v2/onramp/initiate](/api-reference/onboard-connect/orders/initiate-onramp-order) for onramp transactions
* [/transactions/v2/offramp/initiate](\(/api-reference/onboard-connect/orders/initiate-offramp-order\)) for offramp transactions


## OpenAPI

````yaml get /exchange/orders/trade
openapi: 3.0.3
info:
  version: 2.1.0
  title: Onboard External API Gateway
  description: >-
    **Introduction**

    API Gateway for Onboard


    This specification describes API endpoints that are available to the public
    internet via the API gateway. The different endpoints require different
    authentication schemes, see documentation for what applies to the operation
    you want to access.


    **Errors**

    Uses conventional HTTP response codes to indicate success or failure. In

    general:
     
    - `2xx` status codes indicate success. Codes in the

    - `4xx` range

    indicate a client error (e.g. required parameters, failed request etc.).

    - `5xx` status codes indicate a server error occurred.
  contact:
    name: Nestcoin TechOps
    email: techops@nestcoin.com
  license:
    name: UNLICENSED
servers:
  - url: https://external.dev.onboardpay.co
    description: Gateway for external API on staging environment.
security: []
tags:
  - name: users-onboardapi
    description: Endpoints available to for merchants liquidity automation
  - name: users-users
    description: User related endpoints
  - name: users-partners
    description: Partner related endpoints
  - name: users-admin
    description: Back office related endpoints
  - name: users-user2fa
    description: User 2fa related endpoints
  - name: users-usernotifications
    description: User notifications related endpoints
  - name: users-merchantnetwork
    description: Merchant network endpoints
  - name: users-userauth
    description: Authentication endpoints
  - name: users-userservice
    description: Service endpoints
  - name: users-webhook
    description: webhook endpoints
paths:
  /exchange/orders/trade:
    get:
      tags:
        - exchange-orders
        - exchange-external-api
      summary: Start a trade
      operationId: createOrder
      parameters:
        - name: apiKey
          in: query
          description: CEX api key
          required: true
          schema:
            type: string
        - name: product
          in: query
          description: Integration product in use e.g web3 or custodial
          required: true
          schema:
            $ref: '#/components/schemas/CreateOrderProductEnum'
        - name: orderId
          in: query
          description: Order ID generated for offramp trades
          schema:
            type: string
        - name: tradeType
          in: query
          description: Type of trade
          required: true
          schema:
            $ref: '#/components/schemas/CreateOrderTradeTypeEnum'
        - name: fiat
          in: query
          description: Symbol of fiat currency
          required: true
          schema:
            type: string
        - name: fiatAmount
          in: query
          description: Fiat amount
          schema:
            type: number
        - name: token
          in: query
          description: Symbol of token asset
          required: true
          schema:
            type: string
        - name: tokenAmount
          in: query
          description: Token amount
          schema:
            type: number
        - name: networkId
          in: query
          description: >-
            Onboard blockchain network identifier or chain Id e.g Base will be
            `base` or `8453` or `0x2105`
          schema:
            type: string
        - name: address
          in: query
          description: Wallet address to be debited/credited in order
          schema:
            type: string
        - name: paymentChannel
          in: query
          description: Payment channel
          schema:
            type: string
        - name: email
          in: query
          description: Customer's email address
          schema:
            type: string
        - name: autoselect
          in: query
          description: Offer auto select flag
          schema:
            type: boolean
            default: true
      responses:
        '301':
          description: Redirect
          content: {}
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
      security: []
components:
  schemas:
    CreateOrderProductEnum:
      type: string
      enum:
        - WEB3
        - CUSTODIAL
    CreateOrderTradeTypeEnum:
      type: string
      enum:
        - BUY
        - SELL
    ErrorMessageDto:
      description: >-
        Default error object for services. This gives consistent error object
        that all services may use.
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code
          example: UNKNOWN_ERROR
        message:
          type: string
          description: Descriptive error message
          example: Request could not be completed due to an error
        data:
          type: object
          description: Additional data for this error message.
          additionalProperties: true
          properties: {}
      x-common-model: ErrorMessageDto

````