Comments (3)
There is guidance on this topic in the Implementation Guide. There's no way to (un)subscribe to/from order books in the Event Stream; you're always subscribed to all of them.
Note that the Event Stream will not give you an initial snapshot of the order books. It only provides incremental updates. I'd recommend to connect to the Event Stream first and begin applying the incremental updates to your (initially empty) view, and then subsequently request a snapshot of the order book and merge it into your (possibly nonempty) view. Note that the snapshot could be lagging the stream, so you would want to remember any stream events that didn't match with any order already in your view before you merged the snapshot and replay those events into your view after you merged the snapshot. If done correctly, you'll have a perfectly consistent view of the order book that you can maintain indefinitely.
This is considerably simpler to implement if you use the WebSocket API, which allows you to subscribe to an order book and capture a snapshot of it in one atomic operation.
from api.
Thanks @whitslack thats very helpful.
I took a look at the example WS code but struggled to understand it. However, I saw the feed in my browsers networking output and figured out what to do, almost.
I can see how to subscribe to the order book feed, but the parameters are confusing. What are the magic numbers for base and counter? And what is tag? And what is watch?
And how do I unsubscribe from a feed?
from api.
Coinfloor's WebSocket API is documented here. You are specifically asking about the WatchOrders
command, which is covered in this section.
The asset codes are enumerated here.
from api.
Related Issues (20)
- Are all quantities and prices transmitted and received as integers with implicit scale factors? HOT 17
- How do I get my BCH account balance? HOT 2
- why does the balance query take two currencies in the url? HOT 3
- date header HOT 4
- fees? HOT 2
- minimum order sizes HOT 7
- Possible flaw in authentication process HOT 2
- BTC Withdrawals HOT 3
- Order IDs from market trades HOT 9
- Can we have some rest API improvements? HOT 1
- Please reintroduce delisted markets HOT 4
- please added metadata endpoint
- Rest API open orders is unclear
- websocket order book behaviour
- websocket orderbook events look wrong HOT 3
- Implement Github Pages
- Create a Postman Template for the Community
- trades between dates HOT 3
- ws auth HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.