waves_ruby_client 0.1.1 → 0.1.2
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 +5 -5
- data/.gitignore +0 -1
- data/.ruby-version +1 -1
- data/.semaphore/semaphore.yml +31 -0
- data/Gemfile.lock +98 -0
- data/lib/waves_ruby_client.rb +1 -1
- data/lib/waves_ruby_client/data_feed.rb +4 -2
- data/lib/waves_ruby_client/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 043be5fb5fb27c392d899c17530eef4f49b03b02a9c28591102fe2a238b7cfa3
|
|
4
|
+
data.tar.gz: 68db9657a72dd389f6fb7fee1727a00b1b083b17e48140cedb11b47ae4058f0e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c849dda39cfa8e697eecc993197d5022461db57afbc40991562010801641f7583209d8bcc7855d675756ce6d58cbfff42672d672840e0540d7a04f9c97b5bf53
|
|
7
|
+
data.tar.gz: 9c0dd6ddf9e7790eb4bfd0914a35dd17fcf5adf911d10db109d7fef77b2a4f07a3aafdc6432dbb200e644b739002a913b95dc2bee18d5c30904d3eabb5867cda
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.6.3
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
version: v1.0
|
|
2
|
+
name: Waves Ruby Client
|
|
3
|
+
agent:
|
|
4
|
+
machine:
|
|
5
|
+
type: e1-standard-2
|
|
6
|
+
os_image: ubuntu1804
|
|
7
|
+
|
|
8
|
+
blocks:
|
|
9
|
+
- name: Bundle
|
|
10
|
+
task:
|
|
11
|
+
jobs:
|
|
12
|
+
- name: bundle install and cache
|
|
13
|
+
commands:
|
|
14
|
+
- checkout
|
|
15
|
+
- cache restore bundle-$(checksum Gemfile.lock)
|
|
16
|
+
- bundle install --deployment
|
|
17
|
+
- cache store bundle-$(checksum Gemfile.lock) vendor/bundle
|
|
18
|
+
|
|
19
|
+
- name: Tests
|
|
20
|
+
task:
|
|
21
|
+
prologue:
|
|
22
|
+
commands:
|
|
23
|
+
- checkout
|
|
24
|
+
- cache restore bundle-$(checksum Gemfile.lock)
|
|
25
|
+
env_vars:
|
|
26
|
+
- name: BUNDLE_PATH
|
|
27
|
+
value: vendor/bundle
|
|
28
|
+
jobs:
|
|
29
|
+
- name: RSpec
|
|
30
|
+
commands:
|
|
31
|
+
- bundle exec rspec
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
waves_ruby_client (0.1.2)
|
|
5
|
+
activemodel
|
|
6
|
+
activesupport
|
|
7
|
+
httparty
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
activemodel (6.0.0)
|
|
13
|
+
activesupport (= 6.0.0)
|
|
14
|
+
activesupport (6.0.0)
|
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
16
|
+
i18n (>= 0.7, < 2)
|
|
17
|
+
minitest (~> 5.1)
|
|
18
|
+
tzinfo (~> 1.1)
|
|
19
|
+
zeitwerk (~> 2.1, >= 2.1.8)
|
|
20
|
+
coderay (1.1.2)
|
|
21
|
+
concurrent-ruby (1.1.5)
|
|
22
|
+
diff-lcs (1.3)
|
|
23
|
+
ffi (1.9.25)
|
|
24
|
+
formatador (0.2.5)
|
|
25
|
+
guard (2.14.2)
|
|
26
|
+
formatador (>= 0.2.4)
|
|
27
|
+
listen (>= 2.7, < 4.0)
|
|
28
|
+
lumberjack (>= 1.0.12, < 2.0)
|
|
29
|
+
nenv (~> 0.1)
|
|
30
|
+
notiffany (~> 0.0)
|
|
31
|
+
pry (>= 0.9.12)
|
|
32
|
+
shellany (~> 0.0)
|
|
33
|
+
thor (>= 0.18.1)
|
|
34
|
+
guard-compat (1.2.1)
|
|
35
|
+
guard-rspec (4.7.3)
|
|
36
|
+
guard (~> 2.1)
|
|
37
|
+
guard-compat (~> 1.1)
|
|
38
|
+
rspec (>= 2.99.0, < 4.0)
|
|
39
|
+
httparty (0.17.1)
|
|
40
|
+
mime-types (~> 3.0)
|
|
41
|
+
multi_xml (>= 0.5.2)
|
|
42
|
+
i18n (1.7.0)
|
|
43
|
+
concurrent-ruby (~> 1.0)
|
|
44
|
+
listen (3.1.5)
|
|
45
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
46
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
|
47
|
+
ruby_dep (~> 1.2)
|
|
48
|
+
lumberjack (1.0.13)
|
|
49
|
+
method_source (0.9.1)
|
|
50
|
+
mime-types (3.3)
|
|
51
|
+
mime-types-data (~> 3.2015)
|
|
52
|
+
mime-types-data (3.2019.1009)
|
|
53
|
+
minitest (5.12.2)
|
|
54
|
+
multi_xml (0.6.0)
|
|
55
|
+
nenv (0.3.0)
|
|
56
|
+
notiffany (0.1.1)
|
|
57
|
+
nenv (~> 0.1)
|
|
58
|
+
shellany (~> 0.0)
|
|
59
|
+
pry (0.12.0)
|
|
60
|
+
coderay (~> 1.1.0)
|
|
61
|
+
method_source (~> 0.9.0)
|
|
62
|
+
rake (10.5.0)
|
|
63
|
+
rb-fsevent (0.10.3)
|
|
64
|
+
rb-inotify (0.9.10)
|
|
65
|
+
ffi (>= 0.5.0, < 2)
|
|
66
|
+
rspec (3.8.0)
|
|
67
|
+
rspec-core (~> 3.8.0)
|
|
68
|
+
rspec-expectations (~> 3.8.0)
|
|
69
|
+
rspec-mocks (~> 3.8.0)
|
|
70
|
+
rspec-core (3.8.0)
|
|
71
|
+
rspec-support (~> 3.8.0)
|
|
72
|
+
rspec-expectations (3.8.2)
|
|
73
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
74
|
+
rspec-support (~> 3.8.0)
|
|
75
|
+
rspec-mocks (3.8.0)
|
|
76
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
77
|
+
rspec-support (~> 3.8.0)
|
|
78
|
+
rspec-support (3.8.0)
|
|
79
|
+
ruby_dep (1.5.0)
|
|
80
|
+
shellany (0.0.1)
|
|
81
|
+
thor (0.20.0)
|
|
82
|
+
thread_safe (0.3.6)
|
|
83
|
+
tzinfo (1.2.5)
|
|
84
|
+
thread_safe (~> 0.1)
|
|
85
|
+
zeitwerk (2.2.0)
|
|
86
|
+
|
|
87
|
+
PLATFORMS
|
|
88
|
+
ruby
|
|
89
|
+
|
|
90
|
+
DEPENDENCIES
|
|
91
|
+
bundler (~> 1.14)
|
|
92
|
+
guard-rspec
|
|
93
|
+
rake (~> 10.0)
|
|
94
|
+
rspec (~> 3.0)
|
|
95
|
+
waves_ruby_client!
|
|
96
|
+
|
|
97
|
+
BUNDLED WITH
|
|
98
|
+
1.17.2
|
data/lib/waves_ruby_client.rb
CHANGED
|
@@ -33,7 +33,7 @@ module WavesRubyClient
|
|
|
33
33
|
API_URL = ENV['WAVES_API_URL'] || 'https://nodes.wavesnodes.com'
|
|
34
34
|
MATCHER_PUBLIC_KEY = ENV['WAVES_MATCHER_PUBLIC_KEY'] ||
|
|
35
35
|
'7kPFrHDiGw1rCm7LPszuECwWYL3dMf6iMifLRDJQZMzy'
|
|
36
|
-
DATA_FEED_URL = '
|
|
36
|
+
DATA_FEED_URL = 'https://api.wavesplatform.com/v0'
|
|
37
37
|
|
|
38
38
|
BTC_ASSET_ID = '8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS'
|
|
39
39
|
WAVES_ASSET_ID = 'WAVES'
|
|
@@ -7,10 +7,12 @@ module WavesRubyClient
|
|
|
7
7
|
|
|
8
8
|
# get history from data feed
|
|
9
9
|
def self.trade_history(count = 10)
|
|
10
|
-
WavesRubyClient::Api.instance.call_data_feed("/
|
|
10
|
+
WavesRubyClient::Api.instance.call_data_feed("/transactions/exchange?amountAsset=WAVES&limit=#{count}")['data'].map do |entry|
|
|
11
|
+
order = entry['data']
|
|
11
12
|
order['price'] = order['price'].to_f
|
|
12
|
-
order['timestamp'] = order['timestamp']
|
|
13
|
+
order['timestamp'] = Time.parse(order['timestamp'])
|
|
13
14
|
order['amount'] = order['amount'].to_f
|
|
15
|
+
%w[height version proofs fee sender].each{ |v| order.delete(v) }
|
|
14
16
|
WavesRubyClient::Order.new(order)
|
|
15
17
|
end
|
|
16
18
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: waves_ruby_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Philipp Großelfinger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|
|
@@ -118,9 +118,11 @@ files:
|
|
|
118
118
|
- ".gitignore"
|
|
119
119
|
- ".rspec"
|
|
120
120
|
- ".ruby-version"
|
|
121
|
+
- ".semaphore/semaphore.yml"
|
|
121
122
|
- ".travis.yml"
|
|
122
123
|
- CODE_OF_CONDUCT.md
|
|
123
124
|
- Gemfile
|
|
125
|
+
- Gemfile.lock
|
|
124
126
|
- Guardfile
|
|
125
127
|
- LICENSE.txt
|
|
126
128
|
- README.md
|
|
@@ -164,8 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
164
166
|
- !ruby/object:Gem::Version
|
|
165
167
|
version: '0'
|
|
166
168
|
requirements: []
|
|
167
|
-
|
|
168
|
-
rubygems_version: 2.6.11
|
|
169
|
+
rubygems_version: 3.0.3
|
|
169
170
|
signing_key:
|
|
170
171
|
specification_version: 4
|
|
171
172
|
summary: Ruby Client for Waves Platform API
|