Comments (4)
I have thought about a LIFO
queue as well, however, at this point the library is intentionally rather bare bones. It would technically be no problem to implement this yourself - simply call get()
on the Queue and fill it into a deque
which then allows you to keep a history of the past X ticks of ticker data.
from btfxwss.
Such approach would cause the memory error because you need to do something with the rest part of messages in queue (not only with the last one)
In other words, you need to consume all messages from subscribed channel.
I think, LIFO could help if only the fixed size of queues will be implemented. Before it's done, you can just do the while loop through all messages in queue and get only the last one
from btfxwss.
Yeah, that's what I did. The loop is not a problem.
[ticker_q.get() for _ in range(ticker_q.qsize())][-N:]
The fixed size is necessary indeed, this implementation seems to be useful to client programmers that need the N most recent tickers.
from btfxwss.
With the introduction of zmq
in the next release and the deprecation of the current client interface, this issue is no longer relevant.
from btfxwss.
Related Issues (20)
- Timeout settings? HOT 1
- Websocket configuration is not restored during reconnect HOT 1
- pip install not newest version HOT 1
- after running for hours the timeout become much HOT 1
- Connection Issue HOT 2
- A proper handling of a Bitfinex-initiated connection closing
- how to reconnect properly HOT 3
- ORDER RELATED API HOT 1
- SUBSCRIPTION TO DATA HOT 1
- authenticated channels HOT 4
- New websocket-client release breaking code HOT 1
- client_tests don't work HOT 8
- problems with reconection HOT 3
- Pypi version 1.2.2 breaks `raise_exception` HOT 3
- websockets reconnecting constantly? HOT 2
- the auth_nonce problem
- fail to run client.py ,help HOT 2
- not responding sometimes
- Upcoming Bitfinex API Update June 2019
- Account channel not updated
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 btfxwss.