How I can connect my DB with API for backtesting ?

How I can connect my DB with API for backtesting ?