getconfigparam - TON

Example code for the getconfigparam JSON-RPC method. Сomplete guide on how to use getconfigparam JSON-RPC in GetBlock.io Web3 documentation.

This method returns a single network configuration parameter by its numeric identifier. TON configuration parameters control gas pricing, validator economics, message routing, and many other protocol-level constants.

Parameters

Parameter
Type
Required
Description

param

integer

Yes

Configuration parameter number (e.g. 0 for config address, 20 for gas prices on masterchain)

seqno

integer

No

Masterchain block seqno at which to read the config. Defaults to the latest

Request Example

REST (GET):

curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/getConfigParam?param=20' \
--header 'Content-Type: application/json'

JSON-RPC (POST):

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getConfigParam",
    "params": {
        "param": 20
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.config.@type

string

Always tvm.cell

result.config.bytes

string

Base64-encoded BOC of the configuration parameter

Use Cases

  • Reading gas prices for cost-aware applications

  • Inspecting validator and election parameters

  • Auditing protocol-level changes after key blocks

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

422

Validation Error

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

504

Lite Server Timeout

Upstream TON liteserver timed out

SDK Integration

Last updated

Was this helpful?