Create order

To use this feature, you must have the API key. Read here to view how to get our API key

Buy with API Key (Postman)

Create a new buy energy order by API key

POST https://api.tronsave.io/v0/internal-buy-energy

Create a new buy energy order by API key

Rate limit: 15 requests per 1 second

Headers

Name
Type
Description

apikey*

String

Tronsave api key that present for internal account

Request Body

Name
Type
Description

resource_type*

String

"ENERGY"

buy_energy_type*

String

-"FAST" : If market ready to fill = 100%, FAST = MEDIUM. If market ready to fill < 100%, FAST = MEDIUM + 10. If market ready to fill = 0%, FAST = SLOW + 20.

-"MEDIUM" : The lowest price for the maximum market fill for this order. If market ready to fill = 0%, MEDIUM = SLOW + 10.

-"SLOW": The lowest price that can be set for this order.

-If price is number, price unit is equal to sun.

amount*

Number

Amount of resource want to buy

allow_partial_fill*

Boolean

if this value is true, order is able to filling from many delegator. Order can filling easier than if this value is false. Amount greater than 200k energy can set this params

target_address*

String

The address that received resource

duration_millisec

Number

order duration in milli sec. Default: 259200000 (3 days)

sponsor

String

sponsor code

only_create_when_fulfilled

Boolean

[true]=> order only create when it can be fulfilled

[false] => order will create even it can not be fulfilled

Default value: false

max_price_accepted

Number

Only create an order when the estimated price is less than this value.

add_order_incomplete

Boolean

[true]=> order only create when there has no same parameters order is not complete in order list

[false] => order will create even there has no same parameters order is not complete in order list

Default value: false

Return the order id if successful

Example

Example Code

Get detailed orders here

Last updated