General Info
General API Information
- The available base endpoint for the Mainnet API is: https://trade.vessel.finance.
- The available base endpoint for the Testnet API is: https://testnet.trade.vessel.finance.
- Responses from all endpoints are in JSON format.
General Request URL Format
The general format for all API requests is as follows:
https://<baseUrl>/<endpoint>?<queryParams>
- baseurl: The base URL of the API, e.g. https://testnet.trade.vessel.finance
- endpoint: The specific endpoint being accessed, e.g. /api/v1/gateway/public/klines
- queryParams: Any required or optional query parameters, specified as param=value pairs, separated by the & character
Here is an explame of request URL:
https://trade.vessel.finance/api/v1/gateway/public/klines?symbol=WBTCUSDT&interval=5m
Time Format
- Timestamps in the API, including time-related fields, are represented in Unix timestamps, measured in milliseconds, and are in Coordinated Universal Time (UTC).
HTTP Return Codes
4XX Series: Client Errors
- 400 Bad Request:
The request is malformed or contains invalid parameters. - 401 Unauthorized:
Authorization has failed. - 403 Forbidden:
WAF Limit (Web Application Firewall) has been violated. - 429 Too Many Requests:
Rate limit.
5XX Series: Server Errors
- 502 Internal Server Error:
An internal server error occurred on Vessel's side.
It is important not to treat this as a failed operation; the execution status is UNKNOWN and could have been a success.
Error Handling
If an error occurs, the API response will include the following:
- error:
true
to indicate an error. - message:
A message detailing the reason for the error.
Ensure you check the error status and review the accompanying message for troubleshooting and resolution.Error Example
{
"error": true,
"msg": "Error: Type mismatch for limit"
}
Efficient Rate Limits
To ensure streamlined API access, we are enforcing rate limits on the current API request. Presently, our threshold stands at 3000 requests per 5-minute interval, limiting both User IP and user account.
Last modified: 3 个月前