Apollo - a JavaScript library to get real-time economic declarations such as inflation rates

Overview

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. Interest Rate US/InterestRate Percentage Investing.com
U.S. Unemployment Rate US/UnemploymentRate/MoM Percentage Investing.com
U.S. CPI (YoY) US/CPI/YoY Percentage Investing.com
U.S. Core CPI (MoM) US/CoreCPI/MoM Percentage Investing.com
U.S. Core CPI (YoY) US/CoreCPI/YoY Percentage Investing.com
U.S. Crude Oil Inventories (WoW) US/CrudeOilInventories/WoW Pure number Investing.com
Eurozone CPI (YoY) Eurozone/CPI/YoY Percentage Investing.com
Eurozone Interest Rate Eurozone/InterestRate Percentage Investing.com
Italy CPI (YoY) Italy/CPI/YoY Percentage Investing.com
Germany CPI (YoY) Germany/CPI/YoY Percentage Investing.com
Japan CPI (YoY) Japan/CPI/YoY Percentage Investing.com
Canada Interest Rate Canada/InterestRate Percentage Investing.com

Economic factors ids are case sensitive.

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



You might also like...

Create a maintainable and scalable Node.js GraphQL API with TypeScript, Express, Mongoose and Apollo Server.

Set up and build a Node.js GraphQL API using Typescript, Express, Mongoose with a maintainable and scalable structure

Nov 4, 2022

A Serverless GraphQL Sample project using Apollo and Serverless Framework with TypeScript and Webpack.

Serverless GraphQL Boilerplate This is a base project with a structure that includes Serverless Framework, Apollo, TypeScript and Webpack. It can be d

Aug 23, 2022

🛡️ Dead-simple, yet highly customizable security middleware for Apollo GraphQL servers and Envelop 🛡️

🛡️ Dead-simple, yet highly customizable security middleware for Apollo GraphQL servers and Envelop 🛡️

GraphQL Armor 🛡️ GraphQL Armor is a dead-simple yet highly customizable security middleware for various GraphQL server engines. Contents Contents Sup

Jan 9, 2023

A pure JavaScript Web Page to retrieve real-time OTP through a web page and generate/scan QR codes.

A pure JavaScript Web Page to retrieve real-time OTP through a web page and generate/scan QR codes.

2FA-Solver A pure JavaScript Web Page to retrieve real-time OTP through a web page and generate/scan QR codes. It can be used as an offline web page b

Dec 7, 2022

Distributed real-time chat demo on Blueboat in 15 lines of JavaScript

