/**
 * A global object representing the in-game market. You can use this object to track resource transactions to/from your
 * terminals, and your buy/sell orders. The object is accessible via the singleton Game.market property.
 */ interface Market { /**
     * Your current credits balance.
     */ credits : number ; /**
     * An array of the last 100 incoming transactions to your terminals
     */ incomingTransactions : Transaction [ ] ; /**
     * An object with your active and inactive buy/sell orders on the market.
     */ orders : { [ key ] : Order ; } ; /**
     * An array of the last 100 outgoing transactions from your terminals
     */ outgoingTransactions : Transaction [ ] ; param amount param roomName1 param roomName2 returns calcTransactionCost ( amount , roomName1 , roomName2 ) : number ; param orderId returns cancelOrder ( orderId ) : number ; param orderId param newPrice returns changeOrderPrice ( orderId , newPrice ) : number ; /**
     * Create a market order in your terminal. You will be charged price*amount*0.05 credits when the order is placed.
     * The maximum orders count is 20 per player. You can create an order at any time with any amount,
     * it will be automatically activated and deactivated depending on the resource/credits availability.
     */ createOrder ( type , resourceType , price , totalAmount , roomName ? ) : number ; /**
     * Execute a trade deal from your Terminal to another player's Terminal using the specified buy/sell order.
     * Your Terminal will be charged energy units of transfer cost regardless of the order resource type.
     * You can use Game.market.calcTransactionCost method to estimate it.
     * When multiple players try to execute the same deal, the one with the shortest distance takes precedence.
     */ deal ( orderId , amount , targetRoomName ? ) : number ; param orderId param addAmount returns extendOrder ( orderId , addAmount ) : number ; param filter returns getAllOrders ( filter ? ) : Order [ ] ; param orderId returns getOrderById ( id ) : Order | null ; } interface Transaction { transactionId : string ; time : number ; sender ? : { username : string ; } ; recipient ? : { username : string ; } ; resourceType : string ; amount : number ; from : string ; to : string ; description : string ; } interface Order { id : string ; created : number ; active ? : boolean ; type : string ; resourceType : string ; roomName ? : string ; amount : number ; remainingAmount : number ; totalAmount ? : number ; price : number ; } interface OrderFilter { id ? : string ; created ? : number ; type ? : string ; resourceType ? : string ; roomName ? : string ; amount ? : number ; remainingAmount ? : number ; price ? : number ; }