6.0 KiB
BisqJS - Features
Interface to access the Bisq API.
Features
- Addresses
- Blocks
- Markets
- Statistics
- Transactions
Get Address
Returns statistics about all Bisq transactions.
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { addresses } = bisqJS();
const address = 'B1DgwRN92rdQ9xpEVCdXRfgeqGw9X4YtrZz';
const myAddress = await addresses.getAddress({ address });
console.log(myAddress);
Get Block
Returns all Bisq transactions that exist in a Bitcoin block.
Parameters:
- {string} hash
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { blocks } = bisqJS();
const hash = '000000000000000000079aa6bfa46eb8fc20474e8673d6e8a123b211236bf82d';
const block = await blocks.getBlock({ hash });
console.log(block);
Get Blocks
Returns :length
Bitcoin blocks that contain Bisq transactions, starting from :index
.
Parameters:
- {number} index
- {number} length
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { blocks } = bisqJS();
const hash = '000000000000000000079aa6bfa46eb8fc20474e8673d6e8a123b211236bf82d';
const myBlocks = await blocks.getBlocks({ index: 0, length: 1 });
console.log(myBlocks);
Get Blocks Tip Height
Returns the most recently processed Bitcoin block height processed by Bisq.
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { blocks } = bisqJS();
const myBlocksHeight = await blocks.getBlocksTipHeight({
index: 0,
length: 1,
});
console.log(myBlocksHeight);
Get Market Currencies
Returns the Bisq market currencies.
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { markets } = bisqJS();
const currencies = await markets.getCurrencies();
console.log(currencies);
Get Market Depth
Returns the Bisq market depth.
Parameters:
- {string} market
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { markets } = bisqJS();
const market = "BTC_USD";
const depth = await markets.getDepth({ market });
console.log(depth)
Get Market HLOC
Returns the Bisq market Hloc.
Parameters:
- {string} market
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { markets } = bisqJS();
const market = "BTC_USD";
const hloc = await markets.getHloc({ market });
console.log(hloc);
Get Market Offers
Returns the Bisq market Offers.
Parameters:
- {string} market
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { markets } = bisqJS();
const market = "BTC_USD";
const offers = await markets.getOffers({ market });
console.log(offers);
Get Market Ticker
Returns the Bisq market Ticker.
Parameters:
- {string} market
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { markets } = bisqJS();
const market = "BTC_USD";
const ticker = await markets.getTicker({ market });
console.log(ticker);
Get Market Trades
Returns the Bisq market Trades.
Parameters:
- {string} market
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { markets } = bisqJS();
const market = "BTC_USD";
const trades = await markets.getTrades({ market });
console.log(trades);
Get Market Volumes
Returns the Bisq market Volumes.
Parameters:
- {string} market
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { markets } = bisqJS();
const market = "BTC_USD";
const basecurrency = "BTC";
const volumes = await markets.getVolumes({ basecurrency, market });
console.log(volumes);
Get Stats
Returns statistics about all Bisq transactions.
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { statistics } = bisqJS();
const stats = await statistics.getStats();
console.log(stats);
Get Transaction
Returns details about a Bisq transaction.
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { transactions } = bisqJS();
const txid = '4b5417ec5ab6112bedf539c3b4f5a806ed539542d8b717e1c4470aa3180edce5';
const tx = await transactions.getTx({ txid });
console.log(tx);
Get Transactions
Returns details about a Bisq transactions.
[ NodeJS Example ] [ HTML Example ] [ Top ]
const { transactions } = bisqJS();
const txs = await transactions.getTxs({ index: 0, length: 1 });
console.log(txs);