Skip to content
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
2 changes: 1 addition & 1 deletion Common/Brokerages/BrokerageName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ public enum BrokerageName
/// <summary>
/// Transaction and submit/execution rules will use dYdX models
/// </summary>
dYdX
DYDX
}
}
2 changes: 1 addition & 1 deletion Common/Brokerages/IBrokerageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public static IBrokerageModel Create(IOrderProvider orderProvider, BrokerageName
case BrokerageName.Tastytrade:
return new TastytradeBrokerageModel(accountType);

case BrokerageName.dYdX:
case BrokerageName.DYDX:
return new dYdXBrokerageModel(accountType);

default:
Expand Down
4 changes: 2 additions & 2 deletions Common/Brokerages/dYdXBrokerageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class dYdXBrokerageModel : DefaultBrokerageModel
/// <summary>
/// Gets a map of the default markets to be used for each security type
/// </summary>
public override IReadOnlyDictionary<SecurityType, string> DefaultMarkets { get; } = GetDefaultMarkets(Market.dYdX);
public override IReadOnlyDictionary<SecurityType, string> DefaultMarkets { get; } = GetDefaultMarkets(Market.DYDX);

/// <summary>
/// Initializes a new instance of the <see cref="dYdXBrokerageModel"/> class
Expand Down Expand Up @@ -95,7 +95,7 @@ public override IMarginInterestRateModel GetMarginInterestRateModel(Security sec
/// <returns>The benchmark for this brokerage</returns>
public override IBenchmark GetBenchmark(SecurityManager securities)
{
var symbol = Symbol.Create("BTCUSD", SecurityType.CryptoFuture, Market.dYdX);
var symbol = Symbol.Create("BTCUSD", SecurityType.CryptoFuture, Market.DYDX);
return SecurityBenchmark.CreateInstance(securities, symbol);
//todo default conversion?
}
Expand Down
2 changes: 1 addition & 1 deletion Common/Currencies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public static class Currencies
{ Market.Bitfinex , _stableCoinsWithoutPairsBitfinex},
{ Market.Coinbase, _stableCoinsWithoutPairsCoinbase},
{ Market.Bybit , _stableCoinsWithoutPairsBybit},
{ Market.dYdX , _stableCoinsWithoutPairsdYdX}
{ Market.DYDX , _stableCoinsWithoutPairsdYdX}
};

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Common/Market.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static class Market
Tuple.Create(InteractiveBrokers, 39),
Tuple.Create(EUREX, 40),
Tuple.Create(OSE, 41),
Tuple.Create(dYdX, 42)
Tuple.Create(DYDX, 42)
};

static Market()
Expand Down Expand Up @@ -265,7 +265,7 @@ static Market()
/// <summary>
/// dYdX market
/// </summary>
public const string dYdX = "dydx";
public const string DYDX = "dydx";

/// <summary>
/// Adds the specified market to the map of available markets with the specified identifier.
Expand Down
2 changes: 1 addition & 1 deletion Common/Securities/Cash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public List<SubscriptionDataConfig> EnsureCurrencyDataFeed(SecurityManager secur
var cfdEntries = GetAvailableSymbolPropertiesDatabaseEntries(SecurityType.Cfd, marketMap, markets);
var cryptoEntries = GetAvailableSymbolPropertiesDatabaseEntries(SecurityType.Crypto, marketMap, markets);

if (marketMap.TryGetValue(SecurityType.CryptoFuture, out var cryptoFutureMarket) && cryptoFutureMarket == Market.dYdX)
if (marketMap.TryGetValue(SecurityType.CryptoFuture, out var cryptoFutureMarket) && cryptoFutureMarket == Market.DYDX)
{
// Put additional logic for dYdX crypto futures as they don't have Crypto (Spot) market
// Also need to add them first to give the priority
Expand Down
6 changes: 3 additions & 3 deletions Tests/Common/Securities/CashTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,14 @@ public void EnsureCurrencyDataFeedForCryptoCurrency_CryptoFuturesFirst_When_dYdX
var securities = new SecurityManager(TimeKeeper);

var marketMapWithdYdX = MarketMap.ToDictionary();
marketMapWithdYdX[SecurityType.CryptoFuture] = Market.dYdX;
marketMapWithdYdX[SecurityType.CryptoFuture] = Market.DYDX;

book.EnsureCurrencyDataFeeds(securities, subscriptions, marketMapWithdYdX, SecurityChanges.None, dataManager.SecurityService);

var symbols = dataManager.SubscriptionManagerSubscriptions.Select(sdc => sdc.Symbol).ToHashSet();

Assert.IsTrue(symbols.Contains(Symbol.Create("BTCUSD", SecurityType.CryptoFuture, Market.dYdX)));
Assert.IsTrue(symbols.Contains(Symbol.Create("ETHUSD", SecurityType.CryptoFuture, Market.dYdX)));
Assert.IsTrue(symbols.Contains(Symbol.Create("BTCUSD", SecurityType.CryptoFuture, Market.DYDX)));
Assert.IsTrue(symbols.Contains(Symbol.Create("ETHUSD", SecurityType.CryptoFuture, Market.DYDX)));

foreach (var subscription in subscriptions.Subscriptions)
{
Expand Down
Loading