luno 0.2.3 → 0.2.7

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: 920d484f3544d1841cc060022ff2ea98f17f102022b65975ab0c36be9cdecd02
4
- data.tar.gz: b2d673196012333968b5f0a42314e5169f016b0850a6aeaa601f875aef4ad4a7
3
+ metadata.gz: 5996c0e75e16a7c0214117ad8b70dbc77437cbc4618551fa4497e8c0f03c3b75
4
+ data.tar.gz: 211b164f1c8806bcc36c7d304433bfbb00eee6454fa5d8d16e40c7c3025a01d2
5
5
  SHA512:
6
- metadata.gz: 84877ea294960d4147f428df2427239ae6aa7a1c54245158daee7baec85ddb7aa5f11c4a00cad988fc894726bba2997ca86c2eca83d17de485e88929e6a335a1
7
- data.tar.gz: 4000e7bdae86aaf7bfb24c10700314270c4edbced56ca468246adda1e916891ab4028d5c26421b1c2b222d8575d631c75e294309491777a2dc7c39142e3aa670
6
+ metadata.gz: 2bcf85710dd090c938b197756e1a536be5ed366ba9b52c7fd07d6b77b4678ed779ae77effa208262d8c62bb75cc4e7995c0828f28224d24b4bc7b37fdc735422
7
+ data.tar.gz: f9647d25fcac5354d2f4d99ca70249f4fdef9c9484aa8cc2ac8cab015e17d64875b31908a599f58215a897000f3e5d2ff178376153499929c339dfb06add8f2b
@@ -0,0 +1,18 @@
1
+ on:
2
+ pull_request: {}
3
+ push:
4
+ branches:
5
+ - main
6
+ - master
7
+ name: Semgrep
8
+ jobs:
9
+ semgrep:
10
+ name: Scan
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: returntocorp/semgrep-action@v1
15
+ with:
16
+ auditOn: push
17
+ publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
18
+ publishDeployment: 607
data/.gitignore CHANGED
File without changes
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.3
1
+ 3.0.2
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/Gemfile.lock CHANGED
@@ -1,62 +1,62 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- luno (0.2.3)
5
- active_attr (~> 0.15)
6
- httparty (~> 0.18)
7
- nokogiri (~> 1.11.2)
4
+ luno (0.2.5)
5
+ active_attr (~> 0.15.3)
6
+ httparty (~> 0.20.0)
7
+ nokogiri (~> 1.12.5)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.1.3)
13
- actionview (= 6.1.3)
14
- activesupport (= 6.1.3)
12
+ actionpack (6.1.4.1)
13
+ actionview (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
15
  rack (~> 2.0, >= 2.0.9)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.1.3)
