> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/tron-energy/api-reference/orders-order_id-tron-energy.md).

# orders/{order\_id} - TRON energy

This retrieves the details of a previously placed order. Useful if you received a 202 response and need to check the final status.

### Path Parameter

| pending | Order is being processed                          |
| ------- | ------------------------------------------------- |
| success | Order completed successfully, resources delegated |
| failed  | Order failed — no charge applied                  |

### Request Sample

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```bash
curl -X GET "https://api.getblock.io/tron-energy/orders/success" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

{% endcode %}
{% endtab %}

{% tab title="Axios" %}
{% code overflow="wrap" %}

```javascript
const axios = require('axios');

const orderId = "success";
const url = `https://api.getblock.io/tron-energy/orders/${orderId}`;

axios.get(url, {
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error.response.data);
});
```

{% endcode %}
{% endtab %}

{% tab title="Request" %}
{% code overflow="wrap" %}

```python
import requests

order_id = "success"
url = f"https://api.getblock.io/tron-energy/orders/{order_id}"

headers = {
    'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.get(url, headers=headers)
print(response.text)
```

{% endcode %}
{% endtab %}

{% tab title="Rust" %}
{% code overflow="wrap" %}

```rust
use reqwest::header;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::new();

    let order_id = "success";
    let url = format!("https://api.getblock.io/tron-energy/orders/{}", order_id);

    let response = client
        .get(&url)
        .header(header::AUTHORIZATION, "Bearer YOUR_API_KEY")
        .send()
        .await?;

    println!("{}", response.text().await?);

    Ok(())
}
```

{% endcode %}
{% endtab %}

{% tab title="GO" %}

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    orderId := "success"
    url := fmt.Sprintf("https://api.getblock.io/tron-energy/orders/%s", orderId)

    req, _ := http.NewRequest("GET", url, nil)
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
```

{% endtab %}
{% endtabs %}

### Response Sample

```bash
{
  "order_id": "clxyz123...",
  "status": "success",
  "target_address": "TUo8pycbvje9w2XYsNnnzw67bpPs4GLFyD",
  "resource_type": "energy",
  "volume": 65000,
  "duration": "3d",
  "price_usd": "4.97",
  "trx_spent": 20.12,
  "provider_order_id": "12345",
  "created_at": "2026-02-08T12:00:00.000Z"
}

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.getblock.io/tron-energy/api-reference/orders-order_id-tron-energy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
