Skip to content

GetClosePrices() возвращает некорректные данные #412

@nonamegithub

Description

@nonamegithub

Уже было, собственно.
Для примера, цены закрытия на MTLR И MTLRP метод GetClosePrices() возвращает некорректные. Второй момент, не особо важный: с чем связаны различия входных параметров методов GetClosePrices() и GetLastPrices(), схожих по своей сути? Может есть смысл привести к варианту, используемому в GetClosePrices()?

var tinkoff_v2 = require('../tinkoff_v2.js');

var api = new tinkoff_v2({
    'token': process.argv[2]
});


(async function main() {
    let closePrices = await api.MarketData.GetClosePrices({
        instruments: [{ "instrument_id": "eb4ba863-e85f-4f80-8c29-f2627938ee58" }, { "instrument_id": "c1a3c440-f51c-4a75-a400-42a2a74f5f2b" }]
    });
    console.log(closePrices);
    let lastPrices = await api.MarketData.GetLastPrices({
        instrument_id: ["eb4ba863-e85f-4f80-8c29-f2627938ee58", "c1a3c440-f51c-4a75-a400-42a2a74f5f2b"]
    });
    console.log(lastPrices);
})();

Результат:
{
close_prices: [
{
figi: 'BBG004S68598',
instrument_uid: 'eb4ba863-e85f-4f80-8c29-f2627938ee58',
price: 191.2,
time: 2023-05-11T20:50:01.358Z
},
{
figi: 'BBG004S68FR6',
instrument_uid: 'c1a3c440-f51c-4a75-a400-42a2a74f5f2b',
price: 207.1,
time: 2023-05-11T20:50:01.358Z
}
]
}
{
last_prices: [
{
figi: 'BBG004S68598',
price: 184.62,
time: 2023-05-12T08:45:12.998Z,
instrument_uid: 'eb4ba863-e85f-4f80-8c29-f2627938ee58'
},
{
figi: 'BBG004S68FR6',
price: 200.3,
time: 2023-05-12T08:45:04.449Z,
instrument_uid: 'c1a3c440-f51c-4a75-a400-42a2a74f5f2b'
}
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions