google finance - How to get exchange rate with GoogleFinance on dates market is closed -


i can retrieve exchange rate on given date following command:

=googlefinance("audusd","price","09/15/2015") 

however if market closed day googlefinance returns "n/a":

=googlefinance("audusd","price","11/19/2015") 

how googlefinance me price though market closed?

i used following solution based on utc time:

import datetime dt  nowutc = dt.datetime.utcnow()                       today14= nowutc.replace(hour=14, minute=25, second=0, microsecond=0)     today21= nowutc.replace(hour=21, minute=5, second=0, microsecond=0)  if (nowutc >= today21 or today14 >= nowutc):    #go yahoo-finance , last value....  

this solution based on times @ market closed:

http://www.wisestockbuyer.com/2012/05/what-time-do-stock-markets-open-and-close/


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -