Konto
Pobierz dane konta, saldo, sumy ruchu i informacje o używanym kluczu API.
GET /account
Zwraca profil konta, saldo w USD, liczbę pakietów, ruch z 30 dni i metadane klucza API.
GET
/api/v1/accountAuthentication: Wymagany token Bearer.
Parameters: brak.
response.json
{
"data": {
"id": 4823,
"email": "user@example.com",
"balance_usd": 24.7500,
"packages_active": 3,
"packages_total": 4,
"total_used_gb_30d": 127.4192,
"member_since": "2026-01-15T08:32:00+00:00",
"api_key": {
"name": "ci-pipeline",
"prefix": "raxy_xY",
"scopes": null,
"last_used_at": "2026-05-29T11:04:12+00:00",
"expires_at": null
}
},
"meta": { "version": "v1" }
}Pola odpowiedzi
| Pole | Typ | Opis |
|---|---|---|
email | string | Adres e-mail konta. |
balance_usd | float | Aktualne saldo portfela w USD (4 miejsca po przecinku). |
packages_active | integer | Pakiety ze statusem active. |
packages_total | integer | Aktywne + zawieszone pakiety. |
total_used_gb_30d | float | Całkowity ruch z ostatnich 30 dni, w GB. |
member_since | string | Znacznik czasu rejestracji (ISO 8601). |
api_key | object | null | Metadane używanego klucza API — patrz niżej. |
Informacje o kluczu API
Pomaga zidentyfikować, który klucz wykonuje żądanie, sprawdzić jego scopes i datę wygaśnięcia.
api_key.json
{
"name": "ci-pipeline",
"prefix": "raxy_xY",
"scopes": ["farm"] | null,
"last_used_at": "2026-05-29T11:04:12+00:00",
"expires_at": "2026-08-01T00:00:00+00:00" | null
}Przykłady kodu
account.sh
curl https://raxyproxy.com/api/v1/account \
-H "Authorization: Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"account.py
import requests
resp = requests.get(
'https://raxyproxy.com/api/v1/account',
headers={'Authorization': 'Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'},
timeout=10,
)
data = resp.json()['data']
print(f"Balance: ${data['balance_usd']:.2f} — 30d traffic: {data['total_used_gb_30d']} GB")account.mjs
const resp = await fetch('https://raxyproxy.com/api/v1/account', {
headers: { Authorization: 'Bearer raxy_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' },
});
const { data } = await resp.json();
console.log(`Balance $${data.balance_usd.toFixed(2)} — 30d traffic ${data.total_used_gb_30d} GB`);