Errordescription
Error Description
1. If the httpStatusCode equals 400, it means there is a problem with the basic parameters of the interface. For example, if a float is required to pass a string, then the business status code = 1.
2. If httpStatusCode equals 500, it means there is a server error; in this case, the business status code is 2.
| httpStatusCode | code | msg | |
|---|---|---|---|
| 400 | 1 | Parameter error | |
| 500 | 2 | Internal Server Error | |
| 500 | 2 | server is busy, please try again later |
3. If httpStatusCode equals 200, it means the server has processed the request correctly; if the status code is 1, the request parameters are incorrect.
4. If httpStatusCode equals 200 and the business status code is 0, the request is successful;
| httpStatusCode | code | msg |
|---|---|---|
| 200 | 1 | Incorrect request parameters |
| 200 | 0 | success |
Calculate exchange recv
POST
/openapi/order/calculate
The following are possible errors that this interface may encounter in scenario 3:
| code | msg | data |
|---|---|---|
| 1 | from quantity too small | { "max_from_quantity":52980, "min_from_quantity":31.78908998, } |
| 1 | from quantity too large | {"max_from_quantity":52980, "min_from_quantity":31.78908998} |
| 1 | from assets not found | -- |
| 1 | from assets disabled | -- |
| 1 | to assets not found | -- |
| 1 | to assets disabled | -- |
Place order
POST
/openapi/order/place
The following are possible errors for this interface:
| code | msg | data |
|---|---|---|
| 1 | from quantity too small | {"max_from_quantity":52980,"min_from_quantity":31.78908998} |
| 1 | from quantity too large | {"max_from_quantity":52980,"min_from_quantity":31.78908998} |
| 1 | from assets not found | -- |
| 1 | from assets disabled | -- |
| 1 | to assets not found | -- |
| 1 | to assets disabled | -- |
| 1 | invalid to address(At least one receiving address in the order is invalid.) | -- |
| 1 | calc_id parameters do not match(Send) | -- |
| 1 | calc_id to_address parameters do not match(receive) | -- |
| 1 | calc_id invalid or expired | -- |
| 1 | calc_id only used for fixed exchange mode | -- |