-
Notifications
You must be signed in to change notification settings - Fork 195
02QueryingChainOracle
Ivan Angelkoski edited this page Jun 12, 2023
·
4 revisions
Example code snippets to query the chain via the oracle api.
- 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);
Powering the future of decentralized finance.