Skip to main content

API Rules and Best Practices

Rules and Best Practices

To ensure smooth and secure usage of this API, follow these guidelines:

Authentication

  • All requests (except the token endpoint) require an Authorization header with a Bearer token.
  • Obtain the token by making a request to the /token endpoint with valid credentials.
  • Include the token in the Authorization header like this: Bearer <token>.

Headers

Every request must include the following headers:

  • Content-Type: application/json - Specifies that the request body is in JSON format.
  • Accept-Encoding: gzip - Indicates that the client can handle compressed responses.

Rate Limiting

  • The API enforces a rate limit of 30 requests per minute per client.
  • Exceeding this limit will result in an error response. Plan your requests to stay within this threshold.

Best Practices

  • Validate Inputs: Ensure all required parameters are provided and correctly formatted before sending requests.
  • Handle Errors: Check response statuses and handle errors gracefully in your application.
  • Secure Tokens: Store and transmit tokens securely to prevent unauthorized access.
  • Minimize Requests: Use batch operations where possible (e.g., withdrawals) to reduce the number of calls.
  • Monitor Usage: Track your request rate to avoid hitting the rate limit unexpectedly.

Following these rules will help maintain performance and security while interacting with the API.