ZB.COM

PROGRAMMER

WebSocket API (Enabled)

ZB provides APIs for fast access to its spot markets with the following features: Market data, Order book, depths of bids and asks, Trade history, Trade execution, Order information, Order history, Account information.

In case of any problem, please contact our support team, E-mail address: support@zb.com.

WebSocket URL

ZB WebSocket Service URL:wss://api.zb.cn/websocket

Configuration API

Get the latest market configuration data of ZB

Resource Description
markets Get the enabled market information ( price, number of decimal places)

Price API

Receive the latest ZB market data

Resource Description
ticker Price
depth Market depth
trades Get History Trade Data

Trade API

Place order on ZB

Resource Description
order Place Order
cancelOrder Cancel order
getOrder Get the buy and sell orders
getorders Get multiple orders info, return 10 records in one time
getordersnew Get multiple orders, return no more than 100 records in one time
getordersignoretradetype Cancel ” TradeType” filtration, get buy order and sell order, return no more than 100 records in one time.
getunfinishedordersignoretradetype Get unfinished or partly finished buy order or sell order, return no more than 100 records in one time.
getaccountinfo Get User’s Account Info

Margin API

Used for leveraged lending and financial management

Resource Description
getuserLeverAsset Get user leverage information
getLeverBills Get leverage bill
transferInLever Assets are transferred to leverage
transferOutLever Assets are transferred out of the leverage area
loan Publish financial
cancelLoan Cancel financial
getLoans Gets the loanable list
getLoanRecords Obtain loan records
borrow Borrows
repay Repay
getRepayments Get repayment records
getFinanceRecords Access to financial records

活动API

用于资金转入、转出、查询

Resource Description
transferInSpark 资金转入活动区
transferOutSpark 资金转出活动区
getSparkUserAsset 获取用户活动区资产

Sub-account API

Used for Sub-account Management

Resource Description
addSubUser Create Sub-account
getSubUserList Acquire Sub-account List
doTransferFunds Internal Transfer between Main Account and Sub-account
createSubUserKey Create Sub-account API

Error Code

All API method invocations will return data to users in JSON format when fail to request or encounter unknown error.

Code Description Processing Mode
1000 Success -
1001 Error Tips Please check for correctness of trading pairs and other parameters
1002 Internal Error System error, please report to customer service
1003 Validate No Pass Encryption error, check whether the parameters are properly sorted correctly or others
1004 Transaction Password Locked Please operate after the transaction password is unlocked
1005 Transaction Password Error Please check the transaction password
1006 Real-name verification is pending approval or not approval Please complete Real-name Authentication in the web first
1007 Channel is empty Please check for correctness of the method name
1008 Event is empty Please check for correctness of the parameters
1009 This interface is in maintaining -
1011 Temporarily not open -
1012 Permission denied. Please enable the corresponding permissions in API Setting
1013 Cannot trade, if you have questions please contact online customer service -
1014 Cannot be sold during the pre-sale period -
2002 Insufficient BTC Balance -
2003 Insufficient LTC Balance -
2005 Insufficient ETH Balance -
2006 Insufficient ETC Balance -
2007 Insufficient BTS Balance -
2008 Insufficient EOS Balance -
2009 Insufficient account balance -
3001 Not found order or has finished Please check for correctness of the trading pair and order ID
3002 Invalid Money Check whether the order value meets the standard
3003 Invalid Amount Check whether the amount meets the standard
3004 No Such User ACCESS_KEY error, please correct it or regenerate
3005 Invalid Parameters Parameters do not follow the format
3006 Invalid IP or Differ From the Bound IP The current access IP is unbound IP, please modify it in API Setting
3007 Invalid Request Time Please correct the request time
3008 Not Found Transaction Record -
3009 价格超过限额 -
3010 你已设置该市场禁止交易,下单失败 -
3011 委托价格异常,为了避免您的资金损失,请修改后重新下单! -
4001 API Interface is locked It will be automatically unlocked after one hour, please adjust the access frequency of the interface
4002 Request Too Frequently please adjust the access frequency of the interface

If you have problem, feel free to contact our customer service.

Files Download

Download DEMO and development of documentation

GITHUB>>