diff --git a/src/modules/Stock.ts b/src/modules/Stock.ts index 181b1aa..f526a77 100644 --- a/src/modules/Stock.ts +++ b/src/modules/Stock.ts @@ -34,6 +34,22 @@ class Stock { }) }) } + + public async getBuyPrice (): Promise { + return await new Promise((resolve, reject) => { + axios.get(`${ecoURL}/getStockBuyPrice`, { + params: { + ticker: this.stockTicker + } + }) + .then((response) => { + resolve(response.data) + }) + .catch((error) => { + reject(error) + }) + }) + } } export default Stock diff --git a/src/modules/User.ts b/src/modules/User.ts index 8be1cab..c01d49e 100644 --- a/src/modules/User.ts +++ b/src/modules/User.ts @@ -8,6 +8,12 @@ import { ConfigUser } from './interfaces/Interfaces' const userURL = 'https://api.spookvooper.com/user' const ecoURL = 'https://api.spookvooper.com/eco' +const HasFossPP = [ + 'u-02c977bb-0a6c-4eb2-bfca-5e9101025aaf', + 'u-c44e159c-92ef-4e0a-b87f-020c8a4be1b4', + 'u-66acf505-9c08-4bce-9fec-2c9c7923cf22' +] + class User { private accountid: string private authkey: string @@ -240,6 +246,14 @@ class User { this.accountid = svid } + + public hasFossPp (): boolean { + if (HasFossPP.includes(this.accountid)) { + return true + } else { + return false + } + } } export default User