Home

Meterest

v1.2.2
Base URL
https://meter.nownodes.io

RESTful API to access Meter.io

Project Home

Authentication

api-keyAuthapiKey

API Key: api-key in header

API Reference

Accounts

Access to account objects

Retrieve account detail

GET
https://meter.nownodes.io/accounts/{address}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

includes balance, energy and hasCode, by account address. An account with hasCode be true is a contract.

Historical account detail can be queried by specifying revision query string.

Parameters

addressstring<bytes20>requiredpath

address of account

revisionstringquery

can be block number or ID. best block is assumed if omitted.

Response

200OK

OK

Execute account code

POST
https://meter.nownodes.io/accounts/{address}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

to simulate contract method call, without sending transaction to block chain.

It's useful to estimate gas usage and execution result of a clause.

Body

application/json

arguments and environment

valuestring

amount of token to be transferred

datastring

input data for contract call

gasinteger<uint64>

max allowed gas for execution

gasPricestring

absolute gas price

callerstring

caller address (msg.sender)

Parameters

addressstring<bytes20>requiredpath

address of account

revisionstringquery

can be block number or ID. best block is assumed if omitted.

Response

200OK

OK

Execute a batch of codes

POST
https://meter.nownodes.io/accounts/*

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

to simulate execution of a transaction.

Body

application/json

arguments and environment

clausesArray<Clause>
Show child attributes
tostring

recipient of clause, null for contract deployment (bytes32)

valuestring

hex form of token to be transferred

datastring

input data (bytes)

gasinteger<uint64>

max allowed gas for execution

gasPricestring

absolute gas price

callerstring

caller address (msg.sender)

Parameters

revisionstringquery

can be block number or ID. best block is assumed if omitted.

Response

200OK

OK

Execute bytecodes

POST
https://meter.nownodes.io/accounts

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

to simulate contract deployment without sending transaction to block chain.

It's useful to estimate gas usage and contract deployment result of a clause.

TIPS:

  • data in request body is the bytecodes of a contract
  • data in response body is the runtime bytecodes assigned to account which the contract to be deployed

Body

application/json

arguments and environment

valuestring

amount of token to be transferred

datastring

input data for contract call

gasinteger<uint64>

max allowed gas for execution

gasPricestring

absolute gas price

callerstring

caller address (msg.sender)

Parameters

revisionstringquery

can be block number or ID. best block is assumed if omitted.

Response

200OK

OK

Retrieve account code

GET
https://meter.nownodes.io/accounts/{address}/code

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

if any. Here the code is runtime bytecodes.

Parameters

addressstring<bytes20>requiredpath

address of account

revisionstringquery

can be block number or ID. best block is assumed if omitted.

Response

200OK

OK

Retrieve account storage value

GET
https://meter.nownodes.io/accounts/{address}/storage/{key}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

for given key.

Parameters

addressstring<bytes20>requiredpath

address of account

keystringrequiredpath

the key(position) to access account storage

revisionstringquery

can be block number or ID. best block is assumed if omitted.

Response

200OK

OK

Transactions

Access to transactions

Retrieve transaction

GET
https://meter.nownodes.io/transactions/{id}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

by ID.

Parameters

idstringrequiredpath

ID of transaction

rawbooleanquery

whether retrieve a raw transaction.

headstringquery

ID of head block. best block is assumed if omitted

Response

200OK

OK

Retrieve transaction receipt

GET
https://meter.nownodes.io/transactions/{id}/receipt

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

by ID.

Parameters

idstringrequiredpath

ID of transaction

headstringquery

ID of head block. best block is assumed if omitted

Response

200OK

OK

Commit transaction

POST
https://meter.nownodes.io/transactions

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

in raw or structured format. If no signature in structured format, signingHash is returned in response body.

Body

application/json
One of
rawstring

hex form of encoded transaction

chainTaginteger<uint8>

last byte of genesis block ID

blockRefstring

8 bytes prefix of some block ID

expirationinteger<uint32>

expiration relative to blockRef, in unit block

clausesArray<Clause>
Show child attributes
tostring

recipient of clause, null for contract deployment (bytes32)

valuestring

hex form of token to be transferred

datastring

input data (bytes)

gasPriceCoefinteger<uint8>

coefficient used to calculate the final gas price

gasinteger<uint64>

max amount of gas can be consumed to execute this transaction

dependsOnstring<bytes32>

ID of the transaction on which the current transaction depends on. can be null.

noncestring
signaturestring

signature hex string

chainTaginteger<uint8>

last byte of genesis block ID

blockRefstring

8 bytes prefix of some block ID

expirationinteger<uint32>

expiration relative to blockRef, in unit block

clausesArray<Clause>
Show child attributes
tostring

recipient of clause, null for contract deployment (bytes32)

valuestring

hex form of token to be transferred

datastring

input data (bytes)

gasPriceCoefinteger<uint8>

coefficient used to calculate the final gas price

