getmemoryinfo - Bitcoin Cash
Example code for the getmemoryinfo JSON-RPC method. Complete guide on how to use the getmemoryinfo JSON-RPC method in the GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "getmemoryinfo",
"params": ["stats"],
"id": "getblock.io"
}'const axios = require('axios');
const { data } = await axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', {
jsonrpc: '2.0', method: 'getmemoryinfo',
params: ['stats'], id: 'getblock.io'
});
console.log(data.result.locked.used);import requests
response = requests.post(
'https://go.getblock.io/<ACCESS-TOKEN>/',
headers={'Content-Type': 'application/json'},
json={
'jsonrpc': '2.0',
'method': 'getmemoryinfo',
'params': ["stats"],
'id': 'getblock.io'
}
)
print(response.json()['result'])Response
{
"error": null,
"id": "getblock.io",
"result": {
"locked": {
"used": 130464,
"free": 131072,
"total": 261536,
"locked": 261536,
"chunks_used": 2038,
"chunks_free": 2
}
}
}Response Parameters
Parameter
Type
Description
Locked Object
Field
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Was this helpful?