POSTExchangeCreate

Tron Mainnethttps://tron-mainnet.nodit.io/wallet/exchangecreate

Create a transaction that opens a new exchange pair. Both tokens must be injected with equal value, and a creation fee applies.

Request Body
owner_addressstringrequired

Transaction initiator address. (Format: Base58 or Hex)

first_token_idstringrequired

ID of the first token. Use _ for TRX.

first_token_balanceinteger (int64)required

Amount of the first token to inject.

second_token_idstringrequired

ID of the second token. Use _ for TRX.

second_token_balanceinteger (int64)required

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.

X-API-KEY
RequestCU30
cURL
curl -X POST "https://tron-mainnet.nodit.io/wallet/exchangecreate" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "owner_address": "TUoHaVjx7n5xz8LwPRDckgFrDWhMhuSuJM",
  "first_token_id": "_",
  "first_token_balance": 100000000,
  "second_token_id": "1002000",
  "second_token_balance": 100000000,
  "visible": true
}'
Response
Example · 200
{
  "txID": "string",
  "raw_data": {},
  "raw_data_hex": "string",
  "visible": true
}