mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
80 lines
1.2 KiB
Markdown
80 lines
1.2 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [Stock](./bitburner.stock.md) > [getOrganization](./bitburner.stock.getorganization.md)
|
|
|
|
## Stock.getOrganization() method
|
|
|
|
Returns the organization associated with a stock symbol.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
getOrganization(sym: string): string;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
<table><thead><tr><th>
|
|
|
|
Parameter
|
|
|
|
|
|
</th><th>
|
|
|
|
Type
|
|
|
|
|
|
</th><th>
|
|
|
|
Description
|
|
|
|
|
|
</th></tr></thead>
|
|
<tbody><tr><td>
|
|
|
|
sym
|
|
|
|
|
|
</td><td>
|
|
|
|
string
|
|
|
|
|
|
</td><td>
|
|
|
|
Stock symbol.
|
|
|
|
|
|
</td></tr>
|
|
</tbody></table>
|
|
|
|
**Returns:**
|
|
|
|
string
|
|
|
|
The organization associated with the stock symbol.
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 2 GB
|
|
|
|
The organization associated with the corresponding stock symbol. This function requires that you have the following:
|
|
|
|
- WSE Account
|
|
|
|
- TIX API Access
|
|
|
|
## Example
|
|
|
|
|
|
```js
|
|
ns.stock.getOrganization("FSIG");
|
|
|
|
// Choose the first stock symbol from the array of stock symbols. Get the
|
|
// organization associated with the corresponding stock symbol.
|
|
const sym = ns.stock.getSymbols()[0];
|
|
ns.tprint("Stock symbol: " + sym);
|
|
ns.tprint("Stock organization: " + ns.stock.getOrganization(sym));
|
|
```
|
|
|