gasinteger<uint64>

max amount of gas can be consumed to execute this transaction

dependsOnstring<bytes32>

ID of the transaction on which the current transaction depends on. can be null.

noncestring

Response

200OK

OK

Blocks

Access to blocks

Retrieve block

GET
https://meter.nownodes.io/blocks/{revision}

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

by ID or number, or 'best' for latest block.

Parameters

revisionstringrequiredpath

block ID or number, or 'best' stands for latest block

Response

200OK

OK

Logs

Access to event & transfer logs

Filter event logs

POST
https://meter.nownodes.io/logs/event

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Event logs are produced by OP_LOG in EVM.

Body

application/json
rangeFilterRange

defines the range to filter in. e.g.

Copied!
{
  "range": {
    "unit": "block",
    "from": 10,
    "to": 1000
  }
}

refers to the range from block 10 to block 1000. null stands for the full range.

Show child attributes
unitstringblocktime

defines the unit of from and to. block means block number, time means block timestamp, default to block.

frominteger<uint64>
tointeger<uint64>
optionsFilterOptions

pass these parameters if you need filtered results paged. e.g.

Copied!
{
  "options": {
    "offset": 0,
    "limit": 10   
  }
}

the above refers that page offset is 0, and the page size is 10. pass options null if you don't need to demand paging.

Show child attributes
offsetinteger

offset in matched record set

limitinteger

limit of records to output

criteriaSetArray<EventCriteria>
Show child attributes
addressstring

address of event emitter

topic0string
topic1string
topic2string
topic3string
topic4string
orderstringascdesc

order of filters, defaults to asc

Response

200OK

OK

Filter transfer logs

POST
https://meter.nownodes.io/logs/transfer

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Transfer logs are recorded on MTRG transferring.

Body

application/json
rangeFilterRange

defines the range to filter in. e.g.

Copied!
{
  "range": {
    "unit": "block",
    "from": 10,
    "to": 1000
  }
}

refers to the range from block 10 to block 1000. null stands for the full range.

Show child attributes
unitstringblocktime

defines the unit of from and to. block means block number, time means block timestamp, default to block.

frominteger<uint64>
tointeger<uint64>
optionsFilterOptions

pass these parameters if you need filtered results paged. e.g.

Copied!
{
  "options": {
    "offset": 0,
    "limit": 10   
  }
}

the above refers that page offset is 0, and the page size is 10. pass options null if you don't need to demand paging.

Show child attributes
offsetinteger

offset in matched record set

limitinteger

limit of records to output

criteriaSetArray<TransferCriteria>
Show child attributes
txOriginstring
senderstring
recipientstring
orderstringascdesc

order of filters, defaults to asc

Response

200OK

OK

Filter event logs

POST
https://meter.nownodes.io/logs/events

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Event logs are produced by OP_LOG in EVM.

Body

application/json

event filter criteria

rangeFilterRange

defines the range to filter in. e.g.

Copied!
{
  "range": {
    "unit": "block",
    "from": 10,
    "to": 1000
  }
}

refers to the range from block 10 to block 1000. null stands for the full range.

Show child attributes
unitstringblocktime

defines the unit of from and to. block means block number, time means block timestamp, default to block.

frominteger<uint64>
tointeger<uint64>
optionsFilterOptions

pass these parameters if you need filtered results paged. e.g.

Copied!
{
  "options": {
    "offset": 0,
    "limit": 10   
  }
}

the above refers that page offset is 0, and the page size is 10. pass options null if you don't need to demand paging.

Show child attributes
offsetinteger

offset in matched record set

limitinteger

limit of records to output

topicSetsArray<TopicSetLegacy>
Show child attributes
topic0string
topic1string
topic2string
topic3string
topic4string

Parameters

orderstringascdescquery

order of filters, defaults to asc

addressstringquery

address of account which is the events emitter

Response

200OK

OK

Filter transfer logs

POST
https://meter.nownodes.io/logs/transfers

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Transfer logs are recorded on MTR transferring.

Body

application/json

transfer log filter criteria

rangeFilterRange

defines the range to filter in. e.g.

Copied!
{
  "range": {
    "unit": "block",
    "from": 10,
    "to": 1000
  }
}

refers to the range from block 10 to block 1000. null stands for the full range.

Show child attributes
unitstringblocktime

defines the unit of from and to. block means block number, time means block timestamp, default to block.

frominteger<uint64>
tointeger<uint64>
optionsFilterOptions

pass these parameters if you need filtered results paged. e.g.

Copied!
{
  "options": {
    "offset": 0,
    "limit": 10   
  }
}

the above refers that page offset is 0, and the page size is 10. pass options null if you don't need to demand paging.

Show child attributes
offsetinteger

offset in matched record set

limitinteger

limit of records to output

addressSetsArray<AddressSetLegacy>
Show child attributes
txOriginstring
senderstring
recipientstring

Parameters

orderstringascdescquery

