Members

(constant) BANK_IND

b a n k_ i n d

(constant) BITCOIN_ID

b i t c o i n_ i d

(constant) CMOD_ID

c m o d_ i d

(constant) COMPUTER1_ID

c o m p u t e r1_ i d

(constant) COMPUTER2_ID

c o m p u t e r2_ i d

(constant) COMPUTER3_ID

c o m p u t e r3_ i d

(constant) COMPUTER4_ID

c o m p u t e r4_ i d

(constant) CORN_ID

c o r n_ i d

(constant) ETF_IND

e t f_ i n d

(constant) ETHEREUM_ID

e t h e r e u m_ i d

(constant) GNP_RATE_ID

g n p_ r a t e_ i d

(constant) GOLD_ID

g o l d_ i d

(constant) HUMAN1_ID

Entity IDs

(constant) INSURANCE_IND

i n s u r a n c e_ i n d

(constant) OIL_ID

o i l_ i d

(constant) PLAYER_IND

Industry IDs

(constant) PRIME_RATE_ID

p r i m e_ r a t e_ i d

(constant) SBOND_RATE_ID

s b o n d_ r a t e_ i d

(constant) SECURITIES_BROKER_IND

s e c u r i t i e s_ b r o k e r_ i n d

(constant) SILVER_ID

s i l v e r_ i d

(constant) STOCK_INDEX_ID

s t o c k_ i n d e x_ i d

(constant) TBOND_RATE_ID

t b o n d_ r a t e_ i d

(constant) UI_ADVISORY_REPORT

UI IDs

(constant) UI_BANK_LOANS_LIST

u i_ b a n k_ l o a n s_ l i s t

(constant) UI_COMPANIES_HEATMAP

u i_ c o m p a n i e s_ h e a t m a p

(constant) UI_CORP_CASH_FLOW_PROJECTION

u i_ c o r p_ c a s h_ f l o w_ p r o j e c t i o n

(constant) UI_CORP_COMMODITY_CONTRACTS_LIST

u i_ c o r p_ c o m m o d i t y_ c o n t r a c t s_ l i s t

(constant) UI_CORP_EARNINGS_REPORT

u i_ c o r p_ e a r n i n g s_ r e p o r t

(constant) UI_CORP_FINANCIAL_PROFILE

u i_ c o r p_ f i n a n c i a l_ p r o f i l e

(constant) UI_CORP_HOLDINGS

u i_ c o r p_ h o l d i n g s

(constant) UI_CORP_OPTIONS_PORTFOLIO

u i_ c o r p_ o p t i o n s_ p o r t f o l i o

(constant) UI_CORP_OVERVIEW

u i_ c o r p_ o v e r v i e w

(constant) UI_CORP_RESEARCH_REPORT

u i_ c o r p_ r e s e a r c h_ r e p o r t

(constant) UI_CORP_SHAREHOLDERS_LIST

u i_ c o r p_ s h a r e h o l d e r s_ l i s t

(constant) UI_CORP_STOCKS_BONDS_PORTFOLIO

u i_ c o r p_ s t o c k s_ b o n d s_ p o r t f o l i o

(constant) UI_CORP_SWAPS_PORTFOLIO

u i_ c o r p_ s w a p s_ p o r t f o l i o
u i_ d b_ s e a r c h

(constant) UI_INDUSTRIES_HEATMAP

u i_ i n d u s t r i e s_ h e a t m a p

(constant) UI_INDUSTRY_HEATMAP

u i_ i n d u s t r y_ h e a t m a p

(constant) UI_INDUSTRY_PROJECTIONS_REPORT

u i_ i n d u s t r y_ p r o j e c t i o n s_ r e p o r t

(constant) UI_INDUSTRY_SUMMARY_REPORT

u i_ i n d u s t r y_ s u m m a r y_ r e p o r t

(constant) UI_MARKET_HEATMAP

u i_ m a r k e t_ h e a t m a p

(constant) UI_MARKET_REPORTS_COMMOD_FUTURES_REPORT

u i_ m a r k e t_ r e p o r t s_ c o m m o d_ f u t u r e s_ r e p o r t

(constant) UI_MARKET_REPORTS_COMMOD_PHYSICAL_REPORT

