fuly 0.0.10 → 0.0.13

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: d7407725e60b24b5b4ff81364ea1c76500b4f88c20b993b4e8a380266627ed0d
4
+ data.tar.gz: b2929541c431e86200ff03a6e3aea8204563f50a324f244b75ca8a4308597d85
5
5
  SHA512:
6
- metadata.gz: 22fc294cb5064f3f2508cccbb4caac5c35326fbb5bd1cad4bfe0f29f45c23fdf38fe2ade73461f3c3001799df13405b8dd3df6f32c8bc20d8edf618e569a9ac3
7
- data.tar.gz: d7be5eb4bce216ae314e1d6f9ba43b108860fbde4d364e7e5e663700cdd66f7613a23a8fe09e96dbd9641ff2aa6b55da92ab9a4ca894b08eaacba0c5e7bf1da8
6
+ metadata.gz: 62eed36de6df070c6162da3fa2d26c6d6319b2f94c20b9ead542b3301f88c689cc7e428bf44dd0547822cab98530319b6b84c71a41ea0f47325e5b2837f7ac37
7
+ data.tar.gz: 6e4f9eeb08058d0c0cdc49da2f5e737cecfa237100b6dae597f718b3a400649226e1cd96a66a2439b232221c2bb644c72f89d4c4e51d3acf3d450a6e825c87e9
@@ -43,16 +43,19 @@ module Bitfinex
43
43
 
44
44
  # 掛單
45
45
  # https://docs.bitfinex.com/reference#submit-funding-offer
46
- def funding_create_offer(currency, amount, rate, period)
46
+ def funding_create_offer(currency, amount, rate, period, is_hidden = false)
47
+ flag = is_hidden ? 64 : 0
47
48
  # auth/w/funding/offer/submit
48
- request("auth/w/funding/offer/submit", {
49
+ res = request("auth/w/funding/offer/submit", {
49
50
  type: "LIMIT",
50
51
  symbol: currency, #fUSD
51
52
  amount: amount, #借款要是負的
52
53
  rate: rate,
53
54
  period: period,
54
- flags: 0,
55
+ flags: flag,
55
56
  }).body
57
+ res = JSON.parse(res)
58
+ return res
56
59
  end
57
60
 
58
61
  # 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.13
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-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty