Query price
1. Request Url
https://{host}/gt/swap/path/v1/quote
2. Request Param
Parameter name
Is it necessary
description
coinCode
Y
buy:Deposit coinCode sell: Receive coinCode
fromAddress
Y
User wallet address
fromTokenAddress
Y
buy:not required sell:nft contract address
fromTokenChain
Y
nft mainnet
nftId
Y
buy:NFT ID sell:not required
orderSide
buy---1 sell---0
paymentContract
Y
buy:not required sell:The contract address to receive coins
platformId
Y
Platfrom ID
tokenId
Y
buy:not required sell: NFT tokenId
equipmentNo
N
device ID
sessionUuid
N
User's unique login ID sessionId
sourceFlag
N
The order source is used to identify which platform created the order and needs to be negotiated with SWFT BlockChain
sourceType
N
Request source device (IOS, Android, h5)
userNo
N
userNo
3.Request Example
{
"coinCode": "",
"equipmentNo": "",
"fromAddress": "",
"fromTokenAddress": "",
"fromTokenChain": "",
"nftId": "",
"orderSide": "",
"paymentContract": "",
"platformId": "",
"sessionUuid": "",
"sourceFlag": "",
"sourceType": "",
"tokenId": "",
"userNo": ""
}
4.Response Data
{
"data": {
"baseCoinCode": "",
"buyWithOrigin": true,
"dex": "",
"fee": "",
"feeToken": "",
"fromTokenAmount": "",
"fromTokenDecimal": "",
"logoUrl": "",
"path": [],
"paymentInfo": {},
"platformId": "",
"toTokenAmount": "",
"toTokenDecimal": "",
"txInfo": {},
"userCoinAmt": "",
"userCoinCode": ""
},
"resCode": "800",
"resMsg": "success"
}
Copy link