コード例 #1
0
ファイル: Form1.cs プロジェクト: OrgTeamForBIT/BIT
        //static Task<int> CreateTask(string name)
        //{
        //    return new Task<int>(() => TaskMethod(name));
        //}

        public string start()
        {
            string         info = "";
            BitfinexClient bit  = new BitfinexClient();

            bit.SetApiKey("cndYoNyd8Tp2g1rAslKFPCcuxYklO3PEprVrlTYMT5l");
            bit.SetApiSecret("ms0cM9Hd1FgEkR6p9TZYVWfw9yDiO3OXg7o2mMhvvx8");
            BitfinexApiResult <BitfinexAccountInfo> result = bit.GetAccountInfo();

            if (result.Error == null)
            {
                info += "MakerFees:" + result.Result.MakerFees;
                info += "TakerFees:" + result.Result.TakerFees;
                int i = 1;
                foreach (BitfinexFee bf in result.Result.Fees)
                {
                    info += "BitfinexFee:" + i.ToString();
                    info += "MakerFees:" + bf.MakerFees;
                    info += "Pairs:" + bf.Pairs;
                    info += "TakerFees:" + bf.TakerFees;
                    info += "\r\n";
                    i++;
                }
            }
            else
            {
                info = "error:" + result.Error.ErrorCode.ToString() + result.Error.ErrorMessage;
            }
            return(info);
        }