1.0.3 • Published 2 years ago

cli-bitcoin v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Cli Bitcoin

Search for cryptocurrency information

🖥 INSTALLING

To get a global install of the latest CLI release.

npm install -g cli-bitcoin

Helpers | Description | Version

Command for help

cli-bitcoin --help

Command to see version

cli-bitcoin --version

Command to see the description

cli-bitcoin --description

💎 HOW TO USE

Basic Command

With this simple command it is possible to choose the method and currency in a very simple and intuitive way

cli-bitcoin

Choose cryptocurrency

You can choose which cryptocurrency by passing a --coin \ or -c \ option. If no option is set by default and "btc". See all accepted currency acronym arguments here

Avanced Commands

For more advanced information, learn about the following methods:

  • TICKER: Returns information with the summary of the last 24 hours of trading. Veja mais..

  • ORDERBOOK: Order book made up of sell and buy orders. Veja mais..

  • TRADES: History of trades carried out. Veja mais..

  • DAY SUMMARY: Returns daily summary of trades performed. Veja mais..

USE:

$ cli-bitcoin \<methodo> [options]

See the "--help" for each method to learn more about the options available.

# EXAMPLES
cli-bitcoin ticker --help

cli-bitcoin ticker -c eth

# OR

cli-bitcoin orderbook --help

cli-bitcoin orderbook -c btc

# OR

  $ cli-bitcoin trades

  $ cli-bitcoin trades -c eth

  $ cli-bitcoin trades -t 5700 -c eth

  $ cli-bitcoin trades -s 5700 -c eth

  $ cli-bitcoin trades -f 1501871369

  $ cli-bitcoin trades -ft 1501871369 1501891200

  $ cli-bitcoin trades --help

# OR

cli-bitcoin day-summary --help

cli-bitcoin day-summary 2020 11 31 -c eth

Methods


Ticker

Description:

Returns information with the summary of the last 24 hours of trading.

Result:

  • high: Highest trading unit price in the last 24 hours.

  • low: Lowest unit trading price in the last 24 hours.

  • vol: Amount traded in the last 24 hours.

  • last: Unit price of the last negotiation.

  • buy: Highest bid price in the last 24 hours.

  • sell: Lowest bid price in the last 24 hours.

  • date: Date

Example:

# EXAMPLES
cli-bitcoin ticker --help

cli-bitcoin ticker -c eth

OrderBook

Descrição: Livro de ofertas é composto por duas listas:

  • (1) uma lista com as ofertas de compras ordenadas pelo maior valor;
  • (2) uma lista com as ofertas de venda ordenadas pelo menor valor.

O livro mostra até 1000 ofertas de compra e até 1000 ofertas de venda.

Uma oferta é constituída por uma ou mais ordens, sendo assim, a quantidade da oferta é o resultado da soma das quantidades das ordens de mesmo preço unitário. Caso uma oferta represente mais de uma ordem, a prioridade de execução se dá com base na data de criação da ordem, da mais antiga para a mais nova.

  • bids: Lista de ofertas de compras, ordenadas do maior para o menor preço.
    • 0: Preço unitário da oferta de compra.
    • 1: Quantidade da oferta de compra.
  • asks: Lista de ofertas de venda, ordenadas do menor para o maior preço.
    • 0: Preço unitário da oferta de venda.
    • 1: Quantidade da oferta de venda.

Example Command:

# EXAMPLES


cli-bitcoin orderbook --help

cli-bitcoin orderbook -c btc

Example output:

{
    "asks": [
        [10410.00006000, 2.09190016],
        [10420.00000000, 0.00997000],
        [10488.99999000, 0.46634897]
    ],
    "bids": [
        [10405.38258000, 0.00181000],
        [10393.84180000, 0.08387000]
    ]
}

Trades

Description: History of trades carried out.

Result:

  • date: Trading date and time;

  • price: Trading unit price;

  • amount: Trading amount;

  • tid: trade identifier;

  • type: Indicates the executing end of the negotiation.

data domain:

buy : indicates executing purchase order

sell : indicates executing sell order

options

  -c, --coin [coin]        Acrônimo digital [coin]
  -t, --tid [tid]          Time | Returns up to 1000 trades from the trade identifier
  -s, --since [since]      Desde | Returns up to 1000 trades from the trade identifier
  -f, --from [from]        Returns up to 1000 trades from the given date
  -ft, --fron-to [fromTo]  Returns up to 1000 trades between the given timestamp range.
  -hd --human-date         output human-readable date
  -hc --human-currency     output human-readable currency
  -h, --help               display help for command

The "--from" and "--from" to arguments must be passed in unix date format representing the number of seconds from January 1, 1970. It is a time with no time zone or daylight saving time variations, so it uses only UTC /GMT, read more at: https://pt.wikipedia.org/wiki/Era_Unix. To convert, a good idea is to use the site http://www.epochconverter.com.

Examples:

  $ cli-bitcoin trades

  $ cli-bitcoin trades -c eth

  $ cli-bitcoin trades -t 5700 -c eth

  $ cli-bitcoin trades -s 5700 -c eth

  $ cli-bitcoin trades -f 1501871369

  $ cli-bitcoin trades -ft 1501871369 1501891200

  $ cli-bitcoin trades --help
