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 |
GET /openapi/quote/v1/avgPricecurl -sS -X GET 'https://api.pcrypto.com/openapi/quote/v1/avgPrice?symbol=BTCUSDT'{
"mins": 5,
"price": "9.09671867"
}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
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
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 |
GET /openapi/quote/v1/depthcurl -sS -X GET 'https://api.pcrypto.com/openapi/quote/v1/depth?limit=20&symbol=BTCUSDT'{
"lastUpdateId": 1027024,
"bids": [
[
"4.00000000",
"431.00000000"
]
],
"asks": [
[
"4.00000200",
"12.00000000"
]
]
}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
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
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 |
GET /openapi/quote/v1/klinescurl -sS -X GET 'https://api.pcrypto.com/openapi/quote/v1/klines?interval=1m&limit=10&symbol=BTCUSDT'[
{
"time": "1713100000000",
"open": "0.01634790",
"high": "0.80000000",
"low": "0.01575800",
"close": "0.01577100",
"volume": "148976.11427815"
}
]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
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
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 |
GET /openapi/quote/v1/ticker/24hrcurl -sS -X GET 'https://api.pcrypto.com/openapi/quote/v1/ticker/24hr'{
"symbol": "BTCUSDT",
"priceChange": "-94.99999800",
"priceChangePercent": "-95.960",
"weightedAvgPrice": "0.29628482",
"prevClosePrice": "0.10002000",
"lastPrice": "4.00000200",
"lastQty": "200.00000000",
"bidPrice": "4.00000000",
"bidQty": "100.00000000",
"askPrice": "4.00000200",
"askQty": "100.00000000",
"openPrice": "99.00000000",
"highPrice": "100.00000000",
"lowPrice": "0.10000000",
"volume": "8913.30000000",
"quoteVolume": "15.30000000",
"openTime": 1713100000000,
"closeTime": 1713186400000,
"firstId": 0,
"lastId": 100,
"count": 101
}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
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 |
GET /openapi/quote/v1/ticker/bookTickercurl -sS -X GET 'https://api.pcrypto.com/openapi/quote/v1/ticker/bookTicker'{
"symbol": "BTCUSDT",
"bidPrice": "4",
"bidQty": "100",
"askPrice": "4.000002",
"askQty": "100"
}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
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 |
GET /openapi/quote/v1/ticker/pricecurl -sS -X GET 'https://api.pcrypto.com/openapi/quote/v1/ticker/price'{
"symbol": "BTCUSDT",
"price": "4.00000200"
}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
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 |
GET /openapi/quote/v1/tradescurl -sS -X GET 'https://api.pcrypto.com/openapi/quote/v1/trades?limit=20&symbol=BTCUSDT'[
{
"id": 28457,
"price": "4.00000100",
"qty": "12.00000000",
"quoteQty": "48.000012",
"time": 1713100000000,
"isBuyerMaker": true
}
]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
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
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:
- BookTicker
- Array<BookTicker>
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:
- Ticker24hr
- Array<Ticker24hr>
TickerPrice¶
| Name | Type | Description |
|---|---|---|
price |
string | |
symbol |
string |
TickerPriceResponse¶
Single price object, or an array when listing.
One of:
- TickerPrice
- Array<TickerPrice>
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 |