curl --request GET \
--url https://api.sfcompute.com/v1/balances \
--header 'Authorization: Bearer <token>'{
"object": "balance",
"available_cents": 150000,
"current_cents": 180000,
"current_overage_cents": 150000,
"current_hold_cents": 180000,
"updated_at": 1640995200
}Retrieves the current account balance.
curl --request GET \
--url https://api.sfcompute.com/v1/balances \
--header 'Authorization: Bearer <token>'{
"object": "balance",
"available_cents": 150000,
"current_cents": 180000,
"current_overage_cents": 150000,
"current_hold_cents": 180000,
"updated_at": 1640995200
}Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
Successfully retrieved balance
Response body for getting account balance from the credit ledger.
balances "balances"
Available balance in cents: sum(credit) - sum(debit) - sum(committed holds)
x >= 0150000
Reserved balance in cents: sum(credit) - sum(debit)
x >= 0180000
Total spend that hasn't been paid for yet, in cents.
x >= 00
The maximum amount of overages the account can incur before they are blocked from buying compute.
x >= 00
When the balance was last updated as a unix timestamp
1640995200