Giter Club home page Giter Club logo

gdaxmarketmakertrader's Issues

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

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

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)

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.