POST
https://api.fps.pro/balances/convert
Request formatapplication/json
walletrequired string | Merchant ID where the asset is converted. Use the "Personal" ID for your personal balance |
from_tokenrequired string | Source token ID (see the cryptocurrency list) |
from_networkrequired string | Source network ID (see the network list) |
to_tokenrequired string | Target token ID (see the cryptocurrency list) |
to_networkrequired string | Target network ID (see the network list) |
amountrequired string | Amount of the asset to convert |
Request examples
curl --request POST 'https://api.fps.pro/balances/convert' \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: YOUR_CLIENT_ID' \
--header 'X-Timestamp: 1720000000' \
--header 'X-Signature: YOUR_HMAC_SHA256_SIGNATURE' \
--data '{
"wallet": "42",
"from_token": "tether",
"from_network": "tron",
"to_token": "btc",
"to_network": "btc",
"amount": "100"
}'Successful response
{
"status": 200,
"message": "convert success"
}Errors
Detailed authorization errors are listed in Authorization - Errors
{
"status": 422,
"message": "Validation Error",
"errors": [
{
"field": "wallet",
"message": "wallet is required"
}
]
}{
"status": 400,
"message": "Bad balance"
}{
"status": 400,
"message": "Amount exceeds available balance"
}{
"status": 500,
"message": "Internal Server Error"
}