watchcow 0.1.10 → 0.1.11
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/watchcow/rate.rb +2 -2
- data/lib/watchcow/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4152adcf0ced5a26e3befac32831afde5897b5addcb9e05270e57980148448e1
|
|
4
|
+
data.tar.gz: 7704db9e1dd1fcf40ef75ef7324375f17e75382369f0c3172bd15ce242ebf206
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bbae037e0d859d8fe567485effdfbf9e53b9408715aaa27706c250c4fb7eef8645e646ec9215636af1212b8ef01c363fb0127b9f0a6d5e659ceaf0f41b35d226
|
|
7
|
+
data.tar.gz: 2d6ec45fc468831b5c82da5d1bb694b972ef633c2d96e7f5914bf57eea57f48bc39d0e97d8f4e542cdc71f852cf415ffe10633e902da945f6078f06621f4a523
|
data/lib/watchcow/rate.rb
CHANGED
|
@@ -33,7 +33,7 @@ module Watchcow
|
|
|
33
33
|
margin_expect = margin_annual / 365 * days_remain
|
|
34
34
|
base_gap = dm_first_bid - spot_first_bid
|
|
35
35
|
gap_rate = base_gap / dm_first_bid * 100
|
|
36
|
-
|
|
36
|
+
binding.pry if days_remain <= 0
|
|
37
37
|
real_margin_expect = (1.0 / spot_first_bid - 1.0 / dm_first_bid) * spot_first_bid * 100
|
|
38
38
|
result = {
|
|
39
39
|
coin: "#{coin}_#{t}",
|
|
@@ -62,7 +62,7 @@ module Watchcow
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def days_remain_of symbol, t
|
|
65
|
-
@contract_info
|
|
65
|
+
@contract_info = Watchcow::ContractInfo.call
|
|
66
66
|
line = @contract_info.dig('data').select do |h|
|
|
67
67
|
h.dig('symbol') == symbol.upcase && h.dig('contract_type') == KEYS[t]
|
|
68
68
|
end.first
|
data/lib/watchcow/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: watchcow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DrinE Liu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-06-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|