Swap Info
get swap details
GET:
Copy
Authorization information
There is currently no authorization information disclosed in the API.
Request
Response
Last updated
get swap details
Copy
There is currently no authorization information disclosed in the API.
Last updated
Name
Type
Required
Description
collection
string
true
collection address
swapType
int
true
swap type 1: swap token to nft 2: swap nft to token
slippage
double
true
swap slippage (0.02 == 2%)
count
int
false
the number of nft that you want to swap out, It is necessary for type=1
nftList
array<int>
false
the list of nft that you want to swap in, It is necessary for type=2
Name
Type
Description
Example
code
string
result code
200
message
string
the error message
Invalid key
success
boolean
whether the request success
true
data
object
- swapList
array
- pairAddress
string
specific pair address
0xe012baf811cf9c
- nftList
array<int>
the list of NFTs that will be swapped in or out from the pair
[1,2,3]
- signature
string
the signature of entire params, that will be verified in contract
0xc7cdea3700000000000000000000000000000000
- tokenAmount
int
nft reserves
20
- protocolFee
bigint
the fee of the protocol
- lpFee
bigint
the fee of the liquidity provider
- slippageAmount
bigint
the maxcost token when swap token to nft or the minimum token out when swap nft to token