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
0
votes
1 answer
How do i get the orderId of an order with python-binance?
I have recently started looking at python-binance. I have read through the entire API and spent a frustratingly long time on Google, trying to find out how to get an orderId.
The API frequently states that you need the orderId for certain functions,…

Hoodiedoodie
- 1
- 1
- 1
0
votes
1 answer
How do I get only the balance values as outputs from request_client.get_balance() function of Binance api?
I just want to get the value of the balances as an output. I tried using '''json.loads''' but it gives me and error.
Code
request_client = RequestClient(api_key=API_KEY, secret_key=API_SECRET,
url='https://fapi.binance.com')
result =…

Jacques Buys
- 53
- 1
- 6
0
votes
4 answers
Python Error: get_exchange_info() takes 1 positional argument but 2 were given
Getting error "TypeError: get_exchange_info() takes 1 positional argument but 2 were given"
reference: https://python-binance.readthedocs.io/en/latest/general.html#id5
from binance.client import Client
import config
client =…

Rishabh Singhal
- 11
- 2
0
votes
1 answer
Why do the strings received by my web socket keep becoming undefined (nodejs)?
I'm trying to get rid of the double quotes around the trading pair symbols I receive from a binance websocket. It sends real-time best bid and ask prices for all trading pairs on the platform. This means that it is recieving a lot of payloads very…
0
votes
2 answers
Collection was modified error while processing data from socket stream
I'm trying to capture tick level data from a Binance Aggregated data stream. As soon as the date changes, a function processes the data from the previous day. I'm using Task.Run to create another thread as new data for the current day is still…

sleepymatto
- 97
- 1
- 8
0
votes
2 answers
Split values separated by commas into variables in Python
I'm trying to get variables of a live trading order book using the 'python-binance' library.
depth = client.get_order_book(symbol='BTCUSDT')
print(depth)
This is the result.
'bids': [['34657.70000000', '0.57150000'], ['34655.76000000',…

Delacroix
- 49
- 1
- 8
0
votes
1 answer
Binance - msg: 'Signature for this request is not valid.'
I've been trying to make an API request to the Binance using NodeJs API as per this documentation but I keep getting the following response and I don't know why.
[Object: null prototype] {
code: -1022,
msg: 'Signature for this request is not…

user1704524
- 427
- 3
- 15
- 40
0
votes
0 answers
Power Query/Excel: import data from API with api & secret keys
I would like to import Binance.com account data via API. This is the API URL, which asks for API-key, when opened in browser: https://fapi.binance.com/fapi/v2/balance
This is the code that I try using in Excel's Power Query:
let
apiUrl =…

CamSpy
- 401
- 2
- 15
- 26
0
votes
1 answer
Binance - Mandatory parameter 'type' was not sent, was empty/null, or malformed
I am trying to make a request to the Binance API using the universal transfer call that requires 3 params: "asset", "value" and "type". However, when I make the call with the required params I get the following response:
{
code: -1102,
msg:…

user1704524
- 427
- 3
- 15
- 40
0
votes
0 answers
Order market buy and sell not shown on binance SPOT transaction history
I m trying to use you this python binance to buy and sell crypto currency.
Currently i have more than enough balance to place BTCUSDT trade of buy or sell in my account. I have written a simple script to buy crypto first and then after some delay…

kumar saurav
- 11
- 5
0
votes
1 answer
exponential moving average(ema) differs from binance
I am calculating ema with python on binance (BTC Futures) monthly open price data(20/12~21/01).
ema2 gives 25872.82333 on the second month like below.
df = pd.Series([19722.09, 28948.19])
ema2 = df.ewm(span=2,adjust=False).mean()
ema2
0 …

tompal18
- 1,164
- 2
- 21
- 39
0
votes
0 answers
Binance api HMAC SHA256 using Ruby
I am trying to connect to Binance api from my Rails application. But every time I am getting 401 unauthorized error message from Binance. Below is my code.
class Binance
END_POINT = 'https://api.binance.com'.freeze
KEY = 'my-binance-key'
…

r3b00t
- 6,953
- 6
- 27
- 37
0
votes
0 answers
How can I post an order by API
I wrote a sample code to test Binance Api :
var apiClient = new ApiClient("API-Key", "API-Secret");
var binanceClient = new BinanceClient(apiClient);
But program hangs when run the below method :
var buyOrder =…

Mehrdad
- 1
0
votes
0 answers
Use of Websockets on Binance produces intermittent results
I am looking for a way to monitor the status of an order in Binance.
I was following the instructions here:
https://readthedocs.org/projects/python-binance/downloads/pdf/latest/
I have used the following :
#conn_key =…

Casey Harrils
- 2,793
- 12
- 52
- 93
0
votes
1 answer
Channel edit topic in a loop, strange acting
today i'm struggling to edit a discord channel topic in a loop. By that I mean that it sometimes works sometimes don't, and it gets really strange. The code :
@tasks.loop(seconds=5)
async def prixcrypto():
channel =…

tro chic
- 3
- 2