DoQuant
English

Harbor SDK

market

Read markets from rt.market. Prices and amounts are strings. Convert them before you compare. Timestamps are milliseconds.

MethodArgumentsReturns
getTickersymbollast, bid, ask, timestamp
getKlinessymbol, timeframe, limittime, open, high, low, close, volume
getOrderBooksymbol, optional limitbids and asks, each level [price, amount]
getTradessymbol, optional limitprice, amount, side, timestamp
getFundingRatesymbolrate and timestamp, or null when there is no funding
getFundingHistorysymbol, limitthe latest funding rows
getSymbolsnonesymbols this instance is allowed to use
getSocialsymbol, limittime, galaxyScore, altRank, sentiment, posts
getServerTimenoneplatform server time in milliseconds

timeframe uses common exchange values such as 1m, 5m, 1h, and 1d. getSocial returns only points already stored. The array is empty when nothing is stored. Funding methods are for perpetuals. Do not call them with a spot symbol.

const bars = await rt.market.getKlines(symbol, "1h", 50);
const funding = await rt.market.getFundingRate(symbol);