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 usenvelope 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

chevron-rightExample Requesthashtag
curl --location --request GET 'https://dal.baobab.orakl.network/symbols' \
--header 'X-API-Key: $API_KEY' \
--header 'Content-Type: application/json'
chevron-rightExample Responsehashtag

GET /latest-data-feeds/all

returns latest submission parameters for all supported pairs

chevron-rightExample Requesthashtag
chevron-rightExample Responsehashtag

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

returns the latest submission parameters for requested pairs

chevron-rightExample Requesthashtag
chevron-rightExample Responsehashtag

GET /latest-data-feeds/transpose/all

returns latest submission paramters for all pairs in transpose format

chevron-rightExample Requesthashtag
chevron-rightExample Responsehashtag

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

returns latest submission paramters for certain pairs in transpose format

chevron-rightExample Requesthashtag
chevron-rightExample Responsehashtag

WebSocket API

Testnet (WS): ws://dal.baobab.orakl.network/wsarrow-up-right

Mainnet (WS): ws://dal.cypress.orakl.network/wsarrow-up-right

Connect and Request /ws

subscribes and pushes price feeds

chevron-rightExample Requesthashtag
chevron-rightExample Responsehashtag

On-chain Price Data Submission

The price data is submitted on-chain through SubmissionProxyarrow-up-right contract. The contract address can be found at JSON configurationarrow-up-right.

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