跳转到主要内容

下新订单

通过 API 购买新代理——查看可用项、计算价格、下单并获取购买的 IP。

本指南介绍如何通过 API 从头购买新代理——查看可用项、计算价格、下单并获取购买的 IP。

每个请求都使用您账户后台的个人 API 密钥如何获取 API 密钥)。在以下示例中,请将 YOUR_API_KEY 替换为您自己的密钥。如需用账户余额支付,请使用 paymentId = 1

⚠️ 下单步骤会从您的余额扣款。请务必先在计算步骤确认费用。

流程概览

  1. 查看余额。

  2. 查看可订购内容(国家、周期)。

  3. 选择支付方式(或使用余额)。

  4. 计算价格。

  5. 下单。

  6. 获取购买的代理。

步骤 1 — 查看余额

确认余额足够完成购买。

接口地址

GET https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/balance/get

响应

{
  "status": "success",
  "data": { "summ": 10 },
  "errors": []
}

步骤 2 — 查看可订购内容

Reference List 返回下单所需的全部信息:国家、周期、目标、运营商和轮换(移动代理)。复制您需要的 countryIdperiodId

接口地址

GET https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/reference/list/{type}

路径参数

名称

说明

type

ipv4

代理类型(ipv4、ipv6、mobile、isp、mix、mix_isp)。

示例

https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/reference/list/ipv4

响应

{
  "status": "success",
  "data": {
    "items": [
      {
        "country": [ { "id": 561, "name": "France", "alpha3": "FRA" } ],
        "period": [ { "id": "1m", "name": "1 month" } ]
      }
    ]
  },
  "errors": []
}

步骤 3 — 选择支付方式

列出可用的支付方式,并复制您想要的 id 作为 paymentId。如需用余额支付,直接使用 paymentId = 1

接口地址

GET https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/balance/payments/list

响应

{
  "status": "success",
  "data": {
    "items": [
      { "id": "30", "name": "Visa / MasterCard" },
      { "id": "41", "name": "USDT (TRC-20)" },
      { "id": "29", "name": "PayPal" },
      { "id": "35", "name": "Binance" }
    ]
  },
  "errors": []
}

步骤 4 — 计算价格

购买前先计算订单价格。批量和租期折扣的应用方式与网站一致。此步骤不会扣款。

请求体字段取决于代理类型。通用字段如下;IPv6 还需传 protocol,移动代理传 operatorId + rotationId,住宅代理用 tarifId——均来自 Reference List。

接口地址

POST https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/order/calc

请求体

名称

类型

说明

countryId

Number

Reference List 中的国家 ID(步骤 2)。

periodId

String

Reference List 中的租期 ID。

quantity

Number

要订购的代理数量。

paymentId

Number

支付方式 ID。1 = 余额,43 = 已添加的银行卡。

coupon (可选)

String

优惠券代码(如有)。

authorization (可选)

String

授权方式。留空则使用 用户名:密码。

customTargetName (可选)

String

如需要,可填自定义目标名称。

示例

https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/order/calc

响应 — shows the total, your balance, the discount and the per-proxy price:

{
  "status": "success",
  "data": {
    "warning": "",
    "balance": 2000,
    "total": 9,
    "quantity": 5,
    "currency": "USD",
    "discount": 0.45,
    "price": 1.8
  },
  "errors": []
}

步骤 5 — 下单(从余额扣款)

当计算出的价格无误时,下单。此步骤会从您的余额扣款。使用与步骤 4 相同的参数。从响应中复制 orderId

接口地址

POST https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/order/make

请求体

名称

类型

说明

countryId

Number

Reference List 中的国家 ID(步骤 2)。

periodId

String

Reference List 中的租期 ID。

quantity

Number

要订购的代理数量。

paymentId

Number

支付方式 ID。1 = 余额,43 = 已添加的银行卡。

coupon (可选)

String

优惠券代码(如有)。

authorization (可选)

String

授权方式。留空则使用 用户名:密码。

generateAuth (可选)

String

Y/N — 创建自定义授权(默认 N)。

示例

https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/order/make

响应 — returns the new order ID and your updated balance:

{
  "status": "success",
  "data": {
    "orderId": 2426273,
    "total": 16.2,
    "listBaseOrderNumbers": [ "3388485_57471911" ],
    "balance": 1776.88
  },
  "errors": []
}

步骤 6 — 获取购买的代理

获取购买的代理。按上一步的 orderId 筛选即可查看确切购买内容。

接口地址

GET https://proxy-seller.com/personal/api/v1/YOUR_API_KEY/proxy/list/{type}

响应

{
  "status": "success",
  "data": {
    "items": [
      {
        "id": "0678564",
        "order_id": "123456",
        "ip": "31.6.33.97",
        "protocol": "HTTP",
        "port_http": 12345,
        "port_socks": 12345,
        "login": "ruht5734hg",
        "password": "gou5h437g",
        "country": "Belgium",
        "country_alpha3": "BEL",
        "status_type": "ACTIVE",
        "date_start": "23.06.2024",
        "date_end": "23.07.2024"
      }
    ]
  },
  "errors": []
}

完整 API 文档

这是否解答了您的问题?