> ## Documentation Index
> Fetch the complete documentation index at: https://gasdocs-en.gasstation.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Order

> Create Order

#### Request Parameters

**request\_id** `string` *required*

request id.cannot be reused for repeated submissions. Maximum 32 characters, letters, numbers, underscores (`_`), and hyphens (`-`) only.

**receive\_address** `string` *required*

receive address

**buy\_type** `integer`

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

> [!NOTE]
>
> **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)**
>    * Please ensure that the receive\_address holds the token corresponding to the contracte\_address, otherwise the miner fee estimation will fail
>    * 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

> [!NOTE]
>
> Energy or bandwidth flash recharge type `10000` is not supported by this endpoint. Use `/api/tron/gas/flash/open` instead.

**energy\_num** `integer`

energy num : min value is 64000

> [!NOTE]
>
> If buy\_type=0, please enter the specific amount of energy

**net\_num** `integer`

net num : min value is 5000

> [!NOTE]
>
> If buy\_type=0, please enter the specific amount of net

**address\_to** `string`

The transfer address for estimating miner fees.

> [!NOTE]
>
> Required when selecting **buy\_type=1**.

**contract\_address** `string`

Contract address for estimating miner fees.

> [!NOTE]
>
> Required when selecting **buy\_type=1**.

#### Response Parameters

**object**

**trade\_no** `string`

tradeNo

**amount** `string`

Payment amount

```curl cURL theme={null}
 curl -X POST \
'https://openapi.gasstation.ai/api/tron/gas/create_order?app_id=49e9c57da66788e5178c8fec2905067b&data=+7d8kre2+XHyvSY9ueXT8DuoFsgeij0K7zdCS3rJkq7icyRh+frctiUaOROBU6kAoN4OJ+MPX174QAMLOSZ8f2UluhXcLA8HQdUfc0azP6O65XcfZrufshkHmeleQwz0xlbY4/GuegUaZqeDMu4Yja6a4eqL526f/RpZc12czAaiiozHgLs94qG7mQcgMVaW'
```

```json theme={null}
{
"code": 0,
"msg": "Success",
"data": {
    "amount": "2.187",
    "trade_no": "GAS48760509"
}
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.