Lodol Docs

Binance

API actions for the Binance integration.

Binance

Access public market data from Binance.


Get average price

Fetch the current average price for a symbol.

Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol.

Response

{
  "avg_price": {
    "mins": 5,
    "price": "42152.75"
  }
}

Get exchange info

Retrieve exchange trading rules and symbol metadata.

Parameters

ParameterTypeRequiredDescription
symbolstringNoTrading pair symbol.

Response

{
  "exchange_info": {
    "serverTime": 1706097600000,
    "symbols": [
      {
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "status": "TRADING",
        "symbol": "BTCUSDT"
      }
    ],
    "timezone": "UTC"
  }
}

Get order book

Retrieve the current order book depth for a symbol.

Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol.
limitnumberNoDepth limit.

Response

{
  "order_book": {
    "asks": [
      [
        "42150.50",
        "0.75"
      ]
    ],
    "bids": [
      [
        "42150.00",
        "0.50"
      ]
    ],
    "lastUpdateId": 9876543210
  }
}

List recent trades

List the most recent trades for a symbol.

Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol.
limitnumberNoMaximum number of trades.

Response

{
  "trades": [
    {
      "id": 12345678,
      "isBuyerMaker": true,
      "price": "42150.50",
      "qty": "0.05",
      "time": 1706097600000
    }
  ]
}

Get server time

Fetch the current Binance server time to sync client clocks.

Response

{
  "server_time": {
    "serverTime": 1706097600000
  }
}

Get 24h ticker

Retrieve 24-hour ticker statistics for a symbol.

Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol.

Response

{
  "ticker": {
    "lastPrice": "42150.50",
    "priceChange": "850.50",
    "priceChangePercent": "2.05",
    "symbol": "BTCUSDT"
  }
}

On this page