MarketApi | R Documentation |
binanceRapi.Market
An R6Class
generator object
ApiV3AggTradesGet 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
@param symbol character
@param from.id integer
@param start.time integer
@param end.time integer
@param limit integer
@returnType list( aggTrade )
status code : 200 | Trade list
return type : array[AggTrade]
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3AvgPriceGet Current Average Price Current average price for a symbol. Weight(IP): 1
@param symbol character
@returnType InlineResponse2003
status code : 200 | Average price
return type : InlineResponse2003
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3DepthGet Order Book | Limit | Weight(IP) | |———————|————-| | 1-100 | 1 | | 101-500 | 5 | | 501-1000 | 10 | | 1001-5000 | 50 |
@param symbol character
@param limit integer
@returnType InlineResponse2002
status code : 200 | Order book
return type : InlineResponse2002
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3ExchangeInfoGet 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
@param symbol character
@param symbols character
@returnType InlineResponse2001
status code : 200 | Current exchange trading rules and symbol information
return type : InlineResponse2001
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3HistoricalTradesGet Old Trade Lookup (MARKET_DATA) Get older market trades. Weight(IP): 5
@param symbol character
@param limit integer
@param from.id integer
@returnType list( trade )
status code : 200 | Trade list
return type : array[Trade]
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
status code : 401 | Unauthorized Request
return type : Error
response headers :
ApiV3KlinesGet 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
@param symbol character
@param interval Enum < [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] >
@param start.time integer
@param end.time integer
@param limit integer
@returnType list( array )
status code : 200 | Kline data
return type : array[array[OneOflongstring]]
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3PingGet Test Connectivity Test connectivity to the Rest API. Weight(IP): 1
status code : 200 | OK
return type : object
response headers :
ApiV3Ticker24hrGet 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;
@param symbol character
@param symbols character
@returnType OneOftickertickerList
status code : 200 | 24hr ticker
return type : OneOftickertickerList
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3TickerBookTickerGet 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;
@param symbol character
@param symbols character
@returnType OneOfbookTickerbookTickerList
status code : 200 | Order book ticker
return type : OneOfbookTickerbookTickerList
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3TickerPriceGet 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;
@param symbol character
@param symbols character
@returnType OneOfpriceTickerpriceTickerList
status code : 200 | Price ticker
return type : OneOfpriceTickerpriceTickerList
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
ApiV3TimeGet Check Server Time Test connectivity to the Rest API and get the current server time. Weight(IP): 1
@returnType InlineResponse200
status code : 200 | Binance server UTC timestamp
return type : InlineResponse200
response headers :
ApiV3TradesGet Recent Trades List Get recent trades. Weight(IP): 1
@param symbol character
@param limit integer
@returnType list( trade )
status code : 200 | Trade list
return type : array[Trade]
response headers :
status code : 400 | Bad Request
return type : Error
response headers :
apiClient
Handles the client-server communication.
new()
MarketApi$new(apiClient)
ApiV3AggTradesGet()
MarketApi$ApiV3AggTradesGet( symbol, from.id = NULL, start.time = NULL, end.time = NULL, limit = NULL, ... )
ApiV3AggTradesGetWithHttpInfo()
MarketApi$ApiV3AggTradesGetWithHttpInfo( symbol, from.id = NULL, start.time = NULL, end.time = NULL, limit = NULL, ... )
ApiV3AvgPriceGet()
MarketApi$ApiV3AvgPriceGet(symbol, ...)
ApiV3AvgPriceGetWithHttpInfo()
MarketApi$ApiV3AvgPriceGetWithHttpInfo(symbol, ...)
ApiV3DepthGet()
MarketApi$ApiV3DepthGet(symbol, limit = 100, ...)
ApiV3DepthGetWithHttpInfo()
MarketApi$ApiV3DepthGetWithHttpInfo(symbol, limit = 100, ...)
ApiV3ExchangeInfoGet()
MarketApi$ApiV3ExchangeInfoGet(symbol = NULL, symbols = NULL, ...)
ApiV3ExchangeInfoGetWithHttpInfo()
MarketApi$ApiV3ExchangeInfoGetWithHttpInfo(symbol = NULL, symbols = NULL, ...)
ApiV3HistoricalTradesGet()
MarketApi$ApiV3HistoricalTradesGet(symbol, limit = NULL, from.id = NULL, ...)
ApiV3HistoricalTradesGetWithHttpInfo()
MarketApi$ApiV3HistoricalTradesGetWithHttpInfo( symbol, limit = NULL, from.id = NULL, ... )
ApiV3KlinesGet()
MarketApi$ApiV3KlinesGet( symbol, interval, start.time = NULL, end.time = NULL, limit = NULL, ... )
ApiV3KlinesGetWithHttpInfo()
MarketApi$ApiV3KlinesGetWithHttpInfo( symbol, interval, start.time = NULL, end.time = NULL, limit = NULL, ... )
ApiV3PingGet()
MarketApi$ApiV3PingGet(...)
ApiV3PingGetWithHttpInfo()
MarketApi$ApiV3PingGetWithHttpInfo(...)
ApiV3Ticker24hrGet()
MarketApi$ApiV3Ticker24hrGet(symbol = NULL, symbols = NULL, ...)
ApiV3Ticker24hrGetWithHttpInfo()
MarketApi$ApiV3Ticker24hrGetWithHttpInfo(symbol = NULL, symbols = NULL, ...)
ApiV3TickerBookTickerGet()
MarketApi$ApiV3TickerBookTickerGet(symbol = NULL, symbols = NULL, ...)
ApiV3TickerBookTickerGetWithHttpInfo()
MarketApi$ApiV3TickerBookTickerGetWithHttpInfo( symbol = NULL, symbols = NULL, ... )
ApiV3TickerPriceGet()
MarketApi$ApiV3TickerPriceGet(symbol = NULL, symbols = NULL, ...)
ApiV3TickerPriceGetWithHttpInfo()
MarketApi$ApiV3TickerPriceGetWithHttpInfo(symbol = NULL, symbols = NULL, ...)
ApiV3TimeGet()
MarketApi$ApiV3TimeGet(...)
ApiV3TimeGetWithHttpInfo()
MarketApi$ApiV3TimeGetWithHttpInfo(...)
ApiV3TradesGet()
MarketApi$ApiV3TradesGet(symbol, limit = NULL, ...)
ApiV3TradesGetWithHttpInfo()
MarketApi$ApiV3TradesGetWithHttpInfo(symbol, limit = NULL, ...)
clone()
The objects of this class are cloneable with this method.
MarketApi$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: #################### ApiV3AggTradesGet #################### 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) #################### ApiV3AvgPriceGet #################### library(binanceRapi) var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT #Current Average Price api.instance <- MarketApi$new() result <- api.instance$ApiV3AvgPriceGet(var.symbol) #################### ApiV3DepthGet #################### library(binanceRapi) var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT var.limit <- 100 # integer | If limit > 5000, then the response will truncate to 5000 #Order Book api.instance <- MarketApi$new() result <- api.instance$ApiV3DepthGet(var.symbol, limit=var.limit) #################### ApiV3ExchangeInfoGet #################### library(binanceRapi) var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT var.symbols <- '[\"BTCUSDT\",\"BNBBTC\"]' # character | #Exchange Information api.instance <- MarketApi$new() result <- api.instance$ApiV3ExchangeInfoGet(symbol=var.symbol, symbols=var.symbols) #################### ApiV3HistoricalTradesGet #################### 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 (MARKET_DATA) api.instance <- MarketApi$new() result <- api.instance$ApiV3HistoricalTradesGet(var.symbol, limit=var.limit, from.id=var.from.id) #################### ApiV3KlinesGet #################### 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) #################### ApiV3PingGet #################### library(binanceRapi) #Test Connectivity api.instance <- MarketApi$new() result <- api.instance$ApiV3PingGet() #################### ApiV3Ticker24hrGet #################### library(binanceRapi) var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT var.symbols <- '[\"BTCUSDT\",\"BNBBTC\"]' # character | #24hr Ticker Price Change Statistics api.instance <- MarketApi$new() result <- api.instance$ApiV3Ticker24hrGet(symbol=var.symbol, symbols=var.symbols) #################### ApiV3TickerBookTickerGet #################### library(binanceRapi) var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT var.symbols <- '[\"BTCUSDT\",\"BNBBTC\"]' # character | #Symbol Order Book Ticker api.instance <- MarketApi$new() result <- api.instance$ApiV3TickerBookTickerGet(symbol=var.symbol, symbols=var.symbols) #################### ApiV3TickerPriceGet #################### library(binanceRapi) var.symbol <- 'BNBUSDT' # character | Trading symbol, e.g. BNBUSDT var.symbols <- '[\"BTCUSDT\",\"BNBBTC\"]' # character | #Symbol Price Ticker api.instance <- MarketApi$new() result <- api.instance$ApiV3TickerPriceGet(symbol=var.symbol, symbols=var.symbols) #################### ApiV3TimeGet #################### library(binanceRapi) #Check Server Time api.instance <- MarketApi$new() result <- api.instance$ApiV3TimeGet() #################### ApiV3TradesGet #################### 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.