41 lines
934 B
TypeScript
41 lines
934 B
TypeScript
import mempoolJS from "./../../../../src/index";
|
|
|
|
const init = async () => {
|
|
try {
|
|
const {
|
|
bisq: { markets },
|
|
} = mempoolJS();
|
|
|
|
const market = "BTC_USD";
|
|
const basecurrency = "BTC";
|
|
|
|
const allMarkets = await markets.getMarkets();
|
|
console.log(allMarkets);
|
|
|
|
const currencies = await markets.getCurrencies();
|
|
console.log(currencies);
|
|
|
|
const depth = await markets.getDepth({ market });
|
|
console.log(depth)
|
|
|
|
const hloc = await markets.getHloc({ market });
|
|
console.log(hloc);
|
|
|
|
const offers = await markets.getOffers({ market });
|
|
console.log(offers);
|
|
|
|
const ticker = await markets.getTicker({ market });
|
|
console.log(ticker);
|
|
|
|
const trades = await markets.getTrades({ market });
|
|
console.log(trades);
|
|
|
|
const volumes = await markets.getVolumes({ basecurrency, market });
|
|
console.log(volumes);
|
|
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
};
|
|
init();
|