๐ JSON-RPC
Code samples
POST /api/v1/eth/jsonrpc
curl -X POST 'https://settla.net/api/v1/eth/jsonrpc' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getRawTransactionByHash",
"params": [
"0x034f561a3af0d2ea225dee1f9539fdb5c77769b85cecadf1bfda9bea8e178f01"
]
}'
Proxies any valid Ethereum JSON-RPC 2.0 request to the configured ETH node. The request body is forwarded as-is and the node's response is returned.
Body parameter
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getRawTransactionByHash",
"params": [
"0x034f561a3af0d2ea225dee1f9539fdb5c77769b85cecadf1bfda9bea8e178f01"
]
}
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
Example responses
200 Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x02f8750182013285012a05f20085012d098220825208946928f3e126dbac9923d52300fdef714b280b305c870dd09beac4d71c80c001a09723dc578adc6e2ae34c505a895ef21655e9c85dc9c296d9b4098975e91bc8a3a0764f36e553595cf61f14f8756cb4611c4d5099d93fda66007f7872ea5b287ad3"
}
500 Response
{
"error": {
"code": -32603,
"message": "Failed to connect to ETH node"
}
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | JSON-RPC response from the ETH node, returned verbatim. Note that a node-level error still comes back with HTTP 200 and an error member โ check for it rather than relying on the status code. | Inline |
| 500 | Internal Server Error | ETH node URL is not configured or node is not reachable | Inline |
๐ Response Schema
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | object | false | none | none |
| ยปยป code | integer | false | none | none |
| ยปยป message | string | false | none | none |