Harbor SDK
market
Read markets from rt.market. Prices and amounts are strings. Convert them before you compare. Timestamps are milliseconds.
| Method | Arguments | Returns |
|---|---|---|
| getTicker | symbol | last, bid, ask, timestamp |
| getKlines | symbol, timeframe, limit | time, open, high, low, close, volume |
| getOrderBook | symbol, optional limit | bids and asks, each level [price, amount] |
| getTrades | symbol, optional limit | price, amount, side, timestamp |
| getFundingRate | symbol | rate and timestamp, or null when there is no funding |
| getFundingHistory | symbol, limit | the latest funding rows |
| getSymbols | none | symbols this instance is allowed to use |
| getSocial | symbol, limit | time, galaxyScore, altRank, sentiment, posts |
| getServerTime | none | platform 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);
