Tron API En
Chinese API
  • Basic information
  • Tron API
    • Get related configuration
    • Pre-order
    • create trx engerg order
    • create usdt engerg order
    • create bandwidth order
    • upload purchase order hash
    • create a sell order
    • Earn energy by stake
    • recovered energy
    • cancel order
    • query purchase order
    • query recent finished order
    • query purchase order records by user address
    • query sell order records by user address
  • Seller Tron API
    • Get seller configuration
    • Seller authorization
    • Update seller configuration
    • Get seller panel
  • Buyer Tron API
    • Get buyer configuration
    • Buyer charge
    • Buyer withdraw
    • Buyer leas energy
    • Buyer leas energy records
    • Buyer asset records
  • FAQ
    • Error Code
Powered by GitBook
On this page
  • Endpoint usage
  • code example
  • Postman example
  1. Tron API

query purchase order records by user address

Endpoint usage

POST https://open.tronify.io/api/tronRent/mypayorder

The fields with * are required, and the fields without * are optional

Request Body

Name
Type
Description

sourceFlag*

String

Source channel (Both sides need to agree on a name to represent the channel of the third parties)

page*

Integer

page num

pageSize*

Integer

record size

orderType*

String

1:Query active buy orders with the status of wait_deposit_send and wait_sale Other values: Query all buy orders

fromAddress*

String

User address (Wallet address)

{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "data": [
            {
                "orderId": "2ombu8zk_3jet_0mle_g7id_2mi3gnl6fk4y",
                "fromAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeNum": 555,
                "salePledgeNum": 0,
                "freezePledgeNum": 0,
                "leftPledgeNum": 555,
                "orderPrice": "110",
                "orderType": "ENERGY",
                "pledgeDay": "3",
                "orderStatus": "wait_sale",
                "createTime": "2023-04-11 16:29:55"
            },
            {
                "orderId": "gzbh4w53_k0qb_9x7d_elwm_dw8aoas7olbt",
                "fromAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeAddress": "TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS",
                "pledgeNum": 555,
                "salePledgeNum": 0,
                "freezePledgeNum": 0,
                "leftPledgeNum": 555,
                "orderPrice": "110",
                "orderType": "ENERGY",
                "pledgeDay": "3",
                "orderStatus": "timeout",
                "createTime": "2023-04-11 16:17:14"
            }
        ],
        "pagination": {
            "page": 1,
            "pageSize": 10,
            "total": 2
        }
    }
}
{
    // Response
}

code example

// example
const params = {
    fromAddress: 'TW7XuicuiQSHCcodUkyjMfdWxnWsbZmiSS',
    orderType: 0,
    page: 1,
    pageSize: 10,
    sourceFlag: 'tronLink'
}
 const res = await axios.post('https://open.tronify.io/api/tronRent/mypayorder',params)
 console.log(res)
 if(res.resCode === '100'){
   //...  
 }

Postman example

Previousquery recent finished orderNextquery sell order records by user address

Last updated 1 year ago