プロジェクト使用量の取得
プロジェクトの現在のクレジットサイクル内のクレジット使用量、サブスクリプションの詳細、およびサービスごとのリクエスト数を取得します。
curl --request GET \
--url 'https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key='import requests
url = "https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"creditsRemaining": 486100,
"creditsUsed": 13900,
"prepaidCreditsRemaining": 50000,
"prepaidCreditsUsed": 0,
"creditCycle": {
"start": "2026-04-01",
"end": "2026-05-01"
},
"subscriptionDetails": {
"billingCycle": {
"start": "2026-04-01",
"end": "2026-05-01"
},
"creditsLimit": 500000,
"plan": "business"
},
"credits": {
"rpc": 4500,
"enhancedApi": 1200,
"walletApi": 0,
"das": 5000,
"webhooks": 800,
"laserstreamGrpc": 1500,
"laserstreamWebsocket": 800,
"preConfirmations": 100,
"archival": 0,
"photon": 0,
"other": 0
},
"requests": {
"rpc": 4500,
"enhancedApi": 1200,
"walletApi": 0,
"das": 5000,
"webhooks": 800,
"preConfirmations": 50,
"archival": 0,
"photon": 0,
"other": 0
},
"dataTransfer": {
"laserstreamGrpc": 15000000,
"laserstreamWebsocket": 8000000
}
}{
"statusCode": 400,
"message": "無効なプロジェクトID",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "欠落または無効なAPIキー",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "このプロジェクトに対してAdmin APIが有効になっていません",
"error": "Forbidden"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests",
"error": "Too Many Requests"
}{
"statusCode": 500,
"message": "内部サーバーエラー",
"error": "Internal Server Error"
}概要
現在のクレジットサイクルにおけるプロジェクトのクレジット消費の全体像を返し、残りのクレジット、サブスクリプションプランの詳細、およびサービスタイプ(RPC、DAS、gRPC、WebSocketなど)別のリクエストの内訳を含みます。 すべてのクレジット数値は、サブスクリプションの請求の基準点から導き出されたcreditCycleに関連付けられています。これは、クレジットが蓄積およびリセットされる期間です。すべてのプロジェクトに含まれており、無料プランも含まれます。subscriptionDetails.billingCycleは請求ウィンドウであり、情報の提供を目的としており、無料プランには適用されません(無料プランは請求されません)。
リクエストパラメータ
レスポンスフィールド
YYYY-MM-DD形式(UTC)で指定されます。YYYY-MM-DD形式(UTC)で指定されます。creditCycleと一致します。YYYY-MM-DD形式で指定されます。YYYY-MM-DD形式で指定されます。"business", "professional")。creditsUsedと正確には一致しない場合があります。laserstreamGrpc、laserstreamWebsocket)はここには表示されず、dataTransferを参照してください。フィールド: rpc、enhancedApi、walletApi、das、webhooks、preConfirmations、archival、photon、other。creditsでも表示され、requestsには表示されません。フィールド: laserstreamGrpc、laserstreamWebsocket。リクエストパラメータ
承認
クエリパラメータとして渡されるAPIキー。
パスパラメータ
使用状況を取得するプロジェクトID。APIキーに関連付けられたプロジェクトと一致する必要があります。
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
レスポンス
プロジェクトの使用状況が正常に取得されました。
現在のクレジットサイクルで残っているクレジット数を示します。計算は creditsLimit - regularCreditsUsed で行われ、0で切り捨てられます。
487500
現在のクレジットサイクルで消費された総クレジット数です。通常のクレジットと前払いクレジットの両方を含みます。
12500
残っている事前払いクレジット数。
50000
現在のクレジットサイクルで消費された前払いクレジットの数です。
0
この応答で示されるすべてのクレジット数が対象とする期間 — クレジットが蓄積されリセットされる期間であり、サブスクリプションの請求アンカーに基づいて決定されます。無料プランなど請求されないプランを含むすべてのプランに常に含まれています。
Show child attributes
Show child attributes
プロジェクトのサブスクリプションプランと請求サイクルに関する詳細です。
Show child attributes
Show child attributes
現在のクレジットサイクルにおける製品別のクレジット消費数(完全なクレジット単位)を示します。すべての製品を網羅します。値は未処理のまま累計され、最終的に請求と一致するように丸められるため、製品ごとのクレジットが丸めた後で creditsUsed とぴったり一致しないことがあります。
Show child attributes
Show child attributes
リクエスト計測製品のみの現在のクレジットサイクルのリクエスト数です。レーザー・ストリーム製品(laserstreamGrpc, laserstreamWebsocket)はここに表示されません — dataTransfer を参照。
Show child attributes
Show child attributes
現在のクレジットサイクルで転送されたバイト数を示します。転送量で課金されるレーザー・ストリーム製品のみが対象です。これらの製品はデータ転送料で請求され、リクエスト数で請求されることはないため、credits には表示されますが、requests には表示されません。
Show child attributes
Show child attributes
このページは役に立ちましたか?
curl --request GET \
--url 'https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key='import requests
url = "https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.helius.xyz/v0/admin/projects/{id}/usage?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"creditsRemaining": 486100,
"creditsUsed": 13900,
"prepaidCreditsRemaining": 50000,
"prepaidCreditsUsed": 0,
"creditCycle": {
"start": "2026-04-01",
"end": "2026-05-01"
},
"subscriptionDetails": {
"billingCycle": {
"start": "2026-04-01",
"end": "2026-05-01"
},
"creditsLimit": 500000,
"plan": "business"
},
"credits": {
"rpc": 4500,
"enhancedApi": 1200,
"walletApi": 0,
"das": 5000,
"webhooks": 800,
"laserstreamGrpc": 1500,
"laserstreamWebsocket": 800,
"preConfirmations": 100,
"archival": 0,
"photon": 0,
"other": 0
},
"requests": {
"rpc": 4500,
"enhancedApi": 1200,
"walletApi": 0,
"das": 5000,
"webhooks": 800,
"preConfirmations": 50,
"archival": 0,
"photon": 0,
"other": 0
},
"dataTransfer": {
"laserstreamGrpc": 15000000,
"laserstreamWebsocket": 8000000
}
}{
"statusCode": 400,
"message": "無効なプロジェクトID",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "欠落または無効なAPIキー",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "このプロジェクトに対してAdmin APIが有効になっていません",
"error": "Forbidden"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests",
"error": "Too Many Requests"
}{
"statusCode": 500,
"message": "内部サーバーエラー",
"error": "Internal Server Error"
}