Adapter
List, Insert And Remove Orakl Network Adapters
If you are not an Orakl Network Data Feed Operator, you do not need to read the explanation on this page.
The Orakl Network CLI provides commands to
What Is Adapter?
Adapter is an abstraction for a set of data coming from different sources but representing the same underlying information (e.g. price of BTC in various exchanges or temperature in Seoul measured wit different sensors at various locations across the city).
Every adapter has adapterHash
, name
, decimals
and feeds
property. adapterHash
is a unique adapter identifier that is computed from all adapter properties except the adapterHash
itself. It is defined for safety reasons so nobody can accidentally modify the adapter without anybody noticing. name
property concisely describes the purpose of adapter. decimals
property represents a number of decimal points in which the values returned from adapter are encoded. The values extracted from feeds
are stored in an integer
format and decimal points are stored separately. feeds
property is the most important one. It contains a list of various data sources and defines how each data point should be post-processed.
The example of adapter for BTC-USD
with a Binance as a single data source and 8 decimals
.
List Adapters
All registered adapters can be listed with adapter list
command. If you want to see only adapters for a specific chain, you can use the --chain
parameter.
Insert New Adapter
Adapter definition can become quite lengthy when there is more than one data source. For this reason we support the registration of new adapter through the --source
parameter which can point to the JSON adapter file on your local computer, or to JSON adapter file hosted on web.
You can use predefined adapter definitions from the Orakl Network Data Feed Configuration page.
example
Remove Adapter Specified By id
id
Adapter that is not associated with any aggregator can be removed. The adapter to remove is specified by its id
. To remove adapter apply an --id
parameter to adapter remove
command.
example
Last updated