UNPKG

@kinetiq-research/markets-assets

Version:

Asset metadata (descriptions, oracle references) for Kinetiq markets

31 lines (24 loc) • 571 B
import { assetMetadata } from './_/asset-metadata' export interface AssetMetadata { oracleSymbol: string | undefined oracleUrl: string | undefined } const EMPTY_METADATA: AssetMetadata = { oracleSymbol: undefined, oracleUrl: undefined, } export const getAssetMetadata = ({ symbol, }: { symbol: string }): AssetMetadata => { const symbolClean = symbol.toLowerCase() if (!(symbolClean in assetMetadata)) { return EMPTY_METADATA } const { oracleSymbol, oracleUrl } = assetMetadata[symbolClean] return { oracleSymbol, oracleUrl, } }