# rerult simplify fake:

[
  {
    amount: 0.00066,
    date: 1644555481,
    price: 227982.36604,
    tid: 13051699,
    type: 'sell'
  },

# ... continua...

  {
    amount: 0.00378864,
    date: 1644563106,
    price: 228353.20682001,
    tid: 13051798,
    type: 'sell'
  },
#  ... 998 more items
]

Day Summary

Description: Returns daily summary of trades performed.

Result

  • date: Daily summary date (format: AAAA-MM-DD, example: 2013-06-20)

  • opening: Unit price for opening trading on the day.

  • closing: Unit price at the close of trading on the day.

  • lowest: Lowest trading unit price on the day.

  • highest: Highest unit trading price on the day.

  • volume: Volume of Reais (BRL) traded on the day.

  • quantity: Amount of digital currency traded on the day.

  • amount: Number of trades carried out on the day.

  • avg_price: Average unit price of trading on the day.

how to use

$ cli-bitcoin day-summary \ \ \

Command arguments 'year', 'month' and 'day' are required

  $ cli-bitcoin trades 2020 11 15 -c eth

options

Options:
  -c, --coin [coin]  Acrônimo da moeda digital [coin]
  -h, --help         display help for command

You can choose which cryptocurrency by passing a --coin \ or -c \ option. If no option is set by default and "btc". See all accepted currency acronym arguments here


List Acronym

ACRONYMCURRENCY
AAVEAave
ACMFTAC Milan
ACORDO01None
ADACardano
ALCXAlchemix
ALGOAlgorand
ALICEMyNeighborAlice
ALLFTAlliance
AMFTAston Martin Cognizant
AMPAmp
ANKRANKR
ARGFTArgentine Football Association
ASRFTAS Roma
ATMFTFan Token ATM
ATOMCosmos
AUDIOAudius
AVAXAvalanche
AXSAxie Infinity
BALBalancer
BANDBand Protocol
BARFTFC Barcelona
BATBasic Attention token
BCHBitcoin Cash
BLZBluzelle
BNTBANCOR
BTCBitcoin
CAIFTFan Token CAI
CHZChiliz
CITYFTManchester City FC
COMPCompound
CRVCurve Dao Token
CTSICartesi
CVXConvex Finance
DAIDai
DOGEDogecoin
DOTPolkadot
DYDXdYdX
ENJEnjin Coin
ENSEthereum Name Service
ETHEthereum
FETFetch.ai
FILFilecoin
FLOKIFloki Inu
GALAGala
GALFTGalatasaray
GALOFTClube Atletico Mineiro
GNOGnosis
GODSGods Unchained
GRTThe Graph
ICPInternet Computer
IMOB01None
IMOB02None
IMXImmutable X'
INTERFTInter Milan
JUVFTJuventus
KNCKyber Network
KP3RKeep3rV1
LINKChainlink
LPTLivepeer
LRCLoopring
LTCLitecoin
MANAMANA (Decentraland)
MATICPolygon
MBCCSH01Consorcio H01
MBCCSH02Consorcio H02
MBCONS01Cota de Consórcio 01
MBCONS02Cota de Consórcio 02
MBFP01None
MBFP02None
MBFP03None
MBFP04None
MBFP05None
MBPRK01Precatório MB SP01
MBPRK02Precatório MB SP02
MBPRK03Precatório MB BR03
MBPRK04Precatório MB RJ04
MBPRK05Fluxo de Pagamentos 5
MBPRK06Precatorio MB BR06
MBSANTOS01Token da Vila
MBVASCO01Vasco Token
MCMerit Circle
MCO2Moss Carbon Credit
MENGOFTFlamengo
MIRMirror Protocol
MKRMaker
NAVIFTNatus Vincere
OGFTOG eSports
OMGOmg Network
OXTOrchid
PAXGPAX Gold
PFLFTProfessional Fighters League
PLAPlayDapp
POLSPolkastarter
PORFTPortugal National Team FT
PSGFTParis Saint-Germain
QNTQuant
RACARadio Caca
RADRadicle
RENRen
REQRequest
SANDThe Sandbox
SAUBERFTAlfa Romeo Racing ORLEN
SCCPFTCorinthians
SHIBShiba Inu
SLPSmooth Love Potion
SNXSynthetix
SOLSolana
SPELLSpell Token
SPFCFTSPFC
STVFTSint-Truidense Voetbalvereniging
SUPERSuperFarm
SUSHISushiSwap
THFTTeam Heretics
UFCFTUFC
UMAUma
UNIUniswap
USDCUSD Coin
USDPPax Dollar
VSPRK01Precatorio VS SP01
WBTCWrapped Bitcoin
WBXWiBX
WLUNAWrapped LUNA Token
XLMStellar
XRPXRP
XTZTezos
YBOFTBSC Young Boys
YFIyearn.finance
YGGYield Guild Games
ZRX0x

Dependences used

  • commander
  • inquirer
  • request

API used

The data is a result of the Mercado Bitcoin public API. The CLI BITCOIN only serves as a facilitator to access this data via the command line.

*

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

License

This project is licensed under the MIT License - see the LICENSE.md file for details