Fetching Previous Prices For Forex Currencies

 

Is There Any Library Available With MQL5 or Trading view where i can get live rates of a particular currency varied per second or per minute in a previous time

for example i need the data of previous week Is there any Api For It ?

 
In MQL5 you would use CopyTicks or CopyTicksRange to get tick data.

Then you can compose any timeframe from that.

If you are looking for TF equal or above 1 Minute, use CopyRates function.