Position
From this section, you can have actions such as "getting infos of position", "add liquidity", "remove liquidity", "burn liquidity position".
positionInfo
Get informations of position
Copy
IPositionInfoParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position/Pair id |
IPositionInfo
Name | Type | Description | Example |
---|---|---|---|
collectionName | string | Collection name | Koda |
collectionAddress | string | Collection address | 0xe012baf811cf9c05c408e879c399960d1f305903 |
feeMultiplier | string | Transaction fee, and the unit is wei | 50000000000000000 = 5% |
feeAccumulation | string | claimable earnings, and the unit is wei | 50000000000000000 wei = 5 eth |
delta | number | Concentration | 5 |
tokenReserve | string | Token reserve | 50000000000000000 wei = 5 eth |
nftReserve | number | NFT reserve | 20 |
virtualTokenReserve | string | Virture token reserve | 50000000000000000 wei = 5 eth |
virtualNftReserve | number | Virture NFT reserve | 20 |
nftList | string[] | List of NFTs | ["5"] |
offerPrice | string | Best ask price | 50000000000000000 wei = 5 eth |
floorPrice | string | Best bid price | 50000000000000000 wei = 5 eth |
status | number | Status of position 1: IN_RANGE 2: OUT_OF_RANGE 3: CLOSED | 1 |
minPrice | string | The lowest price | 50000000000000000 wei = 5 eth |
maxPrice | string | The highest price | 50000000000000000 wei = 5 eth |
positionHistory
Get history of the position
Copy
IPositionHistoryParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position/Pair id |
type | number | true | 1: swap token to nft 2: swap nft to token 3: init liquidity 4: increase liquidity 5: decrease liquidity 6: remove liquidity 10: claim earnings |
page | number | false | Page numbers |
IPositionHistory
Name | Type | Description | Example |
---|---|---|---|
type | number | The types of the history | 1: swap token to nft 2: swap nft to token 3: init liquidity 4: increase liquidity 5: decrease liquidity 6: remove liquidity 10: claim earnings |
txHash | string | Transaction hash | 0xa31c6040f576e56ed312fcb920afc0e1c0f1ec114eccc3c83a246fe0ba0c51fc |
fromAddress | string | From address | 0xe012baf811cf9c05c408e879c399960d1f305903 |
toAddress | string | To address | 0xe012baf811cf9c05c408e879c399960d1f305903 |
networkFee | string | Gas fee | 50000000000000000 wei = 5 eth |
detail | string | more details | |
time | number | Timestamp | 1681718076000 |
increaseLiquidity
Add liquidity
Copy
IIncreaseLiquidityParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position id |
tokenIdList | string[] | true | List of token ids |
value | number | false | Amount of $ETH, and the unit is wei e.g. 50000000000000000 wei = 5 eth |
increaseLiquidityForFundingPool
Add liquidity with Funding Pool. Please apply apiKey from Chamcha platform first
Copy
IIncreaseLiquidityParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position id |
tokenIdList | string[] | true | List of token ids |
value | number | false | Amount of $ETH, and the unit is wei e.g. 50000000000000000 wei = 5 eth |
decreaseLiquidity
Remove liquidity
Copy
IDecreaseLiquidityParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position/Pair id |
tokenIdList | string[] | true | List of token ids |
value | number | false | Amount of $ETH, and the unit is wei e.g. 50000000000000000 wei = 5 eth |
decreaseLiquidityForFundingPool
Remove liquidity with Funding Pool. Please apply apiKey from Chamcha platform first
Copy
IDecreaseLiquidityParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position/Pair id |
tokenIdList | string[] | true | List of token ids |
value | number | false | Amount of $ETH, and the unit is wei e.g. 50000000000000000 wei = 5 eth |
removeLiquidity
Remove all liqudity you provided and it will burn the position
Copy
IRemoveLiquidityParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position/Pair id |
removeLiquidityForFundingPool
Burn liquidity position with Funding Pool. Please apply apiKey from Chamcha platform first
Copy
IRemoveLiquidityParams
Name | Type | Required | Description |
---|---|---|---|
pairId | number | true | Position/Pair id |
Last updated