API 文档
PHP 代码示例连接
- HTTP 方法
POST- API 地址
https://onesmm.com/api/v2- 响应格式
JSON
services服务列表
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
services |
响应示例
[
{
"service": 1,
"name": "Followers",
"type": "Default",
"category": "First Category",
"rate": "0.90",
"min": "50",
"max": "10000",
"refill": true,
"cancel": true
},
{
"service": 2,
"name": "Comments",
"type": "Custom Comments",
"category": "Second Category",
"rate": "8",
"min": "10",
"max": "1500",
"refill": false,
"cancel": true
}
]
add创建订单
响应示例
{
"order": 23501
}
status订单状态
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
status |
order |
订单编号 |
响应示例
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
multi_status多个订单状态
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
status |
orders |
订单编号列表(以逗号分隔,最多 100 个编号) |
响应示例
{
"1": {
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
},
"10": {
"error": "Incorrect order ID"
},
"100": {
"charge": "1.44219",
"start_count": "234",
"status": "In progress",
"remains": "10",
"currency": "USD"
}
}
refill创建补量请求
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
refill |
order |
订单编号 |
响应示例
{
"refill": "1"
}
multi_refill创建多个补量请求
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
refill |
orders |
订单编号列表(以逗号分隔,最多 100 个编号) |
响应示例
[
{
"order": 1,
"refill": 1
},
{
"order": 2,
"refill": 2
},
{
"order": 3,
"refill": {
"error": "Incorrect order ID"
}
}
]
refill_status获取补量状态
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
refill_status |
refill |
补量编号 |
响应示例
{
"status": "Completed"
}
multi_refill_status获取多个补量状态
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
refill_status |
refills |
补量编号列表(以逗号分隔,最多 100 个编号) |
响应示例
[
{
"refill": 1,
"status": "Completed"
},
{
"refill": 2,
"status": "Rejected"
},
{
"refill": 3,
"status": {
"error": "Refill not found"
}
}
]
cancel创建取消请求
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
cancel |
orders |
订单编号列表(以逗号分隔,最多 100 个编号) |
响应示例
[
{
"order": 9,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 2,
"cancel": 1
}
]
balance用户余额
| 参数 | 说明 |
|---|---|
key |
您的 API 密钥 |
action |
balance |
响应示例
{
"balance": "100.84292",
"currency": "USD"
}