Prepare Deposit

Builds deposit transaction data for client-side signing with TronLink or TronWeb. Returns the platform deposit address, a unique user memo, and the hex-encoded memo for embedding in the transaction data field.

POST/api/v1/deposit/prepareRequires authentication
Programmatic deposits only
This endpoint is for programmatic deposits via TronWeb. For manual deposits, use GET /deposit/info and send TRX from any wallet.

Request body

amount_sunintegerREQUIRED
Deposit amount in SUN (1 TRX = 1,000,000 SUN)Minimum 1000000 (1 TRX)
Request examples
curl -X POST https://merx.exchange/api/v1/deposit/prepare \
  -H "Authorization: Bearer your_jwt_token" \
  -H "Content-Type: application/json" \
  -d '{ "amount_sun": 10000000 }'

Response

200Deposit transaction data
{
  "address": "TPlatformAddress...",
  "memo": "usr_a1b2c3d4e5f6g7h8",
  "amount_sun": 10000000,
  "memo_hex": "7573725f61316232633364346535663667376838",
  "note": "Use TronWeb to build and sign: tronWeb.transactionBuilder.sendTrx(address, amount_sun, yourAddress).then(tx => { tx.raw_data.data = memo_hex; return tronWeb.trx.sign(tx); })"
}

Response fields

addressstringPlatform deposit address
memostringUnique user memo identifier
amount_sunintegerRequested deposit amount in SUN
memo_hexstringMemo encoded as hex for the transaction data field
notestringSigning instructions for TronWeb integration