LogoLogo
GitHub
  • Quickstart
    • What is eOracle?
    • eOracle Vision
    • Use eOracle
  • Build on eOracle
    • Introduction to eOracle Stack
    • What is an OVS
    • eOracle Features
    • eOracle Data Processing Flow
    • Builders Workflow
      • Set-up
      • Off-chain Computation
      • On-chain Components
      • Target Chains Publishing
    • Smart Contracts Overview
      • eOracle Chain contracts
      • Target Contracts
    • Aggregation Library
      • Median
      • Clustering
      • TWAP
      • Robust Aggregation 101
    • eOracle Cryptographic Broadcaster
    • Incentives Management
      • 🥢On-chain-Subjective Slashing Framework
    • Active Specialized Blockchain Oracles
      • EtherOracle - Peg Securing Oracle by Etherfi
      • Pulse - Risk Oracle By Bitpulse
      • ECHO - Social Media Oracle
      • Borsa - Intent Optimisation
  • ePRICE
    • Introduction to ePRICE
    • Integration Guide
    • Risk Management and Market Integrity
    • Feed Addresses
      • Arbitrum
      • Arbitrum Sepolia
      • Base
      • Base Sepolia Testnet
      • Berachain
      • Blast
      • BNB Smart Chain
      • BOB
      • B Squared
      • B Squared Testnet
      • Hemi
      • Ink Sepolia
      • Ink Mainnet
      • Linea
      • Linea Sepolia
      • Manta
      • Manta Sepolia Tesnet
      • Mode
      • Mode Testnet
      • Monad Testnet
      • Morph
      • Morph Holesky
      • Polygon zkEVM
      • Polygon zkEVM Cardona Testnet
      • Plume
      • Plume Testnet
      • Scroll
      • Soneium
      • Sonic
      • Soneium Testnet
      • TAC Turin Testnet
      • Taiko Mainnet
      • Unichain
      • Unichain Sepolia
      • Zircuit
      • Zircuit Testnet
      • zkLink Nova Mainnet
    • API Reference
      • 🧩Examples
      • 🧩Off-chain Examples
    • Advanced
      • 🤖Automating eOracle consumption
      • 💱Getting a different currency pair
  • EO Token
    • The EO Token
    • Ecosystem Participants
    • EO Token Utility
    • EO Token Flywheel
    • Security and Enforcement
    • A New Chapter in Oracle Design
  • Understand eOracle
    • eOracle Trust Model
    • Architecture Overview
    • Data Processing
    • Security
      • Cryptoeconomic Security
      • Aegis - Validator Set Configuration
  • Operators
    • Installation
    • Registration
    • Running the Client
    • Monitoring
  • 🔍Concepts
    • EigenLayer
    • Data Validators
    • Chain Validators
    • eBFT
    • OVS
    • eOracle Chain
Powered by GitBook
On this page
  • Through a REST API Endpoint
  • Socket.IO API
Export as PDF
  1. ePRICE

API Reference

The service allows users to easily query for recent price updates via a REST API or via a websocket

Through a REST API Endpoint

A user could use this endpoint to query symbol price quotes via REST API. Our REST API endpoints could be found at: https://api.eoracle.network

Get Rate

  • Endpoint: /api/v1/get_rate

  • Method: GET

  • Parameters:

    • symbol (string, required): The symbol for which to get the rate.

  • Authentication The REST API authentication method uses a username and password. The username is the API key provided to you by eOracle, and the password should be left blank.

$ curl -X GET -u your_api_key "https://api.testnet.eoracle.network/api/v1/get_feed?symbol=eth"
{
    "symbol":"eth",  
    "rate":"2235520000000000000000",   
    "timestamp":1704645014000,  
    "data":"0x0c64cc6cb523085bac8aa2221d5458999...2309417974f4a72b98"
} 

Get Symbols

  • Endpoint: /api/v1/get_symbols

  • Method: GET

Example

curl -u your_api_key: 'https://api.eoracle.network/api/v1/get_symbols'

Response

["jpy", "eth", "btc"]

Socket.IO API

We provide a simple socket stream using the standard Socket.IO library. The message protocol is described in the following section and includes a connection, authentication and subscribe phases.

Connection

Connection is made to our eOracle api endpoint at https://api.testnet.eoracle.network. Once connected the consumer can initiate an authentication event.

Request Events

  1. authenticate

  • name: authenticate

  • payload:

{ 
  "token": "your_api_key" // your oracle api key
}
  1. subscribe

    • name: subscribe

    • payload:

    {
       "topic": "feed", //(string, required): The topic to subscribe to (e.g., 'feed').
       "symbols": ["btc", "eth", "jpy"] //(array of strings, optional): An array of symbols to subscribe to. If empty, subscribe to all symbols.
    }
  2. authenticated

    • This message is received when your client was successfully authenticated with a valid API key. Once you receive this it's a good trigger point for subscribing to quote feeds.

    • name: 'authenticated'

    • payload: none

  3. quote

    • name: quote

    • payload:

    {
      "symbol": "eth",
      "rate": "1923.45", 
      "timestamp": 1238971228, 
      "data": "0xbd3de674b8bd65........93c9220fb3202e405266", // provable merkle tree
     }
PreviouszkLink Nova MainnetNextExamples

Last updated 10 months ago