Skip to content

Commit

Permalink
Fixes incorrect base url for historical candles and trades api (#106)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2ed39a8)
  • Loading branch information
hoakbuilds authored Jun 19, 2022
1 parent 77bfb97 commit c9abb1b
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 21 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ separate repository so it is contained, as the goal for [Solnet](https://github.

## Dependencies
- BlockMountain.TradingView v1.0.0
- Solnet.Serum v5.0.5
- Solnet.Wallet v5.0.5
- Solnet.Rpc v5.0.5
- Solnet.Programs v5.0.5
- Solnet.Serum v5.0.6
- Solnet.Wallet v5.0.6
- Solnet.Rpc v5.0.6
- Solnet.Programs v5.0.6

## Examples

Expand Down
2 changes: 1 addition & 1 deletion SharedBuildProperties.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product>Solnet.Mango</Product>
<Version>5.0.5</Version>
<Version>5.0.6</Version>
<Copyright>Copyright 2022 &#169; blockmountain</Copyright>
<Authors>blockmountain</Authors>
<PublisherName>blockmountain</PublisherName>
Expand Down
3 changes: 3 additions & 0 deletions Solnet.Mango.Examples/HistoricalDataExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public HistoricalDataExample()

public void Run()
{
var now = DateTime.Now;
var ohlcv = _mangoHistoricalDataService.GetHistory(now.Subtract(TimeSpan.FromDays(30)), now, "SOL-PERP", "1D");

//var spotStats = _mangoHistoricalDataService.GetMarginLendingStats();

//var perpStats = _mangoHistoricalDataService.GetPerpStats();
Expand Down
12 changes: 6 additions & 6 deletions Solnet.Mango.Examples/Solnet.Mango.Examples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Solnet.Programs" Version="5.0.5" />
<PackageReference Include="Solnet.Rpc" Version="5.0.5" />
<PackageReference Include="Solnet.Wallet" Version="5.0.5" />
<PackageReference Include="Solnet.KeyStore" Version="5.0.5" />
<PackageReference Include="Solnet.Pyth" Version="5.0.5" />
<PackageReference Include="Solnet.Serum" Version="5.0.5" />
<PackageReference Include="Solnet.Programs" Version="5.0.6" />
<PackageReference Include="Solnet.Rpc" Version="5.0.6" />
<PackageReference Include="Solnet.Wallet" Version="5.0.6" />
<PackageReference Include="Solnet.KeyStore" Version="5.0.6" />
<PackageReference Include="Solnet.Pyth" Version="5.0.6" />
<PackageReference Include="Solnet.Serum" Version="5.0.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public void GetVolumeInfoUnsuccessful()
public void GetRecentTrades()
{
string responseData = File.ReadAllText("Resources/RecentTrades.json");
var url = EventHistoryApiCandlesBaseUrl + "trades/address/2TgaaVoHgnSeEtXvWTx13zQeTf4hYWAMEiMQdcG6EwHi";
var url = EventHistoryApiCandlesBaseUrl + "tv/trades/address/2TgaaVoHgnSeEtXvWTx13zQeTf4hYWAMEiMQdcG6EwHi";
Mock<HttpMessageHandler> messageHandlerMock = SetupHttpClientTest(responseData, url);

HttpClient httpClient = new(messageHandlerMock.Object)
Expand All @@ -341,7 +341,7 @@ public void GetRecentTrades()
public void GetRecentTradesUnsuccessful()
{
Mock<HttpMessageHandler> messageHandlerMock = SetupHttpClientUnsuccessfulTest();
var url = EventHistoryApiCandlesBaseUrl + "trades/address/2TgaaVoHgnSeEtXvWTx13zQeTf4hYWAMEiMQdcG6EwHi";
var url = EventHistoryApiCandlesBaseUrl + "tv/trades/address/2TgaaVoHgnSeEtXvWTx13zQeTf4hYWAMEiMQdcG6EwHi";

HttpClient httpClient = new(messageHandlerMock.Object)
{
Expand Down
2 changes: 1 addition & 1 deletion Solnet.Mango.Historical/MangoHistoricalDataService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class MangoHistoricalDataService : IMangoHistoricalDataService
/// <summary>
/// The base url for the candlestick data endpoints.
/// </summary>
private static readonly string EventHistoryApiCandlesBaseUrl = "https://event-history-api-candles.herokuapp.com/";
private static readonly string EventHistoryApiCandlesBaseUrl = "https://event-history-api-candles.herokuapp.com/tv/";

/// <summary>
/// The base url for the mango fills service.
Expand Down
6 changes: 3 additions & 3 deletions Solnet.Mango.Test/Solnet.Mango.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Solnet.Rpc" Version="5.0.5" />
<PackageReference Include="Solnet.Wallet" Version="5.0.5" />
<PackageReference Include="Solnet.Serum" Version="5.0.5" />
<PackageReference Include="Solnet.Rpc" Version="5.0.6" />
<PackageReference Include="Solnet.Wallet" Version="5.0.6" />
<PackageReference Include="Solnet.Serum" Version="5.0.6" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Solnet.Mango/Solnet.Mango.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
<PackageReference Include="Solnet.Programs" Version="5.0.5" />
<PackageReference Include="Solnet.Rpc" Version="5.0.5" />
<PackageReference Include="Solnet.Wallet" Version="5.0.5" />
<PackageReference Include="Solnet.Serum" Version="5.0.5" />
<PackageReference Include="Solnet.Programs" Version="5.0.6" />
<PackageReference Include="Solnet.Rpc" Version="5.0.6" />
<PackageReference Include="Solnet.Wallet" Version="5.0.6" />
<PackageReference Include="Solnet.Serum" Version="5.0.6" />
</ItemGroup>

<Import Project="..\SharedBuildProperties.props" />
Expand Down

0 comments on commit c9abb1b

Please sign in to comment.