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

# wallet/exchangecreate | TRON

> TRON API method that creates a new trading pair on the TRON decentralized exchange with initial liquidity provision. Returns a transaction object containing:.

TRON API method that creates a new trading pair on the TRON decentralized exchange with initial liquidity provision.

## Parameters

* `owner_address` — the address that will own and control the exchange pair (base58 with `visible: true`, or hex with `visible: false`).
* `first_token_id` — TRC10 token ID of the first token in the trading pair.
* `first_token_balance` — initial amount for the first token as an integer (token base units).
* `second_token_id` — TRC10 token ID of the second token; use `_` to denote TRX.
* `second_token_balance` — initial amount for the second token as an integer (if TRX, specify in sun).
* `permission_id` — optional permission ID for multi‑signature accounts.

## Response

Returns a transaction object containing:

* `txID` — unique transaction identifier
* `raw_data` — raw transaction data including contract details
* `raw_data_hex` — hexadecimal representation of raw transaction data

## Use case

The `wallet/exchangecreate` method is used for:

* Creating new trading pairs on the TRON decentralized exchange
* Establishing initial liquidity pools for token pairs
* Launching new markets for custom tokens
* Setting up automated market maker (AMM) pools with initial pricing

## curl example

```shell Shell theme={"system"}
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/exchangecreate' \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH",
  "first_token_id": "1000001",
  "first_token_balance": 1000000000000,
  "second_token_id": "_",
  "second_token_balance": 5000000000,
  "visible": true
}'
```

<Info>
  * balances must be integers (do not quote numbers). When the second token is TRX (denoted by `_`), provide `second_token_balance` in sun (1 TRX = 1,000,000 sun).
  * use `_` for TRX or a TRC10 token ID string for both sides to create TRC10–TRC10 pairs.
  * the call builds an unsigned transaction; you must sign and broadcast it. On mainnet, additional on‑chain validations apply (token existence, ownership, pair uniqueness, sufficient balances).
</Info>


## OpenAPI

````yaml openapi/tron_node_api/exchangecreate.json post /95e61622bf6a8af293978377718e3b77/wallet/exchangecreate
openapi: 3.0.0
info:
  title: TRON API
  version: 1.0.0
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/exchangecreate:
    post:
      summary: Create a new exchange trading pair
      description: >-
        Creates a new trading pair on the TRON decentralized exchange with
        initial liquidity provision
      operationId: exchangeCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - owner_address
                - first_token_id
                - first_token_balance
                - second_token_id
                - second_token_balance
              properties:
                owner_address:
                  type: string
                  description: The address that will own and control the exchange pair
                first_token_id:
                  type: string
                  description: Token ID of the first token in the trading pair
                first_token_balance:
                  type: integer
                  description: >-
                    Initial balance to provide for the first token (integer
                    amount in the token's base units)
                second_token_id:
                  type: string
                  description: >-
                    Token ID of the second token in the trading pair. Use '_' to
                    denote TRX.
                second_token_balance:
                  type: integer
                  description: >-
                    Initial balance to provide for the second token (integer
                    amount; if TRX, specify in sun)
                permission_id:
                  type: integer
                  description: Optional permission ID for multi-signature accounts
                visible:
                  type: boolean
                  description: Whether to return human-readable addresses
                  default: false
            examples:
              default:
                summary: Create TRC10–TRX exchange pair
                value:
                  owner_address: TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH
                  first_token_id: '1000001'
                  first_token_balance: 1000000000000
                  second_token_id: _
                  second_token_balance: 5000000000
                  visible: true
      responses:
        '200':
          description: Successful response with transaction details
          content:
            application/json:
              schema:
                type: object
                properties:
                  txID:
                    type: string
                    description: Unique transaction identifier
                  raw_data:
                    type: object
                    description: Raw transaction data including contract details
                    properties:
                      contract:
                        type: array
                        items:
                          type: object
                          properties:
                            parameter:
                              type: object
                              properties:
                                value:
                                  type: object
                                  properties:
                                    owner_address:
                                      type: string
                                    first_token_id:
                                      type: string
                                    first_token_balance:
                                      type: string
                                    second_token_id:
                                      type: string
                                    second_token_balance:
                                      type: string
                                type_url:
                                  type: string
                            type:
                              type: string
                      ref_block_bytes:
                        type: string
                      ref_block_hash:
                        type: string
                      expiration:
                        type: integer
                      timestamp:
                        type: integer
                  raw_data_hex:
                    type: string
                    description: Hexadecimal representation of raw transaction data
              examples:
                success:
                  summary: Successful response
                  value:
                    txID: >-
                      f7d5c2e8a1b9f3d4c5e6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8
                    raw_data:
                      contract:
                        - parameter:
                            value:
                              owner_address: TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH
                              first_token_id: '1000001'
                              first_token_balance: '1000000000000'
                              second_token_id: _
                              second_token_balance: '5000000000'
                            type_url: >-
                              type.googleapis.com/protocol.ExchangeCreateContract
                          type: ExchangeCreateContract
                      ref_block_bytes: ab90
                      ref_block_hash: f5d4c3b2a1
                      expiration: 1672531260000
                      timestamp: 1672531200000
                    raw_data_hex: >-
                      0a02ab901220f5d4c3b2a140e0b8e2f6e30f5a68081112620a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e45786368616e6765437265617465436f6e747261637412280a154c7971797a56474c5631737266b7dd4afc8eagg61534522083131306b30303131
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  Error:
                    type: string
              examples:
                error:
                  summary: Error response
                  value:
                    Error: Invalid token balance or insufficient funds

````