bitfinex-rb 0.0.7 → 0.0.9

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
  SHA1:
3
- metadata.gz: 702d9d34912e0ee7b096f04362648df2ee029a59
4
- data.tar.gz: e92c0cf287624859891149a9609683008a3af019
3
+ metadata.gz: f98705af5686620a50f19b70af4517b27929805f
4
+ data.tar.gz: 773bd8c26607e2b97b793e55cec026263db4431a
5
5
  SHA512:
6
- metadata.gz: ddc4503e90815ee6b1cf4b0aa13357bc1fa6ecee170d39084dabc21688d0123f8e22957e625b6f2322dbaa2515054a6a810715013fa44c9927f92c51fec7f696
7
- data.tar.gz: 7363424ea59fac15f523569d1f7f3e6045d05ba4b78316ff19386bbd17c2bf7060c0c081448370484807b8a6b61d6ce16ca03de32e7e2e4009cd726583b07505
6
+ metadata.gz: d27cde05902958afbd58a906706f4d2a1bd6b23daffe391d40a4d711f8bca51bc057665668ad621f92788b2f3b33f1540ae2a4908cf4d5599f843654b3f2a54e
7
+ data.tar.gz: 7dd15690bbffc2793114a7567bdf3d7a104a940ecd9e4b36689f9eebab49fe67936e63b9496b36155c6543bc21bf56eadf46bfd4d8763844e5de7a2aff6037bd
@@ -8,11 +8,13 @@ module Bitfinex
8
8
  payload = build_payload("/v1/#{url}", options[:params])
9
9
  response = rest_connection.post do |req|
10
10
  req.url complete_url
11
+ req.options.timeout = config.rest_timeout
12
+ req.options.open_timeout = config.rest_open_timeout
11
13
  req.headers['Content-Type'] = 'application/json'
12
14
  req.headers['Accept'] = 'application/json'
13
15
  req.headers['X-BFX-PAYLOAD'] = payload
14
16
  req.headers['X-BFX-SIGNATURE'] = sign(payload)
15
- req.headers['X-BFX-APIKEY'] = config.api_key
17
+ req.headers['X-BFX-APIKEY'] = config.api_key
16
18
  end
17
19
  end
18
20
 
@@ -20,14 +20,15 @@ module Bitfinex
20
20
  end
21
21
 
22
22
  class Configuration
23
- attr_accessor :api_endpoint, :debug, :debug_connection, :secret, :api_key, :websocket_api_endpoint
24
- def initialize
25
- self.api_endpoint = "https://api.bitfinex.com/v1/"
26
- self.websocket_api_endpoint = "wss://api2.bitfinex.com:3000/ws"
27
- self.debug = false
28
-
29
- self.debug_connection = false
30
- end
23
+ attr_accessor :api_endpoint, :debug, :debug_connection, :secret, :api_key, :websocket_api_endpoint, :rest_timeout, :rest_open_timeout
24
+ def initialize
25
+ self.api_endpoint = "https://api.bitfinex.com/v1/"
26
+ self.websocket_api_endpoint = "wss://api2.bitfinex.com:3000/ws"
27
+ self.debug = false
28
+ self.rest_timeout = 30
29
+ self.rest_open_timeout = 30
30
+ self.debug_connection = false
31
+ end
31
32
  end
32
33
 
33
34
  end
@@ -10,6 +10,8 @@ module Bitfinex
10
10
  req.headers['Content-Type'] = 'application/json'
11
11
  req.headers['Accept'] = 'application/json'
12
12
  req.params = options[:params] if options.has_key?(:params) && !options[:params].empty?
13
+ req.options.timeout = config.rest_timeout
14
+ req.options.open_timeout = config.rest_open_timeout
13
15
  end
14
16
  end
15
17
 
@@ -1,3 +1,3 @@
1
1
  module Bitfinex
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -24,6 +24,15 @@ module Bitfinex
24
24
  authenticated_post("margin_infos").body
25
25
  end
26
26
 
27
+ # See a symmary of your trade volume, funding profits etc.
28
+ #
29
+ # @return [Hash]
30
+ # @example:
31
+ # client.summary
32
+ def summary
33
+ authenticated_post("summary").body
34
+ end
35
+
27
36
  # Allow you to move available balances between your wallets.
28
37
  #
29
38
  # @param amount [decimal] Amount to transfer
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitfinex-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bitfinex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-25 00:00:00.000000000 Z
11
+ date: 2016-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -124,26 +124,6 @@ dependencies:
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: 0.10.0
127
- - !ruby/object:Gem::Dependency
128
- name: bundler
129
- requirement: !ruby/object:Gem::Requirement
130
- requirements:
131
- - - "~>"
132
- - !ruby/object:Gem::Version
133
- version: 1.9.2
134
- - - ">="
135
- - !ruby/object:Gem::Version
136
- version: 1.8.0
137
- type: :development
138
- prerelease: false
139
- version_requirements: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - "~>"
142
- - !ruby/object:Gem::Version
143
- version: 1.9.2
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- version: 1.8.0
147
127
  description: Simple Bitfinex API ruby wrapper
148
128
  email:
149
129
  - developers@bitfinex.com
@@ -193,9 +173,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
173
  version: '0'
194
174
  requirements: []
195
175
  rubyforge_project:
196
- rubygems_version: 2.4.5
176
+ rubygems_version: 2.4.5.1
197
177
  signing_key:
198
178
  specification_version: 4
199
179
  summary: Bitfinex API Wrapper
200
180
  test_files: []
201
- has_rdoc: