Description Usage Arguments Details Value Examples
Convert among different units of measure for Bitcoin.
1 2 3 4 5 6 7 | convert_btc(x, from = "BTC", to = "bits")
satoshi(x)
bits(x)
mbtc(x)
|
x |
a numeric value. |
from |
the units of |
to |
new units. |
This complete conversion function, convert_btc
, converts a value x
among the following units: BTC, mBTC, bits and satoshi.
These are the recommended ways of specifying the from
and to
arguments, though BTC and mBTC
may be passed as btc and mbtc, respectively. BTC may also be written out as Bitcoin/bitcoin and will also be internally converted to BTC.
Three shorthand functions, mBTC
, bits
and satoshi
, are also available if you forget the conversion.
These assume the input is Bitcoin and multiply your value straight to mBTC, bits or satoshi, respectively. See examples.
numeric value.
1 2 3 4 5 6 7 8 9 | convert_btc(1, "BTC", "mBTC")
convert_btc(1, "BTC", "bits")
convert_btc(1, "BTC", "satoshi")
convert_btc(0.001, "mBTC", "bits")
convert_btc(1, "mBTC", "bitcoin")
convert_btc(100, "satoshi", "bits")
satoshi(1e-8)
bits(1e-6)
mbtc(0.001)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.