Create order
Create an order using a Signed Transaction
POST
https://api.tronsave.io/v2/buy-resource
POST
https://api.tronsave.io/v2/buy-resource
Rate limit: 15 requests per 1 second
Request params
resourceType
String
"ENERGY" or "BANDWIDTH", default: ENERGY
unitPrice
Number
The price unit is equal to SUN.
resourceAmount*
Number
The number of resources.
receiver*
String
Resource receiving address
durationSec
Number
The duration of the bought resource, time unit, is in seconds. Default 259200 (3 days)
sponsor
String
sponsor code
signedTx
SignedTransaction
options
Object
optional
options.allowPartialFill
Boolean
Allow the order to be filled partially or not
options.onlyCreateWhenFulfilled
Boolean
[true]=> order only creates when it can be fulfilled
[false]=> order will create even if it can not be fulfilled
Default value: false
options.maxPriceAccepted
Number
Only create order when the estimate price less than this value.
options.preventDuplicateIncompleteOrders
Boolean
[true]=> Only create if no uncompleted order with the same parameters exists.
[false]=> Always create a new order, regardless of existing unfinished ones.
Default value: false
options.minResourceDelegateRequiredAmount
Number
The minimum energy amount delegated by a single provider.
Request params example
Responses
Example Code
Last updated