Request quote
Provide a quote inquiry endpoint for users to inform users of currency transaction information and currency exchange range.
Note
Note: If the value filled in by the user is outside the convertible range, in order to avoid user losses, please remind the user to change the swap value
Endpoint usage
POST
https://api.bridgers.xyz/api/sswap/quote
The fields with * are required, and the fields without * are optional
Request Body
Name | Type | Description |
---|---|---|
equipmentNo* | String | Equipment number(This field will be used as the unique identifier of the user, and the third parties can obtain it on their own, such as the first 32 characters of fromAddress, or a string of 32 random numbers and letters) |
sourceType | String | Device type (H5/IOS/Android The field is optional, if it is requested directly through the API, it can be empty) |
sourceFlag* | String | Source channel (Both sides need to agree on a name to represent the channel of the third parties) |
fromTokenAddress* | String | Contract address for the token to sell (It can be obtained from the address field in the currency list) |
toTokenAddress* | String | Contract address for the token to receive (It can be obtained from the address field in the currency list) |
fromTokenAmount* | String | Amount of token to sell |
fromTokenChain* | String | Network of the token to sell (It can be obtained from the chain field in the currency list, For details of the support chain, please refer to [Basic information]) |
toTokenChain* | String | Network of the token to received (It can be obtained from the chain field in the currency list, For details of the support chain, please refer to [Basic information]) |
userAddr | String | User address |
Code example
Postman example
Last updated