mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 08:42:53 +02:00
STOCK: ns.stock.getOrganization added for getting org from stock symbol (#234)
Authored-by: SamuraiNinjaGuy <branmiller+bitburner@gmail.com>
This commit is contained in:
@@ -60,6 +60,13 @@ export function NetscriptStockMarket(): InternalAPI<TIX> {
|
||||
|
||||
return stock.price;
|
||||
},
|
||||
getOrganization: (ctx) => (_symbol) => {
|
||||
const symbol = helpers.string(ctx, "symbol", _symbol);
|
||||
checkTixApiAccess(ctx);
|
||||
const stock = getStockFromSymbol(ctx, symbol);
|
||||
|
||||
return stock.name;
|
||||
},
|
||||
getAskPrice: (ctx) => (_symbol) => {
|
||||
const symbol = helpers.string(ctx, "symbol", _symbol);
|
||||
checkTixApiAccess(ctx);
|
||||
|
||||
Reference in New Issue
Block a user