Documentation index

RPC Access

AllenHark provides standard Solana RPC endpoints optimized for high performance.

Documentation

For full API documentation, please refer to the standard Solana JSON RPC documentation.

Solana JSON RPC Documentation

Connection

You connect from an IP on your allowlist, or with an API key. Once your server IP is on the allowlist, you can call the endpoint directly with no key.

API key

A key lets you connect from any address. It starts with ahk_ and is shown once, when you create it in the console. Send it in either of two ways:

  • the x-api-key header: x-api-key: ahk_…;
  • the first segment of the URL path: http://88.216.36.108:7999/ahk_… for HTTP, ws://88.216.36.108:7999/ahk_… for WebSocket.

The key never reaches the node: the proxy drops the header or strips the path segment before forwarding the call. A wrong, expired or revoked key gets HTTP 401 with error -32001. One connection uses one key; a different key on the same connection gets a 401.

Your subscription's access mode decides what is accepted: ip (allowlist only), key (key only) or either. You set it in the console.

Endpoints

HTTP and WebSocket share one host and port, 7999, in two regions. The examples below use Frankfurt.

RegionHTTPWebSocket
Frankfurthttp://88.216.36.108:7999ws://88.216.36.108:7999
Amsterdamhttp://84.32.104.38:7999ws://84.32.104.38:7999
Text
http://88.216.36.108:7999
Text
ws://88.216.36.108:7999

Limits

  • Connections: you buy a number of RPC Standard connections, and each costs less the more you buy. Put them all on one IP or split them across several. An IP that opens more than its share gets HTTP 429 with error -32005.
  • Heavy methods: getProgramAccounts and getSignaturesForAddress are limited to 30 calls per 60 seconds per IP. A getProgramAccounts call with neither filters nor dataSlice is refused with -32602.
  • WebSocket: a session with no traffic for 300 seconds is closed.
  • Other addresses: a connection from an IP that is not on your allowlist and has no valid key is refused, with HTTP 401 and error -32001 or by closing the connection with no error body.
  • sendTransaction is forwarded to the node as is; nothing is staked or prioritised.

Usage Example

Node.js (@solana/web3.js)

JavaScript
import { Connection } from '@solana/web3.js';

const connection = new Connection(
  'http://88.216.36.108:7999',
  'confirmed'
);

const version = await connection.getVersion();
console.log('Connection established:', version);

Rust (solana-client)

Rust
use solana_client::rpc_client::RpcClient;

let rpc_url = "http://88.216.36.108:7999";
let client = RpcClient::new(rpc_url.to_string());

let version = client.get_version().unwrap();
println!("Connection established: {:?}", version);

cURL

Terminal
curl http://88.216.36.108:7999 \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getHealth"
  }'

With an API key, from any address:

Terminal
curl http://88.216.36.108:7999 \
  -X POST \
  -H "Content-Type: application/json" \
  -H "x-api-key: $ALLENHARK_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getHealth"}'