- [Market](#market) - [getMarketInfo](#get-information-of-markets) - [Router](#router) - [previewAddLiquidityDualSyPt](#preview-adding-liquidity) - [previewRemoveLiquidityDualSyPt](#preview-removing-liquidity) - [previewMintPyFromSy](
npm install pendle-fork-sdk
import { Market } from "canalix-sdk"
const market = new Market(url, chainId);
`
Information about markets in a chain
$3
`
const marketInfo = await market.getMarketInfo(marketConfigList)
`
Params: EthAddress list of market
Return informations about total of pt, sy, lp, expiration date, fixed yield of all markets
Router
`
import { Router } from "canalix-sdk"
const router = new Router(url);
`
Preview trading results in a market
$3
`
res = await routerClass.previewAddLiquidityDualSyPt(marketAddr, routerAddr, amount, amount);
`
Params:
* marketAddr: EthAddress
* routerAddr: EthAddress
* amount: string | null (amount of sy and pt respectively)
Return preview result before adding liquidity
$3
`
res = await routerClass.previewRemoveLiquidityDualSyPt(marketAddr, routerAddr, amount);
`
Params:
* marketAddr: EthAddress
* routerAddr: EthAddress
* amount: string (amount of lp to remove)
Return preview result before removing liquidity
$3
`
res = await routerClass.previewMintPyFromSy(ytAddr, amount);
`
Params:
* ytAddr: EthAddress
* amount: string (amount of sy used to mint)
Return preview result before using sy to mint pt and yt
$3
`
res = await routerClass.previewRedeemPyToSy(ytAddr, amount);
``