diff --git a/source/ethers.js/source/api-providers.rst b/source/ethers.js/source/api-providers.rst index 346352f..9177c26 100644 --- a/source/ethers.js/source/api-providers.rst +++ b/source/ethers.js/source/api-providers.rst @@ -1006,6 +1006,9 @@ Etherscan :sup:`prototype` . getEtherPrice ( ) Returns a :ref:`Promise ` with the price of ether in USD. +:sup:`prototype` . getEtherPriceBtc ( ) + Returns a :ref:`Promise ` with the price of ether in BTC. + :sup:`prototype` . getHistory ( addressOrName [ , startBlock :sup:`= 0` [ , endBlock :sup:`= "latest"` ] ] ) Returns a :ref:`Promise ` with an array of :ref:`Transaction Responses ` for each transaction to or from *addressOrName* between *startBlock* and *endBlock* (inclusive). @@ -1020,6 +1023,11 @@ Etherscan console.log("Ether price in USD: " + price); }); + // Getting the current Ethereum price in Bitcoin + etherscanProvider.getEtherPriceBtc().then(function(price) { + console.log("Ether price in BTC: " + price); + }); + // Getting the transaction history of an address let address = '0xb2682160c482eB985EC9F3e364eEc0a904C44C23';