Giter Club home page Giter Club logo

coinbase-trader's Introduction

coinbase-trader

Node.js application to bypass buying limitations on Coinbase.

Example Bitcoin Trader

Instructions

You must first have node.js and an API key from Coinbase. The button you'll need is a little ways down on the page:

API key enabled

  1. Clone the repo.
  2. In the repo folder, run git submodule init; git submodule update
  3. Edit config.js to provide your Coinbase API key.
  4. Run node trader.js

You should now have a console to set up BTC buy orders. They will remain open until the Coinbase limit is lifted, at which point they'll be filled normally.

Use BUY <amount> to purchase Bitcoins, and SELL <amount> to sell. Orders will be retried at the configurable interval (default: 5 seconds) until filled. Every 60 seconds, a report will be printed of outstanding orders.

Use BUY <amount> [currency] to buy as many Bitcoin as possible using <amount> of [currency] at the current exchange rates, updated once per 60 seconds. Coinbase fees are included in the calculations, but fluctuating prices can result in slight over and under spends.

Notes

Currently, only buy orders are supported.

Donations

You can send donations to: 1LQTXi1iWULMd4aKn5tKpcgT3xgJiTV5Dm

coinbase-trader's People

Contributors

clehner avatar jaggederest avatar martindale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coinbase-trader's Issues

Newbie error

after cloning:
user@host:/coinbase-trader$ sudo apt-get install nodejs
user@host:
/coinbase-trader$ npm install
user@host:~/coinbase-trader$ nodejs trader.js
Welcome to BitCoin Trader.
Command-line console for buying and selling BitCoins.

 Syntax: BUY <amount> [currency]
Example: BUY 10

If a currency is provided (USD, EUR, etc.), the order will buy as many BTC as the provides at the current exchange rates, updated once per 60 seconds.

readline.js:121
var lines = prompt.split(/[\r\n]/);
^
TypeError: Object # has no method 'split'
at Interface.setPrompt (readline.js:121:24)
at new REPLServer (repl.js:128:7)
at Object.start (repl.js:251:14)
at Object. (/home/alan/coinbase-trader/trader.js:21:6)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:32)
at Function._load (module.js:311:12)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:39)

It's just attempting to buy and keeps on repeating

Hi I just stumbled across this from an article I read which said will help bypass the buying limitation from Coinbase.

But when I run the buy command, it just says "Attempting to buy".

Could you kindly explain why that is and how long I might need to wait before it actually buys?

Rounding

The program should round to 8 decimal places when converting a buy order from USD into BTC.

Buying USD amounts doesn't work

Welcome to BitCoin Trader.
Command-line console for buying and selling BitCoins.

 Syntax: BUY <amount> [currency]
Example: BUY 10

If a currency is provided (USD, EUR, etc.), the order will buy as many BTC as th
e provides at the current exchange rates, updated once per 60 seconds.

coinbase> buy XXX usd
Order to BUY XXX USD worth of BTC queued @ 59.49 BTC/USD (X.273371512642943 BTC)

coinbase> Attempting to buy X.273371512642943 BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...
(node) warning: possible EventEmitter memory leak detected. 11 listeners added.
Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at request (C:\Users\jack\Documents\GitHub\coinbase-trader\node_modules\rest
ler\lib\restler.js:295:11)
at json (C:\Users\jack\Documents\GitHub\coinbase-trader\node_modules\restler
\lib\restler.js:331:10)
at Object.postJson (C:\Users\jack\Documents\GitHub\coinbase-trader\node_modu
les\restler\lib\restler.js:335:10)
at executeOrder (C:\Users\jack\Documents\GitHub\coinbase-trader\trader.js:11
8:12)
at null._onTimeout (C:\Users\jack\Documents\GitHub\coinbase-trader\trader.js
:125:13)
at Timer.listOnTimeout as ontimeout
(node) warning: possible EventEmitter memory leak detected. 11 listeners added.
Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:160:15)
at executeOrder (C:\Users\jack\Documents\GitHub\coinbase-trader\trader.js:12
0:10)
at null._onTimeout (C:\Users\jack\Documents\GitHub\coinbase-trader\trader.js
:125:13)
at Timer.listOnTimeout as ontimeout
Attempting to buy NaN BTC...
Attempting to buy NaN BTC...

Help!

I'm new to this website, coding, everything. Any chance you could walk me through setting this up? It seems like a great way to get Bitcoin whenever Coinbase finally decides to work.

Feature request: buy amounts in dollars

When I buy from Coinbase I'm looking to spend an exact dollar amount. This program would be useful to me if it allowed a dollar entry, and queried the exchange rate before submitting in order to calculate the correct BTC amount automatically.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.