-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
enhancementNew feature or requestNew feature or requestepic:tradingEpic: AutoTrading AdaptersEpic: AutoTrading Adaptersv2.0Target: v2.0 releaseTarget: v2.0 release
Description
User Story
As a library maintainer, I want a clean trading adapter interface so that new broker integrations can be easily added.
Acceptance Criteria
-
IAutoTradeAdapterinterface with order methods -
TradeOrderrecord with order details:- Symbol
- Side (Buy/Sell)
- OrderType (Market/Limit/Stop)
- Quantity
- LimitPrice (optional)
- StopPrice (optional)
- TimeInForce
-
TradeResultfor order status - Async-first design
- Position tracking interface
Interface Design
public interface IAutoTradeAdapter : IAsyncDisposable
{
string AdapterType { get; }
bool IsLiveTradingEnabled { get; }
Task<TradeResult> SubmitOrderAsync(TradeOrder order, CancellationToken ct = default);
Task<Position?> GetPositionAsync(SymbolId symbol, CancellationToken ct = default);
Task<IReadOnlyList<TradeOrder>> GetOpenOrdersAsync(CancellationToken ct = default);
Task<bool> CancelOrderAsync(string orderId, CancellationToken ct = default);
}
public record TradeOrder(
SymbolId Symbol,
OrderSide Side,
OrderType Type,
decimal Quantity,
decimal? LimitPrice = null,
decimal? StopPrice = null,
TimeInForce TimeInForce = TimeInForce.Day);Dependencies
- [Epic 5.1] Create SignalCatalog
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestepic:tradingEpic: AutoTrading AdaptersEpic: AutoTrading Adaptersv2.0Target: v2.0 releaseTarget: v2.0 release