Commit graph

23 commits

Author SHA1 Message Date
Josh Harvey
ae82b5ad26 fixed balance polling bug 2014-04-27 11:27:58 -04:00
Josh Harvey
30084617c3 fixed out of bitcoins; cleanup 2014-04-26 23:13:58 -04:00
Josh Harvey
96f480a73c recalculate fiatBalance as balance at start of session 2014-04-26 17:51:34 -04:00
Maciej Małecki
432e13c7d9 XXX -> TODO 2014-04-26 17:24:36 +02:00
Maciej Małecki
2398bf2aea Fix purchase argument 2014-04-26 17:18:41 +02:00
Maciej Małecki
046a680043 Trader#rate is synchronous 2014-04-26 16:59:01 +02:00
Maciej Małecki
97deac7f20 Add everything back for trading 2014-04-25 16:34:24 +02:00
Josh Harvey
5b4b5359eb poll immediately after config change 2014-04-25 00:25:01 -04:00
Josh Harvey
da88243db0 WIP 2014-04-24 12:37:33 -04:00
Maciej Małecki
7464b93d7b Make tradeQueueBalance private
Move `consolidateTrades` to private section
2014-04-21 00:41:00 +02:00
Maciej Małecki
49f77c50b8 Bring back trading to fiatBalance 2014-04-21 00:37:12 +02:00
Maciej Małecki
d83a46bf7d Default to Trader's currency 2014-04-21 00:37:12 +02:00
Maciej Małecki
a6687964ba Add Trader#_consolidateTrades 2014-04-17 13:02:36 +02:00
Maciej Małecki
b79bdf8789 Start adding trading back to Trader 2014-04-16 17:09:39 +02:00
Maciej Małecki
8cb9783bde JSHint trader 2014-04-16 14:58:44 +02:00
Maciej Małecki
8276d87e2a Add optional callback to pollRate 2014-04-16 10:12:38 +02:00
Maciej Małecki
5b53d59cba Add optional callback to pollBalance 2014-04-16 10:01:31 +02:00
Maciej Małecki
926e10da01 Add stopPolling method 2014-04-16 09:36:04 +02:00
Maciej Małecki
230b31cdbe Fix sendBitcoins 2014-04-15 16:26:09 +02:00
Maciej Małecki
26ae44b2a7 Remove balance calculation for trading
Trading feature is not used in production, remove it for now.
2014-04-15 14:32:43 +02:00
Maciej Małecki
dd80eecdfb Fix fiatBalance 2014-04-14 15:41:06 +02:00
Maciej Małecki
1f3c59dbc0 More refactoring on Trader 2014-04-14 15:16:53 +02:00
Maciej Małecki
d6a0f17e80 Get started with Trade class
The reason for isolating the trader class is testability. It's hard to
properly test code with as much global state as files in `lib/api` had.

With a `Trader` class we can easily instantiate multiple objects, with
different configs, without the need for seeding the database with test
configs, effectively enabling us to do unit tests as well as integration
tests.

Besides that, this will allow easier reconfiguration, thanks to
`Trader#configure` method.
2014-04-14 13:06:48 +02:00