logo

Peatio User API v2

API for Peatio application.

#Version: 2.3.44

Contact information:
openware.com
https://www.openware.com
[email protected]

License: https://github.com/rubykube/peatio/blob/master/LICENSE.md

Security

Bearer

apiKeyAPI Key
NameJWT
Inheader

/public/trading_fees

GET

Description:

Returns trading_fees table as paginated collection

Parameters
NameLocated inDescriptionRequiredSchema
groupqueryMember group for define maker/taker fee.Nostring
market_idqueryMarket id for define maker/taker fee.Nostring
limitqueryLimit the number of returned paginations. Defaults to 100.Nointeger
pagequerySpecify the page of paginated results.Nointeger
orderingqueryIf set, returned values will be sorted in specific order, defaults to 'asc'.Nostring
order_byqueryName of the field, which result will be ordered by.Nostring
Responses
CodeDescriptionSchema
200Returns trading_fees table as paginated collection[ TradingFee ]

/public/health/ready

GET

Description:

Get application readiness status

Responses
CodeDescription
200Get application readiness status

/public/health/alive

GET

Description:

Get application liveness status

Responses
CodeDescription
200Get application liveness status

/public/version

GET

Description:

Get running Peatio version and build details.

Responses
CodeDescription
200Get running Peatio version and build details.

/public/timestamp

GET

Description:

Get server current time, in seconds since Unix epoch.

Responses
CodeDescription
200Get server current time, in seconds since Unix epoch.

/public/member-levels

GET

Description:

Returns hash of minimum levels and the privileges they provide.

Responses
CodeDescription
200Returns hash of minimum levels and the privileges they provide.

/public/markets/{market }/tickers

GET

Description:

Get ticker of specific market.

Parameters
NameLocated inDescriptionRequiredSchema
marketpathYesstring
Responses
CodeDescriptionSchema
200Get ticker of specific market.Ticker

/public/markets/tickers

GET

Description:

Get ticker of all markets (For response doc see /:market/tickers/ response).

Responses
CodeDescriptionSchema
200Get ticker of all markets (For response doc see /:market/tickers/ response).Ticker

/public/markets/{market }/k-line

GET

Description:

Get OHLC(k line) of specific market.

Parameters
NameLocated inDescriptionRequiredSchema
marketpathYesstring
periodqueryTime period of K line, default to 1. You can choose between 1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080Nointeger
time_fromqueryAn integer represents the seconds elapsed since Unix epoch. If set, only k-line data after that time will be returned.Nointeger
time_toqueryAn integer represents the seconds elapsed since Unix epoch. If set, only k-line data till that time will be returned.Nointeger
limitqueryLimit the number of returned data points default to 30. Ignored if time_from and time_to are given.Nointeger
Responses
CodeDescription
200Get OHLC(k line) of specific market.

/public/markets/{market }/depth

GET

Description:

Get depth or specified market. Both asks and bids are sorted from highest price to lowest.

Parameters
NameLocated inDescriptionRequiredSchema
marketpathYesstring
limitqueryLimit the number of returned price levels. Default to 300.Nointeger
Responses
CodeDescription
200Get depth or specified market. Both asks and bids are sorted from highest price to lowest.

/public/markets/{market }/trades

GET

Description:

Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.

Parameters
NameLocated inDescriptionRequiredSchema
marketpathYesstring
limitqueryLimit the number of returned trades. Default to 100.Nointeger
pagequerySpecify the page of paginated results.Nointeger
timestampqueryAn integer represents the seconds elapsed since Unix epoch.If set, only trades executed before the time will be returned.Nointeger
order_byqueryIf set, returned trades will be sorted in specific order, default to 'desc'.Nostring
Responses
CodeDescriptionSchema
200Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.[ Trade ]

/public/markets/{market }/order-book

GET

Description:

Get the order book of specified market.

Parameters
NameLocated inDescriptionRequiredSchema
marketpathYesstring
asks_limitqueryLimit the number of returned sell orders. Default to 20.Nointeger
bids_limitqueryLimit the number of returned buy orders. Default to 20.Nointeger
Responses
CodeDescriptionSchema
200Get the order book of specified market.[ OrderBook ]

/public/markets

GET

Description:

Get all available markets.

Responses
CodeDescriptionSchema
200Get all available markets.[ Market ]

/public/currencies

GET

Description:

Get list of currencies

Parameters
NameLocated inDescriptionRequiredSchema
typequeryCurrency typeNostring
Responses
CodeDescriptionSchema
200Get list of currencies[ Currency ]

/public/currencies/{id }

GET

Description:

Get a currency

