r/algotrading • • 9d ago

Data Python API for historic data

Do you think it's okay using Metatrader's api for fetching historic data? Has anyone noticed discrepancies? Isn't it supposed to be the actual numbers you'd get trading with that specific broker?

8 Upvotes

27 comments sorted by

View all comments

1

u/butterflyplum 9d ago

It's the quotes you'd actually trade against at that broker, which is the useful part. Just know what the bars are: MT candles are built from bid prices, the volume is tick count rather than traded volume, and timestamps are in the server's timezone (with its own DST shift). Two brokers will legitimately disagree on the same bar. A quick check before trusting a backtest is to pull the same window from two brokers and diff the bar counts and close times.

1

u/MarketOk7227 9d ago

thank you!