Data Availability Layer API (DAL)

Pull-based oracle submission using Data Availability Layer API

The on-chain price data can be updated on-demand by a user through the pull-based oracle. Off-chain price data are updated at sub-second intervals. Users with valid API key can access and submit the latest price data on-chain. The price data can be either accessed through REST API or WebSocket API.

The DAL API requires the X-API-Key header. Please contact us to receive a valid API key.

Basic Return Types

Property
Type
Explanation

symbol

string

symbol name

value

string

price value

aggregateTime

string

timestamp value

proof

string

proof hexstring

feedHash

string

feed hash hexstring

decimals

string

decimals

Rest API

GET /symbols

returns supported symbols

Example Request
curl --location --request GET 'https://dal.baobab.orakl.network/symbols' \
--header 'X-API-Key: $API_KEY' \
--header 'Content-Type: application/json'
Example Response

GET /latest-data-feeds/all

returns latest submission parameters for all supported pairs

Example Request
Example Response

GET /latest-data-feeds/{symbol,symbol,...}

returns the latest submission parameters for requested pairs

Example Request
Example Response

GET /latest-data-feeds/transpose/all

returns latest submission paramters for all pairs in transpose format

Example Request
Example Response

Get /latest-data-feeds/transpose/{symbol, symbol..}

returns latest submission paramters for certain pairs in transpose format

Example Request
Example Response

WebSocket API

Testnet (WS): ws://dal.baobab.orakl.network/ws

Mainnet (WS): ws://dal.cypress.orakl.network/ws

Connect and Request /ws

subscribes and pushes price feeds

Example Request
Example Response

On-chain Price Data Submission

The price data is submitted on-chain through SubmissionProxy contract. The contract address can be found at JSON configuration.

submit function

Submits in bulk without strict checks. It will silently skip invalid submissions and submit only valid submissions.

Signature

ABI

submitStrict function

Submits in bulk with strict checks. If one of the submission entry fails, the whole tx will fail with error

  • signature

  • abi

submitSingle function

Submits single entry with checks.

  • signature

  • abi

submitWithoutSupersedValidation function

Submit a batch of answers to multiple feeds. The answers are ignored if they have been superseded. If any of the answers do not meet the rest of required conditions the whole batch is reverted.

  • signature

  • abi

submitSingleWithoutSupersedValidation function

Submit a single submission to a feed. The submission is ignored if it has been superseded. If the submission does not meet the rest of required conditions the submission is reverted.

  • signature

  • abi

Last updated