Giter VIP home page Giter VIP logo

apollo's Introduction

Apollo

Image Image Image

Apollo is a JavaScript library to get real-time economic declarations such as inflation rates, unemployment rates or interest rates reported by governments or other entities.

This library gives its best when used with Mida, the JavaScript framework to operate in global financial markets which can be used with Apollo to create expert advisors and perform market analysis based on macroeconomic data.

Usage

How to get an economic factor and its declarations

First you have to choose an economic factor and then request its declarations

const { ApolloEconomicFactor } = require("@reiryoku/apollo");

const japanInflationRate = ApolloEconomicFactor.getById("Japan/CPI/YoY");
const lastDeclaration = await japanInflationRate.getLastDeclaration();

console.log(`Japan inflation rate is ${lastDeclaration.actualValue}%`);
console.log(`The last declaration was made on ${lastDeclaration.date}`);

Economic declaration type

export type ApolloEconomicFactorDeclaration = {
    date: Date;
    previousDeclaration?: ApolloEconomicFactorDeclaration;
    nextDeclaration?: ApolloEconomicFactorDeclaration;
    actualValue?: number;
    forecastValue?: number;
};

Supported economic factors

Name Id Value type Source/s
U.S. Non Farm Payrolls (MoM) US/NonFarmPayrolls/MoM Pure number Investing.com
U.S. Crude Oil Inventories (WoW) US/CrudeOilInventories/WoW Pure number Investing.com
Eurozone CPI (YoY) Eurozone/CPI/YoY Percentage Investing.com
Italy CPI (YoY) Italy/CPI/YoY Percentage Investing.com
Japan CPI (YoY) Japan/CPI/YoY Percentage Investing.com
Canada Interest Rate CPI (MoM) Canada/InterestRate/MoM Percentage Investing.com

Declarations frequency

  • WoW means week over week
  • MoM means month over month
  • YoY means year over year

How to contribute

How to add a new economic provider

To add a new economic factor you need to edit the factors.json file and include a new definition.

  • Visit https://www.investing.com/economic-calendar/
  • Choose the economic factor to add, then open its link
  • Add a new definition to factors.json according to the existent format, include the URL of the economic factor
  • Done! Create a pull request

Providers

Apollo is desgined to support multiple data providers, for now all the data is kindly offered by Investing.com.



Investing.com



apollo's People

Contributors

vasile-peste avatar

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.