(Core) Pairs Info API

GET Pairs Info #

GET /v2/newbridge/pairs

返回 account 的账户基本信息

API parameters #

请求参数 #

curl -v https://replace-api-domain.ext/newbridge/pairs

返回参数 #

{
  "pairs": [
    {
      "newchain_asset": {
        "address": "NEW17zFMb1iNPuFKbgW3ZPEJ3iLZrWvRjYmxCzG",
        "raw_address": "0x20F12218281F9CA566B5c41F17c6c19050125cD3",
        "name": "NewUSDT",
        "symbol": "NUSDT",
        "decimals": 6,
        "asset_type": "NRC6",
        "chain_id": "1007",
        "sub_network": "Testnet"
      },
      "ethereum_asset": {
        "address": "0x0f3229fEEEB7e96493482b70DF3024822F01AA01",
        "raw_address": "0x0f3229fEEEB7e96493482b70DF3024822F01AA01",
        "name": "Tether USD",
        "symbol": "USDT",
        "decimals": 6,
        "asset_type": "ERC20",
        "chain_id": "4",
        "sub_network": "Rinkeby"
      },
      "new2eth_min_deposit_amount": "10",
      "eth2new_min_deposit_amount": "1",
      "new2eth_fee_percent": "0.000000",
      "eth2new_fee_percent": "0.000000",
      "new2eth_fee_min_amount": "1",
      "eth2new_fee_min_amount": "0"
    }
  ]
}
名称类型描述
newchain_assetToken交接对中 newchain 资产
ethereum_assetToken桥接对中 ethereum 的资产
new2eth_min_deposit_amountstringnew2eth方向最小充值金额
eth2new_min_deposit_amountstringeth2new方向最小充值金额
new2eth_fee_percentstringnew2eth方向手续费的百分比。实际手续费为 new2eth_fee_percentnew2eth_fee_min_amount计算后得到的最大值。
eth2new_fee_percentstringeth2new方向手续费的百分比。实际手续费为 eth2new_fee_percenteth2new_fee_min_amount 计算后得到的最大值。
new2eth_fee_min_amountstringnew2eth方向手续费最小值
eth2new_fee_min_amountstringeth2new方向手续费的最小值

以上个字段中 new2eth 可能为 new2eth, new2heconew2bsc,需要对应链及方向。

其中, Token 类型定义如下:

名称类型描述
addressstring合约地址。ethereum 里 0x 格式,newchain 里 NEW 开头格式。如果为原生币(ETH/NEW),则为空。
raw_addressstring合约地址原生格式,0x 格式
namestringtoken 的名称
symbolstringtoken 的符号
decimalsuint8token 的精度,一般取值范围为 [0,18]。两个链上的精度必须一致。
asset_typestring资产类型,newchain 链取值为 : Coin,ERC6, ethreum 链取值为 Coin,ERC20
chain_idint链的 ChainID
sub_networkstring链的子名称,newchain 链可取值有: Mainnet,Testnet,ethereum 链可取值为:Mainnet,Rinkeby

Network #

NamePrefix
NewChainnew
Ethereumeth
HecoChainheco
BSChainbsc

Error Codes #

StatusCodeDescriptionParams
400account_not_foundAcount was not found
400address_is_in_invalid_formatRequested address format is not valid{ “type” => “newchain_address” } or { “type” => “ethereum_address” }
429too_many_requestsToo many requests have been made to the api.
500internal_server_errorInternal server error
503service_unavailableService is temporary unavailable
(Core) Pairs Info API 最后修改于 2021-05-20 @dd05b89 : update newbridge api v2