Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
coinbase-cli
Advanced tools
This is a command-line utility that uses the Coinbase API to trade, deposit and withdraw cryptocurrencies.
On busy days, it has happened that the Coinbase website was down while its underlying API services still worked. This command-line tool is my emergency backup, so that I can trade when everyone else is. Of course, there are many other use cases for a command-line tool such as easily automating trading tasks or inspecting the prices.
coinbase help <command>
for details):
accounts
: list your coinbase accountsbuy
: buy crypto currency with fiat currencybuyprice
: shows the buy price for a given trade pairpaymentmethods
: list your coinbase payment methodssell
: sell crypto currency for fiat currencysellprice
: shows the sell price for a given trade pairspotprice
: shows the spot price for a given trade pairtime
: coinbase server current timewithdraw
: withdraw fiat currencyUse this tool at your own risk. Program code can contain bugs - it's open source, so you can check it before you use it.
npm install -g coinbase-cli
Optionally, you can have the CLI tool remember your API key and secret. They will be stored (un-encrypted) in a coinbase.json
file in your home directory.
If you skip this step, you will have to enter the keys with every command, or pass them on the command-line with every command.
coinbase set api-key "<YOUR_API_KEY>"
coinbase set api-secret "<YOUR_API_SECRET>"
First of all, detailed instructions can be found by executing:
coinbase help
coinbase <command> help
For most commands, the tool has two modes: interactive and non-interactive. In interactive mode, you don't provide any command-line arguments except the command you would like to run. The tool then asks you questions on the information it needs.
To use interactive mode, simply type coinbase <command>
e.g.:
$ coinbase sell
Please choose an account by typing in its number:
1: name: BTC Wallet, id: 33452906-0ab7-596a-98bd-5923059312065, balance: 3.40000000 BTC, type: wallet
2: name: LTC Wallet, id: a3b02e94-73f8-557a-a553-5329056236542, balance: 0.94940530 LTC, type: wallet
>2
Please choose a payment method by typing in its number:
1: name: USD Wallet, id 453ebbdf-9d09-578f-8fec-532532634156, type: fiat_account, currency: USD
2: name: EUR Wallet, id 453ebbdf-9d09-578f-8fec-ecfd7e7fed17, type: fiat_account, currency: EUR
>2
Please enter the amount e.g. '30.5', or 'all' to sell all your LTC:
?all
Sell Order:
- amount : 0.94940530 LTC
- fee : 4.07 EUR
- subtotal : 273.08 EUR
- total : 269.01 EUR
- status : created
> Commit
Cancel
Done!
Press ESC
to cancel while the tool is asking for input. If there is only one option for a choice (e.g. you only have one wallet with a non-zero balance), then the tool won't ask you to choose, it will tell you what the value is.
The other option is to pass all necessary information on the command-line:
coinbase sell --account="a3b02e94-73f8-557a-a553-5329056236542" --payment-method="453ebbdf-9d09-578f-8fec-ecfd7e7fed17" --amount="all"
If you get the error request timestamp expired
, then your system clock is probably off by more than 30 seconds from the coinbase servers.
Run coinbase time
to get the time that Coinbase thinks it is.
License: MIT, see LICENSE file.
accounts
commandpaymentmethods
commandspotprice
commandtime
commandwithdraw
commandbuy
commandbuyprice
commandsell
and sellprice
commandsFAQs
Commandline utility for trading cryptocurrencies on Coinbase
We found that coinbase-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.