bitex_bot 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -88,7 +88,7 @@ module BitexBot
88
88
  add_index :close_sells, :order_id
89
89
  end
90
90
 
91
- unless ActiveRecord::Base.connection.column_exists?('stores', 'buying_profit')
91
+ unless ActiveRecord::Base.connection.column_exists?('stores', 'buying_amount_to_spend_per_order')
92
92
  create_table "stores", force: true do |t|
93
93
  t.decimal "taker_usd", precision: 20, scale: 8
94
94
  t.decimal "taker_btc", precision: 20, scale: 8
@@ -101,6 +101,8 @@ module BitexBot
101
101
  t.datetime "last_warning"
102
102
  t.decimal "buying_profit", precision: 20, scale: 8
103
103
  t.decimal "selling_profit", precision: 20, scale: 8
104
+ t.decimal "buying_amount_to_spend_per_order", precision: 20, scale: 8
105
+ t.decimal "selling_quantity_to_sell_per_order", precision: 20, scale: 8
104
106
  t.timestamps
105
107
  end
106
108
  end
@@ -60,7 +60,7 @@ module BitexBot
60
60
  end
61
61
 
62
62
  def self.value_to_use
63
- Settings.buying.amount_to_spend_per_order
63
+ store.buying_amount_to_spend_per_order || Settings.buying.amount_to_spend_per_order
64
64
  end
65
65
 
66
66
  def self.profit
@@ -60,7 +60,7 @@ module BitexBot
60
60
  end
61
61
 
62
62
  def self.value_to_use
63
- Settings.selling.quantity_to_sell_per_order
63
+ store.selling_quantity_to_sell_per_order || Settings.selling.quantity_to_sell_per_order
64
64
  end
65
65
 
66
66
  def self.get_safest_price(transactions, order_book, bitcoins_to_use)
@@ -1,3 +1,3 @@
1
1
  module BitexBot
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitex_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-01-12 00:00:00.000000000 Z
13
+ date: 2015-01-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: settingslogic