u i_ m a r k e t_ r e p o r t s_ c o m m o d_ p h y s i c a l_ r e p o r t

(constant) UI_MARKET_REPORTS_ECON_STATS_REPORT

u i_ m a r k e t_ r e p o r t s_ e c o n_ s t a t s_ r e p o r t

(constant) UI_MARKET_REPORTS_INDUSTRY_GROWTH_RATES_REPORT

u i_ m a r k e t_ r e p o r t s_ i n d u s t r y_ g r o w t h_ r a t e s_ r e p o r t

(constant) UI_MARKET_REPORTS_INTEREST_RATES_REPORT

u i_ m a r k e t_ r e p o r t s_ i n t e r e s t_ r a t e s_ r e p o r t

(constant) UI_MARKET_REPORTS_INTEREST_RATE_SWAPS_REPORT

u i_ m a r k e t_ r e p o r t s_ i n t e r e s t_ r a t e_ s w a p s_ r e p o r t

(constant) UI_MARKET_REPORTS_INVESTMENT_CONTRACTS_REPORT

u i_ m a r k e t_ r e p o r t s_ i n v e s t m e n t_ c o n t r a c t s_ r e p o r t

(constant) UI_MARKET_REPORTS_LARGEST_MARKET_SHARE_REPORT

u i_ m a r k e t_ r e p o r t s_ l a r g e s t_ m a r k e t_ s h a r e_ r e p o r t

(constant) UI_MARKET_REPORTS_LARGEST_TAX_LOSSES_REPORT

u i_ m a r k e t_ r e p o r t s_ l a r g e s t_ t a x_ l o s s e s_ r e p o r t

(constant) UI_MARKET_REPORTS_MOST_CASH_REPORT

u i_ m a r k e t_ r e p o r t s_ m o s t_ c a s h_ r e p o r t

(constant) UI_MARKET_REPORTS_MOST_MARKET_CAP_REPORT

u i_ m a r k e t_ r e p o r t s_ m o s t_ m a r k e t_ c a p_ r e p o r t

(constant) UI_MARKET_REPORTS_OPTIONS_REPORT

u i_ m a r k e t_ r e p o r t s_ o p t i o n s_ r e p o r t

(constant) UI_MARKET_REPORTS_STOCKS_REPORT

u i_ m a r k e t_ r e p o r t s_ s t o c k s_ r e p o r t

(constant) UI_MARKET_REPORTS_WHO_AHEAD_REPORT

u i_ m a r k e t_ r e p o r t s_ w h o_ a h e a d_ r e p o r t

(constant) UI_PLAYER_ADVANCES_LIST

u i_ p l a y e r_ a d v a n c e s_ l i s t

(constant) UI_PLAYER_CASH_FLOW_PROJECTION

u i_ p l a y e r_ c a s h_ f l o w_ p r o j e c t i o n

(constant) UI_PLAYER_COMMODITY_CONTRACTS_LIST

u i_ p l a y e r_ c o m m o d i t y_ c o n t r a c t s_ l i s t

(constant) UI_PLAYER_CORPORATIONS_LIST

u i_ p l a y e r_ c o r p o r a t i o n s_ l i s t

(constant) UI_PLAYER_FINANCIAL_PROFILE

u i_ p l a y e r_ f i n a n c i a l_ p r o f i l e

(constant) UI_PLAYER_HOLDINGS

u i_ p l a y e r_ h o l d i n g s

(constant) UI_PLAYER_OPTIONS_PORTFOLIO

u i_ p l a y e r_ o p t i o n s_ p o r t f o l i o

(constant) UI_PLAYER_STOCKS_BONDS_PORTFOLIO

u i_ p l a y e r_ s t o c k s_ b o n d s_ p o r t f o l i o

(constant) UI_PLAYER_SWAPS_PORTFOLIO

u i_ p l a y e r_ s w a p s_ p o r t f o l i o

(constant) WHEAT_ID

w h e a t_ i d

(constant) WSRContext

w s r context

(constant) bridgeReady :Promise.<void>

Promise that resolves when the backend bridge ports are discovered. All API calls internally await this before making network requests.
Type:
  • Promise.<void>

(constant) commandMap

Command map

(constant) gameStore

Game store

