Skip to content

Latest commit

 

History

History
203 lines (142 loc) · 7.03 KB

OrdersApi.md

File metadata and controls

203 lines (142 loc) · 7.03 KB

tinkoff_invest_api.api.OrdersApi

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
ordersCancelPost post /orders/cancel Отмена заявки
ordersGet get /orders Получение списка активных заявок
ordersLimitOrderPost post /orders/limit-order Создание лимитной заявки
ordersMarketOrderPost post /orders/market-order Создание рыночной заявки

ordersCancelPost

Empty ordersCancelPost(orderId, brokerAccountId)

Отмена заявки

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 OrdersApi();
var orderId = orderId_example; // String | ID заявки
var brokerAccountId = brokerAccountId_example; // String | Номер счета (по умолчанию - Тинькофф)

try { 
    var result = api_instance.ordersCancelPost(orderId, brokerAccountId);
    print(result);
} catch (e) {
    print('Exception when calling OrdersApi->ordersCancelPost: $e\n');
}

Parameters

Name Type Description Notes
orderId String ID заявки
brokerAccountId String Номер счета (по умолчанию - Тинькофф) [optional]

Return type

Empty

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]

ordersGet

OrdersResponse ordersGet(brokerAccountId)

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

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 OrdersApi();
var brokerAccountId = brokerAccountId_example; // String | Номер счета (по умолчанию - Тинькофф)

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

Parameters

Name Type Description Notes
brokerAccountId String Номер счета (по умолчанию - Тинькофф) [optional]

Return type

OrdersResponse

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]

ordersLimitOrderPost

LimitOrderResponse ordersLimitOrderPost(figi, limitOrderRequest, brokerAccountId)

Создание лимитной заявки

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 OrdersApi();
var figi = figi_example; // String | FIGI инструмента
var limitOrderRequest = new LimitOrderRequest(); // LimitOrderRequest | 
var brokerAccountId = brokerAccountId_example; // String | Номер счета (по умолчанию - Тинькофф)

try { 
    var result = api_instance.ordersLimitOrderPost(figi, limitOrderRequest, brokerAccountId);
    print(result);
} catch (e) {
    print('Exception when calling OrdersApi->ordersLimitOrderPost: $e\n');
}

Parameters

Name Type Description Notes
figi String FIGI инструмента
limitOrderRequest LimitOrderRequest
brokerAccountId String Номер счета (по умолчанию - Тинькофф) [optional]

Return type

LimitOrderResponse

Authorization

sso_auth

HTTP request headers

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

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

ordersMarketOrderPost

MarketOrderResponse ordersMarketOrderPost(figi, marketOrderRequest, brokerAccountId)

Создание рыночной заявки

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 OrdersApi();
var figi = figi_example; // String | FIGI инструмента
var marketOrderRequest = new MarketOrderRequest(); // MarketOrderRequest | 
var brokerAccountId = brokerAccountId_example; // String | Уникальный идентификатор счета (по умолчанию - Тинькофф)

try { 
    var result = api_instance.ordersMarketOrderPost(figi, marketOrderRequest, brokerAccountId);
    print(result);
} catch (e) {
    print('Exception when calling OrdersApi->ordersMarketOrderPost: $e\n');
}

Parameters

Name Type Description Notes
figi String FIGI инструмента
marketOrderRequest MarketOrderRequest
brokerAccountId String Уникальный идентификатор счета (по умолчанию - Тинькофф) [optional]

Return type

MarketOrderResponse

Authorization

sso_auth

HTTP request headers

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

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