함수

데이터

이 묶음의 이름 13개예요.
형식과 예를 함께 적었어요.

open

시가

형식
const open: Series

high

고가

형식
const high: Series

low

저가

형식
const low: Series

close

종가 (지금 봉은 현재가)

형식
const close: Series

volume

거래량

형식
const volume: Series

time

봉 시작 시각 (UTC 밀리초)

형식
const time: Series

hl2

(고가 + 저가) / 2

형식
const hl2: Series

hlc3

(고가 + 저가 + 종가) / 3

형식
const hlc3: Series

ohlc4

(시가 + 고가 + 저가 + 종가) / 4

형식
const ohlc4: Series

hlcc4

(고가 + 저가 + 종가 × 2) / 4

형식
const hlcc4: Series

turnover

거래대금 (주는 거래소만, 없으면 NaN)

형식
const turnover: Series

request.bars

다른 시간봉(timeframe)이나 다른 종목(symbol)의 봉, 이 차트의 봉에 맞춰서. 차트 봉이 끝날 때까지 끝난 봉의 값만 써요(미래 안 봄): 1시간봉 차트에서 일봉은 그날이 끝난 뒤에 바뀌어요. 그 봉 위에서 계산하려면 compute: d.compute((b) => b.ta.ema(b.close, 20))는 일봉 20 EMA. 최대 4가지

형식
bars(o: { symbol?: string; timeframe?: Timeframe }): { open: Series; high: Series; low: Series; close: Series; volume: Series; time: Series; compute<T extends Series | Record<string, Series>>(fn: (b: RequestedBars) => T): T }
예
const d = request.bars({ timeframe: '1D' })

request.data

시장 데이터를 이 차트의 봉에 맞춰서: funding(펀딩비 %), openInterest(미결제약정 백만 달러), longShortRatio · topLongShortRatio(롱/숏 비율), kimchiPremium(김프 %), cvd, fearGreed(공포·탐욕 0~100), coinbasePremium(%), dvol, stablecoins(십억 달러). 대부분 바이낸스 선물 종목 기준. 최대 8가지

형식
data(name: DataName, o?: { symbol?: string }): Series
예
const f = request.data('funding')

npm · GitHub