heisencoin 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tests/arbitrage.rb +6 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d347b61ce04c1fa4dd297c1618999cbefa8087d
|
4
|
+
data.tar.gz: b930a4a9eb4c8f67a45a417384770e0108fc708e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bc127d3bfb2b3b1a7be6a5009d369e6a6abe04b088c9e6c844023ff18b9df2fe8fd9109940c0c9e9aa326cf429de0f38cf00bb1f8c71f2aae5f01cd9162b99a
|
7
|
+
data.tar.gz: 5c0755679008fe176fc1a61285427471b72ce1b8ce632c135939c6e22d79d96b60dcd8c918d3ca9e16e30d5333dd1a2cfc2136050d2856e102ac222139738080
|
data/tests/arbitrage.rb
CHANGED
@@ -98,20 +98,16 @@ class TestMeme < Minitest::Test
|
|
98
98
|
|
99
99
|
it "should make all available trades" do
|
100
100
|
trades = @arby.trade_all(@arby.profitable_asks, @arby.profitable_bids)
|
101
|
-
trades.must_equal [
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
trades.must_equal [ Trade.new(@ex2, @ex1, 0.5),
|
102
|
+
Trade.new(@ex2, @ex1, 0.7),
|
103
|
+
Trade.new(@ex2, @ex1, 0.20000000000000007),
|
104
|
+
Trade.new(@ex2, @ex1, 0.9)]
|
105
105
|
end
|
106
106
|
|
107
107
|
it "should work" do
|
108
108
|
# buy 13.5 x0.9 from ex2, sell to ex1 (up to x1.1)
|
109
|
-
|
110
|
-
|
111
|
-
#step1 = plan.steps.first
|
112
|
-
#step1.from.must_equal @ex2
|
113
|
-
#step1.to.must_equal @ex1
|
114
|
-
#step1.amount.must_equal 0.9
|
109
|
+
plan = @arby.plan
|
110
|
+
plan.steps.size.must_equal 4
|
115
111
|
end
|
116
112
|
end
|
117
113
|
|