fuly 0.0.9 → 0.0.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d531168d90e0a52ffa9b7bc870b999dc60f4990f7a496c88f64bfe9316e7fed
4
- data.tar.gz: 2f8a2c89230ee48b6bc47bc80340ea135379f0a31605fd315cd8b34dd18e3f29
3
+ metadata.gz: 4ed6618d4430916ccdf37b24a4916957c3912d62d6deafb9ca56e4d8b5747afe
4
+ data.tar.gz: be28ea133ac9b9bdf47c094fccb070fdeee92f208205dfdde498d221394b6215
5
5
  SHA512:
6
- metadata.gz: 6e5e3484dbd42ecb9bda2d9497f83e73736ad94bf28273bea67701463b862f74d43005611229c960955c126b6b0cb5cec372f9aee90ec0c4ebbedff886b0631b
7
- data.tar.gz: 425a65502de581b0dfc7882bcccda747b7267c1f07b7cd80bcabf66b7d0e450cf6b7f8004cf4c93da250946b3e4ed854d7cdf6cf465c2ec2db2c7d5f920d9fb7
6
+ metadata.gz: bbdbea345ecfbd67d553651cd15323d3097e25fe909db16a9ce84c6420abd2c1432d76ef4182b5ace2722198e06fd2b4bb5258b913abd5941d6ec58cc7519d4f
7
+ data.tar.gz: 5bbb059a25bfe9d8f2293890463ee6e5061d2e5664eb0440eb788f5c2744bea802b4f9f54e070810a33667dfe76a6b6b11cd0b7c4b21cc58f2d0e35bddd02987
@@ -45,14 +45,16 @@ module Bitfinex
45
45
  # https://docs.bitfinex.com/reference#submit-funding-offer
46
46
  def funding_create_offer(currency, amount, rate, period)
47
47
  # auth/w/funding/offer/submit
48
- request("auth/w/funding/offer/submit", {
48
+ res = request("auth/w/funding/offer/submit", {
49
49
  type: "LIMIT",
50
50
  symbol: currency, #fUSD
51
51
  amount: amount, #借款要是負的
52
52
  rate: rate,
53
53
  period: period,
54
- flags: 0,
54
+ flags: 64,
55
55
  }).body
56
+ res = JSON.parse(res)
57
+ return res
56
58
  end
57
59
 
58
60
  # https://docs.bitfinex.com/v1/reference#rest-auth-offers
@@ -1,12 +1,37 @@
1
1
  module Bitfinex
2
2
  module Wallet
3
+ # Ratelimit: 90 req/min
4
+ # https://docs.bitfinex.com/reference#rest-auth-info-user
5
+ def user_info
6
+ res = request("auth/r/info/user").body
7
+ return JSON.parse(res)
8
+ end
9
+
10
+ # Ratelimit: 90 req/min
11
+ # https://docs.bitfinex.com/reference#key-permissions
12
+ def permissions
13
+ res = request("auth/r/permissions").body
14
+ return JSON.parse(res)
15
+ end
16
+
17
+ # https://docs.bitfinex.com/reference#rest-auth-withdraw
18
+ def withdraw(wallet, method, amount, address)
19
+ res = request("auth/w/withdraw", {
20
+ wallet: wallet, #'exchange',
21
+ method: method, #'tetheruse',
22
+ amount: amount, #'10',
23
+ address: address, #'0x2bf788d017C4DF927787DF2EB1310266d9db6893',
24
+ }).body
25
+ return JSON.parse(res)
26
+ end
27
+
3
28
  # Ratelimit: 45 req/min
4
29
  # https://docs.bitfinex.com/reference#rest-auth-movements
5
30
  def movements
6
31
  res = request("auth/r/movements/hist").body
7
32
  return JSON.parse(res)
8
33
  end
9
-
34
+
10
35
  # Ratelimit: 45 req/min
11
36
  # https://docs.bitfinex.com/reference#rest-auth-wallets
12
37
  def wallets
@@ -19,7 +44,7 @@ module Bitfinex
19
44
  def ledgers(currency)
20
45
  res = request("auth/r/ledgers/#{currency}/hist", {
21
46
  limit: 2500,
22
- # category: 28,
47
+ # category: 28,
23
48
  }).body
24
49
  return JSON.parse(res)
25
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rex Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-08 00:00:00.000000000 Z
11
+ date: 2022-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty