Skip to main content

Interface: HistoryMetadata

Datafeed.HistoryMetadata

Information passed to onHistoryCallback for getBars.

Properties​

nextTime​

Optional

nextTime: number

The time of the next available bar in history. The time value should be represented with a Unix timestamp in milliseconds, the same as Bar.time. For example, if the closest bar before the requested range has time: 1428001140000, pass nextTime: 1428001140000.

You can pass the nextTime value to the library if there is no data in the time range that the library requests. Therefore, you notify the library about available data before the requested range and ensure that the next data request is for the right range. For more information, refer to the How nextTime works section.

Note that the UDF protocol sends nextTime in seconds, and the UDF adapter converts it to milliseconds. For backward compatibility, the library also accepts nextTime in seconds and logs a warning to the console.


noData​

Optional

noData: boolean

Optional value indicating to the library that there is no more data on the server.