Skip to content

A tool for enhancing the price visibility in livepeer ecosystem.

License

Notifications You must be signed in to change notification settings

buidl-labs/livepeer-pricing-tool-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Livepeer Pricing Tool - API Documentation

An API for curating the off-chain orchestrator pricing information and exposing the data via various endpoints.


Getting Started

  • Clone the repo: git clone https://github.com/buidl-labs/livepeer-pricing-tool-api and cd into it.

Using Docker

  • Create a file .env and set environment variables (sample present in livepeer-pricing-tool-api/.env.sample)
  • Run your docker daemon.
  • Build the docker image: docker build --tag api:latest . .
  • Run Demux: docker run -v "$(pwd)"/data:/data -p 9000:9000 --env-file ./.env api:latest

Table of Contents


/orchestratorStats

GET request returning an object array consisting of latest statistics for all the orchestrators.

Parameters

Query Parameters
Name Values Description
excludeUnavailable True [default] / False This query parameter exludes the unavailable orchestrators from the list of returned orchestrators

Examples

[
  {
    "Address": "0xe9e284277648fcdb09b8efc1832c73c09b5ecf59",
    "ServiceURI": "https://livepeer.production-ue1.staked.cloud:8935",
    "LastRewardRound": 1774,
    "RewardCut": 50000,
    "FeeShare": 0,
    "DelegatedStake": 2.0817318069491477e+24,
    "ActivationRound": 1611,
    "DeactivationRound": 1.157920892373162e+77,
    "Active": true,
    "Status": "Registered",
    "PricePerPixel": 27840.575,
    "UpdatedAt": 1591592904
  },
  {
    "Address": "0xda43d85b8d419a9c51bbf0089c9bd5169c23f2f9",
    "ServiceURI": "https://70ea2ff5-004f-4ed6-98b4-60f6c1b48444.livepeer.herd.run:8935",
    "LastRewardRound": 1774,
    "RewardCut": 25000,
    "FeeShare": 500000,
    "DelegatedStake": 1.3120167580279702e+24,
    "ActivationRound": 1620,
    "DeactivationRound": 1.157920892373162e+77,
    "Active": true,
    "Status": "Registered",
    "PricePerPixel": 83862.63,
    "UpdatedAt": 1591592904
  },
  {
    "Address": "0xa5e37e0ba14655e92deff29f32adbc7d09b8a2cf",
    "ServiceURI": "https://7933316d-8d09-4b34-aebe-fe0654a3b7ca.livepeer.herd.run:8935",
    "LastRewardRound": 1774,
    "RewardCut": 50000,
    "FeeShare": 450000,
    "DelegatedStake": 9.355364168371407e+23,
    "ActivationRound": 1611,
    "DeactivationRound": 1.157920892373162e+77,
    "Active": true,
    "Status": "Registered",
    "PricePerPixel": 83862.63,
    "UpdatedAt": 1591592904
  }
]

/priceHistory

GET request returning the price history corresponding to an orchestrator in the form of an object list containing timestamps and price per pixel for the respective timestamps.

Parameters

Path Parameters
  • Orchestrator Address /priceHistory/:OrchestratorAddress
    • This path parameter constitutes of the the orchestrator address, for which the price history is required. The addresses can be fetched via /orchestratorStats endpoint.
Query Parameters
Name Values Description
limit integer Limits the number of rows in reponse to the specified value
offset integer When coupled with limit, can be used for pagination
from integer Specifies the start value of a date/time range in unix epoch time format
till integer Specifies the end value of a date/time range in unix epoch time format

Examples

[
  {
    "PricePerPixel": 81836.82,
    "Time": 1591596521
  },
  {
    "PricePerPixel": 83862.63,
    "Time": 1591592904
  },
  {
    "PricePerPixel": 83763,
    "Time": 1591589287
  },
  {
    "PricePerPixel": 83098.8,
    "Time": 1591585672
  },
  {
    "PricePerPixel": 82434.6,
    "Time": 1591582056
  }
]

About

A tool for enhancing the price visibility in livepeer ecosystem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published