Interacting with OneBalance API
The OneBalance API uses API keys to authenticate requests. All API requests require authentication using an API key passed in the x-api-key
header:
A public API key is available for testing purposes with limited usage: 42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11
For production use, contact support@onebalance.io to get your custom API token with higher rate limits and full access to all features.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Learn more in our Authentication guide.
OneBalance API is built on REST principles and is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
The Base URL for all API endpoints is:
See our API Reference Introduction for more details.
OneBalance API implements Cross Origin Resource Sharing (CORS) to allow requests from browsers on different domains.
CORS is generally handled by the server, not the client. If you’re experiencing CORS errors in your browser application, you have several options:
Learn more about CORS in the API Reference.
The OneBalance API implements rate limiting to ensure fair usage and availability of the service for all users:
If you exceed the rate limit, the API will return a 429 Too Many Requests
response. To handle rate limits effectively, monitor the rate limit headers in your API responses:
Learn more in the Rate Limits documentation.
The API uses standard HTTP status codes to indicate success or failure:
2xx
- Success4xx
- Client error (like invalid parameters)5xx
- Server errorFor errors, the API returns a JSON response with details about what went wrong:
Always check the message
field for details on how to resolve the issue, and include the id
when contacting support.
See the Errors documentation for more information.
For endpoints that return large collections of items, the API uses cursor-based pagination. To paginate results:
limit
parameter to control the number of items per pagecontinuation
token from the response to fetch the next pageCheck the Pagination documentation for details.
Aggregated assets are OneBalance’s unified representation of tokens across multiple chains. For example, ds:usdc
represents USDC across all supported networks.
Key endpoints for working with aggregated assets:
Learn more about how aggregated assets work in our Aggregated Assets guide.
OneBalance provides transaction tracking through our Status API:
Understanding the Transaction Lifecycle will help you better interpret status responses and execution paths.