mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-20 14:35:07 +00:00
Generate clients (#206)
This commit is contained in:
13
examples/stock/history/node/getHistoricData.js
Executable file
13
examples/stock/history/node/getHistoricData.js
Executable file
@@ -0,0 +1,13 @@
|
||||
import * as stock from "m3o/stock";
|
||||
|
||||
// Get the historic open-close for a given day
|
||||
async function GetHistoricData() {
|
||||
let stockService = new stock.StockService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await stockService.history({
|
||||
date: "2020-10-01",
|
||||
stock: "AAPL",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await GetHistoricData();
|
||||
Reference in New Issue
Block a user