Parameters
NameLocated inDescriptionRequiredSchema
idpathCurrency code.Yesstring
Responses
CodeDescriptionSchema
200Get a currencyCurrency

/account/withdraws

POST

Description:

Creates new withdrawal to active beneficiary.

Parameters
NameLocated inDescriptionRequiredSchema
otpformDataOTP to perform actionYesinteger
beneficiary_idformDataID of Active Beneficiary belonging to user.Yesinteger
currencyformDataThe currency code.Yesstring
amountformDataThe amount to withdraw.Yesdouble
noteformDataOptional metadata to be applied to the transaction. Used to tag transactions with memorable comments.Nostring
Responses
CodeDescription
201Creates new withdrawal to active beneficiary.

GET

Description:

List your withdraws as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
currencyqueryCurrency code.Nostring
limitqueryNumber of withdraws per page (defaults to 100, maximum is 100).Nointeger
pagequeryPage number (defaults to 1).Nointeger
Responses
CodeDescriptionSchema
200List your withdraws as paginated collection.[ Withdraw ]

/account/beneficiaries/{id }

DELETE

Description:

Delete beneficiary

Parameters
NameLocated inDescriptionRequiredSchema
idpathBeneficiary Identifier in DatabaseYesinteger
Responses
CodeDescription
204Delete beneficiary

GET

Description:

Get beneficiary by ID

Parameters
NameLocated inDescriptionRequiredSchema
idpathBeneficiary Identifier in DatabaseYesinteger
Responses
CodeDescriptionSchema
200Get beneficiary by IDBeneficiary

/account/beneficiaries/{id }/activate

PATCH

Description:

Activates beneficiary with pin

Parameters
NameLocated inDescriptionRequiredSchema
idpathBeneficiary Identifier in DatabaseYesinteger
pinformDataPin code for beneficiary activationYesinteger
Responses
CodeDescriptionSchema
200Activates beneficiary with pinBeneficiary

/account/beneficiaries

POST

Description:

Create new beneficiary

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataBeneficiary currency code.Yesstring
nameformDataHuman rememberable name which refer beneficiary.Yesstring
descriptionformDataHuman rememberable name which refer beneficiary.Nostring
dataformDataBeneficiary data in JSON formatYesjson
Responses
CodeDescriptionSchema
201Create new beneficiaryBeneficiary

GET

Description:

Get list of user beneficiaries

Parameters
NameLocated inDescriptionRequiredSchema
currencyqueryBeneficiary currency code.Nostring
statequeryDefines either beneficiary active - user can use it to withdraw moneyor pending - requires beneficiary activation with pin.Nostring
Responses
CodeDescriptionSchema
200Get list of user beneficiaries[ Beneficiary ]

/account/deposit_address/{currency }

GET

Description:

Returns deposit address for account you want to deposit to by currency. The address may be blank because address generation process is still in progress. If this case you should try again later.

Parameters
NameLocated inDescriptionRequiredSchema
currencypathThe account you want to deposit to.Yesstring
address_formatqueryAddress format legacy/cashNostring
Responses
CodeDescriptionSchema
200Returns deposit address for account you want to deposit to by currency. The address may be blank because address generation process is still in progress. If this case you should try again later.Deposit

/account/deposits/{txid }

GET

Description:

Get details of specific deposit.

Parameters
NameLocated inDescriptionRequiredSchema
txidpathDeposit transaction idYesstring
Responses
CodeDescriptionSchema
200Get details of specific deposit.Deposit

/account/deposits

GET

Description:

Get your deposits history.

Parameters
NameLocated inDescriptionRequiredSchema
currencyqueryCurrency codeNostring
statequeryNostring
limitqueryNumber of deposits per page (defaults to 100, maximum is 100).Nointeger
pagequeryPage number (defaults to 1).Nointeger
Responses
CodeDescriptionSchema
200Get your deposits history.[ Deposit ]

/account/balances/{currency }

GET

Description:

Get user account by currency

Parameters
NameLocated inDescriptionRequiredSchema
currencypathThe currency code.Yesstring
Responses
CodeDescriptionSchema
200Get user account by currencyAccount

/account/balances

GET

Description:

Get list of user accounts

Responses
CodeDescriptionSchema
200Get list of user accounts[ Account ]

/market/trades

GET

Description:

Get your executed trades. Trades are sorted in reverse creation order.

Parameters
NameLocated inDescriptionRequiredSchema
marketqueryNostring
limitqueryLimit the number of returned trades. Default to 100.Nointeger
pagequerySpecify the page of paginated results.Nointeger
time_fromqueryAn integer represents the seconds elapsed since Unix epoch.If set, only trades executed after the time will be returned.Nointeger
time_toqueryAn integer represents the seconds elapsed since Unix epoch.If set, only trades executed before the time will be returned.Nointeger
order_byqueryIf set, returned trades will be sorted in specific order, default to 'desc'.Nostring
Responses
CodeDescriptionSchema
200Get your executed trades. Trades are sorted in reverse creation order.[ Trade ]

