getmemoryinfo

Yields an object with memory use information in it.

Example Request and Result for getmemoryinfo method

In this section, we provide an illustrative example of a request made to retrieve details contents using the getmemoryinfo method. Additionally, we present the resulting response containing information about the the memory usage.

Parameters

FieldTypeDescription

mode

string

Determines what kind of information is returned.

  • “stats” returns general statistics about memory usage in the daemon.

  • “mallocinfo” returns an XML string describing low-level heap state

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Yields an object with memory use information in it.

POST https://bitcoin-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

jsonrpc*

string

1.0

id*

string

bwarelabs

method*

string

getmemoryinfo

params*

string

[]

{
    "result": {
        "locked": {
            "used": 240,
            "free": 65296,
            "total": 65536,
            "locked": 65536,
            "chunks_used": 1,
            "chunks_free": 1
        }
    },
    "error": null,
    "id": "bwarelabs"
}

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "1.0",
    "id": "bwarelabs",
    "method": "getmemoryinfo",
    "params": [
        "stats"
    ]
}'

Last updated