Skip to content

Commit 792318b

Browse files
[FIX] [Bitfinex] Fixed market symbol separator (#699) (#707)
1 parent aab2fc0 commit 792318b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/ExchangeSharp/API/Exchanges/Bitfinex/ExchangeBitfinexAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private ExchangeBitfinexAPI()
6262
["ZEC"] = "zcash",
6363
};
6464

65-
MarketSymbolSeparator = string.Empty;
65+
MarketSymbolSeparator = ":";
6666
}
6767

6868
public override string PeriodSecondsToString(int seconds)

tests/ExchangeSharpTests/ExchangeBitfinexTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ The above copyright notice and this permission notice shall be included in all c
1414
using ExchangeSharp;
1515
using System.Net;
1616
using System.Security;
17+
using System;
18+
using FluentAssertions;
1719

1820
namespace ExchangeSharpTests
1921
{
@@ -40,5 +42,16 @@ public void SubmitStopMarginOrder()
4042
api.PublicApiKey = _pubKey;
4143
ExchangeOrderResult result = api.PlaceOrderAsync(order).Result;
4244
}
45+
46+
[TestMethod]
47+
public void GetDataFromMarketWithSpecialChar()
48+
{
49+
IExchangeAPI api = ExchangeAPI.GetExchangeAPIAsync("Bitfinex").Result;
50+
string marketTicker = "DOGE:USD";
51+
DateTime start = new DateTime(2021, 12, 1);
52+
DateTime end = DateTime.Today;
53+
System.Collections.Generic.IEnumerable<MarketCandle> result = api.GetCandlesAsync(marketTicker, 86400, start, end, 1000).Result;
54+
result.Should().HaveCountGreaterThan(0, "Returned data");
55+
}
4356
}
4457
}

0 commit comments

Comments
 (0)