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
Binance WSS api url is being treated as HTTPS on both Google Chrome and Firefox
I am trying to run the following code from my chrome browser
import io from 'socket.io-client';
const socket = io('wss://stream.binance.com:9443');
socket.on('connect', () => {
console.log('binance [socket]…

Mukarram Ishaq
- 748
- 1
- 8
- 18
0
votes
2 answers
Starting a websocket in a function (Binance Websocket)
I have been working with binance websocket. Worked well if the start/stop command is in the main programm. Now I wanted to start and stop the socket through a GUI. So I placed the start/stop command in a function each. But it doesn't work. Just no…

TPlesch
- 1
- 1
0
votes
1 answer
NodeJS variable scope, functions and callbacks
i've a code like this:
var express = require('express');
var router = express.Router();
const Binance = require('node-binance-api');
const binance = new Binance().options({
APIKEY: 'APIKEY',
APISECRET: 'APISECRET',
useServerTime:…

Simon D.
- 30
- 5
0
votes
0 answers
How to change system time zone in a python program?
I'm running this Python code to get historical candlestick data from the Binance API:
from binance.client import Client
api_key = "my api key"
api_secret = "my secret key"
client = Client(api_key, api_secret)
klines =…

JÄGER
- 9
- 1
- 4
0
votes
1 answer
How to fix errors when running 'pip install python-binance'?
I ran the following command in cmd pip install python-binance and I got two Errors
ERROR: Command errored out with exit status 1: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio…

JÄGER
- 9
- 1
- 4
0
votes
0 answers
How to modify imported files in python
I'm slowly despairing of Python import module
-Cloned binance_f from github and installed with setup.py.
-Modification in files don't show up --> I searched and found:
import importlib
importlib.reload(module)
Then I get an error message:
>…

kevbo
- 3
- 2
0
votes
1 answer
TypeError: create_order() takes 1 positional argument but 2 were given
I am trying to place an order at Binance with the script below, but get this back:
TypeError: create_order() takes 1 positional argument but 2 were given
This is the script's code:
symbol = 'EOSUSDT'
TradeCoin = symbol
Decision = 'SIDE_BUY'
Assets…
0
votes
1 answer
Binance futures API to retrieve filled order as signal
i'm trying to get a live trade data feeds from binance futures via python. I'm able to send orders to binance but i would like to receive a signal if the orders been filled so i can set my stop loss, anyone can guide me in the right direction?
I've…

Crays
- 2,458
- 9
- 27
- 31
0
votes
2 answers
How to convert list into DataFrame in Python (Binance Futures API)
Using Binance Futures API I am trying to get a proper form of my position regarding cryptocurrencies.
Using the code
from binance_f import RequestClient
request_client = RequestClient(api_key= my_key, secret_key=my_secet_key)
result =…

alex337d
- 53
- 1
- 1
- 9
0
votes
0 answers
Can't send post request from code while curl command is working
I am trying to place order on Binance.
Did everything according to documentation LINK TO DOCUMENTATION
Code :
public void PlaceOrder(string baseCurrency, string quoteCurrency, OrderType orderType, decimal quantity, decimal price, OrderSubType…

Guga Todua
- 462
- 2
- 11
- 27
0
votes
2 answers
TradingView/Binance indicator's historical data
I wanted to get Binance indicator data for a specific date because they are calculating indicator's data for years ago and when I calculate EMA/MACD myself, it differs. Binance is using TradingView's charts.
Since I don't find an API that does that,…

nop
- 4,711
- 6
- 32
- 93
0
votes
0 answers
TypeError: stream_get_listen_key() missing 1 required positional argument: 'self'
I am trying to run 2 websockets at the same time using python-binance.
from binance.websockets import BinanceSocketManager
from binance.client import Client
client = Client('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
…

person
- 87
- 1
- 10
0
votes
0 answers
Finding previous candle doesn't work because of DateTime.AddSeconds
I'm using Binance.Net as a Binance API wrapper and recently I ran into a problem with DateTime.AddSeconds.
The following code is supposed to find the candle before the last order.
// OpenTime and CloseTime are both DateTime
var openTime =…

nop
- 4,711
- 6
- 32
- 93
0
votes
1 answer
The request couldn't be satisfied response on GET request
I am trying to get binance account information using binance api.
I have a secret key and an api key.
curl
curl -H "X-MBX-APIKEY: apikeygoeshere" -X GET https://api.binance.com/api/v3/account -d timestamp=1578926101
…

Guga Todua
- 462
- 2
- 11
- 27
0
votes
0 answers
Splitting balance to 50/50 in Binance.Net for specific crypto pair
First of all, I'm using Binance.Net as a Binance API wrapper. At first point, I was struggling to get my balance for the base and quote assets for a crypto pair.
Let's say we're talking about BTCUSDT. I had a problem in obtaining BTC and USDT,…

nop
- 4,711
- 6
- 32
- 93