-
Notifications
You must be signed in to change notification settings - Fork 198
02StreamingIndexerAuction
Ivan Angelkoski edited this page Jun 12, 2023
·
5 revisions
Attention! The Docs have been moved to https://docs.ts.injective.network/
Example code snippets to stream from the indexer for auction module related data.
- stream auction bids
import { IndexerGrpcAuctionStream } from "@injectivelabs/sdk-ts";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
const endpoints = getNetworkEndpoints(Network.TestnetK8s);
const indexerGrpcAuctionStream = new IndexerGrpcAuctionStream(
endpoints.indexer
);
const streamFn = indexerGrpcAuctionStream.streamBids.bind(
indexerGrpcAuctionStream
);
const callback = (bids) => {
console.log(bids);
};
const streamFnArgs = {
callback,
};
streamFn(streamFnArgs);
Powering the future of decentralized finance.