Comments (10)
Thanks for the video.
Using 3.9.2 I can reproduce it. Please, consider the possibility of downgrading to 3.8 where this issue does not exist.
I'll try to find a solution.
from bitfinex-api-py.
@Bwahharharrr I removed nest_asyncio and found another way.
Can you please give a look? Your example looks good on my end.
https://github.com/bitfinexcom/bitfinex-api-py/pull/180/files
from bitfinex-api-py.
@itsdeka Run on my system and the test did indeed subscribe to the 4 tickers opening up 2 separate channels, so that much looks good.
I'll update my end in the next few days and continue using and report back any further related issues but so far looks like good job
from bitfinex-api-py.
Can you confirm @itsdeka ?
from bitfinex-api-py.
Hello @Bwahharharrr, sorry for the late reply.
I have tried to run your code with websockets 10.0, 9.1 and 8.1 and I have never seen the error described.
Which version of Python are you using? All the other dependencies are as specified in requirementx.txt?
from bitfinex-api-py.
Hi @itsdeka - python version 3.9.2, i just reproduced the test again on an entirely new virtual machine, you can see the log here:
https://asciinema.org/a/LXh9tL4Fgo1z8G26GfLQlocuw
from bitfinex-api-py.
Keen to upgrade rather than downgrade;
I just tested on 3.9.9, same issue/error.
- Can confirm it does work on 3.8.0
from bitfinex-api-py.
@Bwahharharrr hello, I found a solution to support Py >= 3.9.
Please I'd appreciate if you could confirm that everything works as expected on your end with these changes (#180).
from bitfinex-api-py.
@itsdeka I have run the marketorders branch from your repo with the asyncio_nest
code in, which having used before, I thought, 'yes, this will work running this new even loop inside the existing one', however. The code failed to execute properly, and here is why:
As per the original code example provided: It attempts to subscribe to 4 tickers, opening up 2 websockets.
After this nest_asyncio
fix, the 2nd websocket connection is at least opening, which is an improvement. HOWEVER.. It never subscribes to the channels.
Python 3.9.2
websockets 9.1
asyncio 3.4.3
nest-asyncio 1.5.1
import os
import sys
from bfxapi import Client, Order
bfx = Client(ws_capacity=3)
tickers = ['tBTCUSD','tETHUSD','tSOLUSD','tLTCUSD']
@bfx.ws.on('connected')
async def blah():
for t in tickers:
await bfx.ws.subscribe_trades(t)
@bfx.ws.on('subscribed')
async def subscribed(data):
print(f"Subscribed to {data.channel_name}, {data.symbol}")
@bfx.ws.on('new_trade')
def log_trade(trade):
print ("New trade: {}".format(trade))
bfx.ws.run()
from bitfinex-api-py.
Great, thanks for your feedback.
I am on it.
from bitfinex-api-py.
Related Issues (20)
- How to get funding earnings? HOT 6
- Data not matching (BTCUSD) HOT 3
- Error running subscribe_trades_candles.py example. HOT 4
- misleading documentation HOT 1
- 'Fatal error on SSL protocol' when use uvloop
- API is missing candle data HOT 4
- Rest API missing Liquidations implementation HOT 2
- Python 3.10 Support HOT 2
- bitfinex-api-py/bfxapi/rest/ public stats data HOT 2
- Unable to create order on paper account: [ERROR] Notification ERROR: action: disabled HOT 1
- Not working with python3.10 asyncio HOT 2
- Unknown data event: '[0.79816, 0, 1]' [54, [0.79816, 0, 1]] HOT 1
- How to get more data in public orderbook? HOT 1
- New pyee version
- Candle data from wss is delayed behind rest HOT 1
- bfx.rest.auth.cancel_order_multi HOT 1
- Failing "import bfxapi" HOT 2
- How come I can't call this endpoint: get_derivatives_status_history
- Starting from version 3.0.0b3, the meta parameter is no longer present in the submit_order function. HOT 1
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 bitfinex-api-py.