Exchange API
API Endpoint
Nile Testnet API Endpoint: https://tronpulse.io/api/exchange?testnet=nile
Headers
Content-Type
application/json
Api-Key
api-key
Exchange - Create Order
POST
/create_order
Body
order
json
Details of the order to be created (view JSON object description below)
order.receiver
string
Address to receiver the resource
order.resource_type
string
Resource type must be energy
order.amount
number
Amount of resource to purchase
order.duration
string
Duration of the order: allowed values are 1h, 6h, 1d, 3d to 30d
order.price
number
Unit price of the order in SUN
signed_tx
json
Signed TRX payment transaction
Response
Code Example
Exchange - Get Order
POST
/get_order
Body
order_id
string
Order ID or "open" to get all open orders
Response
Status Code
200
The request has been successfully processed.
400
order_not_found
The specified order ID is unknown or does not exist.
400
missing_input_parameter
The required parameter (order_id) is not provided in the request.
401
invalid_api_key
The API key is either missing from the request header or incorrect.
Code Example
Exchange - Cancel Order
POST
/cancel_order
Body
order_id
string
Order ID
Response
Code Example
Last updated