brcoin
is an open source bash script to view cryptocurrency prices from Mercado Bitcoin public API on command line.
- Easy to use
- Setup & Run in seconds
- Get updated prices in brazilian reais (R$)
- 10+ listed cryptocurrencies
- Table view with multiple coins tracking
- Raw price data you can integrate with your own project
- Price rounding and add currency symbol options
- Last, buy, sell, high, low and opening prices, and coin negotiated volume
brcoin
runs on bash shell for Linux, Windows and Mac.
Clone the project repository:
$ git clone github.com/lucianoayres/brcoin.git
Assign "execute" permission to the file:
$ sudo chmod +x brcoin
Add the script path to your $PATH (or simply move it to a folder already in your $PATH):
$ export PATH=$PATH:$PWD
Requires jq to parse JSON data. Make sure to install it before running brcoin
.
# install jq package on Ubuntu
$ sudo apt-get install jq
# Display table view with all listed cryptocurrency prices
$ brcoin
# Display table view with updated bitcoin price data
$ brcoin btc
# Display table view with Bitcoin Cash, Bitcoin, Ethereum and Link coin updated price data
$ brcoin bch btc eth link
# Display Litecoin raw updated price
$ brcoin ltc -r
# Display single view Ripple updated price data
$ brcoin xrp -single
# Display Bitcoin price data rounded to 2 decimal places with brazilian real currency symbol
$ brcoin btc -d2 -c
# display Bitcoin highest price of the day data
$ brcoin btc -r --high
# Display Ethereum rounded opening price of the day data with brazilian real currency symbol
$ brcoin eth -d -c --buy
brcoin [COIN] [VIEW MODE] [DATA TYPE]
Sets a single or multiple cryptocoins ticker symbols. Mandatory only when used combined with the folowing [VIEW MODE] types: raw, round, currency and single. If no [DATA TYPE] is set, --last is set by default.
[COIN] | Description |
---|---|
ada | Get Cardano price |
ago | Get Algorand price |
ankr | Get ANKR price |
axs | Get Axie Infinity price |
band | Get Band Protocol price |
bch | Get Bitcoin Cash price |
btc | Get Bitcoin price |
chz | Get Chiliz price |
crv | Get Curve Dao Token price |
doge | Get Dogecoin price |
eth | Get Ethereum price |
link | Get Chainlink price |
ltc | Get Litecoin price |
mco2 | Get Moss Earth price |
paxg | Get PAX Gold price |
sol | Get Solana price |
sushi | Get SushiSwap price |
uni | Get Uniswap price |
usdc | Get USD Coin price |
usdp | Get Pax Dollar price |
wbx | Get WBiX price |
xrp | Get Ripple price |
zxr | Get 0x price |
Note: All prices in brazilian reais (R$).
Optional argument to set the data output style to be displayed. If no [VIEW MODE] is set, --table is used by default. Raw, single and table view are exclusive and can not be combined with each other or any other available view mode. Round, -d and -d0 view modes can be combined with -currency view mode.
[VIEW MODE] | Description |
---|---|
-r, -raw | Display raw price data |
-d, -round | Display rounded price data to 04 decimal places |
-d2 | Display rounded price data to 02 decimal places |
-d0 | Display rounded price data with no decimal places |
-c, -currency | Display raw price data with brazilian real currency symbol |
-single | Display all price data of the selected cryptocoin |
-table | Display selected cryptocoin(s) price data in table format |
Optional argument to set the data items to be displayed in compatible [VIEW MODE] types: raw, rounded and currency. Only one [DATA TYPE] argument allowed per usage.
Plugin | README |
---|---|
--last | Last price |
--buy | Buy price |
--sell | Sell price |
--high | Highest price of the day |
--low | Lowest prie of the day |
--open | Opening price of the day |
--vol, --volume | Negotiated volume of the day |
Plugin | README |
---|---|
--help | Display command help |
--version | Output version information |
- Mercado Bitcoin Data API
- Inspired by coinmon