luno 0.2.5 → 0.2.6

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: 2bb79592ad861d01f750a6cc79e6a8f223741db9b5a3c3f3b31de77ba4f27d5a
4
- data.tar.gz: bc13e43f33e5e031113d0d9dcb4b48e875f378215fc757bfaf2a92adb44819ba
3
+ metadata.gz: 5be906cc2e61a53ca9220d0d5e5b6797fe65a3dc9f58f74908ace2d120204669
4
+ data.tar.gz: ac6a1a0e7792437dc7671354c1694f9377bdc1e34479c19c2c9fad736891dbdf
5
5
  SHA512:
6
- metadata.gz: c145911f910ec93f28a06cfe86cdf53a97dc37333617089c63a08e589642e9dfa191983a66965344eb9f37f1b2be1455ab202dc8dfbb42d4f5fbb72ae290bed0
7
- data.tar.gz: 02461dfa45c1f734c350a3ba48fc5e21852478549f9ac9d5515098098e680a82c5e7f3566b0c5434b3d02871f0789aa366201c764105b375cf7ba627276a1e0b
6
+ metadata.gz: 3bebcce777d62325feeee9c3214e57fff69b398aacb2032a1a0bac25d6e9e919f07c4b43c1827f43f730f97d47bf82f0fba0518107ee1bf80e326a6c437dca01
7
+ data.tar.gz: f9d3333b6d35341163387805c339ecfc2dd7d5c93571e7b13fcbc4f79fecf0056c070af320a4180abfebe92e5028906fe2b3b5e21aa6170f23bae08781970def
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
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
data/lib/luno/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Luno
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luno
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - trex22