Giter VIP home page Giter VIP logo

binance-proxy's Introduction

binance-proxy

Developed based on https://github.com/adshao/go-binance. He is the shoulders of giants.Thanks

local klines ,depth ,exchangeInfo,24hour

Data Spot Interval Future Interval
klines 2000ms(or 1000ms?) depend on binance limit 250ms
depth 100ms 100ms
exchangeInfo 60s 60s
24hr.BidPrice/AskPrice realtime realtime
24hr.AnotherField 1000ms 500ms

Caution

  1. Because the structure of the 24hr data of future is different from that of spot, and the delay of websocket is very large (spot: 1000ms, future: 500ms). Therefore, the BidPrice/AskPrice field of 24hr actually uses the data of bookTicker , it is real-time
  2. Due to the depth of binance weboskcet only provides 20-depth push.So proxy maintains a 1000 depth orderbook locally
  3. The case where kline automatically converts to a reverse proxy,See the table below for details. They are OR relationship
    1. The startTime parameter is set and is earlier than the first date cached locally
    2. The endTime parameter is set
    3. The limit parameter is less than or equal to 0 or greater than 1000
    4. The symbol or interval parameter is not set
  4. kline needs to rely on api data for initialization. And due to the limit and wait the first websocket push data, there may be a certain delay. About a few seconds.

Command

      -f string
            futures bind address. (default ":8091")
      -s string
            spot bind address. (default ":8090")
      -v    print debug log.

Freqtrade config

"exchange": {
        "name": "binance",
        "key": "",
        "secret": "",
        "ccxt_config": {
            "enableRateLimit": false,
            "urls": {
                "api": {
                    "public": "http://127.0.01:8090/api/v3", # spot add this 
                    "fapiPublic": "http://127.0.01:8091/fapi/v1" # futures add this
                }
            }
        },
        "ccxt_async_config": {
            "enableRateLimit": false,
        },
}

binance-proxy's People

Contributors

adrianceding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

binance-proxy's Issues

_async_get_candle_history() returned exception

Hi,
I tried to use the latest binance-proxy and the recommended config with freqtrade 2022.5.1, but freqtrade fail to start with the following error:
freqtrade.exchange.common - WARNING - _async_get_candle_history() returned exception: "Could not fetch historical candle (OHLCV) data for pair TLM/BUSD due to RequestTimeout. Message: binance GET http://127.0.0.1:8090/api/v3/klines?interval=1d&limit=1000&symbol=TLMBUSD&startTime=1655856000000". Retrying still for 4 times.
Without connecting binance-proxy, it works successfully.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.