logo

Peatio Management API v2

Management API is server-to-server API with high privileges.

#Version: 2.3.44

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

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

/accounts/balance

POST

Description:

Queries the account balance for the given UID and currency.

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataThe shared user ID.Yesstring
currencyformDataThe currency code.Yesstring
Responses
CodeDescriptionSchema
201Queries the account balance for the given UID and currency.Balance

/deposits/state

PUT

Description:

Allows to load money or cancel deposit.

Parameters
NameLocated inDescriptionRequiredSchema
tidformDataThe shared transaction ID.Yesstring
stateformDataThe new state to apply.Yesstring
Responses
CodeDescriptionSchema
200Allows to load money or cancel deposit.Deposit

/deposits/new

POST

Description:

Creates new fiat deposit with state set to «submitted». Optionally pass field «state» set to «accepted» if want to load money instantly. You can also use PUT /fiat_deposits/:id later to load money or cancel deposit.

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataThe shared user ID.Yesstring
tidformDataThe shared transaction ID. Must not exceed 64 characters. Peatio will generate one automatically unless supplied.Nostring
currencyformDataThe currency code.Yesstring
amountformDataThe deposit amount.Yesdouble
stateformDataThe state of deposit.Nostring
Responses
CodeDescriptionSchema
201Creates new fiat deposit with state set to «submitted». Optionally pass field «state» set to «accepted» if want to load money instantly. You can also use PUT /fiat_deposits/:id later to load money or cancel deposit.Deposit

/deposits/get

POST

Description:

Returns deposit by TID.

Parameters
NameLocated inDescriptionRequiredSchema
tidformDataThe transaction ID.Yesstring
Responses
CodeDescriptionSchema
201Returns deposit by TID.Deposit

/deposits

POST

Description:

Returns deposits as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataThe shared user ID.Nostring
currencyformDataThe currency code.Nostring
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of deposits per page (defaults to 100, maximum is 1000).Nointeger
stateformDataThe state to filter by.Nostring
Responses
CodeDescriptionSchema
201Returns deposits as paginated collection.Deposit

/withdraws/action

PUT

Summary:

Performs action on withdraw.

Description:

«process» – system will lock the money, check for suspected activity, validate recipient address, and initiate the processing of the withdraw. «cancel» – system will mark withdraw as «canceled», and unlock the money.

Parameters
NameLocated inDescriptionRequiredSchema
tidformDataThe shared transaction ID.Yesstring
actionformDataThe action to perform.Yesstring
Responses
CodeDescriptionSchema
200Performs action on withdraw.Withdraw

/withdraws/new

POST

Summary:

Creates new withdraw.

Description:

Creates new withdraw. The behaviours for fiat and crypto withdraws are different. Fiat: money are immediately locked, withdraw state is set to «submitted», system workers will validate withdraw later against suspected activity, and assign state to «rejected» or «accepted». The processing will not begin automatically. The processing may be initiated manually from admin panel or by PUT /management_api/v1/withdraws/action. Coin: money are immediately locked, withdraw state is set to «submitted», system workers will validate withdraw later against suspected activity, validate withdraw address and set state to «rejected» or «accepted». Then in case state is «accepted» withdraw workers will perform interactions with blockchain. The withdraw receives new state «processing». Then withdraw receives state either «confirming» or «failed».Then in case state is «confirming» withdraw confirmations workers will perform interactions with blockchain.Withdraw receives state «succeed» when it receives minimum necessary amount of confirmations.

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataThe shared user ID.Yesstring
tidformDataThe shared transaction ID. Must not exceed 64 characters. Peatio will generate one automatically unless supplied.Nostring
ridformDataThe beneficiary ID or wallet address on the Blockchain.Nostring
beneficiary_idformDataID of Active Beneficiary belonging to user.Nostring
currencyformDataThe currency code.Yesstring
amountformDataThe amount to withdraw.Yesdouble
actionformDataThe action to perform.Nostring
Responses
CodeDescriptionSchema
201Creates new withdraw.Withdraw

/withdraws/get

POST

Description:

Returns withdraw by ID.

Parameters
NameLocated inDescriptionRequiredSchema
tidformDataThe shared transaction ID.Yesstring
Responses
CodeDescriptionSchema
201Returns withdraw by ID.Withdraw

/withdraws

POST

Description:

Returns withdraws as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataThe shared user ID.Nostring
currencyformDataThe currency code.Nostring
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of objects per page (defaults to 100, maximum is 1000).Nointeger
stateformDataThe state to filter by.Nostring
Responses
CodeDescriptionSchema
201Returns withdraws as paginated collection.Withdraw

/timestamp

POST

Description:

Returns server time in seconds since Unix epoch.

Responses
CodeDescription
201Returns server time in seconds since Unix epoch.

/assets/new

POST

Description:

Creates new asset operation.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency code.Yesstring
codeformDataOperation account codeYesinteger
debitformDataOperation debit amount.Nodouble
creditformDataOperation credit amount.Nodouble
Responses
CodeDescriptionSchema
201Creates new asset operation.Operation

