API Reference

API Reference

The SolanaFM APIs design principles revolves around serving RESTful endpoints and Websockets (WS). We offer a suite of endpoints that allows you to build and integrate your on-chain programs and projects much conveniently. Our APIs are designed with an object-oriented approach. We adhere to the standard HTTP responses with the use of appropriate response status code, and authentication.

The API endpoints differs for every user as we release newer versions of the APIs to users who have opted in for the beta.


Authentication

The SolanaFM APIs are free of charge but usages are gated by a rate-limiting middleware. All API requests must be made over HTTPS. Calls made over plain HTTP will fail.


Errors

SolanaFM uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicates client side error which could be caused by required parameters are not populated for querying or datatypes mismatch. Codes in the 5xx indicates a server side error and can be caused by server's down time.

Some 4xx errors that could be handled programmatically (e.g. and invalid block number) includes an error message that briefly explains the error raised.

Status CodeStatusResponses
200OKReturns the data in the response body
400Bad RequestRequest parameter(s) provided is incorrectly formatted or not provided
404Not FoundThe resource(s) requested is unavailable
429Too many RequestsRate-limit has been exceeded
500Internal Server ErrorThe server encountered an unexpected error that prevented it from fulfilling the request.