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 +4 -4
- data/lib/luno/client.rb +1 -1
- data/lib/luno/constants.rb +2 -1
- data/lib/luno/orders.rb +17 -1
- data/lib/luno/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5be906cc2e61a53ca9220d0d5e5b6797fe65a3dc9f58f74908ace2d120204669
|
4
|
+
data.tar.gz: ac6a1a0e7792437dc7671354c1694f9377bdc1e34479c19c2c9fad736891dbdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
data/lib/luno/constants.rb
CHANGED
@@ -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