0
2 Example: Market Data
TerenceLau edited this page 2022-01-01 18:31:49 +08:00
- Dukascopy
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, here is an example:
from CEDA.market.duka import dukascopy
df = dukascopy(instrument = "btcusd",
startdate = "2020-01-01",
enddate = "2021-01-01",
timeframe = "d1",
pricetype = "bid",
utc = 0,
volume = True,
flat = True)
timeframe: h1, h4, d1, mn1 -> 1 hour, 4 hour, 1 day, 1 month;
if you need "tick" or "minutes data"(1 min, 5 mins, 15 mins, 30 mins), please contact me
- Marketwatch
Marketwatch 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
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")