跳转到主要内容

基本流程

API 的典型使用流程分为三个步骤:
1

获取报价

为所需交易对请求报价并指定操作金额。
2

创建订单

使用返回的 quoteId 在 5 秒内创建买入订单。
3

追踪

查询订单状态并追踪加密货币发送。

1. 获取报价

curl -X GET "https://api.pixusglobal.com/client/quote?symbols=USDTBRL&amount=1000" \
  -H "Authorization: Bearer your-token"
响应:
{
  "symbol": "USDTBRL",
  "price": "5.42",
  "totalCost": "5420.00",
  "totalFilled": "1000",
  "quoteId": "q_abc123",
  "expiresIn": 1755097046
}
报价在 5 秒后过期。收到 quoteId 后请立即创建订单。过期报价将返回 400 错误。

2. 创建订单

curl -X POST "https://api.pixusglobal.com/client/order" \
  -H "Authorization: Bearer your-token" \
  -H "Content-Type: application/json" \
  -d '{ "quoteId": "q_abc123" }'

3. 查询订单状态

curl -X GET "https://api.pixusglobal.com/client/orders/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer your-token"

4. 追踪加密货币发送

curl -X GET "https://api.pixusglobal.com/client/orders/550e8400-e29b-41d4-a716-446655440000/tracking" \
  -H "Authorization: Bearer your-token"

后续步骤