Swap
From this section, you can request for trading details and swap with SDK eaisly
swapInfo
Copy
ISwapInfoParams
collection
string
true
Collection address
swapType
number
true
Type of swap:
swap token to NFT
swap NFT to token
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
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
collection
string
true
Collection address
slippage
number
true
The value of slippage
count
number
true
Amount of NFTs
Swap NFTs for ETH
Copy
ISwapNftForTokenParams
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
collection
string
true
collection address
slippage
number
true
The value of slippage
amount
number
true
amount of NFTs you wanna swap
Last updated