Questions tagged [binance-api-client]
278 questions
10
votes
4 answers
Error in heroku [regex._regex_core.error: bad escape \d at position 7] when using python-binance
I tried to upload my python code (Binance trade-bot) on Heroku, but there is an error oссured. Could someone help me, please?
from binance.client import Client
from datetime import datetime
client = Client(api,key)
symbol = 'IOSTUSDT'
for i in…

An Ri
- 406
- 5
- 13
9
votes
6 answers
Binance order: Timestamp for this request was 1000ms ahead of the server's time
I am writing some Python code to create an order with the Binance API:
from binance.client import Client
client = Client(API_KEY, SECRET_KEY)
client.create_order(symbol='BTCUSDT',
recvWindow=59999, #The value can't be greater…

Barry
- 185
- 1
- 3
- 10
9
votes
2 answers
Binance API list all symbols with their names from a public endpoint
I've integrated the Binance API in my project to show a list of all supported symbols and their corresponding icon. However, I'm unable to fetch the symbols name/description.
For instance, I can fetch BTC-EUR, but I can't fetch 'Bitcoin' or similar…

TVA van Hesteren
- 1,031
- 3
- 20
- 47
8
votes
1 answer
How to get the order book list with Binance API?
I would like to get the same information (opened orders) as displayed in order book on Binance site here:
I tried:
/api/v3/allOrders -- this apparently shows all MY orders
api/v3/openOrders -- this apparently shows opened MY…

Dims
- 47,675
- 117
- 331
- 600
7
votes
2 answers
How to connect to User Data Stream Binance?
I need to listen to User Data Stream, whenever there's an Order Event - order execution, cancelation, and so on - I'd like to be able to listen to those events and create notifications.
So I got my "listenKey" and I'm not sure if it was done the…

Cassano
- 253
- 5
- 36
6
votes
1 answer
What is RAW_REQUESTS in Binance API rate limit
The /api/v3/exchangeInfo returns the following rate limits
Binance documentation says:
Endpoints related to /api/*:
According to the two modes of IP and UID (account) limit, each are independent.
Endpoints share the 1200 per minute limit based on…

Jeffrey Chen
- 1,777
- 1
- 18
- 29
5
votes
2 answers
python - ThreadedWebsocketManager - task exception was never retrieved
I'm trying to run the following code from tutorial that I found on jupyter notebook:
from time import sleep
from binance import ThreadedWebsocketManager
btc_price = {'error':False}
def btc_trade_history(msg):
if (msg['e'] != 'error'):
…

Сергей Оненко
- 51
- 3
5
votes
0 answers
Generate new deposit address in Binance
We want to create a crypto exchange website by using Binance API for sending and receiving crypto assets. But the problem is that we cannot generate unique addresses per user per coin and all the users are sending theirs assets into the same deposit…

Sepehr
- 59
- 1
- 3
5
votes
1 answer
How can I get trade buy/sell data of Binance?
I want to get real time trade buy/sell data of BTC via binance websocket.
I use this method in following websocket module:
URL:…

komandap
- 87
- 2
- 7
4
votes
2 answers
Binance API: How do I get the quantity precision of a futures asset?
I want to get the price precision of any futures asset.
What I tried:
client.get_symbol_info(symbol='My Symbol')
But this returns the precision of the Spot and I need the precision of the futures.
So theres this…

avr_dude
- 41
- 1
- 2
4
votes
7 answers
Binance API: APIError(code=-1111): Precision is over the maximum defined for this asset. || Python
I have a trading bot which operates in 'ADAUSDT' with dynamic quantities for buying and selling, being my whole USDT balance the initial quantity, and trading with that same balance + profits or losses (it basically trades and keeps trading with the…

Johann Diethelm
- 43
- 1
- 1
- 4
3
votes
1 answer
Find all coins available for Futures trading from binance
I want to get a list of all the coins available for futures trading for Binance. Originally I found a website and just put the coins in an array, but then I came accross this function:
exchange_info = client.get_exchange_info()
So one element in…

Chud37
- 4,907
- 13
- 64
- 116
3
votes
2 answers
how to cancel stop loss and take profit order when position close on binance futures with rest api
I'm using Binance futures rest API for algorithmic trading. after creating a buy or sell order, I'm also creating "take profit" and "stop-loss" orders, when I look at the Binance app. it looks like regular SL/TP orders but when I close positions…

Baris
- 445
- 2
- 10
- 22
3
votes
3 answers
Running two python file at the same time in visual studio code
i have two files, and i want to run both. The first one is basically asking down the prices of stocks and writes them to a database, and the second one using python dash to create a webpage. This webpage is showing the data in real time from the…

Balázs Patai
- 105
- 1
- 9
3
votes
2 answers
Binance API in python APIError(code=-1121): Invalid symbol
I am trying to code a binance Buy function. However the code
from binance.enums import *
order = client.create_order(symbol='DOGEUSDT', side = 'BUY', type = 'MARKET', quantity = 475, timeInForce='GTC')
this code outputs > APIError(code=-1121):…

Err0rBlade
- 55
- 8