new Tefas(name)
Initializes the wrapper for the specified fund name
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Fund Name (Can be upper or lower case) |
Classes
Methods
(async) fetchComparisons(period) → {JSON}
Fetches 8 comparisons (ALTIN, BIST100, BIST30, EUR, MEVDUAT FAIZI, SERBEST SEMSIYE FONU, TUFE, USD)
along with the fund return for the given period
Parameters:
| Name | Type | Description |
|---|---|---|
period |
Number | Can only be weekly (13), YTD(0), 1 month(1), 3 months(3), 6 months(6), 1 year(12), 3 years(36), 5 years(60) Default to 1 year |
Returns:
An array containing 9 elements
- Type
- JSON
(async) fetchFundType() → {String}
Fetches the type of the fund
Returns:
Fund type as returned by the API.
Possible results: F (For mutual funds), M (For retirement funds)
Possible results: F (For mutual funds), M (For retirement funds)
- Type
- String
(async) fetchPrice(period) → {JSON}
Fetches the historical price data of the fund
Parameters:
| Name | Type | Description |
|---|---|---|
period |
Number | Can only be weekly (13), YTD(0), 1 month(1), 3 months(3), 6 months(6), 1 year(12), 3 years(36), 5 years(60) Default to 1 month |
Returns:
Historical price data as returned by the API
- Type
- JSON
(async, static) fetchForexList() → {JSON}
Returns the list of all forex currencies used for the website
Returns:
An array containing the currencies
- Type
- JSON
(async, static) fetchFundList() → {JSON}
Returns the list of all funds on TEFAS
Returns:
An array containing all funds with their relative informations
- Type
- JSON