From 01e7ce2a05f14db6c6b4aff24f01ae4c582288cf Mon Sep 17 00:00:00 2001 From: Duck McSouls Date: Sun, 2 Oct 2022 11:39:54 +1100 Subject: [PATCH] DOC: `stock.getPrice()`: a simple example Fixes #4184. The hard-coded stock symbol `"FISG"` should be `"FSIG"`. --- src/ScriptEditor/NetscriptDefinitions.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 4a502871a..504b19780 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -1104,6 +1104,10 @@ export interface TIX { * @example * ```ts * // NS1 + * stock.getPrice("FSIG"); + * + * // Choose the first stock symbol from the array of stock symbols. Get the price + * // of the corresponding stock. * var sym = stock.getSymbols()[0]; * tprint("Stock symbol: " + sym); * tprint("Stock price: " + stock.getPrice(sym)); @@ -1111,6 +1115,10 @@ export interface TIX { * @example * ```ts * // NS2 + * ns.stock.getPrice("FSIG"); + * + * // Choose the first stock symbol from the array of stock symbols. Get the price + * // of the corresponding stock. * const sym = ns.stock.getSymbols()[0]; * ns.tprint("Stock symbol: " + sym); * ns.tprint("Stock price: " + ns.stock.getPrice(sym));