mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
Return the price paid/recieved on short/sellShort
This commit is contained in:
parent
626c1b49eb
commit
6b8a91a23b
@ -151,7 +151,7 @@ export function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript
|
||||
const stock = getStockFromSymbol(symbol, "short");
|
||||
const res = shortStock(stock, shares, workerScript, {});
|
||||
|
||||
return res ? stock.price : 0;
|
||||
return res ? stock.getBidPrice() : 0;
|
||||
},
|
||||
sellShort: function (symbol: any, shares: any): any {
|
||||
helper.updateDynamicRam("sellShort", getRamCost("stock", "sellShort"));
|
||||
@ -167,7 +167,7 @@ export function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript
|
||||
const stock = getStockFromSymbol(symbol, "sellShort");
|
||||
const res = sellShort(stock, shares, workerScript, {});
|
||||
|
||||
return res ? stock.price : 0;
|
||||
return res ? stock.getAskPrice() : 0;
|
||||
},
|
||||
placeOrder: function (symbol: any, shares: any, price: any, type: any, pos: any): any {
|
||||
helper.updateDynamicRam("placeOrder", getRamCost("stock", "placeOrder"));
|
||||
|
Loading…
Reference in New Issue
Block a user