/market/orders/cancel

POST

Description:

Cancel all my orders.

Parameters
NameLocated inDescriptionRequiredSchema
marketformDataNostring
sideformDataIf present, only sell orders (asks) or buy orders (bids) will be canncelled.Nostring
Responses
CodeDescriptionSchema
201Cancel all my orders.Order

/market/orders/{id }/cancel

POST

Description:

Cancel an order.

Parameters
NameLocated inDescriptionRequiredSchema
idpathYesinteger
Responses
CodeDescription
201Cancel an order.

/market/orders

POST

Description:

Create a Sell/Buy order.

Parameters
NameLocated inDescriptionRequiredSchema
marketformDataYesstring
sideformDataYesstring
volumeformDataYesdouble
ord_typeformDataNostring
priceformDataYesdouble
Responses
CodeDescriptionSchema
201Create a Sell/Buy order.Order

GET

Description:

Get your orders, result is paginated.

Parameters
NameLocated inDescriptionRequiredSchema
marketqueryNostring
statequeryFilter order by state.Nostring
limitqueryLimit the number of returned orders, default to 100.Nointeger
pagequerySpecify the page of paginated results.Nointeger
order_byqueryIf set, returned orders will be sorted in specific order, default to "desc".Nostring
ord_typequeryFilter order by ord_type.Nostring
typequeryFilter order by type.Nostring
Responses
CodeDescriptionSchema
200Get your orders, result is paginated.[ Order ]

/market/orders/{id }

GET

Description:

Get information of specified order.

Parameters
NameLocated inDescriptionRequiredSchema
idpathYesinteger
Responses
CodeDescriptionSchema
200Get information of specified order.Order

Models

TradingFee

Returns trading_fees table as paginated collection

NameTypeDescriptionRequired
idintegerUnique trading fee table identifier in database.No
groupstringMember group for define maker/taker fee.No
market_idstringMarket id for define maker/taker fee.No
makerdoubleMarket maker fee.No
takerdoubleMarket taker fee.No
created_atstringTrading fee table created time in iso8601 format.No
updated_atstringTrading fee table updated time in iso8601 format.No

Ticker

Get ticker of all markets (For response doc see /:market/tickers/ response).

NameTypeDescriptionRequired
atintegerTimestamp of tickerNo
tickerTickerEntryTicker entry for specified timeNo

TickerEntry

NameTypeDescriptionRequired
buydoubleBest buy (highest) price in current orderbook (0.0 if there is no buy orders)No
selldoubleBest sell (lowest) price in current orderbook (0.0 if there is no sell orders)No
lowdoubleThe lowest trade price during last 24 hours (0.0 if no trades executed during last 24 hours)No
highdoubleThe highest trade price during last 24 hours (0.0 if no trades executed during last 24 hours)No
opendoublePrice of the first trade executed 24 hours ago or lessNo
lastdoubleThe last executed trade priceNo
volumedoubleTotal amount of trades executed during last 24 hours (recalculated once in 15 minuets)No
voldoubleAlias to volumeNo
avg_pricedoubleAverage price more precisely VWAP is calculated by adding up the total traded for every transaction(price multiplied by the number of shares traded) and then dividing by the total shares tradedNo
price_change_percentstringPrice change in the next format +3.19%.Price change is calculated using next formula (last - open) / open * 100%No

Trade

Get your executed trades. Trades are sorted in reverse creation order.

NameTypeDescriptionRequired
idstringTrade ID.No
pricedoubleTrade price.No
amountdoubleTrade amount.No
totaldoubleTrade total (Amount * Price).No
fee_currencydoubleCurrency user's fees were charged in.No
feedoublePercentage of fee user was charged for performed trade.No
fee_amountdoubleAmount of fee user was charged for performed trade.No
marketstringTrade market id.No
created_atstringTrade create time in iso8601 format.No
taker_typestringTrade taker order type (sell or buy).No
sidestringTrade side.No
order_idintegerOrder id.No

OrderBook

Get the order book of specified market.

NameTypeDescriptionRequired
asks[ Order ]Asks in orderbookNo
bids[ Order ]Bids in orderbookNo

Order

Get your orders, result is paginated.

