Questions tagged [binance]

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.

Documentation

API Wrappers

1009 questions
38
votes
15 answers

How to retrieve a list of all market pairs like ETH/BTC using Binance API?

I am working on a project relevant to crypto trading where I need to select a market pair of Binance Exchange and based on the pair choice I have to show various results like current price, 24 Hr price change, 24 Hr Volume and last 10 trade history…
V.Spock
  • 555
  • 2
  • 5
  • 11
29
votes
1 answer

Get Staking Positions via Binance API

Is there a way to track your staking positions? All the Savings positions seem to be easy to reference through the API but it doesn't appear that it supports any of the staking functionality (lists, positions, history, purchasing, etc). I've poured…
deflime
  • 603
  • 1
  • 9
  • 17
20
votes
1 answer

efficiently getting all my trades from binance api

I want to download all my trades from Binance using the api. The problem I have is that the api/v3/myTrades api call requires a market symbol. As there are hundreds of market symbols, I need to make hundreds of API calls to ensure that I cover all…
pomo
  • 2,251
  • 1
  • 21
  • 34
20
votes
1 answer

Python 3 handling error TypeError: catching classes that do not inherit from BaseException is not allowed

When I run this code: i=0 while i<5: i=i+1; try: SellSta=client.get_order(symbol=Symb,orderId=SellOrderNum,recvWindow=Delay) except client.get_order as e: print ("This is an error message!{}".format(i)) #End while I got…
Chuox
  • 643
  • 1
  • 7
  • 20
19
votes
4 answers

How to use Binance API, simple GET price by ticker

I would like to get only one pair from the response. And I can't really understand how I should pass my parameter. Instructions say: Symbol price ticker GET /api/v3/ticker/price Latest price for a symbol or symbols. Weight: 1 for a single symbol; 2…
programmer123456
  • 201
  • 1
  • 2
  • 4
19
votes
3 answers

Fetch Candlestick/Kline data from Binance API using Python (preferably requests) to get JSON Dat

I am developing a telegram bot that fetches Candlestick Data from Binance API. I am unable to get JSON Data as a response. The following code is something that I tried. import requests import json import urllib.request `url =…
Jin Barai
  • 191
  • 1
  • 1
  • 4
16
votes
3 answers

How to get all tokens by wallet address

I am trying to pull a list of token contracts held by a wallet address, similar to how bscscan does, except programmatically. bscscan.com/apis does not have an endpoint, and web3js seems to only report the ETH balance. This is possible to achieve,…
Nomad
  • 163
  • 1
  • 1
  • 6
16
votes
5 answers

How to place a futures market order using python-binance: APIError(code=-1111): Precision is over the maximum defined for this asset

thanks for taking the time to check out my issue. I'm struggling to place orders using python-binance, specifically a perpetual futures market order. I don't believe this is a duplicate on here but there have been several queries around the same…
Flipflop
  • 171
  • 1
  • 1
  • 8
14
votes
12 answers

python-Binance api: APIError(code=-1013): Filter failure: LOT_SIZE

When trying to place a buy or sell order with the python-binance api I got the following error: APIError(code=-1013): Filter failure: LOT_SIZE. Now I've seen at iceberg_parts that this means there is probably something wrong with my buying or…
Nassim
  • 141
  • 1
  • 1
  • 4
12
votes
2 answers

PancakeSwap API / Swaping BNB with Binance Smart Chain's API

I was wondering if there's a PancakeSwap API, that allows me to swap BNB for a token, and if it isn't possible, can I do it with Binance Smart Chain's API?
Blaschuko
  • 123
  • 1
  • 1
  • 6
12
votes
3 answers

How to get ALL (or multiple) pair's historical klines from Binance API in ONE request?

I have a trading bot that trades multiple pairs (30-40). It uses the previous 5m candle for the price input. Therefore, I get 5m history for ALL pairs one by one. Currently, the full cycle takes about 10 minutes, so the 5m candles get updated once…
sellthehype
  • 123
  • 1
  • 1
  • 6
12
votes
1 answer

Binance "Event Time" vs "Trade time"

I am looking at the Binance Websocket Stream and have a question about Event time and Trade time. If this is raw trade information, how can there be 2 different times for a "Trade"? What is the "Event Time"? From the github API docs: Trade…
RandyMy
  • 1,013
  • 1
  • 8
  • 9
11
votes
5 answers

TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary

How do I solve this? TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary I'm trying to use Binance socket manager, and I'm getting this error.
Ariful islam
  • 121
  • 1
  • 5
11
votes
5 answers

API binance P2P I only access a part (only the BUY) and not all of it (BUY and SELL)

I am trying to access the data on this Binance website. It is the P2P: https://p2p.binance.com/en/trade/buy/USDT. For BUY I am using this in python3 (I am getting the data correctly for this section): import requests headers = { "Accept":…
Marcos
  • 159
  • 1
  • 1
  • 8
11
votes
4 answers

Binance Future api : APIError(code=-2015): Invalid API-key, IP, or permissions for action, request ip

I used Binance Python api in my algotrading bot, but I get an error when I use future market api. ''' BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action, request ip ''' I am sure that my API-key is true and I…
Mohammad Masih
  • 121
  • 1
  • 1
  • 4
1
2 3
66 67