POST
/
api
/
mpc
/
tron
/
gas
/
create_order
 curl -X POST \
'https://openapi.gasstation.ai/api/mpc/tron/gas/create_order?app_id=49e9c57da66788e5178c8fec2905067b&data=+7d8kre2+XHyvSY9ueXT8DuoFsgeij0K7zdCS3rJkq7icyRh+frctiUaOROBU6kAoN4OJ+MPX174QAMLOSZ8f2UluhXcLA8HQdUfc0azP6O65XcfZrufshkHmeleQwz0xlbY4/GuegUaZqeDMu4Yja6a4eqL526f/RpZc12czAaiiozHgLs94qG7mQcgMVaW'
{
    "code": 0,
    "msg": "Success",
    "data": {
        "trade_no": "1234"
    }
}

Request Parameters

request_id
string
required

request id

receive_address
string
required

receive address

buy_type
integer

0: Specified quantity 1: System estimation , default is 0 if not specified.

All methods are subject to minimum purchase value limits.:

  • The minimum purchase quantity for bandwidth is 5000.
  • The minimum purchase quantity for energy is 64400.
  1. System estimates (buy_type = 1) only allow the purchase of energy.

    • Purchasing bandwidth is not supported.
  2. When the customer specifies a quantity (buy_type = 0), they cannot purchase both energy and bandwidth simultaneously.

    • Only one of energy_num and net_num can be selected.
  3. Parameter requirements when buy_type = 0

    • Please fill in at least one of the fields: energy_num or net_num.
service_charge_type
string
required

rent time code: Request the order/price interface to return the cost codes for minutes, hours, days, and different times.

eg:10010 - 10 minutes, 20001 - 1 hour, 30001 - 1 day

energy_num
integer

energy num : min value is 64000

If buy_type=0, please enter the specific amount of energy

net_num
integer

net num : min value is 5000

If buy_type=0, please enter the specific amount of net

address_to
string

The transfer address for estimating miner fees.

Required when selecting buy_type=1.

contract_address
string

Contract address for estimating miner fees.

Required when selecting buy_type=1.

Response Parameters

 curl -X POST \
'https://openapi.gasstation.ai/api/mpc/tron/gas/create_order?app_id=49e9c57da66788e5178c8fec2905067b&data=+7d8kre2+XHyvSY9ueXT8DuoFsgeij0K7zdCS3rJkq7icyRh+frctiUaOROBU6kAoN4OJ+MPX174QAMLOSZ8f2UluhXcLA8HQdUfc0azP6O65XcfZrufshkHmeleQwz0xlbY4/GuegUaZqeDMu4Yja6a4eqL526f/RpZc12czAaiiozHgLs94qG7mQcgMVaW'
{
    "code": 0,
    "msg": "Success",
    "data": {
        "trade_no": "1234"
    }
}