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。示例中的订单号和余额都是示例值。