Coder Social home page Coder Social logo

Comments (5)

aloysius-pgast avatar aloysius-pgast commented on May 27, 2024

Hi. Trades subscriptions is for all trades happening for a given pair. It uses public endpoint (ie: it does not need any secret key). Right now there is no ws support to retrieve your own order, although you could periodically retrieve the list of open & closed orders using http endpoint instead of ws endpoint

from crypto-exchanges-gateway.

lolero avatar lolero commented on May 27, 2024

ok. thanks!

just for general info, is there a plan to add subscription functionality for orders?

from crypto-exchanges-gateway.

aloysius-pgast avatar aloysius-pgast commented on May 27, 2024

Yes, I planned to implement such feature but unfortunately I didn't have time to work on it. I hope to resume work on it but I don't think it will happen in the next 6 months. That's why I suggested you to use REST api periodically. This is what I'm using myself for automated trading :

  • place an order
  • save order id (in db for example)
  • periodically check if order status changed (not too often to be under exchange limits, for example every 5 min)
  • if order has been filled, use POST /pushover/notify endpoint to send me a mobile notification

from crypto-exchanges-gateway.

lolero avatar lolero commented on May 27, 2024

Cool, thanks! Im actually going to wait for a trade notification in that pair to happen before I query the http endpoint so I don't have to poll.
That will work fine for now, I think. But I look forward to your implementation.
Thanks a lot for your hard work. If I am able to make any money out of this, I'll make sure to make a donation!

from crypto-exchanges-gateway.

aloysius-pgast avatar aloysius-pgast commented on May 27, 2024

If you check every 5min GET /exchanges/{exchangeId}/openOrders for a given pair (ex: GET /exchanges/binance/openOrders/?pairs=USDT-BTC), you will stay within the limits without problem (the gateway will rate-limit every request to comply with exchange limits but it's better to also limitrequest on your side).

And if you want to check the status of a particular order, you can use GET /exchanges/{exchangeId}/{orderNumber} (ex: GET /exchanges/binance}/orders/xxxxxx/?pairs=USDT-BTC where xxxxxx is the order number)

Hope you will manage to do what you're trying to achieve ;)

from crypto-exchanges-gateway.

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.