Tinkoff / invest-openapi-csharp-sdk

Apache License 2.0
100 stars 33 forks source link

MarketCandlesAsync(): Неверный формат поля 'from' в запросе #29

Closed sergeykorobeynikov closed 4 years ago

sergeykorobeynikov commented 4 years ago
        var connection = ConnectionFactory.GetSandboxConnection(sandboxToken);
        var context = connection.Context;
        var from = new DateTime(2020, 3, 19, 10, 0, 0);
        var to = new DateTime(2020, 3, 19, 17, 59, 59);

        var marketCandles = context.MarketCandlesAsync("BBG004731489", from, to, CandleInterval.Minute)
            .Result
            .Candles;

OpenApiException: MALFORMED_QUERY_PARAMETER: Неверный формат поля 'from' в запросе (a6df22e00b1194bf).

So?)

NikitaMelnikov commented 4 years ago

Не указана временная зона

sergeykorobeynikov commented 4 years ago

OMG, дефолтом бы MSK или UTC прописали... Спасибо за оперативность!