btce 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/btce.rb +14 -3
  2. metadata +3 -2
data/lib/btce.rb CHANGED
@@ -178,9 +178,20 @@ module Btce
178
178
  }
179
179
  end
180
180
 
181
- alias :average :avg
182
- alias :volume :vol
183
- alias :volume_current :vol_cur
181
+ alias_method :bid, :buy
182
+ alias_method :offer, :sell
183
+ alias_method :ask, :sell
184
+ alias_method :average, :avg
185
+ alias_method :volume, :vol
186
+ alias_method :volume_current, :vol_cur
187
+
188
+ def spread
189
+ (offer - bid) / offer
190
+ end
191
+
192
+ def spread_percent
193
+ spread * 100.0
194
+ end
184
195
  end
185
196
 
186
197
  class Trade
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: btce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-28 00:00:00.000000000 Z
12
+ date: 2013-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: monkey-patch
@@ -59,3 +59,4 @@ signing_key:
59
59
  specification_version: 3
60
60
  summary: A simple library to interface with the API for btc-e.com in Ruby.
61
61
  test_files: []
62
+ has_rdoc: