Skip to main content

ExchangeCreate

POST

Create a transaction that opens a new exchange pair. Both tokens must be injected with equal value, and a creation fee applies.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
Request Body
owner_addressstringrequired
Transaction initiator address. (Format: Base58 or Hex)
first_token_idstringrequired
ID of the first token. Use _ for TRX.
first_token_balanceintegerrequired
Amount of the first token to inject.
second_token_idstringrequired
ID of the second token. Use _ for TRX.
second_token_balanceintegerrequired
Amount of the second token to inject.
visibleboolean
Optional. Set to true to format addresses in Base58; set to false for hex format. (Default: false)
Permission_idinteger
Optional. Permission ID used for multi-signature account operations. Defaults to the owner permission (0) if unspecified.
Responses
txIDstring
Transaction ID (hash).
raw_dataobject
The transaction raw_data (contract, ref_block_*, expiration, etc.).
raw_data_hexstring
Hex-encoded protobuf of raw_data.
visibleboolean
Echoes back the visible value given in the request.
cURL
curl -X POST 'https://tron-mainnet.nodit.io/wallet/exchangecreate' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"owner_address": "TUoHaVjx7n5xz8LwPRDckgFrDWhMhuSuJM",
"first_token_id": "_",
"second_token_id": "_"
}'