20
- activesupport (= 6.1.3)
19
+ actionview (6.1.4.1)
20
+ activesupport (= 6.1.4.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- active_attr (0.15.2)
25
+ active_attr (0.15.3)
26
26
  actionpack (>= 3.0.2, < 7.0)
27
27
  activemodel (>= 3.0.2, < 7.0)
28
28
  activesupport (>= 3.0.2, < 7.0)
29
- activemodel (6.1.3)
30
- activesupport (= 6.1.3)
31
- activesupport (6.1.3)
29
+ activemodel (6.1.4.1)
30
+ activesupport (= 6.1.4.1)
31
+ activesupport (6.1.4.1)
32
32
  concurrent-ruby (~> 1.0, >= 1.0.2)
33
33
  i18n (>= 1.6, < 2)
34
34
  minitest (>= 5.1)
35
35
  tzinfo (~> 2.0)
36
36
  zeitwerk (~> 2.3)
37
- addressable (2.7.0)
37
+ addressable (2.8.0)
38
38
  public_suffix (>= 2.0.2, < 5.0)
39
39
  ansi (1.5.0)
40
40
  builder (3.2.4)
41
41
  coderay (1.1.3)
42
- concurrent-ruby (1.1.8)
42
+ concurrent-ruby (1.1.9)
43
43
  crack (0.4.5)
44
44
  rexml
45
45
  crass (1.0.6)
46
46
  erubi (1.10.0)
47
47
  hashdiff (1.0.1)
48
- httparty (0.18.1)
48
+ httparty (0.20.0)
49
49
  mime-types (~> 3.0)
50
50
  multi_xml (>= 0.5.2)
51
- i18n (1.8.9)
51
+ i18n (1.8.10)
52
52
  concurrent-ruby (~> 1.0)
53
- loofah (2.9.0)
53
+ loofah (2.12.0)
54
54
  crass (~> 1.0.2)
55
55
  nokogiri (>= 1.5.9)
56
56
  method_source (1.0.0)
57
57
  mime-types (3.3.1)
58
58
  mime-types-data (~> 3.2015)
59
- mime-types-data (3.2021.0225)
59
+ mime-types-data (3.2021.0901)
60
60
  minitest (5.14.4)
61
61
  minitest-focus (1.1.2)
62
62
  minitest (>= 4, < 6)
@@ -67,9 +67,9 @@ GEM
67
67
  ruby-progressbar
68
68
  mocha (1.11.2)
69
69
  multi_xml (0.6.0)
70
- nokogiri (1.11.2-x86_64-linux)
70
+ nokogiri (1.12.5-arm64-darwin)
71
71
  racc (~> 1.4)
72
- pry (0.14.0)
72
+ pry (0.14.1)
73
73
  coderay (~> 1.1)
74
74
  method_source (~> 1.0)
75
75
  public_suffix (4.0.6)
@@ -80,10 +80,10 @@ GEM
80
80
  rails-dom-testing (2.0.3)
81
81
  activesupport (>= 4.2.0)
82
82
  nokogiri (>= 1.6)
83
- rails-html-sanitizer (1.3.0)
83
+ rails-html-sanitizer (1.4.2)
84
84
  loofah (~> 2.3)
85
- rake (13.0.3)
86
- rexml (3.2.4)
85
+ rake (13.0.6)
86
+ rexml (3.2.5)
87
87
  ruby-progressbar (1.11.0)
88
88
  timecop (0.9.4)
89
89
  tzinfo (2.0.4)
@@ -95,10 +95,10 @@ GEM
95
95
  zeitwerk (2.4.2)
96
96
 
97
97
  PLATFORMS
98
- ruby
98
+ arm64-darwin-20
99
99
 
100
100
  DEPENDENCIES
101
- bundler (~> 1.17)
101
+ bundler (~> 2.2.22)
102
102
  luno!
103
103
  minitest (~> 5.0)
104
104
  minitest-focus (~> 1.1.2)
@@ -110,4 +110,4 @@ DEPENDENCIES
110
110
  webmock (~> 3.8.3)
111
111
 
112
112
  BUNDLED WITH
113
- 1.17.3
113
+ 2.2.22
data/LICENSE CHANGED
File without changes
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/lib/luno/accounts.rb CHANGED
File without changes
File without changes
data/lib/luno/client.rb CHANGED
@@ -22,7 +22,7 @@ module Luno
22
22
 
23
23
  attr_reader :key, :secret, :base_path, :port
24
24
 
25
- def initialize(key:, secret:, base_path: 'https://api.mybitx.com/api/1', port: 80)
25
+ def initialize(key:, secret:, base_path: 'https://api.luno.com/api/1', port: 80)
26
26
  @key = key
27
27
  @secret = secret
28
28
  @base_path = base_path
@@ -12,6 +12,7 @@ module Luno
12
12
  ZMW: 'Zambian Kwacha'
13
13
  }
14
14
 
