Querying the real time aggregate databse

I am trying to query the real time aggregate database using the code given below.

from quantrocket import get_prices
prices = get_prices(
    end_date ='2024-03-14' ,
    fields=["AskPriceClose", "BidPriceClose"]

But for some reason it is also giving the data of 13th march .


I can see in the logs that there a get request made

quantrocket-houston-1| - - [24/Mar/2024:14:56:02 +0000] "GET /realtime/ibkr-fx-eurusd-1min.csv?start_date=2024-03-14&end_date=2024-03-14&fields=BidPriceClose&fields=AskPriceClose HTTP/1.1" 200 67422 "-" "python-urllib3/2.1.0"

but unable to understand why i am getting data for 2024-03-13 as well

The realtime database stores prices in UTC, and that's how your query dates are interpreted by the realtime service. Moreover, if you query with quantrocket.realtime.download_market_data_file, the prices will be returned in UTC, which would be the result you expect.

But get_prices is a higher-level wrapper that, by default, converts timestamps to the local timezone of the security. The timezone for FX, by convention, is America/New_York (see securities master record for FXEURUSD), so the UTC dates partially end up on the prior day.

If you don't want that behavior, your choices are to specify a desired timezone with your date queries; pass infer_timezone=False to get_prices (see API Reference); or use download_market_data_file.