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
0 answers
Error when trying to access binance API: 'Binance' object has no attribute 'binance_keys'
Please assist, i am coding a bot working with Binance and get the error stated when i try access the API to make a purchase. the API key is stored in a txt file:
line 332, in signRequest
signature =…

Progcham
- 1
- 1
- 3
0
votes
2 answers
JSON object values cannot be accessed using key names in JS
i am trying to get data from Binance web sockets in my react app
const ws = new WebSocket("wss://stream.binance.com:9443/ws/ethbtc@trade");
ws.onopen = () => {
ws.send(
JSON.stringify({
method: "SUBSCRIBE",
params:…

Crypto Man
- 32
- 7
0
votes
1 answer
How to setState in react.js using "binance.futuresMiniTickerStream()" function
When I do this It works
import React, { useState, useEffect } from 'react'
// Node Binance API
// https://github.com/binance-exchange/node-binance-api
const Binance = require('node-binance-api')
const binance = new Binance().options({
APIKEY:…

Reaction
- 3
- 6
0
votes
1 answer
API Key error with Binance using Rust/reqwest crate
I'm trying to write a rust program that interfaces with Binance's REST API. The link to the documentation is here. The problem is that I'm sending a POST request with reqwest, a rust crate, but simply receive {"code":-2015,"msg":"Invalid API-key,…

user3167679
- 51
- 1
- 7
0
votes
1 answer
Binance orderbook size increases over time
I made a simple Python script that should stream the Binance Bitcoin-USD orderbook. I followed the guide here. I subscribed to their websocket stream and started updating my local orderbook. The problem is that the size of the orderbook keeps…

San9096
- 231
- 4
- 12
0
votes
2 answers
Easy question regarding how to access the return of a function
I'm new to python/programming so this may be a simple solution. I'm just trying to figure out how to output the function?
I use the following:
import time
from binance.client import Client
from datetime import datetime
def process_message(msg):
…

Ell Jeff
- 49
- 1
- 8
0
votes
1 answer
Filtering/selecting a variable output = easy simple question but i don't know how to search for the right solution
This i'm sure is very simple, but i can't find the right words to explain what i mean to Google, so my searches have come up empty.
I have a variable that i'm printing to the console. All good.
I'd like to filter/select the variable output, so i…

Ell Jeff
- 49
- 1
- 8
0
votes
1 answer
ccxt.base.errors.InvalidOrder: binance Order would trigger immediately
I am using Python, Binance, and CCXT API libraries to create a BUY order on Binance. I am getting an error when executing the code below.
ERROR: ccxt.base.errors.InvalidOrder: binance Order would trigger immediately.
I have also added the…

Casey Harrils
- 2,793
- 12
- 52
- 93
0
votes
1 answer
Pine Script Back testing
I am writing a simple pine script to go Long before 10 mins hourly candle closure and close short after 10 mins after candle closure.
But the script does not apply to previous date / time but only applied from the time I add it to the chart.
I…

Jay
- 1
- 2
0
votes
1 answer
Binance Stream Data End
I'm using websockets for stream. For example klines. But that's too much entry. If I retrieve the 1h kline, I just need open and close prices so there is no need to get the middle ones. How can I do that? If I need 4h kline, just need that at the…

Gert
- 3
- 1
0
votes
2 answers
Binance Margin Borrow API in java
I am new to Binance API and I'm having some difficulty to invoke Binance margin borrow API. I have referred their API documentation, But don't know how to invoke the margin borrow API through java. So, I would like to someone guide or share me an…

karthi keyan
- 213
- 2
- 19
0
votes
1 answer
python - the execution looks like synchronous with asyncio
Api calls could be speeded up with asynchronous calls.
So I thought I can speed up my program by using asyncio. By displaying the results, the execution looks like synchronous. So I'm completely confused. What did I do wrong?
import asyncio
# pip…

lovelace63
- 352
- 1
- 6
- 15
0
votes
1 answer
How to call Binance /futures/data/openInterestHist Market Data Endpoint?
The documentation states that the request header must contain the api key.
My request looks like this:
import requests
headers = {
'X-MBX-APIKEY':…

Neptun
- 11
- 4
0
votes
0 answers
Difference in timestamp between two REST APIs
this is the first time I use StackOverflow, so sorry if I missed something.
I have been working with two REST APIs that report "server time".
I am interested in measuring somehow the difference (since I do not have access to the API servers), if…

Let's try
- 1,044
- 9
- 20
0
votes
1 answer
{Signature for this request is not valid} error for Binance withdraw
While there are similar errors on github and here, they are older, i have signature problem while withdrawing coin from binance via API from my script. Message return as result of error :
{Signature for this request is not valid}
I use…

trmt
- 137
- 1
- 14