1,027 questions
-2
votes
1
answer
22
views
Nodejs Binance ws message const { WebsocketClient } = require('binance');
i am using Binance nodejs api and websocket but i get all the time the message
'Completed keep alive cycle for listenKey(TZbi36E773J4pVkD8ZacgrnAhQ9YlvR82q50lw6z9Nno89WIni8K0d65xXfE) in market(spot)...
-1
votes
0
answers
56
views
Stuck with Binance Start user data stream (USER_STREAM)
I produced this minimal example to get the listenKey
#include <iostream>
#include <string>
#include <curl/curl.h>
// Callback function to handle the response
size_t write_callback(...
0
votes
0
answers
46
views
Getting unusual delay from Binance web socket
function forceTerminate(){
forceTerm = setTimeout(() => {
ws.terminate();
isClosing = true;
}, 30000);
}
async function buyTicker(selectedToken){
if(!selectedToken){
...
0
votes
1
answer
20
views
{"status":"FAIL","code":"400002","errorMessage":"Signature for this request is not valid."} for endpoint binancepay/openapi/v2/order/query
this is the error i got while i try to check the status of a order i create using /binancepay/openapi/v3/order. For order creation i use the same method for generating signature and it works but while ...
0
votes
0
answers
68
views
solving captcha with 2captcha against GeeTest Captcha binance
I've seen a few topics relating to this, none of which helped.
I'm trying to make a trading bot, but I can't seem to get past the first page, I've made the needed 2captcha deposits, and now I'm stuck.
...
0
votes
1
answer
84
views
Any way to use proxy in pybit?
I want to use proxy server before sending request directly to py-bit. I am using
pybit.unified_trading --> HTTP and it doesn’t come with any such params to connect with proxy.
This is my ...
0
votes
0
answers
106
views
Fix Protocol quickfix c++: RawData (tag 96) requires base64 encoded signature. Works when I implement it in python but not in c++
I am trying to implement the quickfix library on the binance FIX API. https://developers.binance.com/docs/binance-spot-api-docs/testnet/fix-api. I am able to successfully get a logon response by ...
2
votes
0
answers
78
views
Withdrawal Amount Binance Spot trading API
I am facing an issue when calling the withdraw API or using it through the SDK. The problem is that when I try to withdraw funds, it withdraws a smaller amount than expected and leaves the remaining ...
-1
votes
1
answer
76
views
Binance tr api invalid api-key
I use binance tr api; i want to make buy order.
But i get this error:
data: { code: 3700, msg: 'Invalid API-key', timestamp: 1733491789482 }
İf i use this , works:
var apikey="...
0
votes
0
answers
37
views
Can't close margin postion with Binance API
Here example of closing position on isolated margin account but it's no working. Please help to CLOSE opened margin positions and repay margin loan. Can't find correct example of closing margin(no ...
0
votes
0
answers
40
views
OAuth2 Integration with Binance
I am reaching out regarding an issue we are facing while trying to implement OAuth2 with Binance. Our platform supports multiple environments: web, desktop, and mobile applications.
While OAuth works ...
0
votes
0
answers
34
views
Configure binance nodejs for binance tr api
I want to use binance tr api ; so i want to configure https://github.com/tiagosiebler/binance
this for binance tr api.
I changed links but not work.
Like this ( in binance/src/util
/requestUtils.ts) :...
0
votes
0
answers
31
views
API Binance API-key invalid
Hi I've been trying to make a connection to the Binance API. However, I present this error
{"code":-2014,"msg":"API-key format invalid."}
I don't know why. I'm using the ...
-2
votes
1
answer
234
views
Python-binance and asyncio
I'm trying to get some data from Binance (using python-binance package). My very simple code:
import asyncio
from binance.client import AsyncClient
async def get_data(client):
res = await client....
0
votes
0
answers
137
views
How do I calculate the minimum amount when placing an order on binance futures testnet-api using ccxt?
I see that on testnet interface from binance you are not allowed to place any price you want. It has specific values for each symbol. For example BTC/USDT has the min value of 0.002.
Can anyone ...
1
vote
1
answer
224
views
How to access API data for lead traders on Binance (Copy Trading)?
I'm currently working on a project that involves analyzing and predicting trades from leading traders on Binance's copy trading platform. However, I’ve noticed that Binance’s public APIs don’t seem to ...
0
votes
0
answers
71
views
Binance Futures Websocket doesn't push informations
So my code is split among different scripts. The title of the scripts should be self explanatory.
import threading
import socket
from strategies import detect_significant_changes
from ...
-1
votes
1
answer
87
views
Boost::Beast websocket client does not send Pong response
I'm developing a websocket clent listening for Binance market data stream to read a quotes. I'm using Boost::Beast websocket for this purpose. The connection uses SSL. My problem is that my client ...
1
vote
2
answers
488
views
Binance - Spot Market Profit Calculator
I have a Python method that calculates the profit after taking into account the commission structure. However, it fails to replicate the exact values from Binance trade history. For example I bought ...
-1
votes
1
answer
254
views
How to create a Stop Market order in Binance Futures API
I am trying to use the Binance API to create a stop market order like its done in the Web Application but I keep running into problems. The few times the code goes through, it only creates the first ...
2
votes
0
answers
98
views
Authorize_and_exchange_code failed error invalid_client Binance OAuth with Flutter
I’m working on integrating Binance OAuth authentication into my Flutter application but encountering a configuration issue
const String discoveryURL = 'https://accounts.binance.com/.well-known/openid-...
0
votes
1
answer
224
views
Binance trailing stop loss does not wrok when it's a buy margin order
I use create_order() from python-binance.readthedocs.io as such in the spot account for the SIDE_SELL:
`order = client.create_order(
symbol=ticker,
side=SIDE_SELL,
...
1
vote
1
answer
1k
views
How to automate tradingview.com with binance to automaticly buy and sell based on indicator
I want to automate buying and selling on tradingview.com based on loaded indicator.
I have connected tradingview.com with binance.
I want to trade BTCUSDT.
I have loaded UT Bot Alerts indicator into ...
2
votes
0
answers
111
views
How to Adjust Open Position Size via Binance API Without Closing Position (Using Python)?
I'm currently working on integrating Binance API into our trading bots using Python and need some help with managing open positions. Specifically, I'm looking to understand how to increase or decrease ...
0
votes
1
answer
609
views
Websocket data processing speed (binance api, order book)
I have been working on an websocket connection for some time and encountered large latency and overflow problems with my processing.
My current architecture is 2 processes:
websocket connection and ...
-1
votes
1
answer
397
views
What does 'precision' exactly mean in the binance api?
I am using python ccxt to place a sell order on binance.
order = exchange.create_order(symbol, 'market', 'sell', amount)
I have fetched the required precision, and got 5.
markets = exchange....
-2
votes
1
answer
704
views
Binance futures testnet data differs from read binance futures data
I am new to binance api and now I am using binance futures testnet. I’ve noticed that the data that testnet shows differs from the real futures data.
Testnet data:
Real data:
Additionally testnet ...
-1
votes
1
answer
225
views
binance webhook signal conflict
// Uzun giriş
if (longEntry and canOpenLong)
strategy.close("Short")
strategy.entry("Long", strategy.long)
canOpenLong := false
canOpenShort := true
// Kısa ...
2
votes
0
answers
45
views
How can I except "Event loop is closed" error?
I am using python for Binance future transactions.
The problem is that the program keeps stopping running with an error message "Event loop is closed."
I have tried different solutions which ...
0
votes
2
answers
194
views
ERROR API Binance convert limit placeOrder
I'm trying to make a limit order of convert using binance api. The Postman doc tell us that should be pass as parameter in the POST like we do with user_saldo that works just fine.
The error returned ...
-1
votes
1
answer
416
views
Binance. Error -1102, Mandatory parameter 'signature' was not sent, was empty/null, or malformed
I'm creating a bot at binance that buy and sell crypto this is just part of the code that creates new order but is giving error in signature, and i think the binance buy a cripto and pay the taxes ...
-1
votes
1
answer
53
views
crypto bot quantity - amount
I started coding a crypto bot via python, I am using binance(API) to trade.
from binance python library, I found this draft
order = client.order_market_buy(
symbol='BNBBTC',
quantity=100)
...
0
votes
0
answers
32
views
Findinf data for Binance USDT-M trading commissions on my orders with Binance API
I do my work using Binance NPM with NodeJS.
When I open a long or short market order, how can I find out how much commission is charged for that order?
Also, how can I access the commissions for the ...
-1
votes
1
answer
62
views
frontend not displaying data emitted from socketio in real-time
my websockets app sends data fom the backend to the frontend. but it only updates whenever i refesh the page ,not real-time . I want the updating to be real time
my websockets app sends data fom the ...
0
votes
0
answers
143
views
Binance API [Python] How do I get positions in Binance using Binance Connector API?
I already read the examples and can't find anything. I know I have open positions in Binance, but for some reason it doesn't output in the terminal when I try to run it.
Current code :
#!/usr/bin/env ...
0
votes
0
answers
502
views
binance websocket @openInterest
Does anybody know how to properly connect to Binance's @openInterest websocket?
There's no problem of getting data from a stream '@kline_1m', but '@openInterest' is still a problem.
I tried different ...
3
votes
1
answer
283
views
Calculate binance ATR in python with binance connector
I'm using the binance connector API in python (https://binance-connector.readthedocs.io/en/latest/getting_started.html) and I want to build a function that computes the ATR of the previous candle (not ...
0
votes
1
answer
426
views
CCXT Take Profit and Stop Loss Error for a Pending Limit Order
I would like to edit a pending order for the inputs of take profit and stoploss (as far as I know it is not possible to perform placing order + take profit + stop loss together with a single command) ...
0
votes
0
answers
428
views
Rounding prices and quantities for limit orders on Binance
When creating a limit order on Binance, especially while adding take profit/stop loss percentages or calculating quantity, it's mandatory to round the price and quantity based on the filters available ...
0
votes
1
answer
236
views
Async function working in .ipynb not working in .py
so i am trying to build a script which streams BTC data using Binance's API, similar to this. The issue however is that, when testing in an .ipynb cell, the following code works perfectly:
import ...
1
vote
2
answers
553
views
How to place a bracket order on Binance through API?
Let's assume that I have buy_price, given I want to buy x quantity of that coin.
If the buy order is executed I want to execute a OCO order which would ensure to take profit on a certain price that ...
-3
votes
1
answer
71
views
python array dictionary inside dictionary [closed]
I have python dictionary the code:
{'code': 200,
'msg': '',
'snapshotVos': [{'data': {'balances': [{'asset': 'ADD',
'free': '10',
...
0
votes
1
answer
220
views
When i connect binance websocket in nodejs gived error. How i can fix this
const WebSocket = require('ws');
const ws = new WebSocket('wss://stream.binance.com:9443/ws/btcusdt@trade');
ws.on('message', function incoming(data) {
console.log(data);
});
this is my code ...
0
votes
1
answer
339
views
binance API connection issue on linux error APIError(code=-2015)
This is very puzzling to me but I am sure there is a simple explanation still as I exhausted all the reasonable ones that I can think off.
I have a python Binance trading script. I have my home public ...
1
vote
0
answers
98
views
Issue Adding New Order on Binance Spot Test Network using PHP
I am facing an issue when attempting to add a new order on the Binance Spot Test Network using PHP. The API request seems to be successful, and I receive a “NEW” in status, but don't find order in ...
0
votes
1
answer
1k
views
Binance API take profit and stop loss with limit orders
I have been trying to place the orders on Binance using API in Python.
What works is below. Below is my initial order for buy when the price hits.
response = client.new_order(
symbol="...
1
vote
1
answer
5k
views
pip/pipx installation and adding path
I run Debian stable on my box and I want to install the binance connector library
https://github.com/binance/binance-connector-python
to query binance.
I use pipx and everything seems to be OK (see ...
1
vote
0
answers
287
views
Binance websocket stream over a proxy problem
I tried using different private proxies from multiple proxy seller companies to fetch the Binance websocket stream "wss://stream.binance.com:9443"
But I got websocket._exceptions....
0
votes
0
answers
614
views
Getting real time data for a set of symbols from BINANCE API
I'm trying to retrieve the latest information about a set of Binance symbols every, say, 15 seconds, using the binance-connector-python library.
For example: pairs=['BTCUSDT','ETHUSDT',...]
I can do ...
0
votes
0
answers
176
views
the prices I fetched with binance API are not correct
I'm fetching the prices for arbitrage but some of the prices seem correct, some are incorrect. i tried more than 20 ways but cant fix it.
last_data = [["ETHBTC", "BTCPAX", "...