/assets

POST

Description:

Returns assets as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency for operations filtering.Nostring
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of objects per page (defaults to 100, maximum is 1000).Nointeger
time_fromformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations after the time will be returned.Nointeger
time_toformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations before the time will be returned.Nointeger
reference_typeformDataThe reference type for operations filteringNostring
Responses
CodeDescriptionSchema
201Returns assets as paginated collection.Operation

/expenses/new

POST

Description:

Creates new expense operation.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency code.Yesstring
codeformDataOperation account codeYesinteger
debitformDataOperation debit amount.Nodouble
creditformDataOperation credit amount.Nodouble
Responses
CodeDescriptionSchema
201Creates new expense operation.Operation

/expenses

POST

Description:

Returns expenses as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency for operations filtering.Nostring
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of objects per page (defaults to 100, maximum is 1000).Nointeger
time_fromformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations after the time will be returned.Nointeger
time_toformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations before the time will be returned.Nointeger
reference_typeformDataThe reference type for operations filteringNostring
Responses
CodeDescriptionSchema
201Returns expenses as paginated collection.Operation

/revenues/new

POST

Description:

Creates new revenue operation.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency code.Yesstring
codeformDataOperation account codeYesinteger
debitformDataOperation debit amount.Nodouble
creditformDataOperation credit amount.Nodouble
Responses
CodeDescriptionSchema
201Creates new revenue operation.Operation

/revenues

POST

Description:

Returns revenues as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency for operations filtering.Nostring
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of objects per page (defaults to 100, maximum is 1000).Nointeger
time_fromformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations after the time will be returned.Nointeger
time_toformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations before the time will be returned.Nointeger
reference_typeformDataThe reference type for operations filteringNostring
Responses
CodeDescriptionSchema
201Returns revenues as paginated collection.Operation

/liabilities/new

POST

Description:

Creates new liability operation.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency code.Yesstring
codeformDataOperation account codeYesinteger
uidformDataThe user ID for operation owner.Yesstring
debitformDataOperation debit amount.Nodouble
creditformDataOperation credit amount.Nodouble
Responses
CodeDescriptionSchema
201Creates new liability operation.Operation

/liabilities

POST

Description:

Returns liabilities as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
currencyformDataThe currency for operations filtering.Nostring
uidformDataThe user ID for operations filtering.Nostring
reference_typeformDataThe reference type for operations filteringNostring
time_fromformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations after the time will be returned.Nointeger
time_toformDataAn integer represents the seconds elapsed since Unix epoch.If set, only operations before the time will be returned.Nointeger
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of objects per page (defaults to 100, maximum is 10000).Nointeger
Responses
CodeDescriptionSchema
201Returns liabilities as paginated collection.Operation

/transfers/new

POST

Description:

Creates new transfer.

Parameters
NameLocated inDescriptionRequiredSchema
keyformDataUnique Transfer Key.Yesstring
categoryformDataTransfer Category.Yesstring
descriptionformDataTransfer Description.Nostring
operations[currency]formDataOperation currency.Yes[ string ]
operations[amount]formDataOperation amount.Yes[ double ]
operations[account_src][code]formDataSource Account code.Yes[ integer ]
operations[account_src][uid]formDataSource Account User ID (for accounts with member scope).Yes[ string ]
operations[account_dst][code]formDataDestination Account code.Yes[ integer ]
operations[account_dst][uid]formDataDestination Account User ID (for accounts with member scope).Yes[ string ]
Responses
CodeDescription
201Creates new transfer.

/trades

POST

Description:

Returns trades as paginated collection.

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataThe shared user ID.Nostring
marketformDataNostring
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of objects per page (defaults to 100, maximum is 1000).Nointeger
Responses
CodeDescriptionSchema
201Returns trades as paginated collection.Trade

/members/group

POST

Description:

Set user group.

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataThe shared user ID.Yesstring
groupformDataUser gruopYesstring
Responses
CodeDescription
201Set user group.

/fee_schedule/trading_fees

POST

Description:

Returns trading_fees table as paginated collection

Parameters
NameLocated inDescriptionRequiredSchema
groupformDataMember groupNostring
market_idformDataMarket idNostring
pageformDataThe page number (defaults to 1).Nointeger
limitformDataThe number of objects per page (defaults to 100, maximum is 1000).Nointeger
Responses
CodeDescription
201Returns trading_fees table as paginated collection

/currencies/update

PUT

Description:

Update currency.

