UNPKG

gdax-sim

Version:

Simulator used to help unit test and back test various Coinbase-Pro (gdax) interactions.

24 lines (22 loc) 556 B
class UserAccountSim { constructor() { this.fiatBalance = 0; this.cryptoBalance = 0; this.holds = { crypto: 0, fiat: 0 } this.limitOrders = { openSells: [], openBuys: [] } this.marketOrders = { openSells: [], openBuys: [] } this.orders = []; this.marketOrders.openBuys = this.orders; this.marketOrders.openSells = this.orders; } } module.exports = UserAccountSim;