The public APIs made available by Ontology serve as communication bridges between
dApps and nodes.
The APIs provide methods that can be used to fetch data from the chain using various parameters such as user ONT ID, transaction hash, block height etc.
There are two different APIs available publicly for developers to start using:
HTTP API -
Both these APIs are used to fetch data from the chain, but there are slight differences between the two, described in respective sections.
Generally speaking, it is a very tedious task for developers to run and maintain a node, but also a necessity since it is required for testing before deployment on the mainnet. Thus, to make things simpler for developers, Ontology provides public test nodes all of which use the RPC, Restful and Websocket API with default ports, thereby allowing developers to test their smart contracts and business logic.
All the nodes support
WebSocket APi calls, and use default port numbers.
The public testnet nodes are:
The public mainnet nodes are :
A private node can also be set up on the local machine. This can be done by directly compiling and running the source code, but for the convenience of developers, Ontology provides a method to directly download and run a private node. Please follow this link to find the guide.