NAME
list-stock-exchanges - Catalog (list) of stock exchanges
VERSION
This document describes version 0.001 of list-stock-exchanges (from Perl distribution App-StockExchangeUtils), released on 2018-09-19.
SYNOPSIS
Usage:
% list-stock-exchanges [options] [query]
DESCRIPTION
REPLACE ME
OPTIONS
*
marks required options.
Field selection options
- --detail, -l
-
Return array of full records instead of just ID fields.
By default, only the key (ID) field is returned per result entry.
- --field=s@
-
Select fields to return.
Can be specified multiple times.
- --fields-json=s
-
Select fields to return (JSON-encoded).
See
--field
. - --with-field-names
-
Return field names in each record (as hash/associative array).
When enabled, function will return each record as hash/associative array (field name => value pairs). Otherwise, function will return each record as list/array (field value, field value, ...).
Filtering for add_codes options
- --add-codes-contains=s
-
Only return records where the 'add_codes' field contains specified text.
- --add-codes-in-json=s
-
Only return records where the 'add_codes' field is in the specified values (JSON-encoded).
See
--add-codes-in
. - --add-codes-in=s@
-
Only return records where the 'add_codes' field is in the specified values.
Can be specified multiple times.
- --add-codes-is=s
-
Only return records where the 'add_codes' field equals specified value.
- --add-codes-isnt=s
-
Only return records where the 'add_codes' field does not equal specified value.
- --add-codes-max=s
-
Only return records where the 'add_codes' field is less than or equal to specified value.
- --add-codes-min=s
-
Only return records where the 'add_codes' field is greater than or equal to specified value.
- --add-codes-not-contains=s
-
Only return records where the 'add_codes' field does not contain specified text.
- --add-codes-not-in-json=s
-
Only return records where the 'add_codes' field is not in the specified values (JSON-encoded).
See
--add-codes-not-in
. - --add-codes-not-in=s@
-
Only return records where the 'add_codes' field is not in the specified values.
Can be specified multiple times.
- --add-codes-xmax=s
-
Only return records where the 'add_codes' field is less than specified value.
- --add-codes-xmin=s
-
Only return records where the 'add_codes' field is greater than specified value.
- --add-codes=s
-
Only return records where the 'add_codes' field equals specified value.
Filtering for add_names options
- --add-names-contains=s
-
Only return records where the 'add_names' field contains specified text.
- --add-names-in-json=s
-
Only return records where the 'add_names' field is in the specified values (JSON-encoded).
See
--add-names-in
. - --add-names-in=s@
-
Only return records where the 'add_names' field is in the specified values.
Can be specified multiple times.
- --add-names-is=s
-
Only return records where the 'add_names' field equals specified value.
- --add-names-isnt=s
-
Only return records where the 'add_names' field does not equal specified value.
- --add-names-max=s
-
Only return records where the 'add_names' field is less than or equal to specified value.
- --add-names-min=s
-
Only return records where the 'add_names' field is greater than or equal to specified value.
- --add-names-not-contains=s
-
Only return records where the 'add_names' field does not contain specified text.
- --add-names-not-in-json=s
-
Only return records where the 'add_names' field is not in the specified values (JSON-encoded).
See
--add-names-not-in
. - --add-names-not-in=s@
-
Only return records where the 'add_names' field is not in the specified values.
Can be specified multiple times.
- --add-names-xmax=s
-
Only return records where the 'add_names' field is less than specified value.
- --add-names-xmin=s
-
Only return records where the 'add_names' field is greater than specified value.
- --add-names=s
-
Only return records where the 'add_names' field equals specified value.
Filtering for add_yf_codes options
- --add-yf-codes-contains=s
-
Only return records where the 'add_yf_codes' field contains specified text.
- --add-yf-codes-in-json=s
-
Only return records where the 'add_yf_codes' field is in the specified values (JSON-encoded).
See
--add-yf-codes-in
. - --add-yf-codes-in=s@
-
Only return records where the 'add_yf_codes' field is in the specified values.
Can be specified multiple times.
- --add-yf-codes-is=s
-
Only return records where the 'add_yf_codes' field equals specified value.
- --add-yf-codes-isnt=s
-
Only return records where the 'add_yf_codes' field does not equal specified value.
- --add-yf-codes-max=s
-
Only return records where the 'add_yf_codes' field is less than or equal to specified value.
- --add-yf-codes-min=s
-
Only return records where the 'add_yf_codes' field is greater than or equal to specified value.
- --add-yf-codes-not-contains=s
-
Only return records where the 'add_yf_codes' field does not contain specified text.
- --add-yf-codes-not-in-json=s
-
Only return records where the 'add_yf_codes' field is not in the specified values (JSON-encoded).
See
--add-yf-codes-not-in
. - --add-yf-codes-not-in=s@
-
Only return records where the 'add_yf_codes' field is not in the specified values.
Can be specified multiple times.
- --add-yf-codes-xmax=s
-
Only return records where the 'add_yf_codes' field is less than specified value.
- --add-yf-codes-xmin=s
-
Only return records where the 'add_yf_codes' field is greater than specified value.
- --add-yf-codes=s
-
Only return records where the 'add_yf_codes' field equals specified value.
Filtering for city options
- --city-contains=s
-
Only return records where the 'city' field contains specified text.
- --city-in-json=s
-
Only return records where the 'city' field is in the specified values (JSON-encoded).
See
--city-in
. - --city-in=s@
-
Only return records where the 'city' field is in the specified values.
Can be specified multiple times.
- --city-is=s
-
Only return records where the 'city' field equals specified value.
- --city-isnt=s
-
Only return records where the 'city' field does not equal specified value.
- --city-max=s
-
Only return records where the 'city' field is less than or equal to specified value.
- --city-min=s
-
Only return records where the 'city' field is greater than or equal to specified value.
- --city-not-contains=s
-
Only return records where the 'city' field does not contain specified text.
- --city-not-in-json=s
-
Only return records where the 'city' field is not in the specified values (JSON-encoded).
See
--city-not-in
. - --city-not-in=s@
-
Only return records where the 'city' field is not in the specified values.
Can be specified multiple times.
- --city-xmax=s
-
Only return records where the 'city' field is less than specified value.
- --city-xmin=s
-
Only return records where the 'city' field is greater than specified value.
- --city=s
-
Only return records where the 'city' field equals specified value.
Filtering for code options
- --code-contains=s
-
Only return records where the 'code' field contains specified text.
- --code-in-json=s
-
Only return records where the 'code' field is in the specified values (JSON-encoded).
See
--code-in
. - --code-in=s@
-
Only return records where the 'code' field is in the specified values.
Can be specified multiple times.
- --code-is=s
-
Only return records where the 'code' field equals specified value.
- --code-isnt=s
-
Only return records where the 'code' field does not equal specified value.
- --code-max=s
-
Only return records where the 'code' field is less than or equal to specified value.
- --code-min=s
-
Only return records where the 'code' field is greater than or equal to specified value.
- --code-not-contains=s
-
Only return records where the 'code' field does not contain specified text.
- --code-not-in-json=s
-
Only return records where the 'code' field is not in the specified values (JSON-encoded).
See
--code-not-in
. - --code-not-in=s@
-
Only return records where the 'code' field is not in the specified values.
Can be specified multiple times.
- --code-xmax=s
-
Only return records where the 'code' field is less than specified value.
- --code-xmin=s
-
Only return records where the 'code' field is greater than specified value.
- --code=s
-
Only return records where the 'code' field equals specified value.
Filtering for country options
- --country-contains=s
-
Only return records where the 'country' field contains specified text.
- --country-in-json=s
-
Only return records where the 'country' field is in the specified values (JSON-encoded).
See
--country-in
. - --country-in=s@
-
Only return records where the 'country' field is in the specified values.
Can be specified multiple times.
- --country-is=s
-
Only return records where the 'country' field equals specified value.
- --country-isnt=s
-
Only return records where the 'country' field does not equal specified value.
- --country-max=s
-
Only return records where the 'country' field is less than or equal to specified value.
- --country-min=s
-
Only return records where the 'country' field is greater than or equal to specified value.
- --country-not-contains=s
-
Only return records where the 'country' field does not contain specified text.
- --country-not-in-json=s
-
Only return records where the 'country' field is not in the specified values (JSON-encoded).
See
--country-not-in
. - --country-not-in=s@
-
Only return records where the 'country' field is not in the specified values.
Can be specified multiple times.
- --country-xmax=s
-
Only return records where the 'country' field is less than specified value.
- --country-xmin=s
-
Only return records where the 'country' field is greater than specified value.
- --country=s
-
Only return records where the 'country' field equals specified value.
Filtering for eng_name options
- --eng-name-contains=s
-
Only return records where the 'eng_name' field contains specified text.
- --eng-name-in-json=s
-
Only return records where the 'eng_name' field is in the specified values (JSON-encoded).
See
--eng-name-in
. - --eng-name-in=s@
-
Only return records where the 'eng_name' field is in the specified values.
Can be specified multiple times.
- --eng-name-is=s
-
Only return records where the 'eng_name' field equals specified value.
- --eng-name-isnt=s
-
Only return records where the 'eng_name' field does not equal specified value.
- --eng-name-max=s
-
Only return records where the 'eng_name' field is less than or equal to specified value.
- --eng-name-min=s
-
Only return records where the 'eng_name' field is greater than or equal to specified value.
- --eng-name-not-contains=s
-
Only return records where the 'eng_name' field does not contain specified text.
- --eng-name-not-in-json=s
-
Only return records where the 'eng_name' field is not in the specified values (JSON-encoded).
See
--eng-name-not-in
. - --eng-name-not-in=s@
-
Only return records where the 'eng_name' field is not in the specified values.
Can be specified multiple times.
- --eng-name-xmax=s
-
Only return records where the 'eng_name' field is less than specified value.
- --eng-name-xmin=s
-
Only return records where the 'eng_name' field is greater than specified value.
- --eng-name=s
-
Only return records where the 'eng_name' field equals specified value.
Filtering for founded options
- --founded-contains=s
-
Only return records where the 'founded' field contains specified text.
- --founded-in-json=s
-
Only return records where the 'founded' field is in the specified values (JSON-encoded).
See
--founded-in
. - --founded-in=s@
-
Only return records where the 'founded' field is in the specified values.
Can be specified multiple times.
- --founded-is=s
-
Only return records where the 'founded' field equals specified value.
- --founded-isnt=s
-
Only return records where the 'founded' field does not equal specified value.
- --founded-max=s
-
Only return records where the 'founded' field is less than or equal to specified value.
- --founded-min=s
-
Only return records where the 'founded' field is greater than or equal to specified value.
- --founded-not-contains=s
-
Only return records where the 'founded' field does not contain specified text.
- --founded-not-in-json=s
-
Only return records where the 'founded' field is not in the specified values (JSON-encoded).
See
--founded-not-in
. - --founded-not-in=s@
-
Only return records where the 'founded' field is not in the specified values.
Can be specified multiple times.
- --founded-xmax=s
-
Only return records where the 'founded' field is less than specified value.
- --founded-xmin=s
-
Only return records where the 'founded' field is greater than specified value.
- --founded=s
-
Only return records where the 'founded' field equals specified value.
Filtering for local_name options
- --local-name-contains=s
-
Only return records where the 'local_name' field contains specified text.
- --local-name-in-json=s
-
Only return records where the 'local_name' field is in the specified values (JSON-encoded).
See
--local-name-in
. - --local-name-in=s@
-
Only return records where the 'local_name' field is in the specified values.
Can be specified multiple times.
- --local-name-is=s
-
Only return records where the 'local_name' field equals specified value.
- --local-name-isnt=s
-
Only return records where the 'local_name' field does not equal specified value.
- --local-name-max=s
-
Only return records where the 'local_name' field is less than or equal to specified value.
- --local-name-min=s
-
Only return records where the 'local_name' field is greater than or equal to specified value.
- --local-name-not-contains=s
-
Only return records where the 'local_name' field does not contain specified text.
- --local-name-not-in-json=s
-
Only return records where the 'local_name' field is not in the specified values (JSON-encoded).
See
--local-name-not-in
. - --local-name-not-in=s@
-
Only return records where the 'local_name' field is not in the specified values.
Can be specified multiple times.
- --local-name-xmax=s
-
Only return records where the 'local_name' field is less than specified value.
- --local-name-xmin=s
-
Only return records where the 'local_name' field is greater than specified value.
- --local-name=s
-
Only return records where the 'local_name' field equals specified value.
Filtering for mic options
- --mic-contains=s
-
Only return records where the 'mic' field contains specified text.
- --mic-in-json=s
-
Only return records where the 'mic' field is in the specified values (JSON-encoded).
See
--mic-in
. - --mic-in=s@
-
Only return records where the 'mic' field is in the specified values.
Can be specified multiple times.
- --mic-is=s
-
Only return records where the 'mic' field equals specified value.
- --mic-isnt=s
-
Only return records where the 'mic' field does not equal specified value.
- --mic-max=s
-
Only return records where the 'mic' field is less than or equal to specified value.
- --mic-min=s
-
Only return records where the 'mic' field is greater than or equal to specified value.
- --mic-not-contains=s
-
Only return records where the 'mic' field does not contain specified text.
- --mic-not-in-json=s
-
Only return records where the 'mic' field is not in the specified values (JSON-encoded).
See
--mic-not-in
. - --mic-not-in=s@
-
Only return records where the 'mic' field is not in the specified values.
Can be specified multiple times.
- --mic-xmax=s
-
Only return records where the 'mic' field is less than specified value.
- --mic-xmin=s
-
Only return records where the 'mic' field is greater than specified value.
- --mic=s
-
Only return records where the 'mic' field equals specified value.
Filtering for status options
- --status-contains=s
-
Only return records where the 'status' field contains specified text.
- --status-in-json=s
-
Only return records where the 'status' field is in the specified values (JSON-encoded).
See
--status-in
. - --status-in=s@
-
Only return records where the 'status' field is in the specified values.
Can be specified multiple times.
- --status-is=s
-
Only return records where the 'status' field equals specified value.
- --status-isnt=s
-
Only return records where the 'status' field does not equal specified value.
- --status-max=s
-
Only return records where the 'status' field is less than or equal to specified value.
- --status-min=s
-
Only return records where the 'status' field is greater than or equal to specified value.
- --status-not-contains=s
-
Only return records where the 'status' field does not contain specified text.
- --status-not-in-json=s
-
Only return records where the 'status' field is not in the specified values (JSON-encoded).
See
--status-not-in
. - --status-not-in=s@
-
Only return records where the 'status' field is not in the specified values.
Can be specified multiple times.
- --status-xmax=s
-
Only return records where the 'status' field is less than specified value.
- --status-xmin=s
-
Only return records where the 'status' field is greater than specified value.
- --status=s
-
Only return records where the 'status' field equals specified value.
Filtering for types options
- --types-contains=s
-
Only return records where the 'types' field contains specified text.
- --types-in-json=s
-
Only return records where the 'types' field is in the specified values (JSON-encoded).
See
--types-in
. - --types-in=s@
-
Only return records where the 'types' field is in the specified values.
Can be specified multiple times.
- --types-is=s
-
Only return records where the 'types' field equals specified value.
- --types-isnt=s
-
Only return records where the 'types' field does not equal specified value.
- --types-max=s
-
Only return records where the 'types' field is less than or equal to specified value.
- --types-min=s
-
Only return records where the 'types' field is greater than or equal to specified value.
- --types-not-contains=s
-
Only return records where the 'types' field does not contain specified text.
- --types-not-in-json=s
-
Only return records where the 'types' field is not in the specified values (JSON-encoded).
See
--types-not-in
. - --types-not-in=s@
-
Only return records where the 'types' field is not in the specified values.
Can be specified multiple times.
- --types-xmax=s
-
Only return records where the 'types' field is less than specified value.
- --types-xmin=s
-
Only return records where the 'types' field is greater than specified value.
- --types=s
-
Only return records where the 'types' field equals specified value.
Filtering for yf_code options
- --yf-code-contains=s
-
Only return records where the 'yf_code' field contains specified text.
- --yf-code-in-json=s
-
Only return records where the 'yf_code' field is in the specified values (JSON-encoded).
See
--yf-code-in
. - --yf-code-in=s@
-
Only return records where the 'yf_code' field is in the specified values.
Can be specified multiple times.
- --yf-code-is=s
-
Only return records where the 'yf_code' field equals specified value.
- --yf-code-isnt=s
-
Only return records where the 'yf_code' field does not equal specified value.
- --yf-code-max=s
-
Only return records where the 'yf_code' field is less than or equal to specified value.
- --yf-code-min=s
-
Only return records where the 'yf_code' field is greater than or equal to specified value.
- --yf-code-not-contains=s
-
Only return records where the 'yf_code' field does not contain specified text.
- --yf-code-not-in-json=s
-
Only return records where the 'yf_code' field is not in the specified values (JSON-encoded).
See
--yf-code-not-in
. - --yf-code-not-in=s@
-
Only return records where the 'yf_code' field is not in the specified values.
Can be specified multiple times.
- --yf-code-xmax=s
-
Only return records where the 'yf_code' field is less than specified value.
- --yf-code-xmin=s
-
Only return records where the 'yf_code' field is greater than specified value.
- --yf-code=s
-
Only return records where the 'yf_code' field equals specified value.
Filtering options
Ordering options
- --random
-
Return records in random order.
- --sort-json=s
-
Order records according to certain field(s) (JSON-encoded).
See
--sort
. - --sort=s@
-
Order records according to certain field(s).
A list of field names separated by comma. Each field can be prefixed with '-' to specify descending order instead of the default ascending.
Can be specified multiple times.
Output options
- --format=s
-
Choose output format, e.g. json, text.
Default value:
undef
- --json
-
Set output format to json.
- --naked-res
-
When outputing as JSON, strip result envelope.
Default value:
0
By default, when outputing as JSON, the full enveloped result is returned, e.g.:
[200,"OK",[1,2,3],{"func.extra"=>4}]
The reason is so you can get the status (1st element), status message (2nd element) as well as result metadata/extra result (4th element) instead of just the result (3rd element). However, sometimes you want just the result, e.g. when you want to pipe the result for more post-processing. In this case you can use `--naked-res` so you just get:
[1,2,3]
Paging options
- --result-limit=s
-
Only return a certain number of records.
- --result-start=s
-
Only return starting from the n'th record.
Default value:
1
Other options
COMPLETION
This script has shell tab completion capability with support for several shells.
bash
To activate bash completion for this script, put:
complete -C list-stock-exchanges list-stock-exchanges
in your bash startup (e.g. ~/.bashrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
It is recommended, however, that you install modules using cpanm-shcompgen which can activate shell completion for scripts immediately.
tcsh
To activate tcsh completion for this script, put:
complete list-stock-exchanges 'p/*/`list-stock-exchanges`/'
in your tcsh startup (e.g. ~/.tcshrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
It is also recommended to install shcompgen (see above).
other shells
For fish and zsh, install shcompgen as described above.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-StockExchangeUtils.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-StockExchangeUtils.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-StockExchangeUtils
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.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 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.