Skip to Content
DevelopersMarket MakersIndicative Quotes

Indicative Quotes

Indicative quotes: publish bid/ask + size to a websocket endpoint for discovery and routing. If any fields are null, the sender stops publishing for that market (and marketIndex = null stops all quotes).

import { IndicativeQuotesSender } from "@drift-labs/sdk";
Class IndicativeQuotesSenderReference ↗
NameTypeDefault
endpointany
keypairany
heartbeatTimeoutany
sendQuotesIntervalany
heartbeatIntervalMsany
reconnectDelayany
wsany
connectedany
quotesany
generateChallengeResponse(nonce: string) => string
handleAuthMessage(message: any) => void
connect() => Promise<void>
startHeartbeatTimerany
setQuote(newQuotes: Quote | Quote[]) => void
reconnectany
await quoter.connect();
Method IndicativeQuotesSender.connectReference ↗
Parameters:
This function does not accept any parameters.
Returns:
Promise<void>
quoter.setQuote({ bidPrice: new BN(bid * PRICE_PRECISION.toNumber()), askPrice: new BN(ask * PRICE_PRECISION.toNumber()), bidBaseAssetAmount: new BN(bidSize * BASE_PRECISION.toNumber()), askBaseAssetAmount: new BN(askSize * BASE_PRECISION.toNumber()), marketIndex, isOracleOffset: false, });
Method IndicativeQuotesSender.setQuoteReference ↗
Parameters:
NameTypeDefault
newQuotesQuote | Quote[]
Returns:
void
Last updated on