invest_tinkoff 0.9.6.5 → 0.9.6.7
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 +14 -13
- data/lib/invest_tinkoff/v2/quotation.rb +1 -1
- data/lib/invest_tinkoff/version.rb +1 -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: 57fba89b9797f030b0ccfb95a51435bed691f323ecf5616514fda7aa3abeae1b
|
4
|
+
data.tar.gz: ab79be05312da33162f6840645ce643b5dd5d75bedaeeba2ac08f0cdb0ce364d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 512985515d5bca2faa66e8731f98304d4195212e948c6ee1bc080c1ffedbff238a1891340a6cdfaaa8faf8d17e22d8c3046f906c42db1b4ff983df2cab242bef
|
7
|
+
data.tar.gz: 9dd448f7a6c9ed8131175aa500c81450656ec84c15d7e65aa5b9e3b1233d47bce2735f7f55f80f2b6712a99554009eb5cbdd089d57b110fb164c3405d58063d4
|
@@ -3,7 +3,7 @@
|
|
3
3
|
class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
4
4
|
base_uri 'https://invest-public-api.tinkoff.ru/rest/'
|
5
5
|
|
6
|
-
TIME_FORMAT = '%Y-%m-%dT%H:%
|
6
|
+
TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.000Z'
|
7
7
|
|
8
8
|
def initialize token:, logger: nil
|
9
9
|
super(
|
@@ -118,8 +118,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
118
118
|
# https://tinkoff.github.io/investAPI/instruments/#getaccruedinterests
|
119
119
|
#
|
120
120
|
# @figi: String, пример: 'BBG00X6ZGSY7'
|
121
|
-
# @from: Time, пример: 1.year.ago
|
122
|
-
# @to: Time, пример: 2.months.from_now
|
121
|
+
# @from: Time, пример: 1.year.ago.utc
|
122
|
+
# @to: Time, пример: 2.months.from_now.utc
|
123
123
|
def accrued_interests figi:, from:, to:
|
124
124
|
body = {
|
125
125
|
figi: figi,
|
@@ -147,8 +147,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
147
147
|
# https://tinkoff.github.io/investAPI/instruments/#getbondcoupons
|
148
148
|
#
|
149
149
|
# @figi: String, пример: 'BBG00X6ZGSY7'
|
150
|
-
# @from: Time, пример: 1.year.ago
|
151
|
-
# @to: Time, пример: 6.months.from_now
|
150
|
+
# @from: Time, пример: 1.year.ago.utc
|
151
|
+
# @to: Time, пример: 6.months.from_now.utc
|
152
152
|
def bond_coupons figi:, from:, to:
|
153
153
|
body = {
|
154
154
|
figi: figi,
|
@@ -162,8 +162,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
162
162
|
# https://tinkoff.github.io/investAPI/instruments/#getdividends
|
163
163
|
#
|
164
164
|
# @figi: String, пример: 'BBG000B9XRY4'
|
165
|
-
# @from: Time, пример: 1.year.ago
|
166
|
-
# @to: Time, пример: 1.month.from_now
|
165
|
+
# @from: Time, пример: 1.year.ago.utc
|
166
|
+
# @to: Time, пример: 1.month.from_now.utc
|
167
167
|
def dividends figi:, from:, to:
|
168
168
|
body = {
|
169
169
|
figi: figi,
|
@@ -225,8 +225,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
225
225
|
# https://tinkoff.github.io/investAPI/instruments/#tradingschedulesrequest
|
226
226
|
#
|
227
227
|
# @exchange: String, пример: 'MOEX'
|
228
|
-
# @from: Time, пример: 1.day.from_now
|
229
|
-
# @to: Time, пример: 5.days.from_now
|
228
|
+
# @from: Time, пример: 1.day.from_now.utc
|
229
|
+
# @to: Time, пример: 5.days.from_now.utc
|
230
230
|
def trading_schedules exchange:, from:, to:
|
231
231
|
body = {
|
232
232
|
exchange: exchange,
|
@@ -244,8 +244,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
244
244
|
# https://tinkoff.github.io/investAPI/marketdata/#getcandles
|
245
245
|
#
|
246
246
|
# @figi: String, пример: 'BBG000B9XRY4'
|
247
|
-
# @from: Time, пример: 1.hour.ago
|
248
|
-
# @to: Time, пример: Time.zone.now
|
247
|
+
# @from: Time, пример: 1.hour.ago.utc
|
248
|
+
# @to: Time, пример: Time.zone.now.utc
|
249
249
|
# @interval: InvestTinkoff::V2::CandleInterval
|
250
250
|
def candles figi:, from:, to:, interval: InvestTinkoff::V2::CandleInterval::HOUR
|
251
251
|
body = {
|
@@ -269,8 +269,8 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
269
269
|
# https://tinkoff.github.io/investAPI/marketdata/#getlasttrades
|
270
270
|
#
|
271
271
|
# @figi: String, пример: 'BBG000B9XRY4'
|
272
|
-
# @from: Time, пример: 1.hour.ago
|
273
|
-
# @to: Time, пример: Time.zone.now
|
272
|
+
# @from: Time, пример: 1.hour.ago.utc
|
273
|
+
# @to: Time, пример: Time.zone.now.utc
|
274
274
|
def last_trades figi:, from:, to:
|
275
275
|
body = {
|
276
276
|
figi: figi,
|
@@ -442,6 +442,7 @@ class InvestTinkoff::V2::Client < InvestTinkoff::ClientBase
|
|
442
442
|
# @quantity: Integer
|
443
443
|
# @price: Float
|
444
444
|
# @stop_price: Float
|
445
|
+
# @expire_date: Time
|
445
446
|
# @expiration_type: InvestTinkoff::V2::StopOrderExpirationType
|
446
447
|
# @stop_order_type: InvestTinkoff::V2::StopOrderType
|
447
448
|
def create_stop_order(
|