npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gdax-trade-client

v0.1.11

Published

Trading Client for GDAX Trade Monitoring

Readme

GDAX Trade Monitoring

Description

This is a Trade Execution and Monitoring Command Line Utility for GDAX.

Usage

This application can be used to execute basic commands against the GDAX Exchange for Crypto Currencies.

Getting Started

Authentication

Create your GDAX API Access / Auth File or you can provide each key as a parameter when invoking the application.

GDAX API Provides you the ability to create your API Secret and Keys here

Production Setup Sandbox Setup

{
  "key": "yourAPIKey",
  "secret": "yourGDAXSecret",
  "passphrase": "yourAPIPassphrase"
}

Recommandation is to save your production auth file as your_name.json and your sandbox file as your_name.sandbox.json

Basic Command Structure

Invoking the command is very easy and follows at a minimum the following for each command.

node src/trade.cmd.js --auth-file your_name.sandbox.json --list products

The above command supports listing all the products in the default JSON output format. If you prefer a more friendly format in the console try the tabular format.

node src/trade.cmd.js --auth-file your_name.sandbox.json --list products --table

Account Information Commands

Show your balances at Coinbase and GDAX

node src/trade.cmd.js --auth-file your_name.sandbox.json --list coinbase-accounts --table
node src/trade.cmd.js --auth-file your_name.sandbox.json --list gdax-accounts --table

Order Management Commands

Important note: If you want to execute your commands against production you must provide -r to each command. Additionally all orders are placed as Limit Orders only as Maker Orders to avoid fees.

View Your Open Orders

node src/trade.cmd.js --auth-file your_name.sandbox.json --list orders --table

Cancel All Orders

node src/trade.cmd.js --auth-file your_name.sandbox.json --cancel ALL --table

Cancel All Active Orders By Product

node src/trade.cmd.js --auth-file your_name.sandbox.json --cancel ETH-USD --table

Place an Order as a Buy Side Limit Order

node src/trade.cmd.js --auth-file adam_parrish.sandbox.json --buy-limit BTC-USD --amount 1 --limit-price 900

Place an Order as a Sell Side Limit Order

node src/trade.cmd.js --auth-file adam_parrish.sandbox.json --sell-limit BTC-USD --amount 1 --limit-price 1900

Place a Scale In Order to Buy via Martingale Price Ladder

gtrade -f ./adam_parrish.json -r --scale-in BTC-USD --buy-source-amount 10000 --entry-price 5000 --logarithmic-steps 8

which will produce the following buy orders to provide more opportunities to sell as a price is declining:

orange:gdax-trade-client adamparrish$ gtrade --table -f ./adam_parrish.json -r --scale-in BTC-USD --buy-source-amount 10000 --entry-price 5000 --logarithmic-steps 15 --lower-bound 0.6
Submitting BUY orders for
Currency:     BTC-USD
With Entry Price:  5000
side   product_id  post_only  size       price      cost
-----  ----------  ---------  ---------  ---------  -----------------
"buy"  "BTC-USD"   true       "0.00334"  "5000.00"            16.6855
"buy"  "BTC-USD"   true       "0.01017"  "4919.73"            50.0565
"buy"  "BTC-USD"   true       "0.03123"  "4809.15"           150.1694
"buy"  "BTC-USD"   true       "0.09629"  "4678.90"           450.5081
"buy"  "BTC-USD"   true       "0.29809"  "4534.02"          1351.5244
"buy"  "BTC-USD"   true       "0.92623"  "4377.48"          4054.5731
-----  ----------  ---------  ---------  ---------  -----------------
                                                    6073.516845703125

price            size          product_id  side   stp   type     time_in_force  post_only  created_at                     fill_fees             filled_size   executed_value        status     settled
---------------  ------------  ----------  -----  ----  -------  -------------  ---------  -----------------------------  --------------------  ------------  --------------------  ---------  -------
"5000.00000000"  "0.00334000"  "BTC-USD"   "buy"  "dc"  "limit"  "GTC"          true       "2018-04-08T17:47:22.569224Z"  "0.0000000000000000"  "0.00000000"  "0.0000000000000000"  "pending"  false

price            size          product_id  side   stp   type     time_in_force  post_only  created_at                     fill_fees             filled_size   executed_value        status     settled
---------------  ------------  ----------  -----  ----  -------  -------------  ---------  -----------------------------  --------------------  ------------  --------------------  ---------  -------
"4919.73000000"  "0.01017000"  "BTC-USD"   "buy"  "dc"  "limit"  "GTC"          true       "2018-04-08T17:47:22.622521Z"  "0.0000000000000000"  "0.00000000"  "0.0000000000000000"  "pending"  false

price            size          product_id  side   stp   type     time_in_force  post_only  created_at                     fill_fees             filled_size   executed_value        status     settled
---------------  ------------  ----------  -----  ----  -------  -------------  ---------  -----------------------------  --------------------  ------------  --------------------  ---------  -------
"4534.02000000"  "0.29809000"  "BTC-USD"   "buy"  "dc"  "limit"  "GTC"          true       "2018-04-08T17:47:22.627123Z"  "0.0000000000000000"  "0.00000000"  "0.0000000000000000"  "pending"  false

price            size          product_id  side   stp   type     time_in_force  post_only  created_at                    fill_fees             filled_size   executed_value        status     settled
---------------  ------------  ----------  -----  ----  -------  -------------  ---------  ----------------------------  --------------------  ------------  --------------------  ---------  -------
"4809.15000000"  "0.03123000"  "BTC-USD"   "buy"  "dc"  "limit"  "GTC"          true       "2018-04-08T17:47:22.63499Z"  "0.0000000000000000"  "0.00000000"  "0.0000000000000000"  "pending"  false

price            size          product_id  side   stp   type     time_in_force  post_only  created_at                     fill_fees             filled_size   executed_value        status     settled
---------------  ------------  ----------  -----  ----  -------  -------------  ---------  -----------------------------  --------------------  ------------  --------------------  ---------  -------
"4377.48000000"  "0.92623000"  "BTC-USD"   "buy"  "dc"  "limit"  "GTC"          true       "2018-04-08T17:47:22.636251Z"  "0.0000000000000000"  "0.00000000"  "0.0000000000000000"  "pending"  false

price            size          product_id  side   stp   type     time_in_force  post_only  created_at                     fill_fees             filled_size   executed_value        status     settled
---------------  ------------  ----------  -----  ----  -------  -------------  ---------  -----------------------------  --------------------  ------------  --------------------  ---------  -------
"4678.90000000"  "0.09629000"  "BTC-USD"   "buy"  "dc"  "limit"  "GTC"          true       "2018-04-08T17:47:22.647323Z"  "0.0000000000000000"  "0.00000000"  "0.0000000000000000"  "pending"  false

Accesing GDAX - For Real

When you are ready to access the real production / non-sandbox you have to provide a real production auth-file and the -r flag like this

node src/trade.cmd.js --auth-file adam_parrish.json --buy-limit BTC-USD --amount 1 --limit-price 900 -r

The above command will submit a REAL limit order to GDAX