Skip to main content
Glama
query.lcd.js1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LCDQueryClient = void 0; class LCDQueryClient { req; constructor({ requestClient }) { this.req = requestClient; this.spotPriceV2 = this.spotPriceV2.bind(this); } /* SpotPriceV2 defines a gRPC query handler that returns the spot price given a base denomination and a quote denomination. The returned spot price has 36 decimal places. However, some of modules perform sig fig rounding so most of the rightmost decimals can be zeroes. */ async spotPriceV2(params) { const options = { params: {} }; if (typeof params?.baseAssetDenom !== "undefined") { options.params.base_asset_denom = params.baseAssetDenom; } if (typeof params?.quoteAssetDenom !== "undefined") { options.params.quote_asset_denom = params.quoteAssetDenom; } const endpoint = `osmosis/poolmanager/v2/pools/${params.poolId}/prices`; return await this.req.get(endpoint, options); } } exports.LCDQueryClient = LCDQueryClient;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MyronKoch-dev/osmosis-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server