API Reference

The SolanaFM APIs are organised around REST, and Websocket (WS). Our APIs are designed with an objected-oriented approach, and generally returns JSON-encoded responses. We use the standard HTTP response standards, with the use of response codes, and authentication.
The APIs differs for every user as we release newer versions to users who have opted in for beta.


The SolanaFM API uses API keys to authenticate requests. You can view and manage your API keys in the Developer Portal.
Secret keys issued for trial have the prefix sk_trial_ and live mode secret keys have the prefix sk_live_. Secret keys that were issued prior to June 2023 do not have a prefix.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.
If you need to authenticate via bearer auth (e.g., for a cross-origin request), use -H "Authorization: Bearer sk_test_sJRtKjCkNlJKNrZrOmtZaWlqj" instead of -u sk_test_sJRtKjCkNlJKNrZrOmtZaWlqj.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.


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 indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Stripe's servers (these are rare).
Some 4xx errors that could be handled programmatically (e.g., an invalid block number) include an error code that briefly explains the error reported.