NAME
App::idxdb - Import data for stocks on the IDX (Indonesian Stock Exchange) and perform queries on them
VERSION
This document describes version 0.003 of App::idxdb (from Perl distribution App-idxdb), released on 2021-01-21.
SYNOPSIS
See the included CLI script idxdb.
DESCRIPTION
FUNCTIONS
graph_daily_trading_summary
Usage:
graph_daily_trading_summary(%args) -> [status, msg, payload, meta]
Show graph from daily trading summary of some stock.
This function is not exported.
Arguments ('*' denotes required arguments):
date_end => date (default: 1611187200)
date_start => date (default: 1608595200)
fields => array[str] (default: ["AccumForeignNetBuy"])
stock* => idx::listed_stock_code
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
graph_ownership
Usage:
graph_ownership(%args) -> [status, msg, payload, meta]
Show ownership of some stock(s) through time.
This function is not exported.
Arguments ('*' denotes required arguments):
date_end => date (default: 1611187200)
date_start => date (default: 1608595200)
field => str (default: "ForeignTotal")
stocks* => array[idx::listed_stock_code]
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
graph_ownership_composition
Usage:
graph_ownership_composition(%args) -> [status, msg, payload, meta]
Show ownership composition of some stock through time.
This function is not exported.
Arguments ('*' denotes required arguments):
date_end => date (default: 1611187200)
date_start => date (default: 1608595200)
stock* => idx::listed_stock_code
subset => str (default: "foreign")
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
legend_ownership
Usage:
legend_ownership() -> [status, msg, payload, meta]
Show ownership legend (e.g. ForeignIB = foreign bank).
Examples:
Example #1:
legend_ownership();
Result:
[ 200, "OK", { ForeignCP => "Foreign corporate", ForeignFD => "Foreign foundation", ForeignIB => "Foreign bank", ForeignID => "Foreign individual", ForeignIS => "Foreign insurance", ForeignMF => "Foreign mutual fund", ForeignOT => "Foreign other", ForeignPF => "Foreign pension fund", ForeignSC => "Foreign securities", ForeignTotal => "Foreign total", LocalCP => "Local corporate", LocalFD => "Local foundation", LocalIB => "Local bank", LocalID => "Local individual", LocalIS => "Local insurance", LocalMF => "Local mutual fund", LocalOT => "Local other", LocalPF => "Local pension fund", LocalSC => "Local securities", LocalTotal => "Local total", }, {}, ]
This function is not exported.
No arguments.
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
table_daily_trading_summary
Usage:
table_daily_trading_summary(%args) -> [status, msg, payload, meta]
Show daily trading summary of some stock.
This function is not exported.
Arguments ('*' denotes required arguments):
date_end => date (default: 1611187200)
date_start => date (default: 1608595200)
fields => array[str] (default: ["Volume","Value","ForeignNetBuy"])
stock* => idx::listed_stock_code
total => bool
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
table_ownership
Usage:
table_ownership(%args) -> [status, msg, payload, meta]
Show ownership of some stock through time.
This function is not exported.
Arguments ('*' denotes required arguments):
date_end => date (default: 1611187200)
date_start => date (default: 1608595200)
fields => array[str] (default: ["LocalTotal","ForeignTotal"])
stock* => idx::listed_stock_code
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
update
Usage:
update(%args) -> [status, msg, payload, meta]
Update data.
Currently this routine imports from text files in the gudangdata
repository on the local filesystem. Functionality to import from server directly using Finance::SE::IDX and Finance::ID::KSEI will be added in the future.
This function is not exported.
Arguments ('*' denotes required arguments):
dbpath => str
Path for SQLite database.
If not specified, will default to
~/idxdb.db
.gudangdata_path* => dirname
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-idxdb.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-idxdb.
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/perlancar/perl-App-idxdb/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.