Skip to content

Market Data

Market data REST under /openapi/quote/v1 only. Legacy /openapi/v1 market aliases have been removed and return 404.

Use these endpoints for snapshots (depth, trades, klines, tickers). For continuous depth updates, pair REST snapshots with the WebSocket local book sync flow.

Pepperstone Crypto Public OpenAPI — Market Data 1.0.0

Pepperstone Crypto public REST API.

Authenticate with HMAC where required. See Authentication in the developer documentation for signing details. WebSocket market and private streams are documented separately. All times are UTC milliseconds unless noted.


Servers

Description URL
Production https://api.pcrypto.com

Market Data


GET /openapi/quote/v1/avgPrice

Get average price

Description

Required Type: — (no API key)

Input parameters

Parameter In Type Required Default Description
symbol query string Yes

Responses

Success

Response fields

Average price. mins is always 5; price is a decimal string.

Name Type Description
mins integer
price number Decimal amount as a JSON number (BigDecimal on the wire).

missing_parameter

{
    "code": -1010,
    "msg": "Missing required parameter 'symbol'"
}

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

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/quote/v1/depth

Get order book depth

Description

Required Type: — (no API key)

Input parameters

Parameter In Type Required Default Description
limit query integer No 100
symbol query string Yes

Responses

Success

Response fields

Order book depth snapshot. bids / asks are [price, qty] string pairs.

Name Type Description
asks Array<Array<string>> [[price, qty], …]
bids Array<Array<string>> [[price, qty], …]
lastUpdateId integer(int64)

missing_parameter

{
    "code": -1010,
    "msg": "Missing required parameter 'symbol'"
}

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

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/quote/v1/klines

Get klines

Description

Required Type: — (no API key)

Candlestick history. Response is an array of objects with named fields time, open, high, low, close, and volume (prices/qty as decimal strings; time is open time in ms). Optional startTime / endTime (Unix ms) bound the range; if only startTime is set, endTime defaults to now.

Input parameters

Parameter In Type Required Default Description
endTime query integer No Optional range end (Unix ms).
interval query string Yes
limit query integer No 500
startTime query integer No Optional range start (Unix ms). When set without endTime, endTime defaults to now.
symbol query string Yes

Responses

Success

Response fields

Array of Kline:

One candlestick. Fields: time (open time, ms, string), open / high / low / close / volume (decimal strings; volume may be null).

Name Type Description
close string Close price as a decimal string.
high string High price as a decimal string.
low string Low price as a decimal string.
open string Open price as a decimal string.
time string Kline open time in Unix milliseconds (serialized as a string).
volume string | null Base-asset volume as a decimal string; may be null.

missing_parameter

{
    "code": -1010,
    "msg": "Missing required parameter 'symbol'"
}

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

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/quote/v1/ticker/24hr

Get 24hr ticker

Description

Required Type: — (no API key)

Input parameters

Parameter In Type Required Default Description
symbol query string No

Responses

Success

Response fields

Single 24hr ticker object, or an array when listing all symbols.

Variant 1 — Ticker24hr

24hr ticker for one symbol.

Name Type Description
askPrice string
askQty string
bidPrice string
bidQty string
closeTime integer(int64)
count integer(int64)
firstId integer(int64)
highPrice string
lastId integer(int64)
lastPrice string
lastQty string
lowPrice string
openPrice string
openTime integer(int64)
prevClosePrice string
priceChange string
priceChangePercent string
quoteVolume string
symbol string
volume string
weightedAvgPrice string

Variant 2

Array of Ticker24hr:

24hr ticker for one symbol.

Name Type Description
askPrice string
askQty string
bidPrice string
bidQty string
closeTime integer(int64)
count integer(int64)
firstId integer(int64)
highPrice string
lastId integer(int64)
lastPrice string
lastQty string
lowPrice string
openPrice string
openTime integer(int64)
prevClosePrice string
priceChange string
priceChangePercent string
quoteVolume string
symbol string
volume string
weightedAvgPrice 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/quote/v1/ticker/bookTicker

Get book ticker

Description

Required Type: — (no API key)

