GET /apiv2/billing/rate
Your current rate: how much one TRX is worth in the currency of your contract. Every account has its own contract currency, so the pair and the rate are your own. Use it to check the amounts in your own records. Part of postpaid billing.
Endpoint URL
GET https://netts.io/apiv2/billing/rateRequest headers
| Header | Required | Description |
|---|---|---|
X-API-KEY | yes | API key with the billing.read permission |
X-Netts-Billing-Format | no | contract-v1 for the rate with its pair; not sent — the original format below |
The request has no parameters. The currency is taken from your contract.
Example
curl -s 'https://netts.io/apiv2/billing/rate' \
-H 'X-API-KEY: your-api-key'{
"success": true,
"data": {
"asset": "USDC",
"pair": "TRX/USDC",
"rate": "0.331515333133553092",
"at": "2026-10-20T05:52:15.915512+00:00"
},
"timestamp": "2026-10-20T05:52:20+00:00"
}In this example the currency of the contract is USDC; asset and pair show the currency of your contract.
Response fields
| Field | Description |
|---|---|
asset | the currency of your contract, as in settlement.asset in account |
pair | TRX/ and the currency of your contract |
rate | how much one TRX is worth in the currency of your contract, a decimal string with 18 decimal places |
at | the moment of the rate, UTC; null when the currency of your contract is TRX |
If the currency of your contract is TRX, rate is "1".
The rate changes over time. It is the rate at the moment of at, not a promise of the rate of a future order: a recorded charge keeps the rate of its own time — see recorded exchange rate.
Response in contract-v1
With X-Netts-Billing-Format: contract-v1 the rate is an exchange rate with its pair. This format is enabled per account.
{
"success": true,
"data": {
"contractCurrency": "BTC",
"exchangeRate": {
"base": "TRX",
"quote": "BTC",
"rate": "0.000004057233918579",
"at": "2026-10-23T19:26:50.321789+00:00"
}
},
"timestamp": "2026-10-23T19:26:56+00:00"
}The example uses BTC; your responses show the currency of your contract.
| Field | Description |
|---|---|
contractCurrency | the currency of your contract; asset in the original format |
exchangeRate | one TRX in the currency of your contract, at the moment at, UTC; the rate has 18 decimal places. pair, rate and at of the original format |
If the currency of your contract is TRX, exchangeRate is {"base": "TRX", "quote": "TRX", "rate": "1", "at": null}.
The rate of a recorded charge is shown with that charge in usage, with full precision; do not use the current rate to recalculate it.
Errors
| HTTP | code | Meaning |
|---|---|---|
| 401 | -1, -2 | the key is missing or invalid, or the IP is not whitelisted — answered by the API gateway, see response format |
| 400 | unsupported_billing_format | unknown X-Netts-Billing-Format value |
| 403 | billing_read_required | the key has no billing.read permission |
| 403 | postpaid_required | the account has no postpaid billing |
| 403 | billing_format_not_enabled | contract-v1 is not enabled for your account yet |
| 406 | billing_format_not_available | the original format was requested, but your contract uses contract-v1 only |
| 503 | rate_unavailable | the rate is temporarily unavailable — retry later |
All codes are listed in postpaid billing.