Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CryptoCompare/Core/ApiUrls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static Uri History(
Check.NotNullOrWhiteSpace(fsym, nameof(fsym));
Check.NotNullOrWhiteSpace(tsym, nameof(tsym));

return new Uri(MinApiEndpoint, $"histo{method}").ApplyParameters(
return new Uri(MinApiEndpoint, $"v2/histo{method}").ApplyParameters(
new Dictionary<string, string>
{
{ nameof(fsym), fsym },
Expand Down
6 changes: 2 additions & 4 deletions src/CryptoCompare/Models/Responses/HistoryResponse.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.Collections.Generic;

namespace CryptoCompare
namespace CryptoCompare
{
public class HistoryResponse : BaseApiResponse
{
public IReadOnlyList<CandleData> Data { get; set; }
public HistoryResponseData Data { get; set; }
}
}
19 changes: 19 additions & 0 deletions src/CryptoCompare/Models/Responses/HistoryResponseData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace CryptoCompare
{
public class HistoryResponseData
{
public bool Aggregated { get; set; }

[JsonConverter(typeof(UnixTimeConverter))]
public DateTimeOffset TimeFrom { get; set; }

[JsonConverter(typeof(UnixTimeConverter))]
public DateTimeOffset TimeTo { get; set; }

public IReadOnlyList<CandleData> Data { get; set; }
}
}