invest_tinkoff 0.9.6.4 → 0.9.6.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fbcf852912833bfc0b4760f5736a4a2b5cf2e284d24f238a1ae2166eca8a129
4
- data.tar.gz: e7972d3106c8a6912ad45d8354e5c90ec88418ef5052c7abdcdb1ae53a8e535c
3
+ metadata.gz: b7d24b1e30bc7256e6295760f7f9f40f537c47fc75631d517bf50fa7e31d010a
4
+ data.tar.gz: dad9c3c3898a74d5859930b4c64c35739e1d2cdc3526e8031149a54ee7b89301
5
5
  SHA512:
6
- metadata.gz: 983eabe9a19ae34024eda5a42454a778dfac1fb4e53f82e070f5a3c1ec8162cf87b9534b272eadd447b705aff7b3ba775a4c790263d9cba0e99670d8aa1bd769
7
- data.tar.gz: 2639a3c830d0b241e8d008de18adf14b5e4930d45a49c3ab2abd0d6f9ecb06c04ba601017b79328e9331d787f52cc54ca0d32c0361440ea5a9dc1c0d9efebb7b
6
+ metadata.gz: 422871a9b114440b61c4a9bccd0d644b1e3a059cd2a69631235bcc8926760c2319ab04b29fa2a2c9e11177afd2fa45a7e9f8ada20ed0674ad03f6e1c46b11dc7
7
+ data.tar.gz: bcf6786f2b94c8bfda1c5587700c198f011d013edad1e7574199f9adbcef1c4b9d5ffb2cab3fdeba4448476c66062bfa1fc5e53dc3e2e7c288daf949e0d396a8
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'httparty'
4
+
3
5
  module InvestTinkoff
4
6
  class ClientBase
5
7
  include HTTParty
@@ -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:%m:%S.000Z'
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(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InvestTinkoff
4
- VERSION = '0.9.6.4'
4
+ VERSION = '0.9.6.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invest_tinkoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6.4
4
+ version: 0.9.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kalinichev