minichat Distributed real-time chat demo on Blueboat in 15 lines of JavaScript, Live Demo The code Router.get("/", () = new Response(` scriptconst

Aug 3, 2022

🚀AI拟声: 5秒内克隆您的声音并生成任意语音内容 Clone a voice in 5 seconds to generate arbitrary speech in real-time

🚀AI拟声: 5秒内克隆您的声音并生成任意语音内容 Clone a voice in 5 seconds to generate arbitrary speech in real-time

English | 中文 Features 🌍 Chinese supported mandarin and tested with multiple datasets: aidatatang_200zh, magicdata, aishell3, and etc. 🤩 PyTorch work

Dec 29, 2022

Use real-time computing technology and web technology to build a big data Kanban l to solve the problem. Among them, practical technologies include MySQL, Kafka, Flink, Redis, Flask and Echarts

Use real-time computing technology and web technology to build a big data Kanban l to solve the problem. Among them, practical technologies include MySQL, Kafka, Flink, Redis, Flask and Echarts

实时计算(English Version) 运用实时计算技术、Web 技术构建一个大数据看板来解决问题。其中实用技术包括Mysql、Kafka、Flink、Redis、Flask和Echarts 目录 1.问题需求 2.方案分析 3.安装环境 4.环境启动命令和运行代码的方法 5.代码目录结构说明

Jan 8, 2022

A card for Home Assistant Lovelace for exploring the history of your entities interactively and in real time.

A card for Home Assistant Lovelace for exploring the history of your entities interactively and in real time.

History explorer card This is a custom history card for Home Assistant. This card offers a highly interactive and configurable way to view the history

Dec 31, 2022

Prototype of real-time comments and a proposal of how to make it "production-ready".

Prototype of real-time comments and a proposal of how to make it

Real-time comments prototype Simple demonstration of real-time commenting. Installation After forking it, run npm install, then you need two environme

Jan 16, 2022
Comments
  • Define new factors

    Define new factors

    Features

    • BREAKING Rename Canada/InterestRate/MoM to Canada/InterestRate #1
    • Add US/InterestRate #1
    • Add US/UnemploymentRate/MoM #1
    • Add US/CPI/YoY #1
    • Add US/CoreCPI/MoM #1
    • Add US/CoreCPI/YoY #1
    • Add Eurozone/InterestRate #1
    • Add Germany/CPI/YoY #1
    opened by Vasile-Peste 0
Releases(v2.0.0)
Owner
Reiryoku Technologies
Reiryoku Technologies
⛲ Sort import declarations into a pleasing and readable cascade.

⛲ eslint-plugin-cascading-imports This plugin allows to automatically enforce a visual "cascading" order for import declarations. Imports in each bloc

Florent 1 Jan 20, 2022
Next.js and Apollo-Client web application, designed for learning and real-world applicability.

NextJs Apollo Boilerplate Boilerplate for building applications using Next.js and Apollo This boilerplate is made for those who want to start a new pr

Youngjin Lim 9 Sep 4, 2022
Enhanced interval features for Node.js, such as promisified interval and human readable time parsing.

Interval-next Interval-next is a package that extends Javascript's built-in setInterval() capabilities. You have a plain and promisified interval meth

Snowy 5 Jul 28, 2022
A fast and powerful http toolkit that take a list of domains to find active domains and other information such as status-code, title, response-time , server, content-type and many other

HTTPFY curently in beta so you may see problems. Please open a Issue on GitHub and report them! A Incredible fast and Powerful HTTP toolkit Report Bug

DevXprite 44 Dec 22, 2022
A "Basic-to-Lisp" compiler. But Basic is not real Basic, and Lisp is not real Lisp.

Basic2Lisp A "Basic-to-Lisp" compiler. But Basic is not real Basic, and Lisp is not real Lisp. Syntax Print-Sth Put some-value to standard output. PRI

Hana Yabuki 5 Jul 10, 2022
An API library of useful mocked endpoints to help you get your designs feeling lifelike with real data.

About Welcome to Mocked-API, this is a live API that can be accessed by anyone who needs data to test out their website, app, components etc. Hacktobe

Aaron Rackley 48 Dec 29, 2022
A general purpose, real-time visualization library.

Epoch By Ryan Sandor Richards Epoch is a general purpose charting library for application developers and visualization designers. It focuses on two di

Epoch 5k Dec 30, 2022
Código de estudo da aula de graphl e apollo no youtube da rocketseat

GraphQL (meu aprendizado) O que é GraphQL uma ferramenta criada dentro do facebook, sendo uma linguagem de realização de query (operações de criação é

Marcos Henrique 1 May 12, 2022
GraphQL-first boilerplate that scales with TypeScript + Node Express + Apollo GraphQL APIs.

graphql-typescript-boilerplate A boilerplate project for quickly building Graphql APIs and with typescript ?? Installation Install the dependencies: y

Youssef Hajjari 6 May 15, 2022
Toolkit for building scalable web applications with TypeScript, React, Redux and Apollo-Client

TsToolbox Toolkit for building scalable web applications with TypeScript, React, Redux and Apollo-Client (inspired by ReKit) ⚠ ⚠ ⚠ Work in Progress ⚠

Daniel Nikravesh 7 Apr 14, 2022