Giter Club home page Giter Club logo

gdaxmarketmakertrader's Introduction

Copyright 2017 James McMurran

This is not a finished product so please be carefull. I have stoped developing on this due to the crash once LiteCoin hits over $200 I will start this back up as I have most of my money wraped up at that price point.


Licence:Creative Commons  Attribution-ShareAlike
CC BY-SA


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


If you don't have a Gdax account please consider using my link to get $10 free when you deposit $100 as I will also get $10.
https://www.coinbase.com/join/5938cf1e9c87bc060c61c9cc

Install

Install nodeJS from the site not the repo the ubuntu one is old.

# from npm
npm install gdax
npm install nodemailer

# from GitHub
npm install coinbase/gdax-node



use command  ts-node ./run.ts to run ts scripts

Trader.ts is used for running the maker bot and is the meat of the bot.
Watcher.ts is used to Watch your account for trades and let you know when trades happen.
Listen.py is used for dumping all the stream into a mongodb. This is useful if you would like to use market data to set your buy down and profit intervals


The Goal of this project is to make it so that you can link in your buy down and profit logic and not have to handle anything else.

This project is still in beta as it some times fails to place an order in a response to an event. But it will notify you of this.

Please keep in mind that this is a simple market maker and is used just to place and respond to the trades.
I highly recommend finding a better way of setting the buydown and profit interval.

To run you need to set env vars like so in the console be for running the scripts.
Trader.ts is running then you place a limit trade on the web interface and sit back and let it run.


```bash
#Gdax settings
export GDAX_KEY="";
export GDAX_SECRET="";
export GDAX_PASSPHRASE="";

#You can put the email for email2txt so get txt's on your phone

#noice email settings
export Email_User="";
export Email_Password="";
export Email_From="";
export Email_To="";

#profit email settings I like to have a different sound effect for this one as this is the fun one.
export Email_Profit_User="";
export Email_Profit_Password="";
export Email_Profit_From="";
export Email_Profit_To="";

#the max sell orders that it can have open
export MAX_SELL_ORDERS=3;
#this was for an experiment where the more open sells it had the bigger the buy down would get
export EXP_BUYDOWN_SLOWDOWN=1;


export tradeSize=0.01;
export buyDownValue=.05;
export profitValue=.05;

```

gdaxmarketmakertrader's People

Contributors

jamesmcmurran 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdaxmarketmakertrader's Issues

Trader.ts (30,5): Type 'string' is not assignable to type 'number'. (2322)

How to fix?

/lib/node_modules/ts-node/src/index.ts:329
        throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
              ^
TSError: ⨯ Unable to compile TypeScript
Trader.ts (30,5): Type 'string' is not assignable to type 'number'. (2322)
    at getOutput (/lib/node_modules/ts-node/src/index.ts:329:15)
    at Object.compile (/lib/node_modules/ts-node/src/index.ts:515:11)
    at Module.m._compile (/lib/node_modules/ts-node/src/index.ts:402:43)
    at Module._extensions..js (module.js:654:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/lib/node_modules/ts-node/src/index.ts:405:12)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at Object.<anonymous> (/lib/node_modules/ts-node/src/bin.ts:145:12)

A Sell order can fail

For some reason, fully valid orders will sometimes fail.

Error: A GDAX API request failed. Bad Request.

        -------Order-------
        type:order
        Time:null
        ProductId:LTC-USD
        OrderType:limit
        Side:buy
        Size:1
        Price:60.14

more than one open buy

More than one buy order can happen as the cancel sometimes fails when trading gets heavy.

After buy order finalizes, the automatic buy/sell orders returned "undefined"

Hi,
First I must thank you for posting your code. My winter project was to write something similar, and I found your project in the comments for the gdax-tt project in which someone else was looking for a tutorial.

Now for the other reason I'm here..I am trying to use your code for ETH-USD and after my buy order finalized, I expected the automatic buy/sell orders to go through, but I didn't see any pop up and looking at the output, the result was "undefined" for both. Wondering if you have seen this before in my output below.
Thanks
Rod

Order Finalized
Calc profit price:935.00000000 + 0.25 = 935.25
Calc Buydown price:935.00000000 - 0.25 = 934.75
Cleared Buy order
I just bought 1 at 935.00000000
{}
side:buy Amount:1 Price:934.75
side:sell Amount:1 Price:935.25
Buy Limit placed for 1 at 934.75 and a sell limit for 1 at 935.25
Order to buy 1 'ETH-USD' for934.75. Result: undefined

        -------Order-------
        type:order
        Time:null
        ProductId:ETH-USD
        OrderType:limit
        Side:buy
        Size:1
        Price:934.75

Order to sell 1 'ETH-USD' for935.25. Result: undefined

        -------Order-------
        type:order
        Time:null
        ProductId:ETH-USD
        OrderType:limit
        Side:sell
        Size:1
        Price:935.25

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.