binance

Issues Placing a Trade with Binance API using Python

谁都会走 提交于 2021-02-10 12:13:26
问题 I am trying to place a trade on the US version of Binance API without the use of external libraries. I can successfully get prices and display my account balance using GET requests and urllib . The first example code works and I can pass my API_KEY and SECRET_KEY without issues (those values are private, they aren't displayed here and are located in settings.py ). Placing a trade requires POST and I'm not sure where I went wrong, my POST requests don't work but GET requests work fine. To my

How do Binance API calculate priceChangePercent in 24h

痞子三分冷 提交于 2020-05-15 10:27:06
问题 I am developing my own app in which I want to retrieve price data in a 24h period. I have read the docs provided by Binance at https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md Then I try fetching 24hr ticker price change statistics by using the link https://api.binance.com/api/v1/ticker/24hr?symbol=BTCUSDT. The response is: { "symbol": "BTCUSDT", "priceChange": "111.60000000", "priceChangePercent": "1.314", "weightedAvgPrice": "8563.97044287",

Binance.Net placing order with the entire quantity

萝らか妹 提交于 2020-01-25 07:54:37
问题 I wanted to put orders with 100% of my quantity but I don't seem to find built-in functionality in Binance.Net, so I decided to make it myself. var balance = _client.GetAccountInfo().Data.Balances.FirstOrDefault(e => e.Asset == "TRX").Free; var orderId = _client.PlaceOrder("TRXUSDT", OrderSide.Sell, OrderType.Limit, quantity: balance, price: 0.01460m, timeInForce: TimeInForce.GoodTillCancel); The following code is selling 100% of my TRX quantity for USDT. The problem is that I only have the

How to: New order Binance API via RStudio

强颜欢笑 提交于 2020-01-05 04:25:07
问题 I am trying to create a new order via the Binance API using RStudio. I found the Binance Official API Docs and figured out that I should use POST /api/v3/order (HMAC SHA256). The following script doesn't work out for me: url='https://api.binance.com/api/v3/account' GET(url, add_headers("X-MBX-APIKEY"= *[my API key]*), query=list("symbol"="ETHBTC", "side"="BUY", "type"="MARKET", "quantity"=1, recvWindow=5000, "timestamp"=1499827319559, "signature"=**???**), verbose()) Does anyone know what I'm