# 获取支持的币种

## 获取支持的币种

<mark style="color:green;">`POST`</mark> /<mark style="background-color:yellow;">petty/getCoinList</mark>

\<Description of the endpoint>

**请求头**

| 名称           | 值                  |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**请求入参**

```
{
    "sourceFlag":"test"
}
```

**请求入参说明**

<table><thead><tr><th width="165">名称</th><th width="100">类型</th><th width="100">是否必须</th><th>说明</th></tr></thead><tbody><tr><td>sourceFlag</td><td>String</td><td>否</td><td>渠道名</td></tr></tbody></table>

**返回参数**

{% tabs %}
{% tab title="200" %}

```json
{
    "resCode": "800",
    "resMsg": "成功",
    "data": [
        {
            "coin": "ETH",
            "chains": [
                {
                    "symbol": "ETH",
                    "coinCode": "ETH",
                    "mainNetwork": "ETH",
                    "contact": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                    "coinDecimal": "18"
                },
                {
                    "symbol": "ETH",
                    "coinCode": "ETH(BSC)",
                    "mainNetwork": "BSC",
                    "contact": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",
                    "coinDecimal": "18"
                },
                {
                    "symbol": "ETH",
                    "coinCode": "ETH(ARB)",
                    "mainNetwork": "ARB",
                    "contact": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                    "coinDecimal": "18"
                },
                {
                    "symbol": "ETH",
                    "coinCode": "ETH(Optimism)",
                    "mainNetwork": "Optimism",
                    "contact": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                    "coinDecimal": "18"
                },
                {
                    "symbol": "ETH",
                    "coinCode": "ETH(BASE)",
                    "mainNetwork": "BASE",
                    "contact": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                    "coinDecimal": "18"
                }
            ]
        },
        {
            "coin": "USDC",
            "chains": [
                {
                    "symbol": "USDC",
                    "coinCode": "USDC",
                    "mainNetwork": "ETH",
                    "contact": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDC",
                    "coinCode": "USDC(BSC)",
                    "mainNetwork": "BSC",
                    "contact": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
                    "coinDecimal": "18"
                },
                {
                    "symbol": "USDC",
                    "coinCode": "USDC(ARB)",
                    "mainNetwork": "ARB",
                    "contact": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDC",
                    "coinCode": "USDC(Optimism)",
                    "mainNetwork": "Optimism",
                    "contact": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDC",
                    "coinCode": "USDC(BASE)",
                    "mainNetwork": "BASE",
                    "contact": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDC",
                    "coinCode": "USDC(C-Chain)",
                    "mainNetwork": "AVAXC",
                    "contact": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDC",
                    "coinCode": "USDC(MATIC)",
                    "mainNetwork": "POLYGON",
                    "contact": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                    "coinDecimal": "6"
                }
            ]
        },
        {
            "coin": "USDT",
            "chains": [
                {
                    "symbol": "USDT",
                    "coinCode": "USDT(ERC20)",
                    "mainNetwork": "ETH",
                    "contact": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDT",
                    "coinCode": "USDT(BSC)",
                    "mainNetwork": "BSC",
                    "contact": "0x55d398326f99059ff775485246999027b3197955",
                    "coinDecimal": "18"
                },
                {
                    "symbol": "USDT",
                    "coinCode": "USDT(ARB)",
                    "mainNetwork": "ARB",
                    "contact": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDT",
                    "coinCode": "USDT(Optimism)",
                    "mainNetwork": "Optimism",
                    "contact": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDT",
                    "coinCode": "USDT(C-Chain)",
                    "mainNetwork": "AVAXC",
                    "contact": "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
                    "coinDecimal": "6"
                },
                {
                    "symbol": "USDT",
                    "coinCode": "USDT(MATIC)",
                    "mainNetwork": "POLYGON",
                    "contact": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                    "coinDecimal": "6"
                }
            ]
        }
    ]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

[ <br>](https://{host}/api/v1/queryCoinList)**返回参数说明**

<table><thead><tr><th width="184">字段</th><th width="100">数据类型</th><th width="459">说明</th></tr></thead><tbody><tr><td>symbol</td><td>String</td><td>币种简称</td></tr><tr><td>coinCode</td><td>String</td><td>币种码 ETH</td></tr><tr><td>coinDecimal</td><td>String</td><td>币种精度 18</td></tr><tr><td>contact</td><td>String</td><td>合约地址</td></tr><tr><td>mainNetwork</td><td>String</td><td><p>代币所属主网(主网简称)</p><p>比如USDC是ETH链上上的币，则mainNetwork为ETH；BNB(BSC)属于BSC链上的币，则mainNetwork为BSC；</p></td></tr></tbody></table>
