Exemplo n.º 1
0
        // 查询cointiger站支持的所有币种
        // 币种是按交易分区来列举的,如:
        //   bitcny-partition
        //   btc-partition
        //   usdt-partition
        //   eth-partition
        public static Currencys GetCurrencys()
        {
            string strResponse = Http.Get(V2.URL + "/currencys");

            if (string.IsNullOrEmpty(strResponse))
            {
                return(null);
            }

            Response response = Response.FromString(strResponse);

            if (response == null || response.code != "0" || response.msg != "suc" || string.IsNullOrEmpty(response.data))
            {
                return(null);
            }

            Currencys currencys = Currencys.FromString(response.data);

            if (currencys == null || currencys.partitions == null)
            {
                return(null);
            }

            return(currencys);
        }