mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
DOC: stock.getPrice()
: typo fix in examples
Fixes #4184. The hard-coded stock symbol `"FISG"` should be `"FSIG"`. The updated examples do not use a hard-coded stock symbol. The documentation is updated to explain under which circumstances a player can run the function `stock.getPrice()`.
This commit is contained in:
parent
5e14d07d9a
commit
4cf270138d
15
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
15
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -1094,17 +1094,26 @@ export interface TIX {
|
||||
* @remarks
|
||||
* RAM cost: 2 GB
|
||||
*
|
||||
* The stock’s price is the average of its bid and ask prices.
|
||||
* The stock’s price is the average of its bid and ask prices. This function requires
|
||||
* that you have the following:
|
||||
*
|
||||
* 1. WSE Account
|
||||
*
|
||||
* 1. TIX API Access
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS1
|
||||
* stock.getPrice("FISG");
|
||||
* var sym = stock.getSymbols()[0];
|
||||
* tprint("Stock symbol: " + sym);
|
||||
* tprint("Stock price: " + stock.getPrice(sym));
|
||||
* ```
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS2
|
||||
* ns.stock.getPrice("FISG");
|
||||
* const sym = ns.stock.getSymbols()[0];
|
||||
* ns.tprint("Stock symbol: " + sym);
|
||||
* ns.tprint("Stock price: " + ns.stock.getPrice(sym));
|
||||
* ```
|
||||
* @param sym - Stock symbol.
|
||||
* @returns The price of a stock.
|
||||
|
Loading…
Reference in New Issue
Block a user