feat(bot): add FinlyticBot autonomous paper trading microservice with Alpaca Markets API integration

This commit is contained in:
2026-08-17 16:32:47 +02:00
parent 3972507cb0
commit 5497cc5de7
21 changed files with 1924 additions and 14 deletions
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Alpaca.Markets;
using FinlyticCore.Models.Trades;
namespace FinlyticBot.Services;
public record BrokerAccountInfo(
decimal Equity,
decimal BuyingPower,
decimal Cash,
string Currency,
bool IsBlocked
);
public interface IAlpacaBrokerService
{
Task<BrokerAccountInfo?> GetAccountInfoAsync(CancellationToken ct = default);
Task<IAsset?> GetAssetAsync(string symbol, CancellationToken ct = default);
Task<IClock?> GetMarketClockAsync(CancellationToken ct = default);
Task<IOrder?> PlaceBracketOrderAsync(TradeProposalDto proposal, decimal quantity, string orderType = "Limit", CancellationToken ct = default);
Task<bool> CancelOrderAsync(Guid orderId, CancellationToken ct = default);
Task<IReadOnlyList<IOrder>> GetOpenOrdersAsync(CancellationToken ct = default);
}