fuly 0.0.10 → 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: b43c1ec760e981a67837a2686b0a2cc1dbfe89dfe9afbbab043b3bce71b011b3
4
- data.tar.gz: 5267452710937aa867cf17b06811a0dc98641c9d1c4ad26c1ed8cf6a14a77169
3
+ metadata.gz: 4ed6618d4430916ccdf37b24a4916957c3912d62d6deafb9ca56e4d8b5747afe
4
+ data.tar.gz: be28ea133ac9b9bdf47c094fccb070fdeee92f208205dfdde498d221394b6215
5
5
  SHA512:
6
- metadata.gz: 22fc294cb5064f3f2508cccbb4caac5c35326fbb5bd1cad4bfe0f29f45c23fdf38fe2ade73461f3c3001799df13405b8dd3df6f32c8bc20d8edf618e569a9ac3
7
- data.tar.gz: d7be5eb4bce216ae314e1d6f9ba43b108860fbde4d364e7e5e663700cdd66f7613a23a8fe09e96dbd9641ff2aa6b55da92ab9a4ca894b08eaacba0c5e7bf1da8
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
@@ -17,21 +17,21 @@ module Bitfinex
17
17
  # https://docs.bitfinex.com/reference#rest-auth-withdraw
18
18
  def withdraw(wallet, method, amount, address)
19
19
  res = request("auth/w/withdraw", {
20
- wallet: wallet,#'exchange',
21
- method: method,#'tetheruse',
22
- amount: amount,#'10',
23
- address: address#'0x2bf788d017C4DF927787DF2EB1310266d9db6893',
20
+ wallet: wallet, #'exchange',
21
+ method: method, #'tetheruse',
22
+ amount: amount, #'10',
23
+ address: address, #'0x2bf788d017C4DF927787DF2EB1310266d9db6893',
24
24
  }).body
25
25
  return JSON.parse(res)
26
26
  end
27
-
27
+
28
28
  # Ratelimit: 45 req/min
29
29
  # https://docs.bitfinex.com/reference#rest-auth-movements
30
30
  def movements
31
31
  res = request("auth/r/movements/hist").body
32
32
  return JSON.parse(res)
33
33
  end
34
-
34
+
35
35
  # Ratelimit: 45 req/min
36
36
  # https://docs.bitfinex.com/reference#rest-auth-wallets
37
37
  def wallets
@@ -44,7 +44,7 @@ module Bitfinex
44
44
  def ledgers(currency)
45
45
  res = request("auth/r/ledgers/#{currency}/hist", {
46
46
  limit: 2500,
47
- # category: 28,
47
+ # category: 28,
48
48
  }).body
49
49
  return JSON.parse(res)
50
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.10
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-03-11 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