Giter Club home page Giter Club logo

poloniex-api's People

Contributors

buurzx avatar pharrisee avatar

Stargazers

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

Watchers

 avatar  avatar

poloniex-api's Issues

Examples import the wrong package.

In both of the examples "gitlab.com/wmlph/poloniex-api" is listed as the poloniex package. I think this was meant to be "github.com/pharrisee/poloniex-api" correct? The examples work out fine with the second option.

No events on the wss subscription

Hello and thanks for this work.

When I try the example from the README (note that there is a small problem with the imports, there should be time instead of log), and with empty credentials, as in:

p := poloniex.NewWithCredentials("", "")

I get confirmation about the connection being established and the subscribe commands, but I don't receive any events.

After some minutes, this is all the output that I have:

2018/01/13 15:38:55 Dial: connection was successfully established with wss://api2.poloniex.com/
2018/01/13 15:38:57 {"command":"subscribe","channel":"1002"}
2018/01/13 15:38:57 {"command":"subscribe","channel":"121"}

Is there something wrong in the example?
Or maybe this isn't supposed to be working without credentials (note that when this repository was on gitlab, a few months ago, I could get subscription events with empty credentials)?

I haven't tried with credentials.

Question regarding reading messages from WS (ReadMessage -> ReadJSON)

Sometimes the websocket loses its connection, which is understandable. I looked into mitigating this problem, maybe by reconnecting to the WS API. However I saw that you were already using a library (github.com/mariuspass/recws) that should be able to reconnect in cases like this. What surprises me though, is that you made a change to not use this libs ReadMessage function anymore, how come?

ccca866?diff=split

Supporting higher precision floats

Is it possible to support higher precision for decimal points? I saw on the Poloniex API that they're listing 8 decimals points in their response, while order book information through this wrapper only gives 6 points of precision. That ends up being relevant for some pairs like BTC-DOGE.

I'm not sure if this is a limitation with float64, but if the change is all right with you I can look into it and submit a pull request.

Problem with nil logger using Readme example

I'm trying to run your example to consume WS, but I'm getting panic due to nil pointer in logger

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x6f7ba9]

goroutine 6 [running]:
github.com/miratronix/logpher.(*Logger).LevelEnabled(...)
        /home/djumpen/go/pkg/mod/github.com/miratronix/[email protected]/logger.go:49
github.com/miratronix/logpher.(*Logger).log(0x0, 0xd1c200, 0xc0000486b0, 0x2, 0x2)
        /home/djumpen/go/pkg/mod/github.com/miratronix/[email protected]/logger.go:55 +0x29
github.com/miratronix/logpher.(*Logger).Info(...)
        /home/djumpen/go/pkg/mod/github.com/miratronix/[email protected]/logger.go:34
github.com/miratronix/gows.(*Websocket).connect(0xc00012c000, 0x0, 0x0, 0x0, 0x0)
        /home/djumpen/go/pkg/mod/github.com/miratronix/[email protected]/connection.go:15 +0x113
github.com/miratronix/gows.(*Websocket).reviver(0xc00012c000, 0xc00012a120)
        /home/djumpen/go/pkg/mod/github.com/miratronix/[email protected]/connection.go:51 +0x53
created by github.com/miratronix/gows.(*Websocket).Connect
        /home/djumpen/go/pkg/mod/github.com/miratronix/[email protected]/websocket.go:72 +0x92

I could fix it by initializing logger inside NewWithCredentials but I'm wondering how it works for you as it is now.

Unmarshal errors on OrderTrades

I am receiving "json: cannot unmarshal object into Go value of type poloniex.OrderTrades"

while using the code similiar to

trades, err :=polo.OrderTrades(131531404054)
if err != nil {
log.Fatalln(err)
}
if len(trades) > 0 {
fmt.Println(trades)
}

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.