NameTypeDescriptionRequired
idintegerUnique order id.No
sidestringEither 'sell' or 'buy'.No
ord_typestringType of order, either 'limit' or 'market'.No
pricedoublePrice for each unit. e.g.If you want to sell/buy 1 btc at 3000 usd, the price is '3000.0'No
avg_pricedoubleAverage execution price, average of price in trades.No
statestringOne of 'wait', 'done', or 'cancel'.An order in 'wait' is an active order, waiting fulfillment;a 'done' order is an order fulfilled;'cancel' means the order has been canceled.No
marketstringThe market in which the order is placed, e.g. 'btcusd'.All available markets can be found at /api/v2/markets.No
created_atstringOrder create time in iso8601 format.No
updated_atstringOrder updated time in iso8601 format.No
origin_volumedoubleThe amount user want to sell/buy.An order could be partially executed,e.g. an order sell 5 btc can be matched with a buy 3 btc order,left 2 btc to be sold; in this case the order's volume would be '5.0',its remaining_volume would be '2.0', its executed volume is '3.0'.No
remaining_volumedoubleThe remaining volume, see 'volume'.No
executed_volumedoubleThe executed volume, see 'volume'.No
trades_countintegerCount of trades.No
trades[ Trade ]Trades wiht this order.No

Market

Get all available markets.

NameTypeDescriptionRequired
idstringUnique market id. It's always in the form of xxxyyy,where xxx is the base currency code, yyy is the quotecurrency code, e.g. 'btcusd'. All available markets canbe found at /api/v2/markets.No
namestringMarket name.No
base_unitstringMarket Base unit.No
quote_unitstringMarket Quote unit.No
min_pricedoubleMinimum order price.No
max_pricedoubleMaximum order price.No
min_amountdoubleMinimum order amount.No
amount_precisiondoublePrecision for order amount.No
price_precisiondoublePrecision for order price.No
statestringMarket state defines if user can see/trade on current market.No

Currency

Get a currency

NameTypeDescriptionRequired
idstringCurrency code.No
namestringCurrency nameNo
symbolstringCurrency symbolNo
explorer_transactionstringCurrency transaction exprorer url templateNo
explorer_addressstringCurrency address exprorer url templateNo
typestringCurrency typeNo
deposit_enabledstringCurrency deposit possibility status (true/false).No
withdrawal_enabledstringCurrency withdrawal possibility status (true/false).No
deposit_feestringCurrency deposit feeNo
min_deposit_amountstringMinimal deposit amountNo
withdraw_feestringCurrency withdraw feeNo
min_withdraw_amountstringMinimal withdraw amountNo
withdraw_limit_24hstringCurrency 24h withdraw limitNo
withdraw_limit_72hstringCurrency 72h withdraw limitNo
base_factorstringCurrency base factorNo
precisionstringCurrency precisionNo
icon_urlstringCurrency iconNo
min_confirmationsstringNumber of confirmations required for confirming deposit or withdrawalNo

Withdraw

List your withdraws as paginated collection.

NameTypeDescriptionRequired
idintegerThe withdrawal id.No
currencystringThe currency code.No
typestringThe withdrawal typeNo
amountstringThe withdrawal amountNo
feedoubleThe exchange fee.No
blockchain_txidstringThe withdrawal transaction id.No
ridstringThe beneficiary ID or wallet address on the Blockchain.No
statestringThe withdrawal state.No
confirmationsintegerNumber of confirmations.No
notestringWithdraw note.No
created_atstringThe datetimes for the withdrawal.No
updated_atstringThe datetimes for the withdrawal.No
done_atstringThe datetime when withdraw was completedNo

Beneficiary

Get list of user beneficiaries

NameTypeDescriptionRequired
idintegerBeneficiary Identifier in DatabaseNo
currencystringBeneficiary currency code.No
namestringHuman rememberable name which refer beneficiary.No
descriptionstringHuman rememberable description of beneficiary.No
datajsonBank Account details for fiat Beneficiary in JSON format.For crypto it's blockchain address.No
statestringDefines either beneficiary active - user can use it to withdraw moneyor pending - requires beneficiary activation with pin.No

Deposit

Get your deposits history.

NameTypeDescriptionRequired
idintegerUnique deposit id.No
currencystringDeposit currency id.No
amountdoubleDeposit amount.No
feedoubleDeposit fee.No
txidstringDeposit transaction id.No
confirmationsintegerNumber of deposit confirmations.No
statestringDeposit state.No
created_atstringThe datetime when deposit was created.No
completed_atstringThe datetime when deposit was completed..No

Account

Get list of user accounts

NameTypeDescriptionRequired
currencystringCurrency code.No
balancedoubleAccount balance.No
lockeddoubleAccount locked funds.No

Member

NameTypeDescriptionRequired
uidstringMember UID.No
emailstringMember email.No
accounts[ Account ]Member accounts.No