Skip to main content

/wallet/exchangecreate REST API Endpoint

Creates a trading pair.

Updated on
Oct 4, 2023

/wallet/exchangecreate REST API Endpoint

Please note that the successful execution, signing, and broadcast of this API call will deduct 1024 TRX from the user's account.

Body Parameters

owner_address
string
REQUIRED
The TRON address of the owner initiating the exchange creatio
first_token_id
string
REQUIRED
The token ID of the first token involved in the exchange. It identifies the specific token that the owner wants to exchange
first_token_balance
integer
REQUIRED
The balance or amount of the first token that the owner has available for the exchange
second_token_id
integer
REQUIRED
The token ID of the second token involved in the exchange. It identifies the specific token that the owner wants to receive in exchange for the first token
second_token_balance
integer
REQUIRED
The balance or amount of the second token that the owner has available for the exchange
visible
boolean
A boolean value indicating whether the address is in base58 format
permission_id
integer
The ID of the permission that is required to execute the transaction

Returns

result
A boolean value indicating whether the exchange creation transaction was successful
message
The description of the result of the exchange creation
txID
The transaction ID of the exchange creation transaction
Request
1
curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/exchangecreate \
2
--header 'accept: application/json' \
3
--header 'content-type: application/json' \
4
--data '
5
{
6
"owner_address": "OWNER_ADDRESS",
7
"first_token_id": "FIRST_TOKEN_ID",
8
"first_token_balance": 100,
9
"second_token_id": "SECOND_TOKEN_ID",
10
"second_token_balance": 100,
11
"visible": true
12
}
13
'
14
15
16
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free