Skip to main content
GET
/api/v1/billing/balance
balances ne rapporte que diem et usd. Les crédits groupés n’apparaissent pas sous forme de champ numérique. Si les crédits groupés sont la source qui sera utilisée pour votre prochaine requête, consumptionCurrency renvoie BUNDLED_CREDITS. Pour connaître le montant restant de crédits groupés, consultez venice.ai/settings/api. Pour comprendre comment l’API choisit entre DIEM, crédits groupés et USD, consultez VVV & DIEM.

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Réponse

Successful response

Current balance information for the authenticated user

canConsume
boolean
requis

Whether the user has sufficient balance to make API requests

Exemple:

true

consumptionCurrency
enum<string> | null
requis

The currency that will be used for consumption (DIEM or USD)

Options disponibles:
USD,
VCU,
DIEM,
BUNDLED_CREDITS
Exemple:

"DIEM"

balances
object
requis
diemEpochAllocation
number
requis

Total DIEM allocation for the current epoch (from staking). Use with balances.diem to calculate usage percentage.

Exemple:

100