快速开始
6 步完成 API 接入,从下单到拿到 IP 凭据通常不到 1 分钟
1
创建 API Token
登录控制台 → API 管理 → 新建 Token
2
查询余额 / 定价
GET /balance / /pricing 查询账户余额、各 IP 类型价格
3
下单购买
POST /purchase 提交订单,自动从余额扣费
4
轮询订单状态
GET /orders/{order_no} 等待 status=completed(约 30-60 秒)
5
获取连接凭据
响应中包含 vless_link / socks5_url / http_url 三协议接入信息
6
接入业务
复制到 V2RayN / curl / 任意支持的客户端使用
认证方式
所有 API 接口都通过 Bearer Token 鉴权(HTTP Header)
API 基础地址:
https://proxbits.com/api/openhttp
GET /api/open/balance HTTP/1.1 Host: proxbits.com Authorization: Bearer YOUR_API_TOKEN Content-Type: application/json
json
// 通用响应格式
{
"code": 200, // 200=成功,其他=失败
"msg": "SUCCESS",
"data": { /* ... */ }
}
// 常见错误码
// 401 - Token 无效或缺失
// 403 - 权限不足(账户被禁用等)
// 404 - 资源不存在(订单/IP id 错误等)
// 400 - 请求参数错误 / 余额不足可购 IP 类型
当前支持的 IP 类型与地区。完整定价见
GET /api/open/pricing。| 类型代码 | 名称 | 可购地区 | 说明 |
|---|---|---|---|
| static_residential | 静态住宅 ISP | 美国 (US) | 30 / 60 / 90 天周期,独享 IP |
API 接口文档
7 个核心接口,覆盖账户、定价、购买、查询、续费全流程
GET/api/open/balance
查询账户余额(USD)。
请求示例
bash
curl 'https://proxbits.com/api/open/balance' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": {
"balance": 102.20,
"currency": "USD"
}
}GET/api/open/offerings
查询全部可购国家 + 实时库存 + 售价(30/60/90 天)。实时拉取,Redis 60s 缓存。
请求示例
bash
curl 'https://proxbits.com/api/open/offerings' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": [
{
"area_id": 16,
"country_name": "United States",
"in_stock": true,
"upstream_price_30d": 4.00,
"price_30d": 8.00,
"price_60d": 16.00,
"price_90d": 24.00
}
// ... 32+ countries
]
}缺货国家 (in_stock=false) 仍会返回但不可购买。下单前用此接口拿 area_id。
GET/api/open/pricing
[兼容老接口] 简化版定价,建议改用 /api/open/offerings。
请求示例
bash
curl 'https://proxbits.com/api/open/pricing' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": [
{
"area_id": 16,
"country": "United States",
"country_name": "United States",
"ip_type": "static_residential",
"price_per_month_usd": 8.00
}
// ... 32+ countries
]
}POST/api/open/purchase
下单购买(异步,返回 order_no,需轮询订单状态)。area_id 必填——可购列表见 GET /api/open/offerings。
请求参数
| 参数名 | 必填 | 类型 | 说明 |
|---|---|---|---|
area_id | 是 | int | 国家 id(如美国=16、香港=101、日本=36,完整列表见 GET /api/open/offerings) |
qty | 否 | int | 数量,1-50(默认 1) |
duration_months | 否 | int | 时长,1/2/3(对应 30/60/90 天,默认 1) |
auto_renewal | 否 | bool | 是否自动续费(默认 false) |
请求示例
bash
curl -X POST 'https://proxbits.com/api/open/purchase' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"area_id": 16,
"qty": 1,
"duration_months": 1,
"auto_renewal": false
}'响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": {
"order_no": "LA-20260520093000-A1B2C3",
"order_id": "uuid-xxx",
"status": "processing",
"qty": 1,
"estimated_amount_usd": 8.00
}
}下单同步从余额扣款(按定价表预估金额)。订单失败时自动退回余额。
GET/api/open/orders/{order_no}
查询订单状态。当 status=completed 时响应包含已购 IP 的完整凭据。
请求示例
bash
curl 'https://proxbits.com/api/open/orders/LA-20260520093000-A1B2C3' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": {
"order_no": "LA-20260520093000-A1B2C3",
"status": "completed",
"qty": 1,
"amount_usd": 8.00,
"created_at": "2026-05-20T09:30:00Z",
"ips": [
{
"id": "uuid-of-proxy-ip",
"real_ip": "168.158.175.227",
"country": "US",
"relay_ip": "5.78.45.83",
"vless_port": 443,
"socks5_port": 1080,
"http_port": 8080,
"relay_user": "la-u583f6e3b-44b02a74",
"relay_password": "PVZLsW6t6HwAz4N7BVSOSznAz4433H5O",
"vless_uuid": "fdbf84fb-b473-4ec7-9d05-9d83fb8a986c",
"vless_link": "vless://...?security=reality&...",
"socks5_url": "socks5://la-u...:PVZ...@5.78.45.83:1080",
"http_url": "http://la-u...:PVZ...@5.78.45.83:8080",
"reality_public_key": "MrwGZqEZO3w5T1g5aetvueYf7jO4UVBCdJxaSqLw6kE",
"reality_short_id": "3ef1d4113fb6de71",
"reality_sni": "www.microsoft.com",
"expire_at": "2026-06-20T09:30:00Z",
"status": "active",
"auto_renewal": false
}
]
}
}status 可能值:processing(处理中)/ completed(完成)/ failed(失败)。失败时 data.error 包含错误信息。
GET/api/open/ips
列出当前账户所有已购代理 IP(支持分页 + 状态筛选)。
请求参数
| 参数名 | 必填 | 类型 | 说明 |
|---|---|---|---|
status | 否 | string | active / expired / invalid |
page | 否 | int | 页码(默认 1) |
page_size | 否 | int | 每页数量(默认 20,最大 100) |
请求示例
bash
curl 'https://proxbits.com/api/open/ips?status=active&page=1&page_size=20' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": {
"total": 1,
"page": 1,
"page_size": 20,
"items": [ /* same shape as orders/{order_no} ips[] */ ]
}
}GET/api/open/ips/{ip_id}
查询单个 IP 详情(含三协议凭据)。
请求示例
bash
curl 'https://proxbits.com/api/open/ips/uuid-of-proxy-ip' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": { /* same shape as the ip object in orders detail */ }
}POST/api/open/renew
批量续费(同步)。续费不变 UUID / 凭据 / 出口 IP,只延长到期时间。
请求参数
| 参数名 | 必填 | 类型 | 说明 |
|---|---|---|---|
ip_ids | 是 | string[] | 要续费的 IP id 列表 |
months | 否 | int | 续费时长 1/2/3 个月(默认 1) |
请求示例
bash
curl -X POST 'https://proxbits.com/api/open/renew' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"ip_ids": ["uuid-1", "uuid-2"],
"months": 1
}'响应示例
json
{
"code": 200,
"msg": "SUCCESS",
"data": {
"order_no": "LA-R-20260520093500-X9Y8Z7",
"status": "completed",
"amount_usd": 16.00,
"qty": 2
}
}完整示例
下单 → 轮询 → 拿到三协议凭据 全流程示例
Python
Node.js
python
import time
import requests
API_BASE = "https://proxbits.com"
HEADERS = {"Authorization": "Bearer YOUR_API_TOKEN"}
def main():
# 1. 查余额
bal = requests.get(f"{API_BASE}/api/open/balance", headers=HEADERS).json()
print(f"账户余额: ${bal['data']['balance']:.2f}")
# 2. 下单 1 个 IP, 1 个月
r = requests.post(
f"{API_BASE}/api/open/purchase",
headers={**HEADERS, "Content-Type": "application/json"},
json={"qty": 1, "duration_months": 1},
).json()
order_no = r["data"]["order_no"]
print(f"下单成功: {order_no}, 预扣 ${r['data']['estimated_amount_usd']}")
# 3. 轮询订单(最多 3 分钟)
for _ in range(60):
info = requests.get(
f"{API_BASE}/api/open/orders/{order_no}", headers=HEADERS
).json()
status = info["data"]["status"]
if status == "completed":
for ip in info["data"]["ips"]:
print(f"\nIP {ip['real_ip']} ({ip['country']}):")
print(f" VLESS: {ip['vless_link']}")
print(f" SOCKS5: {ip['socks5_url']}")
print(f" HTTP: {ip['http_url']}")
break
if status == "failed":
print(f"购买失败: {info['data'].get('error')}")
break
time.sleep(3)
main()常见问题
关于 API 使用的常见疑问解答
Q: VLESS / SOCKS5 / HTTP 三种协议有什么区别?
A: 一个 IP 同时支持三种协议接入,凭据相同(user/password 相同),路由到同一个出口 IP。VLESS+Reality 抗审查能力最强,适合 v2rayN / Clash 用户;SOCKS5 / HTTP 适合指纹浏览器(AdsPower / Multilogin)和命令行工具(curl / requests)。
Q: 购买后多久可以使用?
A: docs.api.faq.a2
Q: 续费会不会换 IP / 改凭据?
A: 不会。续费只延长 expire_at 时间,UUID / 密码 / 出口 IP 全部保持不变,客户端无需重新配置。
Q: 为什么我看不到底层原始 socks5 凭据?
A: 出于安全考虑,底层 socks5 用户名/密码不会暴露给客户。所有流量都通过 ProxBits 中转节点,使用我们分配的独立凭据,避免凭据泄露后被滥用。
Q: 支持哪些时长?
A: 目前只支持 30 / 60 / 90 天三种周期(对应请求参数 duration_months = 1 / 2 / 3)。
Q: 数量上限?
A: 单笔订单 1-50 个,账户级别无上限(受余额限制)。批量购买时每个 IP 顺序采购,预计 30 秒/个。
