-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for fromTime on Candles #36
Comments
Hi @voros1! Unfortunately, the TimeSeriesSubscription is not currently supported. But we plan to add it soon, as a workaround you can now use TimeSeriesSubscriptionSymbol. You can test it using DxFeed.Graal.Net.Tool, for example: Output:
Here's a complete example: using System;
using System.Threading;
using System.Threading.Tasks;
using DxFeed.Graal.Net.Api;
using DxFeed.Graal.Net.Api.Osub;
using DxFeed.Graal.Net.Events.Candles;
namespace Sample;
internal abstract class Program
{
public static async Task Main(string[] args)
{
var endpoint = DXEndpoint.Create().Connect("demo.dxfeed.com:7300");
var sub = endpoint.GetFeed().CreateSubscription(typeof(Candle));
sub.AddEventListener(events =>
{
foreach (var candle in events)
{
Console.WriteLine(candle);
}
});
sub.AddSymbols(new TimeSeriesSubscriptionSymbol("/ESM23:XCME{=15m}", 0));
await Task.Delay(Timeout.Infinite);
}
} |
I also added a new “CandleSample" (as in our old .NET API), which shows how to use CandleSymbol. Best regards, |
Hello,
The documentation here (which I assume is for the 'legacy' version) says that the 'fromTime' parameter
https://kb.dxfeed.com/en/data-services/aggregated-data-services/how-to-request-candles.html
may be included as so:
IDxSubscription candleSubscription = con.CreateSubscription(fromTime, new CandleListener());
The graal-net-api version doesn't seem to support a fromTime parameter.
On a related note:
While a simple symbol such as
/ESM23:XCME is supported correctly by graal-net-api, the full symbol specifications as in the link above, such as:
/ESM23:XCME{=15m}
don't seem to work via the graal-net-api
This appears to be the symbol that
https://tools.dxfeed.com/webservice/chart-demo.jsp
is using though.
Thank You.
The text was updated successfully, but these errors were encountered: