Giter VIP home page Giter VIP logo

price-updater-service's People

Contributors

arr552 avatar marioidival avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

pinkdiamond1

price-updater-service's Issues

Filter tokens list returned

Could the actual endpoint: /v1/tokens accepts an optional value to filter the list to a specific tokens. Params could be as Filter currencies endpoint that symbols are separated by | so we can request id=0|1 and maybe with this improvement we could remove the other endpoint /v1/tokens/<TOKEN_ID> or replace it to this approach.
Returns format could be the same

Create documentation to configFiles of providers

The price updater can load configurations from a json file to be used as configuration of provider. The struct is pretty simple:

Bitfinex example:

{
  "provider": "bitfinex",
   "config": {
       "0": "eth-add"
   }

The config object represent the relation of tokenID on hermez-node and ethereum address of token on mainnet.

Use only one price updater to update many hermez node

Use only one price updater service to update the prices in many hermez node synchronized in the same network (environment).
This will ovoid the need of having multiple price updater services that sync the same tokens

Improve README with more information

As user, I want to know what commands are required or optional to run on set up.

As a developer, I want to know that all requests need of Origin header

Use multiple providers

Add the ability to use other provider for a specific token If the price can't be retrieved from the first provider by any reason.
It would be nice if we could config a priority list of providers.

Add new hardcoded provider

It could be worth it have another provider wich would be "hardcoded", and then the hardcoded prices would be all in the same file

Add README

It is necessary to add a README that explains the usage service and environment variables.

Price updater using hermez-node database

We had a chat with @laisolizq and we have some questions regarding price-updater functionality xD

Price-updater service requires some environment variables which includes connection to postgres hermez database:

  • does it means that price-updater write directly to the hermez-node database ?
  • continuing the question before, does API responses reads from hermez postgres database or price-updater has its own database ?
  • wonder if price-updater can run on an external machine a part from hermez-node and if the price-updater could run without setting those variables and be an external service for anyone that needs to fetch prices

thanks !!

use default info from db (Get info from Smart Contract)

If the token it is not defined in the json, get the information from the table "token" and try to retrieve the price using this symbol or contract address. This is necesary for new tokens that can be set from the smart contract any time

Improvements on documentation

[ ] - Create a documentation to setup the price updater
[ ] - Improvements to README

  • What's commands are required
  • Add $ in a text command to users know that command is runnable by binary

Change logger

Use the hermez node logger because it is much better

Add API Key for testing

As we test from Origin localhost, it won't work once we do apply Origin limits. A possible solution is to have an easy to change API key that we can then share on Notion for internal development.

Create Linux service file

It will help the user to have Price Updater as a Linux Service.
However, to make it opcional and easy to use I would suggest to do not include it in a make file, I would suggest to let it as priceupdater.service configuration file in project root folder and another specific priceupdaterserviceconfig.md markdown file giving instructions how to setup it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.