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 can a crypto be transfered from a wallet to another, through an other blockchain than it's own?
let me just clarify my question with an example:
Let's say you want to transfer 1 eth from an account A to an account B, both on the binance exchange.
When A goes to "Withdrawal" on his eth on binance to send his eth to B there is two options…

raphael
- 1
0
votes
0 answers
Accessing key value in JSON response in python while loop
I'm trying to cancel an order on binance if another order has been filled.
The connection is websocket with unicorn library
In the while loop the listener waits for the response of a filled order
I'm trying to check for the order type which was…

mmxxst7
- 1
- 1
0
votes
1 answer
Get data from list of API response
price_list = [{'symbol': 'ETHBTC', 'lastPrice': '0.03574700'}, {'symbol': 'BTCUSDT', 'lastPrice': '57621.08000000'}]
print(price_list[1]['lastPrice']) # index = 1 for BTCUSDT, print 57621.08000000 => OK.
I need to get lastPrice for…

akkapolk
- 554
- 8
- 33
0
votes
1 answer
Websocket dont recieve messages with Python
I'm trying to connect to the binance futures websocket, but I can't get it to work. Here its the link to the api:
https://binance-docs.github.io/apidocs/futures/en/#continuous-contract-kline-candlestick-streams
my code:
SOCKET =…

Andrés Peláez
- 3
- 1
- 3
0
votes
1 answer
Pine script setting timestamp for last quarter not working
I wrote a simple strategy in pine scrip, which is based on crossover/crossunder for two different SMAs.
It is important for me to test my strategy in some time frames, especially in the last quarter. It doesn't work. I got only a few results. I…

Czarek
- 3
- 3
0
votes
0 answers
How can you close all futures positions using Binance API in JavaScript?
Let's say I opened long positions by using:
await binance.futuresMarketBuy('BTCUSDT', 1);
await binance.futuresMarketBuy('BNBUSDT', 1);
And then I try to close my positions by using:
await binance.futuresMarketSell('BTCUSDT', 1);
await…

Psi
- 70
- 9
0
votes
2 answers
How to import binance-java-api into an Android Studio project
I have problems to import the binance-java-api library into my android studio project.
I tried this :
implementation 'com.github.binance-exchange:binance-java-api:1.0.0'
Gradle sync seems to work but none of the lib import are recognized when I…

System_err
- 3
- 1
- 4
0
votes
1 answer
How can I line up alerts and order placement?
I have coded a strategy in Pinescript on TradingView and created an alert when strategy.entry meets its conditions, my question now is, sometimes the alert triggers on the strategy.entry while the strategy.entry doesn't execute an order.
For…
0
votes
1 answer
Error while connecting to Binance websocket
I'm trying to connect to the Binance stream but when I run the code it outputs: "closed connection". What can I do to join the stream?
import websocket
import json
socket = 'wss://fstream.binance.com/ws'
def on_open(ws):
subscribe_message =…

Adrian francisco
- 11
- 1
0
votes
1 answer
How can i make my method return a callback?
Im trying to code for an trading bot using the java binance api.
what i`d like to do is use to async client from the library to create a method to fetch data/candlesticks and then return it.
My problem is that the async client returns the response…

bakbeest
- 3
- 1
0
votes
2 answers
Flutter binance api signature
I'm using the following code to get the binance api signature, but it doesn't work!! can any one help!
int timeStamp = DateTime.now().millisecondsSinceEpoch;
String queryParams = 'timestamp=' + timeStamp.toString();
List key =…

Shaban
- 11
- 4
0
votes
1 answer
XCHANGE Apache Camel connect to Binance
How to get data stream for using Apache Camel XCHANGE?
There is an example at Apache Camel XCHANGE.
In this sample, we find the current Bitcoin market price in USDT:
from("direct:ticker")
…

janek
- 1
- 1
0
votes
0 answers
Reaching the data that comes with the list with python?
With python I get a list like below from the server. But when I want to return it in "for" loop, it gives me a list error. How can I fix this?
So in summary, I want to access data such as "Open, Close" in the incoming "klines" in the "for" loop…

johnvayne
- 79
- 3
- 8
0
votes
1 answer
Binance limit short selling API: margin/order(sell) or margin/loan?
I read their api doc. But I’m not sure if I want to short selling BTCUSDT, should I use its /margin/order’s sell limit api or /margin/loan api?
If answer is the second one, but how to I specify my limit price?
When I want to buy to cover or repay ,…

Hami
- 335
- 1
- 7
- 22
0
votes
0 answers
binance api function crashes when trying to create margin loans
I am writing a function for an api interface to quickly switch between long and short margin positions. I have more than enough funds in the isolated account to avoid the MIN_NOTATIONAL error. The debt and balance do not update after creating orders…

Brandon Jay
- 87
- 4