watchcow 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9be8072f67eb62cbc4b7cf1ba09f62d336121edd4190cf0cf8c90c5a72bda52
4
- data.tar.gz: ff1d7c9ec0a90d00f591a097240192b2b971e6dbece3e8fea816a313f15551ae
3
+ metadata.gz: d4ab5d0732e75c883a3d49c49f3df8135ddebe108def030247efadd9dfcadae5
4
+ data.tar.gz: 527d958620db506d46f9673f6ab88cd99153211384399aea1eb284836135c343
5
5
  SHA512:
6
- metadata.gz: 2f16346c204fe851b6d09c42c69e6fe38fb4a98bf29f2ba877650d17f72f6f477dbdd0d8732715b3a9d8488a44cc14a4e5cc353c88fd36a874641375391dcd8c
7
- data.tar.gz: 8fd9836528fc159891f4889b964b5a5bfb3eeca1ed490fc62c5f2d9b0ce04fa6d928bb0a47ceda1745f2b6e580bd4aacf937a619650e37d5134534c2abf2e9e9
6
+ metadata.gz: 85275053ba4d1d752fe63748de876c4e427d832b371f3db86982dacbb194b66fdba925cdbf8bacc8d43c0cc1f02bafffb65543c03751a017a9e07624d02d4efd
7
+ data.tar.gz: 55664d43e1eea63184a6231f45df738692bf218511a669843dc27a909986c7b1c8c22be1a9b78e0ea5a31abdb28dfe648cd0c56fd4d4c35833d5f57243f35fdd
data/lib/watchcow/rate.rb CHANGED
@@ -21,11 +21,12 @@ module Watchcow
21
21
  # puts dm_symbol.dig(:symbol)
22
22
  spot_result = Watchcow::MarketDepth.call(params: spot_symbol, k: :spot)
23
23
  # puts spot_symbol.dig(:symbol)
24
+ dm_result = JSON.parse dm_result
25
+ days_remain = self.days_remain_of(coin, t)
24
26
  rescue
25
27
  redo
26
28
  end
27
- dm_result = JSON.parse dm_result
28
- days_remain = self.days_remain_of(coin, t)
29
+
29
30
  dm_first_bid = dm_result.dig('tick', 'bids')[0][0].to_f
30
31
  spot_first_bid = spot_result.dig('tick', 'bids')[0][0].to_f
31
32
  margin_annual = (((dm_first_bid - spot_first_bid) / spot_first_bid) / days_remain * 365 * 100).round(6)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Watchcow
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchcow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - DrinE Liu