Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes incorrect base url for historical candles and trades api #105

Merged
Merged
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ separate repository so it is contained, as the goal for [Solnet](https://github.

## Dependencies
- BlockMountain.TradingView v1.0.0
- Solnet.Serum v6.0.8
- Solnet.Wallet v6.0.8
- Solnet.Rpc v6.0.8
- Solnet.Programs v6.0.8
- Solnet.Serum v6.0.12
- Solnet.Wallet v6.0.12
- Solnet.Rpc v6.0.12
- Solnet.Programs v6.0.12

## 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>6.0.8</Version>
<Version>6.0.12</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="6.0.8" />
<PackageReference Include="Solnet.Rpc" Version="6.0.8" />
<PackageReference Include="Solnet.Wallet" Version="6.0.8" />
<PackageReference Include="Solnet.KeyStore" Version="6.0.8" />
<PackageReference Include="Solnet.Pyth" Version="6.0.8" />
<PackageReference Include="Solnet.Serum" Version="6.0.8" />
<PackageReference Include="Solnet.Programs" Version="6.0.12" />
<PackageReference Include="Solnet.Rpc" Version="6.0.12" />
<PackageReference Include="Solnet.Wallet" Version="6.0.12" />
<PackageReference Include="Solnet.KeyStore" Version="6.0.12" />
<PackageReference Include="Solnet.Pyth" Version="6.0.12" />
<PackageReference Include="Solnet.Serum" Version="6.0.12" />
</ItemGroup>

</Project>
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 @@ -18,9 +18,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Solnet.Rpc" Version="6.0.8" />
<PackageReference Include="Solnet.Wallet" Version="6.0.8" />
<PackageReference Include="Solnet.Serum" Version="6.0.8" />
<PackageReference Include="Solnet.Rpc" Version="6.0.12" />
<PackageReference Include="Solnet.Wallet" Version="6.0.12" />
<PackageReference Include="Solnet.Serum" Version="6.0.12" />
</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 @@ -23,10 +23,10 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageReference Include="Solnet.Programs" Version="6.0.8" />
<PackageReference Include="Solnet.Rpc" Version="6.0.8" />
<PackageReference Include="Solnet.Wallet" Version="6.0.8" />
<PackageReference Include="Solnet.Serum" Version="6.0.8" />
<PackageReference Include="Solnet.Programs" Version="6.0.12" />
<PackageReference Include="Solnet.Rpc" Version="6.0.12" />
<PackageReference Include="Solnet.Wallet" Version="6.0.12" />
<PackageReference Include="Solnet.Serum" Version="6.0.12" />
</ItemGroup>

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