Swap
From this section, you can request for trading details and swap with SDK eaisly
swapInfo
Copy
ISwapInfoParams
Name | Type | Required | Description |
---|---|---|---|
collection | string | true | Collection address |
swapType | number | true | Type of swap:
|
slippage | number | false | Slippage |
count | number | false | Amount of NFTs. It's needed when vaule of "swapType" is 1 |
nftList | string[] | false | List of NFTs. It's needed when value of "swapType" is 2 |
ISwapInfo
Name | Type | Description | Example |
---|---|---|---|
swapList | object[] | ||
- pairAddress | string | Position address | 0xe012baf811cf9c05c408e879c399960d1f305903 |
- nftList | string[] | List of NFTs | ["5"] |
signature | string | signature | |
tokenAmount | number | Amount of tokens | 5 |
protocolFee | number | Protocol fee | 0.5 |
lpFee | number | Fee earned for liquidity provider | 0.5 |
slippageAmount | number | The value of slippage | 5 |
swap
Swap ETH for NFTs
Copy
ISwapTokenForNftParams
Name | Type | Required | Description |
---|---|---|---|
collection | string | true | Collection address |
slippage | number | true | The value of slippage |
count | number | true | Amount of NFTs |
Swap NFTs for ETH
Copy
ISwapNftForTokenParams
Name | Type | Required | Description |
---|---|---|---|
collection | string | true | Collection address |
slippage | number | true | The value of slippage |
nftIds | string[] | true | List of NFTs |
swapAnyNftForToken
Swap any NFTs for ETH.
Copy
ISwapAnyNftForTokenParams
Name | Type | Required | Description |
---|---|---|---|
collection | string | true | collection address |
slippage | number | true | The value of slippage |
amount | number | true | amount of NFTs you wanna swap |
Last updated