Get the TRX→USD rate
GET
/api/v1/rate
const url = 'https://trongas.ai/api/v1/rate';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://trongas.ai/api/v1/rateCurrent TRX→USD rate as a string. Returns “0” when the upstream source is unavailable. Public — no API key required.
Responses
Section titled “Responses”OK
object
trxUsdRate
required
string
object
trxUsdRate
required
string
Examplegenerated
{ "trxUsdRate": "example"}object
trxUsdRate
required
string
Examplegenerated
{ "trxUsdRate": "example"}