PHPackages                             rocketfellows/tinkoff-invest-v1-rest-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. rocketfellows/tinkoff-invest-v1-rest-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

rocketfellows/tinkoff-invest-v1-rest-client
===========================================

v1.0.2(3y ago)02214MITPHPPHP &gt;=7.4

Since Jun 6Pushed 3y agoCompare

[ Source](https://github.com/rocketfellows/tinkoff-invest-v1-rest-client)[ Packagist](https://packagist.org/packages/rocketfellows/tinkoff-invest-v1-rest-client)[ RSS](/packages/rocketfellows-tinkoff-invest-v1-rest-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (4)

Tinkoff Invest V1 rest client
=============================

[](#tinkoff-invest-v1-rest-client)

[![Code Coverage Badge](./badge.svg)](./badge.svg)

This component implement's wrapper over guzzle http client for sending request to Tinkoff Invest V1.

Consist of:

- \\rocketfellows\\TinkoffInvestV1RestClient\\Client - intended for direct sending of requests
- \\rocketfellows\\TinkoffInvestV1RestClient\\ClientConfig - client configuration

Installation
------------

[](#installation)

```
composer require rocketfellows/tinkoff-invest-v1-rest-client
```

Client config
-------------

[](#client-config)

ClientConfig contains:

- **serverUrl** - which is common Tinkoff Invest V1 url, for example
- **accessToken** - Tinkoff Invest V1 access token which can be generated through the account settings of the Tinkoff Investments application

ClientConfig can be configured through DI from your environment params. For example: for test environment of your application you can set **serverUrl** with Tinkoff Invest V1 sandbox, **accessToken** - with generated from Tinkoff Investments application for sandbox.

Client
------

[](#client)

Client interface:

```
public function request(string $serviceName, string $serviceMethod, array $data): array;
```

Where **$serviceName** for example **InstrumentsService** and **$serviceMethod** for example **GetDividends**. Full list of available Tinkoff Invest V1 services and methods here

Interface exceptions
--------------------

[](#interface-exceptions)

- \\rocketfellows\\TinkoffInvestV1RestClient\\exceptions\\request\\ServerException - exception when a server error is encountered (5xx codes)
- \\rocketfellows\\TinkoffInvestV1RestClient\\exceptions\\request\\ClientException - exception when a client error is encountered (4xx codes)
- \\rocketfellows\\TinkoffInvestV1RestClient\\exceptions\\request\\HttpClientException - exception for other errors

Both ServerException and **ClientException** extends \\rocketfellows\\TinkoffInvestV1RestClient\\exceptions\\request\\BadResponseException which holds server error response data:

- \\rocketfellows\\TinkoffInvestV1RestClient\\exceptions\\request\\BadResponseException::getErrorCode
- \\rocketfellows\\TinkoffInvestV1RestClient\\exceptions\\request\\BadResponseException::getErrorMessage
- \\rocketfellows\\TinkoffInvestV1RestClient\\exceptions\\request\\BadResponseException::getErrorDescription

Server error data response example:

```
{
    "code": 3,
    "message": "missing parameter: 'figi'",
    "description": "30008"
}
```

Component dependencies
----------------------

[](#component-dependencies)

"guzzlehttp/guzzle": "7.4.3" -

Usage example
-------------

[](#usage-example)

```
$client = new Client(
    (
        new ClientConfig(
            'https://invest-public-api.tinkoff.ru/rest',

        )
    ),
    new \GuzzleHttp\Client()
);

$response = $client->request(
    'InstrumentsService',
    'GetDividends',
    [
        "figi" => "BBG004730RP0",
        "from" => "2022-05-28T15:38:52.283Z",
        "to" => '2022-08-18T15:38:52.283Z',
    ]
);

// response
array(1) {
  ["dividends"]=>
  array(1) {
    [0]=>
    array(9) {
      ["dividendNet"]=>
      array(3) {
        ["currency"]=>
        string(3) "rub"
        ["units"]=>
        string(2) "52"
        ["nano"]=>
        int(530000000)
      }
      ["declaredDate"]=>
      string(20) "2022-06-30T00:00:00Z"
      ["lastBuyDate"]=>
      string(20) "2022-07-18T00:00:00Z"
      ["dividendType"]=>
      string(0) ""
      ["recordDate"]=>
      string(20) "2022-07-20T00:00:00Z"
      ["regularity"]=>
      string(0) ""
      ["closePrice"]=>
      array(3) {
        ["currency"]=>
        string(3) "rub"
        ["units"]=>
        string(3) "297"
        ["nano"]=>
        int(0)
      }
      ["yieldValue"]=>
      array(2) {
        ["units"]=>
        string(2) "17"
        ["nano"]=>
        int(690000000)
      }
      ["createdAt"]=>
      string(27) "2022-06-06T02:04:47.759671Z"
    }
  }
}
```

Contributing
------------

[](#contributing)

Welcome to pull requests. If there is a major changes, first please open an issue for discussion.

Please make sure to update tests as appropriate.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

1421d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/81402dcd0a07ad550b7f80f5871e7c302770b29d4c73a52fc35ba697f702d56e?d=identicon)[arslanim](/maintainers/arslanim)

---

Top Contributors

[![arslanim](https://avatars.githubusercontent.com/u/22678154?v=4)](https://github.com/arslanim "arslanim (54 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")

---

Tags

guzzlephprestsdktinkoff-invest

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rocketfellows-tinkoff-invest-v1-rest-client/health.svg)

```
[![Health](https://phpackages.com/badges/rocketfellows-tinkoff-invest-v1-rest-client/health.svg)](https://phpackages.com/packages/rocketfellows-tinkoff-invest-v1-rest-client)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
