from datetime import datetime
from typing import List
from typing import Optional


def get_ftx_candle_pagination_id(
    timestamp: datetime, last_data: List[dict] = [], data: List[dict] = []
) -> Optional[float]:
    """Get FTX candle pagination_id.

    Pagination details: https://docs.ftx.com/#get-historical-prices
    """
    if len(data):
        return data[-1]["time"]