预估金额

[POST]
https://bridge.bestswap.net/api/estimate

获取所选方向和汇率类型的货币对预估兑换金额.

POST https://bridge.bestswap.net/api/estimate

Headers

NameTypeDescription

x-api-key*

String

Api Key

x-sign*

String

Api 签名

Request Body

NameTypeDescription

from_currency*

String

发送币种

to_currency*

String

接受币种

amount*

Number

发送币种金额

{
    "code": 200,
    "timestamp": "2023-11-15T17:13:12.119Z",
    "data": {
        "from": {
            "code": "BTC",
            "network": "BTC",
            "coin": "BTC",
            "amount": "0.125",
            "rate": "18.0142323",
            "precision": 8,
            "min": "0.00055301",
            "max": "2.49822898",
            "usd": "4543.95",
            "btc": "0.125"
        },
        "to": {
            "code": "ETH",
            "network": "ETH",
            "coin": "ETH",
            "amount": "2.2468169",
            "rate": "0.05495247",
            "precision": 8,
            "min": "0.005",
            "max": "44.99874",
            "usd": "4511"
        },
        "errors": []
    },
    "message": "success"
}
获取所选方向和汇率类型的货币对的汇率
字段类型描述

code

Number

响应状态码, 如果请求成功状态码为 200, 否则为错误.

timestamp

String

当前请求时间

data

Object

预估金额数组

- from

Object

发送的资产的数据

-- from.code

String

BestSwap 中的唯一货币代码

-- from.network

String

资产的区块链网络

-- from.coin

String

公共资产代码

-- from.amount

String

客户需要发送的金额

-- from.rate

String

最终汇率

-- from.precision

Number

币种精度

-- from.min

String

最低金额

-- from.max

String

最高金额

-- from.usd

String

等值美元

-- from.btc

String

等值比特币

- to

Object

客户将收到的资产的数据

-- to.code

String

BestSwap 中的唯一货币代码

-- to.network

String

资产的区块链网络

-- to.coin

String

公共资产代码

-- to.amount

String

客户预估收到的金额

-- to.rate

String

最终汇率

-- to.precision

Number

币种精度

-- to.min

String

最低金额

-- to.max

String

最高金额

-- to.usd

String

等值美元

- errors

Array

错误信息

message

String

响应数据信息

Last updated