Obtaining Balances
→ Request
None
← Response
- Response Parameters
- Response Object Parameters
javascript
python
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Authentication to the GPUhub API to obtain account current balances and other information
POST /api/v1/dev/wallet/balance
None
| Parameter | Data Type | Notes |
|---|---|---|
| code | String | Response code, “Success” for success |
| msg | String | Error message, empty for success |
| data | Object | Response data object |
| Parameter | Data Type | Notes |
|---|---|---|
| assets | Int | Current balance, in cent (divide by 1000 to get dollor) |
| accumulate | Int | Cumulative consumption, in cent (divide by 1000 to get dollor) |
| voucher_balance | Int | Current voucher balance, in cent (divide by 1000 to get dollor) |
{
"code": "Success",
"data": {
"assets": 1000,
"accumulate": 1000,
"voucher_balance": 1000
},
"msg": ""
}
import requests
headers = {
"Authorization": "Your token"
}
url = "https://api.gpuhub.com/api/v1/dev/wallet/balance"
response = requests.post(url, headers=headers)
print(response.content.decode())