Binance API - LabMazurokCom/Blockchain GitHub Wiki

Intro

Website: https://www.binance.com/

Base endpoint: https://api.binance.com

Documentation: https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md

Limits: 1200 requests per minute.

Fee used in bot: 0.1% (maker and taker).

Order book

https://api.binance.com/api/v1/depth?symbol=BTCUSDT&limit=50

Valid limits: 5, 10, 20, 50, 100, 500, 1000

If limit is set to 0 then all orders will be returned.

Response:

{
    "lastUpdateId": 1027024,
    "bids": [
        [
            "4.00000000", // PRICE
            "431.00000000", // QTY
            [] // Ignore.
        ]
    ],
    "asks": [
        [
            "4.00000200",
            "12.00000000", []
        ]
    ]
}

Ticker

Best price/quantity on the order book for a symbol.

https://api.binance.com/api/v3/ticker/bookTicker?symbol=BTCUSDT

Response:

{
    'symbol': 'BTCUSDT',
    'bidPrice': '7696.06000000',
    'bidQty': '1.51625500',
    'askPrice': '7699.00000000',
    'askQty': '0.24470600'
}