@stock-bot/modules
Advanced tools
Comparing version 0.0.11 to 0.0.12
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = require("axios"); | ||
const axios_1 = __importDefault(require("axios")); | ||
const axios = axios_1.default.create({ | ||
@@ -5,0 +8,0 @@ baseURL: "https://cloud.iexapis.com/stable", |
import { Service } from "../Types/service"; | ||
declare class IEXService implements Service { | ||
constructor(); | ||
getAllSymbols(): Promise<any>; | ||
getSymbolQuote(symbol: string, filters: any): Promise<any>; | ||
@@ -5,0 +6,0 @@ } |
@@ -10,10 +10,19 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_instance_1 = require("./axios.instance"); | ||
const axios_instance_1 = __importDefault(require("./axios.instance")); | ||
class IEXService { | ||
constructor() { } | ||
getAllSymbols() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let res = yield axios_instance_1.default.get("/ref-data/symbols?filter=symbol&token=sk_a3bb6a75aa7c43c894e2c7a2e92d5387"); | ||
return res.data; | ||
}); | ||
} | ||
getSymbolQuote(symbol, filters) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let query = filterToQuery(filters); | ||
let url = `/stock/${symbol}/quote?token=sk_a3bb6a75aa7c43c894e2c7a2e92d5387`; | ||
let url = `/stock/${symbol}/price?token=sk_a3bb6a75aa7c43c894e2c7a2e92d5387`; | ||
let res = yield axios_instance_1.default.get(url); | ||
@@ -20,0 +29,0 @@ return res.data; |
export interface Service { | ||
getAllSymbols: Function; | ||
getSymbolQuote: Function; | ||
} |
{ | ||
"name": "@stock-bot/modules", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "> TODO: description", | ||
@@ -27,3 +27,3 @@ "author": "Steffan <skbrown333@gmail.com>", | ||
}, | ||
"gitHead": "aed9ce703e200b6b7e0cc82d2d716dbd4ba73fa4", | ||
"gitHead": "6b5fadb21d5f1a5c549b06020855b515eefdd977", | ||
"dependencies": { | ||
@@ -30,0 +30,0 @@ "@types/axios": "^0.14.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5241
70