sTRX API

Query sTRX market information

Request Address

/lend/strx

Protocol

HTTPS GET

None

Public Parameters

None

Input Parameters

None

Return

ParameterTypeDescription

code

Integer

0 is success

message

String

Message description

data

Map<String, Object>

StakeInfo: staking data

RentInfo: rental data

StakeInfo

ParameterTypeDescription

strxAddress

String

Contract address of sTRX

symbol

String

sTRX

decimal

String

Scale of sTRX

totalSupply

String

Supply of sTRX

totalSupplyUsd

String

Total Value Locked (TVL) of sTRX

exchangeRate

String

Exchange rate between sTRX and TRX, the amount of TRX that can be exchanged for 1 sTRX

totalUnderlying

String

Amount of underlying assets (the amount of TRX)

underlyingDecimal

String

Scale of underlying assets (the scale of TRX)

rentReserveFactor

String

Reserve factor for rental income

rewardReserveFactor

String

Reserve factor for voting reward

reserves

String

Reserves

supplyRate

String

Annualized Rate of Return (ARR)of staking

trxPrice

String

USD price of TRX

RentInfo

ParameterTypeDescription

rentMarketAddress

String

Contract address of the rental market

priceFor10KEnergByRent

String

Amount of TRX required for renting to get 10,000 Energy (deposit not included)

priceFor10KEnergByStake

String

Amount of TRX required for staking to get 10,000 Energy

priceFor10KEnergByBurn

String

Amount of TRX required for burning to obtain 10,000 Energy

totalDelegatedEnergyTrx

String

Amount of TRX corresponding to the delegated energy

totalDelegatedEnergyRate

String

Capital utilization rate, i.e. delegated energy / total energy in the market

Output Example

{
    "code":0,
    "data":{
        "rentInfo":{
            "priceFor10KEnergByBurn":"4.20000000",
            "priceFor10KEnergByRent":"0.10688361",
            "priceFor10KEnergByStake":"48.37391022",
            "rentMarketAddress":"TSos1xxjqMrGKBxycVmtgrnFvv9M6FDFUX",
            "totalDelegatedEnergyRate":"0.16762312",
            "totalDelegatedEnergyTrx":"20075.732341"
        },
        "stakeInfo":{
            "decimal":"18",
            "exchangeRate":"1.011404397263171363",
            "rentReserveFactor":"0.101234000000000000",
            "reserves":"168.336743",
            "rewardReserveFactor":"0.201230000000000000",
            "strxAddress":"TZ8du1HkatTWDbS6FLZei4dQfjfpSm9mxp",
            "supplyRate":"0.15633008",
            "symbol":"sTRX",
            "totalSupply":"246104.935152098442750529",
            "totalSupplyUsd":"16423.38430758",
            "totalUnderlying":"248911.613601",
            "trxPrice":"0.065980787597578113",
            "underlyingDecimal":"6"
        }
    },
    "message":"SUCCESS"
}

Obtain user data of sTRX liquidity staking

Request Address

/lend/strxStake/account

Protocol

HTTPS GET

Header

None

Public Parameters

None

Input Parameters

RequiredParameterTypeDefaultDescription

N

addresses

String

""

Address list to query; when there are multiple addresses, separate them with commas, and the default means all addresses

N

pageNo

int

1

Page number to query, starting from 1

N

pageSize

int

50

Page size

N

minStrxBalance

String

0

Minimum amount of sTRX held, which returns data of users whose sTRX holdings are more than or equal to this value

Return

ParameterTypeDescription

code

Integer

0 is success

message

String

Message description

data

Object

User list and related data in Liquid Staking

Output Parameters - StakeAccountInfo

ParameterTypeDescription

address

String

User address

sTRXBalance

String

sTRX holdings

unstakingAmount

String

Amount of TRX being unfrozen (cannot be withdrawn)

availableWithdrawAmount

String

Amount of unfrozen TRX that can be withdrawn

Output Example

{
    "code":0,
    "data":{
        "totalPage":10,
        "list":[
            {
                "address":"TZ8du1HkatTWDbS6FLZei4dQfjfpSm9mxp",
                "availableWithdrawAmount":"0",
                "unstakingAmount":"5627.831922",
                "sTRXBalance":"1.000000000000000000"
            },
            {
                "address":"TFj4syqrAQp545Xgaw8NDew79U6PUHVMBZ",
                "availableWithdrawAmount":"0",
                "unstakingAmount":"0",
                "sTRXBalance":"102.000000000052000000"
            }
        ],
        "totalCount":20
    },
    "message":"SUCCESS"
}

Obtain user data of resource rent (only supports Energy Rental currently)

Request Address

/lend/rentResource/account

Protocol

HTTPS GET

Header

None

Public Parameters

None

Input Parameters

RequiredParameterTypeDefaultDescription

N

addresses

String

""

Address list to query; when there are multiple addresses, separate them with commas, and the default means all addresses

N

pageNo

int

1

Page number to query, starting from 1

N

pageSize

int

50

Page size

N

minStrxBalance

String

0

Minimum amount of sTRX staked, which returns data of users whose staked sTRX more than or equal to this value

N

maxRemainingRentAmount

String

""

Maximum remaining rent, which returns data of users whose remaining rent is less than or equal to this value, and there is no query restraint by default

Return

ParameterTypeDescription

code

Integer

0 is success

message

String

Message description

data

Object

User list and related data in staking

Output Parameters - RentAccountInfo

ParameterTypeDescription

renter

String

Account address of resource renting

receiver

String

Account address of resource receiving

rentType

String

Resource type. "Energy" is the only type currently available

delegatedAmount

String

Delegated amount. Unit: TRX

rentAmountPerDay

String

Rent amount per day. Unit: TRX

rentRemainAmount

String

Remaining rent amount, excluding deposit. Unit: TRX

Output Example

{
    "code":0,
    "data":{
        "totalPage":11,
        "list":[
            {
                "rentRemainAmount":"0.000000",
                "receiver":"TAvMRE6SL8aYYyVx5mHkEwBPvgD3FGSQND",
                "delegatedAmount":"0.000000",
                "rentAmountPerDay":"0.000000",
                "rentType":"Energy",
                "renter":"TAvMRE6SL8aYYyVx5mHkEwBPvgD3FGSQND"
            },
            {
                "rentRemainAmount":"984.830388",
                "receiver":"TKGRE6oiU3rEzasue4MsB6sCXXSTx9BAe3",
                "delegatedAmount":"5.000000",
                "rentAmountPerDay":"0.011048",
                "rentType":"Energy",
                "renter":"TCukPh41eQuicwc8wsqv9k6umMQ5esJD9d"
            }
        ],
        "totalCount":22
    },
    "message":"SUCCESS"
}

Last updated