DoQuant
Volver al manual

Harbor SDK

market

Lee los mercados desde rt.market. Los precios y las cantidades son cadenas. Conviértelos antes de compararlos. Las marcas de tiempo están en milisegundos.

MétodoArgumentosDevuelve
getTickersymbollast, bid, ask, timestamp
getKlinessymbol, timeframe, limittime, open, high, low, close, volume
getOrderBooksymbol, limit opcionalbids y asks, cada nivel es [precio, cantidad]
getTradessymbol, limit opcionalprice, amount, side, timestamp
getFundingRatesymbolrate y timestamp, o null cuando no hay financiación
getFundingHistorysymbol, limitlas filas de financiación más recientes
getSymbolsningunosímbolos que esta instancia puede usar
getSocialsymbol, limittime, galaxyScore, altRank, sentiment, posts
getServerTimeningunohora del servidor de la plataforma en milisegundos

timeframe usa valores habituales del exchange, como 1m, 5m, 1h y 1d. getSocial devuelve solo puntos ya guardados. El array está vacío cuando no hay nada guardado. Los métodos de financiación son para perpetuos. No los llames con un símbolo spot.

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