快速开始
在 10 分钟内完成你的首次能量购买——网站或 API。
路径 A——在网站上购买(无需代码)
路径 B——通过 API 购买(面向开发者)
# 1. Estimate cost
curl -X POST https://api.tronsave.io/v2/estimate-buy-resource \
-H "Content-Type: application/json" \
-d '{"receiver":"YOUR_TRON_ADDRESS","resourceType":"ENERGY","resourceAmount":65000,"durationSec":900,"unitPrice":"MEDIUM"}'
# 2. Create the order
curl -X POST https://api.tronsave.io/v2/buy-resource \
-H "apikey: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"receiver":"YOUR_TRON_ADDRESS","resourceType":"ENERGY","resourceAmount":65000,"durationSec":900,"unitPrice":"MEDIUM","options":{"allowPartialFill":true,"preventDuplicateIncompleteOrders":true}}'想先测试一下?
生产环境
测试网 (Nile)
后续步骤
Last updated