logo

Peatio Management API v2

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

#Version: 2.2.31

Contact information:
peatio.tech
https://www.peatio.tech
[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

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.Yesstring
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.Yesinteger
kindformDataTransfer Kind.Yesstring
descformDataTransfer 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

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
volumedoubleTrade volume.No
fundsdoubleTrade funds.No
marketstringTrade market id.No
created_atstringTrade create time in iso8601 format.No
ask_idstringTrade ask order id.No
bid_idstringTrade bid order id.No
ask_member_uidstringTrade ask member uid.No
bid_member_uidstringTrade bid member uid.No
taker_typestringTrade maker order type (sell or buy).No
sidestringTrade side.No
order_idintegerOrder id.No