Skip to content

02QueryingChainOracle

Ivan Angelkoski edited this page Jun 12, 2023 · 4 revisions

⚠️ The Docs have been moved to https://docs.ts.injective.network/querying/querying-chain/querying-chain-oracle ⚠️

Example code snippets to query the chain via the oracle api.

Using gRPC

  • Get parameters related to the oracle
import { ChainGrpcOracleApi } from "@injectivelabs/sdk-ts";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.TestnetK8s);
const chainGrpcOracleApi = new ChainGrpcOracleApi(endpoints.grpc);

const moduleParams = await chainGrpcOracleApi.fetchModuleParams();

console.log(moduleParams);

⚠️ DOCUMENTATION ⚠️

Clone this wiki locally