@hydro-protocol/hydro-client-js
Version:
Javascript SDK for the Hydro API
37 lines (36 loc) • 1.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var bignumber_js_1 = require("bignumber.js");
/**
* A representation of a market on the exchange, including the various
* limitations of the market.
*/
var Market = /** @class */ (function () {
function Market(json) {
this.id = json.id;
this.quoteToken = json.quoteToken;
this.quoteTokenDecimals = json.quoteTokenDecimals;
this.quoteTokenAddress = json.quoteTokenAddress;
this.baseToken = json.baseToken;
this.baseTokenDecimals = json.baseTokenDecimals;
this.baseTokenAddress = json.baseTokenAddress;
this.minOrderSize = json.minOrderSize
? new bignumber_js_1.BigNumber(json.minOrderSize)
: new bignumber_js_1.BigNumber("0");
this.pricePrecision = json.pricePrecision;
this.priceDecimals = json.priceDecimals;
this.amountDecimals = json.amountDecimals;
this.asMakerFeeRate = json.asMakerFeeRate
? new bignumber_js_1.BigNumber(json.asMakerFeeRate)
: new bignumber_js_1.BigNumber("0");
this.asTakerFeeRate = json.asTakerFeeRate
? new bignumber_js_1.BigNumber(json.asTakerFeeRate)
: new bignumber_js_1.BigNumber("0");
this.gasFeeAmount = json.gasFeeAmount
? new bignumber_js_1.BigNumber(json.gasFeeAmount)
: new bignumber_js_1.BigNumber("0");
this.supportedOrderTypes = json.supportedOrderTypes;
}
return Market;
}());
exports.Market = Market;