UNPKG

@kamino-finance/kliquidity-sdk

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

17 lines 1.28 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.simulateManualPool = simulateManualPool; exports.simulatePercentagePool = simulatePercentagePool; const axios_1 = __importDefault(require("axios")); async function simulateManualPool(params) { const response = await axios_1.default.get(`https://api.kamino.finance/simulate/${params.poolAddress}?strategy_type=Fixed&deposit_date=${params.depositDate}&end_date=${params.endDate}&price_lower=${params.priceLower.toString()}&price_upper=${params.priceUpper.toString()}`); return response.data; } async function simulatePercentagePool(params) { const response = await axios_1.default.get(`https://api.kamino.finance/simulate/${params.poolAddress}?strategy_type=Tracker&deposit_date=${params.depositDate}&end_date=${params.endDate}&range_width_perc_lower=${params.rangeWidthPriceLower}&range_width_perc_upper=${params.rangeWidthPriceUpper}&reset_range_width_perc_upper=${params.resetRangeWidthPercUpper}&reset_range_width_perc_lower=${params.resetRangeWidthPercLower}`); return response.data; } //# sourceMappingURL=PoolSimulationService.js.map