-
Notifications
You must be signed in to change notification settings - Fork 189
Added 4 New Plugins, #41
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
prakash8083
commented
Jan 27, 2025
- BitStamp
- Gemini
- Kraken
- KuCoin
1. BitStamp 2. Gemini 3. Kraken 4. KuCoin
moved user order to private functions added binance private orders.
Significantly refactored codebase to improve performance, thread-safety, and maintainability. Commented out or removed various analytical functionalities, including statistical calculations and PnL calculations. Introduced new classes and methods for better handling of positions and orders, and improved concurrency control using `ReaderWriterLockSlim`. Enhanced unit testing capabilities by adding new test classes and methods to validate order book updates, position management, and private message handling. Introduced a new testing framework project targeting .NET 8.0, including methods for injecting test data and executing scenarios. Updated project and solution files to reflect the inclusion of new resources and the removal of obsolete references. Improved logging and subscription mechanisms in `GenericTradesRetriever` and refactored `KuCoinPlugin` for better sequence handling and unit testing support.
- Added `throw` statement in `HelperOrderBook.cs` after logging errors. - Added new constructor and `FilledPrice` property in `Order.cs`. - Removed unnecessary `using` directives in `Position.cs`. - Added scenarios to `eTestingPrivateMessageScenario` enum. - Updated various package versions in multiple project files. - Introduced `ITestOutputHelper` in `MarketDataTests.cs` for logging. - Refactored `PrivateMessageTests.cs` to streamline namespaces. - Implemented `IDataRetrieverTestable` interface in `GeminiPlugin.cs` and `KrakenPlugin.cs`. - Added new test class `PluginFunctionalTests` and `JsonParser` class. - Added JSON scenarios for order execution updates. - Updated `App.config` and `demoTradingCore.csproj` for bindingRedirects and HintPaths. - Added detailed order execution snapshots in `PrivateMessages_Scenario9.json`.
Added a validation check in `Position.cs` to ensure that the symbol of a new execution order matches the symbol of the position. Introduced new test methods in `MarketDataTests.cs` and `PositionTests.cs` to verify various scenarios including handling of combined market data deltas, adding orders with different symbols, updating mid prices, FIFO order aggregation, and updating non-existing orders. Corrected exposure and net position calculations to ensure they are positive and fixed the status assertion to check for `CANCELED` instead of `FILLED` in `PrivateMessageTests.cs`.
…nto new-plugins
- Added `Reset` method to `HelperOrderBook` to unsubscribe all subscribers. - Updated `PluginFunctionalTests.cs` to include `VisualHFT.Commons.Helpers` and removed `System.Reflection.Metadata`. - Added calls to `HelperOrderBook.Instance.Reset()` in multiple test cases in `PluginFunctionalTests.cs`. - Added exception handling in `Test_Plugin_CheckForCrossSpreadAfter5secs_Async` to ensure order book is not null after 10 seconds. - Updated project reference in `VisualHFT.DataRetriever.TestingFramework.csproj` to include `MarketConnectors.KuCoin` instead of `MarketConnectors.Kraken`. - Modified `KuCoinPlugin.cs` to manage event buffer consumer during order book snapshot loading. - Added multiple new JSON message scenarios to `MarketConnectors.KuCoin.csproj` and ensured they are copied to the output directory. - Updated `PrivateMessages_Scenario1.json` with new order change messages. - Added empty JSON arrays to several scenario files. - Added new order change messages to `PrivateMessages_Scenario3.json`.
Refactored `DeleteLevel` in `OrderBook.cs` to include `EntryID` checks and updated logic. Enhanced `MarketDataTests.cs` with `EntryID` values. Introduced `ITestOutputHelper` in `PrivateMessageTests.cs` for detailed test output. Updated `VisualHFT.DataRetriever.TestingFramework.csproj` with new project references. Enhanced `BitfinexPlugin.cs` with new using directives, implemented `IDataRetrieverTestable`, and refactored to use `BitfinexRawOrderBookEntry`. Added methods for unit testing and JSON files for private message scenarios. Removed order execution updates from multiple JSON files and completely removed `PrivateMessages_Scenario9.json`. Updated JSON file paths in `KrakenPlugin.cs`, `MarketConnectors.Kraken.csproj`, `KuCoinPlugin.cs`, and `MarketConnectors.KuCoin.csproj`. Added new JSON data to various `PrivateMessages_Scenario` files and marked some scenarios as invalid. Added empty JSON arrays to several scenario files.
- Enhanced test output readability and ensured clear logging of successful test executions. - Improved robustness and clarity of the test suite.
Implemented Test Cases for Binance
Added Testing Messages in Gemini
Added Test scenarios in Kucoin
- Restructured `bidDeltaModel` and `askDeltaModel` in `MarketDataTests.cs` for improved readability. - Updated `PluginFunctionalTests.cs` to rename a test method, add error handling, and enhance test reporting. - Improved consistency and logging in `PrivateMessageTests.cs`. - Expanded project references in `VisualHFT.DataRetriever.TestingFramework.csproj` to include new market connectors (Bitfinex, Coinbase, Gemini, Kraken, KuCoin). - Modified `xunit.runner.json` to disable parallel test execution for better debugging.
- Added thread safety to the Reset method in HelperOrderBook. - Defaulted FilterBidAskByMaxDepth to true in OrderBook constructors. - Updated logic for retrieving Asks and Bids to consider MaxDepth. - Upgraded log4net package from version 3.0.3 to 3.0.4.
Refactor `BitfinexPlugin.cs` to replace `BitfinexRawOrderBookEntry` with `BitfinexOrderBookEntry`, updating method signatures and event buffers accordingly. Adjust logging messages and order book update handling to align with the new data structures. Additionally, upgrade `log4net` package from version `3.0.3` to `3.0.4` for potential bug fixes and improvements.
- Introduced `TruncateItemsAfterPosition(int v)` in `CachedCollection` for managing internal list size. - Updated `_taskConsumer` disposal logic in `HelperCustomQueue` to prevent deadlocks and added a `Dispose(bool disposing)` method. - Added validation in `OrderBook` constructor to ensure `maxDepth` is greater than zero. - Enhanced item addition logic in `OrderBook` to respect `MaxDepth` limits and truncate as necessary. - Improved logging format in `CustomObjectPool` for better clarity on method calls and utilization.
- refactored all Tests to be able to run all at once. - Introduced `ErrorReporting` class and `PrintCollectedError` method in `MarketDataTests` for improved error aggregation and reporting. - Updated `PluginFunctionalTests` to utilize the new error handling mechanism. - Updated package references for `Fody` and `log4net` in `VisualHFT.csproj`. - Added project references for `MarketConnectors.Coinbase` and `MarketConnectors.KuCoin`. - Created new `ErrorReporting` and `ErrorMessageTypes` classes for better organization of error handling logic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.