I'm encountering an issue with the JSON-RPC API when trying to use the getAccountInfo
method. Despite using the correct method structure (as I have successfully used similar structures for other methods), I receive the following error message:
{
"jsonrpc": "2.0",
"error": {
"code": -32601,
"message": "Method not found"
},
"id": 1
}
I've double-checked the method name and parameters, and everything seems correct according to the documentation. Here's the code snippet I used:
uri = "wss://mainnet.helius-rpc.com/?api-key=..."
while True:
try:
async with websockets.connect(uri, ping_interval=12000, ping_timeout=60) as websocket:
subscribe_message = {
"jsonrpc": "2.0",
"id": 1,
"method": "getAccountInfo",
"params": [
"EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm",
{"encoding": "base64"}
]
}
await websocket.send(json.dumps(subscribe_message))
});
In addition to resolving this error, I'm also looking to monitor all transactions related to a specific token. Could anyone suggest an approach or modifications to my current method to efficiently fetch this transaction-related information?
Any insights or suggestions on what might be causing this error and how to track token-related transactions would be greatly appreciated!