Parameters
NameLocated inDescriptionRequiredSchema
idformDataCurrency code.Yesstring
nameformDataCurrency nameNostring
deposit_feeformDataCurrency deposit feeNodouble
min_deposit_amountformDataMinimal deposit amountNodouble
min_collection_amountformDataMinimal deposit amount that will be collectedNodouble
withdraw_feeformDataCurrency withdraw feeNodouble
min_withdraw_amountformDataMinimal withdraw amountNodouble
withdraw_limit_24hformDataCurrency 24h withdraw limitNodouble
withdraw_limit_72hformDataCurrency 72h withdraw limitNodouble
positionformDataCurrency position.Nointeger
optionsformDataCurrency options.Nojson
visibleformDataCurrency display possibility status (true/false).Noboolean
deposit_enabledformDataCurrency deposit possibility status (true/false).Noboolean
withdrawal_enabledformDataCurrency withdrawal possibility status (true/false).Noboolean
precisionformDataCurrency precisionNointeger
icon_urlformDataCurrency iconNostring
Responses
CodeDescriptionSchema
200Update currency.Currency

/currencies/{code }

POST

Description:

Returns currency by code.

Parameters
NameLocated inDescriptionRequiredSchema
codepathThe currency code.Yesstring
Responses
CodeDescriptionSchema
201Returns currency by code.Currency

/markets/update

PUT

Description:

Update market.

Parameters
NameLocated inDescriptionRequiredSchema
idformDataUnique 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.Yesstring
stateformDataMarket state defines if user can see/trade on current market.Nostring
min_priceformDataMinimum order price.Nodouble
min_amountformDataMinimum order amount.Nodouble
amount_precisionformDataPrecision for order amount.Nointeger
price_precisionformDataPrecision for order price.Nointeger
max_priceformDataMaximum order price.Nodouble
positionformDataMarket position.Nointeger
Responses
CodeDescriptionSchema
200Update market.Market

Models

Balance

Queries the account balance for the given UID and currency.

NameTypeDescriptionRequired
uidstringThe shared user ID.No
balancestringThe account balance.No
lockedstringThe locked account balance.No

Deposit

Returns deposits as paginated collection.

NameTypeDescriptionRequired
tidintegerThe shared transaction ID.No
currencystringThe currency code.No
uidstringThe shared user ID.No
typestringThe deposit type (fiat or coin).No
amountstringThe deposit amount.No
statestringThe deposit state. «submitted» – initial state. «canceled» – deposit has been canceled by outer service. «rejected» – deposit has been rejected by outer service.. «accepted» – deposit has been accepted by outer service, money are loaded.No
created_atstringThe datetime when deposit was created.No
completed_atstringThe datetime when deposit was completed.No
blockchain_txidstringThe transaction ID on the Blockchain (coin only).No
blockchain_confirmationsstringThe number of transaction confirmations on the Blockchain (coin only).No

Withdraw

Returns withdraws as paginated collection.

NameTypeDescriptionRequired
tidintegerThe shared transaction ID.No
uidstringThe shared user ID.No
currencystringThe currency code.No
typestringThe withdraw type (fiat or coin).No
amountstringThe withdraw amount excluding fee.No
feestringThe exchange fee.No
ridstringThe beneficiary ID or wallet address on the Blockchain.No
statestringThe withdraw state. «prepared» – initial state, money are not locked. «submitted» – withdraw has been allowed by outer service for further validation, money are locked. «canceled» – withdraw has been canceled by outer service, money are unlocked. «accepted» – system has validated withdraw and queued it for processing by worker, money are locked. «rejected» – system has validated withdraw and found errors, money are unlocked. «processing» – worker is processing withdraw as the current moment, money are locked. «skipped» – worker skipped withdrawal in case of insufficient balance of hot wallet or it absence. «succeed» – worker has successfully processed withdraw, money are subtracted from the account. «failed» – worker has encountered an unhandled error while processing withdraw, money are unlocked.No
created_atstringThe datetime when withdraw was created.No
blockchain_txidstringThe transaction ID on the Blockchain (coin only).No

Operation

Returns liabilities as paginated collection.

NameTypeDescriptionRequired
codestringThe Account code which this operation related to.No
currencystringOperation currency ID.No
creditstringOperation credit amount.No
debitstringOperation debit amount.No
uidstringThe shared user ID.No
reference_typestringThe type of operations.No
created_atstringThe datetime when operation was created.No

Trade

Returns trades as paginated collection.

NameTypeDescriptionRequired
idstringTrade ID.No
pricedoubleTrade price.No
amountdoubleTrade amount.No
totaldoubleTrade total.No
marketstringTrade market id.No
created_atstringTrade create time in iso8601 format.No
maker_order_idstringTrade maker order id.No
taker_order_idstringTrade taker order id.No
maker_member_uidstringTrade ask member uid.No
taker_member_uidstringTrade bid member uid.No
taker_typestringTrade maker order type (sell or buy).No
sidestringTrade side.No
order_idintegerOrder id.No

Currency

Returns currency by code.

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
codestringUnique currency code.No
min_collection_amountstringMinimal deposit amount that will be collectedNo
visiblestringCurrency display possibility status (true/false).No
subunitsintegerFraction of the basic monetary unit.No
optionsjsonCurrency options.No
positionintegerCurrency position.No
created_atstringCurrency created time in iso8601 format.No
updated_atstringCurrency updated time in iso8601 format.No

Market

Update market.

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
positionintegerMarket position.No
created_atstringMarket created time in iso8601 format.No
updated_atstringMarket updated time in iso8601 format.No