Skip to content

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/rate

Request headers ​

HeaderRequiredDescription
X-API-KEYyesAPI key with the billing.read permission
X-Netts-Billing-Formatnocontract-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 ​

bash
curl -s 'https://netts.io/apiv2/billing/rate' \
  -H 'X-API-KEY: your-api-key'
json
{
  "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 ​

FieldDescription
assetthe currency of your contract, as in settlement.asset in account
pairTRX/ and the currency of your contract
ratehow much one TRX is worth in the currency of your contract, a decimal string with 18 decimal places
atthe 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.

json
{
  "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.

FieldDescription
contractCurrencythe currency of your contract; asset in the original format
exchangeRateone 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 ​

HTTPcodeMeaning
401-1, -2the key is missing or invalid, or the IP is not whitelisted — answered by the API gateway, see response format
400unsupported_billing_formatunknown X-Netts-Billing-Format value
403billing_read_requiredthe key has no billing.read permission
403postpaid_requiredthe account has no postpaid billing
403billing_format_not_enabledcontract-v1 is not enabled for your account yet
406billing_format_not_availablethe original format was requested, but your contract uses contract-v1 only
503rate_unavailablethe rate is temporarily unavailable — retry later

All codes are listed in postpaid billing.