Download the PHP package panychek/moex without Composer

On this page you can find all versions of the php package panychek/moex. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package moex

Moscow Exchange ISS Client

Build Status codecov Coverage Status

A PHP library that provides easy access to Moscow Exchange data via its Informational & Statistical Server.

Installation

Download via Composer:

Include the autoloader:

Getting started

The basic usage pattern is to instantiate a Security object for the security you want to interact with. You can pass any string you want (in Russian or English) - the library will perform a search and pick the best match.

You can also access the security by its code (prefix it with a hash symbol (#)). This will be slightly faster, since you avoid an extra API call to find it.

The default language is Russian. You can switch to English like this:

Authentication

If you're subscribed to any paid services and want to access their private data, you should authenticate yourself first using your Passport account credentials:

Search

You can easily find the needed financial instrument. This call will return a collection of matched securities:

You can also limit the results:

Retrieving market data

Shares, currency pairs and futures

Available methods:

Method Input parameters Returns
getLastPrice float
getOpeningPrice float
getClosingPrice float
getDailyHigh float
getDailyLow float
getLastUpdate object(\DateTime)
getDailyChange float
getDailyPercentageChange float
getVolume string $currency
Possible values: RUB or USD
Defaults to: RUB
int

Fetching the ruble's exchange rate from the FX market:

If omitted, the base currency defaults to US dollar

Bonds

In addition, bonds also support the following methods:

Method Input parameters Returns
getYield float
getDuration int
getFaceValue string
getCouponValue string
getCouponRate string
getCouponDate string
getMaturityDate string

Indices

Available methods:

Method Input parameters Returns
getValue float
getOpeningValue float
getPreviousClose float
getDailyHigh float
getDailyLow float
getLastUpdate object(\DateTime)
getChange string $range
Possible values: day, MTD or YTD
Defaults to: day

string $measurement
Possible values: points or %
Defaults to: points
float or int
getVolume string $currency
Possible values: RUB or USD
Defaults to: RUB
int
getCapitalization string $currency
Possible values: RUB or USD
Defaults to: RUB
int
Example usage

Historical quotes

For a specific date range:

Starting from a particular day:

Profile

Turnovers

Totals for the exchange

Last available trade day:

For a specific day:

Totals for a specific market

Last available trade day:

For a specific day:

Groups

Get the most reliable stocks (that are on the First Level quotation list):

Debugging

To see what's going on at the network level, define a logging callback function and pass it to the client. Once done, it will be invoked on each API call with its statistics.

Handling errors

A Panychek\MoEx\Exception\DataException exception is thrown in the event of any data related error. The following codes indicate the reason for the failure:

A Panychek\MoEx\Exception\AuthenticationException exception is thrown in case of authentication failure.

All exceptions thrown by the library implement the Panychek\MoEx\Exception\ExceptionInterface interface.

Tests

There are two types of tests distributed with the package: unit tests and integration tests.

The unit tests are run against mock data and hence are ready out-of-the-box. In order to run them, execute the following command:

The integration tests make real API calls and ensure that nothing has changed with the responses, so they require network access. You can perform integration testing by running:


All versions of moex with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
guzzlehttp/guzzle Version ^6.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package panychek/moex contains the following files

Loading the files please wait ....