Skip to main content
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
marketsellasset
wallet/marketsellasset
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/marketsellasset \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC",
  "sell_token_id": "1000006",
  "sell_token_quantity": 1000000,
  "buy_token_id": "1002000",
  "buy_token_quantity": 1000000,
  "visible": true
}'
{
  "visible": true,
  "txID": "<string>",
  "raw_data": {
    "contract": [
      "<any>"
    ],
    "ref_block_bytes": "<string>",
    "ref_block_hash": "<string>",
    "expiration": 123,
    "timestamp": 123
  },
  "raw_data_hex": "<string>"
}
TRON API method that creates a transaction to place a market buy order on the legacy TRON DEX.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • owner_address — address of the account placing the buy order (base58 with visible: true, or hex with visible: false).
  • sell_token_id — TRC10 token ID of the asset offered, as a numeric string.
  • sell_token_quantity — integer amount to offer (token base units; if TRX, sun).
  • buy_token_id — TRC10 token ID of the asset to purchase, as a numeric string.
  • buy_token_quantity — integer desired amount to purchase (token base units; if TRX, sun).

Response

  • visible — boolean indicating whether addresses are in visible format
  • txID — unique transaction ID for the buy order transaction
  • raw_data — raw transaction data containing:
    • contract — array with market buy order contract details
    • ref_block_bytes — reference block bytes for transaction validation
    • ref_block_hash — hash of the reference block
    • expiration — transaction expiration timestamp
    • timestamp — transaction creation timestamp
  • raw_data_hex — complete transaction data encoded in hexadecimal format

Use case

The wallet/marketbuyasset method is used for:
  • Creating buy orders to acquire tokens at desired prices.
  • Providing demand liquidity to the TRON DEX marketplace.
  • Implementing automated token acquisition strategies.
  • Building custom trading bots and arbitrage systems.
  • Enabling decentralized token exchange without centralized intermediaries (legacy orderbook).

curl example

Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/marketbuyasset' \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "THPvaUhoh2Qn2y9THCZML3H815hhFhn5YC",
  "sell_token_id": "1000006",
  "sell_token_quantity": 100000000,
  "buy_token_id": "1002000",
  "buy_token_quantity": 1000000,
  "visible": true
}'
This is a legacy market endpoint and may be disabled on some mainnet nodes. If you receive HTTP 405 or similar, use the AMM endpoints instead: exchangecreate, exchangeinject, exchangetransaction, and exchangewithdraw.

Body

application/json
owner_address
string
required

Account address placing the sell order

sell_token_id
string
required

Token ID being sold (empty string for TRX)

sell_token_quantity
integer
required

Quantity of tokens to sell (integer in token base units; if TRX, sun)

buy_token_id
string
required

Token ID desired in exchange (empty string for TRX)

buy_token_quantity
integer
required

Quantity of tokens desired in exchange (integer in token base units; if TRX, sun)

visible
boolean
default:true

When true, addresses are base58; when false, hex.

Response

200 - application/json

Market sell order transaction

visible
boolean

Whether addresses are in visible format

txID
string

Transaction ID for sell order

raw_data
object
raw_data_hex
string

Raw transaction data in hex format