Giter VIP home page Giter VIP logo

bolivarparalelo's Introduction

BolivarParalelo

Método para la obtencion del precio

Se obtiene el precio de compra y el precio de venta y se saca el promedio

Los precios de compra y venta se calculan analizando las ofertas disponibles en la pagina https://localbitcoins.com siguiendo estos pasos:

Supongamos que vamos a calcular el precio de compra de 1 bitcoin en bolivares:

[
  "NATIONAL_BANK",
  "SPECIFIC_BANK",
  "CASH_DEPOSIT",
  "CASH_AT_ATM",
  "SEPA",
]
  • Se normalizan los carácteres, se traducen frases y se extraen frases claves de la descripcion de cada oferta (Opcional y especifico para cada moneda)
  • Se filtran aquellas ofertas cuya descripcion contenga alguna de las palabras claves (Opcional y especifico para cada moneda)
  • Se ordenan de acuerdo al precio, para que la mejor tasa sea la primera
  • Se itera de manera ordenada sobre cada oferta, y se devuelve el precio de aquella oferta que haya acumulado un volumen minimo de 0.5 bitcoins y que sea como mínimo la quinta oferta (Para ser conservador con los precios)

Nota

Los parametros especificos de filtrado pueden cambiar sin previo aviso, para corroborar los parametros exactos pueden revisar en la seccion de CONFIGURATIONS en el archivo https://github.com/madacol/bolivarparalelo/blob/master/bin/getPrices.rb

Advertencia

No uso el estándar financiero en el cuál EUR/USD significa cuántos dólares equivalen a 1 euro, uso un punto de vista matemático y el código está hecho con eso en mente, por lo tanto EUR/USD representa cuántos euros equivalen a 1 dólar.

Api

Por ejemplo el precio del dólar en bolívares, sería ved/usd, oséa https://www.bolivarparalelo.com/api/rate/ved/usd

{
  "counter_currency": {
    "symbol":"Bs.",
    "name":"Bolívar",
    "namePlural":"Bolívares",
    "flag":"🇻🇪",
    "code":"ved"
  },
  "base_currency": {
    "symbol":"$",
    "name":"Dólar(US)",
    "namePlural":"Dólares(US)",
    "flag":"🇺🇸",
    "code":"usd"
  },
  "buy": "229356.70923534728",
  "sell": "217231.78398433473",
  "unix_time": 1594232452411
}

bolivarparalelo's People

Contributors

dependabot[bot] avatar madacol avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jgha

bolivarparalelo's Issues

Sometimes sell rates are higher than buy rates

It's nonsense if we assume both rates belongs to the same market, but apparently they're not the same markets, it seems that the VES market in Localbitcoins.com(And probably in all Venezuela) is divided between low and high volume offers, as of now, High volume rates seems to be above the Low volume rate, so this means that there are 2 different market rates each one with it's own sell/avg/buy rate.

I don't really know how to tackle this, but it's a problem that needs to be addressed somehow.

Chart rate is wrong

Current USD/BTC rate is being used for all history rates, instead of using the USD/BTC rate corresponding to that time.

Chart is heavy/slow

I would like to put more history rates in the chart, but then it becomes unusable.

I can think of 2 ways to improve this:

  • Somehow make the chart to dynamically add/remove rates depending on how zoomed it is, in order to always keep a fixed amount of points in the graph.
  • Remove any feature that impacts performance, like animations.

The first is probably the best, it's the most scalable, but also the hardest.

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.