跳转至

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)。大小写不敏感,建议大写。

Responses

Success

Response fields

Name Type Description
exchangeFilters Array<>
serverTime integer(int64)
symbols Array<ExchangeSymbol>
timezone string

rate_limited

{
    "code": -1003,
    "msg": "Too many requests; current request has 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)

Responses

Success

Response fields

Array of PairsResult:

Name Type Description
baseToken string
quoteToken string
symbol string

rate_limited

{
    "code": -1003,
    "msg": "Too many requests; current request has 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

Responses

Success

Response fields

Empty JSON object {}.

Empty object {}

rate_limited

{
    "code": -1003,
    "msg": "Too many requests; current request has 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

Responses

Success

Response fields

Name Type Description
serverTime integer(int64)

rate_limited

{
    "code": -1003,
    "msg": "Too many requests; current request has 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)

Responses

Success

Response fields

Name Type Description
ip string

rate_limited

{
    "code": -1003,
    "msg": "Too many requests; current request has 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