Version: 0.9.5
Sinohope WaaS API
Common Descriptions of Parameters and Return Values
Unified Return Value Structure
| Name | Description |
|---|---|
| code | Status code (200 for success) |
| msg | Status description |
| data | Response data |
| success | Whether the request succeeded (true for success, false for failure) |
Common Error Code Definitions
When an error occurs in Sinohope WaaS services, uniformly formatted data will be returned to the client:
200: Successful response. Refer to each API for the detailed response data.400: Bad Request.401: Unauthorized. Either API details are missing or invalid.403: Forbidden. You do not have access to the requested resource.415: Unsupported media type. You need to use application/json.500: Sinohope internal error.
System Level Errors
| Error Code | Description |
|---|---|
| 1001 | Unknown exception, please contact Sinohope customer service |
| 1002 | Duplicate request |
| 1004 | Invalid API Key |
| 1005 | Signature verification failed |
| 1006 | IP call frequency restricted |
| 1007 | No permission of the current API |
| 1008 | Invalid IP address |
| 1009 | Signature in the request header cannot be empty |
| 1010 | Timestamp in the request header cannot be empty |
| 1011 | Internal call exception |
| 1012 | Invalid request, please check if there are missing headers |
| 1013 | Signature failure |
| 1014 | Unsupported request type (only GET and POST supported) |
| 1015 | Missing signature parameter |
Parameter Level Errors
| Error Code | Description |
|---|---|
| 2001 | The asset is not supported |
| 2002 | The chain is not supported |
| 2003 | Invalid input address |
| 2004 | Transaction record does not exist |
| 2005 | No permission |
| 2006 | Abnormal transfer information (kyt check failed) |
| 2007 | Miner fee too low |
| 2008 | The to address is not an internal address (transfer protection) |
| 2009 | Insufficient balance to pay transfer amount and gas fee |
| 2010 | Insufficient gas (token transfer) |
| 2011 | Insufficient available balance (token transfer) |
| 2012 | Name cannot contain backslash \ |
| 2013 | Address not found for given path |
| 2014 | Not enough gas |
| 2015 | Invalid input assetID |
| 2020 | No token information |
| 2097 | Invalid pageIndex, require pageIndex >=1 |
| 2098 | Invalid pageSize, require pageSize <=50 and >=1 |
| 2099 | Missing required parameter |
| 2101 | Specified wallet does not exist |
| 2102 | Specified asset does not exist |
| 2103 | Specified chainSymbol does not exist |
| 2104 | Specified vault does not exist |
| 2106 | The maximum number of single chain address subscriptions exceeds the limit (50) |
| 2108 | Parameter type error |
| 2109 | AdvancedEnabled must be 0 or 1 |
| 2110 | algorithmType must be 0 or 1 |
| 2111 | Must be less then 50 requestIds in one query |
| 2112 | Must be less then 50 sinoIds in one query |
| 2113 | signAlgorithm must be one of 'personal_sign, signTypedData, eth_signTypedData_v3, eth_signTypedData_v4' |
| 2114 | The length of requestId is too long, the maximum is 120 |
| 2115 | Incorrect message format, or incorrect signAlgorithm parameter |
| 2116 | Wallet and organization information do not match |
| 2117 | Wallet and vault information do not match |
| 2118 | Vault and organization information do not match |
| 2119 | Current chain does not support self-transfer |
| 2120 | Chain information organization is not configured |
| 2121 | chainSymbol does not match with chain |
| 2122 | Wallet address information not found |
| 2123 | The whitelist address verification fails |
| 2124 | Transaction insertion into the database failed |
Business Level Errors
| Error Code | Description |
|---|---|
| 4001 | Build transaction failed |
| 4002 | Broadcast failed |
| 4003 | The transaction of current asset can not be accelerated |
| 4004 | The transaction to be accelerated has been contained in blockchain or the nonce has been occupied |
| 4005 | The transaction to be canceled has been contained in blockchain or the nonce has been occupied |
| 4006 | MPC Node not set |
| 4007 | DKG not done |
| 4008 | Cannot initiate wallet creation operation on the same vault at the same time |
| 4009 | Wallet names cannot be the same under the same vault |
| 4010 | The value of the count parameter does not match the length of walletInfos array |
| 4011 | Wallet quantity limit |
| 4014 | Writing to mq failed |
| 4015 | Transaction insertion into the database failed |
| 4017 | The cancelled deal does not exist |
| 4018 | The accelerated transaction status is no longer padding and the transaction cannot be accelerated |
| 4019 | The deal accelerated by this transaction does not exist |
Data Dictionary
Transaction Fee Rate Levels
| Code | Description |
|---|---|
| LOW | Low |
| MIDDLE | Medium |
| HIGH | High |
Transaction Status
| Code | Description |
|---|---|
| 0 | Transaction pending on secondary confirmation |
| 1 | Transaction pending on signature |
| 2 | Transaction pending |
| 4 | Broadcast failed |
| 5 | Transaction failed on blockchain |
| 6 | Broadcast timeout |
| 10 | Transaction success |
| 11 | Transaction has been rollback |
| 13 | Transaction has rejected |
Changelog
| Version | Log | Date | Modifier |
|---|---|---|---|
| v0.9.0 | First version | 2023-08-04 | Owen |
| v0.9.1 | Added new sections, fixed some APIs | 2023-08-22 | Owen |
| v0.9.2 | Quite many changes about transaction information, SO PLEASE JUST IGNORE THE OLD VERSIONS | 2023-09-05 | Owen |
| v0.9.3 | Updates the request parameters of interfaces /v1/call_back/transaction/notify and /v1/call_back/withdrawal/confirm | 2023-09-05 | Owen |
| v0.9.4 | Cumulative updates: 1. Add api /v1/waas/mpc/transaction/fee. 2. Fix: Correct the response feild sinoId of api /v1/waas/mpc/web3/sign_message from integer to string, and the request params chainSymbol of apis /v1/waas/mpc/transaction/cancel_transaction and /v1/waas/mpc/transaction/speedup_transaction is modified from required to non-required. | 2023-12-25 | Shihan, etc. |
| v0.9.5 | Added new interfaces /v1/waas/mpc/web3/sign_result | 2024-01-10 | wd |
Authentication
API Key: BIZ-API-KEY
API Key: BIZ-API-NONCE
API Key: BIZ-API-SIGNATURE
您的 WaaS API Key 公钥.
| Security Scheme Type: | apiKey |
|---|---|
| Header parameter name: | BIZ-API-KEY |
包含在待签名数据中的时间戳.
| Security Scheme Type: | apiKey |
|---|---|
| Header parameter name: | BIZ-API-NONCE |
使用您的 API Key 私钥对请求信息所做的签名。
| Security Scheme Type: | apiKey |
|---|---|
| Header parameter name: | BIZ-API-SIGNATURE |