@marinade.finance/kamino-sdk
Version:
18 lines • 1.35 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.simulatePercentagePool = exports.simulateManualPool = void 0;
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;
}
exports.simulateManualPool = simulateManualPool;
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;
}
exports.simulatePercentagePool = simulatePercentagePool;
//# sourceMappingURL=PoolSimulationService.js.map