Giter VIP home page Giter VIP logo

Comments (12)

jjxtra avatar jjxtra commented on August 22, 2024 1

Awesome. Let's nail down the interface first then we can start coding it up.

from exchangesharp.

jjxtra avatar jjxtra commented on August 22, 2024

from exchangesharp.

jjxtra avatar jjxtra commented on August 22, 2024

Which web socket API are your highest priority?

from exchangesharp.

wklm avatar wklm commented on August 22, 2024

@jjxtra We can split the work, I was playing recently with gdax, https://github.com/wklm/gdx-ws.

I could start with proposing an interface for all websokcet-based apis, and implement it for a few.
Nice thing them is that they're usually open, so we don't need to deal with authentication, rate limits etc

If this is fine, I would get back to you with a PR in ~ 2 weeks.

from exchangesharp.

firth avatar firth commented on August 22, 2024

Has anything come of this yet?

I've added this myself today before seeing your message. I haven't spent any time really at all considering what the best interface should be, but it looks something like this:

`ExchangePoloniexAPI polo = new ExchangePoloniexAPI();
polo.StartOrderBook();

        Console.WriteLine("POLO:");
        Console.WriteLine(polo.bid["LTC-BTC"] + " " + polo.ask["LTC-BTC"]);
        Console.WriteLine(polo.bid["ETH-BTC"] + " " + polo.ask["ETH-BTC"]);


        ExchangeGdaxAPI gdax = new ExchangeGdaxAPI();
        gdax.StartOrderBook();

        Console.WriteLine("\nGDAX:");
        Console.WriteLine(gdax.bid["LTC-BTC"] + " " + gdax.ask["LTC-BTC"]);
        Console.WriteLine(gdax.bid["ETH-BTC"] + " " + gdax.ask["ETH-BTC"]);`

Which results in this:

POLO:
0.01879998 0.0188
0.04901001 0.0490103

GDAX:
0.01894 0.01895
0.04914 0.04915

It starts a new thread when you call StartOrderBook(), which manages the bid/ask prices so that they are always up-to-date using the websocket API.

from exchangesharp.

jjxtra avatar jjxtra commented on August 22, 2024

Web socket is planned and will probably be an interface property on the IExchangeAPI interface, like an IExchangeWebSocketAPI that will handle the connections. @wklm is looking into proposing an interface.

from exchangesharp.

rsdaltx avatar rsdaltx commented on August 22, 2024

I would be interested in contributing a Binance Websocket API since that's the exchange I'm currently using. Has there been any movement from @wklm ?

from exchangesharp.

jjxtra avatar jjxtra commented on August 22, 2024

from exchangesharp.

wklm avatar wklm commented on August 22, 2024

hey @jjxtra,

sorry for the late response. I was trying out multiple things and decided to write it in F# using MailboxProcessors, an actor model "framework" included in the F# standard library. I can understand that you might want to keep the project C#-only, but since it should be fully interoperable with rest of the codebase, maybe it's worth to consider such an integration? Otherwise I would continue it as a separate project like this guys did:
https://github.com/timmolter/XChange
https://github.com/bitrich-info/xchange-stream

All the best in the new year!
Wojtek

CC: @firth @rsdaltx

from exchangesharp.

jjxtra avatar jjxtra commented on August 22, 2024

Let's continue it as a separate project for now.

from exchangesharp.

jjxtra avatar jjxtra commented on August 22, 2024

Just FYI all, web sockets are being implemented. Right now tickers are being added for those exchanges that support it, along with completed orders (Bitfinex). More will be added over time.

from exchangesharp.

 avatar commented on August 22, 2024

Would be happy to help beta test GDAX websockets.

Thanks

from exchangesharp.

Related Issues (20)

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.