invest_tinkoff 0.9.6.2 → 0.9.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/invest_tinkoff/v2/client.rb +16 -2
- data/lib/invest_tinkoff/version.rb +1 -1
- data/lib/invest_tinkoff.rb +11 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 437e1089db4bb15e5fe9dc2d0d18f4646aa0c2f9d16eaef4954d5a0b0d0cbfd7
|
4
|
+
data.tar.gz: b375de7fb12d4583fe699f039972c65de7ca269d36850731c38bd41977446239
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23da33fe19acc52b9c896d473ffc4b851be4007e66284ffd0199f5575602242b39599dab6edcefdb9edc1a7c33e1db33a402a9f610ea2d8e9e16a091575ca7cc
|
7
|
+
data.tar.gz: 290630fe28e66d1984c0384967ad00dca396c974ad2587781e52e40cf32a6d69fbfcb878f1e067b0ad9956e70be60c0ec7363e7e2b5ad11b10b30cb345fc3a00
|
@@ -352,6 +352,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
352
352
|
|
353
353
|
# Метод получения доступного остатка для вывода средств.
|
354
354
|
# https://tinkoff.github.io/investAPI/operations/#getwithdrawlimits
|
355
|
+
#
|
356
|
+
# @account_id: String
|
355
357
|
def withdraw_limits account_id:
|
356
358
|
operation_request '/GetWithdrawLimits', { accountId: account_id }
|
357
359
|
end
|
@@ -361,6 +363,7 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
361
363
|
# ==========================================
|
362
364
|
|
363
365
|
# Метод получения списка активных заявок по счёту.
|
366
|
+
# https://tinkoff.github.io/investAPI/orders/#getorders
|
364
367
|
#
|
365
368
|
# @account_id: String
|
366
369
|
def orders account_id:
|
@@ -424,6 +427,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
424
427
|
|
425
428
|
# Метод получения списка активных стоп заявок по счёту.
|
426
429
|
# https://tinkoff.github.io/investAPI/stoporders/#getstoporders
|
430
|
+
#
|
431
|
+
# @account_id: String
|
427
432
|
def stop_orders account_id:
|
428
433
|
body = { accountId: account_id }
|
429
434
|
stop_order_request '/GetStopOrders', body
|
@@ -445,9 +450,9 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
445
450
|
quantity:,
|
446
451
|
price:,
|
447
452
|
stop_price:,
|
453
|
+
expire_date:,
|
448
454
|
expiration_type: InvestTinkoff::V2::StopOrderExpirationType::UNSPECIFIED,
|
449
|
-
stop_order_type: InvestTinkoff::V2::StopOrderType::UNSPECIFIED
|
450
|
-
expire_date:
|
455
|
+
stop_order_type: InvestTinkoff::V2::StopOrderType::UNSPECIFIED
|
451
456
|
)
|
452
457
|
body = {
|
453
458
|
accountId: account_id,
|
@@ -464,6 +469,9 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
464
469
|
|
465
470
|
# Метод отмены стоп-заявки.
|
466
471
|
# https://tinkoff.github.io/investAPI/stoporders/#cancelstoporder
|
472
|
+
#
|
473
|
+
# @account_id: String
|
474
|
+
# @order_id: String
|
467
475
|
def cancel_stop_order account_id:, order_id:
|
468
476
|
body = { accountId: account_id, stopOrderId: order_id }
|
469
477
|
stop_order_request '/CancelStopOrder', body
|
@@ -474,22 +482,28 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
474
482
|
# ==========================================
|
475
483
|
|
476
484
|
# Метод получения счетов пользователя.
|
485
|
+
# https://tinkoff.github.io/investAPI/users/#getaccounts
|
477
486
|
def accounts
|
478
487
|
user_service_request '/GetAccounts'
|
479
488
|
end
|
480
489
|
|
481
490
|
# Метод получения информации о пользователе.
|
491
|
+
# https://tinkoff.github.io/investAPI/users/#getinfo
|
482
492
|
def info
|
483
493
|
user_service_request '/GetInfo'
|
484
494
|
end
|
485
495
|
|
486
496
|
# Расчёт маржинальных показателей по счёту.
|
497
|
+
# https://tinkoff.github.io/investAPI/users/#getmarginattributes
|
498
|
+
#
|
499
|
+
# @account_id: String
|
487
500
|
def margin_attributes account_id:
|
488
501
|
body = { accountId: account_id }
|
489
502
|
user_service_request '/GetMarginAttributes', body
|
490
503
|
end
|
491
504
|
|
492
505
|
# Текущий тариф пользователя (лимиты запросов к API).
|
506
|
+
# https://tinkoff.github.io/investAPI/users/#getusertariff
|
493
507
|
def user_tariff
|
494
508
|
user_service_request '/GetUserTariff'
|
495
509
|
end
|
data/lib/invest_tinkoff.rb
CHANGED
@@ -16,6 +16,16 @@ require 'invest_tinkoff/v1/client'
|
|
16
16
|
require 'invest_tinkoff/v1/response'
|
17
17
|
require 'invest_tinkoff/v1/sandbox_client'
|
18
18
|
|
19
|
-
require 'invest_tinkoff/v2/client'
|
20
19
|
require 'invest_tinkoff/v2/response'
|
20
|
+
require 'invest_tinkoff/v2/candle_interval'
|
21
|
+
require 'invest_tinkoff/v2/edit_favorites_action_type'
|
22
|
+
require 'invest_tinkoff/v2/instrument_id_type'
|
23
|
+
require 'invest_tinkoff/v2/instrument_status'
|
24
|
+
require 'invest_tinkoff/v2/operation_state'
|
25
|
+
require 'invest_tinkoff/v2/order_direction'
|
26
|
+
require 'invest_tinkoff/v2/order_type'
|
27
|
+
require 'invest_tinkoff/v2/quotation'
|
28
|
+
require 'invest_tinkoff/v2/stop_order_expiration_type'
|
29
|
+
require 'invest_tinkoff/v2/stop_order_type'
|
30
|
+
require 'invest_tinkoff/v2/client'
|
21
31
|
require 'invest_tinkoff/v2/sandbox_client'
|