API market endpoints

Methods

aggTrades(symbol, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
fromIdnumber<optional>

id to get aggregate trades from INCLUSIVE.

startTimenumber<optional>
endTimenumber<optional>
limitnumber<optional>

Default 500; max 1000.

avgPrice(symbol)

Current Average Price

GET /api/v3/avgPrice

Current average price for a symbol.
https://binance-docs.github.io/apidocs/spot/en/#current-average-price

Parameters:
NameTypeDescription
symbolstring

bookTicker(symbolopt, symbolsopt)

Symbol Order Book Ticker

GET /api/v3/ticker/bookTicker

Best price/qty on the order book for a symbol or symbols.
https://binance-docs.github.io/apidocs/spot/en/#symbol-order-book-ticker

Parameters:
NameTypeAttributesDescription
symbolstring<optional>
symbolsArray<optional>

an array of symbols

depth(symbol, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
limitnumber<optional>

Default 100; max 5000. If limit > 5000, then the response will truncate to 5000.

exchangeInfo(optionsopt)

Exchange Information

GET /api/v3/exchangeInfo

Current exchange trading rules and symbol information
https://binance-docs.github.io/apidocs/spot/en/#exchange-information

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
symbolstring<optional>

symbol

symbolsArray<optional>

an array of symbols

historicalTrades(symbol, optionsopt)

Old Trade Lookup

GET /api/v3/historicalTrades

Get older market trades.
https://binance-docs.github.io/apidocs/spot/en/#old-trade-lookup

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
limitnumber<optional>

Default 500; max 1000.

fromIdnumber<optional>

Trade id to fetch from. Default gets most recent trades.

klines(symbol, interval, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
intervalstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
startTimenumber<optional>
endTimenumber<optional>
limitnumber<optional>

Default 500; max 1000.

ping()

Test Connectivity

GET /api/v3/ping

Test connectivity to the Rest API.
https://binance-docs.github.io/apidocs/spot/en/#test-connectivity

rollingWindowTicker(symbolopt, symbolsopt, optionsopt)

Rolling window price change statistics

GET /api/v3/ticker

The window used to compute statistics is typically slightly wider than requested windowSize.

openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested.

E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC)

Weight(IP): 2 for each requested symbol regardless of windowSize.

The weight for this request will cap at 100 once the number of symbols in the request is more than 50.

https://binance-docs.github.io/apidocs/spot/en/#rolling-window-price-change-statistics

Parameters:
NameTypeAttributesDescription
symbolstring<optional>
symbolsArray<optional>

an array of symbols

optionsobject<optional>
Properties
NameTypeAttributesDescription
typestring<optional>

Supported values: FULL or MINI.

windowSizenumber<optional>

Defaults to 1d if no parameter provided.

ticker24hr(symbolopt, symbolsopt, typeopt)

24hr Ticker Price Change Statistics

GET /api/v3/ticker/24hr

https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics

Parameters:
NameTypeAttributesDefaultDescription
symbolstring<optional>
symbolsArray<optional>

an array of symbols

typestring<optional>
FULL

"MINI" or "FULL"

tickerPrice(symbolopt, symbolsopt)

Parameters:
NameTypeAttributesDescription
symbolstring<optional>
symbolsArray<optional>

an array of symbols

time()

Check Server Time

GET /api/v3/time

Test connectivity to the Rest API and get the current server time.
https://binance-docs.github.io/apidocs/spot/en/#check-server-time

trades(symbol, optionsopt)

Recent Trades List

GET /api/v3/trades

Get recent trades.
https://binance-docs.github.io/apidocs/spot/en/#recent-trades-list

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
limitnumber<optional>

Default 500; max 1000.

uiklines(symbol, interval, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
intervalstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
startTimenumber<optional>
endTimenumber<optional>
limitnumber<optional>

Default 500; max 1000.