> For the complete documentation index, see [llms.txt](https://docs-tron.en.tronify.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-tron.en.tronify.io/flash-unstake-api/create-order.md).

# Create Order

### Endpoint usage

<mark style="color:green;">`POST`</mark> `https://open.tronify.io/api/tronRent/flashUnstakeOrder`&#x20;

The fields with \* are required, and the fields without \* are optional

#### Request Body

| Name                                             | Type     | Description                                                                                       |
| ------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------- |
| fromAddress<mark style="color:red;">\*</mark>    | String   | User address (Wallet address)                                                                     |
| receiveAddress<mark style="color:red;">\*</mark> | String   | Receiving Address                                                                                 |
| sourceFlag<mark style="color:red;">\*</mark>     | Stringff | Source channel (Both sides need to agree on a name to represent the channel of the third parties) |
| signedMsg<mark style="color:red;">\*</mark>      | String   | Wallet Signature                                                                                  |
| connectWalletType                                | String   | Wallet Type                                                                                       |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "orderId": "pjfkl0fb_ghkd_maqo_5u0r_2uewb420u2hk",
        "fromAddress": "TK54WodHVAHFoep8huDh9g9nRwXqXm5SJC",
        "receiveAddress": "TX5dfXNzBv6a9FiaRgK5rCJYzKuKpNzcHc",
        "stakingSun": "70000000",
        "unstakingSun": "0",
        "balanceSun": "111002968",
        "hasDelegatedEnergy": false,
        "hasDelegatedBandwidth": false,
        "heldTokens": [],
        "unstakeLimitMin": 10,
        "unstakeLimitMax": 100000,
        "feeRate": 0.05,
        "orderStatus": "wait_flash_unstake_approve",
        "approveTransaction": {
            "raw_data": {
                "ref_block_bytes": "0022",
                "ref_block_hash": "55bcxxxxxx",
                "expiration": 1792555746000,
                "contract": [
                    {
                        "parameter": {
                            "value": {
                                "owner_address": "4163dxxxxxxxxxxxxxxxxxxxxxxxx",
                                "owner": {
                                    "permission_name": "owner",
                                    "threshold": 1,
                                    "keys": [
                                        {
                                            "address": "41b2xxxx922b6xxxxxxxxxxxxxx",
                                            "weight": 1
                                        }
                                    ]
                                },
                                "actives": [
                                    {
                                        "type": "Active",
                                        "id": 2,
                                        "permission_name": "tronify-active",
                                        "threshold": 1,
                                        "operations": "7ffxxxxf1fcxxxxxxxxxxxxxxxxxxxxxxx",
                                        "keys": [
                                            {
                                                "address": "41b29xxxxxxxxxxxxxxxxxxxxxx",
                                                "weight": 1
                                            }
                                        ]
                                    }
                                ]
                            },
                            "type_url": "type.googleapis.com/protocol.AccountPermissionUpdateContract"
                        },
                        "type": "AccountPermissionUpdateContract"
                    }
                ],
                "timestamp": 1792555086833
            },
            "raw_data_hex": "0a02xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "txID": "4b32xxxxxxxxxxxxxxxxxxxxxxxxxxx51",
            "visible": false
        }
    }
}
 
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### code example

{% tabs %}
{% tab title="JavaScript" %}

```javascript
// example
const params = {
   "fromAddress": "TK54WodHVAHFoep8huDh9g9nRwXqXm5SJC",
    "receiveAddress": "TX5dfXNzBv6a9FiaRgK5rCJYzKuKpNzcHc",
    "sourceFlag": "tronify",
    "connectWalletType": "TronLink",
    "invitationCode": "",
    "utmSource": "",
    "signedMsg": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
const res = await axios.post('https://open.tronify.io/api/tronRent/flashUnstakeOrder',params)
console.log(res)
if(res.resCode === '100'){
   //... 
}
```

{% endtab %}
{% endtabs %}

### Postman example

<figure><img src="https://3188465811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnv0Qbx2yTtH3TKQFd528%2Fuploads%2FKVrGmlQADvGQagOGlBB2%2Fimage.png?alt=media&amp;token=5b39400d-6cb6-4ee1-b0d6-abfc59c95684" alt=""><figcaption></figcaption></figure>
