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

Normalize namespace to match all other Lean brokerages #20

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
2 changes: 1 addition & 1 deletion .github/workflows/gh-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
run: dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.CoinbaseBrokerage.sln

- name: Run Tests
run: dotnet test ./QuantConnect.CoinbaseBrokerage.Tests/bin/Release/QuantConnect.CoinbaseBrokerage.Tests.dll
run: dotnet test ./QuantConnect.CoinbaseBrokerage.Tests/bin/Release/QuantConnect.Brokerages.Coinbase.Tests.dll
9 changes: 4 additions & 5 deletions QuantConnect.CoinbaseBrokerage.Tests/CoinbaseApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
using System.Linq;
using NUnit.Framework;
using Newtonsoft.Json.Linq;
using QuantConnect.Brokerages;
using QuantConnect.Configuration;
using System.Collections.Generic;
using QuantConnect.CoinbaseBrokerage.Api;
using QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.CoinbaseBrokerage.Models.WebSocket;
using QuantConnect.Brokerages.Coinbase.Api;
using QuantConnect.Brokerages.Coinbase.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models.WebSocket;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
[TestFixture]
[Explicit("Use tests for more clarification of API")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using QuantConnect.Configuration;
using QuantConnect.Lean.Engine.DataFeeds;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
[TestFixture]
public class CoinbaseBrokerageAdditionalTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
using System.Collections.Generic;
using QuantConnect.Tests;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
/// <summary>
/// The class contains DataQueueHandler's tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using QuantConnect.Util;
using QuantConnect.Interfaces;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
[TestFixture]
public class CoinbaseBrokerageFactoryTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
using QuantConnect.Configuration;
using QuantConnect.Lean.Engine.DataFeeds;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
[TestFixture]
public class CoinbaseBrokerageHistoryProviderTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
using QuantConnect.Orders;
using QuantConnect.Interfaces;
using QuantConnect.Securities;
using QuantConnect.Brokerages;
using System.Collections.Generic;
using QuantConnect.Configuration;
using QuantConnect.Tests.Brokerages;
using QuantConnect.CoinbaseBrokerage.Api;
using QuantConnect.Brokerages.Coinbase.Api;
using QuantConnect.Lean.Engine.DataFeeds;
using QuantConnect.Tests.Common.Securities;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
[TestFixture]
public partial class CoinbaseBrokerageTests : BrokerageTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using QuantConnect.Util;
using QuantConnect.ToolBox;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
[TestFixture]
public class CoinbaseExchangeInfoDownloaderTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<Copyright>Copyright © 2021</Copyright>
<TestProjectType>UnitTest</TestProjectType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Product>QuantConnect.CoinbaseBrokerage.Tests</Product>
<AssemblyName>QuantConnect.CoinbaseBrokerage.Tests</AssemblyName>
<RootNamespace>QuantConnect.CoinbaseBrokerage.Tests</RootNamespace>
<AssemblyTitle>QuantConnect.CoinbaseBrokerage.Tests</AssemblyTitle>
<Product>QuantConnect.Brokerages.Coinbase.Tests</Product>
<AssemblyName>QuantConnect.Brokerages.Coinbase.Tests</AssemblyName>
<RootNamespace>QuantConnect.Brokerages.Coinbase.Tests</RootNamespace>
<AssemblyTitle>QuantConnect.Brokerages.Coinbase.Tests</AssemblyTitle>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.CoinbaseBrokerage.Tests/TestSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using QuantConnect.Logging;
using QuantConnect.Configuration;

namespace QuantConnect.CoinbaseBrokerage.Tests
namespace QuantConnect.Brokerages.Coinbase.Tests
{
[TestFixture]
public class TestSetup
Expand Down
4 changes: 1 addition & 3 deletions QuantConnect.CoinbaseBrokerage.ToolBox/CoinbaseDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@

using System;
using NodaTime;
using System.Linq;
using QuantConnect.Data;
using QuantConnect.Securities;
using QuantConnect.Brokerages;
using QuantConnect.Data.Market;
using QuantConnect.Configuration;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage.ToolBox
namespace QuantConnect.Brokerages.Coinbase.ToolBox
{
/// <summary>
/// Coinbase Data Downloader class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using QuantConnect.ToolBox;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage.ToolBox
namespace QuantConnect.Brokerages.Coinbase.ToolBox
{
public static class CoinbaseDownloaderProgram
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
using QuantConnect.ToolBox;
using System.Collections.Generic;
using QuantConnect.Configuration;
using QuantConnect.CoinbaseBrokerage.Api;
using QuantConnect.Brokerages.Coinbase.Api;

namespace QuantConnect.CoinbaseBrokerage.ToolBox
namespace QuantConnect.Brokerages.Coinbase.ToolBox
{
/// <summary>
/// Coinbase implementation of <see cref="IExchangeInfoDownloader"/>
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.CoinbaseBrokerage.ToolBox/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using QuantConnect.Configuration;
using static QuantConnect.Configuration.ApplicationParser;

namespace QuantConnect.CoinbaseBrokerage.ToolBox
namespace QuantConnect.Brokerages.Coinbase.ToolBox
{
internal static class Program
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © 2021</Copyright>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Product>QuantConnect.CoinbaseBrokerage.ToolBox</Product>
<AssemblyName>QuantConnect.CoinbaseBrokerage.ToolBox</AssemblyName>
<RootNamespace>QuantConnect.CoinbaseBrokerage.ToolBox</RootNamespace>
<AssemblyTitle>QuantConnect.CoinbaseBrokerage.ToolBox</AssemblyTitle>
<Product>QuantConnect.Brokerages.Coinbase.ToolBox</Product>
<AssemblyName>QuantConnect.Brokerages.Coinbase.ToolBox</AssemblyName>
<RootNamespace>QuantConnect.Brokerages.Coinbase.ToolBox</RootNamespace>
<AssemblyTitle>QuantConnect.Brokerages.Coinbase.ToolBox</AssemblyTitle>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
13 changes: 6 additions & 7 deletions QuantConnect.CoinbaseBrokerage/Api/CoinbaseApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@
using QuantConnect.Util;
using QuantConnect.Orders;
using System.Globalization;
using QuantConnect.Brokerages;
using QuantConnect.Securities;
using System.Collections.Generic;
using QuantConnect.CoinbaseBrokerage.Models;
using QuantConnect.CoinbaseBrokerage.Converters;
using QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.CoinbaseBrokerage.Models.Requests;
using BrokerageEnums = QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models;
using QuantConnect.Brokerages.Coinbase.Converters;
using QuantConnect.Brokerages.Coinbase.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models.Requests;
using BrokerageEnums = QuantConnect.Brokerages.Coinbase.Models.Enums;

namespace QuantConnect.CoinbaseBrokerage.Api;
namespace QuantConnect.Brokerages.Coinbase.Api;

public class CoinbaseApi : IDisposable
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.CoinbaseBrokerage/Api/CoinbaseApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
using System.Collections.Generic;
using System.Security.Cryptography;

namespace QuantConnect.CoinbaseBrokerage.Api;
namespace QuantConnect.Brokerages.Coinbase.Api;

/// <summary>
/// Coinbase api client implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using QuantConnect.Configuration;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage
namespace QuantConnect.Brokerages.Coinbase
{
/// <summary>
/// An implementation of <see cref="IDataQueueHandler"/> for Coinbase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
using System;
using QuantConnect.Data;
using QuantConnect.Logging;
using QuantConnect.Brokerages;
using QuantConnect.Data.Market;
using System.Collections.Generic;
using QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models.Enums;

namespace QuantConnect.CoinbaseBrokerage
namespace QuantConnect.Brokerages.Coinbase
{
/// <summary>
/// Coinbase Brokerage - IHistoryProvider implementation
Expand Down
11 changes: 5 additions & 6 deletions QuantConnect.CoinbaseBrokerage/CoinbaseBrokerage.Messaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@
using Newtonsoft.Json.Linq;
using System.Threading.Tasks;
using QuantConnect.Securities;
using QuantConnect.Brokerages;
using QuantConnect.Orders.Fees;
using QuantConnect.Data.Market;
using System.Collections.Generic;
using System.Collections.Concurrent;
using QuantConnect.CoinbaseBrokerage.Models;
using QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.CoinbaseBrokerage.Models.Constants;
using QuantConnect.CoinbaseBrokerage.Models.WebSocket;
using QuantConnect.Brokerages.Coinbase.Models;
using QuantConnect.Brokerages.Coinbase.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models.Constants;
using QuantConnect.Brokerages.Coinbase.Models.WebSocket;

namespace QuantConnect.CoinbaseBrokerage
namespace QuantConnect.Brokerages.Coinbase
{
public partial class CoinbaseBrokerage
{
Expand Down
6 changes: 3 additions & 3 deletions QuantConnect.CoinbaseBrokerage/CoinbaseBrokerage.Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* limitations under the License.
*/

using QuantConnect.CoinbaseBrokerage.Models;
using BrokerageEnums = QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models;
using BrokerageEnums = QuantConnect.Brokerages.Coinbase.Models.Enums;

namespace QuantConnect.CoinbaseBrokerage
namespace QuantConnect.Brokerages.Coinbase
{
/// <summary>
/// Utility methods for Coinbase brokerage
Expand Down
8 changes: 3 additions & 5 deletions QuantConnect.CoinbaseBrokerage/CoinbaseBrokerage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,16 @@
using Newtonsoft.Json.Linq;
using QuantConnect.Logging;
using QuantConnect.Packets;
using QuantConnect.Brokerages;
using QuantConnect.Securities;
using QuantConnect.Interfaces;
using QuantConnect.Orders.Fees;
using System.Collections.Generic;
using QuantConnect.Configuration;
using System.Security.Cryptography;
using System.Net.NetworkInformation;
using QuantConnect.CoinbaseBrokerage.Api;
using BrokerageEnums = QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Api;
using BrokerageEnums = QuantConnect.Brokerages.Coinbase.Models.Enums;

namespace QuantConnect.CoinbaseBrokerage
namespace QuantConnect.Brokerages.Coinbase
{
/// <summary>
/// Represents a partial class for interacting with the Coinbase brokerage using WebSocket communication.
Expand Down
3 changes: 1 addition & 2 deletions QuantConnect.CoinbaseBrokerage/CoinbaseBrokerageFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
using QuantConnect.Util;
using QuantConnect.Interfaces;
using QuantConnect.Securities;
using QuantConnect.Brokerages;
using QuantConnect.Configuration;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage
namespace QuantConnect.Brokerages.Coinbase
{
/// <summary>
/// Factory method to create Coinbase WebSockets brokerage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using Newtonsoft.Json;
using System.Globalization;

namespace QuantConnect.CoinbaseBrokerage.Converters;
namespace QuantConnect.Brokerages.Coinbase.Converters;

public class CoinbaseDecimalStringConverter : JsonConverter<decimal>
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.CoinbaseBrokerage/Models/CoinbaseAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;

/// <summary>
/// Business data of Coinbase account response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;

public readonly struct CoinbaseCancelOrdersResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models.Enums;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;

public readonly struct CoinbaseCreateOrderResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

using Newtonsoft.Json;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;

public readonly struct CoinbaseEditOrderResponse
{
Expand Down
4 changes: 2 additions & 2 deletions QuantConnect.CoinbaseBrokerage/Models/CoinbaseMarketTrades.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
using Newtonsoft.Json;
using System.Collections.Generic;
using Newtonsoft.Json.Converters;
using QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models.Enums;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;
public readonly struct CoinbaseMarketTrades
{
[JsonProperty("trades")]
Expand Down
4 changes: 2 additions & 2 deletions QuantConnect.CoinbaseBrokerage/Models/CoinbaseOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
using Newtonsoft.Json;
using System.Collections.Generic;
using Newtonsoft.Json.Converters;
using QuantConnect.CoinbaseBrokerage.Models.Enums;
using QuantConnect.Brokerages.Coinbase.Models.Enums;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;

/// <summary>
/// Business data of Coinbase order response
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.CoinbaseBrokerage/Models/CoinbaseProduct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;

/// <summary>
/// Business data of Coinbase products response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using Newtonsoft.Json.Converters;
using System.Collections.Generic;

namespace QuantConnect.CoinbaseBrokerage.Models;
namespace QuantConnect.Brokerages.Coinbase.Models;

public readonly struct CoinbaseProductCandles
{
Expand Down
Loading