Skip to main content

oracleKeeper

This module provides utilities for retrieving Oracle Keeper URLs for different blockchain networks supported by the GMX protocol. Oracle Keepers are responsible for providing price feeds and other critical data to the GMX smart contracts.

Methods

getOracleKeeperUrl

  • getOracleKeeperUrl(chainId: number): string

Returns the primary Oracle Keeper URL for the specified chain ID.

import { getOracleKeeperUrl } from "@gmx-ui/sdk/configs/oracleKeeper";
import { ARBITRUM } from "@gmx-ui/sdk/configs/chains";

const oracleUrl = getOracleKeeperUrl(ARBITRUM);
console.log(oracleUrl); // "https://arbitrum-api.gmxinfra.io"

getOracleKeeperFallbackUrls

  • getOracleKeeperFallbackUrls(chainId: number): string[]

Returns an array of fallback Oracle Keeper URLs for the specified chain ID. These URLs can be used if the primary Oracle Keeper URL is unavailable.

import { getOracleKeeperFallbackUrls } from "@gmx-ui/sdk/configs/oracleKeeper";
import { ARBITRUM } from "@gmx-ui/sdk/configs/chains";

const fallbackUrls = getOracleKeeperFallbackUrls(ARBITRUM);
console.log(fallbackUrls);
// ["https://arbitrum-api-fallback.gmxinfra.io", "https://arbitrum-api-fallback.gmxinfra2.io"]