This Pull Request introduces the implementation of trade execution and order management methods within the Exchange Trade Service, using the CCXT library for interaction with supported exchanges. The service ensures that every exchange operation affecting the exchange state, such as order creation or cancellation, is saved in the database via the Exchange Operation Service.
Summary of changes
Implemented executeMarketTrade method: Executes a market trade for a specified symbol and amount on a given exchange.
Implemented executeLimitTrade method: Executes a limit trade with a specified price and amount on a given exchange.
Implemented cancelOrder method: Cancels an existing order based on the provided order ID and symbol on a given exchange.
Integrated database logging: Ensured that each trade operation (market trade, limit trade, and order cancellation) is logged to the database through the Exchange Operation Service.
Added unit tests: Verified the correct functionality of all methods, ensuring they handle various edge cases and errors appropriately.
Documentation: Updated the service documentation to include details on the new methods, their usage, and examples.
Description
This Pull Request introduces the implementation of trade execution and order management methods within the Exchange Trade Service, using the CCXT library for interaction with supported exchanges. The service ensures that every exchange operation affecting the exchange state, such as order creation or cancellation, is saved in the database via the Exchange Operation Service.
Summary of changes
executeMarketTrade
method: Executes a market trade for a specified symbol and amount on a given exchange.executeLimitTrade
method: Executes a limit trade with a specified price and amount on a given exchange.cancelOrder
method: Cancels an existing order based on the provided order ID and symbol on a given exchange.Related issues
Fixes #4