feat(bot): add FinlyticBot autonomous paper trading microservice with Alpaca Markets API integration
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user