Create a gist now

Instantly share code, notes, and snippets.

public IObservable<IStale<ITrade>> ExecuteRequest(IExecutablePrice executablePrice, long notional, string dealtCurrency)
{
var price = executablePrice.Parent;
var request = new TradeRequestDto
{
Direction = executablePrice.Direction == Direction.BUY ? DirectionDto.Buy : DirectionDto.Sell,
Notional = notional,
SpotRate = executablePrice.Rate,
Symbol = price.CurrencyPair.Symbol,
ValueDate = price.ValueDate,
DealtCurrency = dealtCurrency
};
return _executionServiceClient.ExecuteRequest(request)
.Select(_tradeFactory.Create)
.DetectStale(TimeSpan.FromSeconds(2), _concurrencyService.TaskPool);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment