---
title: "Estimate energy cost"
method: POST
path: "/api/v2/agent/estimate"
tags: ["Market"]
---

# Estimate energy cost

`POST /api/v2/agent/estimate`

## Request

- Base URL: `https://powersun.vip`
- URL: `https://powersun.vip/api/v2/agent/estimate`
- Auth: none required

Calculate the cost of purchasing TRON Energy for a number of transactions. No authentication required.

## Request body

- object
  - `txCount` integer, required: Number of transactions
  - `txType` 'trc20_transfer' | 'trc20_transfer_new' | 'trc10_transfer' | 'contract_call'
  - `durationMinutes` 2 | 5 | 10 | 15 | 30 | 60 | 360 | 1440 | 10080 | 43200
  - `resourceType` 'ENERGY' | 'BANDWIDTH'

## Response `200`

Cost estimate

- Estimate
  - `estimate` object
    - `txCount` integer
    - `energyPerTx` integer
    - `totalEnergyNeeded` integer
    - `durationMinutes` integer
    - `resourceType` string
  - `pricing` object
    - `pricePerUnitSun` integer
    - `totalCostSun` integer
    - `totalCostTrx` number
    - `costPerTxTrx` number
    - `savingsPercent` number

---

[API](https://skmtc.dev/powersun/apis/powersun-agent-api.md) · [All operations](https://skmtc.dev/powersun/apis/powersun-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/powersun/apis/powersun-agent-api/revisions/169cc1ebfd26?raw)
