42 lines
1.5 KiB
R
42 lines
1.5 KiB
R
% Generated by roxygen2: do not edit by hand
|
|||
|
|
% Please edit documentation in R/indicators.R
|
||
|
|
\name{fetch_binance_klines}
|
||
|
|
\alias{fetch_binance_klines}
|
||
|
|
\title{Fetch historical Binance klines over REST}
|
||
|
|
\usage{
|
||
|
|
fetch_binance_klines(
|
||
|
|
symbol,
|
||
|
|
interval,
|
||
|
|
limit,
|
||
|
|
start_ms = -1,
|
||
|
|
end_ms = -1,
|
||
|
|
base_url = NULL
|
||
|
|
)
|
||
|
|
}
|
||
|
|
\arguments{
|
||
|
|
\item{symbol}{Trading symbol (case-insensitive), e.g. \code{"btcusdt"}.}
|
||
|
|
|
||
|
|
\item{interval}{Integer interval code \code{0:15} (see \code{\link[=BinanceFeed]{BinanceFeed()}}).}
|
||
|
|
|
||
|
|
\item{limit}{Number of klines to fetch (\code{1:1000}).}
|
||
|
|
|
||
|
|
\item{start_ms, end_ms}{Optional inclusive Unix-millisecond bounds; a negative
|
||
|
|
value means unset.}
|
||
|
|
|
||
|
|
\item{base_url}{Optional host override; \code{NULL} uses production.}
|
||
|
|
}
|
||
|
|
\value{
|
||
|
|
An \verb{n x 6} numeric matrix with columns \code{open}, \code{high}, \code{low},
|
||
|
|
\code{close}, \code{volume}, \code{timestamp}.
|
||
|
|
}
|
||
|
|
\description{
|
||
|
|
Downloads up to \code{limit} (\code{1:1000}) historical klines for \code{symbol} at the given
|
||
|
|
\code{interval} code (an integer \code{0:15}, the same order as the other bindings).
|
||
|
|
\code{start_ms}/\code{end_ms} are optional inclusive Unix-millisecond bounds (a negative
|
||
|
|
value means unset); \code{base_url} overrides the host (\code{NULL} = production). Returns
|
||
|
|
an \verb{n x 6} numeric matrix with columns \code{open}, \code{high}, \code{low}, \code{close},
|
||
|
|
\code{volume}, \code{timestamp}. Blocks until the response arrives. Not available in the
|
||
|
|
wasm (r-universe/webR) build, which has no raw sockets.
|
||
|
|
}
|
||
|
|
\keyword{internal}
|