diff --git a/README.md b/README.md index 29eca64..4060cae 100644 --- a/README.md +++ b/README.md @@ -492,7 +492,21 @@ import lending from "@curvefi/lending-api"; 206: {collateral: '0.2', borrowed: '0.0'}, } // - + + await oneWayMarket.calcTickPrice(0); + //8595.062092132517715849 + await oneWayMarket.calcTickPrice(1); + //8509.111471211192538691 + await oneWayMarket.calcBandPrices(0); + //['8509.111471211192538691', '8595.062092132517715849'] + await oneWayMarket.calcBandPrices(1); + //['8424.020356499080613304', '8509.111471211192538691'] + await oneWayMarket.calcRangePct(0); + //0.000000 + await oneWayMarket.calcRangePct(1); + //1.000000 + await oneWayMarket.oraclePriceBand(); + //4 // --- BORROW MORE --- diff --git a/package.json b/package.json index a73a3aa..f570de2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/lending-api", - "version": "0.1.0-alpha", + "version": "0.1.1-alpha", "description": "JavaScript library for Curve Lending", "main": "lib/index.js", "author": "Macket", diff --git a/test/readme.test.ts b/test/readme.test.ts index 84b906d..0f4b04f 100644 --- a/test/readme.test.ts +++ b/test/readme.test.ts @@ -148,6 +148,14 @@ const generalTest = async () => { console.log(await oneWayMarket.userPrices()); console.log(await oneWayMarket.userBandsBalances()); + console.log(await oneWayMarket.calcTickPrice(0)); + console.log(await oneWayMarket.calcTickPrice(1)); + console.log(await oneWayMarket.calcBandPrices(0)); + console.log(await oneWayMarket.calcBandPrices(1)); + console.log(await oneWayMarket.calcRangePct(0)); + console.log(await oneWayMarket.calcRangePct(1)); + console.log(await oneWayMarket.oraclePriceBand()); + console.log("\n--- BORROW MORE ---\n"); console.log(await oneWayMarket.borrowMoreMaxRecv(0.5));