fbpay
  1. Exchange Currency
fbpay
  • Transaction finished Webhook
  • Web Widget Copy
  • Terms of Use
  • Privacy policy
  • Api
    • Supported currencies
      • Supported fiat currencies
      • Supported cryptocurrencies
    • Exchange Currency
      • Get exchange rate
        POST
      • Get cached exchange rate
        GET
  1. Exchange Currency

Get exchange rate

Developing
POST
https://api.fbpay.cc/v1/rate

Get the exchange rate of cryptocurrency and fiat currency#

Change the interface to obtain the exchange rate of fiat currency to cryptocurrency or cryptocurrency to fiat currency.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
from
object 
required
amount
integer 
required
The amount required for exchange
currency
string 
Currency to be exchanged
required
The key value of the currency can be obtained from the coin map interface.
to
object 
required
currency
string 
required
The token identifier required for exchange.
find identifier from here
platform
string 
source
optional
Used to indicate the source of the request
Example
{
    "from": {
        "amount": 100,
        "currency": "jpy"
    },
    "to": {
        "currency": "bnb"
    },
    "platform": "aplink"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.fbpay.cc/v1/rate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "from": {
        "amount": 100,
        "currency": "jpy"
    },
    "to": {
        "currency": "bnb"
    },
    "platform": "aplink"
}'

Responses

🟢200成功
application/json
Body
success
boolean 
required
data
object 
required
channels
object 
required
payment channels
country
string 
required
customer country
nonce
string 
Token
required
nonce
timestamp
integer 
required
platform
string 
required
which platform come from
Example
{
    "success": true,
    "data": {
        "channels": {
            "guardiran": {
                "from": {
                    "amount": 200,
                    "currency": "USD"
                },
                "to": {
                    "amount": 188.1665509,
                    "currency": "USDT",
                    "network": "BSC"
                },
                "service_fees": {
                    "amount": "1.2574360935",
                    "currency": "USD",
                    "percentage": "0.62871804675%"
                },
                "converted_amount": {
                    "amount": "198.75",
                    "currency": "USD"
                },
                "network_fee": {
                    "currency": "USDT",
                    "amount": "0.20451106"
                }
            },
            "unlimit": {
                "from": {
                    "amount": 200,
                    "currency": "USD"
                },
                "to": {
                    "amount": 178.72971903,
                    "currency": "USDT",
                    "network": "BNBChain(BEP20)",
                    "key": "USDT-BEP20"
                },
                "service_fees": {
                    "amount": "19.13",
                    "currency": "USD",
                    "percentage": null
                },
                "converted_amount": {
                    "amount": 200,
                    "currency": "USD"
                },
                "network_fee": {
                    "currency": "USD",
                    "amount": "0.21"
                }
            }
        },
        "country": "us",
        "nonce": "d5355576d0e6e0ae066e883c4e7701b2",
        "timestamp": 1709882964,
        "platform": "test"
    }
}
Previous
Exchange Currency
Next
Get cached exchange rate
Built with