forked from coingecko/cryptoexchange
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.byebug_history
113 lines (113 loc) · 3.01 KB
/
.byebug_history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
c
contract_info
c
market_pair.contract_interval
open_interest_output["monthData"]
open_interest = open_interest_output["monthData"].find { |i| i["month"] == market_pair.contract_interval }
c
JSON.parse open_interest_outputc
JSON.parse open_interest_output
JSON.parse open_interest_output.response
JSON.parse open_interest_output.respnse
open_interest_output = WrappedHTTP.client.timeout(25).follow.use(:auto_inflate).get(open_interest_url(Time.now.to_date.prev_day.strftime("%Y%m%d")))
open_interest_url(Time.now.to_date.prev_day.strftime("%Y%m%d"))
c
1.day.ago
c
open_interest_url(Time.now.strftime("%Y%m%d"))
c
open_interest_outputc
open_interest_output["monthData"]
open_interest_output
c
xc
x
c
market_pair.inst_id.nil?
market_pair.inst_id.present?
market_pair.inst_id
market_pair
market_paid
t.inst_id
s = tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) || (t.base.casecmp(market_pair.base) == 0 && t.target.casecmp(market_pair.target) == 0) }
s = tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) }
c
s = tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) }
market_paoir
market_paooir
market_paoir
s = tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) }
tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) }.first
tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) }
tickers
exit
c
market_pair
c
market_pair
c
market_pair
c
market_pair
c
market_pair
c
market_pair
c
market_pair
c
(expire-start)/86400
expire-start
c
pair
market_pair
pairs
(expire_timestamp - start_timestamp)/86400
expire_timestamp - start_timestamp
expire_timestamp = DateTime.parse(expire).to_time
start_timestamp = DateTime.parse(start).to_time
expire
start
DateTime.parse("").to_time
DateTime.parse(nil)
DateTime.parse(nil).to_time
DateTime.parse(nil).to_time.to_i
DateTime.parse(expire).to_time.to_i
DateTime.parse(expire).to_time
DateTime.parse(expire)
DateTime.parse(expire).to_i
start
expire
expire - start
start
c
pp output
output
c
tt = tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) || (t.base.casecmp(market_pair.base) == 0 && t.target.casecmp(market_pair.target) == 0)}
tt.size
tt = tickers.select { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) || (t.base.casecmp(market_pair.base) == 0 && t.target.casecmp(market_pair.target) == 0)}
tt
tt.size
tt = tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) || (t.base.casecmp(market_pair.base) == 0 && t.target.casecmp(market_pair.target) == 0)}
tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) || (t.base.casecmp(market_pair.base) == 0 && t.target.casecmp(market_pair.target) == 0)}
tickers.find { |t| (t.inst_id.casecmp(market_pair.inst_id) == 0 if t.inst_id) }
tickers.find do |t|
market_pair.inst_id
tickers
tickers = market.fetch
tickers
c
ss.size
ss = swaps + futures
swaps + futures
futures
swaps
c
args
c
btc_usd_pair.inst_id
c
btc_usd_pair.inst_id
btc_usd_pair
inst_id