Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Binance fetcher with WebSocket support #6

Open
cehali opened this issue Jul 16, 2024 · 1 comment
Open

Prepare Binance fetcher with WebSocket support #6

cehali opened this issue Jul 16, 2024 · 1 comment

Comments

@cehali
Copy link
Contributor

cehali commented Jul 16, 2024

RedStone is an oracle that provides frequently updated, reliable, and diverse data feeds for dApps and smart contracts across multiple Layer 1 and Layer 2 networks. To address the needs of the current DeFi ecosystem, we adopted a modular design that offers flexibility and meets various client requirements. For more details on how RedStone operates, please refer to our documentation.

This task focuses on one of the most critical components of our architecture: the RedStone Oracle Nodes. The nodes are responsible for fetching data from external sources, validating its accuracy, and aggregating. After determining the correct value, it is signed and broadcasted to our Distribution Data Layer. Additional information about RedStone Oracle Nodes can be found in the README.

Task

We would like to implement a new fetcher which will be able to continuously download data from Binance API using WebSocket protocol.

STEP 1

Get familiar with RedStone Oracle Node architecture and implement the necessary changes which are required to support WebSocket fetchers. Take into account the whole node process with steps like validation, data aggregation, signing and broadcasting. The node should be able to work with the previous HTTP API and new WebSocket fetcher simultaneously.

Instruction on how to run RedStone Oracle Node locally:

  • Clone repo
  • Install dependencies using yarn install command
  • Go to the oracle-node folder using cd packages/oracle-node command
  • Run yarn build
  • Populate .env file with:
    • OVERRIDE_MANIFEST_USING_FILE="./manifests/data-services/primary.json"
    • ECDSA_PRIVATE_KEY="0x1111111111111111111111111111111111111111111111111111111111111111"
  • Run yarn start:dev
  • Check the tmp.out file, it should contain the node logs

STEP 2

Implement Binance WebSocket API fetcher which is compatible with changes from STEP 1 and previously implemented fetchers.

STEP 3

Prepare instruction and test scenario which present how the new fetcher works. Tokens from the primary manifest can be used for testing, please define a subset which could work with the Binance WebSocket API fetcher.

Key details

@Oyase-shinobi
Copy link

Hello @cehali
did you finish this task?
if not, I can handle it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants