基本信息
源码名称:Huobi.net api 接口
源码大小:0.05M
文件格式:.zip
开发语言:C#
更新时间:2019-07-29
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 2 元 
   源码介绍

Huobi API 接口包含restApi 及websocket,


// REST client
using (var client = new HuobiClient())
{
// Public method
var marketDetails = client.GetMarketDetails24H("ethusdt");
if (marketDetails.Success) // Check the success flag for error handling
Console.WriteLine($"Got market stats, last price: {marketDetails.Data.Close}");
else
Console.WriteLine($"Failed to get stats, error: {marketDetails.Error}");
// Private method
client.SetApiCredentials("APIKEY", "APISECRET"); // Change to your credentials
var accounts = client.GetAccounts();
if (accounts.Success) // Check the success flag for error handling
Console.WriteLine($"Got account list, account id #1: {accounts.Data[0].Id}");
else
Console.WriteLine($"Failed to get account list, error: {accounts.Error}");
}


// Socket client
var socketClient = new HuobiSocketClient();
socketClient.SubscribeToMarketKlineUpdates("ethusdt", HuobiPeriod.FiveMinutes, data =>
{
Console.WriteLine("Received kline update. Last price: " data.Close);
});
Console.ReadLine();