Input parameters

Parameter In Type Required Default Description
symbol query string No

Responses

Success

Response fields

Single book ticker object, or an array when listing all symbols.

Variant 1 — BookTicker

Best bid/ask for one symbol.

Name Type Description
askPrice number Decimal amount as a JSON number (BigDecimal on the wire).
askQty number Decimal amount as a JSON number (BigDecimal on the wire).
bidPrice number Decimal amount as a JSON number (BigDecimal on the wire).
bidQty number Decimal amount as a JSON number (BigDecimal on the wire).
symbol string

Variant 2

Array of BookTicker:

Best bid/ask for one symbol.

Name Type Description
askPrice number Decimal amount as a JSON number (BigDecimal on the wire).
askQty number Decimal amount as a JSON number (BigDecimal on the wire).
bidPrice number Decimal amount as a JSON number (BigDecimal on the wire).
bidQty number Decimal amount as a JSON number (BigDecimal on the wire).
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/quote/v1/ticker/price

Get latest price

Description

Required Type: — (no API key)

Input parameters

Parameter In Type Required Default Description
symbol query string No

Responses

Success

Response fields

Single price object, or an array when listing.

Variant 1 — TickerPrice

Latest price. price is a decimal string.

Name Type Description
price string
symbol string

Variant 2

Array of TickerPrice:

Latest price. price is a decimal string.

Name Type Description
price 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/quote/v1/trades

Get recent trades

Description

Required Type: — (no API key)

Input parameters

Parameter In Type Required Default Description
limit query integer No 500
symbol query string Yes

Responses

Success

Response fields

Array of MarketTrade:

Recent public trade. Prices and quantities are decimal strings; id / time are numbers.

Name Type Description
id integer(int64)
isBuyerMaker boolean
price string
qty string
quoteQty string
time integer(int64)

missing_parameter

{
    "code": -1010,
    "msg": "Missing required parameter 'symbol'"
}

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

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

AvgPrice

Name Type Description
mins integer
price number Decimal amount as a JSON number (`BigDecimal` on the wire).

BookTicker

Name Type Description
askPrice number Decimal amount as a JSON number (`BigDecimal` on the wire).
askQty number Decimal amount as a JSON number (`BigDecimal` on the wire).
bidPrice number Decimal amount as a JSON number (`BigDecimal` on the wire).
bidQty number Decimal amount as a JSON number (`BigDecimal` on the wire).
symbol string

BookTickerResponse

Single book ticker object, or an array when listing all symbols.

One of:

ErrorBody

Name Type Description
code integer
msg string

Kline

Name Type Description
close string Close price as a decimal string.
high string High price as a decimal string.
low string Low price as a decimal string.
open string Open price as a decimal string.
time string Kline open time in Unix milliseconds (serialized as a string).
volume string | null Base-asset volume as a decimal string; may be null.

KlineArray

Type: Array<Kline>

MarketTrade

Name Type Description
id integer(int64)
isBuyerMaker boolean
price string
qty string
quoteQty string
time integer(int64)

PartialDepth

Name Type Description
asks Array<Array<string>> [[price, qty], …]
bids Array<Array<string>> [[price, qty], …]
lastUpdateId integer(int64)

Ticker24hr

Name Type Description
askPrice string
askQty string
bidPrice string
bidQty string
closeTime integer(int64)
count integer(int64)
firstId integer(int64)
highPrice string
lastId integer(int64)
lastPrice string
lastQty string
lowPrice string
openPrice string
openTime integer(int64)
prevClosePrice string
priceChange string
priceChangePercent string
quoteVolume string
symbol string
volume string
weightedAvgPrice string

Ticker24hrResponse

Single 24hr ticker object, or an array when listing all symbols.

One of:

TickerPrice

Name Type Description
price string
symbol string

TickerPriceResponse

Single price object, or an array when listing.

One of:

Security schemes

Name Type Scheme Description
ApiKeyHmac apiKey
ApiKeyOnly apiKey API key header only (no HMAC). Used for listenKey create, keepalive, and close.

Tags

Name Description
Market Data