(constant) getApiBase

Returns the currently configured REST API base URL. Returns `null` until the bridge handshake completes.

(constant) getWsUrl

Returns the currently configured WebSocket URL. Returns `null` until the bridge handshake completes.

(constant) useWSRContext

Use w s r context

Methods

WSRProvider({)

w s r provider
Parameters:
NameTypeDescription
{anychildren }

advanceFunds(actingAsIdopt) → {Promise.<any>}

Advance funds
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

advanceTicker() → {Promise.<any>}

Advance ticker
Returns:
Type: 
Promise.<any>

advancedOptionsTrading(actingAsIdopt) → {Promise.<any>}

Advanced options trading
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

antitrustLawsuit(id, actingAsIdopt) → {Promise.<any>}

Antitrust lawsuit
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

autoAddSelect() → {Promise.<any>}

Auto add select
Returns:
Type: 
Promise.<any>

autosaveSelect() → {Promise.<any>}

Autosave select
Returns:
Type: 
Promise.<any>

becomeEtfAdvisor(actingAsIdopt) → {Promise.<any>}

Become etf advisor
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

borrowMoney(actingAsIdopt) → {Promise.<any>}

Borrow money
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buildDictRegex(allCompanies, allIndustries)

Build dict regex
Parameters:
NameTypeDescription
allCompaniesany
allIndustriesstring

buyBankLoans() → {Promise.<any>}

Buy bank loans
Returns:
Type: 
Promise.<any>

buyBusinessLoans(actingAsIdopt) → {Promise.<any>}

Buy business loans
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyCalls(id, actingAsIdopt, underlyingIdopt) → {Promise.<any>}

Buy calls
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
underlyingIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyCommodityFutures(id, actingAsIdopt) → {Promise.<any>}

Buy commodity futures
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyConsumerLoans(actingAsIdopt) → {Promise.<any>}

Buy consumer loans
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyCorporateAssets(actingAsIdopt) → {Promise.<any>}

Buy corporate assets
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyCorporateBond(id, actingAsIdopt) → {Promise.<any>}

Buy corporate bond
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyCryptoFutures(id, actingAsIdopt) → {Promise.<any>}

Buy crypto futures
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyLongGovtBonds(actingAsIdopt) → {Promise.<any>}

Buy long govt bonds
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyPhysicalCommodity(id, actingAsIdopt) → {Promise.<any>}

Buy physical commodity
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyPhysicalCrypto(id, actingAsIdopt) → {Promise.<any>}

Buy physical crypto
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyPrimeMortgages(actingAsIdopt) → {Promise.<any>}

Buy prime mortgages
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyPuts(id, actingAsIdopt, underlyingIdopt) → {Promise.<any>}

Buy puts
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
underlyingIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyShortGovtBonds(actingAsIdopt) → {Promise.<any>}

Buy short govt bonds
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buyStock(id, actingAsIdopt) → {Promise.<any>}

Buy stock
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

buySubprimeMortgages(actingAsIdopt) → {Promise.<any>}

Buy subprime mortgages
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

callInAdvance(id) → {Promise.<any>}

Call in advance
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

callInLoan(id) → {Promise.<any>}

Call in loan
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

capitalContribution(actingAsIdopt) → {Promise.<any>}

Capital contribution
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

changeActingAs(id) → {Promise.<any>}

Change acting as
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

changeBank(actingAsIdopt) → {Promise.<any>}

Change bank
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

changeLawFirm(actingAsIdopt) → {Promise.<any>}

Change law firm
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

changeManagers(actingAsIdopt) → {Promise.<any>}

Change managers
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

cheatAddCash() → {Promise.<any>}

Cheat add cash
Returns:
Type: 
Promise.<any>

cheatDisableLawsuits() → {Promise.<any>}

Cheat Menu
Returns:
Type: 
Promise.<any>

cheatEarningsInfo() → {Promise.<any>}

Cheat earnings info
Returns:
Type: 
Promise.<any>

cheatMergerInfo() → {Promise.<any>}

Cheat merger info
Returns:
Type: 
Promise.<any>

checkScoreboard() → {Promise.<any>}

Check scoreboard
Returns:
Type: 
Promise.<any>

clearChart() → {Promise.<any>}

Clear chart
Returns:
Type: 
Promise.<any>

clearEventString() → {Promise.<any>}

Clear event string
Returns:
Type: 
Promise.<any>

clearStreamList() → {Promise.<any>}

Clear stream list
Returns:
Type: 
Promise.<any>

closeLongCommodityFuturesBySlot(slot, actingAsIdopt) → {Promise.<any>}

Close long commodity futures by slot
Parameters:
NameTypeAttributesDefaultDescription
slotany
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

closeModal(result) → {Promise.<any>}

Close modal
Parameters:
NameTypeDescription
resultany
Returns:
Type: 
Promise.<any>

coverShortCommodityFutures(id, actingAsIdopt) → {Promise.<any>}

Cover short commodity futures
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

coverShortCommodityFuturesBySlot(slot, actingAsIdopt) → {Promise.<any>}

Cover short commodity futures by slot
Parameters:
NameTypeAttributesDefaultDescription
slotany
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

coverShortStock(id, actingAsIdopt) → {Promise.<any>}

Cover short stock
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

createPriceAlert(entityId, direction, targetPrice) → {Promise.<any>}

Create price alert
Parameters:
NameTypeDescription
entityIdnumber
directionany
targetPriceany
Returns:
Type: 
Promise.<any>

creditInfo(actingAsIdopt) → {Promise.<any>}

Credit info
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

currencySelect() → {Promise.<any>}

Currency select
Returns:
Type: 
Promise.<any>

cycleActingAs(direction)

Cycle acting-as to next/previous controlled company
Parameters:
NameTypeDescription
directionany

dbResearchTool() → {Promise.<any>}

Db research tool
Returns:
Type: 
Promise.<any>

debounce(fn, delay)

Debounce
Parameters:
NameTypeDescription
fnany
delayany

decreaseEarnings(actingAsIdopt) → {Promise.<any>}

Decrease earnings
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

deletePriceAlert(slot) → {Promise.<any>}

Delete price alert
Parameters:
NameTypeDescription
slotany
Returns:
Type: 
Promise.<any>

deleteSave(filename) → {Promise.<any>}

Delete a save file (via IPC to main process)
Parameters:
NameTypeDescription
filenamestring
Returns:
Type: 
Promise.<any>

diffObjects(oldObj, newObj, pathopt)

Diff objects
Parameters:
NameTypeAttributesDefaultDescription
oldObjany
newObjany
pathany<optional>
[]

disableHotkeysSelect() → {Promise.<any>}

Disable hotkeys select
Returns:
Type: 
Promise.<any>

economicStats() → {Promise.<any>}

Economic stats
Returns:
Type: 
Promise.<any>

electCeo(actingAsIdopt) → {Promise.<any>}

Elect ceo
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

exerciseCallOptionsEarly(id, actingAsIdopt) → {Promise.<any>}

Exercise call options early
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

exercisePutOptionsEarly(id, actingAsIdopt) → {Promise.<any>}

Exercise put options early
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

exerciseSelect() → {Promise.<any>}

Exercise select
Returns:
Type: 
Promise.<any>

exitGame() → {Promise.<any>}

Exit game
Returns:
Type: 
Promise.<any>

exitToDesktop() → {Promise.<any>}

Exit to desktop
Returns:
Type: 
Promise.<any>

extraordinaryDividend(actingAsIdopt) → {Promise.<any>}

Extraordinary dividend
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

fillStreamList() → {Promise.<any>}

Fill stream list
Returns:
Type: 
Promise.<any>

formatThousandsPreserveCaret(e, formatFn)

Format thousands preserve caret
Parameters:
NameTypeDescription
eany
formatFnany

freezeAllLoans(actingAsIdopt) → {Promise.<any>}

Freeze all loans
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

freezeLoan(id) → {Promise.<any>}

Freeze loan
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

getAssetChart(id) → {Promise.<any>}

Get asset chart
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

getCompanyBySymbol(allCompanies, symbol) → {object|undefined}

Returns the company object for a given ticker symbol.
Parameters:
NameTypeDescription
allCompaniesArray.<object>List of companies from gameState
symbolstringTicker symbol
Returns:
Type: 
object | undefined

getDatabaseData() → {Promise.<any>}

Fetch database search data.
Returns:
Type: 
Promise.<any>

getGameState()

Get game state

getIndustry(allIndustries, industryNum) → {object|undefined}

Returns the industry object for a given industry ID.
Parameters:
NameTypeDescription
allIndustriesArray.<object>List of industries from gameState
industryNumnumberIndustry ID
Returns:
Type: 
object | undefined

getJSON(path) → {Promise.<any>}

Dispatches a GET request and returns the parsed JSON response.
Parameters:
NameTypeDescription
pathstringREST endpoint path
Returns:
Type: 
Promise.<any>

getOwnershipTree() → {Promise.<any>}

Fetch ownership tree (who owns the active entity).
Returns:
Type: 
Promise.<any>

getQuoteOfTheDay() → {Promise.<any>}

Get quote of the day
Returns:
Type: 
Promise.<any>

getSubsidiariesTree() → {Promise.<any>}

Fetch subsidiaries tree (what the active entity owns).
Returns:
Type: 
Promise.<any>

goBack() → {Promise.<any>}

Go back
Returns:
Type: 
Promise.<any>

goForward() → {Promise.<any>}

Go forward
Returns:
Type: 
Promise.<any>

gotoPage(p) → {Promise.<any>}

Goto page
Parameters:
NameTypeDescription
pany
Returns:
Type: 
Promise.<any>

greenmail(targetIdopt, actingAsIdopt) → {Promise.<any>}

Greenmail
Parameters:
NameTypeAttributesDefaultDescription
targetIdnumber<optional>
0
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

growthThrottle() → {Promise.<any>}

Growth throttle
Returns:
Type: 
Promise.<any>

harrassingLawsuit(id, actingAsIdopt) → {Promise.<any>}

Harrassing lawsuit
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

increaseEarnings(actingAsIdopt) → {Promise.<any>}

Increase earnings
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

industryProjections() → {Promise.<any>}

Industry projections
Returns:
Type: 
Promise.<any>

industrySummary() → {Promise.<any>}

Industry summary
Returns:
Type: 
Promise.<any>

interestRateSwaps(assetIdopt, actingAsIdopt) → {Promise.<any>}

Interest rate swaps
Parameters:
NameTypeAttributesDefaultDescription
assetIdnumber<optional>
0
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

isDifferent(oldObj, newObj)

Is different
Parameters:
NameTypeDescription
oldObjany
newObjany

isPlayerCEO(chairedCompanyId, entityId) → {boolean}

Checks if the player is the CEO of a company.
Parameters:
NameTypeDescription
chairedCompanyIdnumberplayer.chairedCompanyId from gameState
entityIdnumberID to check
Returns:
Type: 
boolean

isPlayerControlled(controlledCompanies, entityId) → {boolean}

Checks if an entity is controlled by the player.
Parameters:
NameTypeDescription
controlledCompaniesArray.<object>List of companies from gameState
entityIdnumberID to check
Returns:
Type: 
boolean

isValidWindowsFilename(filename)

Validate Windows filename (no invalid characters)
Parameters:
NameTypeDescription
filenamestring

issueNewCorpBonds(actingAsIdopt) → {Promise.<any>}

Issue new corp bonds
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

largestMarketCap() → {Promise.<any>}

Largest market cap
Returns:
Type: 
Promise.<any>

largestTaxLosses() → {Promise.<any>}

Largest tax losses
Returns:
Type: 
Promise.<any>

lbo(targetIdopt, actingAsIdopt) → {Promise.<any>}

Lbo
Parameters:
NameTypeAttributesDefaultDescription
targetIdnumber<optional>
0
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

listBankLoans(actingAsIdopt) → {Promise.<any>}

List bank loans
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

listEtfs() → {Promise.<any>}

List etfs
Returns:
Type: 
Promise.<any>

listSaves() → {Promise.<any>}

List available save files (via IPC to main process)
Returns:
Type: 
Promise.<any>

loadGame() → {Promise.<any>}

Load game
Returns:
Type: 
Promise.<any>

loadSpecificSave(filename) → {Promise.<any>}

Load a specific save file by triggering the backend load event
Parameters:
NameTypeDescription
filenamestring
Returns:
Type: 
Promise.<any>

makedeliverySelect() → {Promise.<any>}

Makedelivery select
Returns:
Type: 
Promise.<any>

mergeGameState(newState)

Merge new game state from polling, preserving local tutorial changes until backend catches up
Parameters:
NameTypeDescription
newStateany

merger(targetIdopt, actingAsIdopt) → {Promise.<any>}

Merger
Parameters:
NameTypeAttributesDefaultDescription
targetIdnumber<optional>
0
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

modalResult(result) → {Promise.<any>}

Modal result
Parameters:
NameTypeDescription
resultany
Returns:
Type: 
Promise.<any>

mostCashReport() → {Promise.<any>}

Most cash report
Returns:
Type: 
Promise.<any>
Nav goto index
Parameters:
NameTypeDescription
indexany
Returns:
Type: 
Promise.<any>
Restore nav history from localStorage — called on game load. entries: [{id, type}] ordered most-recent-first.
Parameters:
NameTypeDescription
entriesany
Returns:
Type: 
Promise.<any>

newGame() → {Promise.<any>}

New game
Returns:
Type: 
Promise.<any>

openMarketHeatMap() → {Promise.<any>}

Open market heat map
Returns:
Type: 
Promise.<any>

postIdArg(path, id) → {Promise.<any>}

Dispatches a POST request with a single "id" integer argument.
Parameters:
NameTypeDescription
pathstringREST endpoint path
idnumberEntity ID or numeric parameter
Returns:
Parsed JSON response from backend
Type: 
Promise.<any>

postIdArgWithActingAs(path, id, actingAsIdopt) → {Promise.<any>}

Variant of postIdArg that optionally includes an acting-as entity override. If actingAsId > 0, the backend switches context before executing the command.
Parameters:
NameTypeAttributesDefaultDescription
pathstringREST endpoint path
idnumberEntity ID
actingAsIdnumber<optional>
0Entity to act as (0 for current view entity)
Returns:
Parsed JSON response
Type: 
Promise.<any>

postNoArg(path) → {Promise.<string>}

Dispatches a POST request with no arguments (empty JSON body). Automatically routes to REST or IPC based on current mode.
Parameters:
NameTypeDescription
pathstringREST endpoint path (e.g. "/start_ticker")
Returns:
Response text from backend
Type: 
Promise.<string>

postOptionsTradeWithActingAs(path, id, actingAsIdopt, underlyingIdopt) → {Promise.<any>}

Variant for options-trade endpoints (buy/sell calls/puts). Same shape as postIdArgWithActingAs, plus an optional `underlyingId`: when id=0 and underlyingId>0, the C++ bridge stashes it in strParam1 and PB uses it as TGT — skipping SelectCompanyModal$. Lets CLI "CALL ABC" resolve the symbol up front without colliding with IntParam1's ContractNum& semantics.
Parameters:
NameTypeAttributesDefaultDescription
pathany
idnumber
actingAsIdnumber<optional>
0
underlyingIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

postStringArg(path, str) → {Promise.<any>}

Post string arg
Parameters:
NameTypeDescription
pathany
strstring
Returns:
Type: 
Promise.<any>

prepayTaxes(actingAsIdopt) → {Promise.<any>}

Prepay taxes
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

privateStockOffering(actingAsIdopt) → {Promise.<any>}

Private stock offering
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

publicStockOffering(actingAsIdopt) → {Promise.<any>}

Public stock offering
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

rebrand(actingAsIdopt) → {Promise.<any>}

Rebrand
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

redeemCorpBonds(actingAsIdopt) → {Promise.<any>}

Redeem corp bonds
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>
Render hyperlinks
Parameters:
NameTypeDescription
headlineany
onClickany
regexany

repayLoan(actingAsIdopt) → {Promise.<any>}

Repay loan
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

resignAsCeo(actingAsIdopt) → {Promise.<any>}

Resign as ceo
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

restructure(actingAsIdopt) → {Promise.<any>}

Restructure
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

reverseSplitStock(actingAsIdopt) → {Promise.<any>}

Reverse split stock
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

runTicker() → {Promise.<any>}

Run ticker
Returns:
Type: 
Promise.<any>

saveGame() → {Promise.<any>}

Save game
Returns:
Type: 
Promise.<any>

saveGameAs(filename) → {Promise.<any>}

Save game as
Parameters:
NameTypeDescription
filenamestring
Returns:
Type: 
Promise.<any>

sellBusinessLoan(id) → {Promise.<any>}

Sell business loan
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

sellCalls(id, actingAsIdopt, underlyingIdopt) → {Promise.<any>}

Sell calls
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
underlyingIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellCommodityFutures(id, actingAsIdopt) → {Promise.<any>}

Sell commodity futures
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellConsumerLoans(actingAsIdopt) → {Promise.<any>}

Sell consumer loans
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellCorporateAssets(actingAsIdopt) → {Promise.<any>}

Sell corporate assets
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellCorporateBond(id, actingAsIdopt) → {Promise.<any>}

Sell corporate bond
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellCryptoFutures(id, actingAsIdopt) → {Promise.<any>}

Sell crypto futures
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellLongGovtBonds(actingAsIdopt) → {Promise.<any>}

Sell long govt bonds
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellPhysicalCommodity(id, actingAsIdopt) → {Promise.<any>}

Sell physical commodity
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellPhysicalCrypto(id) → {Promise.<any>}

Sell physical crypto
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

sellPrimeMortgages(actingAsIdopt) → {Promise.<any>}

Sell prime mortgages
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellPuts(id, actingAsIdopt, underlyingIdopt) → {Promise.<any>}

Sell puts
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
underlyingIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellShortGovtBonds(actingAsIdopt) → {Promise.<any>}

Sell short govt bonds
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellStock(id, actingAsIdopt) → {Promise.<any>}

Sell stock
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellSubprimeMortgages(actingAsIdopt) → {Promise.<any>}

Sell subprime mortgages
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

sellSubsidiaryStock(id, actingAsIdopt) → {Promise.<any>}

Sell subsidiary stock
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

serialize(obj)

Serialize
Parameters:
NameTypeDescription
objany

setActiveUIReport(uiId) → {Promise.<any>}

Set active u i report
Parameters:
NameTypeDescription
uiIdnumber
Returns:
Type: 
Promise.<any>

setAdvisoryFee(actingAsIdopt) → {Promise.<any>}

Set advisory fee
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

setBankAllocation(actingAsIdopt) → {Promise.<any>}

Set bank allocation
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

setChartType(typeInt) → {Promise.<any>}

Per-machine UI prefs (PB persists to CFIG.WSR via WriteConfig)
Parameters:
NameTypeDescription
typeIntany
Returns:
Type: 
Promise.<any>

setCustomData(blob) → {Promise.<any>}

Set custom data
Parameters:
NameTypeDescription
blobany
Returns:
Type: 
Promise.<any>

setDividend(actingAsIdopt) → {Promise.<any>}

Set dividend
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

setGrowthRate(actingAsIdopt) → {Promise.<any>}

Set growth rate
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

setLocale(localeCode) → {Promise.<any>}

Set locale
Parameters:
NameTypeDescription
localeCodeany
Returns:
Type: 
Promise.<any>

setProductivity(actingAsIdopt) → {Promise.<any>}

Set productivity
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

setTickSpeed(speed) → {Promise.<any>}

Set tick speed
Parameters:
NameTypeDescription
speedany
Returns:
Type: 
Promise.<any>

setTutorialEnabled(enabled) → {Promise.<any>}

Set tutorial enabled
Parameters:
NameTypeDescription
enabledany
Returns:
Type: 
Promise.<any>

setTutorialStep(step) → {Promise.<any>}

Set tutorial step
Parameters:
NameTypeDescription
stepany
Returns:
Type: 
Promise.<any>

setViewAsset(id) → {Promise.<any>}

Set view asset
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

setViewAssetWithTab(id, preferredTab) → {Promise.<any>}

Like setViewAsset but also sets a preferred tab so the destination view opens on the correct tab (e.g. "Stocks & Bonds" when drilling from Holdings). preferredTab is a string matching the tab label in IndustrialView / PlayerView. NOTE: the preferred tab is set AFTER the navigation REST call completes so that it lands in a separate render cycle and doesn't cause a simultaneous activeEntityNum + preferredTab state change, which previously caused rapid mount/unmount of heavy components (Holdings ↔ target tab) and an Oilpan OOM crash.
Parameters:
NameTypeDescription
idnumber
preferredTabany
Returns:
Type: 
Promise.<any>

setWhoOwnsFilter(value) → {Promise.<any>}

Set who owns filter
Parameters:
NameTypeDescription
valueany
Returns:
Type: 
Promise.<any>

shareholderGraphSelect() → {Promise.<any>}

Shareholder graph select
Returns:
Type: 
Promise.<any>

shortCommodityFutures(id, actingAsIdopt) → {Promise.<any>}

Short commodity futures
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

shortStock(id, actingAsIdopt) → {Promise.<any>}

Short stock
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

showPriceAlerts() → {Promise.<any>}

Show price alerts
Returns:
Type: 
Promise.<any>

spinOff(id) → {Promise.<any>}

Spin off
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

splashScreenPlayed() → {Promise.<any>}

Splash screen played
Returns:
Type: 
Promise.<any>

splitStock(actingAsIdopt) → {Promise.<any>}

Split stock
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

spreadRumors(id, actingAsIdopt) → {Promise.<any>}

Spread rumors
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

startTicker() → {Promise.<any>}

Start ticker
Returns:
Type: 
Promise.<any>

startup(actingAsIdopt) → {Promise.<any>}

Startup
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

stopTicker() → {Promise.<any>}

Stop ticker
Returns:
Type: 
Promise.<any>

suppEarnSelect() → {Promise.<any>}

Menu/Settings
Returns:
Type: 
Promise.<any>

suppWarnSelect() → {Promise.<any>}

Supp warn select
Returns:
Type: 
Promise.<any>

suppressSelect() → {Promise.<any>}

Suppress select
Returns:
Type: 
Promise.<any>

sweepSelect() → {Promise.<any>}

Sweep select
Returns:
Type: 
Promise.<any>

takedeliverySelect() → {Promise.<any>}

Takedelivery select
Returns:
Type: 
Promise.<any>

taxFreeLiquidation(actingAsIdopt) → {Promise.<any>}

Tax free liquidation
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

taxableLiquidation(actingAsIdopt) → {Promise.<any>}

Taxable liquidation
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

terminateSwap(id, actingAsIdopt) → {Promise.<any>}

Terminate swap
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

toggleCompanyAutopilot(id) → {Promise.<any>}

Toggle company autopilot
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

toggleFullscreen()

Fullscreen toggle (Electron if available, otherwise browser fullscreen API)

toggleGlobalAutopilot(actingAsIdopt) → {Promise.<any>}

Toggle global autopilot
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

toggleStreamingQuote(id) → {Promise.<any>}

Toggle streaming quote
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

tooltipsSelect() → {Promise.<any>}

Tooltips select
Returns:
Type: 
Promise.<any>

tradeTbills(actingAsIdopt) → {Promise.<any>}

Trade tbills
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

unethicalSelect() → {Promise.<any>}

Unethical select
Returns:
Type: 
Promise.<any>

useGameStore(selectoropt, isEqualopt)

Use game store
Parameters:
NameTypeAttributesDefaultDescription
selectorany<optional>
s
isEqualany<optional>
Object.is

viewCorpAssetsForSale() → {Promise.<any>}

View corp assets for sale
Returns:
Type: 
Promise.<any>

viewCurrentInterestRates() → {Promise.<any>}

View current interest rates
Returns:
Type: 
Promise.<any>

viewDbSearch() → {Promise.<any>}

View db search
Returns:
Type: 
Promise.<any>

viewForSaleItems(actingAsIdopt) → {Promise.<any>}

View for sale items
Parameters:
NameTypeAttributesDefaultDescription
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

viewIndustry(id) → {Promise.<any>}

View industry
Parameters:
NameTypeDescription
idnumber
Returns:
Type: 
Promise.<any>

viewSwapDetails(id, actingAsIdopt) → {Promise.<any>}

View swap details
Parameters:
NameTypeAttributesDefaultDescription
idnumber
actingAsIdnumber<optional>
0
Returns:
Type: 
Promise.<any>

whosAhead() → {Promise.<any>}

Whos ahead
Returns:
Type: 
Promise.<any>