NodeChain EN
  • NodeChain
  • Learn
    • About NodeChain
    • Infrastructure
      • Connector
        • Wrapper APIs
      • Nodes
      • Startup script
    • License
    • Ecosystem
      • Supported APIs
      • Integrations
      • Acknowledgments
  • Develop
    • Quick start
      • Initial setup
      • Using command-line script
        • Commands
    • How-to
      • Run tests locally
      • Lint automatically with hooks
      • Integrate a new Blockchain/API
      • Connect to a public node
    • Wrapper API definition file
    • Contributing
  • Reference
    • API Reference
      • Admin
      • General Endpoints
      • REST Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • JSON-RPC Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • Real-Time Wrapper API
        • Bitcoin
        • Ethereum
Powered by GitBook
On this page
  1. Reference
  2. API Reference
  3. Real-Time Wrapper API

Ethereum

Ethereum real time endpoints

PreviousBitcoin

Last updated 3 years ago

Ethereum real time methods follow the JSON-RPC specification and share the same endpoint, by protocol definition, the payload methodparameter is the one used to know which method is the one to be called. To call this methods, is mandatory to specify the currency, eth in this case and the network in which to executed the request. Bitcoin real time methods are exposed in the following endpoint http://server/eth/{network}/ws where network has to be replace by the network name in which make the request

  • POSTSubscribe to balance changes for any Ethereum address
  • POSTUnsubscribe to balance changes for any address
  • POSTSubscribe to new blocks
  • POSTSubscribe from new blocks

Subscribe to balance changes for any Ethereum address

post

Subscribe to balance changes for any Ethereum address

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be subscribeToAddressBalance

Example: subscribeToAddressBalance
Responses
200
Successful response
application/json
post
POST /subscribeToAddressBalance HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 132

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "subscribeToAddressBalance",
  "params": {
    "address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd"
  }
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "subscribed": true
  }
}

Unsubscribe to balance changes for any address

post

Unsubscribe to balance changes for any address

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be unsubscribeFromAddressBalance

Example: unsubscribeFromAddressBalance
Responses
200
Successful response
application/json
post
POST /unsubscribeFromAddressBalance HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "unsubscribeFromAddressBalance",
  "params": {
    "address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd"
  }
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "unsubscribed": true
  }
}

Subscribe to new blocks

post

Subscribe to new blocks

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be subscribeToNewBlocks

Example: subscribeToNewBlocks
paramsobjectRequired
Responses
200
Successful response
application/json
post
POST /subscribeToNewBlocks HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "subscribeToNewBlocks",
  "params": {}
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "subscribed": true
  }
}

Subscribe from new blocks

post

Subscribe from new blocks

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be unsubscribeFromNewBlocks

Example: unsubscribeFromNewBlocks
paramsobjectRequired
Responses
200
Successful response
application/json
post
POST /unsubscribeFromNewBlocks HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "unsubscribeFromNewBlocks",
  "params": {}
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "unsubscribed": true
  }
}