Skip to content

Commit

Permalink
[FIX] [Bitfinex] Fixed market symbol separator (#699) (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusKlauck authored Dec 14, 2021
1 parent aab2fc0 commit 792318b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private ExchangeBitfinexAPI()
["ZEC"] = "zcash",
};

MarketSymbolSeparator = string.Empty;
MarketSymbolSeparator = ":";
}

public override string PeriodSecondsToString(int seconds)
Expand Down
13 changes: 13 additions & 0 deletions tests/ExchangeSharpTests/ExchangeBitfinexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ The above copyright notice and this permission notice shall be included in all c
using ExchangeSharp;
using System.Net;
using System.Security;
using System;
using FluentAssertions;

namespace ExchangeSharpTests
{
Expand All @@ -40,5 +42,16 @@ public void SubmitStopMarginOrder()
api.PublicApiKey = _pubKey;
ExchangeOrderResult result = api.PlaceOrderAsync(order).Result;
}

[TestMethod]
public void GetDataFromMarketWithSpecialChar()
{
IExchangeAPI api = ExchangeAPI.GetExchangeAPIAsync("Bitfinex").Result;
string marketTicker = "DOGE:USD";
DateTime start = new DateTime(2021, 12, 1);
DateTime end = DateTime.Today;
System.Collections.Generic.IEnumerable<MarketCandle> result = api.GetCandlesAsync(marketTicker, 86400, start, end, 1000).Result;
result.Should().HaveCountGreaterThan(0, "Returned data");
}
}
}

0 comments on commit 792318b

Please sign in to comment.