clients api - muatik/financial-crawler GitHub Wiki
Common Client Methods
Here is the list of the common methods. Note that some clients may have all these methods, and others may not. Please check client's documentation to see which methods it has.
getStock(stockCode)
This method fetches the stock price from internet and returns it. stockCode
argument must vary according to clients. For example some clients/web sites call Turkish Airlines stock "THYAO", others "THYAO.IT". Please make sure the code is valid.
from financialCrawler impor clients
# fetches facebook's price
print clients.MarketWatch.getStock("FB")
{
"date": "2015-02-16T14:54:45.788342+00:00",
"price": 75.7
}
getParitiy(parityCode)
This method fetches the given parity from internet and returns its value. parityCode
argument must vary according to clients.
from financialCrawler impor clients
# fetches euro/usd parity
print clients.Google.getParity("eurousd")
{
"date": "2015-02-16T14:54:45.788342+00:00",
"parity": 1.16
}
getOil()
This method fetches the price of Brent oil from internet. (for example: http://tr.investing.com/commodities/brent-oil)
from financialCrawler impor clients
# fetches euro/usd parity
print clients.MarketWatch.getOil()
{
"date": "2015-02-16T14:54:45.788342+00:00",
"price": 58.2
}
Available Clients
1. Marketwatch Client
This is the client of http://www.marketwatch.com/ and supports the following common methods:
- getStock(stockCode)
- getParitiy(parityCode)
- getOil()
2. Google Client
This is the client of https://www.google.com/finance and supports the following common methods:
- getParitiy(parityCode)
3. TWSJ Client
This is the client of http://quotes.wsj.com and supports the following common methods:
- getOil()
4. Bigpara Client
This is the client of http://bigpara.com and supports the following common methods:
- getStock(stockCode)
Note: This client is good for Turkish stocks .
5. Uzmanpara Client
This is the client of http://uzmanpara.milliyet.com.tr and supports the following common methods:
- getStock(stockCode)
Note: This client is good for Turkish stocks .