mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 03:05:14 +00:00
14 lines
330 B
JavaScript
Executable File
14 lines
330 B
JavaScript
Executable File
const { StockService } = require("m3o/stock");
|
|
|
|
// Get the historic open-close for a given day
|
|
async function getHistoricData() {
|
|
let stockService = new StockService(process.env.MICRO_API_TOKEN);
|
|
let rsp = await stockService.history({
|
|
date: "2020-10-01",
|
|
stock: "AAPL",
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
getHistoricData();
|