In the following instructions, $TOKEN represents your TOKEN. Please replace it with your actual TOKEN when using.
The usage of the staked_conn interface is similar to the RPC interface, primarily providing the sendTransaction method, which directly connects to our validator node.
When calling the sendTransaction method of staked_conn, please note the following:
curl -X POST 'http://ny.0slot.trade?api-key=$TOKEN' \
-d '{
"jsonrpc": "2.0",
"id": $UUID,
"method": "sendTransaction",
"params": [
"<base64_encoded_tx>",
{ "encoding": "base64" }
]
}'
1) Use http instead of https! http is faster! You must use http to get faster speeds.
2) $UUID is the unique identifier for this request.
3) We provide faster servers in different locations for users. Please test and select the most suitable server from the list below, then replace it in the URL above:
{"id":"1","jsonrpc":"2.0","error":{"code":403,"message":"API key has expired"}}
{"id":"1","jsonrpc":"2.0","error":{"code":403,"message":"Invalid method"}}
{"id":"1","jsonrpc":"2.0","error":{"code":419,"message":"Rate limit exceeaded"}}
Add an instruction to the Transaction (preferably inserted at the beginning):
transaction.addInstruction(
fromPublicKey,
'Eb2KpSC8uMt9GmzyAEm5Eb1AAAgTjRaXWFjKyFXHZxF3',
100000
);
Important Note:
The RPC service supports keepalive connections with a 65-second timeout. To optimize performance, we recommend sending periodic HTTP requests (of any type) to maintain persistent connections and minimize request latency.
For additional assistance with the staked_conn interface, our support team is available through these channels: