PHP code example of rocketfellows / tinkoff-invest-v1-market-data-rest-client

1. Go to this page and download the library: Download rocketfellows/tinkoff-invest-v1-market-data-rest-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rocketfellows / tinkoff-invest-v1-market-data-rest-client example snippets


$client = new Client(
    (
        new ClientConfig(
            'https://invest-public-api.tinkoff.ru/rest',
            <your_access_token>
        )
    ),
    new \GuzzleHttp\Client()
);

$marketDataService = new MarketDataService($client);

$marketDataService->getLastPrices([
    'figi' => ['BBG004730RP0', 'BBG00TW9WTR3'],
]);