Common¶
Balances, trade fees, and transaction history. Callable with Read only, Spot trade, or Wallet keys.
Pepperstone Crypto Public OpenAPI — Common 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 |
Common¶
GET /openapi/v1/account¶
Get spot account
Description
Required Type: Common (Read only / Spot trade / Wallet)
Input parameters
| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
x-ptrader-apikey |
header | string | Yes | API key. | |
recvWindow |
query | integer | No | 5000 |
Request validity window in milliseconds. Range 1–60000. |
signature |
query | string | Yes | HMAC-SHA256 signature, hex-encoded. See Authentication → HMAC signing. | |
timestamp |
query | integer | Yes | Request timestamp in Unix milliseconds. |
GET /openapi/v1/accountcurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/account?recvWindow=5000&signature={signature}×tamp={ts}' \
-H 'x-ptrader-apikey: {apiKey}'{
"canTrade": true,
"canDeposit": true,
"canWithdraw": true,
"accountType": "SPOT",
"updateTime": 1713100000000,
"balances": [
{
"asset": "BTC",
"free": "1.5",
"locked": "0.1"
},
{
"asset": "USDT",
"free": "10000",
"locked": "0"
}
],
"token": "USDT",
"daily": {
"cashInLimit": "100000",
"cashInRemaining": "90000",
"cashOutLimit": "100000",
"cashOutRemaining": "90000",
"totalWithdrawLimit": "100000",
"totalWithdrawRemaining": "90000"
},
"monthly": {
"cashInLimit": "1000000",
"cashInRemaining": "900000",
"cashOutLimit": "1000000",
"cashOutRemaining": "900000",
"totalWithdrawLimit": "1000000",
"totalWithdrawRemaining": "900000"
},
"annually": {
"cashInLimit": "10000000",
"cashInRemaining": "9000000",
"cashOutLimit": "10000000",
"cashOutRemaining": "9000000",
"totalWithdrawLimit": "10000000",
"totalWithdrawRemaining": "9000000"
}
}Responses
Success
Response fields
| Name | Type | Description |
|---|---|---|
accountType |
string | |
annually |
KycRemainingDetail | |
balances |
Array<BalanceSim> | |
canDeposit |
boolean | |
canTrade |
boolean | |
canWithdraw |
boolean | |
daily |
KycRemainingDetail | |
monthly |
KycRemainingDetail | |
token |
string | |
updateTime |
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/asset/tradeFee¶
Get trade fees
Description
Required Type: Common (Read only / Spot trade / Wallet)
Input parameters
| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
x-ptrader-apikey |
header | string | Yes | API key. | |
recvWindow |
query | integer | No | 5000 |
Request validity window in milliseconds. Range 1–60000. |
signature |
query | string | Yes | HMAC-SHA256 signature, hex-encoded. See Authentication → HMAC signing. | |
symbol |
query | string | No | ||
timestamp |
query | integer | Yes | Request timestamp in Unix milliseconds. |
Notes
- Send
timestampas a query parameter on this endpoint. Thetimestampheader is not accepted here.
GET /openapi/v1/asset/tradeFeecurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/asset/tradeFee?recvWindow=5000&signature={signature}×tamp={ts}' \
-H 'x-ptrader-apikey: {apiKey}'[
{
"symbol": "BTCUSDT",
"makerCommission": "0.001",
"takerCommission": "0.001"
}
]Responses
Success
Response fields
Array of TradeFee:
| Name | Type | Description |
|---|---|---|
makerCommission |
string | |
symbol |
string | |
takerCommission |
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/asset/transaction/history¶
Get transaction history
Description
Required Type: Common (Read only / Spot trade / Wallet)
Input parameters
| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
x-ptrader-apikey |
header | string | Yes | API key. | |
pageNum |
query | integer | No | 1 |
|
pageSize |
query | integer | No | 20 |
|
recvWindow |
query | integer | No | 5000 |
Request validity window in milliseconds. Range 1–60000. |
signature |
query | string | Yes | HMAC-SHA256 signature, hex-encoded. See Authentication → HMAC signing. | |
timestamp |
query | integer | Yes | Request timestamp in Unix milliseconds. | |
tokenId |
query | string | Yes |
Notes
- Send
timestampas a query parameter on this endpoint. Thetimestampheader is not accepted here.
GET /openapi/v1/asset/transaction/historycurl -sS -X GET 'https://api.pcrypto.com/openapi/v1/asset/transaction/history?pageNum=1&pageSize=20&recvWindow=5000&signature={signature}×tamp={ts}&tokenId=USDT' \
-H 'x-ptrader-apikey: {apiKey}'{
"transactions": [
{
"txId": "tx-1001",
"bizSubject": "DEPOSIT",
"tokenId": "USDT",
"status": "SUCCESS",
"changed": "100",
"time": "1713100000000"
}
],
"meta": {
"has_next": false,
"next_page": 0,
"previous_page": 0
}
}Responses
Success
Response fields
| Name | Type | Description |
|---|---|---|
meta |
PageMeta | |
transactions |
Array<TransactionHistoryItem> |
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/account/v3/crypto-accounts¶
Get crypto accounts
Description
Required Type: Common (Read only / Spot trade / Wallet)
Input parameters
| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
x-ptrader-apikey |
header | string | Yes | API key. | |
currency |
query | string | No | ||
recvWindow |
query | integer | No | 5000 |
Request validity window in milliseconds. Range 1–60000. |
signature |
query | string | Yes | HMAC-SHA256 signature, hex-encoded. See Authentication → HMAC signing. | |
timestamp |
query | integer | Yes | Request timestamp in Unix milliseconds. |
GET /openapi/account/v3/crypto-accountscurl -sS -X GET 'https://api.pcrypto.com/openapi/account/v3/crypto-accounts?currency=USDT&recvWindow=5000&signature={signature}×tamp={ts}' \
-H 'x-ptrader-apikey: {apiKey}'{
"crypto-accounts": [
{
"id": "acc-1",
"name": "USDT",
"currency": "USDT",
"balance": "1000.50",
"pending_balance": "0"
}
]
}Responses
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¶
AccountInfo¶
| Name | Type | Description |
|---|---|---|
accountType |
string | |
annually |
KycRemainingDetail | |
balances |
Array<BalanceSim> | |
canDeposit |
boolean | |
canTrade |
boolean | |
canWithdraw |
boolean | |
daily |
KycRemainingDetail | |
monthly |
KycRemainingDetail | |
token |
string | |
updateTime |
integer(int64) |
BalanceApi¶
| Name | Type | Description |
|---|---|---|
balance |
string | |
currency |
string | |
id |
string | |
name |
string | |
pending_balance |
string |
BalanceSim¶
| Name | Type | Description |
|---|---|---|
asset |
string | |
free |
number | Available balance. |
locked |
number | Held by open orders, plus funds frozen for withdrawals and transfers. This matches the outboundAccountPosition push. |
CryptoAccounts¶
| Name | Type | Description |
|---|---|---|
crypto-accounts |
Array<BalanceApi> |
ErrorBody¶
| Name | Type | Description |
|---|---|---|
code |
integer | |
msg |
string |
KycRemainingDetail¶
| Name | Type | Description |
|---|---|---|
cashInLimit |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
cashInRemaining |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
cashOutLimit |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
cashOutRemaining |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
totalWithdrawLimit |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
totalWithdrawRemaining |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
PageMeta¶
| Name | Type | Description |
|---|---|---|
has_next |
boolean | |
next_page |
integer | |
previous_page |
integer |
TradeFee¶
| Name | Type | Description |
|---|---|---|
makerCommission |
string | |
symbol |
string | |
takerCommission |
string |
TransactionHistory¶
| Name | Type | Description |
|---|---|---|
meta |
PageMeta | |
transactions |
Array<TransactionHistoryItem> |
TransactionHistoryItem¶
| Name | Type | Description |
|---|---|---|
bizSubject |
string | |
changed |
number | Decimal amount as a JSON number (`BigDecimal` on the wire). |
status |
string | |
time |
string | Epoch millis as a string. |
tokenId |
string | |
txId |
string |
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 |
|---|---|
| Common |