API v2 文件
從你自己的面板或程式取得服務清單、下單並查詢狀態。格式和大多數 SMM 面板相同。
基本資訊
- 網址
https://panelclo.com/api/v2- 方法
POST- 格式
- 表單欄位或 JSON 都可以。回應一律是 JSON。
- 金鑰
- 每次請求都要在名為 key 的欄位帶上你的 API 金鑰。
- 限制
- 每組金鑰每分鐘 300 次請求。10 分鐘內出現 30 次錯誤金鑰,該網路會暫停一段時間。
金鑰在主控台的 API 頁面。 開啟 API 金鑰
服務清單action=services
列出所有服務:編號、名稱、分類、每 1,000 個價格、最小和最大下單量,以及能否補量、能否取消。
| 欄位 | 說明 |
|---|---|
key | 你的 API 金鑰 |
action | services |
請求
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=services回應
[
{
"service": 159,
"name": "YouTube Views, Quick",
"type": "Default",
"category": "YouTube Views",
"rate": "0.4290",
"min": 500,
"max": 1000000,
"refill": false,
"cancel": true
}
]新訂單action=add
建立訂單,從餘額扣款,並回傳新的訂單編號。
| 欄位 | 說明 |
|---|---|
key | 你的 API 金鑰 |
action | add |
service | 服務編號 |
link | 帳號或貼文的公開連結 |
quantity | 服務範圍內的數量 |
請求
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=159 \
-d link=https://www.youtube.com/watch?v=aBcD1234EfG \
-d quantity=1000回應
{
"order": "48213907"
}訂單狀態action=status
回傳一筆訂單的金額、起始數量、狀態和剩餘數量。狀態為 Pending、In progress、Completed、Partial 或 Canceled。
| 欄位 | 說明 |
|---|---|
key | 你的 API 金鑰 |
action | status |
order | 訂單編號 |
請求
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d order=48213907回應
{
"charge": "0.4290",
"start_count": 0,
"status": "Pending",
"remains": 1000,
"currency": "USD"
}多筆訂單狀態action=status
最多送出 100 個訂單編號,以逗號分隔。回應依訂單編號分開。
| 欄位 | 說明 |
|---|---|
key | 你的 API 金鑰 |
action | status |
orders | 以逗號分隔的訂單編號 |
請求
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d orders=48213907,51190264回應
{
"48213907": {
"charge": "0.4290",
"start_count": 0,
"status": "Pending",
"remains": 1000,
"currency": "USD"
},
"51190264": {
"error": "Incorrect order ID"
}
}餘額action=balance
以美元回傳你的餘額。
| 欄位 | 說明 |
|---|---|
key | 你的 API 金鑰 |
action | balance |
請求
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=balance回應
{
"balance": "42.5000",
"currency": "USD"
}補量action=refill
為補量選項中已完成的訂單申請補量,須在補量期限內。回傳補量申請編號。
| 欄位 | 說明 |
|---|---|
key | 你的 API 金鑰 |
action | refill |
order | 訂單編號 |
請求
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=refill \
-d order=48213907回應
{
"refill": "R-K7M2QX"
}取消action=cancel
取消等待中的訂單,金額退回餘額。最多 100 個訂單編號,以逗號分隔。
| 欄位 | 說明 |
|---|---|
key | 你的 API 金鑰 |
action | cancel |
orders | 以逗號分隔的訂單編號 |
請求
curl -X POST https://panelclo.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=cancel \
-d orders=48213907回應
[
{
"order": "48213907",
"cancel": 1
}
]錯誤
錯誤會以含 error 欄位的 JSON 回傳。
Invalid API key- 金鑰錯誤,或已換成新的金鑰。
Invalid service- 沒有這個編號的服務。
Invalid link- 連結不是完整的 http(s) 網址。
Quantity out of range- 數量低於最小值或高於最大值。
Not enough funds on balance- 請儲值後重新送出訂單。
Incorrect order ID- 你的帳號中沒有這個編號的訂單。
Too many requests- 請等一分鐘再試。
範例使用服務 #159,每 1,000 個 $0.429。範例中的訂單編號和餘額都是範例值。