Skip to content

Latest commit

 

History

History
365 lines (252 loc) · 11.3 KB

MarketApi.md

File metadata and controls

365 lines (252 loc) · 11.3 KB

tinkoff_invest_api.api.MarketApi

Load the API package

import 'package:tinkoff_invest_api/api.dart';

All URIs are relative to https://api-invest.tinkoff.ru/openapi

Method HTTP request Description
marketBondsGet get /market/bonds Получение списка облигаций
marketCandlesGet get /market/candles Получение исторических свечей по FIGI
marketCurrenciesGet get /market/currencies Получение списка валютных пар
marketEtfsGet get /market/etfs Получение списка ETF
marketOrderbookGet get /market/orderbook Получение стакана по FIGI
marketSearchByFigiGet get /market/search/by-figi Получение инструмента по FIGI
marketSearchByTickerGet get /market/search/by-ticker Получение инструмента по тикеру
marketStocksGet get /market/stocks Получение списка акций

marketBondsGet

MarketInstrumentListResponse marketBondsGet()

Получение списка облигаций

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();

try { 
    var result = api_instance.marketBondsGet();
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketBondsGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

MarketInstrumentListResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

marketCandlesGet

CandlesResponse marketCandlesGet(figi, from, to, interval)

Получение исторических свечей по FIGI

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();
var figi = figi_example; // String | FIGI
var from = 2019-08-19T18:38:33.131642+03:00; // DateTime | Начало временного промежутка
var to = 2019-08-19T18:38:33.131642+03:00; // DateTime | Конец временного промежутка
var interval = ; // CandleResolution | Интервал свечи

try { 
    var result = api_instance.marketCandlesGet(figi, from, to, interval);
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketCandlesGet: $e\n');
}

Parameters

Name Type Description Notes
figi String FIGI
from DateTime Начало временного промежутка
to DateTime Конец временного промежутка
interval CandleResolution Интервал свечи

Return type

CandlesResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

marketCurrenciesGet

MarketInstrumentListResponse marketCurrenciesGet()

Получение списка валютных пар

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();

try { 
    var result = api_instance.marketCurrenciesGet();
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketCurrenciesGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

MarketInstrumentListResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

marketEtfsGet

MarketInstrumentListResponse marketEtfsGet()

Получение списка ETF

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();

try { 
    var result = api_instance.marketEtfsGet();
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketEtfsGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

MarketInstrumentListResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

marketOrderbookGet

OrderbookResponse marketOrderbookGet(figi, depth)

Получение стакана по FIGI

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();
var figi = figi_example; // String | FIGI
var depth = 56; // int | Глубина стакана [1..20]

try { 
    var result = api_instance.marketOrderbookGet(figi, depth);
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketOrderbookGet: $e\n');
}

Parameters

Name Type Description Notes
figi String FIGI
depth int Глубина стакана [1..20]

Return type

OrderbookResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

marketSearchByFigiGet

SearchMarketInstrumentResponse marketSearchByFigiGet(figi)

Получение инструмента по FIGI

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();
var figi = figi_example; // String | FIGI

try { 
    var result = api_instance.marketSearchByFigiGet(figi);
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketSearchByFigiGet: $e\n');
}

Parameters

Name Type Description Notes
figi String FIGI

Return type

SearchMarketInstrumentResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

marketSearchByTickerGet

MarketInstrumentListResponse marketSearchByTickerGet(ticker)

Получение инструмента по тикеру

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();
var ticker = ticker_example; // String | Тикер инструмента

try { 
    var result = api_instance.marketSearchByTickerGet(ticker);
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketSearchByTickerGet: $e\n');
}

Parameters

Name Type Description Notes
ticker String Тикер инструмента

Return type

MarketInstrumentListResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

marketStocksGet

MarketInstrumentListResponse marketStocksGet()

Получение списка акций

Example

import 'package:tinkoff_invest_api/api.dart';
// TODO Configure HTTP basic authorization: sso_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('sso_auth').password = 'YOUR_PASSWORD';

var api_instance = new MarketApi();

try { 
    var result = api_instance.marketStocksGet();
    print(result);
} catch (e) {
    print('Exception when calling MarketApi->marketStocksGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

MarketInstrumentListResponse

Authorization

sso_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]