Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
Finance /
Quote /
[ HOME SHELL ]
Name
Size
Permission
Action
CurrencyRates
[ DIR ]
drwxr-xr-x
AEX.pm
5.76
KB
-rw-r--r--
ASEGR.pm
5.26
KB
-rw-r--r--
ASX.pm
10.78
KB
-rw-r--r--
AlphaVantage.pm
12.23
KB
-rw-r--r--
BSEIndia.pm
4.59
KB
-rw-r--r--
Bloomberg.pm
2.68
KB
-rw-r--r--
Bourso.pm
6.71
KB
-rw-r--r--
CSE.pm
3.13
KB
-rw-r--r--
Cdnfundlibrary.pm
5.34
KB
-rw-r--r--
Comdirect.pm
4.32
KB
-rw-r--r--
Currencies.pm
32.6
KB
-rw-r--r--
DWS.pm
4.36
KB
-rw-r--r--
Deka.pm
3.17
KB
-rw-r--r--
FTfunds.pm
11.55
KB
-rw-r--r--
Fidelity.pm
4.72
KB
-rw-r--r--
Finanzpartner.pm
4.05
KB
-rw-r--r--
Fondsweb.pm
5.29
KB
-rw-r--r--
Fool.pm
5.2
KB
-rw-r--r--
Fundata.pm
5.96
KB
-rw-r--r--
GoldMoney.pm
7.66
KB
-rw-r--r--
HU.pm
7.07
KB
-rw-r--r--
IEXCloud.pm
4.94
KB
-rw-r--r--
IndiaMutual.pm
4.71
KB
-rw-r--r--
MStaruk.pm
9.13
KB
-rw-r--r--
MorningstarAU.pm
5.05
KB
-rw-r--r--
MorningstarJP.pm
5.55
KB
-rw-r--r--
NSEIndia.pm
4.87
KB
-rw-r--r--
NZX.pm
3.25
KB
-rw-r--r--
OnVista.pm
7.54
KB
-rw-r--r--
Oslobors.pm
2.29
KB
-rw-r--r--
SEB.pm
3.96
KB
-rw-r--r--
SIX.pm
5.45
KB
-rw-r--r--
TMX.pm
5.83
KB
-rw-r--r--
TSP.pm
4.35
KB
-rw-r--r--
Tiaacref.pm
13.85
KB
-rw-r--r--
Tradeville.pm
3.88
KB
-rw-r--r--
Troweprice.pm
5
KB
-rw-r--r--
USFedBonds.pm
4.89
KB
-rw-r--r--
Union.pm
4.5
KB
-rw-r--r--
UserAgent.pm
3.25
KB
-rw-r--r--
XETRA.pm
4.59
KB
-rw-r--r--
YahooJSON.pm
8.21
KB
-rw-r--r--
ZA.pm
3.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : MorningstarJP.pm
# # Copyright (C) 2012, Christopher Hill # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # $Id: $ # package Finance::Quote::MorningstarJP; require 5.006; use strict; use warnings; use base 'Exporter'; use DateTime; use vars qw( $MORNINGSTAR_JP_URL); our @EXPORT_OK = qw(morningstarjp methods labels); our $VERSION = '1.51'; # VERSION # NAV information (basis price) $MORNINGSTAR_JP_URL = ('https://www.morningstar.co.jp/FundData/DownloadStdYmd.do?fnc='); sub methods { return ( morningstarjp => \&morningstarjp ); } sub labels { return ( morningstarjp => [qw/symbol date nav/] ); } sub morningstarjp { my $quoter = shift; my @symbols = @_; my ( $ua, $response, %info, $date, $nav, $year, $month, $day, $fmyear, $fmmonth, $fmday, @data ); $ua = $quoter->user_agent; # calculate beginning and end date # Starting from 10 days prior (to cover any recent holiday gaps) my $calcDay = DateTime->now(); $year = $calcDay->year(); $month = $calcDay->month(); $day = $calcDay->day(); $calcDay->subtract( days => 10 ); $fmyear = $calcDay->year(); $fmmonth = $calcDay->month(); $fmday = $calcDay->day(); # Iterate over each symbol as site only permits query by single security foreach my $symbol (@symbols) { # Query the server via a POST request $response = $ua->post( $MORNINGSTAR_JP_URL . $symbol, [ selectStdYearFrom => $fmyear, selectStdMonthFrom => $fmmonth, selectStdDayFrom => $fmday, selectStdYearTo => $year, selectStdMonthTo => $month, selectStdDayTo => $day, base => '0' # 0 is daily, 1 is week ends (Friday), 2 is month ends only ], ); # Check response, CSV data is in an octet-stream if ( $response->is_success && $response->content_type eq 'application/octet-stream' ) { # Parse... # First row (in Shift-JIS) is fixed. It means "date","basis price" # 日付,基準価額 # Subsequent rows are in ascending chronological order # date(yyyymmdd),nav # # Split the data on CRLF or LF boundaries @data = split( '\015?\012', $response->content ); # We only care about the final row as that has the most recent data ( $date, $nav ) = $quoter->parse_csv( $data[-1] ); # Store the retrieved data into the hash ( $year, $month, $day ) = ( $date =~ m/(\d{4})(\d{2})(\d{2})/ ); $quoter->store_date( \%info, $symbol, { year => $year, month => $month, day => $day } ); $info{ $symbol, 'currency' } = 'JPY'; $info{ $symbol, 'method' } = 'MorningstarJP'; $info{ $symbol, 'name' } = $symbol; $info{ $symbol, 'nav' } = $nav; $info{ $symbol, 'success' } = 1; $info{ $symbol, 'symbol' } = $symbol; } elsif ( $response->is_success && $response->content_type eq 'text/html' ) { # HTML response that means POST was invalid and/or rejected. $info{ $symbol, 'errormsg' } = 'Invalid search criteria'; $info{ $symbol, 'success' } = 0; } else { # Unknown error encountered. $info{ $symbol, 'errormsg' } = 'Search unavailable'; $info{ $symbol, 'success' } = 0; } } return wantarray() ? %info : \%info; } 1; __END__ =head1 NAME Finance::Quote::MorningstarJP - Obtain price data from Morningstar (Japan). =head1 VERSION This documentation describes version 1.00 of MorningstarJP.pm, October 13, 2012. =head1 SYNOPSIS use Finance::Quote; $q = Finance::Quote->new; %info = $q->fetch("morningstarjp", "2009100101"); =head1 DESCRIPTION This module obtains information from Morningstar (Japan), L<http://www.morningstar.co.jp/>. Information returned by this module is governed by Morningstar (Japan)'s terms and conditions. =head1 FUND SYMBOLS Use the numeric symbol shown in the URL on the "SnapShot" page of the security of interest. e.g. For L<http://www.morningstar.co.jp/FundData/SnapShot.do?fnc=2009100101>, one would supply 2009100101 as the symbol argument on the fetch API call. =head1 LABELS RETURNED The following labels may be returned by Finance::Quote::MorningstarJP: symbol, date, nav. =head1 REQUIREMENTS Perl 5.006 Date/Calc.pm Exporter.pm (included with Perl) =head1 ACKNOWLEDGEMENTS Inspired by other modules already present with Finance::Quote =head1 AUTHOR Christopher Hill =head1 LICENSE AND COPYRIGHT Copyright (C) 2012, Christopher Hill. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. =head1 DISCLAIMER This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. =head1 SEE ALSO Morningstar (Japan), L<http://www.morningstar.co.jp/> =cut
Close