Simple and understandable Binance Spot API.
When using this software, you are solely responsible and at your own risk. Please take this into consideration.
Just download the repo and run it in Visual Studio.
Login to Binance and get Api Key and Secret Key from API manager.
private static string API_KEY = "";
private static string SECRET_KEY = "";
public static Configuration config = new Configuration(API_KEY, SECRET_KEY);
public static Binance binance = new Binance(config);
public void TestConnectivity()
{
var result = binance.TestConnectivity().Result;
Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
}
Output:
{}
public void GetCandlesticks()
{
var result = binance.GetCandlesticks("BTCUSDT", Model.Enum.Interval.HOUR_4).Result.ToList();
Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
}
Output:
[
{
"OpenTime": 1613793600000,
"Open": 55711.90000000,
"High": 56144.87000000,
"Low": 55185.98000000,
"Close": 55207.92000000,
"Volume": 8688.91552800,
"CloseTime": 1613807999999,
"QuoteAssetVolume": 484076882.16407515,
"NumberOfTrade": 298853,
"TakerBuyBaseAssetVolume": 4154.51253000,
"TakerBuyQuoteAssetVolume": 231500411.70649142
}
]
This product is protected by MIT License.