All URIs are relative to https://api.binance.com
Method | HTTP request | Description ------------- | ------------- | ------------- ApiV3AggTradesGet | GET /api/v3/aggTrades | Compressed/Aggregate Trades List ApiV3AvgPriceGet | GET /api/v3/avgPrice | Current Average Price ApiV3DepthGet | GET /api/v3/depth | Order Book ApiV3ExchangeInfoGet | GET /api/v3/exchangeInfo | Exchange Information ApiV3HistoricalTradesGet | GET /api/v3/historicalTrades | Old Trade Lookup ApiV3KlinesGet | GET /api/v3/klines | Kline/Candlestick Data ApiV3PingGet | GET /api/v3/ping | Test Connectivity ApiV3Ticker24hrGet | GET /api/v3/ticker/24hr | 24hr Ticker Price Change Statistics ApiV3TickerBookTickerGet | GET /api/v3/ticker/bookTicker | Symbol Order Book Ticker ApiV3TickerPriceGet | GET /api/v3/ticker/price | Symbol Price Ticker ApiV3TimeGet | GET /api/v3/time | Check Server Time ApiV3TradesGet | GET /api/v3/trades | Recent Trades List
array[AggTrade] ApiV3AggTradesGet(symbol, from.id=var.from.id, start.time=var.start.time, end.time=var.end.time, limit=var.limit)
Compressed/Aggregate Trades List
Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If startTime
and endTime
are sent, time between startTime and endTime must be less than 1 hour. - If fromId
, startTime
, and endTime
are not sent, the most recent aggregate trades will be returned. Weight(IP): 1
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
var.from.id <- 56 # integer | Trade id to fetch from. Default gets most recent trades.
var.start.time <- 56 # integer | UTC timestamp in ms
var.end.time <- 56 # integer | UTC timestamp in ms
var.limit <- 500 # integer | Default 500; max 1000.
#Compressed/Aggregate Trades List
api.instance <- MarketApi$new()
result <- api.instance$ApiV3AggTradesGet(var.symbol, from.id=var.from.id, start.time=var.start.time, end.time=var.end.time, limit=var.limit)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | from.id | integer| Trade id to fetch from. Default gets most recent trades. | [optional] start.time | integer| UTC timestamp in ms | [optional] end.time | integer| UTC timestamp in ms | [optional] limit | integer| Default 500; max 1000. | [optional]
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Trade list | - | | 400 | Bad Request | - |
InlineResponse2003 ApiV3AvgPriceGet(symbol)
Current Average Price
Current average price for a symbol. Weight(IP): 1
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
#Current Average Price
api.instance <- MarketApi$new()
result <- api.instance$ApiV3AvgPriceGet(var.symbol)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT |
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Average price | - | | 400 | Bad Request | - |
InlineResponse2002 ApiV3DepthGet(symbol, limit=100)
Order Book
| Limit | Weight(IP) | |---------------------|-------------| | 5, 10, 20, 50, 100 | 1 | | 500 | 5 | | 1000 | 10 | | 5000 | 50 |
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
var.limit <- 100 # integer |
#Order Book
api.instance <- MarketApi$new()
result <- api.instance$ApiV3DepthGet(var.symbol, limit=var.limit)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | limit | Enum [5, 10, 20, 50, 100, 500, 1000, 5000] | | [optional] [default to 100]
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Order book | - | | 400 | Bad Request | - |
InlineResponse2001 ApiV3ExchangeInfoGet(symbol=var.symbol, array.symbols=var.array.symbols)
Exchange Information
Current exchange trading rules and symbol information - If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error. Weight(IP): 10
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
var.array.symbols <- '[\"BTCUSDT\",\"BNBBTC\"]' # character |
#Exchange Information
api.instance <- MarketApi$new()
result <- api.instance$ApiV3ExchangeInfoGet(symbol=var.symbol, array.symbols=var.array.symbols)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | [optional] array.symbols | character| | [optional]
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Current exchange trading rules and symbol information | - | | 400 | Bad Request | - |
array[Trade] ApiV3HistoricalTradesGet(symbol, limit=var.limit, from.id=var.from.id)
Old Trade Lookup
Get older market trades. Weight(IP): 5
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
var.limit <- 500 # integer | Default 500; max 1000.
var.from.id <- 56 # integer | Trade id to fetch from. Default gets most recent trades.
#Old Trade Lookup
api.instance <- MarketApi$new()
# Configure API key authorization: ApiKeyAuth
api.instance$apiClient$apiKeys['X-MBX-APIKEY'] <- 'TODO_YOUR_API_KEY';
result <- api.instance$ApiV3HistoricalTradesGet(var.symbol, limit=var.limit, from.id=var.from.id)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | limit | integer| Default 500; max 1000. | [optional] from.id | integer| Trade id to fetch from. Default gets most recent trades. | [optional]
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Trade list | - | | 400 | Bad Request | - | | 401 | Unauthorized Request | - |
array[array[OneOflongstring]] ApiV3KlinesGet(symbol, interval, start.time=var.start.time, end.time=var.end.time, limit=var.limit)
Kline/Candlestick Data
Kline/candlestick bars for a symbol.\ Klines are uniquely identified by their open time. - If startTime
and endTime
are not sent, the most recent klines are returned. Weight(IP): 1
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
var.interval <- 'interval_example' # character | kline intervals
var.start.time <- 56 # integer | UTC timestamp in ms
var.end.time <- 56 # integer | UTC timestamp in ms
var.limit <- 500 # integer | Default 500; max 1000.
#Kline/Candlestick Data
api.instance <- MarketApi$new()
result <- api.instance$ApiV3KlinesGet(var.symbol, var.interval, start.time=var.start.time, end.time=var.end.time, limit=var.limit)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | interval | Enum [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | kline intervals | start.time | integer| UTC timestamp in ms | [optional] end.time | integer| UTC timestamp in ms | [optional] limit | integer| Default 500; max 1000. | [optional]
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Kline data | - | | 400 | Bad Request | - |
object ApiV3PingGet()
Test Connectivity
Test connectivity to the Rest API. Weight(IP): 1
library(binanceRapi)
#Test Connectivity
api.instance <- MarketApi$new()
result <- api.instance$ApiV3PingGet()
dput(result)
This endpoint does not need any parameter.
object
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | OK | - |
OneOftickertickerList ApiV3Ticker24hrGet(symbol=var.symbol)
24hr Ticker Price Change Statistics
24 hour rolling window price change statistics. Careful when accessing this with no symbol. - If the symbol is not sent, tickers for all symbols will be returned in an array. Weight(IP):\ 1
for a single symbol;\ 40
when the symbol parameter is omitted;
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
#24hr Ticker Price Change Statistics
api.instance <- MarketApi$new()
result <- api.instance$ApiV3Ticker24hrGet(symbol=var.symbol)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | [optional]
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | 24hr ticker | - | | 400 | Bad Request | - |
OneOfbookTickerbookTickerList ApiV3TickerBookTickerGet(symbol=var.symbol)
Symbol Order Book Ticker
Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP):\ 1
for a single symbol;\ 2
when the symbol parameter is omitted;
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
#Symbol Order Book Ticker
api.instance <- MarketApi$new()
result <- api.instance$ApiV3TickerBookTickerGet(symbol=var.symbol)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | [optional]
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Order book ticker | - | | 400 | Bad Request | - |
OneOfpriceTickerpriceTickerList ApiV3TickerPriceGet(symbol=var.symbol)
Symbol Price Ticker
Latest price for a symbol or symbols. - If the symbol is not sent, prices for all symbols will be returned in an array. Weight(IP):\ 1
for a single symbol;\ 2
when the symbol parameter is omitted;
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
#Symbol Price Ticker
api.instance <- MarketApi$new()
result <- api.instance$ApiV3TickerPriceGet(symbol=var.symbol)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | [optional]
OneOfpriceTickerpriceTickerList
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Price ticker | - | | 400 | Bad Request | - |
InlineResponse200 ApiV3TimeGet()
Check Server Time
Test connectivity to the Rest API and get the current server time. Weight(IP): 1
library(binanceRapi)
#Check Server Time
api.instance <- MarketApi$new()
result <- api.instance$ApiV3TimeGet()
dput(result)
This endpoint does not need any parameter.
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Binance server UTC timestamp | - |
array[Trade] ApiV3TradesGet(symbol, limit=var.limit)
Recent Trades List
Get recent trades. Weight(IP): 1
library(binanceRapi)
var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT
var.limit <- 500 # integer | Default 500; max 1000.
#Recent Trades List
api.instance <- MarketApi$new()
result <- api.instance$ApiV3TradesGet(var.symbol, limit=var.limit)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- symbol | character| Trading symbol, e.g. BNBUSDT | limit | integer| Default 500; max 1000. | [optional]
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | Trade list | - | | 400 | Bad Request | - |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.