15
+ # TODO: Update, see: https://www.luno.com/en/countries
15
16
  CURRENCY_PAIRS = [
16
17
  'XBTEUR',
17
18
  'XBTZAR',
@@ -67,4 +68,4 @@ module Luno
67
68
  API_RATE_LIMIT = 5 # per second per ip
68
69
  API_BURST_RATE_LIMIT = 25 # per second per ip
69
70
  end
70
- end
71
+ end
File without changes
data/lib/luno/markets.rb CHANGED
@@ -4,5 +4,15 @@ module Luno
4
4
  path = "orderbook_top?pair=#{pair}"
5
5
  unauthorised_and_send(http_method: :get, path: path)
6
6
  end
7
+
8
+ def list_ticker_for_pair(pair:)
9
+ path = 'ticker'
10
+ authorise_and_send(http_method: :get, path: path, params: { pair: pair })
11
+ end
12
+
13
+ def list_tickets_for_all_pairs
14
+ path = 'tickers'
15
+ authorise_and_send(http_method: :get, path: path)
16
+ end
7
17
  end
8
- end
18
+ end
data/lib/luno/orders.rb CHANGED
@@ -1,5 +1,21 @@
1
1
  module Luno
2
2
  module Orders
3
+ def get_fee_information(maker:, taker:)
4
+ path = "fee_info"
5
+ pair = "#{maker}#{taker}".upcase
3
6
 
7
+ # TODO: Validate pair from constants
8
+ authorise_and_send(http_method: :get, path: path, params: { pair: pair })
9
+ end
10
+
11
+ def list_orders
12
+ path = "list_orders"
13
+ authorise_and_send(http_method: :get, path: path)
14
+ end
15
+
16
+ def list_trades
17
+ path = "list_trades"
18
+ authorise_and_send(http_method: :get, path: path)
19
+ end
4
20
  end
5
- end
21
+ end
File without changes
data/lib/luno/quotes.rb CHANGED
File without changes
File without changes
data/lib/luno/sending.rb CHANGED
File without changes
File without changes
File without changes
data/lib/luno/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Luno
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.7"
3
3
  end
File without changes
data/lib/luno.rb CHANGED
File without changes
data/luno.gemspec CHANGED
@@ -22,12 +22,12 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency "httparty", "~> 0.18"
26
- spec.add_dependency "active_attr", "~> 0.15"
27
- spec.add_dependency "nokogiri", "~> 1.11.2"
25
+ spec.add_dependency "httparty", "~> 0.20.0"
26
+ spec.add_dependency "active_attr", "~> 0.15.3"
27
+ spec.add_dependency "nokogiri", "~> 1.12.5"
28
28
 
29
29
  # Development dependancies
30
- spec.add_development_dependency "bundler", "~> 1.17"
30
+ spec.add_development_dependency "bundler", "~> 2.2.22"
31
31
  spec.add_development_dependency "rake", "~> 13.0"
32
32
  spec.add_development_dependency "minitest", "~> 5.0"
33
33
  spec.add_development_dependency "minitest-focus", "~> 1.1.2"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luno
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - trex22
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-13 00:00:00.000000000 Z
11
+ date: 2021-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.18'
19
+ version: 0.20.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.18'
26
+ version: 0.20.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: active_attr
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.15'
33
+ version: 0.15.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.15'
40
+ version: 0.15.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.11.2
47
+ version: 1.12.5
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.11.2
54
+ version: 1.12.5
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.17'
61
+ version: 2.2.22
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.17'
68
+ version: 2.2.22
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -186,6 +186,7 @@ executables: []
186
186
  extensions: []
187
187
  extra_rdoc_files: []
188
188
  files:
189
+ - ".github/workflows/semgrep.yml"
189
190
  - ".gitignore"
190
191
  - ".ruby-version"
191
192
  - CODE_OF_CONDUCT.md
@@ -218,7 +219,7 @@ homepage: https://github.com/TRex22/luno
218
219
  licenses:
219
220
  - MIT
220
221
  metadata: {}
221
- post_install_message:
222
+ post_install_message:
222
223
  rdoc_options: []
223
224
  require_paths:
224
225
  - lib
@@ -233,8 +234,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
234
  - !ruby/object:Gem::Version
234
235
  version: '0'
235
236
  requirements: []
236
- rubygems_version: 3.0.6
237
- signing_key:
237
+ rubygems_version: 3.2.22
238
+ signing_key:
238
239
  specification_version: 4
239
240
  summary: A client for using the Luno API in Ruby.
240
241
  test_files: []