logo

Peatio User API v2

API for Peatio application.

#Version: 2.2.31

Contact information:
peatio.tech
https://www.peatio.tech
[email protected]

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

Security

Bearer

apiKeyAPI Key
NameJWT
Inheader

/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
CodeDescription
200Get ticker of specific market.

/public/markets/tickers

GET

Description:

Get ticker of all markets.

Responses
CodeDescription
200Get ticker of all markets.

/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/transactions

GET

Description:

Get your transactions history.

Parameters
NameLocated inDescriptionRequiredSchema
currencyqueryCurrency codeNostring
order_byquerySorting orderNostring
time_fromqueryAn integer represents the seconds elapsed since Unix epoch.Nointeger
time_toqueryAn integer represents the seconds elapsed since Unix epoch.Nointeger
limitqueryLimit the number of returned transactions. Default to 100.Nointeger
pagequerySpecify the page of paginated results.Nointeger
Responses
CodeDescription
200Get your transactions history.

/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 ]

/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/withdraws

POST

Description:

Creates new crypto withdrawal.

Parameters
NameLocated inDescriptionRequiredSchema
otpformDataOTP to perform actionYesinteger
ridformDataWallet address on the Blockchain.Yesstring
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 crypto withdrawal.

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 ]

/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, results 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, results 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

Trade

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

NameTypeDescriptionRequired
idstringTrade ID.No
pricedoubleTrade price.No
volumedoubleTrade volume.No
fundsdoubleTrade funds.No
marketstringTrade market id.No
created_atstringTrade create time in iso8601 format.No
taker_typestringTrade maker 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, results 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
ask_feedoubleMarket ask fee.No
bid_feedoubleMarket bid fee.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_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

Account

Get list of user accounts

NameTypeDescriptionRequired
currencystringCurrency code.No
balancedoubleAccount balance.No
lockeddoubleAccount locked funds.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

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

Transactions

NameTypeDescriptionRequired
addressstringRecipient address of transaction.No
currencystringTransaction currency id.No
amountdoubleTransaction amount.No
feedoubleTransaction fee.No
txidstringTransaction id.No
statestringTransaction state.No
notestringWithdraw note.No
updated_atstringTransaction updated time in iso8601 format.No
typestringType of transactionNo

Member

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