From 760676f6b6d80d0e43b45aa508b60566cf638ae4 Mon Sep 17 00:00:00 2001 From: TerenceLau Date: Wed, 9 Jun 2021 10:54:56 +0800 Subject: [PATCH] Updated 2 Example: Market Data (markdown) --- 2-Example:-Market-Data.md | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/2-Example:-Market-Data.md b/2-Example:-Market-Data.md index 2988314..74a76e7 100644 --- a/2-Example:-Market-Data.md +++ b/2-Example:-Market-Data.md @@ -3,10 +3,11 @@ Dukascopy Bank is a Swiss online bank which provides online and mobile trading, banking and financial services. We can get the historical data from [Dukascopy](https://www.dukascopy.com/trading-tools/widgets/quotes/historical_data_feed), here is an example: ```python -from CEDA.Market.market import dukascopy +from CEDA.market.duka import dukascopy df = dukascopy(instrument = "btcusd", startdate = "2020-01-01", enddate = "2021-01-01", + timeframe = "d1", pricetype = "bid", volume = True, flat = True) @@ -16,9 +17,29 @@ df = dukascopy(instrument = "btcusd", [Marketwatch](https://www.marketwatch.com/) is a website that provides financial information, business news, analysis, and stock market data. Alone with The Wall Street Journal and Barron's, it is a subsidiary of Dow Jones & Company, a property of News Corp. +This data's timeframe are *1-Day* + ```python -from CEDA.Market.market import currency_list -df = currency_list(instrument = "eurusd", - startdate = "01/01/2020", - enddate = "01/01/2021") +from CEDA.market.marketwatch import forex, index, crypto, stock + +## Forex +df = forex(instrument = "eurusd", + startdate = "2020-01-01", + enddate = "2021-06-01") + +## index +df = index(instrument="vix", + startdate="2019-01-01", + enddate="2021-01-01") + +## crypto +df = crypto(instrument="btcusd", + startdate="2019-01-01", + enddate="2021-01-01") + +## stock +df = stock(countrycode="cn", + instrument="601988", + startdate="2019-01-01", + enddate="2021-01-01") ```