Home

Call read-only function

POST
https://stacks.nownodes.io/v2/contracts/call-read/{contract_address}/{contract_name}/{function_name}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Call a read-only public function on a given smart contract.

The smart contract and function are specified using the URL path. The arguments and the simulated tx-sender are supplied via the POST body in the following JSON format:

Body

application/json

map of arguments and the simulated tx-sender where sender is either a Contract identifier or a normal Stacks address, and arguments is an array of hex serialized Clarity values.

senderstringrequired

The simulated tx-sender

argumentsArray<string>required

An array of hex serialized Clarity values

Parameters

contract_addressstringrequiredpath

Stacks address

contract_namestringrequiredpath

Contract name

function_namestringrequiredpath

Function name

tipstringquery

The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).

Response

200OK

Success