Invalid params (-32602)
Last updated:
At a glance
| Property | Value |
|---|---|
| Code | -32602 |
| Message | Invalid params |
| Category | jsonrpc |
Cause
The method exists but the parameters are wrong: missing required args, wrong order/types, an invalid encoding, or an out-of-range value.
Solution
- Match the parameter order and types to the method signature.
- Use the correct encoding (`base58`/`base64`/`jsonParsed`).
- Validate ranges (slot/limit) before sending.
Example
{
"id": 1,
"error": {
"code": -32602,
"message": "Invalid params: invalid length"
},
"jsonrpc": "2.0"
}FAQ
- Why does "Invalid params" happen?
- The method exists but the parameters are wrong: missing required args, wrong order/types, an invalid encoding, or an out-of-range value.
- How do I fix "Invalid params"?
- Match the parameter order and types to the method signature. Use the correct encoding (`base58`/`base64`/`jsonParsed`). Validate ranges (slot/limit) before sending.
- What is RPC error -32602?
- -32602 means: Invalid params. The method exists but the parameters are wrong: missing required args, wrong order/types, an invalid encoding, or an out-of-range value.