order of filters, defaults to asc

Response

200OK

OK

Filter event logs

POST
https://meter.nownodes.io/events

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Body

application/json

event filter criteria

rangeFilterRange

defines the range to filter in. e.g.

Copied!
{
  "range": {
    "unit": "block",
    "from": 10,
    "to": 1000
  }
}

refers to the range from block 10 to block 1000. null stands for the full range.

Show child attributes
unitstringblocktime

defines the unit of from and to. block means block number, time means block timestamp, default to block.

frominteger<uint64>
tointeger<uint64>
optionsFilterOptions

pass these parameters if you need filtered results paged. e.g.

Copied!
{
  "options": {
    "offset": 0,
    "limit": 10   
  }
}

the above refers that page offset is 0, and the page size is 10. pass options null if you don't need to demand paging.

Show child attributes
offsetinteger

offset in matched record set

limitinteger

limit of records to output

topicSetsArray<TopicSetLegacy>
Show child attributes
topic0string
topic1string
topic2string
topic3string
topic4string

Parameters

orderstringascdescquery

order of filters, defaults to asc

addressstringquery

address of account which is the events emitter

Response

200OK

OK

Filter transfer logs

POST
https://meter.nownodes.io/transfers

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Body

application/json

transfer log filter criteria

rangeFilterRange

defines the range to filter in. e.g.

Copied!
{
  "range": {
    "unit": "block",
    "from": 10,
    "to": 1000
  }
}

refers to the range from block 10 to block 1000. null stands for the full range.

Show child attributes
unitstringblocktime

defines the unit of from and to. block means block number, time means block timestamp, default to block.

frominteger<uint64>
tointeger<uint64>
optionsFilterOptions

pass these parameters if you need filtered results paged. e.g.

Copied!
{
  "options": {
    "offset": 0,
    "limit": 10   
  }
}

the above refers that page offset is 0, and the page size is 10. pass options null if you don't need to demand paging.

Show child attributes
offsetinteger

offset in matched record set

limitinteger

limit of records to output

addressSetsArray<AddressSetLegacy>
Show child attributes
txOriginstring
senderstring
recipientstring

Parameters

orderstringascdescquery

order of filters, defaults to asc

Response

200OK

OK

Node

Access to node status info

Retrieve connected peers

GET
https://meter.nownodes.io/node/network/peers

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Response

200OK

OK

Retrieve current committee members

GET
https://meter.nownodes.io/node/consensus/committee

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Subscriptions

Subscribe interested subjects

(Websocket) Subscribe new blocks

GET
https://meter.nownodes.io/subscriptions/block

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Parameters

posstringquery

a saved block ID for resuming the subscription. best block ID is assumed if omitted.

Response

200OK

OK

(Websocket) Subscribe new events

GET
https://meter.nownodes.io/subscriptions/event

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

which satisfy criteria in query.

Parameters

posstringquery

a saved block ID for resuming the subscription. best block ID is assumed if omitted.

addrstringquery

address of event emitter

t0stringquery

topic0 of event

t1stringquery

topic1 of event

t2stringquery

topic2 of event

t3stringquery

topic3 of event

t4stringquery

topic4 of event

Response

200OK

OK

(Websocket) Subscribe new transfers

GET
https://meter.nownodes.io/subscriptions/transfer

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

which satisfy criteria in query.

Parameters

posstringquery

a saved block ID for resuming the subscription. best block ID is assumed if omitted.

txOriginstringquery

signer address of tx which contains the transfer

senderstringquery

address of token sender

recipientstringquery

address of token recipient

Response

200OK

OK

(Websocket) Subscribe block chain's beats

GET
https://meter.nownodes.io/subscriptions/beat

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

which contain summary of new blocks, and bloom filters that composited with affected addresses.

Parameters

posstringquery

a saved block ID for resuming the subscription. best block ID is assumed if omitted.

Response

200OK

OK

Debug

Debug utilities

Create a tracer

POST
https://meter.nownodes.io/debug/tracers

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

for a clause

Body

application/json
namestring4bytebigramcallevmdisnoopopcountprestatetrigramunigram

name of tracer. Empty name stands for default struct logger tracer.

targetstring

the unified path of target to be traced. Currently, only clause is supported. Format: blockID/(txIndex|txId)/clauseIndex

Response

200OK

OK

Retrieve storage range

POST
https://meter.nownodes.io/debug/storage-range

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

of the account with given address

Body

application/json
addressstring

address of account

keyStartstring
maxResultnumber
targetstring

Response

200OK

OK

Staking

Access to staking data

Retrieve staking buckets

GET
https://meter.nownodes.io/staking/buckets

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Retrieve staking candidates

GET
https://meter.nownodes.io/staking/candidates

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Retrieve staking stakeholder

GET
https://meter.nownodes.io/staking/stakeholders

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Retrieve staking delegates for consensus

GET
https://meter.nownodes.io/staking/delegates

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.