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(4y ago)02214MITPHPPHP &gt;=7.4

Since Jun 6Pushed 4y 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 yesterday

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

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

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

1474d 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[guzzlehttp/test-server

Node.js server and PHP controller

14284.0k22](/packages/guzzlehttp-test-server)

PHPackages © 2026

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