Binance is a cryptocurrency exchange website. This tag is for questions related to the Binance API and usage of Binance API wrappers. This tag is not specific to any programming language.
Questions tagged [binance]
1009 questions
-1
votes
3 answers
Average Calculation not Working Well, Result is always NaN
i was trying to do a calculation to find the average of the price from the array but i seem to be getting NaN, How do i solve it ?
var array = [ ];
var sum = 0;
setInterval (function() {
…

Damian
- 1
- 3
-1
votes
1 answer
my python3.10 on anaconda mac can't install python-binance
My anaconda base(root) is using python3.9, I want a new version, so I installed a new virtual environment with python3.10. Then I use"conda install -c conda-forge python-binance" to get the python-binance, but get error like below.
conda install -c…
-1
votes
1 answer
Binance is there a way to sell the small balances in python?
I am trying to use the binance api and would like to use dust to bnb conversion?
We can do this on the binance website and I would like to automate this
I searched the binance api but couldn't find anything.
Thanks for yours answers!

guiguilecodeur
- 429
- 2
- 15
-1
votes
1 answer
How to define an async client for the whole class?
Hi I can define async client object only one time - one connection to server and then working with it, but I coudn't undestand how to define this client global for class. I just guessed to create a new connection before each use, but of course that…

Lechko Faray
- 1
- 1
-1
votes
1 answer
I'm having trouble importing ThreadedWebsocketManager in Python
I trying to import the Binance library :
from binance.streams import ThreadedWebscocketManager
and received this error:
Message=cannot import name 'ThreadedWebscocketManager' from
'binance.streams'
Does anyone have a fix for this error?

AlexiBoxi
- 13
- 1
-1
votes
1 answer
why is my code to get messages from binance stream through websocket not responding?
I'm trying to create a trading bot for binance. this lines of code to read messages from binance stream through websocket client is not responding at all and no error appeared
import websocket
SOCKET =…
-1
votes
1 answer
Running a function inside Websocket triggers many times
I've been trying to take advantage of the Binance Websocket to trigger buys and sells based on the live price with my own logic. I know the WebSocket is sending back live data and there might be even 5-6 or more responses at the same time, but how…

Marian Petrisor
- 262
- 2
- 19
-1
votes
1 answer
Binance API get_aggregate_trades combination of optional parameters inavild
I'd like to request aggregated trade data beginning at a certain timestamp until now
client.get_aggregate_trades(symbol = 'EURBUSD', startTime = 165605516493)
but i only get an Error:
File "c:\Users\Pascal\Python Skripts\Binance\test.py", line 39,…

PyNoob
- 9
- 3
-1
votes
1 answer
How to get first P2P price from Binance to google sheets
I'm trying to get first price from https://p2p.binance.com/ru/trade/all-payments/USDT?fiat=UZS
to Google Sheets.
I tried to…

Роберт Гумеров
- 9
- 3
-1
votes
1 answer
Printing Response from Binance Order
How do I print the response from an order like below?
order = client.order_limit_buy(
symbol='ADABUSD',
quantity=buy_quantity,
price=price,
newOrderRespType = 'ACK'
)
I wish to get the orderId from it so I can…

Zak Pinter
- 21
- 5
-1
votes
1 answer
python_binance websocket : How I can handle this error with web socket?
from binance.client import Client
from binance import ThreadedWebsocketManager
import pandas as pd
my_api = ""
my_secret = ""
client = Client(api_key=my_api, api_secret=my_secret, tld="com", testnet=True)
twm =…

Kyungyun Lee
- 115
- 9
-1
votes
2 answers
Binance Websocket API stuck on OPEN MESSAGE
I have this...
import websocket
SOCKET = "wss://stream.binance.com:9443/ws/ADABUSB@nav_kline_1m"
def on_open(ws):
print('opened connection')
def on_close(ws):
print('close connection')
def on_message(ws, message):
print('received…

Zak Pinter
- 21
- 5
-1
votes
1 answer
TypeError: 'NoneType' object is not subscriptable: JSON file
I am very unexperienced with Python but I managed to build a full code for what I need.
However, what I believe to be my now last step is to solve this issue i am having with the following message:
TypeError: 'NoneType' object is not…

HaloBoySCP
- 17
- 2
-1
votes
1 answer
APIError(code=-2015): Invalid API-key, IP, or permissions for action for Withdrawal using Binance
def withdraw():
try:
# name parameter will be set to the asset value by the client if not passed
result = client.withdraw(
coin='TRX',
address='',
amount=100)
print(result)
except…

Pooja Gupta
- 31
- 7
-1
votes
1 answer
Use One TradingView Strategy for Multiple Coins connected to Bot
I'm a newbie for TradingView and have been learning a lot. I'm developing a strategy with backtesting using pine-script language however what confusing me, is how to use the same strategy for multiple coins.
The strategy is mainly developed for…

David Buik
- 522
- 1
- 8
- 31