Public¶
公开接口(无需 API Key):连通性检查与交易所元数据。
- 先用
ping/time验证可达性与时钟偏差。 exchangeInfo列出交易客户端所需的交易对与过滤器。pairs返回精简交易对列表。
Pepperstone Crypto Public OpenAPI — Public 1.0.0¶
Pepperstone Crypto 公开 REST API。
需鉴权的接口使用 HMAC。签名规则见开发者文档「鉴权」章节。WebSocket 行情与私有流另见 WebSocket 文档。除另行说明外,时间均为 UTC 毫秒。
Servers¶
| Description | URL |
|---|---|
| Production | https://api.pcrypto.com |
Public¶
GET /openapi/v1/exchangeInfo¶
获取交易规则
Description
所需类型:—(无需 API Key)
输入参数
| 参数 | 位置 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
symbol |
query | string | 否 | 交易对(如 BTCUSDT)。大小写不敏感,建议大写。 |
GET /openapi/v1/exchangeInfocurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/exchangeInfo'{
"timezone": "UTC",
"serverTime": 1713100000000,
"exchangeFilters": [],
"symbols": [
{
"symbol": "BTCUSDT",
"status": "TRADING",
"baseAsset": "BTC",
"baseAssetPrecision": 8,
"quoteAsset": "USDT",
"quoteAssetPrecision": 8,
"orderTypes": [
"LIMIT",
"MARKET",
"STOP_LOSS_LIMIT",
"STOP_LOSS",
"TAKE_PROFIT_LIMIT",
"TAKE_PROFIT"
],
"filters": [
{
"filterType": "PRICE_FILTER",
"minPrice": "0.00000100",
"maxPrice": "100000.00000000",
"tickSize": "0.00000100"
},
{
"filterType": "LOT_SIZE",
"minQty": "0.00100000",
"maxQty": "100000.00000000",
"stepSize": "0.00100000"
},
{
"filterType": "MIN_NOTIONAL",
"minNotional": "10.00000000"
}
]
}
]
}Responses
Success
Response fields
| Name | Type | Description |
|---|---|---|
exchangeFilters |
Array<> | |
serverTime |
integer(int64) | |
symbols |
Array<ExchangeSymbol> | |
timezone |
string |
rate_limited
Response fields
Error payload. Most API errors (including auth failures such as -1002) return HTTP 200 — see Error codes → HTTP status mapping. HTTP 400 for missing or invalid request parameters. HTTP 429 when rate limited.
| Name | Type | Description |
|---|---|---|
code |
integer | |
msg |
string |
GET /openapi/v1/pairs¶
获取交易对列表
Description
所需类型:—(无需 API Key)
GET /openapi/v1/pairscurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/pairs'[
{
"symbol": "BTCUSDT",
"quoteToken": "USDT",
"baseToken": "BTC"
}
]Responses
Success
Response fields
Array of PairsResult:
| Name | Type | Description |
|---|---|---|
baseToken |
string | |
quoteToken |
string | |
symbol |
string |
rate_limited
Response fields
Error payload. Most API errors (including auth failures such as -1002) return HTTP 200 — see Error codes → HTTP status mapping. HTTP 400 for missing or invalid request parameters. HTTP 429 when rate limited.
| Name | Type | Description |
|---|---|---|
code |
integer | |
msg |
string |
GET /openapi/v1/ping¶
连通性检测
Description
所需类型:—(无需 API Key)
Health
GET /openapi/v1/pingcurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/ping'Responses
Success
Response fields
Empty JSON object {}.
Empty object {}
rate_limited
Response fields
Error payload. Most API errors (including auth failures such as -1002) return HTTP 200 — see Error codes → HTTP status mapping. HTTP 400 for missing or invalid request parameters. HTTP 429 when rate limited.
| Name | Type | Description |
|---|---|---|
code |
integer | |
msg |
string |
GET /openapi/v1/time¶
获取服务器时间
Description
所需类型:—(无需 API Key)
Server time
GET /openapi/v1/timecurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/time'{
"serverTime": 1713100000000
}Responses
Success
Response fields
| Name | Type | Description |
|---|---|---|
serverTime |
integer(int64) |
rate_limited
Response fields
Error payload. Most API errors (including auth failures such as -1002) return HTTP 200 — see Error codes → HTTP status mapping. HTTP 400 for missing or invalid request parameters. HTTP 429 when rate limited.
| Name | Type | Description |
|---|---|---|
code |
integer | |
msg |
string |
GET /openapi/v1/user/ip¶
获取调用方 IP
Description
所需类型:—(无需 API Key)
GET /openapi/v1/user/ipcurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/user/ip'{
"ip": "203.0.113.1"
}Responses
Success
Response fields
| Name | Type | Description |
|---|---|---|
ip |
string |
rate_limited
Response fields
Error payload. Most API errors (including auth failures such as -1002) return HTTP 200 — see Error codes → HTTP status mapping. HTTP 400 for missing or invalid request parameters. HTTP 429 when rate limited.
| Name | Type | Description |
|---|---|---|
code |
integer | |
msg |
string |
Schemas¶
EmptyObject¶
ErrorBody¶
| Name | Type | Description |
|---|---|---|
code |
integer | |
msg |
string |
ExchangeInfo¶
| Name | Type | Description |
|---|---|---|
exchangeFilters |
Array<> | |
serverTime |
integer(int64) | |
symbols |
Array<ExchangeSymbol> | |
timezone |
string |
ExchangeSymbol¶
| Name | Type | Description |
|---|---|---|
baseAsset |
string | |
baseAssetPrecision |
integer | |
filters |
Array<SymbolFilter> | |
orderTypes |
Array<string> | |
quoteAsset |
string | |
quoteAssetPrecision |
integer | |
status |
string | |
symbol |
string |
Ip¶
| Name | Type | Description |
|---|---|---|
ip |
string |
PairsResult¶
| Name | Type | Description |
|---|---|---|
baseToken |
string | |
quoteToken |
string | |
symbol |
string |
ServerTime¶
| Name | Type | Description |
|---|---|---|
serverTime |
integer(int64) |
SymbolFilter¶
| Name | Type | Description |
|---|---|---|
askMultiplierDown |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
askMultiplierUp |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
avgPriceMins |
string | |
bidMultiplierDown |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
bidMultiplierUp |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
filterType |
string | |
maxNotional |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
maxNumAlgoOrders |
integer | |
maxNumOrders |
integer | |
maxPrice |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
maxQty |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
minNotional |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
minPrice |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
minQty |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
multiplierDown |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
multiplierUp |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
priceDown |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
priceUp |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
stepSize |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
tickSize |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| ApiKeyHmac | apiKey | 需要请求头 `x-ptrader-apikey`,以及 `timestamp` 与 `signature`。签名规则见「鉴权」文档。 | |
| ApiKeyOnly | apiKey | 仅需 API Key 请求头(无需 HMAC)。用于 listenKey 的创建、续期与关闭。 |
Tags¶
| Name | Description |
|---|---|
| Public |