From cbcabdbaa7435e94b74bdcdbfdcf334be51c392b Mon Sep 17 00:00:00 2001 From: Tim Molter Date: Fri, 10 May 2013 22:54:09 +0200 Subject: [PATCH 001/117] added .travis.yml and settings.xml --- .gitignore | 9 - LICENSE.txt | 21 - README.md | 158 - pom.xml | 311 - settings.xml | 21 + xchange-bitcoin24/api-specification.txt | 25 - xchange-bitcoin24/pom.xml | 35 - .../xeiam/xchange/bitcoin24/Bitcoin24.java | 51 - .../xchange/bitcoin24/Bitcoin24Adapters.java | 161 - .../xchange/bitcoin24/Bitcoin24Exchange.java | 75 - .../xchange/bitcoin24/Bitcoin24Utils.java | 60 - .../dto/marketdata/Bitcoin24Depth.java | 65 - .../dto/marketdata/Bitcoin24Ticker.java | 106 - .../dto/marketdata/Bitcoin24Trade.java | 82 - .../Bitcoin24PollingMarketDataService.java | 125 - .../marketdata/FullDepthDemo.java | 55 - .../examplearchive/marketdata/TickerDemo.java | 58 - .../examplearchive/marketdata/TradesDemo.java | 52 - .../service/Bitcoin24AdapterTest.java | 119 - .../bitcoin24/service/Bitcoin24UtilsTest.java | 44 - .../marketdata/Bitcoin24DepthJSONTest.java | 55 - .../marketdata/Bitcoin24TickerJSONTest.java | 58 - .../marketdata/Bitcoin24TradesJSONTest.java | 54 - .../marketdata/example-depth-data.json | 102 - .../marketdata/example-ticker-data.json | 9 - .../marketdata/example-trades-data.json | 12044 ---- xchange-bitcoincentral/api-specification.txt | 10 - xchange-bitcoincentral/api_v1_reference.md | 1194 - xchange-bitcoincentral/pom.xml | 35 - .../bitcoincentral/BitcoinCentral.java | 93 - .../BitcoinCentralAdapters.java | 176 - .../BitcoinCentralExchange.java | 57 - .../bitcoincentral/BitcoinCentralUtils.java | 80 - .../account/BitcoinCentralAccountInfo.java | 82 - .../bitcoincentral/dto/marketdata/BidAsk.java | 80 - .../dto/marketdata/BitcoinCentralDepth.java | 64 - .../dto/marketdata/BitcoinCentralTicker.java | 117 - .../dto/marketdata/BitcoinCentralTrade.java | 98 - .../dto/trade/BitcoinCentralMyOrder.java | 55 - .../dto/trade/BitcoinCentralTrade.java | 58 - .../dto/trade/BitcoinCentralTradeBase.java | 84 - .../dto/trade/BitcoinCentralTradeData.java | 70 - .../dto/trade/BitcoinCentralTradeRequest.java | 59 - .../dto/trade/TradeOrderRequestWrapper.java | 51 - .../BitcoinCentralPollingAccountService.java | 87 - ...itcoinCentralPollingMarketDataService.java | 109 - .../BitcoinCentralPollingTradeService.java | 103 - .../examplearchive/FullDepthDemoTest.java | 42 - .../examplearchive/TickerDemoTest.java | 42 - .../examplearchive/TradesDemoTest.java | 42 - .../account/BitcoinCentralAccountDemo.java | 66 - .../marketdata/FullDepthDemo.java | 55 - .../examplearchive/marketdata/TickerDemo.java | 58 - .../examplearchive/marketdata/TradesDemo.java | 52 - .../trade/BitcoinCentralTradeDemo.java | 79 - .../service/account/AccountInfoJSONTest.java | 58 - .../service/marketdata/FullDepthJSONTest.java | 53 - .../service/marketdata/TickerJSONTest.java | 60 - .../service/marketdata/TradesJSONTest.java | 59 - .../service/trade/TradeOrderRequestTest.java | 56 - .../account/example-accountinfo-data.json | 8 - .../src/test/resources/errors.json | 0 .../marketdata/example-full-depth-data.json | 804 - .../marketdata/example-ticker-data.json | 12 - .../marketdata/example-trades-data.json | 42 - .../resources/trade/example-cancel-order.json | 1 - .../resources/trade/example-openorders.json | 11 - .../trade/example-order-request.json | 9 - .../trade/example-place-limit-order.json | 9 - xchange-bitcoincharts/api-specification.txt | 20 - xchange-bitcoincharts/pom.xml | 35 - .../xchange/bitcoincharts/BitcoinCharts.java | 40 - .../bitcoincharts/BitcoinChartsAdapters.java | 76 - .../bitcoincharts/BitcoinChartsExchange.java | 75 - .../bitcoincharts/BitcoinChartsFactory.java | 48 - .../bitcoincharts/BitcoinChartsUtils.java | 275 - .../dto/marketdata/BitcoinChartsTicker.java | 140 - ...BitcoinChartsPollingMarketDataService.java | 130 - .../test/resources/market-data-sample.json | 1367 - .../resources/weighted-prices-sample.json | 83 - xchange-bitfloor/api-specification.txt | 21 - xchange-bitfloor/pom.xml | 58 - .../com/xeiam/xchange/bitfloor/Bitfloor.java | 120 - .../xchange/bitfloor/BitfloorAdapters.java | 134 - .../xchange/bitfloor/BitfloorExchange.java | 58 - .../xeiam/xchange/bitfloor/BitfloorUtils.java | 52 - .../xeiam/xchange/bitfloor/dto/Product.java | 57 - .../bitfloor/dto/account/BitfloorBalance.java | 66 - .../bitfloor/dto/account/WithdrawResult.java | 53 - .../dto/marketdata/BitfloorDayInfo.java | 65 - .../dto/marketdata/BitfloorOrderBook.java | 71 - .../dto/marketdata/BitfloorTicker.java | 74 - .../dto/marketdata/BitfloorTransaction.java | 99 - .../bitfloor/dto/trade/BitfloorOrder.java | 120 - .../bitfloor/dto/trade/NewOrderResult.java | 60 - .../bitfloor/dto/trade/OrderCancelResult.java | 60 - .../BitfloorPollingAccountService.java | 75 - .../polling/BitfloorPollingService.java | 53 - .../BitfloorPollingMarketDataService.java | 121 - .../polling/BitfloorPollingTradeService.java | 89 - .../xchange/bitfloor/BitfloorAdapterTest.java | 138 - .../examplecodearchive/BitfloorDemoUtils.java | 45 - .../account/BitfloorAccountDemo.java | 58 - .../account/BitfloorAccountDemoTest.java | 48 - .../marketdata/BitfloorTickerDemo.java | 55 - .../marketdata/FullDepthDemo.java | 55 - .../marketdata/FullDepthDemoTest.java | 42 - .../marketdata/TickerDemoTest.java | 42 - .../marketdata/TradesDemo.java | 52 - .../marketdata/TradesDemoTest.java | 42 - .../trade/BitfloorTradeDemo.java | 72 - .../trade/BitfloorTradeDemoTest.java | 38 - .../service/account/AccountInfoJSONTest.java | 60 - .../service/marketdata/FullDepthJSONTest.java | 60 - .../service/marketdata/TickerJSONTest.java | 60 - .../service/marketdata/TradesJSONTest.java | 61 - .../service/trade/CancelOrderJSONTest.java | 55 - .../service/trade/OpenOrdersJSONTest.java | 64 - .../trade/PlaceLimitOrderJSONTest.java | 55 - .../account/example-accountinfo-data.json | 12 - .../account/example-withdrawal-result.json | 3 - .../src/test/resources/errors.json | 4 - .../marketdata/example-day-info-data.json | 5 - .../marketdata/example-full-depth-data.json | 407 - .../marketdata/example-ticker-data.json | 6 - .../marketdata/example-trades-data.json | 902 - .../resources/trade/example-cancel-order.json | 4 - .../resources/trade/example-openorders.json | 18 - .../trade/example-place-limit-order.json | 4 - xchange-bitstamp/api-specification.txt | 21 - xchange-bitstamp/pom.xml | 35 - .../com/xeiam/xchange/bitstamp/BitStamp.java | 118 - .../xchange/bitstamp/BitstampAdapters.java | 154 - .../xchange/bitstamp/BitstampExchange.java | 58 - .../xeiam/xchange/bitstamp/BitstampUtils.java | 80 - .../bitstamp/dto/account/BitstampBalance.java | 114 - .../dto/marketdata/BitstampOrderBook.java | 67 - .../dto/marketdata/BitstampTicker.java | 98 - .../dto/marketdata/BitstampTransaction.java | 97 - .../bitstamp/dto/trade/BitstampOrder.java | 99 - .../dto/trade/BitstampUserTransaction.java | 119 - .../BitstampPollingAccountService.java | 82 - .../BitstampPollingMarketDataService.java | 119 - .../polling/BitstampPollingTradeService.java | 99 - .../BitstampTransactionTypeDeserializer.java | 16 - .../xchange/bitstamp/BitstampAdapterTest.java | 130 - .../service/account/AccountInfoJSONTest.java | 61 - .../service/marketdata/FullDepthJSONTest.java | 58 - .../service/marketdata/TickerJSONTest.java | 60 - .../service/marketdata/TradesJSONTest.java | 59 - .../service/trade/CancelOrderJSONTest.java | 52 - .../service/trade/OpenOrdersJSONTest.java | 61 - .../trade/PlaceLimitOrderJSONTest.java | 57 - .../account/example-accountinfo-data.json | 9 - .../account/example-deposit-response.json | 1 - .../src/test/resources/errors.json | 4 - .../marketdata/example-full-depth-data.json | 670 - .../marketdata/example-ticker-data.json | 8 - .../marketdata/example-trades-data.json | 752 - .../resources/trade/example-cancel-order.json | 1 - .../resources/trade/example-openorders.json | 30 - .../trade/example-place-limit-order.json | 7 - xchange-btce/api-specification.txt | 22 - xchange-btce/pom.xml | 35 - .../java/com/xeiam/xchange/btce/BTCE.java | 51 - .../com/xeiam/xchange/btce/BTCEAdapters.java | 196 - .../xeiam/xchange/btce/BTCEAuthenticated.java | 101 - .../com/xeiam/xchange/btce/BTCEExchange.java | 80 - .../com/xeiam/xchange/btce/BTCEUtils.java | 80 - .../btce/dto/account/BTCEAccountInfo.java | 124 - .../dto/account/BTCEAccountInfoReturn.java | 44 - .../btce/dto/marketdata/BTCEDepth.java | 65 - .../btce/dto/marketdata/BTCEReturn.java | 72 - .../btce/dto/marketdata/BTCETicker.java | 54 - .../btce/dto/marketdata/BTCETickerObject.java | 123 - .../btce/dto/marketdata/BTCETrade.java | 107 - .../btce/dto/trade/BTCECancelOrderResult.java | 67 - .../btce/dto/trade/BTCECancelOrderReturn.java | 44 - .../btce/dto/trade/BTCEOpenOrdersReturn.java | 46 - .../xchange/btce/dto/trade/BTCEOrder.java | 103 - .../btce/dto/trade/BTCEPlaceOrderResult.java | 83 - .../btce/dto/trade/BTCEPlaceOrderReturn.java | 44 - .../btce/service/BTCEBasePollingService.java | 77 - .../btce/service/BTCEHmacPostBodyDigest.java | 87 - .../polling/BTCEPollingAccountService.java | 69 - .../polling/BTCEPollingMarketDataService.java | 125 - .../polling/BTCEPollingTradeService.java | 94 - .../xchange/btce/service/BTCEAdapterTest.java | 114 - .../xchange/btce/service/BTCEUtilsTest.java | 44 - .../account/BTCEAccountInfoJSONTest.java | 56 - .../service/marketdata/BTCEDepthJSONTest.java | 55 - .../marketdata/BTCETickerJSONTest.java | 58 - .../marketdata/BTCETradesJSONTest.java | 55 - .../service/trade/BTCETradeDataJSONTest.java | 95 - .../account/example-account-info-data.json | 21 - .../marketdata/example-depth-data.json | 1206 - .../marketdata/example-ticker-data.json | 13 - .../marketdata/example-trades-data.json | 1352 - .../trade/example-cancel-order-data.json | 15 - .../trade/example-open-orders-data.json | 13 - .../trade/example-place-order-data.json | 16 - xchange-campbx/api-specification.txt | 20 - xchange-campbx/pom.xml | 35 - .../com/xeiam/xchange/campbx/CambBXUtils.java | 40 - .../java/com/xeiam/xchange/campbx/CampBX.java | 193 - .../xeiam/xchange/campbx/CampBXAdapters.java | 101 - .../xeiam/xchange/campbx/CampBXExchange.java | 65 - .../com/xeiam/xchange/campbx/CampBXUtils.java | 58 - .../xeiam/xchange/campbx/dto/CampBXOrder.java | 189 - .../xchange/campbx/dto/CampBXResponse.java | 65 - .../xchange/campbx/dto/account/MyFunds.java | 128 - .../dto/marketdata/CampBXOrderBook.java | 67 - .../campbx/dto/marketdata/CampBXTicker.java | 73 - .../campbx/dto/trade/MyOpenOrders.java | 73 - .../polling/CampBXPollingAccountService.java | 90 - .../CampBXPollingMarketDataService.java | 109 - .../polling/CampBXPollingTradeService.java | 157 - .../xchange/campbx/CampBXAdapterTest.java | 86 - .../xchange/campbx/dto/FullDepthJSONTest.java | 57 - .../xchange/campbx/dto/MyFundsJSONTest.java | 51 - .../xchange/campbx/dto/MyOrdersJSONTest.java | 67 - .../xchange/campbx/dto/TickerJSONTest.java | 57 - .../CampBXPollingTradeServiceTest.java | 55 - .../test/resources/account/getbtcaddr.json | 1 - .../src/test/resources/account/myfunds.json | 8 - xchange-campbx/src/test/resources/error.json | 1 - .../marketdata/example-full-depth-data.json | 218 - .../marketdata/example-ticker-data.json | 5 - .../src/test/resources/trade/enter-order.json | 1 - .../src/test/resources/trade/open-orders.json | 21 - xchange-cavirtex/api-specification.txt | 17 - xchange-cavirtex/pom.xml | 35 - .../java/com/xeiam/xchange/virtex/VirtEx.java | 54 - .../xeiam/xchange/virtex/VirtExAdapters.java | 147 - .../xeiam/xchange/virtex/VirtExExchange.java | 75 - .../com/xeiam/xchange/virtex/VirtExUtils.java | 58 - .../virtex/dto/marketdata/VirtExDepth.java | 65 - .../virtex/dto/marketdata/VirtExTicker.java | 81 - .../virtex/dto/marketdata/VirtExTrade.java | 82 - .../VirtExPollingMarketDataService.java | 133 - .../virtex/service/VirtExAdapterTest.java | 114 - .../virtex/service/VirtExUtilsTest.java | 44 - .../marketdata/VirtExDepthJSONTest.java | 55 - .../marketdata/VirtExTickerJSONTest.java | 58 - .../marketdata/VirtExTradesJSONTest.java | 55 - .../marketdata/example-depth-data.json | 734 - .../marketdata/example-ticker-data.json | 6 - .../marketdata/example-trades-data.json | 3350 - xchange-core/pom.xml | 49 - .../java/com/xeiam/xchange/BaseExchange.java | 148 - .../com/xeiam/xchange/CachedDataSession.java | 41 - .../main/java/com/xeiam/xchange/Exchange.java | 162 - .../com/xeiam/xchange/ExchangeException.java | 54 - .../com/xeiam/xchange/ExchangeFactory.java | 124 - .../xeiam/xchange/ExchangeSpecification.java | 294 - .../NotAvailableFromExchangeException.java | 52 - ...NotYetImplementedForExchangeException.java | 52 - .../java/com/xeiam/xchange/OnlineTest.java | 34 - .../xeiam/xchange/currency/Currencies.java | 204 - .../xeiam/xchange/currency/CurrencyPair.java | 150 - .../xeiam/xchange/currency/MoneyUtils.java | 114 - .../java/com/xeiam/xchange/dto/Order.java | 143 - .../xchange/dto/account/AccountInfo.java | 94 - .../xchange/dto/marketdata/OrderBook.java | 94 - .../dto/marketdata/OrderBookUpdate.java | 75 - .../xeiam/xchange/dto/marketdata/Ticker.java | 217 - .../xeiam/xchange/dto/marketdata/Trade.java | 133 - .../xeiam/xchange/dto/marketdata/Trades.java | 68 - .../xeiam/xchange/dto/trade/LimitOrder.java | 124 - .../xeiam/xchange/dto/trade/MarketOrder.java | 75 - .../xeiam/xchange/dto/trade/OpenOrders.java | 65 - .../com/xeiam/xchange/dto/trade/Wallet.java | 121 - .../polling/PollingAccountService.java | 61 - .../polling/PollingMarketDataService.java | 98 - .../streaming/BaseExchangeService.java | 55 - .../streaming/BasePollingExchangeService.java | 46 - .../BaseWebSocketExchangeService.java | 112 - .../streaming/DefaultExchangeEvent.java | 77 - .../service/streaming/ExchangeEvent.java | 49 - .../streaming/ExchangeEventListener.java | 56 - .../streaming/ExchangeEventProducer.java | 33 - .../service/streaming/ExchangeEventType.java | 81 - .../ExchangeStreamingConfiguration.java | 42 - .../streaming/JsonWrappedExchangeEvent.java | 40 - .../service/streaming/ReconnectService.java | 82 - .../streaming/StreamingExchangeService.java | 62 - .../streaming/WebSocketEventProducer.java | 102 - .../trade/polling/PollingTradeService.java | 75 - .../java/com/xeiam/xchange/utils/Assert.java | 94 - .../java/com/xeiam/xchange/utils/Base64.java | 1841 - .../com/xeiam/xchange/utils/DateUtils.java | 78 - .../utils/jackson/BooleanDeserializer.java | 58 - .../utils/jackson/EnumIntDeserializer.java | 34 - .../jackson/EnumIntDeserializerOneBased.java | 19 - .../FloatingTimestampDeserializer.java | 43 - .../utils/jackson/SqlTimeDeserializer.java | 53 - .../jackson/YesNoBooleanDeserializerImpl.java | 35 - .../org/joda/money/MoneyDataExtension.csv | 7 - .../com/xeiam/xchange/CurrencyPairTest.java | 80 - .../com/xeiam/xchange/utils/AssertTest.java | 92 - .../com/xeiam/xchange/utils/Base64Test.java | 86 - .../xeiam/xchange/utils/BigDecimalTest.java | 51 - .../xeiam/xchange/utils/DummyAccountInfo.java | 63 - .../com/xeiam/xchange/utils/DummyTicker.java | 52 - .../xeiam/xchange/utils/MoneyUtilsTest.java | 350 - .../xchange/websocket/ExampleClient.java | 63 - xchange-core/src/test/resources/logback.xml | 58 - .../resources/marketdata/example-ticker.json | 4 - .../test/resources/text/example-httpdata.txt | 1 - .../trade/example-accountinfo-data.json | 6 - .../utils/example-ticker-streaming-data.json | 85 - xchange-examples/pom.xml | 89 - .../BitcoinChartsRawDataDemo.java | 44 - .../BitcoinChartsTickerDemo.java | 60 - .../examples/bitstamp/BitstampDemoUtils.java | 43 - .../bitstamp/account/BitstampAccountDemo.java | 60 - .../bitstamp/marketdata/FullDepthDemo.java | 55 - .../bitstamp/marketdata/TickerDemo.java | 56 - .../bitstamp/marketdata/TradesDemo.java | 52 - .../bitstamp/trade/BitstampTradeDemo.java | 72 - .../examples/btce/BTCEExamplesUtils.java | 43 - .../btce/account/BTCEAccountInfoDemo.java | 46 - .../examples/btce/marketdata/DepthDemo.java | 51 - .../examples/btce/marketdata/TickerDemo.java | 58 - .../examples/btce/marketdata/TradesDemo.java | 50 - .../examples/btce/trade/BTCETradeDemo.java | 66 - .../campbx/account/CampBXAccountDataDemo.java | 58 - .../campbx/marketdata/MarketDataDemo.java | 61 - .../campbx/trade/CampBXTradeDemo.java | 83 - .../cavirtex/marketdata/DepthDemo.java | 51 - .../cavirtex/marketdata/TickerDemo.java | 57 - .../cavirtex/marketdata/TradesDemo.java | 51 - .../charts/MtGoxOrderBookChartDemo.java | 99 - .../v0/marketdata/polling/FullDepthDemo.java | 53 - .../v0/marketdata/polling/TickerDemo.java | 58 - .../v0/marketdata/polling/TradesDemo.java | 54 - .../v1/service/account/AccountInfoDemo.java | 52 - .../account/BitcoinDepositAddressDemo.java | 51 - .../service/account/WithdrawalFundsDemo.java | 58 - .../service/marketdata/polling/DepthDemo.java | 53 - .../marketdata/polling/FullDepthDemo.java | 50 - .../polling/MtGoxMarketdataDemo.java | 75 - .../marketdata/polling/TickerDemo.java | 58 - .../marketdata/polling/TradesDemo.java | 55 - .../MtGoxWebSocketMarketDataDemo.java | 130 - .../trade/polling/CancelOrderDemo.java | 59 - .../service/trade/polling/LimitOrderDemo.java | 74 - .../trade/polling/MarketOrderDemo.java | 63 - .../service/trade/polling/MtGoxTradeDemo.java | 95 - .../trade/polling/MtGoxWithdrawDemo.java | 58 - .../service/trade/polling/OpenOrdersDemo.java | 54 - .../marketdata/TickerDemo.java | 67 - .../src/main/resources/logback.xml | 46 - .../BitcoinChartsRawDataDemoTest.java | 43 - .../BitcoinChartsTickerDemoTest.java | 43 - .../account/BitstampAccountDemoTest.java | 48 - .../marketdata/FullDepthDemoTest.java | 42 - .../bitstamp/marketdata/TickerDemoTest.java | 42 - .../bitstamp/marketdata/TradesDemoTest.java | 42 - .../bitstamp/trade/BitstampTradeDemoTest.java | 38 - .../btce/account/BTCEAccountInfoDemoTest.java | 42 - .../btce/marketdata/DepthDemoTest.java | 43 - .../btce/marketdata/TickerDemoTest.java | 43 - .../btce/marketdata/TradesDemoTest.java | 43 - .../btce/trade/BTCETradeDemoTest.java | 41 - .../campbx/account/CampBXAccountDemoTest.java | 48 - .../campbx/marketdata/MarketDataDemoTest.java | 43 - .../campbx/trade/CampBXTradeDemoTest.java | 38 - .../cavirtex/marketdata/DepthDemoTest.java | 43 - .../cavirtex/marketdata/TickerDemoTest.java | 43 - .../cavirtex/marketdata/TradesDemoTest.java | 43 - .../charts/MtGoxOrderBookChartDemoTest.java | 44 - .../service/account/AccountInfoDemoTest.java | 42 - .../BitcoinDepositAddressDemoTest.java | 42 - .../account/WithdrawalFundsDemoTest.java | 43 - .../marketdata/polling/DepthDemoTest.java | 42 - .../marketdata/polling/FullDepthDemoTest.java | 42 - .../polling/MtGoxMarketdataDemoTest.java | 39 - .../marketdata/polling/TickerDemoTest.java | 42 - .../marketdata/polling/TradesDemoTest.java | 42 - .../streaming/StreamingTickerDemoTest.java | 42 - .../trade/polling/CancelOrderDemoTest.java | 38 - .../trade/polling/LimitOrderDemoTest.java | 38 - .../trade/polling/MarketOrderDemoTest.java | 43 - .../trade/polling/MtGoxTradeDemoTest.java | 48 - .../trade/polling/MtGoxWithdrawDemoTest.java | 48 - .../trade/polling/OpenOrdersDemoTest.java | 43 - .../marketdata/TickerDemoTest.java | 43 - xchange-mtgox/api-specification.txt | 13 - xchange-mtgox/pom.xml | 35 - .../com/xeiam/xchange/mtgox/MtGoxUtils.java | 147 - .../xeiam/xchange/mtgox/v0/MtGoxAdapters.java | 160 - .../xeiam/xchange/mtgox/v0/MtGoxExchange.java | 60 - .../com/xeiam/xchange/mtgox/v0/MtGoxV0.java | 60 - .../mtgox/v0/dto/marketdata/MtGoxDepth.java | 66 - .../mtgox/v0/dto/marketdata/MtGoxTicker.java | 51 - .../mtgox/v0/dto/marketdata/MtGoxTrades.java | 124 - .../mtgox/v0/dto/marketdata/Ticker.java | 127 - .../mtgox/v0/dto/trade/MtGoxCancelOrder.java | 56 - .../mtgox/v0/dto/trade/MtGoxOrders.java | 155 - .../MtGoxPollingMarketDataService.java | 133 - .../xeiam/xchange/mtgox/v1/MtGoxAdapters.java | 231 - .../xeiam/xchange/mtgox/v1/MtGoxExchange.java | 79 - .../com/xeiam/xchange/mtgox/v1/MtGoxV1.java | 114 - .../xchange/mtgox/v1/dto/MtGoxValue.java | 64 - .../v1/dto/account/MtGoxAccountInfo.java | 134 - .../account/MtGoxBitcoinDepositAddress.java | 54 - .../dto/account/MtGoxWithdrawalResponse.java | 57 - .../mtgox/v1/dto/marketdata/MtGoxDepth.java | 117 - .../v1/dto/marketdata/MtGoxDepthUpdate.java | 109 - .../mtgox/v1/dto/marketdata/MtGoxOrder.java | 89 - .../mtgox/v1/dto/marketdata/MtGoxTicker.java | 120 - .../mtgox/v1/dto/marketdata/MtGoxTrade.java | 126 - .../v1/dto/trade/MtGoxGenericResponse.java | 72 - .../mtgox/v1/dto/trade/MtGoxOpenOrder.java | 130 - .../mtgox/v1/dto/trade/MtGoxWallet.java | 89 - .../xchange/mtgox/v1/dto/trade/Wallets.java | 186 - .../account/MtGoxPollingAccountService.java | 101 - .../MtGoxPollingMarketDataService.java | 144 - .../streaming/MtGoxExchangeEventListener.java | 159 - .../MtGoxStreamingConfiguration.java | 58 - .../MtGoxWebsocketMarketDataService.java | 98 - .../polling/MtGoxPollingTradeService.java | 125 - .../mtgox/v0/service/MtGoxAdapterTest.java | 118 - .../service/marketdata/FullDepthJSONTest.java | 55 - .../v0/service/marketdata/TickerJSONTest.java | 59 - .../v0/service/marketdata/TradesJSONTest.java | 56 - .../service/trade/CancelOrdersJSONTest.java | 58 - .../mtgox/v1/service/MtGoxAdapterTest.java | 228 - .../service/MtGoxHmacPostBodyDigestTest.java | 59 - .../mtgox/v1/service/MtGoxUtilsTest.java | 63 - .../service/account/AccountInfoJSONTest.java | 57 - .../account/DepositResponseJSONTest.java | 56 - .../account/WithdrawalResponseJSONTest.java | 56 - .../marketdata/polling/DepthJSONTest.java | 56 - .../marketdata/polling/FullDepthJSONTest.java | 53 - .../marketdata/polling/TickerJSONTest.java | 62 - .../marketdata/polling/TradesJSONTest.java | 56 - .../streaming/DepthUpdateJSONTest.java | 61 - .../marketdata/streaming/TickerJSONTest.java | 66 - .../marketdata/streaming/TradeJSONTest.java | 61 - .../service/trade/FailureMessageJSONTest.java | 54 - .../v1/service/trade/OpenOrdersJSONTest.java | 56 - .../service/trade/SuccessMessageJSONTest.java | 54 - xchange-mtgox/src/test/resources/logback.xml | 54 - .../v0/marketdata/example-depth-data-v0.json | 1551 - .../v0/marketdata/example-ticker-data-v0.json | 11 - .../v0/marketdata/example-trades-data-v0.json | 6091 -- .../trade/example-cancel-order-response.json | 35 - .../v1/account/example-accountinfo-data.json | 74 - .../v1/account/example-deposit-response.json | 3 - .../account/example-withdrawal-response.json | 1 - .../polling/example-depth-data.json | 6544 -- .../polling/example-fulldepth-data.json | 56643 ---------------- .../polling/example-ticker-data.json | 80 - .../polling/example-trades-data.json | 392 - .../example-depth-streaming-data.json | 18 - .../example-ticker-streaming-data.json | 86 - .../example-trade-streaming-data.json | 20 - .../trade/example-failure-response-data.json | 4 - .../v1/trade/example-openorders-data.json | 876 - .../trade/example-success-response-data.json | 4 - .../api-specification.txt | 16 - xchange-openexchangerates/pom.xml | 34 - .../main/java/com/xeiam/xchange/oer/OER.java | 42 - .../com/xeiam/xchange/oer/OERAdapters.java | 48 - .../com/xeiam/xchange/oer/OERExchange.java | 75 - .../java/com/xeiam/xchange/oer/OERUtils.java | 381 - .../oer/dto/marketdata/OERTickers.java | 68 - .../xchange/oer/dto/marketdata/Rates.java | 1965 - .../polling/OERPollingMarketDataService.java | 158 - .../oer/dto/marketdata/TestOERTickers.java | 52 - .../test/resources/example-currencies.json | 163 - .../test/resources/example-latest-rates.json | 168 - 474 files changed, 21 insertions(+), 132144 deletions(-) delete mode 100644 .gitignore delete mode 100644 LICENSE.txt delete mode 100644 README.md delete mode 100644 pom.xml create mode 100644 settings.xml delete mode 100644 xchange-bitcoin24/api-specification.txt delete mode 100644 xchange-bitcoin24/pom.xml delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24.java delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Adapters.java delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Exchange.java delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Utils.java delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Depth.java delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Ticker.java delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Trade.java delete mode 100644 xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/service/marketdata/polling/Bitcoin24PollingMarketDataService.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/FullDepthDemo.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TickerDemo.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TradesDemo.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24AdapterTest.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24UtilsTest.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24DepthJSONTest.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TickerJSONTest.java delete mode 100644 xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TradesJSONTest.java delete mode 100644 xchange-bitcoin24/src/test/resources/marketdata/example-depth-data.json delete mode 100644 xchange-bitcoin24/src/test/resources/marketdata/example-ticker-data.json delete mode 100644 xchange-bitcoin24/src/test/resources/marketdata/example-trades-data.json delete mode 100644 xchange-bitcoincentral/api-specification.txt delete mode 100644 xchange-bitcoincentral/api_v1_reference.md delete mode 100644 xchange-bitcoincentral/pom.xml delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentral.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralAdapters.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralExchange.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralUtils.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/account/BitcoinCentralAccountInfo.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BidAsk.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralDepth.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTicker.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTrade.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralMyOrder.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTrade.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeBase.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeData.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeRequest.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/TradeOrderRequestWrapper.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/account/polling/BitcoinCentralPollingAccountService.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/marketdata/polling/BitcoinCentralPollingMarketDataService.java delete mode 100644 xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/trade/polling/BitcoinCentralPollingTradeService.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/FullDepthDemoTest.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TickerDemoTest.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TradesDemoTest.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/account/BitcoinCentralAccountDemo.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/FullDepthDemo.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TickerDemo.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TradesDemo.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/trade/BitcoinCentralTradeDemo.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/account/AccountInfoJSONTest.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/FullDepthJSONTest.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TickerJSONTest.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TradesJSONTest.java delete mode 100644 xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/trade/TradeOrderRequestTest.java delete mode 100644 xchange-bitcoincentral/src/test/resources/account/example-accountinfo-data.json delete mode 100644 xchange-bitcoincentral/src/test/resources/errors.json delete mode 100644 xchange-bitcoincentral/src/test/resources/marketdata/example-full-depth-data.json delete mode 100644 xchange-bitcoincentral/src/test/resources/marketdata/example-ticker-data.json delete mode 100644 xchange-bitcoincentral/src/test/resources/marketdata/example-trades-data.json delete mode 100644 xchange-bitcoincentral/src/test/resources/trade/example-cancel-order.json delete mode 100644 xchange-bitcoincentral/src/test/resources/trade/example-openorders.json delete mode 100644 xchange-bitcoincentral/src/test/resources/trade/example-order-request.json delete mode 100644 xchange-bitcoincentral/src/test/resources/trade/example-place-limit-order.json delete mode 100644 xchange-bitcoincharts/api-specification.txt delete mode 100644 xchange-bitcoincharts/pom.xml delete mode 100644 xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinCharts.java delete mode 100644 xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsAdapters.java delete mode 100644 xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsExchange.java delete mode 100644 xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsFactory.java delete mode 100644 xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsUtils.java delete mode 100644 xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/dto/marketdata/BitcoinChartsTicker.java delete mode 100644 xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/service/marketdata/polling/BitcoinChartsPollingMarketDataService.java delete mode 100644 xchange-bitcoincharts/src/test/resources/market-data-sample.json delete mode 100644 xchange-bitcoincharts/src/test/resources/weighted-prices-sample.json delete mode 100644 xchange-bitfloor/api-specification.txt delete mode 100644 xchange-bitfloor/pom.xml delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/Bitfloor.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorAdapters.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorExchange.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorUtils.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/Product.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/BitfloorBalance.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/WithdrawResult.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorDayInfo.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorOrderBook.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTicker.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTransaction.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/BitfloorOrder.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/NewOrderResult.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/OrderCancelResult.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingAccountService.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingService.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/marketdata/polling/BitfloorPollingMarketDataService.java delete mode 100644 xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/trade/polling/BitfloorPollingTradeService.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/BitfloorAdapterTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/BitfloorDemoUtils.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemo.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemoTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/BitfloorTickerDemo.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemo.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemoTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TickerDemoTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemo.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemoTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemo.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemoTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/account/AccountInfoJSONTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/FullDepthJSONTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TickerJSONTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TradesJSONTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/CancelOrderJSONTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/OpenOrdersJSONTest.java delete mode 100644 xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/PlaceLimitOrderJSONTest.java delete mode 100644 xchange-bitfloor/src/test/resources/account/example-accountinfo-data.json delete mode 100644 xchange-bitfloor/src/test/resources/account/example-withdrawal-result.json delete mode 100644 xchange-bitfloor/src/test/resources/errors.json delete mode 100644 xchange-bitfloor/src/test/resources/marketdata/example-day-info-data.json delete mode 100644 xchange-bitfloor/src/test/resources/marketdata/example-full-depth-data.json delete mode 100644 xchange-bitfloor/src/test/resources/marketdata/example-ticker-data.json delete mode 100644 xchange-bitfloor/src/test/resources/marketdata/example-trades-data.json delete mode 100644 xchange-bitfloor/src/test/resources/trade/example-cancel-order.json delete mode 100644 xchange-bitfloor/src/test/resources/trade/example-openorders.json delete mode 100644 xchange-bitfloor/src/test/resources/trade/example-place-limit-order.json delete mode 100644 xchange-bitstamp/api-specification.txt delete mode 100644 xchange-bitstamp/pom.xml delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitStamp.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampAdapters.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampExchange.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampUtils.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/account/BitstampBalance.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampOrderBook.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTicker.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTransaction.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampOrder.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampUserTransaction.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/account/polling/BitstampPollingAccountService.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/marketdata/polling/BitstampPollingMarketDataService.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/trade/polling/BitstampPollingTradeService.java delete mode 100644 xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/util/BitstampTransactionTypeDeserializer.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/BitstampAdapterTest.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/account/AccountInfoJSONTest.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/FullDepthJSONTest.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TickerJSONTest.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TradesJSONTest.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/CancelOrderJSONTest.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/OpenOrdersJSONTest.java delete mode 100644 xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/PlaceLimitOrderJSONTest.java delete mode 100644 xchange-bitstamp/src/test/resources/account/example-accountinfo-data.json delete mode 100644 xchange-bitstamp/src/test/resources/account/example-deposit-response.json delete mode 100644 xchange-bitstamp/src/test/resources/errors.json delete mode 100644 xchange-bitstamp/src/test/resources/marketdata/example-full-depth-data.json delete mode 100644 xchange-bitstamp/src/test/resources/marketdata/example-ticker-data.json delete mode 100644 xchange-bitstamp/src/test/resources/marketdata/example-trades-data.json delete mode 100644 xchange-bitstamp/src/test/resources/trade/example-cancel-order.json delete mode 100644 xchange-bitstamp/src/test/resources/trade/example-openorders.json delete mode 100644 xchange-bitstamp/src/test/resources/trade/example-place-limit-order.json delete mode 100644 xchange-btce/api-specification.txt delete mode 100644 xchange-btce/pom.xml delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCE.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAdapters.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAuthenticated.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEExchange.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEUtils.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfo.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfoReturn.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEDepth.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEReturn.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETicker.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETickerObject.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETrade.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderResult.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderReturn.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOpenOrdersReturn.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOrder.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderResult.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderReturn.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEBasePollingService.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEHmacPostBodyDigest.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/service/account/polling/BTCEPollingAccountService.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/service/marketdata/polling/BTCEPollingMarketDataService.java delete mode 100644 xchange-btce/src/main/java/com/xeiam/xchange/btce/service/trade/polling/BTCEPollingTradeService.java delete mode 100644 xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEAdapterTest.java delete mode 100644 xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEUtilsTest.java delete mode 100644 xchange-btce/src/test/java/com/xeiam/xchange/btce/service/account/BTCEAccountInfoJSONTest.java delete mode 100644 xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCEDepthJSONTest.java delete mode 100644 xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETickerJSONTest.java delete mode 100644 xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETradesJSONTest.java delete mode 100644 xchange-btce/src/test/java/com/xeiam/xchange/btce/service/trade/BTCETradeDataJSONTest.java delete mode 100644 xchange-btce/src/test/resources/account/example-account-info-data.json delete mode 100644 xchange-btce/src/test/resources/marketdata/example-depth-data.json delete mode 100644 xchange-btce/src/test/resources/marketdata/example-ticker-data.json delete mode 100644 xchange-btce/src/test/resources/marketdata/example-trades-data.json delete mode 100644 xchange-btce/src/test/resources/trade/example-cancel-order-data.json delete mode 100644 xchange-btce/src/test/resources/trade/example-open-orders-data.json delete mode 100644 xchange-btce/src/test/resources/trade/example-place-order-data.json delete mode 100644 xchange-campbx/api-specification.txt delete mode 100644 xchange-campbx/pom.xml delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CambBXUtils.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBX.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXAdapters.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXExchange.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXUtils.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXOrder.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXResponse.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/account/MyFunds.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXOrderBook.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXTicker.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/trade/MyOpenOrders.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingAccountService.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingMarketDataService.java delete mode 100644 xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeService.java delete mode 100644 xchange-campbx/src/test/java/com/xeiam/xchange/campbx/CampBXAdapterTest.java delete mode 100644 xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/FullDepthJSONTest.java delete mode 100644 xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyFundsJSONTest.java delete mode 100644 xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyOrdersJSONTest.java delete mode 100644 xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/TickerJSONTest.java delete mode 100644 xchange-campbx/src/test/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeServiceTest.java delete mode 100644 xchange-campbx/src/test/resources/account/getbtcaddr.json delete mode 100644 xchange-campbx/src/test/resources/account/myfunds.json delete mode 100644 xchange-campbx/src/test/resources/error.json delete mode 100644 xchange-campbx/src/test/resources/marketdata/example-full-depth-data.json delete mode 100644 xchange-campbx/src/test/resources/marketdata/example-ticker-data.json delete mode 100644 xchange-campbx/src/test/resources/trade/enter-order.json delete mode 100644 xchange-campbx/src/test/resources/trade/open-orders.json delete mode 100644 xchange-cavirtex/api-specification.txt delete mode 100644 xchange-cavirtex/pom.xml delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtEx.java delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExAdapters.java delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExExchange.java delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExUtils.java delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExDepth.java delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTicker.java delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTrade.java delete mode 100644 xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/service/marketdata/polling/VirtExPollingMarketDataService.java delete mode 100644 xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExAdapterTest.java delete mode 100644 xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExUtilsTest.java delete mode 100644 xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExDepthJSONTest.java delete mode 100644 xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTickerJSONTest.java delete mode 100644 xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTradesJSONTest.java delete mode 100644 xchange-cavirtex/src/test/resources/marketdata/example-depth-data.json delete mode 100644 xchange-cavirtex/src/test/resources/marketdata/example-ticker-data.json delete mode 100644 xchange-cavirtex/src/test/resources/marketdata/example-trades-data.json delete mode 100644 xchange-core/pom.xml delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/BaseExchange.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/CachedDataSession.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/Exchange.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/ExchangeException.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/ExchangeFactory.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/ExchangeSpecification.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/NotAvailableFromExchangeException.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/NotYetImplementedForExchangeException.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/OnlineTest.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/currency/Currencies.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/currency/CurrencyPair.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/currency/MoneyUtils.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/Order.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/account/AccountInfo.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBook.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBookUpdate.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Ticker.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trade.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trades.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/trade/LimitOrder.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/trade/MarketOrder.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/trade/OpenOrders.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/dto/trade/Wallet.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/account/polling/PollingAccountService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/marketdata/polling/PollingMarketDataService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseExchangeService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BasePollingExchangeService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseWebSocketExchangeService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/DefaultExchangeEvent.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEvent.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventListener.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventProducer.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventType.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeStreamingConfiguration.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/JsonWrappedExchangeEvent.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ReconnectService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/StreamingExchangeService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/streaming/WebSocketEventProducer.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/service/trade/polling/PollingTradeService.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/Assert.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/Base64.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/DateUtils.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/BooleanDeserializer.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializer.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializerOneBased.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/FloatingTimestampDeserializer.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/SqlTimeDeserializer.java delete mode 100644 xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/YesNoBooleanDeserializerImpl.java delete mode 100644 xchange-core/src/main/resources/org/joda/money/MoneyDataExtension.csv delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/CurrencyPairTest.java delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/utils/AssertTest.java delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/utils/Base64Test.java delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/utils/BigDecimalTest.java delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/utils/DummyAccountInfo.java delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/utils/DummyTicker.java delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/utils/MoneyUtilsTest.java delete mode 100644 xchange-core/src/test/java/com/xeiam/xchange/websocket/ExampleClient.java delete mode 100644 xchange-core/src/test/resources/logback.xml delete mode 100644 xchange-core/src/test/resources/marketdata/example-ticker.json delete mode 100644 xchange-core/src/test/resources/text/example-httpdata.txt delete mode 100644 xchange-core/src/test/resources/trade/example-accountinfo-data.json delete mode 100644 xchange-core/src/test/resources/utils/example-ticker-streaming-data.json delete mode 100644 xchange-examples/pom.xml delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/BitstampDemoUtils.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/BTCEExamplesUtils.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDataDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/FullDepthDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TickerDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TradesDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/MtGoxWebSocketMarketDataDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemo.java delete mode 100644 xchange-examples/src/main/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemo.java delete mode 100644 xchange-examples/src/main/resources/logback.xml delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/StreamingTickerDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemoTest.java delete mode 100644 xchange-examples/src/test/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemoTest.java delete mode 100644 xchange-mtgox/api-specification.txt delete mode 100644 xchange-mtgox/pom.xml delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/MtGoxUtils.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxAdapters.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxExchange.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxV0.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxDepth.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTicker.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTrades.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/Ticker.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxCancelOrder.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxOrders.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/service/marketdata/polling/MtGoxPollingMarketDataService.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxAdapters.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxExchange.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxV1.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/MtGoxValue.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxAccountInfo.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxBitcoinDepositAddress.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxWithdrawalResponse.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepth.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepthUpdate.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxOrder.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTicker.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTrade.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxGenericResponse.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxOpenOrder.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxWallet.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/Wallets.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/account/MtGoxPollingAccountService.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/MtGoxPollingMarketDataService.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxExchangeEventListener.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxStreamingConfiguration.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxWebsocketMarketDataService.java delete mode 100644 xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/trade/polling/MtGoxPollingTradeService.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/MtGoxAdapterTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/FullDepthJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TickerJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TradesJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/trade/CancelOrdersJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxAdapterTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxHmacPostBodyDigestTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxUtilsTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/AccountInfoJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/DepositResponseJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/WithdrawalResponseJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/DepthJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/FullDepthJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TickerJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TradesJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/DepthUpdateJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TickerJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TradeJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/FailureMessageJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/OpenOrdersJSONTest.java delete mode 100644 xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/SuccessMessageJSONTest.java delete mode 100644 xchange-mtgox/src/test/resources/logback.xml delete mode 100644 xchange-mtgox/src/test/resources/v0/marketdata/example-depth-data-v0.json delete mode 100644 xchange-mtgox/src/test/resources/v0/marketdata/example-ticker-data-v0.json delete mode 100644 xchange-mtgox/src/test/resources/v0/marketdata/example-trades-data-v0.json delete mode 100644 xchange-mtgox/src/test/resources/v0/trade/example-cancel-order-response.json delete mode 100644 xchange-mtgox/src/test/resources/v1/account/example-accountinfo-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/account/example-deposit-response.json delete mode 100644 xchange-mtgox/src/test/resources/v1/account/example-withdrawal-response.json delete mode 100644 xchange-mtgox/src/test/resources/v1/marketdata/polling/example-depth-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/marketdata/polling/example-fulldepth-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/marketdata/polling/example-ticker-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/marketdata/polling/example-trades-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-depth-streaming-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-ticker-streaming-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-trade-streaming-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/trade/example-failure-response-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/trade/example-openorders-data.json delete mode 100644 xchange-mtgox/src/test/resources/v1/trade/example-success-response-data.json delete mode 100644 xchange-openexchangerates/api-specification.txt delete mode 100644 xchange-openexchangerates/pom.xml delete mode 100644 xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OER.java delete mode 100644 xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERAdapters.java delete mode 100644 xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERExchange.java delete mode 100644 xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERUtils.java delete mode 100644 xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/OERTickers.java delete mode 100644 xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/Rates.java delete mode 100644 xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/service/marketdata/polling/OERPollingMarketDataService.java delete mode 100644 xchange-openexchangerates/src/test/java/com/xeiam/xchange/oer/dto/marketdata/TestOERTickers.java delete mode 100644 xchange-openexchangerates/src/test/resources/example-currencies.json delete mode 100644 xchange-openexchangerates/src/test/resources/example-latest-rates.json diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 468412a47..000000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.classpath -.project -.settings/ -.idea/ -*.iml -*.iws -.DS_Store -log/ -target/ \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 334b16908..000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2012-2013 Xeiam LLC http://xeiam.com - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 4e90a16ad..000000000 --- a/README.md +++ /dev/null @@ -1,158 +0,0 @@ -## XChange -A Financial Exchange Library for Java - -## Important! -The world of Bitcoin changes quickly and XChange is no exception. The best way to stay updated on important announcements is to follow tweets on [Xeiam's Twitter page](https://twitter.com/Xeiam). For the latest bugfixes and features you should use the [snapshot jars] (https://oss.sonatype.org/content/groups/public/com/xeiam/xchange/) or build yourself from the DEVELOP branch. See below for more details about building with Maven. To report bugs and see what issues people are currently working on see the [issues page](https://github.com/timmolter/XChange/issues). - -## Description -XChange is a library providing a simple and consistent API for interacting with a diverse set of financial security exchanges, including support for Bitcoin. - -A complete list of implemented exchanges, data providers and brokers can be found on our [Exchange Support](https://github.com/timmolter/XChange/wiki/Exchange-Support) page. - -Usage is very simple: Create an Exchange instance, get the appropriate service, and request data. - -## Example - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGox = ExchangeFactory.INSTANCE.createExchange("com.xeiam.xchange.mtgox.v1.MtGoxExchange"); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = mtGox.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to USD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - - System.out.println(ticker.toString()); - -All exchange implementations expose the same API, but you can also directly access the raw data. - -Now go ahead and [study some more examples](http://xeiam.com/xchange_examplecode.jsp), [download the thing](http://xeiam.com/xchange_changelog.jsp) and [provide feedback](https://github.com/timmolter/XChange/issues). - -## Features -* MIT license -* consistent API across all implemented exchanges -* active development -* very minimal 3rd party dependencies -* modular components -* polling and streaming capability - -## More Info -Project Site: http://xeiam.com/xchange.jsp -Example Code: http://xeiam.com/xchange_examplecode.jsp -Change Log: http://xeiam.com/xchange_changelog.jsp -Java Docs: http://xeiam.com/xchange/javadoc/index.html -Sonar Code Quality: http://sonar.xeiam.com/ -Jenkins CI: http://ci.xeiam.com/ - -## Wiki -Home: https://github.com/timmolter/XChange/wiki -Design Notes: https://github.com/timmolter/XChange/wiki/Design-Notes -Milestones: https://github.com/timmolter/XChange/wiki/Milestones -Exchange Support: https://github.com/timmolter/XChange/wiki/Exchange-support -New Implementation Best Practices: https://github.com/timmolter/XChange/wiki/New-Implementation-Best-Practices - -## Getting Started -XChange is semantically versioned: http://semver.org - -### Non-Maven -Download XChange Release Jars: http://xeiam.com/xchange.jsp -Download XChange Snapshot Jars: https://oss.sonatype.org/content/groups/public/com/xeiam/xchange/ (develop-SNAPSHOT) - -#### Compile Dependencies - +- org.slf4j:slf4j-api:jar:1.7.2:compile - +- org.joda:joda-money:jar:0.8:compile - \- com.github.mmazi:rescu:jar:1.0.0:compile - +- com.fasterxml.jackson.core:jackson-core:jar:2.1.1:compile - +- com.fasterxml.jackson.core:jackson-annotations:jar:2.1.1:compile - +- com.fasterxml.jackson.core:jackson-databind:jar:2.1.1:compile - +- javax.ws.rs:jsr311-api:jar:1.1.1:compile - \- com.google.code.findbugs:jsr305:jar:2.0.1:compile - -#### Test Dependencies - \- junit:junit:jar:4.11:test - \- org.hamcrest:hamcrest-core:jar:1.3:test - -#### Other Dependencies for Some Examples - +- ch.qos.logback:logback-classic:jar:1.0.9:compile - | \- ch.qos.logback:logback-core:jar:1.0.9:compile - +- com.xeiam.xchart:xchart:jar:2.1.0:compile - -### Maven -The XChange release artifacts are hosted on Maven Central. - -For snapshots, add the following repository to your pom.xml file. - - - sonatype-oss-snapshot - - https://oss.sonatype.org/content/repositories/snapshots - - -Add the following dependencies in your pom.xml file. You will need at least xchange-core. Add the additional dependencies for the exchange implementations you are interested in. There is example code for all the implementations in xchange-examples. - - - com.xeiam.xchange - xchange-core - 1.6.0 - - - com.xeiam.xchange - xchange-examples - 1.6.0 - - - com.xeiam.xchange - xchange-bitcoincharts - 1.6.0 - - - com.xeiam.xchange - xchange-bitstamp - 1.6.0 - - - com.xeiam.xchange - xchange-btce - 1.6.0 - - - com.xeiam.xchange - xchange-campbx - 1.6.0 - - - com.xeiam.xchange - xchange-cavirtex - 1.6.0 - - - com.xeiam.xchange - xchange-mtgox - 1.6.0 - - - com.xeiam.xchange - xchange-openexchangerates - 1.6.0 - - -## Building -install in local Maven repo: mvn clean install -create project javadocs: mvn javadoc:aggregate -run integration tests: mvn clean integration-test -P run-integration-tests -generate dependency tree: mvn dependency:tree - -## Bugs -Please report any bugs or submit feature requests to [XChange's Github issue tracker](https://github.com/timmolter/XChange/issues). - -## Contributing -If you'd like to submit a new implementation for another exchange, please take a look at [New Implementation Best Practices](https://github.com/timmolter/XChange/wiki/New-Implementation-Best-Practices) first, as there are lots of time-saving tips! - -For more information such as a contributor list and a list of known projects depending on XChange, visit the [Main Project Wiki](https://github.com/timmolter/XChange/wiki). - -## Acknowledgements -XChange integrates the code from the [Java-Websocket](https://github.com/TooTallNate/Java-WebSocket) project licensed under the MIT license. The code is copy-pasta-ed directly into XChange for now. - - -## Donations -15MvtM8e3bzepmZ5vTe8cHvrEZg6eDzw2w diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 86a353df4..000000000 --- a/pom.xml +++ /dev/null @@ -1,311 +0,0 @@ - - - 4.0.0 - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - pom - - XChange Parent - XChange is a Java library providing a simple and consistent API for interacting with a diverse set of financial security exchanges including Bitcoin. - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - Tim Molter - - - Gary Rowe - g.rowe@froot.co.uk - - - - - - MIT - http://www.opensource.org/licenses/mit-license.php - repo - All source code is under the MIT license. - - - - - GitHub - https://github.com/timmolter/XChange/issues - - - - - xeiam_oss.sonatype-nexus-snapshots - Sonatype Nexus Snapshots - http://oss.sonatype.org/content/repositories/snapshots - - - xeiam_oss.sonatype-nexus-staging - Nexus Release Repository - http://oss.sonatype.org/service/local/staging/deploy/maven2/ - - https://oss.sonatype.org/content/groups/public/com/xeiam/xchange - - - - scm:git:git@github.com:timmolter/XChange.git - scm:git:git@github.com:timmolter/XChange.git - git@github.com:timmolter/XChange.git - HEAD - - - - http://ci.xeiam.com/ - - - - xchange-core - xchange-mtgox - xchange-examples - xchange-cavirtex - xchange-btce - xchange-openexchangerates - xchange-bitstamp - xchange-campbx - xchange-bitcoincharts - - - - - - - - org.slf4j - slf4j-api - 1.7.2 - - - - - ch.qos.logback - logback-classic - 1.0.9 - - test - - - - - org.joda - joda-money - - 0.8 - - - - - com.github.mmazi - rescu - 1.0.0 - - - - - com.xeiam.xchart - xchart - 2.1.0 - - - - - org.java-websocket - Java-WebSocket - 1.3.0 - - - - - - - - junit - junit - 4.11 - test - - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.4 - - - sign-artifacts - verify - - sign - - - - - - - - - - - run-integration-tests - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.9 - - none - false - - false - -Xms1024m -Xmx1024m -XX:MaxPermSize=512m - - none - - - **/*Test*.java - **/*Test.java - - - - - - integration-tests - integration-test - - test - - - - - - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.5.1 - - 1.6 - 1.6 - true - true - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2 - - - attach-sources - - jar - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9 - - - attach-javadocs - - jar - - - - - - - org.apache.maven.plugins - maven-release-plugin - 2.4 - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - org.apache.maven.surefire - surefire-junit47 - ${maven-surefire-plugin.version} - - - - com.xeiam.xchange.OnlineTest - - - - maven-failsafe-plugin - ${maven-surefire-plugin.version} - - - org.apache.maven.surefire - surefire-junit47 - ${maven-surefire-plugin.version} - - - - com.xeiam.xchange.OnlineTest - - - - - integration-test - - - - - - - - - UTF-8 - UTF-8 - - - 2.13 - - - - diff --git a/settings.xml b/settings.xml new file mode 100644 index 000000000..6e86c155f --- /dev/null +++ b/settings.xml @@ -0,0 +1,21 @@ + + + + + + + + + sonatype-nexus-snapshots + ${env.CI_DEPLOY_USERNAME} + ${env.CI_DEPLOY_PASSWORD} + + + + + + + \ No newline at end of file diff --git a/xchange-bitcoin24/api-specification.txt b/xchange-bitcoin24/api-specification.txt deleted file mode 100644 index 4fa53ca60..000000000 --- a/xchange-bitcoin24/api-specification.txt +++ /dev/null @@ -1,25 +0,0 @@ -Bitcoin-24 Exchange API specification -================================ - -Public API - -Documentation -================================ -https://bitcoin-24.com/api/user_api.php - -Ticker ------- - -https://bitcoin-24.com/api/USD/ticker.json - - -Orders ------- -https://bitcoin-24.com/api/USD/orderbook.json - - -Trades ------- -https://bitcoin-24.com/api/USD/trades.json - - diff --git a/xchange-bitcoin24/pom.xml b/xchange-bitcoin24/pom.xml deleted file mode 100644 index c354cf2ac..000000000 --- a/xchange-bitcoin24/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - develop-SNAPSHOT - - - xchange-bitcoin24 - - Bitcoin-24 Exchange - XChange implementation for the Bitcoin-24 Exchange - - http://xeiam.com - 2013 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - develop-SNAPSHOT - - - - - \ No newline at end of file diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24.java deleted file mode 100644 index 7aa307454..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2013 Michael Lagacé - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Depth; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Ticker; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Trade; - -/** - * @author Michael Lagacé - */ -@Path("api") -public interface Bitcoin24 { - - @GET - @Path("{currency}/ticker.json") - Bitcoin24Ticker getTicker(@PathParam("currency") String currency); - - @GET - @Path("{currency}/orderbook.json") - Bitcoin24Depth getFullDepth(@PathParam("currency") String currency); - - @GET - @Path("{currency}/trades.json") - Bitcoin24Trade[] getTrades(@PathParam("currency") String currency); - -} diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Adapters.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Adapters.java deleted file mode 100644 index 577c2a640..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Adapters.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Ticker; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Trade; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Various adapters for converting from Bitcoin24 DTOs to XChange DTOs - */ -public final class Bitcoin24Adapters { - - /** - * private Constructor - */ - private Bitcoin24Adapters() { - - } - - /** - * Adapts a Bitcoin24Order to a LimitOrder - * - * @param amount - * @param price - * @param currency - * @param orderTypeString - * @param id - * @return - */ - public static LimitOrder adaptOrder(BigDecimal amount, BigDecimal price, String tradableIdentifier, String currency, String orderTypeString, String id) { - - // place a limit order - OrderType orderType = orderTypeString.equalsIgnoreCase("bid") ? OrderType.BID : OrderType.ASK; - BigMoney limitPrice; - limitPrice = MoneyUtils.parse(currency + " " + price); - - return new LimitOrder(orderType, amount, tradableIdentifier, currency, limitPrice); - - } - - /** - * Adapts a List of Bitcoin24Orders to a List of LimitOrders - * - * @param Bitcoin24Orders - * @param currency - * @param orderType - * @param id - * @return - */ - public static List adaptOrders(List Bitcoin24Orders, String tradableIdentifier, String currency, String orderType, String id) { - - List limitOrders = new ArrayList(); - - for (BigDecimal[] bitcoin24Order : Bitcoin24Orders) { - // Bid orderbook is reversed order. Insert at index 0 instead of - // appending - if (orderType.equalsIgnoreCase("bid")) { - limitOrders.add(0, adaptOrder(bitcoin24Order[1], bitcoin24Order[0], tradableIdentifier, currency, orderType, id)); - } else { - limitOrders.add(adaptOrder(bitcoin24Order[1], bitcoin24Order[0], tradableIdentifier, currency, orderType, id)); - } - } - - return limitOrders; - } - - /** - * Adapts a Bitcoin24Trade to a Trade Object - * - * @param Bitcoin24Trade A Bitcoin24 trade - * @return The XChange Trade - */ - public static Trade adaptTrade(Bitcoin24Trade Bitcoin24Trade, String tradableIdentifier, String currency) { - - OrderType orderType = Bitcoin24Trade.equals("bid") ? OrderType.BID : OrderType.ASK; - BigDecimal amount = Bitcoin24Trade.getAmount(); - BigMoney price = MoneyUtils.parse(currency + " " + Bitcoin24Trade.getPrice()); - Date date = DateUtils.fromMillisUtc(Bitcoin24Trade.getDate() * 1000L); - - return new Trade(orderType, amount, tradableIdentifier, currency, price, date); - } - - /** - * Adapts a Bitcoin24Trade[] to a Trades Object - * - * @param BTCETrades The Bitcoin24 trade data - * @return The trades - */ - public static Trades adaptTrades(Bitcoin24Trade[] bitcoin24TTrades, String tradableIdentifier, String currency) { - - List tradesList = new ArrayList(); - for (Bitcoin24Trade Bitcoin24Trade : bitcoin24TTrades) { - // Date is reversed order. Insert at index 0 instead of appending - tradesList.add(adaptTrade(Bitcoin24Trade, tradableIdentifier, currency)); - } - return new Trades(tradesList); - } - - /** - * Adapts a Bitcoin24Ticker to a Ticker Object - * - * @param bitcoin24Ticker - * @return - */ - public static Ticker adaptTicker(Bitcoin24Ticker bitcoin24Ticker, String tradableIdentifier, String currency) { - - BigMoney last = MoneyUtils.parse(currency + " " + bitcoin24Ticker.getLast()); - BigMoney bid = MoneyUtils.parse(currency + " " + bitcoin24Ticker.getBuy()); - BigMoney ask = MoneyUtils.parse(currency + " " + bitcoin24Ticker.getSell()); - BigDecimal volume = bitcoin24Ticker.getVol(); - - // Due to low USD volume, high/low return null and causing NullPointerException in MoneyUtils - // If null, set to 0 to prevent exception - BigMoney high; - BigMoney low; - if (bitcoin24Ticker.getLow() == null || bitcoin24Ticker.getHigh() == null) { - high = MoneyUtils.parse(currency + " " + 0); - low = MoneyUtils.parse(currency + " " + 0); - } else { - high = MoneyUtils.parse(currency + " " + bitcoin24Ticker.getHigh()); - low = MoneyUtils.parse(currency + " " + bitcoin24Ticker.getLow()); - } - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withBid(bid).withAsk(ask).withHigh(high).withLow(low).withVolume(volume).build(); - } - -} diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Exchange.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Exchange.java deleted file mode 100644 index b0663d123..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Exchange.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitcoin24.service.marketdata.polling.Bitcoin24PollingMarketDataService; - -/** - *

- * Exchange implementation to provide the following to applications: - *

- *
    - *
  • A wrapper for the Bitcoin24 exchange API
  • - *
- */ -public class Bitcoin24Exchange extends BaseExchange implements Exchange { - - /** - * Default constructor for ExchangeFactory - */ - public Bitcoin24Exchange() { - - } - - /** - * @return A default configuration for this exchange - */ - public static Exchange newInstance() { - - Exchange exchange = new Bitcoin24Exchange(); - exchange.applySpecification(exchange.getDefaultExchangeSpecification()); - return exchange; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new Bitcoin24PollingMarketDataService(exchangeSpecification); - } - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://bitcoin-24.com"); - exchangeSpecification.setHost("bitcoin-24.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("Bitcoin-24"); - exchangeSpecification.setExchangeDescription("Bitcoin-24 is a Bitcoin exchange"); - - return exchangeSpecification; - } -} diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Utils.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Utils.java deleted file mode 100644 index 14c023ed2..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/Bitcoin24Utils.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared Bitcoin-24 properties - */ -public final class Bitcoin24Utils { - - /** - * private Constructor - */ - private Bitcoin24Utils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - CurrencyPair.BTC_USD, - - CurrencyPair.BTC_EUR - - ); - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - -} diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Depth.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Depth.java deleted file mode 100644 index 0c16712db..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Depth.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing depth from Bitcoin24 - */ -public class Bitcoin24Depth { - - private final List asks; - private final List bids; - - /** - * Constructor - * - * @param asks - * @param bids - */ - public Bitcoin24Depth(@JsonProperty("asks") List asks, @JsonProperty("bids") List bids) { - - this.asks = asks; - this.bids = bids; - } - - public List getAsks() { - - return asks; - } - - public List getBids() { - - return bids; - } - - @Override - public String toString() { - - return "Bitcoin24Depth [asks=" + asks.toString() + ", bids=" + bids.toString() + "]"; - } - -} diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Ticker.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Ticker.java deleted file mode 100644 index b31ce6c9f..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Ticker.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing Ticker from Bitcoin24 - */ -public final class Bitcoin24Ticker { - - private final BigDecimal last; - private final BigDecimal high; - private final BigDecimal low; - private final BigDecimal avg; - private final BigDecimal ask; - private final BigDecimal bid; - private final BigDecimal trades_today; - - /** - * Constructor - * - * @param high - * @param low - * @param vol - * @param last - * @param avg - * @param ask - * @param bid - */ - public Bitcoin24Ticker(@JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("trades_today") BigDecimal trades_today, @JsonProperty("last") BigDecimal last, - @JsonProperty("avg") BigDecimal avg, @JsonProperty("ask") BigDecimal ask, @JsonProperty("bid") BigDecimal bid) { - - this.high = high; - this.low = low; - this.last = last; - this.avg = avg; - this.ask = ask; - this.bid = bid; - this.trades_today = trades_today; - } - - public BigDecimal getAvg() { - - return avg; - } - - public BigDecimal getBuy() { - - return bid; - } - - public BigDecimal getHigh() { - - return high; - } - - public BigDecimal getLast() { - - return last; - } - - public BigDecimal getLow() { - - return low; - } - - public BigDecimal getSell() { - - return ask; - } - - public BigDecimal getVol() { - - // Volume not available, use number of trades - return trades_today; - } - - @Override - public String toString() { - - return "Bitcoin24Ticker [last=" + last + ", high=" + high + ", low=" + low + ", avg=" + avg + ", buy=" + bid + ", sell=" + ask + ", vol=" + trades_today + "]"; - } - -} diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Trade.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Trade.java deleted file mode 100644 index 1f65f4c4f..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/dto/marketdata/Bitcoin24Trade.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - *

- * Data object representing a Trade from Bitcoin24 - *

- */ -public class Bitcoin24Trade { - - private final BigDecimal amount; - private final long date; - private final BigDecimal price; - private final long tid; - - /** - * Constructor - * - * @param amount - * @param date - * @param price - * @param tid - */ - public Bitcoin24Trade(@JsonProperty("amount") BigDecimal amount, @JsonProperty("date") long date, @JsonProperty("price") BigDecimal price, @JsonProperty("tid") long tid) { - - this.amount = amount; - this.date = date; - this.price = price; - this.tid = tid; - } - - public BigDecimal getAmount() { - - return amount; - } - - public long getDate() { - - return date; - } - - public BigDecimal getPrice() { - - return price; - } - - public long getTid() { - - return tid; - } - - @Override - public String toString() { - - return "Bitcoin24Trade [amount=" + amount + ", date=" + date + ", price=" + price + ", tid=" + tid + "]"; - } - -} diff --git a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/service/marketdata/polling/Bitcoin24PollingMarketDataService.java b/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/service/marketdata/polling/Bitcoin24PollingMarketDataService.java deleted file mode 100644 index f58db3804..000000000 --- a/xchange-bitcoin24/src/main/java/com/xeiam/xchange/bitcoin24/service/marketdata/polling/Bitcoin24PollingMarketDataService.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.bitcoin24.Bitcoin24; -import com.xeiam.xchange.bitcoin24.Bitcoin24Adapters; -import com.xeiam.xchange.bitcoin24.Bitcoin24Utils; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Depth; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Ticker; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Trade; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Implementation of the market data service for Bitcoin24 - *

- *
    - *
  • Provides access to various market data values
  • - *
- */ -public class Bitcoin24PollingMarketDataService implements PollingMarketDataService { - - private final Bitcoin24 bitcoin24; - - /** - * @param exchangeSpecification The exchange specification - */ - public Bitcoin24PollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - bitcoin24 = RestProxyFactory.createProxy(Bitcoin24.class, exchangeSpecification.getSslUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - Bitcoin24Ticker bitcoin24Ticker = bitcoin24.getTicker(currency.toUpperCase()); - - // Adapt to XChange DTOs - return Bitcoin24Adapters.adaptTicker(bitcoin24Ticker, tradableIdentifier, currency); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - Bitcoin24Depth btceDepth = bitcoin24.getFullDepth(currency.toUpperCase()); - - // Adapt to XChange DTOs - List asks = Bitcoin24Adapters.adaptOrders(btceDepth.getAsks(), tradableIdentifier, currency, "ask", ""); - List bids = Bitcoin24Adapters.adaptOrders(btceDepth.getBids(), tradableIdentifier, currency, "bid", ""); - - return new OrderBook(asks, bids); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - - Bitcoin24Trade[] BTCETrades = bitcoin24.getTrades(currency.toUpperCase()); - - return Bitcoin24Adapters.adaptTrades(BTCETrades, tradableIdentifier, currency); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(Bitcoin24Utils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - - } - - @Override - public List getExchangeSymbols() { - - return Bitcoin24Utils.CURRENCY_PAIRS; - } - -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/FullDepthDemo.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/FullDepthDemo.java deleted file mode 100644 index fabaf7d9e..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/FullDepthDemo.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.examplearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitcoin24.Bitcoin24Exchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitcoin24 - */ -public class FullDepthDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitcoin24 exchange API using default settings - Exchange exchange = ExchangeFactory.INSTANCE.createExchange(Bitcoin24Exchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = exchange.getPollingMarketDataService(); - - // Get the latest order book data for BTC/CAD - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.EUR); - - System.out.println("Current Order Book size for BTC / EUR: " + (orderBook.getAsks().size() + orderBook.getBids().size())); - - System.out.println("First Ask: " + orderBook.getAsks().get(0).toString()); - System.out.println("First Bid: " + orderBook.getBids().get(0).toString()); - - } - -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TickerDemo.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TickerDemo.java deleted file mode 100644 index 9d806d7d6..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TickerDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.examplearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitcoin24.Bitcoin24Exchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Ticker at Bitcoin24 - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitcoin24 exchange API using default settings - Exchange exchange = ExchangeFactory.INSTANCE.createExchange(Bitcoin24Exchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = exchange.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to CAD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.EUR); - double value = ticker.getLast().getAmount().doubleValue(); - String currency = ticker.getLast().getCurrencyUnit().toString(); - - System.out.println("Last: " + currency + "-" + value); - System.out.println("Last: " + ticker.getLast().toString()); - System.out.println("Volume: " + ticker.getVolume().toString()); - System.out.println("High: " + ticker.getHigh().toString()); - System.out.println("Low: " + ticker.getLow().toString()); - - } - -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TradesDemo.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TradesDemo.java deleted file mode 100644 index 92c19030b..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/examplearchive/marketdata/TradesDemo.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.examplearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitcoin24.Bitcoin24Exchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitcoin24 - */ -public class TradesDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitcoin24 exchange API using default settings - Exchange exchange = ExchangeFactory.INSTANCE.createExchange(Bitcoin24Exchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = exchange.getPollingMarketDataService(); - - // Get the latest trade data for BTC/CAD - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.EUR); - - System.out.println(trades.toString()); - - } - -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24AdapterTest.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24AdapterTest.java deleted file mode 100644 index 3d9f4689f..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24AdapterTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.service; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.List; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoin24.Bitcoin24Adapters; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Depth; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Ticker; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Trade; -import com.xeiam.xchange.bitcoin24.service.marketdata.Bitcoin24DepthJSONTest; -import com.xeiam.xchange.bitcoin24.service.marketdata.Bitcoin24TickerJSONTest; -import com.xeiam.xchange.bitcoin24.service.marketdata.Bitcoin24TradesJSONTest; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Tests the Bitcoin24Adapter class - */ -public class Bitcoin24AdapterTest { - - @Test - public void testOrderAdapterWithDepth() throws IOException { - - // Read in the JSON from the example resources - InputStream is = Bitcoin24DepthJSONTest.class.getResourceAsStream("/marketdata/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - Bitcoin24Depth Bitcoin24Depth = mapper.readValue(is, Bitcoin24Depth.class); - - List asks = Bitcoin24Adapters.adaptOrders(Bitcoin24Depth.getAsks(), "BTC", "USD", "ask", ""); - - // verify all fields filled - assertTrue("order type should be ASK", asks.get(0).getType() == OrderType.ASK); - assertTrue("tradableIdentifier should be BTC", asks.get(0).getTradableIdentifier().equals("BTC")); - assertTrue("transactionCurrency should be USD", asks.get(0).getTransactionCurrency().equals("USD")); - - } - - @Test - public void testTradeAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = Bitcoin24TradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - Bitcoin24Trade[] bitcoin24Trades = mapper.readValue(is, Bitcoin24Trade[].class); - - Trades trades = Bitcoin24Adapters.adaptTrades(bitcoin24Trades, Currencies.BTC, Currencies.USD); - // System.out.println(trades.getTrades().size()); - assertTrue("Trades size should be 2007", trades.getTrades().size() == 2007); - - // verify all fields filled - System.out.println("Price: " + trades.getTrades().get(0).getPrice().getAmount().doubleValue()); - assertTrue("price should be 4.88000", trades.getTrades().get(0).getPrice().getAmount().doubleValue() == 4.88000); - assertTrue("order type should be ASK", trades.getTrades().get(0).getType() == OrderType.ASK); - assertTrue("tradableAmount should be 3.00000000", trades.getTrades().get(0).getTradableAmount().doubleValue() == 3.00000000); - assertTrue("tradableIdentifier should be BTC", trades.getTrades().get(0).getTradableIdentifier().equals("BTC")); - // assertTrue("transactionCurrency should be PLN", trades.getTrades().get(0).getTransactionCurrency().equals("PLN")); - assertEquals("timestamp incorrect", "2012-05-14 14:13:17 GMT", DateUtils.toUTCString(trades.getTrades().get(0).getTimestamp())); - // Mon, 14 May 2012 14:13:17 GMT - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = Bitcoin24TickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - Bitcoin24Ticker Bitcoin24Ticker = mapper.readValue(is, Bitcoin24Ticker.class); - - Ticker ticker = Bitcoin24Adapters.adaptTicker(Bitcoin24Ticker, "BTC", "USD"); - - assertEquals("last should be USD 30.50001", ticker.getLast().toString(), "USD 30.50001"); - assertEquals("low should be USD 30.00043", ticker.getLow().toString(), "USD 30.00043"); - assertEquals("high should be USD 34.39799", ticker.getHigh().toString(), "USD 34.39799"); - assertEquals("ask should be USD 34.39798", ticker.getAsk().toString(), "USD 34.39798"); - assertEquals("buy should be USD 30.98600", ticker.getBid().toString(), "USD 30.98600"); - assertEquals("volume should be 12", ticker.getVolume(), new BigDecimal("12")); - assertEquals("Tradable Identifier should be BTC", ticker.getTradableIdentifier(), "BTC"); - - } -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24UtilsTest.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24UtilsTest.java deleted file mode 100644 index 5a2d065c0..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/Bitcoin24UtilsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.service; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.xeiam.xchange.bitcoin24.Bitcoin24Utils; -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * Test class for Bitcoin24Utils class - */ -public class Bitcoin24UtilsTest { - - @Test - public void testIsValidCurrencyPair() { - - assertTrue(Bitcoin24Utils.isValidCurrencyPair(CurrencyPair.BTC_USD)); - assertTrue(Bitcoin24Utils.isValidCurrencyPair(new CurrencyPair("BTC", "USD"))); - assertFalse(Bitcoin24Utils.isValidCurrencyPair(new CurrencyPair("BTC", "CAD"))); - } -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24DepthJSONTest.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24DepthJSONTest.java deleted file mode 100644 index 7821ac43c..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24DepthJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Depth; - -/** - * Test Bitcoin24Depth JSON parsing - */ -public class Bitcoin24DepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = Bitcoin24DepthJSONTest.class.getResourceAsStream("/marketdata/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - Bitcoin24Depth Bitcoin24Depth = mapper.readValue(is, Bitcoin24Depth.class); - - // Verify that the example data was unmarshalled correctly - assertThat(Bitcoin24Depth.getAsks().get(0)[0], is(equalTo(new BigDecimal("99999999.99999")))); - } -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TickerJSONTest.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TickerJSONTest.java deleted file mode 100644 index 221d66af5..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TickerJSONTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Ticker; - -/** - * Test Bitcoin24Ticker JSON parsing - */ -public class Bitcoin24TickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = Bitcoin24TickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - Bitcoin24Ticker Bitcoin24Ticker = mapper.readValue(is, Bitcoin24Ticker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Last value", Bitcoin24Ticker.getLast(), equalTo(new BigDecimal("30.50001"))); - assertThat("Unexpected Return High value", Bitcoin24Ticker.getHigh(), equalTo(new BigDecimal("34.39799"))); - assertThat("Unexpected Return Low value", Bitcoin24Ticker.getLow(), equalTo(new BigDecimal("30.00043"))); - assertThat("Unexpected Return Volume value", Bitcoin24Ticker.getVol(), equalTo(new BigDecimal("12"))); - } - -} diff --git a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TradesJSONTest.java b/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TradesJSONTest.java deleted file mode 100644 index e0cfd3f82..000000000 --- a/xchange-bitcoin24/src/test/java/com/xeiam/xchange/bitcoin24/service/marketdata/Bitcoin24TradesJSONTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoin24.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoin24.dto.marketdata.Bitcoin24Trade; - -/** - * Test Bitcoin24Trade[] JSON parsing - */ -public class Bitcoin24TradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = Bitcoin24TradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - Bitcoin24Trade[] bitcoin24Trades = mapper.readValue(is, Bitcoin24Trade[].class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", bitcoin24Trades[0].getPrice(), equalTo(new BigDecimal("4.88000"))); - } -} diff --git a/xchange-bitcoin24/src/test/resources/marketdata/example-depth-data.json b/xchange-bitcoin24/src/test/resources/marketdata/example-depth-data.json deleted file mode 100644 index 84df97108..000000000 --- a/xchange-bitcoin24/src/test/resources/marketdata/example-depth-data.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "asks":[ - [ - "99999999.99999", - "0.10000000" - ], - [ - "50.00000", - "0.10000000" - ], - [ - "100.00000", - "0.10000000" - ], - [ - "1000.00000", - "0.10000000" - ], - [ - "10000.00000", - "0.10000000" - ], - [ - "100000.00000", - "0.10000000" - ], - [ - "1000000.00000", - "0.39900000" - ], - [ - "49.99997", - "0.10000000" - ], - [ - "34.45790", - "5.74389040" - ], - [ - "34.40000", - "1.00000000" - ], - [ - "34.39800", - "16.52611000" - ], - [ - "34.39799", - "48.28653000" - ], - [ - "34.39798", - "0.50000000" - ] - ], - "bids":[ - [ - "0.10000", - "9.99000000" - ], - [ - "0.16000", - "10.00000000" - ], - [ - "0.25000", - "10.00000000" - ], - [ - "0.50000", - "10.00000000" - ], - [ - "1.00000", - "5.00000000" - ], - [ - "0.25000", - "10.00000000" - ], - [ - "2.00000", - "2.57800000" - ], - [ - "18.05000", - "4.83680000" - ], - [ - "30.50000", - "7.59000000" - ], - [ - "30.50001", - "22.49212000" - ], - [ - "30.98600", - "1.00000000" - ] - ] -} \ No newline at end of file diff --git a/xchange-bitcoin24/src/test/resources/marketdata/example-ticker-data.json b/xchange-bitcoin24/src/test/resources/marketdata/example-ticker-data.json deleted file mode 100644 index f289acd79..000000000 --- a/xchange-bitcoin24/src/test/resources/marketdata/example-ticker-data.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ask":"34.39798", - "bid":"30.98600", - "high":"34.39799", - "low":"30.00043", - "avg":32.19921, - "last":"30.50001", - "trades_today":"12" -} \ No newline at end of file diff --git a/xchange-bitcoin24/src/test/resources/marketdata/example-trades-data.json b/xchange-bitcoin24/src/test/resources/marketdata/example-trades-data.json deleted file mode 100644 index 9f0b0e5be..000000000 --- a/xchange-bitcoin24/src/test/resources/marketdata/example-trades-data.json +++ /dev/null @@ -1,12044 +0,0 @@ -[ - { - "date":"1337004797", - "price":"4.88000", - "amount":"3.00000000", - "tid":"49" - }, - { - "date":"1337005144", - "price":"4.88000", - "amount":"8.00000000", - "tid":"50" - }, - { - "date":"1337005354", - "price":"4.91000", - "amount":"4.10000000", - "tid":"51" - }, - { - "date":"1337052956", - "price":"4.91000", - "amount":"0.09000000", - "tid":"52" - }, - { - "date":"1337102716", - "price":"4.86000", - "amount":"3.00000000", - "tid":"56" - }, - { - "date":"1337102716", - "price":"4.85000", - "amount":"3.00000000", - "tid":"57" - }, - { - "date":"1337121141", - "price":"4.83000", - "amount":"1.65000000", - "tid":"58" - }, - { - "date":"1337129342", - "price":"4.83000", - "amount":"0.09700000", - "tid":"59" - }, - { - "date":"1337180725", - "price":"4.89000", - "amount":"4.70000000", - "tid":"64" - }, - { - "date":"1337180947", - "price":"4.90000", - "amount":"0.01000000", - "tid":"65" - }, - { - "date":"1337187521", - "price":"4.90000", - "amount":"15.45100000", - "tid":"66" - }, - { - "date":"1337190525", - "price":"4.90000", - "amount":"0.07000000", - "tid":"68" - }, - { - "date":"1337190545", - "price":"4.90000", - "amount":"0.00115000", - "tid":"69" - }, - { - "date":"1337192752", - "price":"4.90000", - "amount":"0.09500000", - "tid":"72" - }, - { - "date":"1337196343", - "price":"4.90000", - "amount":"0.09700000", - "tid":"73" - }, - { - "date":"1337200859", - "price":"4.90000", - "amount":"0.09590000", - "tid":"76" - }, - { - "date":"1337210200", - "price":"4.90000", - "amount":"0.09700000", - "tid":"77" - }, - { - "date":"1337210256", - "price":"4.90000", - "amount":"0.00200000", - "tid":"78" - }, - { - "date":"1337214529", - "price":"4.90000", - "amount":"0.09700000", - "tid":"79" - }, - { - "date":"1337219763", - "price":"4.90000", - "amount":"0.09790000", - "tid":"80" - }, - { - "date":"1337225454", - "price":"4.90000", - "amount":"0.09900000", - "tid":"81" - }, - { - "date":"1337245490", - "price":"4.90000", - "amount":"0.09900000", - "tid":"82" - }, - { - "date":"1337245507", - "price":"4.90000", - "amount":"0.00200000", - "tid":"83" - }, - { - "date":"1337283774", - "price":"4.90000", - "amount":"0.20400000", - "tid":"84" - }, - { - "date":"1337283836", - "price":"4.90000", - "amount":"0.00200000", - "tid":"85" - }, - { - "date":"1337283853", - "price":"4.90000", - "amount":"0.48005000", - "tid":"86" - }, - { - "date":"1337283869", - "price":"4.91000", - "amount":"5.00000000", - "tid":"87" - }, - { - "date":"1337283915", - "price":"4.93000", - "amount":"6.00000000", - "tid":"88" - }, - { - "date":"1337283951", - "price":"4.93000", - "amount":"0.03770000", - "tid":"89" - }, - { - "date":"1337287115", - "price":"4.93000", - "amount":"0.20400000", - "tid":"90" - }, - { - "date":"1337290484", - "price":"4.93000", - "amount":"0.05830000", - "tid":"91" - }, - { - "date":"1337336162", - "price":"4.99000", - "amount":"5.00000000", - "tid":"92" - }, - { - "date":"1337347068", - "price":"4.97000", - "amount":"5.00000000", - "tid":"103" - }, - { - "date":"1337386594", - "price":"4.98000", - "amount":"1.50000000", - "tid":"112" - }, - { - "date":"1337387891", - "price":"4.98000", - "amount":"2.00000000", - "tid":"113" - }, - { - "date":"1337387927", - "price":"4.99000", - "amount":"5.00000000", - "tid":"114" - }, - { - "date":"1337387958", - "price":"5.00000", - "amount":"9.50000000", - "tid":"115" - }, - { - "date":"1337402519", - "price":"5.00000", - "amount":"0.14400000", - "tid":"117" - }, - { - "date":"1337435235", - "price":"5.00000", - "amount":"0.35600000", - "tid":"123" - }, - { - "date":"1337749143", - "price":"4.98000", - "amount":"0.20200000", - "tid":"170" - }, - { - "date":"1337749155", - "price":"4.98000", - "amount":"0.00200000", - "tid":"171" - }, - { - "date":"1337756466", - "price":"4.98000", - "amount":"0.19850000", - "tid":"174" - }, - { - "date":"1337762199", - "price":"4.98000", - "amount":"7.15600000", - "tid":"175" - }, - { - "date":"1337762615", - "price":"4.98000", - "amount":"0.00150000", - "tid":"176" - }, - { - "date":"1337762631", - "price":"4.99000", - "amount":"1.30000000", - "tid":"177" - }, - { - "date":"1337762787", - "price":"5.01000", - "amount":"1.50000000", - "tid":"178" - }, - { - "date":"1337773808", - "price":"4.99000", - "amount":"3.76000000", - "tid":"184" - }, - { - "date":"1337840466", - "price":"5.02000", - "amount":"0.20700000", - "tid":"208" - }, - { - "date":"1337887489", - "price":"5.02000", - "amount":"0.50500000", - "tid":"233" - }, - { - "date":"1337894020", - "price":"5.02000", - "amount":"0.20500000", - "tid":"235" - }, - { - "date":"1337908980", - "price":"5.02000", - "amount":"3.75300000", - "tid":"244" - }, - { - "date":"1337908980", - "price":"5.02000", - "amount":"1.20000000", - "tid":"245" - }, - { - "date":"1337919198", - "price":"5.03000", - "amount":"0.20600000", - "tid":"255" - }, - { - "date":"1337956185", - "price":"5.03000", - "amount":"2.09400000", - "tid":"276" - }, - { - "date":"1337956239", - "price":"5.04000", - "amount":"3.18160000", - "tid":"277" - }, - { - "date":"1337957701", - "price":"5.04000", - "amount":"6.51840000", - "tid":"278" - }, - { - "date":"1337963996", - "price":"5.04000", - "amount":"0.33660000", - "tid":"280" - }, - { - "date":"1337966202", - "price":"5.00000", - "amount":"2.63600000", - "tid":"281" - }, - { - "date":"1337979434", - "price":"4.99000", - "amount":"3.00000000", - "tid":"292" - }, - { - "date":"1337979454", - "price":"5.00000", - "amount":"0.36400000", - "tid":"293" - }, - { - "date":"1337979475", - "price":"5.02000", - "amount":"1.15500000", - "tid":"294" - }, - { - "date":"1338046484", - "price":"5.02000", - "amount":"5.22500000", - "tid":"311" - }, - { - "date":"1338054041", - "price":"5.00000", - "amount":"2.26200000", - "tid":"316" - }, - { - "date":"1338120146", - "price":"4.98000", - "amount":"1.00000000", - "tid":"333" - }, - { - "date":"1338120150", - "price":"4.97000", - "amount":"1.00000000", - "tid":"334" - }, - { - "date":"1338122143", - "price":"5.00000", - "amount":"0.73800000", - "tid":"335" - }, - { - "date":"1338122161", - "price":"5.02000", - "amount":"4.50000000", - "tid":"336" - }, - { - "date":"1338122161", - "price":"5.04000", - "amount":"0.00000000", - "tid":"337" - }, - { - "date":"1338122223", - "price":"5.04000", - "amount":"3.21340000", - "tid":"338" - }, - { - "date":"1338122223", - "price":"5.04000", - "amount":"5.44260000", - "tid":"339" - }, - { - "date":"1338198581", - "price":"5.04000", - "amount":"0.20200000", - "tid":"368" - }, - { - "date":"1338385669", - "price":"4.97000", - "amount":"0.09412003", - "tid":"511" - }, - { - "date":"1338502643", - "price":"5.05000", - "amount":"4.70000000", - "tid":"560" - }, - { - "date":"1338543632", - "price":"5.07000", - "amount":"8.00000000", - "tid":"569" - }, - { - "date":"1338543785", - "price":"5.09000", - "amount":"2.04000000", - "tid":"570" - }, - { - "date":"1338564649", - "price":"5.09000", - "amount":"7.96000000", - "tid":"580" - }, - { - "date":"1338564692", - "price":"5.11000", - "amount":"3.37900000", - "tid":"581" - }, - { - "date":"1338583920", - "price":"5.11000", - "amount":"1.12100000", - "tid":"586" - }, - { - "date":"1338583920", - "price":"5.12000", - "amount":"3.89600000", - "tid":"587" - }, - { - "date":"1338598199", - "price":"5.12000", - "amount":"0.60400000", - "tid":"589" - }, - { - "date":"1338598207", - "price":"5.14000", - "amount":"10.00000000", - "tid":"590" - }, - { - "date":"1338661866", - "price":"5.15000", - "amount":"0.82700000", - "tid":"602" - }, - { - "date":"1338763048", - "price":"5.15000", - "amount":"0.88500000", - "tid":"619" - }, - { - "date":"1338825008", - "price":"5.15000", - "amount":"5.78800000", - "tid":"637" - }, - { - "date":"1338825035", - "price":"5.18000", - "amount":"0.21200000", - "tid":"638" - }, - { - "date":"1338825410", - "price":"5.18000", - "amount":"0.87000000", - "tid":"639" - }, - { - "date":"1338828922", - "price":"5.18000", - "amount":"0.78900000", - "tid":"644" - }, - { - "date":"1338869263", - "price":"5.18000", - "amount":"2.00000000", - "tid":"671" - }, - { - "date":"1338879145", - "price":"5.18000", - "amount":"0.68900000", - "tid":"673" - }, - { - "date":"1338879166", - "price":"5.19000", - "amount":"5.00000000", - "tid":"674" - }, - { - "date":"1338879258", - "price":"5.20000", - "amount":"4.89615385", - "tid":"675" - }, - { - "date":"1338927614", - "price":"5.38000", - "amount":"1.00000000", - "tid":"710" - }, - { - "date":"1338927795", - "price":"5.38000", - "amount":"9.00000000", - "tid":"711" - }, - { - "date":"1339142085", - "price":"5.48000", - "amount":"5.50000000", - "tid":"773" - }, - { - "date":"1339397938", - "price":"5.65000", - "amount":"0.52000000", - "tid":"881" - }, - { - "date":"1339398578", - "price":"5.65000", - "amount":"1.77000000", - "tid":"882" - }, - { - "date":"1339436070", - "price":"5.56000", - "amount":"1.00000000", - "tid":"937" - }, - { - "date":"1339436261", - "price":"5.65000", - "amount":"2.71000000", - "tid":"938" - }, - { - "date":"1339448347", - "price":"5.65000", - "amount":"0.69000000", - "tid":"944" - }, - { - "date":"1339500398", - "price":"5.57000", - "amount":"1.00000000", - "tid":"957" - }, - { - "date":"1339508149", - "price":"5.58000", - "amount":"5.00000000", - "tid":"962" - }, - { - "date":"1339508150", - "price":"5.60000", - "amount":"10.00000000", - "tid":"963" - }, - { - "date":"1339508157", - "price":"5.60000", - "amount":"5.00000000", - "tid":"964" - }, - { - "date":"1339508170", - "price":"5.61000", - "amount":"3.00000000", - "tid":"965" - }, - { - "date":"1339508218", - "price":"5.68000", - "amount":"0.61090000", - "tid":"966" - }, - { - "date":"1339531681", - "price":"5.68000", - "amount":"3.00000000", - "tid":"986" - }, - { - "date":"1339579645", - "price":"5.68000", - "amount":"2.18910000", - "tid":"1004" - }, - { - "date":"1339597384", - "price":"5.90000", - "amount":"5.50000000", - "tid":"1018" - }, - { - "date":"1339597510", - "price":"5.92000", - "amount":"4.24200000", - "tid":"1019" - }, - { - "date":"1339673963", - "price":"5.91000", - "amount":"7.20000000", - "tid":"1087" - }, - { - "date":"1339674053", - "price":"5.92000", - "amount":"1.25800000", - "tid":"1088" - }, - { - "date":"1339674369", - "price":"5.92000", - "amount":"24.74200000", - "tid":"1089" - }, - { - "date":"1339732095", - "price":"5.88000", - "amount":"4.25000000", - "tid":"1131" - }, - { - "date":"1339786899", - "price":"5.88000", - "amount":"4.55000000", - "tid":"1154" - }, - { - "date":"1339786983", - "price":"5.95000", - "amount":"8.71136974", - "tid":"1155" - }, - { - "date":"1339798898", - "price":"5.95000", - "amount":"6.28863026", - "tid":"1157" - }, - { - "date":"1339799884", - "price":"5.97000", - "amount":"0.85579390", - "tid":"1158" - }, - { - "date":"1339800363", - "price":"5.97000", - "amount":"0.14150000", - "tid":"1160" - }, - { - "date":"1339956559", - "price":"5.97000", - "amount":"0.00270610", - "tid":"1217" - }, - { - "date":"1339956886", - "price":"6.62000", - "amount":"1.00000000", - "tid":"1218" - }, - { - "date":"1339959249", - "price":"6.54000", - "amount":"1.00000000", - "tid":"1221" - }, - { - "date":"1339959249", - "price":"6.53000", - "amount":"6.60000000", - "tid":"1222" - }, - { - "date":"1340048038", - "price":"6.41000", - "amount":"1.00000000", - "tid":"1254" - }, - { - "date":"1340055869", - "price":"6.90000", - "amount":"1.00000000", - "tid":"1262" - }, - { - "date":"1340086843", - "price":"6.50000", - "amount":"2.45713550", - "tid":"1273" - }, - { - "date":"1340110163", - "price":"6.59000", - "amount":"1.00000000", - "tid":"1278" - }, - { - "date":"1340115702", - "price":"6.51000", - "amount":"2.00000000", - "tid":"1282" - }, - { - "date":"1340117409", - "price":"6.56000", - "amount":"1.00000000", - "tid":"1283" - }, - { - "date":"1340118288", - "price":"6.70000", - "amount":"12.06610000", - "tid":"1285" - }, - { - "date":"1340118609", - "price":"6.56000", - "amount":"1.00000000", - "tid":"1286" - }, - { - "date":"1340122418", - "price":"6.57000", - "amount":"1.00000000", - "tid":"1290" - }, - { - "date":"1340137327", - "price":"6.59000", - "amount":"4.00000000", - "tid":"1298" - }, - { - "date":"1340139792", - "price":"6.62000", - "amount":"3.00000000", - "tid":"1300" - }, - { - "date":"1340141592", - "price":"6.64000", - "amount":"3.00000000", - "tid":"1303" - }, - { - "date":"1340144235", - "price":"6.66000", - "amount":"0.14000000", - "tid":"1305" - }, - { - "date":"1340175342", - "price":"6.66000", - "amount":"1.00050000", - "tid":"1309" - }, - { - "date":"1340227831", - "price":"6.70000", - "amount":"14.00000000", - "tid":"1332" - }, - { - "date":"1340451649", - "price":"4.97000", - "amount":"0.20121000", - "tid":"1386" - }, - { - "date":"1340456792", - "price":"6.76000", - "amount":"9.00000000", - "tid":"1399" - }, - { - "date":"1340457528", - "price":"7.00000", - "amount":"1.00000000", - "tid":"1400" - }, - { - "date":"1340457732", - "price":"7.00000", - "amount":"2.00000000", - "tid":"1401" - }, - { - "date":"1340457963", - "price":"7.00000", - "amount":"2.46000000", - "tid":"1402" - }, - { - "date":"1340458175", - "price":"7.00000", - "amount":"2.61900000", - "tid":"1403" - }, - { - "date":"1340460502", - "price":"7.00000", - "amount":"4.00000000", - "tid":"1412" - }, - { - "date":"1340463603", - "price":"7.00000", - "amount":"1.19522608", - "tid":"1418" - }, - { - "date":"1340464290", - "price":"7.00000", - "amount":"0.70000000", - "tid":"1419" - }, - { - "date":"1340467059", - "price":"7.00000", - "amount":"0.48919832", - "tid":"1425" - }, - { - "date":"1340606928", - "price":"6.76000", - "amount":"9.00000000", - "tid":"1452" - }, - { - "date":"1340606929", - "price":"7.00000", - "amount":"1.00000000", - "tid":"1453" - }, - { - "date":"1340606929", - "price":"7.00000", - "amount":"2.00000000", - "tid":"1454" - }, - { - "date":"1340606930", - "price":"7.00000", - "amount":"2.46000000", - "tid":"1455" - }, - { - "date":"1340606930", - "price":"7.00000", - "amount":"2.61900000", - "tid":"1456" - }, - { - "date":"1340606930", - "price":"7.00000", - "amount":"4.00000000", - "tid":"1457" - }, - { - "date":"1340606931", - "price":"7.00000", - "amount":"1.19522608", - "tid":"1458" - }, - { - "date":"1340606931", - "price":"7.00000", - "amount":"0.70000000", - "tid":"1459" - }, - { - "date":"1340606932", - "price":"7.00000", - "amount":"0.48919832", - "tid":"1460" - }, - { - "date":"1340829911", - "price":"6.65000", - "amount":"30.08291100", - "tid":"1611" - }, - { - "date":"1340955512", - "price":"6.65000", - "amount":"4.91708900", - "tid":"1695" - }, - { - "date":"1341350178", - "price":"6.50000", - "amount":"7.84000000", - "tid":"1907" - }, - { - "date":"1341430675", - "price":"6.50000", - "amount":"10.00000000", - "tid":"1963" - }, - { - "date":"1341430706", - "price":"6.50000", - "amount":"2.16000000", - "tid":"1964" - }, - { - "date":"1341430730", - "price":"6.51000", - "amount":"0.14000000", - "tid":"1965" - }, - { - "date":"1341461532", - "price":"6.51000", - "amount":"1.50000000", - "tid":"1976" - }, - { - "date":"1341497693", - "price":"6.51000", - "amount":"0.15053763", - "tid":"1994" - }, - { - "date":"1341511265", - "price":"6.51000", - "amount":"3.20946237", - "tid":"2006" - }, - { - "date":"1341511308", - "price":"6.54000", - "amount":"20.00000000", - "tid":"2007" - }, - { - "date":"1341954595", - "price":"7.26161", - "amount":"2.50000000", - "tid":"2215" - }, - { - "date":"1341954931", - "price":"7.26161", - "amount":"0.39192100", - "tid":"2217" - }, - { - "date":"1342090178", - "price":"7.39856", - "amount":"1.00000000", - "tid":"2288" - }, - { - "date":"1342090778", - "price":"7.64900", - "amount":"1.00000000", - "tid":"2289" - }, - { - "date":"1342135010", - "price":"6.40000", - "amount":"10.00000000", - "tid":"2314" - }, - { - "date":"1342135709", - "price":"7.10000", - "amount":"4.00000000", - "tid":"2315" - }, - { - "date":"1342136642", - "price":"7.10000", - "amount":"4.15166761", - "tid":"2320" - }, - { - "date":"1342140279", - "price":"7.10000", - "amount":"4.32858310", - "tid":"2332" - }, - { - "date":"1342143966", - "price":"7.10000", - "amount":"8.16924930", - "tid":"2335" - }, - { - "date":"1342144079", - "price":"7.38000", - "amount":"1.43608800", - "tid":"2336" - }, - { - "date":"1342156027", - "price":"7.38000", - "amount":"1.00000000", - "tid":"2343" - }, - { - "date":"1342222309", - "price":"7.38000", - "amount":"0.36341200", - "tid":"2371" - }, - { - "date":"1342349292", - "price":"9.26000", - "amount":"0.10000000", - "tid":"2414" - }, - { - "date":"1342369265", - "price":"9.67000", - "amount":"1.00000000", - "tid":"2437" - }, - { - "date":"1342387020", - "price":"9.67000", - "amount":"2.00000000", - "tid":"2449" - }, - { - "date":"1342466042", - "price":"9.67000", - "amount":"3.00000000", - "tid":"2489" - }, - { - "date":"1342478712", - "price":"7.94302", - "amount":"4.00000000", - "tid":"2506" - }, - { - "date":"1342478733", - "price":"8.00000", - "amount":"10.00000000", - "tid":"2507" - }, - { - "date":"1342478757", - "price":"8.20000", - "amount":"10.00000000", - "tid":"2508" - }, - { - "date":"1342487144", - "price":"8.30000", - "amount":"10.00000000", - "tid":"2519" - }, - { - "date":"1342487159", - "price":"8.40000", - "amount":"10.00000000", - "tid":"2520" - }, - { - "date":"1342702189", - "price":"9.25459", - "amount":"1.00000000", - "tid":"2664" - }, - { - "date":"1342764387", - "price":"9.05951", - "amount":"1.00000000", - "tid":"2748" - }, - { - "date":"1342779805", - "price":"8.52589", - "amount":"2.00000000", - "tid":"2762" - }, - { - "date":"1342990024", - "price":"8.00000", - "amount":"0.10000000", - "tid":"2864" - }, - { - "date":"1343066468", - "price":"9.02796", - "amount":"3.87684000", - "tid":"2927" - }, - { - "date":"1343130547", - "price":"8.86369", - "amount":"3.00000000", - "tid":"2942" - }, - { - "date":"1343305093", - "price":"8.63082", - "amount":"1.00000000", - "tid":"3001" - }, - { - "date":"1343369308", - "price":"8.91000", - "amount":"3.31850000", - "tid":"3028" - }, - { - "date":"1343370181", - "price":"8.95000", - "amount":"5.00000000", - "tid":"3029" - }, - { - "date":"1343370318", - "price":"9.06455", - "amount":"20.60000000", - "tid":"3030" - }, - { - "date":"1343386563", - "price":"8.86084", - "amount":"1.79500000", - "tid":"3037" - }, - { - "date":"1343502816", - "price":"8.84500", - "amount":"0.30000000", - "tid":"3054" - }, - { - "date":"1343502911", - "price":"8.84500", - "amount":"0.20000000", - "tid":"3055" - }, - { - "date":"1343639722", - "price":"8.84500", - "amount":"1.42700000", - "tid":"3116" - }, - { - "date":"1343839144", - "price":"9.30324", - "amount":"11.06950000", - "tid":"3307" - }, - { - "date":"1343921085", - "price":"9.77575", - "amount":"0.10000000", - "tid":"3398" - }, - { - "date":"1343942148", - "price":"10.22000", - "amount":"3.00000000", - "tid":"3441" - }, - { - "date":"1343978834", - "price":"12.00300", - "amount":"0.10000000", - "tid":"3469" - }, - { - "date":"1343980400", - "price":"9.97350", - "amount":"1.00000000", - "tid":"3475" - }, - { - "date":"1343995604", - "price":"12.50000", - "amount":"3.00000000", - "tid":"3488" - }, - { - "date":"1343997082", - "price":"10.63186", - "amount":"2.00000000", - "tid":"3489" - }, - { - "date":"1343997267", - "price":"14.50000", - "amount":"0.40000000", - "tid":"3491" - }, - { - "date":"1343999409", - "price":"10.67287", - "amount":"2.00000000", - "tid":"3492" - }, - { - "date":"1343999828", - "price":"10.63186", - "amount":"6.00000000", - "tid":"3493" - }, - { - "date":"1344001833", - "price":"10.70257", - "amount":"0.54192500", - "tid":"3498" - }, - { - "date":"1344008523", - "price":"10.32735", - "amount":"0.10000000", - "tid":"3505" - }, - { - "date":"1344108848", - "price":"11.50000", - "amount":"17.28693000", - "tid":"3569" - }, - { - "date":"1344141542", - "price":"10.74000", - "amount":"15.00000000", - "tid":"3579" - }, - { - "date":"1344141567", - "price":"7.64000", - "amount":"0.99950000", - "tid":"3580" - }, - { - "date":"1344230091", - "price":"10.97287", - "amount":"1.88000000", - "tid":"3612" - }, - { - "date":"1344403327", - "price":"11.43708", - "amount":"4.00000000", - "tid":"3748" - }, - { - "date":"1344404804", - "price":"11.51340", - "amount":"3.00000000", - "tid":"3750" - }, - { - "date":"1344406011", - "price":"11.60000", - "amount":"3.00000000", - "tid":"3751" - }, - { - "date":"1344408018", - "price":"11.62751", - "amount":"2.00000000", - "tid":"3754" - }, - { - "date":"1344409615", - "price":"11.75000", - "amount":"1.80000000", - "tid":"3755" - }, - { - "date":"1344526104", - "price":"11.47116", - "amount":"3.00000000", - "tid":"3849" - }, - { - "date":"1344530299", - "price":"11.14160", - "amount":"4.00000000", - "tid":"3868" - }, - { - "date":"1344531442", - "price":"11.14160", - "amount":"0.40000000", - "tid":"3871" - }, - { - "date":"1344601242", - "price":"11.25000", - "amount":"24.23900000", - "tid":"3918" - }, - { - "date":"1344613700", - "price":"11.04802", - "amount":"30.00000000", - "tid":"3919" - }, - { - "date":"1344613706", - "price":"11.00000", - "amount":"15.33965273", - "tid":"3920" - }, - { - "date":"1344622194", - "price":"11.35472", - "amount":"3.00000000", - "tid":"3923" - }, - { - "date":"1344673730", - "price":"11.95000", - "amount":"3.82624600", - "tid":"3954" - }, - { - "date":"1344674305", - "price":"11.95000", - "amount":"1.99000000", - "tid":"3955" - }, - { - "date":"1344675743", - "price":"11.95000", - "amount":"3.88375400", - "tid":"3956" - }, - { - "date":"1344675864", - "price":"11.90000", - "amount":"10.00000000", - "tid":"3957" - }, - { - "date":"1344682258", - "price":"11.85000", - "amount":"5.00000000", - "tid":"3971" - }, - { - "date":"1344682670", - "price":"11.85000", - "amount":"5.00000000", - "tid":"3973" - }, - { - "date":"1344682775", - "price":"11.80000", - "amount":"6.26690746", - "tid":"3974" - }, - { - "date":"1344692133", - "price":"11.80000", - "amount":"3.73309254", - "tid":"3983" - }, - { - "date":"1344696071", - "price":"11.75000", - "amount":"10.00000000", - "tid":"3984" - }, - { - "date":"1344697332", - "price":"11.73000", - "amount":"0.51200746", - "tid":"3985" - }, - { - "date":"1344700621", - "price":"11.73000", - "amount":"1.24799254", - "tid":"3989" - }, - { - "date":"1344701722", - "price":"11.73000", - "amount":"1.10200746", - "tid":"3990" - }, - { - "date":"1344705854", - "price":"11.70000", - "amount":"1.00000000", - "tid":"3991" - }, - { - "date":"1344706786", - "price":"11.70000", - "amount":"9.00000000", - "tid":"3993" - }, - { - "date":"1344709907", - "price":"11.65000", - "amount":"1.00000000", - "tid":"3994" - }, - { - "date":"1344713104", - "price":"11.80000", - "amount":"0.46146016", - "tid":"3995" - }, - { - "date":"1344774539", - "price":"11.61000", - "amount":"3.00000000", - "tid":"4023" - }, - { - "date":"1344927712", - "price":"12.00000", - "amount":"1.10200746", - "tid":"4171" - }, - { - "date":"1344928391", - "price":"12.50000", - "amount":"3.83000000", - "tid":"4174" - }, - { - "date":"1344970785", - "price":"12.50000", - "amount":"16.17000000", - "tid":"4214" - }, - { - "date":"1344970833", - "price":"12.50000", - "amount":"1.00000000", - "tid":"4215" - }, - { - "date":"1344970914", - "price":"12.50000", - "amount":"6.00000000", - "tid":"4216" - }, - { - "date":"1344988566", - "price":"12.50000", - "amount":"0.35000000", - "tid":"4224" - }, - { - "date":"1345061955", - "price":"13.00000", - "amount":"10.00000000", - "tid":"4277" - }, - { - "date":"1345061955", - "price":"13.20000", - "amount":"2.60300000", - "tid":"4278" - }, - { - "date":"1345076724", - "price":"13.17301", - "amount":"3.00000000", - "tid":"4301" - }, - { - "date":"1345143625", - "price":"14.00000", - "amount":"8.00000000", - "tid":"4415" - }, - { - "date":"1345143854", - "price":"14.00000", - "amount":"2.80000000", - "tid":"4416" - }, - { - "date":"1345177429", - "price":"14.00000", - "amount":"1.13000000", - "tid":"4442" - }, - { - "date":"1345186187", - "price":"14.00000", - "amount":"8.07000000", - "tid":"4449" - }, - { - "date":"1345186187", - "price":"14.00000", - "amount":"20.00000000", - "tid":"4450" - }, - { - "date":"1345190937", - "price":"15.20996", - "amount":"0.50000000", - "tid":"4472" - }, - { - "date":"1345190966", - "price":"15.21000", - "amount":"2.00000000", - "tid":"4473" - }, - { - "date":"1345191023", - "price":"15.50000", - "amount":"4.69000000", - "tid":"4474" - }, - { - "date":"1345191151", - "price":"15.50000", - "amount":"3.00000000", - "tid":"4477" - }, - { - "date":"1345191393", - "price":"15.50000", - "amount":"4.03800000", - "tid":"4480" - }, - { - "date":"1345197607", - "price":"15.50000", - "amount":"7.43000000", - "tid":"4493" - }, - { - "date":"1345202219", - "price":"15.49990", - "amount":"4.70000000", - "tid":"4518" - }, - { - "date":"1345203148", - "price":"15.49990", - "amount":"5.30000000", - "tid":"4526" - }, - { - "date":"1345203310", - "price":"15.50000", - "amount":"0.84200000", - "tid":"4527" - }, - { - "date":"1345209493", - "price":"15.58927", - "amount":"1.00000000", - "tid":"4545" - }, - { - "date":"1345211892", - "price":"15.63000", - "amount":"2.57600000", - "tid":"4547" - }, - { - "date":"1345231867", - "price":"14.68648", - "amount":"7.99900000", - "tid":"4581" - }, - { - "date":"1345233101", - "price":"14.68648", - "amount":"0.00100000", - "tid":"4590" - }, - { - "date":"1345233164", - "price":"13.20000", - "amount":"0.25000000", - "tid":"4591" - }, - { - "date":"1345234040", - "price":"12.00000", - "amount":"2.00000000", - "tid":"4592" - }, - { - "date":"1345276401", - "price":"13.20000", - "amount":"10.00000000", - "tid":"4627" - }, - { - "date":"1345291281", - "price":"12.00000", - "amount":"9.00000000", - "tid":"4633" - }, - { - "date":"1345354066", - "price":"10.80000", - "amount":"6.72400000", - "tid":"4682" - }, - { - "date":"1345354147", - "price":"10.80000", - "amount":"1.00000000", - "tid":"4683" - }, - { - "date":"1345354189", - "price":"10.80000", - "amount":"1.00000000", - "tid":"4684" - }, - { - "date":"1345378705", - "price":"10.00000", - "amount":"3.00000000", - "tid":"4713" - }, - { - "date":"1345389886", - "price":"10.00000", - "amount":"3.00000000", - "tid":"4734" - }, - { - "date":"1345389987", - "price":"9.65000", - "amount":"24.78550000", - "tid":"4735" - }, - { - "date":"1345464688", - "price":"11.33323", - "amount":"3.00000000", - "tid":"4814" - }, - { - "date":"1345466585", - "price":"10.91540", - "amount":"3.00000000", - "tid":"4817" - }, - { - "date":"1345466824", - "price":"10.50030", - "amount":"2.00000000", - "tid":"4819" - }, - { - "date":"1345469021", - "price":"10.16572", - "amount":"1.00000000", - "tid":"4824" - }, - { - "date":"1345469396", - "price":"10.16572", - "amount":"4.00000000", - "tid":"4825" - }, - { - "date":"1345469994", - "price":"10.58022", - "amount":"3.00000000", - "tid":"4826" - }, - { - "date":"1345472038", - "price":"9.85639", - "amount":"0.31000000", - "tid":"4830" - }, - { - "date":"1345472677", - "price":"10.23498", - "amount":"3.00000000", - "tid":"4831" - }, - { - "date":"1345472973", - "price":"10.07793", - "amount":"3.00000000", - "tid":"4832" - }, - { - "date":"1345475653", - "price":"9.94965", - "amount":"1.00000000", - "tid":"4833" - }, - { - "date":"1345477095", - "price":"9.85610", - "amount":"2.00000000", - "tid":"4836" - }, - { - "date":"1345491149", - "price":"10.65000", - "amount":"6.29577460", - "tid":"4856" - }, - { - "date":"1345493579", - "price":"10.00500", - "amount":"1.00000000", - "tid":"4857" - }, - { - "date":"1345542908", - "price":"10.46308", - "amount":"4.00000000", - "tid":"4896" - }, - { - "date":"1345544162", - "price":"10.50248", - "amount":"3.00000000", - "tid":"4898" - }, - { - "date":"1345549047", - "price":"10.51217", - "amount":"4.00000000", - "tid":"4909" - }, - { - "date":"1345558723", - "price":"10.12044", - "amount":"13.69800000", - "tid":"4923" - }, - { - "date":"1345563007", - "price":"10.10645", - "amount":"0.21000000", - "tid":"4927" - }, - { - "date":"1345566722", - "price":"10.56893", - "amount":"5.25000000", - "tid":"4928" - }, - { - "date":"1345569341", - "price":"10.18016", - "amount":"16.00000000", - "tid":"4930" - }, - { - "date":"1345639133", - "price":"10.00000", - "amount":"3.00000000", - "tid":"4982" - }, - { - "date":"1345644445", - "price":"10.15329", - "amount":"1.00000000", - "tid":"4987" - }, - { - "date":"1345644446", - "price":"10.50000", - "amount":"29.00000000", - "tid":"4988" - }, - { - "date":"1345646786", - "price":"10.14514", - "amount":"1.00000000", - "tid":"4991" - }, - { - "date":"1345648047", - "price":"10.15000", - "amount":"1.00000000", - "tid":"4992" - }, - { - "date":"1345652880", - "price":"10.17952", - "amount":"1.00000000", - "tid":"4997" - }, - { - "date":"1345658783", - "price":"10.20323", - "amount":"3.00000000", - "tid":"5005" - }, - { - "date":"1345714100", - "price":"10.15000", - "amount":"8.00000000", - "tid":"5015" - }, - { - "date":"1345717504", - "price":"10.27843", - "amount":"6.00000000", - "tid":"5018" - }, - { - "date":"1345726011", - "price":"10.00000", - "amount":"10.00000000", - "tid":"5025" - }, - { - "date":"1345746895", - "price":"10.32060", - "amount":"1.00000000", - "tid":"5362" - }, - { - "date":"1345746966", - "price":"10.50000", - "amount":"1.00000000", - "tid":"5363" - }, - { - "date":"1345746968", - "price":"10.50000", - "amount":"45.33000000", - "tid":"5364" - }, - { - "date":"1345815715", - "price":"10.38814", - "amount":"9.50000000", - "tid":"5411" - }, - { - "date":"1345815990", - "price":"10.38814", - "amount":"2.50000000", - "tid":"5412" - }, - { - "date":"1345815990", - "price":"10.41297", - "amount":"1.35849201", - "tid":"5413" - }, - { - "date":"1345815990", - "price":"10.75000", - "amount":"19.14150799", - "tid":"5414" - }, - { - "date":"1345825539", - "price":"10.57939", - "amount":"2.00000000", - "tid":"5416" - }, - { - "date":"1345825539", - "price":"10.74999", - "amount":"3.00000000", - "tid":"5417" - }, - { - "date":"1345825539", - "price":"10.75000", - "amount":"18.50000000", - "tid":"5418" - }, - { - "date":"1345838733", - "price":"11.43050", - "amount":"7.00000000", - "tid":"5432" - }, - { - "date":"1345839501", - "price":"11.43050", - "amount":"0.80000000", - "tid":"5433" - }, - { - "date":"1345846770", - "price":"11.43050", - "amount":"0.60000000", - "tid":"5436" - }, - { - "date":"1345895830", - "price":"11.42999", - "amount":"5.00000000", - "tid":"5445" - }, - { - "date":"1345895853", - "price":"11.43000", - "amount":"1.03000000", - "tid":"5446" - }, - { - "date":"1345971120", - "price":"11.23117", - "amount":"6.00000000", - "tid":"5455" - }, - { - "date":"1345971202", - "price":"11.42998", - "amount":"4.50000000", - "tid":"5456" - }, - { - "date":"1346004787", - "price":"10.35230", - "amount":"0.09000000", - "tid":"5476" - }, - { - "date":"1346025765", - "price":"11.42799", - "amount":"5.00000000", - "tid":"5487" - }, - { - "date":"1346025809", - "price":"11.42998", - "amount":"0.50000000", - "tid":"5488" - }, - { - "date":"1346025852", - "price":"11.42999", - "amount":"0.50000000", - "tid":"5489" - }, - { - "date":"1346025861", - "price":"11.42999", - "amount":"1.00000000", - "tid":"5490" - }, - { - "date":"1346025871", - "price":"11.42999", - "amount":"0.90000000", - "tid":"5491" - }, - { - "date":"1346065394", - "price":"11.66628", - "amount":"36.00000000", - "tid":"5528" - }, - { - "date":"1346070556", - "price":"11.66628", - "amount":"15.07696900", - "tid":"5533" - }, - { - "date":"1346076118", - "price":"11.66628", - "amount":"1.10000000", - "tid":"5537" - }, - { - "date":"1346078664", - "price":"11.66628", - "amount":"15.00000000", - "tid":"5543" - }, - { - "date":"1346079140", - "price":"11.66628", - "amount":"1.99000000", - "tid":"5544" - }, - { - "date":"1346079871", - "price":"11.66628", - "amount":"5.54400000", - "tid":"5545" - }, - { - "date":"1346098360", - "price":"10.98001", - "amount":"0.30000000", - "tid":"5564" - }, - { - "date":"1346098498", - "price":"9.97001", - "amount":"1.00000000", - "tid":"5565" - }, - { - "date":"1346106944", - "price":"11.06230", - "amount":"4.00000000", - "tid":"5574" - }, - { - "date":"1346106944", - "price":"11.65000", - "amount":"1.15000000", - "tid":"5575" - }, - { - "date":"1346110815", - "price":"11.13542", - "amount":"4.00000000", - "tid":"5576" - }, - { - "date":"1346137185", - "price":"11.39639", - "amount":"2.00000000", - "tid":"5579" - }, - { - "date":"1346137185", - "price":"11.65000", - "amount":"2.29200000", - "tid":"5580" - }, - { - "date":"1346158832", - "price":"10.90190", - "amount":"10.00000000", - "tid":"5602" - }, - { - "date":"1346256555", - "price":"10.50000", - "amount":"12.38095000", - "tid":"5657" - }, - { - "date":"1346275489", - "price":"9.60010", - "amount":"1.00000000", - "tid":"5680" - }, - { - "date":"1346375812", - "price":"10.50000", - "amount":"2.14277770", - "tid":"5743" - }, - { - "date":"1346375812", - "price":"10.85343", - "amount":"9.00000000", - "tid":"5744" - }, - { - "date":"1346375813", - "price":"10.89999", - "amount":"57.55722230", - "tid":"5745" - }, - { - "date":"1346404127", - "price":"10.62686", - "amount":"9.00000000", - "tid":"5755" - }, - { - "date":"1346440524", - "price":"10.60000", - "amount":"0.90560000", - "tid":"5809" - }, - { - "date":"1346442655", - "price":"10.70000", - "amount":"4.50000000", - "tid":"5813" - }, - { - "date":"1346464653", - "price":"10.26225", - "amount":"2.00000000", - "tid":"5834" - }, - { - "date":"1346491259", - "price":"10.13804", - "amount":"0.94686500", - "tid":"5840" - }, - { - "date":"1346507795", - "price":"10.14984", - "amount":"3.00000000", - "tid":"5854" - }, - { - "date":"1346507795", - "price":"10.60000", - "amount":"1.60000000", - "tid":"5855" - }, - { - "date":"1346507795", - "price":"10.60000", - "amount":"18.90000000", - "tid":"5856" - }, - { - "date":"1346513022", - "price":"10.60000", - "amount":"70.75000000", - "tid":"5871" - }, - { - "date":"1346578462", - "price":"10.20000", - "amount":"9.41000000", - "tid":"5915" - }, - { - "date":"1346605517", - "price":"10.25559", - "amount":"1.00000000", - "tid":"5928" - }, - { - "date":"1346612060", - "price":"10.34349", - "amount":"6.60000000", - "tid":"5935" - }, - { - "date":"1346628982", - "price":"10.45000", - "amount":"2.00000000", - "tid":"5950" - }, - { - "date":"1346654503", - "price":"10.45000", - "amount":"13.00000000", - "tid":"5952" - }, - { - "date":"1346698109", - "price":"10.45000", - "amount":"2.00000000", - "tid":"5983" - }, - { - "date":"1346698227", - "price":"10.45000", - "amount":"2.00000000", - "tid":"5984" - }, - { - "date":"1346715311", - "price":"10.28441", - "amount":"7.00000000", - "tid":"5995" - }, - { - "date":"1346715349", - "price":"9.61000", - "amount":"0.50000000", - "tid":"5996" - }, - { - "date":"1346737529", - "price":"10.45000", - "amount":"1.00000000", - "tid":"6002" - }, - { - "date":"1346737530", - "price":"10.46631", - "amount":"1.81879800", - "tid":"6003" - }, - { - "date":"1346737616", - "price":"10.46631", - "amount":"0.99843990", - "tid":"6004" - }, - { - "date":"1346738036", - "price":"10.46631", - "amount":"0.18276210", - "tid":"6005" - }, - { - "date":"1346738036", - "price":"10.47000", - "amount":"3.63385790", - "tid":"6006" - }, - { - "date":"1346739744", - "price":"10.47000", - "amount":"3.81661900", - "tid":"6008" - }, - { - "date":"1346742833", - "price":"10.47000", - "amount":"3.81661800", - "tid":"6011" - }, - { - "date":"1346761278", - "price":"10.47000", - "amount":"0.29290510", - "tid":"6035" - }, - { - "date":"1346761278", - "price":"10.47000", - "amount":"29.70709490", - "tid":"6036" - }, - { - "date":"1346818937", - "price":"10.50611", - "amount":"3.00000000", - "tid":"6104" - }, - { - "date":"1346837981", - "price":"10.75300", - "amount":"126.45000000", - "tid":"6116" - }, - { - "date":"1346844575", - "price":"10.57337", - "amount":"2.00000000", - "tid":"6124" - }, - { - "date":"1346846237", - "price":"10.57337", - "amount":"0.12693548", - "tid":"6129" - }, - { - "date":"1346849614", - "price":"10.75299", - "amount":"2.00000000", - "tid":"6131" - }, - { - "date":"1346850052", - "price":"10.75300", - "amount":"5.00000000", - "tid":"6133" - }, - { - "date":"1346854218", - "price":"10.64161", - "amount":"7.00000000", - "tid":"6138" - }, - { - "date":"1346867279", - "price":"10.75300", - "amount":"0.50578722", - "tid":"6155" - }, - { - "date":"1346884507", - "price":"10.75300", - "amount":"4.78936100", - "tid":"6182" - }, - { - "date":"1346885292", - "price":"10.75300", - "amount":"65.69543100", - "tid":"6183" - }, - { - "date":"1346886470", - "price":"10.75300", - "amount":"0.00000078", - "tid":"6184" - }, - { - "date":"1346935136", - "price":"11.06007", - "amount":"4.51715000", - "tid":"6225" - }, - { - "date":"1346951999", - "price":"10.86883", - "amount":"13.00000000", - "tid":"6254" - }, - { - "date":"1347008086", - "price":"11.05768", - "amount":"4.00000000", - "tid":"6297" - }, - { - "date":"1347008571", - "price":"15.00000", - "amount":"18.00000000", - "tid":"6298" - }, - { - "date":"1347008597", - "price":"15.00000", - "amount":"20.69360000", - "tid":"6299" - }, - { - "date":"1347008872", - "price":"17.00000", - "amount":"2.00000000", - "tid":"6301" - }, - { - "date":"1347009095", - "price":"17.00000", - "amount":"9.00000000", - "tid":"6303" - }, - { - "date":"1347009461", - "price":"11.00587", - "amount":"0.09100000", - "tid":"6305" - }, - { - "date":"1347035833", - "price":"11.27063", - "amount":"1.05500000", - "tid":"6333" - }, - { - "date":"1347043324", - "price":"11.28841", - "amount":"6.00000000", - "tid":"6340" - }, - { - "date":"1347043324", - "price":"11.76999", - "amount":"5.00000000", - "tid":"6341" - }, - { - "date":"1347043324", - "price":"11.77000", - "amount":"18.00000000", - "tid":"6342" - }, - { - "date":"1347051304", - "price":"11.44847", - "amount":"3.00000000", - "tid":"6351" - }, - { - "date":"1347051352", - "price":"11.77000", - "amount":"21.00000000", - "tid":"6352" - }, - { - "date":"1347057401", - "price":"11.77000", - "amount":"1.00000000", - "tid":"6363" - }, - { - "date":"1347057471", - "price":"11.77000", - "amount":"10.00000000", - "tid":"6364" - }, - { - "date":"1347061607", - "price":"11.48715", - "amount":"5.00000000", - "tid":"6369" - }, - { - "date":"1347061607", - "price":"11.77000", - "amount":"79.88000000", - "tid":"6370" - }, - { - "date":"1347068995", - "price":"11.53696", - "amount":"1.00000000", - "tid":"6371" - }, - { - "date":"1347081587", - "price":"11.58332", - "amount":"12.00000000", - "tid":"6373" - }, - { - "date":"1347083067", - "price":"11.77000", - "amount":"29.70000000", - "tid":"6374" - }, - { - "date":"1347086734", - "price":"11.58332", - "amount":"20.00000000", - "tid":"6375" - }, - { - "date":"1347088486", - "price":"11.58332", - "amount":"20.00000000", - "tid":"6376" - }, - { - "date":"1347093429", - "price":"11.76500", - "amount":"4.00000000", - "tid":"6378" - }, - { - "date":"1347095937", - "price":"11.76500", - "amount":"4.00000000", - "tid":"6379" - }, - { - "date":"1347099732", - "price":"11.58332", - "amount":"34.00000000", - "tid":"6382" - }, - { - "date":"1347106151", - "price":"11.76499", - "amount":"3.40000000", - "tid":"6392" - }, - { - "date":"1347120248", - "price":"11.00000", - "amount":"4.00000000", - "tid":"6409" - }, - { - "date":"1347121143", - "price":"11.00000", - "amount":"3.00000000", - "tid":"6410" - }, - { - "date":"1347122037", - "price":"11.00000", - "amount":"11.00000000", - "tid":"6411" - }, - { - "date":"1347122944", - "price":"11.00000", - "amount":"8.00000000", - "tid":"6412" - }, - { - "date":"1347124745", - "price":"11.00000", - "amount":"7.00000000", - "tid":"6413" - }, - { - "date":"1347126958", - "price":"11.02028", - "amount":"5.00000000", - "tid":"6414" - }, - { - "date":"1347133253", - "price":"11.23012", - "amount":"6.00000000", - "tid":"6417" - }, - { - "date":"1347135813", - "price":"11.23012", - "amount":"128.00000000", - "tid":"6421" - }, - { - "date":"1347151254", - "price":"11.36217", - "amount":"0.70000000", - "tid":"6430" - }, - { - "date":"1347167535", - "price":"11.36327", - "amount":"3.00000000", - "tid":"6431" - }, - { - "date":"1347167898", - "price":"11.76497", - "amount":"15.00000000", - "tid":"6432" - }, - { - "date":"1347167939", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6433" - }, - { - "date":"1347168839", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6435" - }, - { - "date":"1347169092", - "price":"11.76498", - "amount":"0.28300000", - "tid":"6436" - }, - { - "date":"1347169092", - "price":"11.76498", - "amount":"3.96350200", - "tid":"6437" - }, - { - "date":"1347169740", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6438" - }, - { - "date":"1347170640", - "price":"11.76497", - "amount":"3.00000000", - "tid":"6439" - }, - { - "date":"1347171539", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6440" - }, - { - "date":"1347172440", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6441" - }, - { - "date":"1347173342", - "price":"11.76497", - "amount":"1.00000000", - "tid":"6442" - }, - { - "date":"1347173519", - "price":"11.76498", - "amount":"1.69826100", - "tid":"6443" - }, - { - "date":"1347174240", - "price":"11.76497", - "amount":"1.00000000", - "tid":"6444" - }, - { - "date":"1347175141", - "price":"11.76497", - "amount":"1.00000000", - "tid":"6445" - }, - { - "date":"1347175189", - "price":"11.76498", - "amount":"1.69826000", - "tid":"6446" - }, - { - "date":"1347176040", - "price":"11.76497", - "amount":"1.00000000", - "tid":"6447" - }, - { - "date":"1347176945", - "price":"11.76497", - "amount":"1.00000000", - "tid":"6450" - }, - { - "date":"1347178741", - "price":"11.76497", - "amount":"3.00000000", - "tid":"6451" - }, - { - "date":"1347179641", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6452" - }, - { - "date":"1347180541", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6453" - }, - { - "date":"1347180767", - "price":"11.76497", - "amount":"11.60000000", - "tid":"6454" - }, - { - "date":"1347181443", - "price":"11.76497", - "amount":"2.00000000", - "tid":"6455" - }, - { - "date":"1347181713", - "price":"11.76498", - "amount":"1.69826000", - "tid":"6456" - }, - { - "date":"1347182343", - "price":"11.76497", - "amount":"1.00000000", - "tid":"6458" - }, - { - "date":"1347183243", - "price":"11.76497", - "amount":"1.00000000", - "tid":"6459" - }, - { - "date":"1347183872", - "price":"11.76497", - "amount":"20.40000000", - "tid":"6463" - }, - { - "date":"1347194948", - "price":"11.36327", - "amount":"2.00000000", - "tid":"6469" - }, - { - "date":"1347198119", - "price":"11.36886", - "amount":"2.00000000", - "tid":"6472" - }, - { - "date":"1347198772", - "price":"11.37003", - "amount":"0.20000000", - "tid":"6474" - }, - { - "date":"1347205891", - "price":"11.38649", - "amount":"0.51132960", - "tid":"6481" - }, - { - "date":"1347206097", - "price":"11.36327", - "amount":"77.00000000", - "tid":"6482" - }, - { - "date":"1347206115", - "price":"11.38649", - "amount":"4.48867040", - "tid":"6483" - }, - { - "date":"1347207147", - "price":"11.40213", - "amount":"1.00000000", - "tid":"6484" - }, - { - "date":"1347211542", - "price":"11.40531", - "amount":"4.00000000", - "tid":"6487" - }, - { - "date":"1347216096", - "price":"11.39936", - "amount":"3.00000000", - "tid":"6492" - }, - { - "date":"1347216739", - "price":"11.39936", - "amount":"26.00000000", - "tid":"6493" - }, - { - "date":"1347226633", - "price":"11.76498", - "amount":"12.00000000", - "tid":"6505" - }, - { - "date":"1347261751", - "price":"10.92092", - "amount":"20.00000000", - "tid":"6513" - }, - { - "date":"1347261752", - "price":"10.97000", - "amount":"65.00000000", - "tid":"6514" - }, - { - "date":"1347261752", - "price":"11.01999", - "amount":"38.54918107", - "tid":"6515" - }, - { - "date":"1347261752", - "price":"11.26498", - "amount":"3.00000000", - "tid":"6516" - }, - { - "date":"1347266639", - "price":"10.88020", - "amount":"4.98932251", - "tid":"6520" - }, - { - "date":"1347292640", - "price":"11.24734", - "amount":"0.44400000", - "tid":"6546" - }, - { - "date":"1347300975", - "price":"11.02811", - "amount":"8.00000000", - "tid":"6550" - }, - { - "date":"1347306397", - "price":"11.30354", - "amount":"7.00000000", - "tid":"6551" - }, - { - "date":"1347313000", - "price":"11.28281", - "amount":"3.27000000", - "tid":"6554" - }, - { - "date":"1347320022", - "price":"11.23811", - "amount":"0.45160000", - "tid":"6559" - }, - { - "date":"1347322597", - "price":"11.50000", - "amount":"0.09000000", - "tid":"6574" - }, - { - "date":"1347348165", - "price":"11.24628", - "amount":"0.48000000", - "tid":"6598" - }, - { - "date":"1347351820", - "price":"11.16586", - "amount":"1.78938000", - "tid":"6599" - }, - { - "date":"1347364810", - "price":"11.09299", - "amount":"20.00000000", - "tid":"6610" - }, - { - "date":"1347366676", - "price":"11.15973", - "amount":"1.27000000", - "tid":"6611" - }, - { - "date":"1347375575", - "price":"11.49990", - "amount":"2.00000000", - "tid":"6623" - }, - { - "date":"1347375727", - "price":"11.50000", - "amount":"24.91000000", - "tid":"6624" - }, - { - "date":"1347375826", - "price":"11.67600", - "amount":"28.82000000", - "tid":"6625" - }, - { - "date":"1347430325", - "price":"11.12494", - "amount":"1.88585000", - "tid":"6657" - }, - { - "date":"1347486252", - "price":"11.89999", - "amount":"1.00000000", - "tid":"6763" - }, - { - "date":"1347486331", - "price":"11.90000", - "amount":"1.00000000", - "tid":"6764" - }, - { - "date":"1347516318", - "price":"11.32454", - "amount":"1.76430000", - "tid":"6770" - }, - { - "date":"1347518375", - "price":"11.33094", - "amount":"6.00000000", - "tid":"6774" - }, - { - "date":"1347520789", - "price":"11.33094", - "amount":"3.34000000", - "tid":"6775" - }, - { - "date":"1347521022", - "price":"11.33870", - "amount":"1.76210000", - "tid":"6776" - }, - { - "date":"1347562732", - "price":"11.46697", - "amount":"0.44000000", - "tid":"6846" - }, - { - "date":"1347569380", - "price":"11.24230", - "amount":"0.11367000", - "tid":"6854" - }, - { - "date":"1347583044", - "price":"11.50301", - "amount":"1.73693000", - "tid":"6860" - }, - { - "date":"1347584968", - "price":"11.52026", - "amount":"1.73430000", - "tid":"6861" - }, - { - "date":"1347637653", - "price":"11.69603", - "amount":"3.00000000", - "tid":"6914" - }, - { - "date":"1347637760", - "price":"11.89990", - "amount":"0.10000000", - "tid":"6915" - }, - { - "date":"1347639379", - "price":"11.90000", - "amount":"0.27000000", - "tid":"6916" - }, - { - "date":"1347639576", - "price":"12.00000", - "amount":"2.00000000", - "tid":"6917" - }, - { - "date":"1347640479", - "price":"12.00000", - "amount":"2.00000000", - "tid":"6921" - }, - { - "date":"1347641377", - "price":"12.00000", - "amount":"3.00000000", - "tid":"6924" - }, - { - "date":"1347642275", - "price":"12.00000", - "amount":"2.00000000", - "tid":"6927" - }, - { - "date":"1347642306", - "price":"12.00000", - "amount":"5.00000000", - "tid":"6928" - }, - { - "date":"1347642336", - "price":"12.00000", - "amount":"17.73000000", - "tid":"6929" - }, - { - "date":"1347642336", - "price":"12.00000", - "amount":"2.27000000", - "tid":"6930" - }, - { - "date":"1347642369", - "price":"12.00000", - "amount":"0.73000000", - "tid":"6931" - }, - { - "date":"1347660269", - "price":"12.00000", - "amount":"2.00000000", - "tid":"6960" - }, - { - "date":"1347661175", - "price":"12.00000", - "amount":"1.00000000", - "tid":"6961" - }, - { - "date":"1347662083", - "price":"12.00000", - "amount":"1.00000000", - "tid":"6962" - }, - { - "date":"1347662975", - "price":"12.00000", - "amount":"1.00000000", - "tid":"6963" - }, - { - "date":"1347663882", - "price":"12.00000", - "amount":"1.00000000", - "tid":"6965" - }, - { - "date":"1347665304", - "price":"12.00000", - "amount":"0.99900000", - "tid":"6969" - }, - { - "date":"1347665680", - "price":"12.00000", - "amount":"1.00000000", - "tid":"6970" - }, - { - "date":"1347670175", - "price":"12.00000", - "amount":"2.00100000", - "tid":"6978" - }, - { - "date":"1347670175", - "price":"12.00000", - "amount":"0.30000000", - "tid":"6979" - }, - { - "date":"1347770273", - "price":"11.91042", - "amount":"2.00000000", - "tid":"7018" - }, - { - "date":"1347834594", - "price":"13.00000", - "amount":"0.70000000", - "tid":"7086" - }, - { - "date":"1347895042", - "price":"11.80000", - "amount":"0.09100000", - "tid":"7145" - }, - { - "date":"1348019176", - "price":"12.63772", - "amount":"7.00000000", - "tid":"7352" - }, - { - "date":"1348019586", - "price":"12.68617", - "amount":"4.00000000", - "tid":"7353" - }, - { - "date":"1348021062", - "price":"12.72333", - "amount":"3.90000000", - "tid":"7354" - }, - { - "date":"1348047954", - "price":"12.63772", - "amount":"0.90000000", - "tid":"7386" - }, - { - "date":"1348143318", - "price":"13.10000", - "amount":"3.00000000", - "tid":"7550" - }, - { - "date":"1348143397", - "price":"13.15123", - "amount":"4.20000000", - "tid":"7551" - }, - { - "date":"1348171135", - "price":"13.07201", - "amount":"0.90000000", - "tid":"7593" - }, - { - "date":"1348190032", - "price":"12.85273", - "amount":"3.00000000", - "tid":"7642" - }, - { - "date":"1348190071", - "price":"13.08400", - "amount":"0.10000000", - "tid":"7643" - }, - { - "date":"1348191515", - "price":"12.87482", - "amount":"0.80000000", - "tid":"7644" - }, - { - "date":"1348205110", - "price":"13.08400", - "amount":"3.81916800", - "tid":"7650" - }, - { - "date":"1348219245", - "price":"13.08400", - "amount":"20.60000000", - "tid":"7665" - }, - { - "date":"1348226417", - "price":"12.94000", - "amount":"0.10000000", - "tid":"7670" - }, - { - "date":"1348227131", - "price":"12.94515", - "amount":"1.82900000", - "tid":"7673" - }, - { - "date":"1348227304", - "price":"12.41000", - "amount":"8.00000000", - "tid":"7674" - }, - { - "date":"1348227340", - "price":"12.41000", - "amount":"0.61810000", - "tid":"7675" - }, - { - "date":"1348227522", - "price":"12.41000", - "amount":"10.00000000", - "tid":"7677" - }, - { - "date":"1348247898", - "price":"12.41000", - "amount":"9.99950000", - "tid":"7732" - }, - { - "date":"1348249555", - "price":"12.41000", - "amount":"6.38240000", - "tid":"7742" - }, - { - "date":"1348257483", - "price":"12.37198", - "amount":"0.62000000", - "tid":"7763" - }, - { - "date":"1348257483", - "price":"12.30192", - "amount":"20.00000000", - "tid":"7764" - }, - { - "date":"1348262334", - "price":"12.82410", - "amount":"0.46781600", - "tid":"7765" - }, - { - "date":"1348284179", - "price":"12.74969", - "amount":"0.62950000", - "tid":"7774" - }, - { - "date":"1348342273", - "price":"12.62500", - "amount":"0.10000000", - "tid":"7919" - }, - { - "date":"1348342385", - "price":"12.62550", - "amount":"0.84960000", - "tid":"7920" - }, - { - "date":"1348366139", - "price":"12.70000", - "amount":"5.75000000", - "tid":"7935" - }, - { - "date":"1348417040", - "price":"12.42863", - "amount":"3.05500000", - "tid":"8098" - }, - { - "date":"1348469731", - "price":"12.11608", - "amount":"20.00000000", - "tid":"8171" - }, - { - "date":"1348499694", - "price":"11.99999", - "amount":"5.01135000", - "tid":"8189" - }, - { - "date":"1348500065", - "price":"11.83001", - "amount":"1.83544952", - "tid":"8193" - }, - { - "date":"1348500425", - "price":"12.39899", - "amount":"0.10000000", - "tid":"8195" - }, - { - "date":"1348507854", - "price":"12.29999", - "amount":"0.81210000", - "tid":"8218" - }, - { - "date":"1348521315", - "price":"11.83001", - "amount":"4.19288000", - "tid":"8239" - }, - { - "date":"1348521402", - "price":"11.83000", - "amount":"11.45000000", - "tid":"8240" - }, - { - "date":"1348522164", - "price":"11.42685", - "amount":"3.51712000", - "tid":"8242" - }, - { - "date":"1348574737", - "price":"11.92057", - "amount":"20.00000000", - "tid":"8291" - }, - { - "date":"1348575867", - "price":"11.91017", - "amount":"19.00000000", - "tid":"8308" - }, - { - "date":"1348594104", - "price":"12.19515", - "amount":"4.39968000", - "tid":"8338" - }, - { - "date":"1348594104", - "price":"12.19515", - "amount":"1.10032000", - "tid":"8339" - }, - { - "date":"1348635380", - "price":"12.15022", - "amount":"1.28000000", - "tid":"8367" - }, - { - "date":"1348655290", - "price":"12.12530", - "amount":"5.73196000", - "tid":"8372" - }, - { - "date":"1348655696", - "price":"12.12315", - "amount":"2.90000000", - "tid":"8373" - }, - { - "date":"1348679703", - "price":"12.17153", - "amount":"1.23000000", - "tid":"8428" - }, - { - "date":"1348684265", - "price":"12.17153", - "amount":"4.00000000", - "tid":"8433" - }, - { - "date":"1348713824", - "price":"12.21216", - "amount":"1.80084000", - "tid":"8464" - }, - { - "date":"1348713915", - "price":"12.21216", - "amount":"0.19916000", - "tid":"8465" - }, - { - "date":"1348713926", - "price":"12.21216", - "amount":"0.70216000", - "tid":"8466" - }, - { - "date":"1348713926", - "price":"12.21217", - "amount":"4.29784000", - "tid":"8467" - }, - { - "date":"1348713999", - "price":"12.21217", - "amount":"1.10000000", - "tid":"8468" - }, - { - "date":"1348725513", - "price":"12.19989", - "amount":"4.00000000", - "tid":"8478" - }, - { - "date":"1348736558", - "price":"12.13324", - "amount":"18.15975000", - "tid":"8499" - }, - { - "date":"1348736558", - "price":"12.13323", - "amount":"9.00000000", - "tid":"8500" - }, - { - "date":"1348752417", - "price":"12.29441", - "amount":"4.00000000", - "tid":"8525" - }, - { - "date":"1348766627", - "price":"12.29456", - "amount":"12.18000000", - "tid":"8550" - }, - { - "date":"1348768703", - "price":"12.22540", - "amount":"0.10666424", - "tid":"8556" - }, - { - "date":"1348805803", - "price":"12.38911", - "amount":"4.50000000", - "tid":"8591" - }, - { - "date":"1348826987", - "price":"12.31098", - "amount":"2.23142000", - "tid":"8607" - }, - { - "date":"1348827361", - "price":"12.31098", - "amount":"1.11682000", - "tid":"8608" - }, - { - "date":"1348829415", - "price":"12.34453", - "amount":"1.00000000", - "tid":"8609" - }, - { - "date":"1348829445", - "price":"12.33072", - "amount":"1.00000000", - "tid":"8610" - }, - { - "date":"1348835107", - "price":"12.37611", - "amount":"0.55897000", - "tid":"8628" - }, - { - "date":"1348835170", - "price":"12.37612", - "amount":"2.00000000", - "tid":"8629" - }, - { - "date":"1348835209", - "price":"12.37612", - "amount":"2.50000000", - "tid":"8630" - }, - { - "date":"1348856566", - "price":"12.56706", - "amount":"9.69074000", - "tid":"8659" - }, - { - "date":"1348857599", - "price":"12.57071", - "amount":"10.00000000", - "tid":"8660" - }, - { - "date":"1348876017", - "price":"12.69106", - "amount":"8.00000000", - "tid":"8711" - }, - { - "date":"1348887374", - "price":"12.71220", - "amount":"0.38000000", - "tid":"8722" - }, - { - "date":"1348894327", - "price":"12.70802", - "amount":"5.00000000", - "tid":"8725" - }, - { - "date":"1348905403", - "price":"12.70802", - "amount":"0.77000000", - "tid":"8735" - }, - { - "date":"1348911817", - "price":"12.77089", - "amount":"3.12900000", - "tid":"8760" - }, - { - "date":"1348912369", - "price":"12.75490", - "amount":"3.34719000", - "tid":"8768" - }, - { - "date":"1348912369", - "price":"12.75491", - "amount":"0.09281000", - "tid":"8769" - }, - { - "date":"1348923412", - "price":"12.76911", - "amount":"0.79100000", - "tid":"8829" - }, - { - "date":"1348933962", - "price":"12.74689", - "amount":"0.92239000", - "tid":"8844" - }, - { - "date":"1348933963", - "price":"12.74690", - "amount":"0.88011000", - "tid":"8845" - }, - { - "date":"1348943953", - "price":"12.75205", - "amount":"1.82024300", - "tid":"8853" - }, - { - "date":"1348962763", - "price":"12.75204", - "amount":"0.68172000", - "tid":"8881" - }, - { - "date":"1348966216", - "price":"12.75205", - "amount":"0.17975700", - "tid":"8883" - }, - { - "date":"1348966217", - "price":"12.75205", - "amount":"1.82024300", - "tid":"8884" - }, - { - "date":"1348975188", - "price":"12.75204", - "amount":"1.05031000", - "tid":"8895" - }, - { - "date":"1348996239", - "price":"12.40001", - "amount":"5.28497320", - "tid":"8901" - }, - { - "date":"1348999716", - "price":"12.40001", - "amount":"34.25888680", - "tid":"8907" - }, - { - "date":"1348999717", - "price":"12.40000", - "amount":"5.74111320", - "tid":"8908" - }, - { - "date":"1348999757", - "price":"12.40000", - "amount":"0.53035000", - "tid":"8909" - }, - { - "date":"1348999985", - "price":"12.40000", - "amount":"1.54395380", - "tid":"8910" - }, - { - "date":"1348999985", - "price":"12.03285", - "amount":"1.45604620", - "tid":"8911" - }, - { - "date":"1349006356", - "price":"12.75125", - "amount":"1.55900000", - "tid":"8928" - }, - { - "date":"1349037075", - "price":"12.37467", - "amount":"4.04000000", - "tid":"8966" - }, - { - "date":"1349054374", - "price":"12.07852", - "amount":"5.81970000", - "tid":"8985" - }, - { - "date":"1349054374", - "price":"12.07851", - "amount":"4.05865280", - "tid":"8986" - }, - { - "date":"1349068645", - "price":"12.04764", - "amount":"6.00000000", - "tid":"8988" - }, - { - "date":"1349072639", - "price":"12.41999", - "amount":"2.00000000", - "tid":"8991" - }, - { - "date":"1349102650", - "price":"12.42485", - "amount":"3.99600000", - "tid":"9049" - }, - { - "date":"1349122570", - "price":"12.33247", - "amount":"2.00000000", - "tid":"9090" - }, - { - "date":"1349122634", - "price":"12.33247", - "amount":"1.99850000", - "tid":"9091" - }, - { - "date":"1349147628", - "price":"12.42485", - "amount":"2.00000000", - "tid":"9133" - }, - { - "date":"1349147654", - "price":"12.42485", - "amount":"2.00000000", - "tid":"9134" - }, - { - "date":"1349147684", - "price":"12.42485", - "amount":"0.72679000", - "tid":"9135" - }, - { - "date":"1349147709", - "price":"12.42485", - "amount":"1.00000000", - "tid":"9136" - }, - { - "date":"1349147741", - "price":"12.42485", - "amount":"1.00000000", - "tid":"9137" - }, - { - "date":"1349187014", - "price":"12.54724", - "amount":"8.66479000", - "tid":"9324" - }, - { - "date":"1349194298", - "price":"12.73706", - "amount":"7.80000000", - "tid":"9350" - }, - { - "date":"1349223056", - "price":"12.87852", - "amount":"1.00000000", - "tid":"9413" - }, - { - "date":"1349223187", - "price":"12.87853", - "amount":"1.00000000", - "tid":"9414" - }, - { - "date":"1349223200", - "price":"12.87853", - "amount":"1.00000000", - "tid":"9415" - }, - { - "date":"1349223220", - "price":"12.87853", - "amount":"2.00000000", - "tid":"9416" - }, - { - "date":"1349223665", - "price":"12.87853", - "amount":"4.00000000", - "tid":"9417" - }, - { - "date":"1349230415", - "price":"12.87852", - "amount":"3.90000000", - "tid":"9419" - }, - { - "date":"1349255928", - "price":"12.87852", - "amount":"0.10000000", - "tid":"9442" - }, - { - "date":"1349265244", - "price":"12.96469", - "amount":"5.76391000", - "tid":"9463" - }, - { - "date":"1349265522", - "price":"12.96472", - "amount":"2.00000000", - "tid":"9468" - }, - { - "date":"1349265523", - "price":"12.96472", - "amount":"2.88484000", - "tid":"9469" - }, - { - "date":"1349265894", - "price":"12.96472", - "amount":"7.65228676", - "tid":"9471" - }, - { - "date":"1349276935", - "price":"12.96472", - "amount":"0.01771324", - "tid":"9480" - }, - { - "date":"1349289025", - "price":"12.96472", - "amount":"0.73742000", - "tid":"9496" - }, - { - "date":"1349298848", - "price":"13.07211", - "amount":"36.68000000", - "tid":"9518" - }, - { - "date":"1349302057", - "price":"13.07211", - "amount":"15.30000000", - "tid":"9519" - }, - { - "date":"1349308572", - "price":"13.07211", - "amount":"3.66898000", - "tid":"9523" - }, - { - "date":"1349331257", - "price":"13.06073", - "amount":"5.00000000", - "tid":"9535" - }, - { - "date":"1349335631", - "price":"13.07210", - "amount":"3.11700000", - "tid":"9537" - }, - { - "date":"1349414173", - "price":"13.01050", - "amount":"0.74187000", - "tid":"9717" - }, - { - "date":"1349426946", - "price":"12.97928", - "amount":"0.75030000", - "tid":"9726" - }, - { - "date":"1349427124", - "price":"12.98559", - "amount":"1.62950000", - "tid":"9727" - }, - { - "date":"1349446023", - "price":"13.00986", - "amount":"5.28500000", - "tid":"9802" - }, - { - "date":"1349458400", - "price":"13.07190", - "amount":"4.25555000", - "tid":"9810" - }, - { - "date":"1349458523", - "price":"13.07191", - "amount":"0.38250000", - "tid":"9811" - }, - { - "date":"1349458580", - "price":"13.04221", - "amount":"5.61750000", - "tid":"9812" - }, - { - "date":"1349458844", - "price":"13.04222", - "amount":"7.48216154", - "tid":"9813" - }, - { - "date":"1349463659", - "price":"13.04221", - "amount":"3.88250000", - "tid":"9828" - }, - { - "date":"1349463659", - "price":"13.04221", - "amount":"0.15000000", - "tid":"9829" - }, - { - "date":"1349505125", - "price":"13.03574", - "amount":"2.18000000", - "tid":"9895" - }, - { - "date":"1349517190", - "price":"13.00194", - "amount":"0.90448000", - "tid":"9896" - }, - { - "date":"1349529158", - "price":"13.02139", - "amount":"1.23112000", - "tid":"9916" - }, - { - "date":"1349529618", - "price":"13.02139", - "amount":"0.61618000", - "tid":"9919" - }, - { - "date":"1349533964", - "price":"13.02139", - "amount":"3.00000000", - "tid":"9922" - }, - { - "date":"1349541077", - "price":"13.02140", - "amount":"1.88000000", - "tid":"9930" - }, - { - "date":"1349551010", - "price":"13.02140", - "amount":"2.12000000", - "tid":"9935" - }, - { - "date":"1349559965", - "price":"13.02103", - "amount":"2.70581000", - "tid":"9971" - }, - { - "date":"1349563675", - "price":"12.98662", - "amount":"1.35562000", - "tid":"9985" - }, - { - "date":"1349563819", - "price":"12.98663", - "amount":"11.00000000", - "tid":"9986" - }, - { - "date":"1349565198", - "price":"13.08610", - "amount":"5.00000000", - "tid":"9988" - }, - { - "date":"1349565232", - "price":"13.08610", - "amount":"3.67413000", - "tid":"9989" - }, - { - "date":"1349565241", - "price":"13.08610", - "amount":"0.32587000", - "tid":"9990" - }, - { - "date":"1349577173", - "price":"12.45001", - "amount":"34.01832000", - "tid":"10034" - }, - { - "date":"1349577298", - "price":"12.45000", - "amount":"5.25900000", - "tid":"10036" - }, - { - "date":"1349579192", - "price":"12.41040", - "amount":"4.00000000", - "tid":"10038" - }, - { - "date":"1349579536", - "price":"12.41040", - "amount":"10.00000000", - "tid":"10042" - }, - { - "date":"1349622882", - "price":"12.23000", - "amount":"1.00000000", - "tid":"10169" - }, - { - "date":"1349624452", - "price":"12.19823", - "amount":"0.22000000", - "tid":"10173" - }, - { - "date":"1349624748", - "price":"12.00000", - "amount":"0.80000000", - "tid":"10174" - }, - { - "date":"1349640711", - "price":"12.16011", - "amount":"0.82351000", - "tid":"10228" - }, - { - "date":"1349640911", - "price":"12.16010", - "amount":"0.17649000", - "tid":"10231" - }, - { - "date":"1349680396", - "price":"12.09437", - "amount":"1.00000000", - "tid":"10313" - }, - { - "date":"1349680455", - "price":"12.00000", - "amount":"0.20000000", - "tid":"10314" - }, - { - "date":"1349680455", - "price":"12.00000", - "amount":"1.23277027", - "tid":"10315" - }, - { - "date":"1349681700", - "price":"12.00000", - "amount":"0.00722973", - "tid":"10316" - }, - { - "date":"1349682623", - "price":"11.89823", - "amount":"1.02120000", - "tid":"10320" - }, - { - "date":"1349699621", - "price":"11.21000", - "amount":"1.00000000", - "tid":"10405" - }, - { - "date":"1349720593", - "price":"12.03137", - "amount":"2.82799000", - "tid":"10503" - }, - { - "date":"1349720769", - "price":"12.03137", - "amount":"1.24744000", - "tid":"10507" - }, - { - "date":"1349720845", - "price":"12.03137", - "amount":"0.62247000", - "tid":"10510" - }, - { - "date":"1349721573", - "price":"12.05470", - "amount":"2.50000000", - "tid":"10513" - }, - { - "date":"1349737756", - "price":"12.50000", - "amount":"1.00000000", - "tid":"10569" - }, - { - "date":"1349761800", - "price":"11.22001", - "amount":"0.10000000", - "tid":"10583" - }, - { - "date":"1349762779", - "price":"12.10415", - "amount":"0.50000000", - "tid":"10584" - }, - { - "date":"1349762832", - "price":"12.10415", - "amount":"0.10000000", - "tid":"10585" - }, - { - "date":"1349774717", - "price":"12.17453", - "amount":"3.95083000", - "tid":"10611" - }, - { - "date":"1349774717", - "price":"12.17452", - "amount":"20.00000000", - "tid":"10612" - }, - { - "date":"1349775315", - "price":"12.17451", - "amount":"2.77358000", - "tid":"10614" - }, - { - "date":"1349775318", - "price":"12.17452", - "amount":"11.22642000", - "tid":"10615" - }, - { - "date":"1349777391", - "price":"12.26147", - "amount":"1.38730000", - "tid":"10622" - }, - { - "date":"1349777838", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10624" - }, - { - "date":"1349777843", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10625" - }, - { - "date":"1349781127", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10627" - }, - { - "date":"1349781135", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10628" - }, - { - "date":"1349784548", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10636" - }, - { - "date":"1349784854", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10638" - }, - { - "date":"1349785042", - "price":"12.30687", - "amount":"1.00000000", - "tid":"10643" - }, - { - "date":"1349786511", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10645" - }, - { - "date":"1349786517", - "price":"12.30596", - "amount":"0.69522000", - "tid":"10646" - }, - { - "date":"1349787234", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10649" - }, - { - "date":"1349787270", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10650" - }, - { - "date":"1349787549", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10651" - }, - { - "date":"1349787844", - "price":"12.26147", - "amount":"0.20000000", - "tid":"10652" - }, - { - "date":"1349789538", - "price":"12.30595", - "amount":"0.45073000", - "tid":"10656" - }, - { - "date":"1349789538", - "price":"12.30595", - "amount":"1.54927000", - "tid":"10657" - }, - { - "date":"1349791154", - "price":"12.30358", - "amount":"4.85000000", - "tid":"10660" - }, - { - "date":"1349794154", - "price":"12.26147", - "amount":"4.56270000", - "tid":"10663" - }, - { - "date":"1349798342", - "price":"12.29612", - "amount":"0.77110000", - "tid":"10682" - }, - { - "date":"1349798685", - "price":"12.29613", - "amount":"3.44000000", - "tid":"10683" - }, - { - "date":"1349852895", - "price":"12.13868", - "amount":"4.88592560", - "tid":"10743" - }, - { - "date":"1349864749", - "price":"12.13556", - "amount":"1.63000000", - "tid":"10763" - }, - { - "date":"1349877453", - "price":"12.30000", - "amount":"1.00000000", - "tid":"10805" - }, - { - "date":"1349877535", - "price":"12.30001", - "amount":"0.53158000", - "tid":"10806" - }, - { - "date":"1349877550", - "price":"12.30000", - "amount":"3.00000000", - "tid":"10807" - }, - { - "date":"1349880593", - "price":"12.40000", - "amount":"1.00000000", - "tid":"10817" - }, - { - "date":"1349889715", - "price":"12.16110", - "amount":"3.64969945", - "tid":"10847" - }, - { - "date":"1349944549", - "price":"12.08491", - "amount":"1.00000000", - "tid":"10929" - }, - { - "date":"1349945136", - "price":"12.16100", - "amount":"0.50000000", - "tid":"10930" - }, - { - "date":"1349945151", - "price":"12.16100", - "amount":"0.40000000", - "tid":"10931" - }, - { - "date":"1349945201", - "price":"12.16100", - "amount":"0.09000000", - "tid":"10932" - }, - { - "date":"1349946483", - "price":"12.16099", - "amount":"18.00000000", - "tid":"10935" - }, - { - "date":"1349946686", - "price":"12.16099", - "amount":"1.00000000", - "tid":"10936" - }, - { - "date":"1349946806", - "price":"12.16099", - "amount":"0.75000000", - "tid":"10937" - }, - { - "date":"1349950948", - "price":"12.16099", - "amount":"0.31125000", - "tid":"10951" - }, - { - "date":"1349950961", - "price":"12.16099", - "amount":"0.31125000", - "tid":"10952" - }, - { - "date":"1349957376", - "price":"12.15153", - "amount":"0.99000000", - "tid":"10960" - }, - { - "date":"1349976204", - "price":"12.16100", - "amount":"6.57270000", - "tid":"10990" - }, - { - "date":"1349990492", - "price":"12.15500", - "amount":"0.20000000", - "tid":"11007" - }, - { - "date":"1349990625", - "price":"12.16100", - "amount":"24.50700000", - "tid":"11008" - }, - { - "date":"1349995416", - "price":"12.00000", - "amount":"0.10248000", - "tid":"11017" - }, - { - "date":"1350046172", - "price":"12.15400", - "amount":"0.20000000", - "tid":"11079" - }, - { - "date":"1350046372", - "price":"12.15400", - "amount":"0.20000000", - "tid":"11082" - }, - { - "date":"1350051615", - "price":"12.15400", - "amount":"7.50000000", - "tid":"11086" - }, - { - "date":"1350057924", - "price":"12.15400", - "amount":"0.10198000", - "tid":"11103" - }, - { - "date":"1350067111", - "price":"12.16099", - "amount":"1.03600000", - "tid":"11114" - }, - { - "date":"1350071343", - "price":"12.16099", - "amount":"0.80000000", - "tid":"11130" - }, - { - "date":"1350074227", - "price":"12.16099", - "amount":"5.89000000", - "tid":"11137" - }, - { - "date":"1350075025", - "price":"12.15400", - "amount":"0.99802000", - "tid":"11139" - }, - { - "date":"1350104232", - "price":"12.16099", - "amount":"10.20000000", - "tid":"11163" - }, - { - "date":"1350107056", - "price":"12.16099", - "amount":"2.43203000", - "tid":"11164" - }, - { - "date":"1350107065", - "price":"12.16100", - "amount":"8.74797000", - "tid":"11165" - }, - { - "date":"1350190614", - "price":"12.16099", - "amount":"7.80000000", - "tid":"11283" - }, - { - "date":"1350196673", - "price":"12.16099", - "amount":"3.36820000", - "tid":"11287" - }, - { - "date":"1350207015", - "price":"12.12852", - "amount":"7.50000000", - "tid":"11301" - }, - { - "date":"1350220071", - "price":"12.10178", - "amount":"6.01901000", - "tid":"11328" - }, - { - "date":"1350220789", - "price":"12.10178", - "amount":"0.76283000", - "tid":"11330" - }, - { - "date":"1350220870", - "price":"12.10178", - "amount":"2.51816000", - "tid":"11331" - }, - { - "date":"1350221417", - "price":"12.07630", - "amount":"5.48184000", - "tid":"11332" - }, - { - "date":"1350243978", - "price":"12.14301", - "amount":"4.88803000", - "tid":"11389" - }, - { - "date":"1350243980", - "price":"12.14301", - "amount":"3.65161000", - "tid":"11390" - }, - { - "date":"1350244182", - "price":"12.14301", - "amount":"0.58373000", - "tid":"11391" - }, - { - "date":"1350244184", - "price":"12.14301", - "amount":"0.87589000", - "tid":"11392" - }, - { - "date":"1350244354", - "price":"12.16100", - "amount":"0.69800000", - "tid":"11393" - }, - { - "date":"1350250278", - "price":"11.90002", - "amount":"0.10950000", - "tid":"11402" - }, - { - "date":"1350257179", - "price":"11.90002", - "amount":"7.58945121", - "tid":"11434" - }, - { - "date":"1350257973", - "price":"11.90002", - "amount":"10.00000000", - "tid":"11438" - }, - { - "date":"1350284696", - "price":"11.90000", - "amount":"1.00000000", - "tid":"11476" - }, - { - "date":"1350286654", - "price":"11.84887", - "amount":"9.00000000", - "tid":"11482" - }, - { - "date":"1350290874", - "price":"11.82011", - "amount":"17.00000000", - "tid":"11490" - }, - { - "date":"1350298452", - "price":"11.88891", - "amount":"6.00000000", - "tid":"11513" - }, - { - "date":"1350298890", - "price":"11.88891", - "amount":"0.49950000", - "tid":"11514" - }, - { - "date":"1350299458", - "price":"11.90990", - "amount":"4.00000000", - "tid":"11515" - }, - { - "date":"1350301166", - "price":"11.91215", - "amount":"4.00000000", - "tid":"11523" - }, - { - "date":"1350301919", - "price":"11.91616", - "amount":"21.78000000", - "tid":"11524" - }, - { - "date":"1350301958", - "price":"11.91616", - "amount":"0.00042000", - "tid":"11525" - }, - { - "date":"1350301959", - "price":"11.91615", - "amount":"15.99958000", - "tid":"11526" - }, - { - "date":"1350319967", - "price":"11.80000", - "amount":"1.08475000", - "tid":"11612" - }, - { - "date":"1350330388", - "price":"11.51001", - "amount":"0.50000000", - "tid":"11684" - }, - { - "date":"1350343073", - "price":"11.87025", - "amount":"3.21000000", - "tid":"11707" - }, - { - "date":"1350406399", - "price":"11.53203", - "amount":"3.00000000", - "tid":"11779" - }, - { - "date":"1350416191", - "price":"11.97600", - "amount":"3.80635000", - "tid":"11875" - }, - { - "date":"1350416195", - "price":"11.97600", - "amount":"0.64365000", - "tid":"11876" - }, - { - "date":"1350420396", - "price":"11.60000", - "amount":"0.67000000", - "tid":"11885" - }, - { - "date":"1350420963", - "price":"11.90000", - "amount":"2.00000000", - "tid":"11886" - }, - { - "date":"1350421038", - "price":"11.90001", - "amount":"7.37962000", - "tid":"11887" - }, - { - "date":"1350421078", - "price":"11.53202", - "amount":"10.00000000", - "tid":"11888" - }, - { - "date":"1350470773", - "price":"11.85388", - "amount":"2.20754000", - "tid":"11908" - }, - { - "date":"1350471036", - "price":"11.85389", - "amount":"2.21274000", - "tid":"11909" - }, - { - "date":"1350471036", - "price":"11.85388", - "amount":"9.78726000", - "tid":"11910" - }, - { - "date":"1350471142", - "price":"11.85388", - "amount":"37.05520000", - "tid":"11916" - }, - { - "date":"1350479756", - "price":"11.85387", - "amount":"2.53000000", - "tid":"11924" - }, - { - "date":"1350484306", - "price":"11.83900", - "amount":"2.53286000", - "tid":"11943" - }, - { - "date":"1350484306", - "price":"11.83899", - "amount":"11.46714000", - "tid":"11944" - }, - { - "date":"1350488995", - "price":"11.96505", - "amount":"3.20000000", - "tid":"11964" - }, - { - "date":"1350498895", - "price":"11.98450", - "amount":"7.85329000", - "tid":"11984" - }, - { - "date":"1350498929", - "price":"11.98450", - "amount":"4.19000000", - "tid":"11985" - }, - { - "date":"1350518758", - "price":"11.95360", - "amount":"6.36568000", - "tid":"12009" - }, - { - "date":"1350518764", - "price":"11.95360", - "amount":"0.48832000", - "tid":"12010" - }, - { - "date":"1350540025", - "price":"11.89022", - "amount":"2.31000000", - "tid":"12017" - }, - { - "date":"1350540252", - "price":"11.89022", - "amount":"3.36000000", - "tid":"12018" - }, - { - "date":"1350556644", - "price":"11.90889", - "amount":"6.00000000", - "tid":"12054" - }, - { - "date":"1350563373", - "price":"11.90889", - "amount":"10.95000000", - "tid":"12059" - }, - { - "date":"1350573975", - "price":"11.90889", - "amount":"2.38797000", - "tid":"12090" - }, - { - "date":"1350574059", - "price":"11.90890", - "amount":"10.00000000", - "tid":"12091" - }, - { - "date":"1350574260", - "price":"11.90889", - "amount":"1.19518000", - "tid":"12092" - }, - { - "date":"1350574874", - "price":"11.90889", - "amount":"0.59819000", - "tid":"12095" - }, - { - "date":"1350576970", - "price":"11.90889", - "amount":"2.17350000", - "tid":"12097" - }, - { - "date":"1350580930", - "price":"11.90889", - "amount":"16.03313000", - "tid":"12102" - }, - { - "date":"1350580930", - "price":"11.90889", - "amount":"5.40000000", - "tid":"12103" - }, - { - "date":"1350581454", - "price":"11.90890", - "amount":"7.41000000", - "tid":"12104" - }, - { - "date":"1350605378", - "price":"11.90890", - "amount":"0.83800000", - "tid":"12138" - }, - { - "date":"1350640395", - "price":"11.64001", - "amount":"50.09151000", - "tid":"12145" - }, - { - "date":"1350640395", - "price":"11.64000", - "amount":"3.00000000", - "tid":"12146" - }, - { - "date":"1350640395", - "price":"11.63000", - "amount":"15.00000000", - "tid":"12147" - }, - { - "date":"1350640395", - "price":"11.60000", - "amount":"21.43313000", - "tid":"12148" - }, - { - "date":"1350645594", - "price":"11.55002", - "amount":"2.00000000", - "tid":"12174" - }, - { - "date":"1350645594", - "price":"11.55002", - "amount":"0.10000000", - "tid":"12175" - }, - { - "date":"1350645594", - "price":"11.55002", - "amount":"0.20000000", - "tid":"12176" - }, - { - "date":"1350645594", - "price":"11.55000", - "amount":"8.91000000", - "tid":"12177" - }, - { - "date":"1350645594", - "price":"11.48114", - "amount":"1.00000000", - "tid":"12178" - }, - { - "date":"1350645594", - "price":"11.24500", - "amount":"6.13743000", - "tid":"12179" - }, - { - "date":"1350645599", - "price":"11.24500", - "amount":"4.59118000", - "tid":"12180" - }, - { - "date":"1350645617", - "price":"11.24500", - "amount":"6.88907000", - "tid":"12181" - }, - { - "date":"1350645624", - "price":"11.24500", - "amount":"1.72399000", - "tid":"12182" - }, - { - "date":"1350645627", - "price":"11.24500", - "amount":"2.58685000", - "tid":"12183" - }, - { - "date":"1350646241", - "price":"11.24500", - "amount":"0.64735000", - "tid":"12184" - }, - { - "date":"1350646245", - "price":"11.24500", - "amount":"0.97137000", - "tid":"12185" - }, - { - "date":"1350668738", - "price":"11.94455", - "amount":"0.20000000", - "tid":"12214" - }, - { - "date":"1350671329", - "price":"11.87619", - "amount":"8.38539000", - "tid":"12215" - }, - { - "date":"1350671464", - "price":"11.87620", - "amount":"4.23000000", - "tid":"12216" - }, - { - "date":"1350678799", - "price":"11.65522", - "amount":"43.56813000", - "tid":"12217" - }, - { - "date":"1350684463", - "price":"11.67459", - "amount":"4.00000000", - "tid":"12225" - }, - { - "date":"1350718950", - "price":"11.29000", - "amount":"0.50000000", - "tid":"12239" - }, - { - "date":"1350731773", - "price":"11.84203", - "amount":"8.00000000", - "tid":"12253" - }, - { - "date":"1350732092", - "price":"11.88750", - "amount":"6.31871790", - "tid":"12254" - }, - { - "date":"1350761911", - "price":"11.86999", - "amount":"7.58000000", - "tid":"12286" - }, - { - "date":"1350771778", - "price":"11.86999", - "amount":"5.59377000", - "tid":"12299" - }, - { - "date":"1350773050", - "price":"11.86999", - "amount":"3.22538000", - "tid":"12302" - }, - { - "date":"1350794752", - "price":"11.87000", - "amount":"8.45000000", - "tid":"12318" - }, - { - "date":"1350804881", - "price":"11.86999", - "amount":"3.00000000", - "tid":"12322" - }, - { - "date":"1350808705", - "price":"11.86999", - "amount":"0.49000000", - "tid":"12328" - }, - { - "date":"1350825362", - "price":"11.86999", - "amount":"0.59616000", - "tid":"12343" - }, - { - "date":"1350825362", - "price":"11.87000", - "amount":"5.40384000", - "tid":"12344" - }, - { - "date":"1350839526", - "price":"11.87000", - "amount":"8.87000000", - "tid":"12367" - }, - { - "date":"1350852096", - "price":"11.86999", - "amount":"4.37000000", - "tid":"12415" - }, - { - "date":"1350890220", - "price":"11.66823", - "amount":"21.75653000", - "tid":"12437" - }, - { - "date":"1350890220", - "price":"11.66822", - "amount":"9.00000000", - "tid":"12438" - }, - { - "date":"1350906415", - "price":"11.40000", - "amount":"0.40000000", - "tid":"12469" - }, - { - "date":"1350913779", - "price":"11.81933", - "amount":"0.75215700", - "tid":"12477" - }, - { - "date":"1350922639", - "price":"11.81933", - "amount":"7.85744000", - "tid":"12500" - }, - { - "date":"1350924961", - "price":"11.81933", - "amount":"1.61800000", - "tid":"12506" - }, - { - "date":"1350925992", - "price":"11.81933", - "amount":"6.76200000", - "tid":"12509" - }, - { - "date":"1350986911", - "price":"11.70001", - "amount":"2.88707700", - "tid":"12591" - }, - { - "date":"1350989760", - "price":"11.70001", - "amount":"14.28320000", - "tid":"12595" - }, - { - "date":"1351010106", - "price":"11.25001", - "amount":"14.00000000", - "tid":"12655" - }, - { - "date":"1351014688", - "price":"11.81933", - "amount":"1.05000000", - "tid":"12659" - }, - { - "date":"1351019615", - "price":"11.31999", - "amount":"40.00000000", - "tid":"12665" - }, - { - "date":"1351019889", - "price":"11.25002", - "amount":"2.00000000", - "tid":"12668" - }, - { - "date":"1351019986", - "price":"11.70001", - "amount":"37.81487000", - "tid":"12669" - }, - { - "date":"1351020068", - "price":"11.31999", - "amount":"19.26681000", - "tid":"12670" - }, - { - "date":"1351020115", - "price":"11.70001", - "amount":"18.66019000", - "tid":"12671" - }, - { - "date":"1351020151", - "price":"11.31999", - "amount":"18.66080000", - "tid":"12672" - }, - { - "date":"1351020198", - "price":"11.70001", - "amount":"18.05529000", - "tid":"12673" - }, - { - "date":"1351020313", - "price":"11.25001", - "amount":"5.00000000", - "tid":"12674" - }, - { - "date":"1351020328", - "price":"11.31999", - "amount":"18.05589000", - "tid":"12675" - }, - { - "date":"1351020407", - "price":"11.70001", - "amount":"17.47002000", - "tid":"12676" - }, - { - "date":"1351020456", - "price":"11.31999", - "amount":"17.47061000", - "tid":"12677" - }, - { - "date":"1351020493", - "price":"11.70001", - "amount":"16.90373000", - "tid":"12678" - }, - { - "date":"1351020531", - "price":"11.31999", - "amount":"16.90430000", - "tid":"12679" - }, - { - "date":"1351020566", - "price":"11.70001", - "amount":"16.35579000", - "tid":"12680" - }, - { - "date":"1351021318", - "price":"11.31999", - "amount":"16.35633000", - "tid":"12681" - }, - { - "date":"1351021883", - "price":"11.31999", - "amount":"14.83539000", - "tid":"12683" - }, - { - "date":"1351021903", - "price":"11.81934", - "amount":"5.00000000", - "tid":"12684" - }, - { - "date":"1351021938", - "price":"11.70001", - "amount":"14.35553000", - "tid":"12685" - }, - { - "date":"1351021977", - "price":"11.31999", - "amount":"14.35601000", - "tid":"12686" - }, - { - "date":"1351022020", - "price":"11.70001", - "amount":"13.89019000", - "tid":"12687" - }, - { - "date":"1351022055", - "price":"11.31999", - "amount":"13.89065000", - "tid":"12688" - }, - { - "date":"1351022097", - "price":"11.70001", - "amount":"13.43993000", - "tid":"12689" - }, - { - "date":"1351022145", - "price":"11.31999", - "amount":"13.44038000", - "tid":"12690" - }, - { - "date":"1351022180", - "price":"11.70001", - "amount":"13.00427000", - "tid":"12691" - }, - { - "date":"1351022218", - "price":"11.69999", - "amount":"13.00471000", - "tid":"12692" - }, - { - "date":"1351022262", - "price":"11.70001", - "amount":"13.00468000", - "tid":"12693" - }, - { - "date":"1351022298", - "price":"11.31999", - "amount":"13.00468000", - "tid":"12694" - }, - { - "date":"1351022313", - "price":"11.81934", - "amount":"5.00000000", - "tid":"12695" - }, - { - "date":"1351022356", - "price":"11.70001", - "amount":"12.58271000", - "tid":"12696" - }, - { - "date":"1351022391", - "price":"11.31999", - "amount":"12.58313000", - "tid":"12697" - }, - { - "date":"1351022454", - "price":"11.70001", - "amount":"12.17484000", - "tid":"12698" - }, - { - "date":"1351022485", - "price":"11.31999", - "amount":"12.17525000", - "tid":"12699" - }, - { - "date":"1351022518", - "price":"11.70001", - "amount":"11.78018000", - "tid":"12700" - }, - { - "date":"1351022555", - "price":"11.31999", - "amount":"11.78057000", - "tid":"12701" - }, - { - "date":"1351022589", - "price":"11.71001", - "amount":"11.38859000", - "tid":"12702" - }, - { - "date":"1351022638", - "price":"11.31999", - "amount":"11.38899000", - "tid":"12703" - }, - { - "date":"1351022673", - "price":"11.71001", - "amount":"11.01004000", - "tid":"12704" - }, - { - "date":"1351022721", - "price":"11.31999", - "amount":"11.01042000", - "tid":"12705" - }, - { - "date":"1351022751", - "price":"11.70001", - "amount":"10.65316000", - "tid":"12706" - }, - { - "date":"1351022789", - "price":"11.31999", - "amount":"22.21000000", - "tid":"12707" - }, - { - "date":"1351022923", - "price":"11.71001", - "amount":"21.45944000", - "tid":"12708" - }, - { - "date":"1351022969", - "price":"11.31999", - "amount":"21.46020000", - "tid":"12709" - }, - { - "date":"1351023006", - "price":"11.70001", - "amount":"20.76388000", - "tid":"12710" - }, - { - "date":"1351023039", - "price":"11.31999", - "amount":"20.77666000", - "tid":"12711" - }, - { - "date":"1351023068", - "price":"11.70001", - "amount":"20.10249000", - "tid":"12712" - }, - { - "date":"1351023099", - "price":"11.31999", - "amount":"20.10316000", - "tid":"12713" - }, - { - "date":"1351023133", - "price":"11.71001", - "amount":"19.43424000", - "tid":"12714" - }, - { - "date":"1351023163", - "price":"11.31999", - "amount":"19.43491000", - "tid":"12715" - }, - { - "date":"1351023208", - "price":"11.71001", - "amount":"18.78825000", - "tid":"12716" - }, - { - "date":"1351023282", - "price":"11.81933", - "amount":"1.09000000", - "tid":"12717" - }, - { - "date":"1351023381", - "price":"11.39999", - "amount":"17.71403000", - "tid":"12718" - }, - { - "date":"1351023518", - "price":"11.50001", - "amount":"18.68068000", - "tid":"12719" - }, - { - "date":"1351023634", - "price":"11.47999", - "amount":"26.90529000", - "tid":"12720" - }, - { - "date":"1351025220", - "price":"11.55001", - "amount":"26.73404000", - "tid":"12727" - }, - { - "date":"1351031963", - "price":"11.64544", - "amount":"2.65944000", - "tid":"12737" - }, - { - "date":"1351064142", - "price":"11.54479", - "amount":"2.00000000", - "tid":"12796" - }, - { - "date":"1351073757", - "price":"11.75575", - "amount":"25.49645900", - "tid":"12814" - }, - { - "date":"1351079727", - "price":"11.77980", - "amount":"8.59522987", - "tid":"12860" - }, - { - "date":"1351162432", - "price":"11.60380", - "amount":"8.50000000", - "tid":"13154" - }, - { - "date":"1351163967", - "price":"11.25010", - "amount":"5.00000000", - "tid":"13194" - }, - { - "date":"1351163967", - "price":"11.25001", - "amount":"1.00000000", - "tid":"13195" - }, - { - "date":"1351163968", - "price":"11.25001", - "amount":"4.00000000", - "tid":"13196" - }, - { - "date":"1351163969", - "price":"11.25000", - "amount":"9.61400000", - "tid":"13197" - }, - { - "date":"1351163969", - "price":"11.24500", - "amount":"5.45276000", - "tid":"13198" - }, - { - "date":"1351163969", - "price":"11.21001", - "amount":"35.76160000", - "tid":"13199" - }, - { - "date":"1351163969", - "price":"11.21000", - "amount":"10.32000000", - "tid":"13200" - }, - { - "date":"1351163969", - "price":"11.21000", - "amount":"1.00000000", - "tid":"13201" - }, - { - "date":"1351163969", - "price":"11.20000", - "amount":"1.35000000", - "tid":"13202" - }, - { - "date":"1351164013", - "price":"10.82656", - "amount":"9.00000000", - "tid":"13203" - }, - { - "date":"1351164014", - "price":"10.25907", - "amount":"0.13000000", - "tid":"13204" - }, - { - "date":"1351164014", - "price":"9.70000", - "amount":"2.00000000", - "tid":"13205" - }, - { - "date":"1351164014", - "price":"9.61000", - "amount":"2.65000000", - "tid":"13206" - }, - { - "date":"1351164048", - "price":"8.85516", - "amount":"1.00000000", - "tid":"13207" - }, - { - "date":"1351164332", - "price":"8.80272", - "amount":"0.26000000", - "tid":"13208" - }, - { - "date":"1351164649", - "price":"9.25000", - "amount":"3.00000000", - "tid":"13212" - }, - { - "date":"1351164903", - "price":"8.69999", - "amount":"1.00000000", - "tid":"13221" - }, - { - "date":"1351164908", - "price":"8.69999", - "amount":"0.89000000", - "tid":"13222" - }, - { - "date":"1351168721", - "price":"11.34953", - "amount":"17.00000000", - "tid":"13241" - }, - { - "date":"1351171649", - "price":"11.34953", - "amount":"1.80000000", - "tid":"13253" - }, - { - "date":"1351178574", - "price":"10.00000", - "amount":"0.88000000", - "tid":"13270" - }, - { - "date":"1351182066", - "price":"8.62000", - "amount":"0.21800000", - "tid":"13274" - }, - { - "date":"1351188276", - "price":"11.08679", - "amount":"8.00000000", - "tid":"13307" - }, - { - "date":"1351188527", - "price":"11.06071", - "amount":"0.12000000", - "tid":"13315" - }, - { - "date":"1351189117", - "price":"8.92000", - "amount":"2.11000000", - "tid":"13321" - }, - { - "date":"1351189254", - "price":"8.80001", - "amount":"5.60000000", - "tid":"13322" - }, - { - "date":"1351189303", - "price":"10.94000", - "amount":"3.00000000", - "tid":"13323" - }, - { - "date":"1351189424", - "price":"11.04789", - "amount":"4.78210000", - "tid":"13324" - }, - { - "date":"1351191379", - "price":"10.99824", - "amount":"1.17502000", - "tid":"13351" - }, - { - "date":"1351192249", - "price":"10.62037", - "amount":"1.00000000", - "tid":"13360" - }, - { - "date":"1351230031", - "price":"11.22999", - "amount":"1.07340700", - "tid":"13461" - }, - { - "date":"1351239629", - "price":"10.92045", - "amount":"7.40000000", - "tid":"13533" - }, - { - "date":"1351244796", - "price":"10.75883", - "amount":"2.50000000", - "tid":"13580" - }, - { - "date":"1351245751", - "price":"8.60000", - "amount":"1.20000000", - "tid":"13603" - }, - { - "date":"1351245751", - "price":"8.48000", - "amount":"1.22467000", - "tid":"13604" - }, - { - "date":"1351245756", - "price":"8.48000", - "amount":"0.60677000", - "tid":"13605" - }, - { - "date":"1351247015", - "price":"9.39999", - "amount":"4.15850000", - "tid":"13627" - }, - { - "date":"1351247130", - "price":"9.39999", - "amount":"1.04482000", - "tid":"13628" - }, - { - "date":"1351247239", - "price":"9.39999", - "amount":"2.33838000", - "tid":"13629" - }, - { - "date":"1351249008", - "price":"10.00000", - "amount":"1.50000000", - "tid":"13644" - }, - { - "date":"1351252354", - "price":"10.76000", - "amount":"1.20000000", - "tid":"13651" - }, - { - "date":"1351252428", - "price":"10.79000", - "amount":"0.91000000", - "tid":"13652" - }, - { - "date":"1351252428", - "price":"10.80000", - "amount":"6.99000000", - "tid":"13653" - }, - { - "date":"1351261623", - "price":"10.71000", - "amount":"0.26000000", - "tid":"13699" - }, - { - "date":"1351261623", - "price":"10.80000", - "amount":"4.34000000", - "tid":"13700" - }, - { - "date":"1351267120", - "price":"8.59999", - "amount":"9.01430000", - "tid":"13739" - }, - { - "date":"1351267185", - "price":"8.59999", - "amount":"6.73837000", - "tid":"13740" - }, - { - "date":"1351267187", - "price":"8.59999", - "amount":"0.00445000", - "tid":"13741" - }, - { - "date":"1351267202", - "price":"8.59999", - "amount":"1.14139000", - "tid":"13742" - }, - { - "date":"1351267205", - "price":"8.59999", - "amount":"0.57349000", - "tid":"13743" - }, - { - "date":"1351276261", - "price":"8.48000", - "amount":"0.16856000", - "tid":"13797" - }, - { - "date":"1351276261", - "price":"7.64000", - "amount":"0.00050000", - "tid":"13798" - }, - { - "date":"1351276261", - "price":"6.94049", - "amount":"1.00000000", - "tid":"13799" - }, - { - "date":"1351276382", - "price":"4.99999", - "amount":"12.81224000", - "tid":"13800" - }, - { - "date":"1351276520", - "price":"10.48999", - "amount":"1.00000000", - "tid":"13802" - }, - { - "date":"1351278515", - "price":"6.00000", - "amount":"1.66500000", - "tid":"13811" - }, - { - "date":"1351286897", - "price":"9.99990", - "amount":"1.00000000", - "tid":"13863" - }, - { - "date":"1351288214", - "price":"8.10000", - "amount":"0.37000000", - "tid":"13867" - }, - { - "date":"1351288214", - "price":"8.00000", - "amount":"3.81207000", - "tid":"13868" - }, - { - "date":"1351288218", - "price":"8.00000", - "amount":"1.04656000", - "tid":"13869" - }, - { - "date":"1351288220", - "price":"8.00000", - "amount":"0.14137000", - "tid":"13870" - }, - { - "date":"1351289431", - "price":"9.74000", - "amount":"1.00000000", - "tid":"13873" - }, - { - "date":"1351289540", - "price":"9.99990", - "amount":"1.00000000", - "tid":"13874" - }, - { - "date":"1351289558", - "price":"9.99990", - "amount":"2.00000000", - "tid":"13875" - }, - { - "date":"1351289702", - "price":"10.08856", - "amount":"1.49976000", - "tid":"13876" - }, - { - "date":"1351290391", - "price":"10.03872", - "amount":"0.75063000", - "tid":"13880" - }, - { - "date":"1351290408", - "price":"10.03872", - "amount":"0.64414000", - "tid":"13883" - }, - { - "date":"1351290479", - "price":"10.03873", - "amount":"1.00000000", - "tid":"13885" - }, - { - "date":"1351290490", - "price":"10.03873", - "amount":"1.50000000", - "tid":"13886" - }, - { - "date":"1351290502", - "price":"10.03873", - "amount":"1.50000000", - "tid":"13887" - }, - { - "date":"1351290509", - "price":"10.03873", - "amount":"1.50000000", - "tid":"13888" - }, - { - "date":"1351290518", - "price":"10.03873", - "amount":"1.50000000", - "tid":"13889" - }, - { - "date":"1351290543", - "price":"10.03873", - "amount":"2.00000000", - "tid":"13891" - }, - { - "date":"1351290565", - "price":"10.03873", - "amount":"2.00000000", - "tid":"13892" - }, - { - "date":"1351290585", - "price":"10.03873", - "amount":"1.00000000", - "tid":"13893" - }, - { - "date":"1351291024", - "price":"9.93141", - "amount":"0.37000000", - "tid":"13894" - }, - { - "date":"1351291331", - "price":"10.09367", - "amount":"2.00000000", - "tid":"13895" - }, - { - "date":"1351291360", - "price":"10.09367", - "amount":"3.00000000", - "tid":"13896" - }, - { - "date":"1351293508", - "price":"10.09253", - "amount":"3.96000000", - "tid":"13898" - }, - { - "date":"1351324489", - "price":"10.20080", - "amount":"2.70000000", - "tid":"13934" - }, - { - "date":"1351324621", - "price":"10.20081", - "amount":"0.12900000", - "tid":"13936" - }, - { - "date":"1351335227", - "price":"10.41000", - "amount":"4.49095100", - "tid":"13978" - }, - { - "date":"1351352849", - "price":"10.78310", - "amount":"7.60000000", - "tid":"14039" - }, - { - "date":"1351366773", - "price":"10.46681", - "amount":"5.00000000", - "tid":"14083" - }, - { - "date":"1351370796", - "price":"10.50389", - "amount":"94.42946000", - "tid":"14108" - }, - { - "date":"1351370796", - "price":"10.50388", - "amount":"12.00000000", - "tid":"14109" - }, - { - "date":"1351420829", - "price":"8.13000", - "amount":"0.72000000", - "tid":"14169" - }, - { - "date":"1351420829", - "price":"8.00000", - "amount":"4.00000000", - "tid":"14170" - }, - { - "date":"1351420829", - "price":"7.11000", - "amount":"1.40506000", - "tid":"14171" - }, - { - "date":"1351420892", - "price":"0.19999", - "amount":"14.00880000", - "tid":"14172" - }, - { - "date":"1351422195", - "price":"0.10999", - "amount":"3.67692000", - "tid":"14174" - }, - { - "date":"1351425601", - "price":"0.10999", - "amount":"20.27871000", - "tid":"14194" - }, - { - "date":"1351425645", - "price":"0.10999", - "amount":"14.28439000", - "tid":"14195" - }, - { - "date":"1351425685", - "price":"0.10999", - "amount":"21.39804000", - "tid":"14196" - }, - { - "date":"1351425735", - "price":"0.10999", - "amount":"5.35487000", - "tid":"14198" - }, - { - "date":"1351425777", - "price":"0.10999", - "amount":"4.83188000", - "tid":"14200" - }, - { - "date":"1351425975", - "price":"0.10999", - "amount":"1.21400000", - "tid":"14201" - }, - { - "date":"1351426012", - "price":"0.10999", - "amount":"0.90779000", - "tid":"14202" - }, - { - "date":"1351426084", - "price":"0.10999", - "amount":"2.03711000", - "tid":"14203" - }, - { - "date":"1351426224", - "price":"0.11001", - "amount":"4.00000000", - "tid":"14206" - }, - { - "date":"1351426247", - "price":"0.11999", - "amount":"4.17217000", - "tid":"14207" - }, - { - "date":"1351426407", - "price":"6.00000", - "amount":"1.00000000", - "tid":"14209" - }, - { - "date":"1351426433", - "price":"0.19999", - "amount":"6.09499000", - "tid":"14210" - }, - { - "date":"1351426459", - "price":"0.12001", - "amount":"4.00000000", - "tid":"14212" - }, - { - "date":"1351426473", - "price":"6.00000", - "amount":"0.10000000", - "tid":"14213" - }, - { - "date":"1351426486", - "price":"0.19999", - "amount":"1.04571000", - "tid":"14214" - }, - { - "date":"1351426498", - "price":"0.19999", - "amount":"0.20000000", - "tid":"14215" - }, - { - "date":"1351426500", - "price":"0.19999", - "amount":"1.04571000", - "tid":"14216" - }, - { - "date":"1351426549", - "price":"0.19999", - "amount":"0.94922000", - "tid":"14217" - }, - { - "date":"1351426586", - "price":"0.19999", - "amount":"0.71074000", - "tid":"14218" - }, - { - "date":"1351426639", - "price":"0.19999", - "amount":"0.53219000", - "tid":"14219" - }, - { - "date":"1351426669", - "price":"0.19999", - "amount":"0.79300000", - "tid":"14220" - }, - { - "date":"1351428993", - "price":"10.49900", - "amount":"3.00000000", - "tid":"14227" - }, - { - "date":"1351429251", - "price":"5.00001", - "amount":"2.75458000", - "tid":"14229" - }, - { - "date":"1351429299", - "price":"0.39999", - "amount":"1.77378000", - "tid":"14230" - }, - { - "date":"1351435629", - "price":"10.40000", - "amount":"1.00000000", - "tid":"14243" - }, - { - "date":"1351440762", - "price":"10.48000", - "amount":"5.12682517", - "tid":"14250" - }, - { - "date":"1351440993", - "price":"10.49000", - "amount":"1.00000000", - "tid":"14252" - }, - { - "date":"1351441033", - "price":"10.50000", - "amount":"3.39000000", - "tid":"14253" - }, - { - "date":"1351445331", - "price":"10.50388", - "amount":"19.00000000", - "tid":"14265" - }, - { - "date":"1351450247", - "price":"7.09999", - "amount":"1.37262000", - "tid":"14276" - }, - { - "date":"1351450296", - "price":"7.00199", - "amount":"0.68632000", - "tid":"14277" - }, - { - "date":"1351450498", - "price":"7.09999", - "amount":"1.02982000", - "tid":"14282" - }, - { - "date":"1351456364", - "price":"10.50388", - "amount":"2.00000000", - "tid":"14297" - }, - { - "date":"1351456402", - "price":"10.50388", - "amount":"2.00000000", - "tid":"14298" - }, - { - "date":"1351456439", - "price":"10.50388", - "amount":"2.50000000", - "tid":"14299" - }, - { - "date":"1351456512", - "price":"10.50388", - "amount":"1.11000000", - "tid":"14300" - }, - { - "date":"1351458466", - "price":"9.00000", - "amount":"0.29000000", - "tid":"14313" - }, - { - "date":"1351463719", - "price":"10.50388", - "amount":"3.46000000", - "tid":"14333" - }, - { - "date":"1351466404", - "price":"10.50388", - "amount":"0.95100000", - "tid":"14359" - }, - { - "date":"1351520484", - "price":"8.48001", - "amount":"1.79943000", - "tid":"14506" - }, - { - "date":"1351520812", - "price":"8.48000", - "amount":"1.91000000", - "tid":"14507" - }, - { - "date":"1351521367", - "price":"8.38000", - "amount":"0.74000000", - "tid":"14509" - }, - { - "date":"1351521709", - "price":"8.38000", - "amount":"5.00000000", - "tid":"14515" - }, - { - "date":"1351521768", - "price":"8.38000", - "amount":"0.55000000", - "tid":"14516" - }, - { - "date":"1351526334", - "price":"10.27000", - "amount":"2.87000000", - "tid":"14540" - }, - { - "date":"1351526334", - "price":"10.38000", - "amount":"7.83714837", - "tid":"14541" - }, - { - "date":"1351526334", - "price":"10.50388", - "amount":"4.29285163", - "tid":"14542" - }, - { - "date":"1351526360", - "price":"10.50388", - "amount":"0.03132626", - "tid":"14543" - }, - { - "date":"1351531694", - "price":"10.69494", - "amount":"1.30000000", - "tid":"14574" - }, - { - "date":"1351585333", - "price":"10.70969", - "amount":"8.91177000", - "tid":"14800" - }, - { - "date":"1351585421", - "price":"10.70970", - "amount":"7.00000000", - "tid":"14801" - }, - { - "date":"1351586003", - "price":"20.49999", - "amount":"1.00000000", - "tid":"14803" - }, - { - "date":"1351586102", - "price":"20.49999", - "amount":"1.23017000", - "tid":"14804" - }, - { - "date":"1351586148", - "price":"20.49999", - "amount":"6.00000000", - "tid":"14805" - }, - { - "date":"1351586255", - "price":"20.49999", - "amount":"9.99000000", - "tid":"14806" - }, - { - "date":"1351586417", - "price":"20.49999", - "amount":"6.77983000", - "tid":"14808" - }, - { - "date":"1351586813", - "price":"10.60000", - "amount":"1.00000000", - "tid":"14813" - }, - { - "date":"1351587035", - "price":"10.60000", - "amount":"18.00000000", - "tid":"14814" - }, - { - "date":"1351600843", - "price":"10.60000", - "amount":"8.00000000", - "tid":"14848" - }, - { - "date":"1351607902", - "price":"10.70000", - "amount":"20.00000000", - "tid":"14876" - }, - { - "date":"1351607950", - "price":"10.70000", - "amount":"1.54000000", - "tid":"14877" - }, - { - "date":"1351616730", - "price":"10.69999", - "amount":"11.15800000", - "tid":"14929" - }, - { - "date":"1351628985", - "price":"10.68000", - "amount":"2.00000000", - "tid":"14969" - }, - { - "date":"1351629506", - "price":"10.09001", - "amount":"8.00000000", - "tid":"14973" - }, - { - "date":"1351629529", - "price":"10.09001", - "amount":"7.35424000", - "tid":"14974" - }, - { - "date":"1351629530", - "price":"10.09000", - "amount":"0.64576000", - "tid":"14975" - }, - { - "date":"1351629543", - "price":"10.05000", - "amount":"1.03482800", - "tid":"14976" - }, - { - "date":"1351629543", - "price":"10.01111", - "amount":"5.00000000", - "tid":"14977" - }, - { - "date":"1351634117", - "price":"10.69999", - "amount":"14.65982600", - "tid":"14989" - }, - { - "date":"1351655693", - "price":"9.02597", - "amount":"1.08575500", - "tid":"15119" - }, - { - "date":"1351657037", - "price":"10.92361", - "amount":"0.09000000", - "tid":"15140" - }, - { - "date":"1351657208", - "price":"10.92361", - "amount":"4.39500000", - "tid":"15141" - }, - { - "date":"1351693383", - "price":"9.04149", - "amount":"24.00000000", - "tid":"15147" - }, - { - "date":"1351693434", - "price":"9.04149", - "amount":"0.50000000", - "tid":"15148" - }, - { - "date":"1351693813", - "price":"9.04149", - "amount":"7.74874000", - "tid":"15150" - }, - { - "date":"1351716925", - "price":"11.47000", - "amount":"0.87096774", - "tid":"15189" - }, - { - "date":"1351725592", - "price":"11.48000", - "amount":"0.50000000", - "tid":"15203" - }, - { - "date":"1351725649", - "price":"11.48887", - "amount":"8.45770000", - "tid":"15204" - }, - { - "date":"1351787503", - "price":"11.58886", - "amount":"0.10000000", - "tid":"15277" - }, - { - "date":"1351797233", - "price":"11.58887", - "amount":"13.15400120", - "tid":"15299" - }, - { - "date":"1351809410", - "price":"10.48854", - "amount":"2.71943000", - "tid":"15314" - }, - { - "date":"1351854084", - "price":"10.85000", - "amount":"1.39199252", - "tid":"15363" - }, - { - "date":"1351872387", - "price":"10.76684", - "amount":"0.26000000", - "tid":"15431" - }, - { - "date":"1351876482", - "price":"10.69506", - "amount":"2.33565700", - "tid":"15443" - }, - { - "date":"1351877002", - "price":"10.67516", - "amount":"2.52736300", - "tid":"15446" - }, - { - "date":"1351882700", - "price":"10.50850", - "amount":"5.00000000", - "tid":"15464" - }, - { - "date":"1351901521", - "price":"10.49999", - "amount":"0.54133384", - "tid":"15498" - }, - { - "date":"1351903478", - "price":"10.49999", - "amount":"2.84902000", - "tid":"15507" - }, - { - "date":"1351906835", - "price":"10.50000", - "amount":"1.09386666", - "tid":"15513" - }, - { - "date":"1351910101", - "price":"10.50000", - "amount":"8.90613334", - "tid":"15514" - }, - { - "date":"1351938433", - "price":"10.61364", - "amount":"1.12967000", - "tid":"15535" - }, - { - "date":"1351939526", - "price":"10.49999", - "amount":"1.01098000", - "tid":"15539" - }, - { - "date":"1351939527", - "price":"10.49367", - "amount":"1.00000000", - "tid":"15540" - }, - { - "date":"1351954184", - "price":"8.00001", - "amount":"1.98420000", - "tid":"15556" - }, - { - "date":"1352022565", - "price":"10.50000", - "amount":"3.00000000", - "tid":"15647" - }, - { - "date":"1352039472", - "price":"10.63598", - "amount":"9.52866000", - "tid":"15683" - }, - { - "date":"1352039643", - "price":"10.63599", - "amount":"1.42000000", - "tid":"15684" - }, - { - "date":"1352039759", - "price":"10.63598", - "amount":"1.35134000", - "tid":"15685" - }, - { - "date":"1352046520", - "price":"8.31889", - "amount":"23.40133000", - "tid":"15689" - }, - { - "date":"1352067406", - "price":"10.53628", - "amount":"3.00000000", - "tid":"15751" - }, - { - "date":"1352070639", - "price":"10.69999", - "amount":"0.44832000", - "tid":"15757" - }, - { - "date":"1352070640", - "price":"10.70000", - "amount":"6.48068000", - "tid":"15758" - }, - { - "date":"1352127769", - "price":"10.70000", - "amount":"1.80000000", - "tid":"15854" - }, - { - "date":"1352135304", - "price":"10.00000", - "amount":"0.85000000", - "tid":"15869" - }, - { - "date":"1352137335", - "price":"10.00000", - "amount":"0.00200000", - "tid":"15875" - }, - { - "date":"1352140256", - "price":"10.70000", - "amount":"2.14700000", - "tid":"15885" - }, - { - "date":"1352143112", - "price":"8.37427", - "amount":"1.43000000", - "tid":"15900" - }, - { - "date":"1352153322", - "price":"10.75717", - "amount":"2.09860800", - "tid":"15957" - }, - { - "date":"1352181478", - "price":"10.80089", - "amount":"7.81256000", - "tid":"16017" - }, - { - "date":"1352181479", - "price":"10.80090", - "amount":"7.68744000", - "tid":"16018" - }, - { - "date":"1352189155", - "price":"10.63318", - "amount":"1.97173000", - "tid":"16032" - }, - { - "date":"1352190108", - "price":"10.62684", - "amount":"0.92065431", - "tid":"16033" - }, - { - "date":"1352195428", - "price":"10.81199", - "amount":"5.50000000", - "tid":"16041" - }, - { - "date":"1352246077", - "price":"10.87756", - "amount":"9.17500000", - "tid":"16190" - }, - { - "date":"1352332727", - "price":"10.92626", - "amount":"10.00000000", - "tid":"16452" - }, - { - "date":"1352343408", - "price":"11.02396", - "amount":"2.06031000", - "tid":"16474" - }, - { - "date":"1352344177", - "price":"11.02959", - "amount":"9.26600000", - "tid":"16476" - }, - { - "date":"1352359804", - "price":"11.09551", - "amount":"0.90000000", - "tid":"16486" - }, - { - "date":"1352383332", - "price":"11.01695", - "amount":"3.17450000", - "tid":"16525" - }, - { - "date":"1352453049", - "price":"10.71797", - "amount":"1.00000000", - "tid":"16657" - }, - { - "date":"1352487064", - "price":"10.96200", - "amount":"5.60000000", - "tid":"16726" - }, - { - "date":"1352492648", - "price":"11.02977", - "amount":"1.57242000", - "tid":"16802" - }, - { - "date":"1352492703", - "price":"11.02977", - "amount":"2.28292000", - "tid":"16805" - }, - { - "date":"1352492703", - "price":"11.02978", - "amount":"12.00000000", - "tid":"16806" - }, - { - "date":"1352492703", - "price":"11.03626", - "amount":"49.71708000", - "tid":"16807" - }, - { - "date":"1352540708", - "price":"10.71308", - "amount":"12.87539000", - "tid":"16925" - }, - { - "date":"1352540708", - "price":"10.71307", - "amount":"20.00000000", - "tid":"16926" - }, - { - "date":"1352555667", - "price":"10.90000", - "amount":"1.30000000", - "tid":"16952" - }, - { - "date":"1352583120", - "price":"10.94942", - "amount":"4.00514000", - "tid":"16998" - }, - { - "date":"1352583267", - "price":"10.94943", - "amount":"16.64000000", - "tid":"16999" - }, - { - "date":"1352602599", - "price":"11.67696", - "amount":"4.00000000", - "tid":"17021" - }, - { - "date":"1352661494", - "price":"10.79999", - "amount":"1.31234720", - "tid":"17084" - }, - { - "date":"1352662056", - "price":"10.46515", - "amount":"1.02700000", - "tid":"17086" - }, - { - "date":"1352755685", - "price":"11.00000", - "amount":"0.12000000", - "tid":"17224" - }, - { - "date":"1352773296", - "price":"10.91114", - "amount":"8.60000000", - "tid":"17235" - }, - { - "date":"1352897204", - "price":"10.94671", - "amount":"20.00000000", - "tid":"17498" - }, - { - "date":"1352907277", - "price":"11.07067", - "amount":"0.90200000", - "tid":"17514" - }, - { - "date":"1352932928", - "price":"10.86117", - "amount":"1.52556000", - "tid":"17566" - }, - { - "date":"1352940792", - "price":"11.08601", - "amount":"2.00000000", - "tid":"17578" - }, - { - "date":"1352941394", - "price":"11.08601", - "amount":"0.50000000", - "tid":"17581" - }, - { - "date":"1352981070", - "price":"10.99898", - "amount":"2.34000000", - "tid":"17650" - }, - { - "date":"1353027969", - "price":"11.09000", - "amount":"1.00000000", - "tid":"17737" - }, - { - "date":"1353045278", - "price":"11.09000", - "amount":"0.39950000", - "tid":"17780" - }, - { - "date":"1353045524", - "price":"11.10207", - "amount":"5.00000000", - "tid":"17782" - }, - { - "date":"1353073452", - "price":"11.42820", - "amount":"7.00000000", - "tid":"17895" - }, - { - "date":"1353085084", - "price":"11.53000", - "amount":"3.50000000", - "tid":"17930" - }, - { - "date":"1353085229", - "price":"11.53000", - "amount":"0.13952200", - "tid":"17932" - }, - { - "date":"1353093953", - "price":"11.53000", - "amount":"5.17848307", - "tid":"17959" - }, - { - "date":"1353094063", - "price":"11.68457", - "amount":"10.09847000", - "tid":"17960" - }, - { - "date":"1353094063", - "price":"11.68458", - "amount":"6.00000000", - "tid":"17961" - }, - { - "date":"1353096660", - "price":"11.68458", - "amount":"0.60000000", - "tid":"17975" - }, - { - "date":"1353174771", - "price":"11.56985", - "amount":"4.89000000", - "tid":"18191" - }, - { - "date":"1353193157", - "price":"11.47194", - "amount":"2.56000000", - "tid":"18283" - }, - { - "date":"1353232226", - "price":"11.75982", - "amount":"4.92129000", - "tid":"18339" - }, - { - "date":"1353232295", - "price":"11.75929", - "amount":"1.44900000", - "tid":"18340" - }, - { - "date":"1353254208", - "price":"11.74080", - "amount":"0.83336000", - "tid":"18443" - }, - { - "date":"1353254255", - "price":"11.74081", - "amount":"8.50000000", - "tid":"18444" - }, - { - "date":"1353274294", - "price":"11.73012", - "amount":"3.14985000", - "tid":"18507" - }, - { - "date":"1353274295", - "price":"11.73013", - "amount":"1.35015000", - "tid":"18508" - }, - { - "date":"1353280673", - "price":"11.70184", - "amount":"14.00000000", - "tid":"18534" - }, - { - "date":"1353280744", - "price":"11.73507", - "amount":"2.64000000", - "tid":"18535" - }, - { - "date":"1353284014", - "price":"11.73507", - "amount":"0.76000000", - "tid":"18543" - }, - { - "date":"1353319223", - "price":"11.86970", - "amount":"9.06210000", - "tid":"18564" - }, - { - "date":"1353320820", - "price":"11.89518", - "amount":"11.00000000", - "tid":"18566" - }, - { - "date":"1353321581", - "price":"11.90187", - "amount":"1.00000000", - "tid":"18567" - }, - { - "date":"1353323840", - "price":"11.90187", - "amount":"1.00000000", - "tid":"18579" - }, - { - "date":"1353325180", - "price":"11.86970", - "amount":"1.05790000", - "tid":"18580" - }, - { - "date":"1353345181", - "price":"11.98387", - "amount":"6.70000000", - "tid":"18647" - }, - { - "date":"1353362911", - "price":"11.98622", - "amount":"1.04761599", - "tid":"18694" - }, - { - "date":"1353368850", - "price":"11.98400", - "amount":"10.00000000", - "tid":"18707" - }, - { - "date":"1353368876", - "price":"11.99014", - "amount":"6.67000000", - "tid":"18708" - }, - { - "date":"1353401453", - "price":"11.51452", - "amount":"2.19000000", - "tid":"18755" - }, - { - "date":"1353411343", - "price":"11.59020", - "amount":"22.29974000", - "tid":"18796" - }, - { - "date":"1353411344", - "price":"11.59019", - "amount":"20.00000000", - "tid":"18797" - }, - { - "date":"1353411398", - "price":"11.58338", - "amount":"20.00000000", - "tid":"18798" - }, - { - "date":"1353412513", - "price":"11.78719", - "amount":"4.40000000", - "tid":"18805" - }, - { - "date":"1353414639", - "price":"11.49119", - "amount":"3.16000000", - "tid":"18815" - }, - { - "date":"1353419152", - "price":"11.78719", - "amount":"0.50000000", - "tid":"18840" - }, - { - "date":"1353422914", - "price":"11.78719", - "amount":"0.06464000", - "tid":"18845" - }, - { - "date":"1353422914", - "price":"11.78720", - "amount":"0.28289000", - "tid":"18846" - }, - { - "date":"1353426699", - "price":"11.78720", - "amount":"6.17000000", - "tid":"18856" - }, - { - "date":"1353427555", - "price":"11.78720", - "amount":"6.27811100", - "tid":"18857" - }, - { - "date":"1353428417", - "price":"11.60000", - "amount":"2.00000000", - "tid":"18859" - }, - { - "date":"1353428432", - "price":"11.60000", - "amount":"2.00000000", - "tid":"18860" - }, - { - "date":"1353428468", - "price":"11.60000", - "amount":"2.86345300", - "tid":"18861" - }, - { - "date":"1353429676", - "price":"11.52928", - "amount":"1.94663000", - "tid":"18866" - }, - { - "date":"1353429677", - "price":"11.52927", - "amount":"5.00000000", - "tid":"18867" - }, - { - "date":"1353429677", - "price":"11.50364", - "amount":"16.00000000", - "tid":"18868" - }, - { - "date":"1353429871", - "price":"11.86034", - "amount":"5.17117000", - "tid":"18869" - }, - { - "date":"1353429871", - "price":"11.86035", - "amount":"2.82883000", - "tid":"18870" - }, - { - "date":"1353430602", - "price":"11.78902", - "amount":"4.20000000", - "tid":"18871" - }, - { - "date":"1353438761", - "price":"11.74686", - "amount":"3.40000000", - "tid":"18886" - }, - { - "date":"1353453819", - "price":"11.74686", - "amount":"5.10700000", - "tid":"18928" - }, - { - "date":"1353483253", - "price":"11.44898", - "amount":"2.69000000", - "tid":"18965" - }, - { - "date":"1353483254", - "price":"11.44604", - "amount":"14.07680000", - "tid":"18966" - }, - { - "date":"1353483254", - "price":"11.40475", - "amount":"4.00000000", - "tid":"18967" - }, - { - "date":"1353488852", - "price":"11.70326", - "amount":"10.96140000", - "tid":"18992" - }, - { - "date":"1353488965", - "price":"11.72053", - "amount":"0.15000000", - "tid":"18993" - }, - { - "date":"1353507134", - "price":"11.72861", - "amount":"2.90396000", - "tid":"19065" - }, - { - "date":"1353509524", - "price":"11.72861", - "amount":"4.96000000", - "tid":"19073" - }, - { - "date":"1353509698", - "price":"11.72861", - "amount":"11.13604000", - "tid":"19075" - }, - { - "date":"1353516847", - "price":"11.72999", - "amount":"1.45057000", - "tid":"19092" - }, - { - "date":"1353516847", - "price":"11.73000", - "amount":"0.67893000", - "tid":"19093" - }, - { - "date":"1353538059", - "price":"11.72999", - "amount":"0.72601000", - "tid":"19148" - }, - { - "date":"1353538594", - "price":"11.73000", - "amount":"7.50000000", - "tid":"19149" - }, - { - "date":"1353557960", - "price":"11.73000", - "amount":"2.95107000", - "tid":"19177" - }, - { - "date":"1353557960", - "price":"11.73964", - "amount":"97.04893000", - "tid":"19178" - }, - { - "date":"1353557995", - "price":"11.73964", - "amount":"0.17100000", - "tid":"19179" - }, - { - "date":"1353563861", - "price":"11.73964", - "amount":"0.72000000", - "tid":"19193" - }, - { - "date":"1353567046", - "price":"11.73964", - "amount":"0.84000000", - "tid":"19194" - }, - { - "date":"1353567331", - "price":"11.73964", - "amount":"1.22000000", - "tid":"19195" - }, - { - "date":"1353570122", - "price":"11.73964", - "amount":"0.00007000", - "tid":"19197" - }, - { - "date":"1353570122", - "price":"11.94387", - "amount":"18.99993000", - "tid":"19198" - }, - { - "date":"1353601705", - "price":"11.92000", - "amount":"1.07769000", - "tid":"19313" - }, - { - "date":"1353601705", - "price":"11.81388", - "amount":"18.92231000", - "tid":"19314" - }, - { - "date":"1353617800", - "price":"12.05880", - "amount":"4.80000000", - "tid":"19405" - }, - { - "date":"1353645012", - "price":"12.64240", - "amount":"2.52000000", - "tid":"19482" - }, - { - "date":"1353692387", - "price":"12.66216", - "amount":"0.78730000", - "tid":"19594" - }, - { - "date":"1353711979", - "price":"12.20000", - "amount":"19.00000000", - "tid":"19670" - }, - { - "date":"1353735048", - "price":"12.20000", - "amount":"2.53000000", - "tid":"19719" - }, - { - "date":"1353759618", - "price":"12.37162", - "amount":"0.10000000", - "tid":"19759" - }, - { - "date":"1353870022", - "price":"12.20246", - "amount":"3.77000000", - "tid":"20015" - }, - { - "date":"1353870022", - "price":"12.20000", - "amount":"1.25466000", - "tid":"20016" - }, - { - "date":"1353921575", - "price":"12.61836", - "amount":"5.54310000", - "tid":"20124" - }, - { - "date":"1353962842", - "price":"12.20001", - "amount":"0.97423228", - "tid":"20285" - }, - { - "date":"1353963871", - "price":"12.61064", - "amount":"0.80000000", - "tid":"20303" - }, - { - "date":"1353972207", - "price":"12.20001", - "amount":"10.60135000", - "tid":"20355" - }, - { - "date":"1353972207", - "price":"12.20000", - "amount":"35.11399000", - "tid":"20356" - }, - { - "date":"1353972232", - "price":"12.20000", - "amount":"10.60135000", - "tid":"20357" - }, - { - "date":"1353980566", - "price":"12.12274", - "amount":"3.52000000", - "tid":"20373" - }, - { - "date":"1353986096", - "price":"12.43044", - "amount":"2.99000000", - "tid":"20389" - }, - { - "date":"1353991804", - "price":"12.39604", - "amount":"0.97400000", - "tid":"20390" - }, - { - "date":"1354010917", - "price":"11.95332", - "amount":"1.00000000", - "tid":"20413" - }, - { - "date":"1354010982", - "price":"11.80519", - "amount":"4.00000000", - "tid":"20414" - }, - { - "date":"1354010982", - "price":"11.79977", - "amount":"4.17790000", - "tid":"20415" - }, - { - "date":"1354011069", - "price":"11.79820", - "amount":"20.00000000", - "tid":"20416" - }, - { - "date":"1354014120", - "price":"12.00000", - "amount":"13.41000000", - "tid":"20431" - }, - { - "date":"1354033685", - "price":"12.00000", - "amount":"2.41000000", - "tid":"20538" - }, - { - "date":"1354056320", - "price":"12.00000", - "amount":"9.00160000", - "tid":"20645" - }, - { - "date":"1354056501", - "price":"12.11845", - "amount":"3.46120000", - "tid":"20648" - }, - { - "date":"1354070739", - "price":"12.20893", - "amount":"6.13000000", - "tid":"20694" - }, - { - "date":"1354123268", - "price":"12.39785", - "amount":"5.00000000", - "tid":"20878" - }, - { - "date":"1354123296", - "price":"12.39785", - "amount":"0.99000000", - "tid":"20879" - }, - { - "date":"1354125100", - "price":"12.39785", - "amount":"0.01000000", - "tid":"20887" - }, - { - "date":"1354126701", - "price":"11.90625", - "amount":"4.00000000", - "tid":"20898" - }, - { - "date":"1354130711", - "price":"11.90625", - "amount":"8.00000000", - "tid":"20911" - }, - { - "date":"1354143343", - "price":"12.34273", - "amount":"3.00000000", - "tid":"20961" - }, - { - "date":"1354170206", - "price":"11.88329", - "amount":"3.00000000", - "tid":"21009" - }, - { - "date":"1354170524", - "price":"0.75244", - "amount":"0.97000000", - "tid":"21012" - }, - { - "date":"1354171695", - "price":"12.35598", - "amount":"2.90000000", - "tid":"21017" - }, - { - "date":"1354192903", - "price":"12.35599", - "amount":"5.00000000", - "tid":"21063" - }, - { - "date":"1354218531", - "price":"12.38258", - "amount":"1.30000000", - "tid":"21117" - }, - { - "date":"1354218592", - "price":"12.50000", - "amount":"1.00000000", - "tid":"21118" - }, - { - "date":"1354218602", - "price":"12.50000", - "amount":"1.00000000", - "tid":"21119" - }, - { - "date":"1354218610", - "price":"12.50000", - "amount":"1.00000000", - "tid":"21120" - }, - { - "date":"1354218616", - "price":"12.50000", - "amount":"1.00000000", - "tid":"21121" - }, - { - "date":"1354218620", - "price":"12.50000", - "amount":"1.00000000", - "tid":"21122" - }, - { - "date":"1354218625", - "price":"12.50000", - "amount":"1.00000000", - "tid":"21123" - }, - { - "date":"1354218698", - "price":"12.50000", - "amount":"0.70581200", - "tid":"21126" - }, - { - "date":"1354235687", - "price":"12.00000", - "amount":"2.60000000", - "tid":"21167" - }, - { - "date":"1354343204", - "price":"12.50000", - "amount":"0.95920000", - "tid":"21340" - }, - { - "date":"1354402966", - "price":"12.49998", - "amount":"0.50000000", - "tid":"21493" - }, - { - "date":"1354403050", - "price":"12.50000", - "amount":"2.33498800", - "tid":"21495" - }, - { - "date":"1354403077", - "price":"12.55188", - "amount":"15.00000000", - "tid":"21496" - }, - { - "date":"1354403199", - "price":"13.11926", - "amount":"1.23337100", - "tid":"21497" - }, - { - "date":"1354462093", - "price":"12.67024", - "amount":"0.50000000", - "tid":"21594" - }, - { - "date":"1354462118", - "price":"12.36844", - "amount":"2.21000000", - "tid":"21595" - }, - { - "date":"1354462615", - "price":"12.67024", - "amount":"1.00000000", - "tid":"21596" - }, - { - "date":"1354462995", - "price":"12.67024", - "amount":"5.00000000", - "tid":"21601" - }, - { - "date":"1354464271", - "price":"12.67868", - "amount":"1.00000000", - "tid":"21602" - }, - { - "date":"1354464271", - "price":"12.68798", - "amount":"0.30000000", - "tid":"21603" - }, - { - "date":"1354464420", - "price":"12.70000", - "amount":"4.00000000", - "tid":"21604" - }, - { - "date":"1354465322", - "price":"12.70000", - "amount":"3.00000000", - "tid":"21610" - }, - { - "date":"1354472505", - "price":"13.05000", - "amount":"1.30000000", - "tid":"21640" - }, - { - "date":"1354482472", - "price":"12.49091", - "amount":"2.09381194", - "tid":"21685" - }, - { - "date":"1354536518", - "price":"12.68569", - "amount":"19.73001000", - "tid":"21787" - }, - { - "date":"1354537287", - "price":"12.68569", - "amount":"0.46999000", - "tid":"21792" - }, - { - "date":"1354649205", - "price":"12.80000", - "amount":"0.72000000", - "tid":"22152" - }, - { - "date":"1354656711", - "price":"13.15234", - "amount":"2.80000000", - "tid":"22217" - }, - { - "date":"1354656711", - "price":"13.23492", - "amount":"0.60132000", - "tid":"22218" - }, - { - "date":"1354656712", - "price":"13.23493", - "amount":"0.89868000", - "tid":"22219" - }, - { - "date":"1354719432", - "price":"13.52277", - "amount":"7.40000000", - "tid":"22370" - }, - { - "date":"1354729248", - "price":"13.08347", - "amount":"4.80000000", - "tid":"22387" - }, - { - "date":"1354729248", - "price":"13.07903", - "amount":"8.19660000", - "tid":"22388" - }, - { - "date":"1354777686", - "price":"13.45408", - "amount":"7.86900000", - "tid":"22458" - }, - { - "date":"1354779874", - "price":"13.49157", - "amount":"0.76000000", - "tid":"22459" - }, - { - "date":"1354792973", - "price":"13.49636", - "amount":"9.26227000", - "tid":"22530" - }, - { - "date":"1354794855", - "price":"13.49636", - "amount":"1.00000000", - "tid":"22564" - }, - { - "date":"1354801237", - "price":"13.46070", - "amount":"20.00000000", - "tid":"22580" - }, - { - "date":"1354801475", - "price":"12.16174", - "amount":"0.50000000", - "tid":"22581" - }, - { - "date":"1354804096", - "price":"13.38678", - "amount":"4.00000000", - "tid":"22597" - }, - { - "date":"1354805184", - "price":"13.49636", - "amount":"9.41000000", - "tid":"22603" - }, - { - "date":"1354807415", - "price":"13.49636", - "amount":"0.88912862", - "tid":"22609" - }, - { - "date":"1354811634", - "price":"13.64759", - "amount":"0.82000000", - "tid":"22619" - }, - { - "date":"1354811701", - "price":"13.66946", - "amount":"0.75000000", - "tid":"22620" - }, - { - "date":"1354813036", - "price":"13.68847", - "amount":"3.80000000", - "tid":"22621" - }, - { - "date":"1354813672", - "price":"13.39831", - "amount":"1.00000000", - "tid":"22624" - }, - { - "date":"1354813672", - "price":"13.30001", - "amount":"40.98838000", - "tid":"22625" - }, - { - "date":"1354813673", - "price":"13.30000", - "amount":"19.41162000", - "tid":"22626" - }, - { - "date":"1354813694", - "price":"13.30000", - "amount":"1.00000000", - "tid":"22628" - }, - { - "date":"1354821541", - "price":"13.71658", - "amount":"2.98900000", - "tid":"22638" - }, - { - "date":"1354823392", - "price":"13.71658", - "amount":"2.33000000", - "tid":"22644" - }, - { - "date":"1354825754", - "price":"13.71658", - "amount":"14.00000000", - "tid":"22651" - }, - { - "date":"1354838964", - "price":"13.11230", - "amount":"20.23068000", - "tid":"22693" - }, - { - "date":"1354839000", - "price":"13.11229", - "amount":"5.00000000", - "tid":"22694" - }, - { - "date":"1354850210", - "price":"13.39691", - "amount":"0.51000000", - "tid":"22710" - }, - { - "date":"1354870877", - "price":"13.44010", - "amount":"1.00000000", - "tid":"22750" - }, - { - "date":"1354878156", - "price":"13.54211", - "amount":"1.00000000", - "tid":"22769" - }, - { - "date":"1354884037", - "price":"13.70428", - "amount":"7.27000000", - "tid":"22788" - }, - { - "date":"1354910249", - "price":"13.59346", - "amount":"0.51000000", - "tid":"22887" - }, - { - "date":"1354911820", - "price":"13.59833", - "amount":"1.24990000", - "tid":"22891" - }, - { - "date":"1354915531", - "price":"13.60364", - "amount":"0.28000000", - "tid":"22909" - }, - { - "date":"1354916433", - "price":"13.60364", - "amount":"26.70670000", - "tid":"22921" - }, - { - "date":"1354917020", - "price":"12.16310", - "amount":"5.00000000", - "tid":"22922" - }, - { - "date":"1354917020", - "price":"12.14824", - "amount":"0.50000000", - "tid":"22923" - }, - { - "date":"1354917058", - "price":"10.45928", - "amount":"10.47241000", - "tid":"22924" - }, - { - "date":"1354918351", - "price":"13.51486", - "amount":"5.00000000", - "tid":"22925" - }, - { - "date":"1354922147", - "price":"13.43825", - "amount":"1.32000000", - "tid":"22927" - }, - { - "date":"1354922190", - "price":"13.49999", - "amount":"12.70000000", - "tid":"22928" - }, - { - "date":"1354933982", - "price":"13.57436", - "amount":"3.91000000", - "tid":"22935" - }, - { - "date":"1354960583", - "price":"13.51452", - "amount":"10.50000000", - "tid":"22948" - }, - { - "date":"1354962183", - "price":"12.49111", - "amount":"30.13063000", - "tid":"22953" - }, - { - "date":"1354962330", - "price":"12.49110", - "amount":"4.57000000", - "tid":"22954" - }, - { - "date":"1354995598", - "price":"13.34373", - "amount":"14.00000000", - "tid":"23000" - }, - { - "date":"1355044803", - "price":"13.37424", - "amount":"5.00000000", - "tid":"23102" - }, - { - "date":"1355044907", - "price":"13.11850", - "amount":"5.00000000", - "tid":"23104" - }, - { - "date":"1355046016", - "price":"13.39170", - "amount":"10.00000000", - "tid":"23109" - }, - { - "date":"1355046309", - "price":"13.39170", - "amount":"1.13409000", - "tid":"23111" - }, - { - "date":"1355046310", - "price":"13.39171", - "amount":"5.52997223", - "tid":"23112" - }, - { - "date":"1355063586", - "price":"12.91812", - "amount":"11.55986000", - "tid":"23201" - }, - { - "date":"1355063587", - "price":"12.91811", - "amount":"15.00000000", - "tid":"23202" - }, - { - "date":"1355063617", - "price":"3.39568", - "amount":"5.00000000", - "tid":"23203" - }, - { - "date":"1355063642", - "price":"3.39568", - "amount":"2.00000000", - "tid":"23204" - }, - { - "date":"1355063962", - "price":"13.12900", - "amount":"1.46000000", - "tid":"23205" - }, - { - "date":"1355080963", - "price":"13.25517", - "amount":"1.73329400", - "tid":"23261" - }, - { - "date":"1355153053", - "price":"13.21784", - "amount":"0.50000000", - "tid":"23485" - }, - { - "date":"1355168802", - "price":"13.47067", - "amount":"1.00000000", - "tid":"23615" - }, - { - "date":"1355179692", - "price":"13.47066", - "amount":"0.65981000", - "tid":"23640" - }, - { - "date":"1355179796", - "price":"13.47067", - "amount":"6.54101000", - "tid":"23641" - }, - { - "date":"1355181875", - "price":"13.47067", - "amount":"0.72700000", - "tid":"23648" - }, - { - "date":"1355219790", - "price":"13.47125", - "amount":"2.50000000", - "tid":"23726" - }, - { - "date":"1355229238", - "price":"13.56115", - "amount":"20.60000000", - "tid":"23756" - }, - { - "date":"1355266645", - "price":"13.56115", - "amount":"1.84719000", - "tid":"23907" - }, - { - "date":"1355267026", - "price":"13.56115", - "amount":"5.31200000", - "tid":"23910" - }, - { - "date":"1355343161", - "price":"13.64999", - "amount":"0.13251200", - "tid":"24127" - }, - { - "date":"1355350928", - "price":"13.25000", - "amount":"4.57000000", - "tid":"24166" - }, - { - "date":"1355358865", - "price":"13.25000", - "amount":"7.39622000", - "tid":"24173" - }, - { - "date":"1355358984", - "price":"13.25000", - "amount":"84.71110000", - "tid":"24174" - }, - { - "date":"1355361912", - "price":"13.25000", - "amount":"1.67000000", - "tid":"24177" - }, - { - "date":"1355362063", - "price":"13.25000", - "amount":"1.62526800", - "tid":"24178" - }, - { - "date":"1355362443", - "price":"13.25000", - "amount":"0.02741200", - "tid":"24179" - }, - { - "date":"1355363852", - "price":"13.65000", - "amount":"1.62149300", - "tid":"24181" - }, - { - "date":"1355384713", - "price":"13.64999", - "amount":"0.35900000", - "tid":"24196" - }, - { - "date":"1355392331", - "price":"13.64999", - "amount":"0.14400000", - "tid":"24205" - }, - { - "date":"1355770670", - "price":"13.24795", - "amount":"0.89000000", - "tid":"25221" - }, - { - "date":"1355773096", - "price":"13.24795", - "amount":"0.85000000", - "tid":"25238" - }, - { - "date":"1355773874", - "price":"13.33727", - "amount":"5.45463950", - "tid":"25250" - }, - { - "date":"1355776831", - "price":"13.33637", - "amount":"5.00000000", - "tid":"25274" - }, - { - "date":"1355776936", - "price":"13.33637", - "amount":"2.49000000", - "tid":"25275" - }, - { - "date":"1355776936", - "price":"13.33727", - "amount":"3.41980000", - "tid":"25276" - }, - { - "date":"1355782278", - "price":"13.33727", - "amount":"11.63656900", - "tid":"25318" - }, - { - "date":"1355785703", - "price":"13.33727", - "amount":"7.26000000", - "tid":"25332" - }, - { - "date":"1355794334", - "price":"13.33727", - "amount":"3.60000000", - "tid":"25363" - }, - { - "date":"1355797287", - "price":"13.33726", - "amount":"8.09000000", - "tid":"25368" - }, - { - "date":"1355806434", - "price":"13.33726", - "amount":"4.88000000", - "tid":"25375" - }, - { - "date":"1355808492", - "price":"13.33726", - "amount":"0.94547100", - "tid":"25385" - }, - { - "date":"1355825603", - "price":"13.43700", - "amount":"1.00000000", - "tid":"25436" - }, - { - "date":"1355834899", - "price":"13.43405", - "amount":"7.21720000", - "tid":"25493" - }, - { - "date":"1355848542", - "price":"13.43404", - "amount":"1.00000000", - "tid":"25587" - }, - { - "date":"1355848580", - "price":"13.43404", - "amount":"1.00000000", - "tid":"25589" - }, - { - "date":"1355862105", - "price":"13.41998", - "amount":"0.71137661", - "tid":"25690" - }, - { - "date":"1355880220", - "price":"12.56600", - "amount":"1.01000000", - "tid":"25767" - }, - { - "date":"1355880393", - "price":"13.41998", - "amount":"0.94570000", - "tid":"25768" - }, - { - "date":"1355896270", - "price":"13.30401", - "amount":"45.42320000", - "tid":"25779" - }, - { - "date":"1355983764", - "price":"12.46160", - "amount":"5.00000000", - "tid":"26060" - }, - { - "date":"1355983805", - "price":"12.46160", - "amount":"1.04000000", - "tid":"26061" - }, - { - "date":"1355986979", - "price":"12.46160", - "amount":"2.10000000", - "tid":"26063" - }, - { - "date":"1355991316", - "price":"12.46160", - "amount":"12.68000000", - "tid":"26066" - }, - { - "date":"1355995168", - "price":"12.46160", - "amount":"5.58500000", - "tid":"26069" - }, - { - "date":"1356100519", - "price":"13.77974", - "amount":"3.10000000", - "tid":"26367" - }, - { - "date":"1356126723", - "price":"13.67059", - "amount":"1.00000000", - "tid":"26471" - }, - { - "date":"1356126803", - "price":"13.67058", - "amount":"6.60000000", - "tid":"26472" - }, - { - "date":"1356198749", - "price":"13.29676", - "amount":"0.09000000", - "tid":"26574" - }, - { - "date":"1356198944", - "price":"13.52862", - "amount":"0.09000000", - "tid":"26575" - }, - { - "date":"1356199022", - "price":"13.29676", - "amount":"0.09000000", - "tid":"26576" - }, - { - "date":"1356205641", - "price":"13.52862", - "amount":"2.00000000", - "tid":"26588" - }, - { - "date":"1356309461", - "price":"13.44773", - "amount":"2.91000000", - "tid":"26820" - }, - { - "date":"1356322901", - "price":"13.45034", - "amount":"1.00000000", - "tid":"26833" - }, - { - "date":"1356423312", - "price":"12.52862", - "amount":"0.09000000", - "tid":"26987" - }, - { - "date":"1356470866", - "price":"12.52862", - "amount":"0.31200000", - "tid":"27049" - }, - { - "date":"1356511808", - "price":"12.52862", - "amount":"0.94800000", - "tid":"27072" - }, - { - "date":"1356547350", - "price":"13.45034", - "amount":"8.10000000", - "tid":"27132" - }, - { - "date":"1356630930", - "price":"13.45035", - "amount":"11.89980000", - "tid":"27306" - }, - { - "date":"1356681151", - "price":"13.40000", - "amount":"2.00000000", - "tid":"27403" - }, - { - "date":"1356681172", - "price":"13.30001", - "amount":"16.34481000", - "tid":"27404" - }, - { - "date":"1356698884", - "price":"13.40495", - "amount":"5.10000000", - "tid":"27450" - }, - { - "date":"1356777722", - "price":"13.48000", - "amount":"0.11000000", - "tid":"27634" - }, - { - "date":"1356777839", - "price":"13.49999", - "amount":"7.14942825", - "tid":"27636" - }, - { - "date":"1356830248", - "price":"13.42567", - "amount":"13.72743400", - "tid":"27814" - }, - { - "date":"1356878605", - "price":"13.49999", - "amount":"3.95000000", - "tid":"27872" - }, - { - "date":"1356987260", - "price":"13.50000", - "amount":"3.23330000", - "tid":"28007" - }, - { - "date":"1357066358", - "price":"13.49999", - "amount":"31.30000000", - "tid":"28080" - }, - { - "date":"1357066359", - "price":"13.50000", - "amount":"9.00000000", - "tid":"28081" - }, - { - "date":"1357104972", - "price":"13.07477", - "amount":"0.50000000", - "tid":"28111" - }, - { - "date":"1357166785", - "price":"13.36816", - "amount":"18.14340000", - "tid":"28248" - }, - { - "date":"1357213958", - "price":"13.21701", - "amount":"0.50000000", - "tid":"28280" - }, - { - "date":"1357301892", - "price":"13.00900", - "amount":"1.01052290", - "tid":"28446" - }, - { - "date":"1357301892", - "price":"12.92459", - "amount":"18.93263710", - "tid":"28447" - }, - { - "date":"1357313971", - "price":"13.36816", - "amount":"17.70000000", - "tid":"28484" - }, - { - "date":"1357334522", - "price":"10.28299", - "amount":"9.00000000", - "tid":"28507" - }, - { - "date":"1357417640", - "price":"13.12568", - "amount":"2.00000000", - "tid":"28602" - }, - { - "date":"1357418569", - "price":"13.12568", - "amount":"0.50816000", - "tid":"28604" - }, - { - "date":"1357418714", - "price":"13.29743", - "amount":"0.98180300", - "tid":"28605" - }, - { - "date":"1357503016", - "price":"13.11111", - "amount":"4.00000000", - "tid":"28725" - }, - { - "date":"1357601158", - "price":"13.34999", - "amount":"8.71940000", - "tid":"28925" - }, - { - "date":"1357616469", - "price":"13.34999", - "amount":"9.10000000", - "tid":"28969" - }, - { - "date":"1357626097", - "price":"13.34999", - "amount":"10.65035000", - "tid":"28972" - }, - { - "date":"1357626098", - "price":"13.35000", - "amount":"14.98000000", - "tid":"28973" - }, - { - "date":"1357626098", - "price":"13.36817", - "amount":"74.36965000", - "tid":"28974" - }, - { - "date":"1357626148", - "price":"13.36817", - "amount":"15.80000000", - "tid":"28975" - }, - { - "date":"1357626344", - "price":"13.36817", - "amount":"9.82800000", - "tid":"28976" - }, - { - "date":"1357631779", - "price":"13.11369", - "amount":"4.94252000", - "tid":"28979" - }, - { - "date":"1357631783", - "price":"13.11369", - "amount":"0.05748000", - "tid":"28980" - }, - { - "date":"1357631783", - "price":"13.11111", - "amount":"5.00000000", - "tid":"28981" - }, - { - "date":"1357631784", - "price":"12.85990", - "amount":"0.12100000", - "tid":"28982" - }, - { - "date":"1357633298", - "price":"10.43999", - "amount":"2.24296000", - "tid":"28989" - }, - { - "date":"1357634103", - "price":"10.49998", - "amount":"1.57000000", - "tid":"28990" - }, - { - "date":"1357634547", - "price":"10.49997", - "amount":"100.00000000", - "tid":"28991" - }, - { - "date":"1357636094", - "price":"10.49996", - "amount":"0.10000000", - "tid":"29002" - }, - { - "date":"1357636167", - "price":"10.49979", - "amount":"0.10500000", - "tid":"29003" - }, - { - "date":"1357636640", - "price":"10.49979", - "amount":"2.72014000", - "tid":"29004" - }, - { - "date":"1357638032", - "price":"10.50999", - "amount":"0.73342000", - "tid":"29005" - }, - { - "date":"1357640054", - "price":"10.54999", - "amount":"0.55099000", - "tid":"29027" - }, - { - "date":"1357640765", - "price":"10.59999", - "amount":"0.09600000", - "tid":"29030" - }, - { - "date":"1357642725", - "price":"13.68607", - "amount":"0.31609000", - "tid":"29032" - }, - { - "date":"1357642726", - "price":"13.68608", - "amount":"4.58391000", - "tid":"29033" - }, - { - "date":"1357653075", - "price":"13.68840", - "amount":"0.76177000", - "tid":"29074" - }, - { - "date":"1357653160", - "price":"13.68841", - "amount":"3.35083548", - "tid":"29076" - }, - { - "date":"1357657306", - "price":"13.25020", - "amount":"0.41879769", - "tid":"29111" - }, - { - "date":"1357657429", - "price":"13.25052", - "amount":"0.18903716", - "tid":"29114" - }, - { - "date":"1357657590", - "price":"13.25100", - "amount":"0.09451858", - "tid":"29116" - }, - { - "date":"1357657647", - "price":"13.25117", - "amount":"0.26477600", - "tid":"29118" - }, - { - "date":"1357804195", - "price":"13.50000", - "amount":"4.35600000", - "tid":"29458" - }, - { - "date":"1357809148", - "price":"10.74999", - "amount":"0.70150000", - "tid":"29475" - }, - { - "date":"1357819122", - "price":"12.00000", - "amount":"0.20000000", - "tid":"29491" - }, - { - "date":"1357819183", - "price":"12.00000", - "amount":"0.20000000", - "tid":"29492" - }, - { - "date":"1357820022", - "price":"12.00000", - "amount":"0.40000000", - "tid":"29497" - }, - { - "date":"1357830114", - "price":"13.50000", - "amount":"0.04400000", - "tid":"29528" - }, - { - "date":"1357907604", - "price":"13.98020", - "amount":"4.90000000", - "tid":"29687" - }, - { - "date":"1357947854", - "price":"14.00000", - "amount":"0.20000000", - "tid":"29836" - }, - { - "date":"1358140999", - "price":"14.00000", - "amount":"0.74000000", - "tid":"30276" - }, - { - "date":"1358163243", - "price":"13.67409", - "amount":"5.00000000", - "tid":"30340" - }, - { - "date":"1358163243", - "price":"13.66978", - "amount":"4.99950000", - "tid":"30341" - }, - { - "date":"1358259907", - "price":"14.10000", - "amount":"1.00000000", - "tid":"30885" - }, - { - "date":"1358260021", - "price":"14.20049", - "amount":"0.42079000", - "tid":"30890" - }, - { - "date":"1358260470", - "price":"13.50000", - "amount":"0.84570000", - "tid":"30914" - }, - { - "date":"1358260808", - "price":"14.24599", - "amount":"1.10000000", - "tid":"30917" - }, - { - "date":"1358260855", - "price":"14.24598", - "amount":"1.10000000", - "tid":"30918" - }, - { - "date":"1358261459", - "price":"14.24699", - "amount":"0.64119200", - "tid":"30919" - }, - { - "date":"1358276855", - "price":"14.28498", - "amount":"0.65784000", - "tid":"31070" - }, - { - "date":"1358373899", - "price":"14.67452", - "amount":"5.00000000", - "tid":"31459" - }, - { - "date":"1358375811", - "price":"14.67998", - "amount":"4.90000000", - "tid":"31487" - }, - { - "date":"1358435503", - "price":"14.98997", - "amount":"1.57615000", - "tid":"31656" - }, - { - "date":"1358436210", - "price":"14.98997", - "amount":"1.49219000", - "tid":"31658" - }, - { - "date":"1358436214", - "price":"14.98997", - "amount":"2.23905000", - "tid":"31659" - }, - { - "date":"1358436883", - "price":"15.16220", - "amount":"0.62000000", - "tid":"31661" - }, - { - "date":"1358436914", - "price":"15.16394", - "amount":"5.07261000", - "tid":"31662" - }, - { - "date":"1358437146", - "price":"15.25617", - "amount":"4.00000000", - "tid":"31664" - }, - { - "date":"1358452042", - "price":"15.50159", - "amount":"0.25000000", - "tid":"31752" - }, - { - "date":"1358491361", - "price":"15.82605", - "amount":"8.00000000", - "tid":"32069" - }, - { - "date":"1358582764", - "price":"15.00555", - "amount":"100.00000000", - "tid":"32503" - }, - { - "date":"1358602489", - "price":"15.40000", - "amount":"6.36363600", - "tid":"32582" - }, - { - "date":"1358617710", - "price":"15.60000", - "amount":"1.12500000", - "tid":"32610" - }, - { - "date":"1358618846", - "price":"15.60000", - "amount":"0.12400000", - "tid":"32611" - }, - { - "date":"1358735771", - "price":"16.00000", - "amount":"0.14690000", - "tid":"32773" - }, - { - "date":"1358751043", - "price":"16.00000", - "amount":"0.60000000", - "tid":"32788" - }, - { - "date":"1358754363", - "price":"16.00000", - "amount":"0.25310000", - "tid":"32797" - }, - { - "date":"1358756152", - "price":"16.25000", - "amount":"1.00000000", - "tid":"32809" - }, - { - "date":"1358775331", - "price":"16.31734", - "amount":"0.10250000", - "tid":"32867" - }, - { - "date":"1358778488", - "price":"16.30948", - "amount":"3.84500000", - "tid":"32883" - }, - { - "date":"1358801015", - "price":"16.40000", - "amount":"0.10250000", - "tid":"32944" - }, - { - "date":"1358806207", - "price":"16.66960", - "amount":"0.85000000", - "tid":"32979" - }, - { - "date":"1358808041", - "price":"16.92423", - "amount":"2.38400000", - "tid":"32985" - }, - { - "date":"1358812966", - "price":"16.95857", - "amount":"2.12282000", - "tid":"33002" - }, - { - "date":"1358817169", - "price":"16.95513", - "amount":"2.46000000", - "tid":"33019" - }, - { - "date":"1358841393", - "price":"16.85790", - "amount":"46.12251000", - "tid":"33047" - }, - { - "date":"1358842346", - "price":"16.85790", - "amount":"11.54187000", - "tid":"33052" - }, - { - "date":"1358842351", - "price":"16.85790", - "amount":"17.31859000", - "tid":"33053" - }, - { - "date":"1358842446", - "price":"16.85790", - "amount":"0.58590145", - "tid":"33054" - }, - { - "date":"1358844108", - "price":"16.85790", - "amount":"4.35129000", - "tid":"33058" - }, - { - "date":"1358844132", - "price":"16.85790", - "amount":"6.07983855", - "tid":"33059" - }, - { - "date":"1358847700", - "price":"17.02617", - "amount":"0.09800000", - "tid":"33076" - }, - { - "date":"1358858381", - "price":"17.26473", - "amount":"1.00000000", - "tid":"33133" - }, - { - "date":"1358860278", - "price":"17.45500", - "amount":"0.50000000", - "tid":"33181" - }, - { - "date":"1358860882", - "price":"17.52509", - "amount":"1.00000000", - "tid":"33182" - }, - { - "date":"1358862147", - "price":"17.45500", - "amount":"0.85000000", - "tid":"33192" - }, - { - "date":"1358862386", - "price":"17.45500", - "amount":"0.93620000", - "tid":"33193" - }, - { - "date":"1358862650", - "price":"17.52161", - "amount":"2.52348000", - "tid":"33194" - }, - { - "date":"1358862808", - "price":"17.60000", - "amount":"3.80000000", - "tid":"33195" - }, - { - "date":"1358863037", - "price":"17.49210", - "amount":"1.00000000", - "tid":"33196" - }, - { - "date":"1358863319", - "price":"17.45500", - "amount":"0.40000000", - "tid":"33197" - }, - { - "date":"1358863434", - "price":"17.45500", - "amount":"2.00000000", - "tid":"33198" - }, - { - "date":"1358870001", - "price":"17.45500", - "amount":"0.50000000", - "tid":"33225" - }, - { - "date":"1358873225", - "price":"17.45500", - "amount":"4.65337000", - "tid":"33227" - }, - { - "date":"1358877693", - "price":"17.76069", - "amount":"1.00000000", - "tid":"33232" - }, - { - "date":"1358877896", - "price":"17.99998", - "amount":"0.58629000", - "tid":"33235" - }, - { - "date":"1358879051", - "price":"17.99998", - "amount":"0.51371000", - "tid":"33242" - }, - { - "date":"1358899660", - "price":"17.45500", - "amount":"0.78347000", - "tid":"33337" - }, - { - "date":"1358903008", - "price":"17.45500", - "amount":"5.00000000", - "tid":"33370" - }, - { - "date":"1358922471", - "price":"17.45500", - "amount":"0.50990000", - "tid":"33510" - }, - { - "date":"1358923996", - "price":"17.45500", - "amount":"3.60000000", - "tid":"33513" - }, - { - "date":"1358924972", - "price":"17.45500", - "amount":"19.26706000", - "tid":"33518" - }, - { - "date":"1358925001", - "price":"17.19944", - "amount":"9.70941130", - "tid":"33519" - }, - { - "date":"1358940357", - "price":"17.27065", - "amount":"1.50042000", - "tid":"33546" - }, - { - "date":"1358940437", - "price":"17.27065", - "amount":"1.49958000", - "tid":"33549" - }, - { - "date":"1358969180", - "price":"17.00000", - "amount":"0.99950000", - "tid":"33617" - }, - { - "date":"1358979911", - "price":"17.50000", - "amount":"0.24440000", - "tid":"33645" - }, - { - "date":"1358998595", - "price":"18.04974", - "amount":"0.10000000", - "tid":"33692" - }, - { - "date":"1358999291", - "price":"18.04974", - "amount":"2.90000000", - "tid":"33693" - }, - { - "date":"1359023871", - "price":"18.43989", - "amount":"1.45313000", - "tid":"33774" - }, - { - "date":"1359024208", - "price":"18.44376", - "amount":"0.72802000", - "tid":"33775" - }, - { - "date":"1359044076", - "price":"19.00000", - "amount":"0.53255000", - "tid":"33859" - }, - { - "date":"1359054485", - "price":"18.55911", - "amount":"11.00000000", - "tid":"33939" - }, - { - "date":"1359056285", - "price":"18.55911", - "amount":"1.00000000", - "tid":"33954" - }, - { - "date":"1359057067", - "price":"18.55911", - "amount":"6.57095000", - "tid":"33967" - }, - { - "date":"1359057102", - "price":"18.55911", - "amount":"8.00277363", - "tid":"33968" - }, - { - "date":"1359057102", - "price":"18.03537", - "amount":"12.00000000", - "tid":"33969" - }, - { - "date":"1359059732", - "price":"17.00000", - "amount":"2.00000000", - "tid":"34004" - }, - { - "date":"1359059859", - "price":"17.00000", - "amount":"2.00000000", - "tid":"34006" - }, - { - "date":"1359059879", - "price":"17.00000", - "amount":"0.13550000", - "tid":"34007" - }, - { - "date":"1359059926", - "price":"16.99150", - "amount":"1.00000000", - "tid":"34008" - }, - { - "date":"1359060244", - "price":"16.52000", - "amount":"0.10729000", - "tid":"34010" - }, - { - "date":"1359065265", - "price":"16.99998", - "amount":"1.00000000", - "tid":"34057" - }, - { - "date":"1359071267", - "price":"17.28450", - "amount":"17.34000000", - "tid":"34092" - }, - { - "date":"1359077602", - "price":"16.52000", - "amount":"0.33998700", - "tid":"34111" - }, - { - "date":"1359077602", - "price":"16.51000", - "amount":"0.60000000", - "tid":"34112" - }, - { - "date":"1359077603", - "price":"16.50000", - "amount":"0.06001300", - "tid":"34113" - }, - { - "date":"1359077724", - "price":"16.50000", - "amount":"0.49033700", - "tid":"34114" - }, - { - "date":"1359077724", - "price":"16.49740", - "amount":"0.55035000", - "tid":"34115" - }, - { - "date":"1359077724", - "price":"16.30000", - "amount":"0.95931300", - "tid":"34116" - }, - { - "date":"1359077725", - "price":"16.30000", - "amount":"0.04068700", - "tid":"34117" - }, - { - "date":"1359081261", - "price":"16.26010", - "amount":"1.00000000", - "tid":"34122" - }, - { - "date":"1359081328", - "price":"16.00000", - "amount":"1.00000000", - "tid":"34123" - }, - { - "date":"1359081630", - "price":"17.04325", - "amount":"1.89000000", - "tid":"34124" - }, - { - "date":"1359099966", - "price":"17.08715", - "amount":"4.00000000", - "tid":"34148" - }, - { - "date":"1359103322", - "price":"16.94010", - "amount":"0.50000000", - "tid":"34161" - }, - { - "date":"1359105760", - "price":"16.77890", - "amount":"4.00000000", - "tid":"34170" - }, - { - "date":"1359106131", - "price":"16.99119", - "amount":"2.92186000", - "tid":"34173" - }, - { - "date":"1359106132", - "price":"16.99120", - "amount":"10.00000000", - "tid":"34174" - }, - { - "date":"1359107411", - "price":"17.07576", - "amount":"21.58000000", - "tid":"34176" - }, - { - "date":"1359107564", - "price":"16.81886", - "amount":"4.84707000", - "tid":"34177" - }, - { - "date":"1359109447", - "price":"17.01878", - "amount":"5.00000000", - "tid":"34186" - }, - { - "date":"1359109844", - "price":"16.82396", - "amount":"1.61307000", - "tid":"34187" - }, - { - "date":"1359187357", - "price":"17.20000", - "amount":"5.25714000", - "tid":"34364" - }, - { - "date":"1359187377", - "price":"16.60000", - "amount":"1.00000000", - "tid":"34365" - }, - { - "date":"1359217668", - "price":"17.12705", - "amount":"0.10000000", - "tid":"34496" - }, - { - "date":"1359218040", - "price":"17.12705", - "amount":"9.34480000", - "tid":"34497" - }, - { - "date":"1359219908", - "price":"17.19477", - "amount":"1.00000000", - "tid":"34511" - }, - { - "date":"1359222888", - "price":"16.70000", - "amount":"0.50440000", - "tid":"34522" - }, - { - "date":"1359227304", - "price":"17.30546", - "amount":"2.00000000", - "tid":"34552" - }, - { - "date":"1359229791", - "price":"17.29585", - "amount":"0.48000000", - "tid":"34558" - }, - { - "date":"1359232830", - "price":"17.25000", - "amount":"2.00000000", - "tid":"34563" - }, - { - "date":"1359232869", - "price":"17.36857", - "amount":"2.00000000", - "tid":"34564" - }, - { - "date":"1359232942", - "price":"17.36857", - "amount":"3.28204000", - "tid":"34565" - }, - { - "date":"1359233066", - "price":"17.36858", - "amount":"1.15400000", - "tid":"34566" - }, - { - "date":"1359233621", - "price":"17.26999", - "amount":"2.00000000", - "tid":"34567" - }, - { - "date":"1359244926", - "price":"17.50326", - "amount":"0.83083836", - "tid":"34592" - }, - { - "date":"1359261616", - "price":"17.50000", - "amount":"2.26168000", - "tid":"34610" - }, - { - "date":"1359284900", - "price":"17.39327", - "amount":"1.00000000", - "tid":"34646" - }, - { - "date":"1359299836", - "price":"17.76467", - "amount":"0.35470000", - "tid":"34754" - }, - { - "date":"1359303327", - "price":"17.50225", - "amount":"6.00000000", - "tid":"34767" - }, - { - "date":"1359303628", - "price":"17.50225", - "amount":"2.98000000", - "tid":"34768" - }, - { - "date":"1359332226", - "price":"17.87592", - "amount":"2.00000000", - "tid":"34878" - }, - { - "date":"1359333703", - "price":"17.89213", - "amount":"0.72300000", - "tid":"34883" - }, - { - "date":"1359355187", - "price":"17.94000", - "amount":"7.05000000", - "tid":"34924" - }, - { - "date":"1359368788", - "price":"17.95000", - "amount":"3.00000000", - "tid":"34954" - }, - { - "date":"1359369069", - "price":"17.80000", - "amount":"15.00000000", - "tid":"34955" - }, - { - "date":"1359369208", - "price":"17.45351", - "amount":"25.00000000", - "tid":"34956" - }, - { - "date":"1359369466", - "price":"17.95000", - "amount":"4.00000000", - "tid":"34960" - }, - { - "date":"1359374070", - "price":"17.95000", - "amount":"4.00000000", - "tid":"34978" - }, - { - "date":"1359375177", - "price":"17.95000", - "amount":"4.00000000", - "tid":"34982" - }, - { - "date":"1359377170", - "price":"17.95000", - "amount":"5.00000000", - "tid":"34993" - }, - { - "date":"1359390009", - "price":"18.00000", - "amount":"0.30000000", - "tid":"35073" - }, - { - "date":"1359397134", - "price":"18.00000", - "amount":"9.00000000", - "tid":"35121" - }, - { - "date":"1359401156", - "price":"18.00000", - "amount":"0.46496722", - "tid":"35136" - }, - { - "date":"1359401493", - "price":"18.00000", - "amount":"10.04500000", - "tid":"35137" - }, - { - "date":"1359401975", - "price":"18.00000", - "amount":"20.00000000", - "tid":"35139" - }, - { - "date":"1359402042", - "price":"18.00000", - "amount":"1.33759380", - "tid":"35141" - }, - { - "date":"1359402654", - "price":"18.00000", - "amount":"8.85243898", - "tid":"35148" - }, - { - "date":"1359418513", - "price":"16.83827", - "amount":"1.00000000", - "tid":"35215" - }, - { - "date":"1359438229", - "price":"18.95370", - "amount":"0.60000000", - "tid":"35242" - }, - { - "date":"1359455345", - "price":"19.56815", - "amount":"5.06000000", - "tid":"35291" - }, - { - "date":"1359459439", - "price":"19.71905", - "amount":"2.45000000", - "tid":"35305" - }, - { - "date":"1359489432", - "price":"19.24744", - "amount":"6.00000000", - "tid":"35625" - }, - { - "date":"1359490061", - "price":"18.54235", - "amount":"43.38148000", - "tid":"35626" - }, - { - "date":"1359490061", - "price":"18.54234", - "amount":"5.00000000", - "tid":"35627" - }, - { - "date":"1359490065", - "price":"18.54000", - "amount":"5.00000000", - "tid":"35628" - }, - { - "date":"1359509830", - "price":"19.19964", - "amount":"4.95000000", - "tid":"35735" - }, - { - "date":"1359510406", - "price":"19.90000", - "amount":"1.00177340", - "tid":"35737" - }, - { - "date":"1359510585", - "price":"19.90000", - "amount":"4.00000000", - "tid":"35738" - }, - { - "date":"1359521792", - "price":"18.64498", - "amount":"4.30812000", - "tid":"35748" - }, - { - "date":"1359521793", - "price":"18.64497", - "amount":"5.00000000", - "tid":"35749" - }, - { - "date":"1359582661", - "price":"19.00000", - "amount":"0.14691500", - "tid":"36068" - }, - { - "date":"1359586372", - "price":"19.00000", - "amount":"11.00000000", - "tid":"36093" - }, - { - "date":"1359587290", - "price":"19.73815", - "amount":"4.91434101", - "tid":"36094" - }, - { - "date":"1359591150", - "price":"19.80000", - "amount":"0.14691894", - "tid":"36106" - }, - { - "date":"1359591263", - "price":"19.86556", - "amount":"15.30286586", - "tid":"36115" - }, - { - "date":"1359596485", - "price":"19.90032", - "amount":"1.02611415", - "tid":"36173" - }, - { - "date":"1359627592", - "price":"19.34786", - "amount":"16.75513000", - "tid":"36266" - }, - { - "date":"1359627592", - "price":"19.34785", - "amount":"5.00000000", - "tid":"36267" - }, - { - "date":"1359627646", - "price":"19.33621", - "amount":"3.25000000", - "tid":"36268" - }, - { - "date":"1359628620", - "price":"19.33621", - "amount":"0.38858000", - "tid":"36277" - }, - { - "date":"1359629571", - "price":"19.33621", - "amount":"2.66486500", - "tid":"36280" - }, - { - "date":"1359630043", - "price":"19.33621", - "amount":"71.94142500", - "tid":"36281" - }, - { - "date":"1359641468", - "price":"19.00000", - "amount":"0.27950000", - "tid":"36381" - }, - { - "date":"1359654491", - "price":"20.98100", - "amount":"0.52428388", - "tid":"36463" - }, - { - "date":"1359657608", - "price":"21.07788", - "amount":"1.12655520", - "tid":"36474" - }, - { - "date":"1359658438", - "price":"20.92214", - "amount":"1.00000000", - "tid":"36475" - }, - { - "date":"1359659324", - "price":"21.00000", - "amount":"4.99000000", - "tid":"36480" - }, - { - "date":"1359659411", - "price":"21.00000", - "amount":"1.84000000", - "tid":"36481" - }, - { - "date":"1359660683", - "price":"21.12171", - "amount":"0.05812882", - "tid":"36486" - }, - { - "date":"1359663042", - "price":"21.25081", - "amount":"0.03011650", - "tid":"36489" - }, - { - "date":"1359666421", - "price":"21.30736", - "amount":"2.51321609", - "tid":"36499" - }, - { - "date":"1359677550", - "price":"20.73737", - "amount":"27.60957633", - "tid":"36617" - }, - { - "date":"1359691487", - "price":"20.82000", - "amount":"0.09000000", - "tid":"36671" - }, - { - "date":"1359714374", - "price":"20.23067", - "amount":"2.25000000", - "tid":"36768" - }, - { - "date":"1359714374", - "price":"19.99000", - "amount":"0.50000000", - "tid":"36769" - }, - { - "date":"1359714374", - "price":"19.00000", - "amount":"0.84834210", - "tid":"36770" - }, - { - "date":"1359714375", - "price":"15.00001", - "amount":"95.96987000", - "tid":"36771" - }, - { - "date":"1359714375", - "price":"15.00000", - "amount":"3.23776930", - "tid":"36772" - }, - { - "date":"1359714375", - "price":"0.64000", - "amount":"1.00000000", - "tid":"36773" - }, - { - "date":"1359714375", - "price":"0.15000", - "amount":"14.02401860", - "tid":"36774" - }, - { - "date":"1359714452", - "price":"20.82000", - "amount":"0.91000000", - "tid":"36775" - }, - { - "date":"1359714452", - "price":"21.02314", - "amount":"73.42126152", - "tid":"36776" - }, - { - "date":"1359728147", - "price":"20.82549", - "amount":"0.60000000", - "tid":"36898" - }, - { - "date":"1359728147", - "price":"20.94019", - "amount":"1.79103943", - "tid":"36899" - }, - { - "date":"1359730497", - "price":"20.92583", - "amount":"1.65000000", - "tid":"36902" - }, - { - "date":"1359730497", - "price":"20.94913", - "amount":"0.97724252", - "tid":"36903" - }, - { - "date":"1359750423", - "price":"20.95265", - "amount":"0.09258972", - "tid":"36983" - }, - { - "date":"1359751062", - "price":"20.95265", - "amount":"0.33408662", - "tid":"36994" - }, - { - "date":"1359751292", - "price":"20.96448", - "amount":"1.38806209", - "tid":"36995" - }, - { - "date":"1359760311", - "price":"20.60649", - "amount":"0.10000000", - "tid":"37087" - }, - { - "date":"1359776966", - "price":"20.60996", - "amount":"2.35323116", - "tid":"37147" - }, - { - "date":"1359795267", - "price":"19.85868", - "amount":"2.00000000", - "tid":"37181" - }, - { - "date":"1359796150", - "price":"19.50822", - "amount":"2.00000000", - "tid":"37204" - }, - { - "date":"1359797487", - "price":"19.50701", - "amount":"0.68000000", - "tid":"37210" - }, - { - "date":"1359813517", - "price":"20.96999", - "amount":"0.14422560", - "tid":"37365" - }, - { - "date":"1359813620", - "price":"21.50000", - "amount":"0.97674419", - "tid":"37366" - }, - { - "date":"1359833723", - "price":"19.52001", - "amount":"0.33060000", - "tid":"37487" - }, - { - "date":"1359854966", - "price":"19.97332", - "amount":"0.67000000", - "tid":"37612" - }, - { - "date":"1359938379", - "price":"20.67901", - "amount":"2.90826302", - "tid":"38084" - }, - { - "date":"1359946620", - "price":"20.66127", - "amount":"5.61436930", - "tid":"38093" - }, - { - "date":"1359947934", - "price":"20.38462", - "amount":"1.00000000", - "tid":"38094" - }, - { - "date":"1359988083", - "price":"20.20000", - "amount":"0.19922821", - "tid":"38391" - }, - { - "date":"1359988275", - "price":"20.00001", - "amount":"0.43424708", - "tid":"38397" - }, - { - "date":"1359996783", - "price":"20.00001", - "amount":"4.00000000", - "tid":"38574" - }, - { - "date":"1360058912", - "price":"21.50000", - "amount":"0.02449814", - "tid":"38865" - }, - { - "date":"1360062157", - "price":"20.47365", - "amount":"4.00000000", - "tid":"38941" - }, - { - "date":"1360069467", - "price":"20.99998", - "amount":"11.54858243", - "tid":"39067" - }, - { - "date":"1360087503", - "price":"20.62373", - "amount":"0.01843653", - "tid":"39278" - }, - { - "date":"1360096570", - "price":"20.66807", - "amount":"0.96767623", - "tid":"39407" - }, - { - "date":"1360096594", - "price":"20.66807", - "amount":"0.96767623", - "tid":"39408" - }, - { - "date":"1360105213", - "price":"20.00001", - "amount":"0.50000000", - "tid":"39515" - }, - { - "date":"1360105219", - "price":"20.00001", - "amount":"5.00000000", - "tid":"39516" - }, - { - "date":"1360105770", - "price":"20.00001", - "amount":"1.26000000", - "tid":"39517" - }, - { - "date":"1360105869", - "price":"20.00001", - "amount":"0.12000000", - "tid":"39518" - }, - { - "date":"1360106612", - "price":"20.00001", - "amount":"0.44510000", - "tid":"39519" - }, - { - "date":"1360108668", - "price":"20.00001", - "amount":"0.50168725", - "tid":"39525" - }, - { - "date":"1360110365", - "price":"20.00001", - "amount":"32.14153392", - "tid":"39527" - }, - { - "date":"1360110550", - "price":"20.00001", - "amount":"0.52633523", - "tid":"39528" - }, - { - "date":"1360116444", - "price":"20.00000", - "amount":"104.85000000", - "tid":"39536" - }, - { - "date":"1360116618", - "price":"20.00000", - "amount":"2.15000000", - "tid":"39537" - }, - { - "date":"1360122372", - "price":"20.50000", - "amount":"9.99839020", - "tid":"39542" - }, - { - "date":"1360133772", - "price":"20.50000", - "amount":"0.00160980", - "tid":"39688" - }, - { - "date":"1360133871", - "price":"20.93139", - "amount":"1.00000000", - "tid":"39689" - }, - { - "date":"1360133904", - "price":"20.99997", - "amount":"0.10000000", - "tid":"39690" - }, - { - "date":"1360134962", - "price":"20.90624", - "amount":"0.87055348", - "tid":"39696" - }, - { - "date":"1360135115", - "price":"20.90624", - "amount":"0.12944652", - "tid":"39702" - }, - { - "date":"1360176179", - "price":"20.94842", - "amount":"2.00000000", - "tid":"39948" - }, - { - "date":"1360190626", - "price":"20.94842", - "amount":"0.98241299", - "tid":"40102" - }, - { - "date":"1360190941", - "price":"20.94842", - "amount":"0.00573074", - "tid":"40105" - }, - { - "date":"1360197206", - "price":"20.94842", - "amount":"0.96768348", - "tid":"40158" - }, - { - "date":"1360237733", - "price":"20.94842", - "amount":"43.29417279", - "tid":"40342" - }, - { - "date":"1360250372", - "price":"21.59660", - "amount":"9.00000000", - "tid":"40418" - }, - { - "date":"1360291098", - "price":"21.99997", - "amount":"0.10000000", - "tid":"40814" - }, - { - "date":"1360298121", - "price":"22.66193", - "amount":"0.08825374", - "tid":"40846" - }, - { - "date":"1360298210", - "price":"22.64790", - "amount":"1.32462612", - "tid":"40847" - }, - { - "date":"1360314572", - "price":"22.38495", - "amount":"2.18000000", - "tid":"40982" - }, - { - "date":"1360316826", - "price":"22.94803", - "amount":"6.10000000", - "tid":"41004" - }, - { - "date":"1360319436", - "price":"22.68922", - "amount":"1.22000000", - "tid":"41011" - }, - { - "date":"1360319436", - "price":"22.82806", - "amount":"1.15292984", - "tid":"41012" - }, - { - "date":"1360402125", - "price":"22.24883", - "amount":"0.10000000", - "tid":"41458" - }, - { - "date":"1360406941", - "price":"22.85479", - "amount":"13.20423400", - "tid":"41469" - }, - { - "date":"1360414718", - "price":"22.67283", - "amount":"0.10000000", - "tid":"41555" - }, - { - "date":"1360416195", - "price":"22.89604", - "amount":"0.50000000", - "tid":"41637" - }, - { - "date":"1360418439", - "price":"23.04280", - "amount":"1.00000000", - "tid":"41659" - }, - { - "date":"1360418569", - "price":"23.04280", - "amount":"5.00000000", - "tid":"41660" - }, - { - "date":"1360423108", - "price":"23.04280", - "amount":"0.98000000", - "tid":"41731" - }, - { - "date":"1360424266", - "price":"23.04280", - "amount":"4.01000000", - "tid":"41735" - }, - { - "date":"1360430643", - "price":"23.04280", - "amount":"0.01000000", - "tid":"41766" - }, - { - "date":"1360430643", - "price":"23.43309", - "amount":"0.15674168", - "tid":"41767" - }, - { - "date":"1360431127", - "price":"23.43309", - "amount":"1.88622158", - "tid":"41769" - }, - { - "date":"1360435993", - "price":"24.50000", - "amount":"0.86324523", - "tid":"41786" - }, - { - "date":"1360435994", - "price":"24.55827", - "amount":"0.70000000", - "tid":"41787" - }, - { - "date":"1360435994", - "price":"24.55827", - "amount":"0.21620834", - "tid":"41788" - }, - { - "date":"1360451800", - "price":"23.55916", - "amount":"0.95506000", - "tid":"41863" - }, - { - "date":"1360481399", - "price":"23.29174", - "amount":"0.10000000", - "tid":"41917" - }, - { - "date":"1360493628", - "price":"23.55644", - "amount":"0.53785716", - "tid":"41986" - }, - { - "date":"1360498880", - "price":"22.93489", - "amount":"4.00000000", - "tid":"42032" - }, - { - "date":"1360498881", - "price":"22.00000", - "amount":"0.50000000", - "tid":"42033" - }, - { - "date":"1360498881", - "price":"20.27007", - "amount":"0.10853400", - "tid":"42034" - }, - { - "date":"1360498881", - "price":"20.17007", - "amount":"0.10411450", - "tid":"42035" - }, - { - "date":"1360498881", - "price":"20.17000", - "amount":"0.63460000", - "tid":"42036" - }, - { - "date":"1360498882", - "price":"20.17000", - "amount":"0.50000000", - "tid":"42037" - }, - { - "date":"1360498882", - "price":"20.17000", - "amount":"0.90000000", - "tid":"42038" - }, - { - "date":"1360498882", - "price":"20.17000", - "amount":"0.25275150", - "tid":"42039" - }, - { - "date":"1360499145", - "price":"23.33867", - "amount":"0.09426415", - "tid":"42040" - }, - { - "date":"1360531743", - "price":"23.44725", - "amount":"4.00000000", - "tid":"42277" - }, - { - "date":"1360548893", - "price":"23.95326", - "amount":"0.04091301", - "tid":"42334" - }, - { - "date":"1360572778", - "price":"24.05310", - "amount":"8.79000000", - "tid":"42539" - }, - { - "date":"1360576202", - "price":"24.00000", - "amount":"1.05649992", - "tid":"42576" - }, - { - "date":"1360595614", - "price":"23.43502", - "amount":"0.40974677", - "tid":"42865" - }, - { - "date":"1360616370", - "price":"24.25710", - "amount":"0.10000000", - "tid":"43306" - }, - { - "date":"1360621976", - "price":"24.49409", - "amount":"3.78000000", - "tid":"43348" - }, - { - "date":"1360621976", - "price":"24.50000", - "amount":"0.18009550", - "tid":"43349" - }, - { - "date":"1360656218", - "price":"24.52153", - "amount":"1.47596000", - "tid":"43576" - }, - { - "date":"1360656233", - "price":"24.53173", - "amount":"0.86161000", - "tid":"43577" - }, - { - "date":"1360656458", - "price":"24.53173", - "amount":"0.66243000", - "tid":"43580" - }, - { - "date":"1360665848", - "price":"24.98997", - "amount":"0.70000000", - "tid":"43688" - }, - { - "date":"1360665849", - "price":"24.98997", - "amount":"0.70000000", - "tid":"43689" - }, - { - "date":"1360665849", - "price":"24.98997", - "amount":"0.70000000", - "tid":"43690" - }, - { - "date":"1360665849", - "price":"24.99000", - "amount":"0.31990450", - "tid":"43691" - }, - { - "date":"1360665849", - "price":"25.00000", - "amount":"0.10000000", - "tid":"43692" - }, - { - "date":"1360665849", - "price":"25.11425", - "amount":"0.08069720", - "tid":"43693" - }, - { - "date":"1360675705", - "price":"25.58430", - "amount":"7.38537500", - "tid":"43890" - }, - { - "date":"1360687669", - "price":"25.67012", - "amount":"11.42729000", - "tid":"44006" - }, - { - "date":"1360688374", - "price":"25.70007", - "amount":"0.10000000", - "tid":"44011" - }, - { - "date":"1360688374", - "price":"25.73283", - "amount":"17.90000000", - "tid":"44012" - }, - { - "date":"1360688417", - "price":"25.73283", - "amount":"0.28209334", - "tid":"44013" - }, - { - "date":"1360715923", - "price":"24.75299", - "amount":"53.45592593", - "tid":"44679" - }, - { - "date":"1360720070", - "price":"24.50003", - "amount":"0.10000000", - "tid":"44742" - }, - { - "date":"1360724003", - "price":"24.50003", - "amount":"0.40745624", - "tid":"44747" - }, - { - "date":"1360724279", - "price":"24.50003", - "amount":"2.30602876", - "tid":"44748" - }, - { - "date":"1360724280", - "price":"25.50019", - "amount":"0.00008730", - "tid":"44749" - }, - { - "date":"1360759793", - "price":"25.50007", - "amount":"0.10000000", - "tid":"44971" - }, - { - "date":"1360759836", - "price":"25.50007", - "amount":"0.40000000", - "tid":"44972" - }, - { - "date":"1360770942", - "price":"26.05998", - "amount":"2.00000000", - "tid":"45177" - }, - { - "date":"1360773421", - "price":"26.09000", - "amount":"0.10000000", - "tid":"45289" - }, - { - "date":"1360775928", - "price":"26.08999", - "amount":"0.45159990", - "tid":"45325" - }, - { - "date":"1360781514", - "price":"25.50007", - "amount":"0.47941005", - "tid":"45443" - }, - { - "date":"1360781566", - "price":"24.50003", - "amount":"0.09000000", - "tid":"45452" - }, - { - "date":"1360781581", - "price":"25.39000", - "amount":"0.09022568", - "tid":"45453" - }, - { - "date":"1360799301", - "price":"24.50003", - "amount":"0.10000000", - "tid":"45724" - }, - { - "date":"1360799301", - "price":"24.50003", - "amount":"0.43040900", - "tid":"45725" - }, - { - "date":"1360802286", - "price":"23.55003", - "amount":"0.95000000", - "tid":"45773" - }, - { - "date":"1360802286", - "price":"23.55003", - "amount":"0.95000000", - "tid":"45774" - }, - { - "date":"1360802286", - "price":"23.55003", - "amount":"0.22436820", - "tid":"45775" - }, - { - "date":"1360857213", - "price":"26.20000", - "amount":"3.36591600", - "tid":"46163" - }, - { - "date":"1360859911", - "price":"26.30007", - "amount":"0.95000000", - "tid":"46199" - }, - { - "date":"1360859911", - "price":"26.30007", - "amount":"0.95000000", - "tid":"46200" - }, - { - "date":"1360859912", - "price":"26.30007", - "amount":"0.60000000", - "tid":"46201" - }, - { - "date":"1360860124", - "price":"26.43768", - "amount":"0.84866800", - "tid":"46210" - }, - { - "date":"1360867864", - "price":"26.53202", - "amount":"2.00000000", - "tid":"46408" - }, - { - "date":"1360867869", - "price":"26.53202", - "amount":"1.14635078", - "tid":"46409" - }, - { - "date":"1360868243", - "price":"26.99997", - "amount":"0.10000000", - "tid":"46412" - }, - { - "date":"1360868244", - "price":"26.99997", - "amount":"0.75000000", - "tid":"46413" - }, - { - "date":"1360871590", - "price":"26.29229", - "amount":"0.10000000", - "tid":"46459" - }, - { - "date":"1360871602", - "price":"26.29229", - "amount":"0.10000000", - "tid":"46460" - }, - { - "date":"1360871672", - "price":"26.29229", - "amount":"1.00000000", - "tid":"46462" - }, - { - "date":"1360871807", - "price":"26.29229", - "amount":"1.00000000", - "tid":"46463" - }, - { - "date":"1360875386", - "price":"27.32878", - "amount":"1.09774384", - "tid":"46539" - }, - { - "date":"1360876979", - "price":"27.22448", - "amount":"0.50000000", - "tid":"46568" - }, - { - "date":"1360877023", - "price":"27.22448", - "amount":"1.11689414", - "tid":"46570" - }, - { - "date":"1360877046", - "price":"27.22448", - "amount":"0.50000000", - "tid":"46571" - }, - { - "date":"1360877047", - "price":"27.22448", - "amount":"1.11689414", - "tid":"46572" - }, - { - "date":"1360877067", - "price":"27.22448", - "amount":"0.76621172", - "tid":"46573" - }, - { - "date":"1360877189", - "price":"27.67281", - "amount":"0.90341386", - "tid":"46578" - }, - { - "date":"1360919957", - "price":"27.20000", - "amount":"1.00000000", - "tid":"47030" - }, - { - "date":"1360927178", - "price":"27.00000", - "amount":"0.99950000", - "tid":"47102" - }, - { - "date":"1360934538", - "price":"27.00000", - "amount":"0.00050000", - "tid":"47286" - }, - { - "date":"1360949208", - "price":"27.38808", - "amount":"0.12669745", - "tid":"47503" - }, - { - "date":"1360955062", - "price":"27.48294", - "amount":"3.20198640", - "tid":"47565" - }, - { - "date":"1361056405", - "price":"27.68999", - "amount":"2.00000000", - "tid":"48258" - }, - { - "date":"1361068333", - "price":"27.68997", - "amount":"0.30000000", - "tid":"48297" - }, - { - "date":"1361068333", - "price":"27.68999", - "amount":"3.31900000", - "tid":"48298" - }, - { - "date":"1361069769", - "price":"27.68999", - "amount":"0.83062507", - "tid":"48302" - }, - { - "date":"1361104440", - "price":"27.10003", - "amount":"0.93907647", - "tid":"48532" - }, - { - "date":"1361104458", - "price":"27.10003", - "amount":"0.01092353", - "tid":"48545" - }, - { - "date":"1361104458", - "price":"27.10003", - "amount":"0.78697697", - "tid":"48546" - }, - { - "date":"1361104473", - "price":"27.10003", - "amount":"0.16302303", - "tid":"48547" - }, - { - "date":"1361104560", - "price":"27.10003", - "amount":"0.94263358", - "tid":"48548" - }, - { - "date":"1361104576", - "price":"27.10003", - "amount":"0.00736642", - "tid":"48549" - }, - { - "date":"1361104576", - "price":"27.10003", - "amount":"0.79053408", - "tid":"48550" - }, - { - "date":"1361104591", - "price":"27.10003", - "amount":"0.00736642", - "tid":"48551" - }, - { - "date":"1361104591", - "price":"27.10000", - "amount":"0.18263358", - "tid":"48552" - }, - { - "date":"1361104607", - "price":"27.10000", - "amount":"0.00736642", - "tid":"48553" - }, - { - "date":"1361104607", - "price":"27.10000", - "amount":"0.52953358", - "tid":"48554" - }, - { - "date":"1361104621", - "price":"27.10000", - "amount":"0.00736642", - "tid":"48555" - }, - { - "date":"1361104622", - "price":"27.10000", - "amount":"0.93526716", - "tid":"48556" - }, - { - "date":"1361107140", - "price":"27.10000", - "amount":"0.73352654", - "tid":"48590" - }, - { - "date":"1361118297", - "price":"26.78000", - "amount":"1.00000000", - "tid":"48695" - }, - { - "date":"1361122188", - "price":"26.78000", - "amount":"0.00752000", - "tid":"48754" - }, - { - "date":"1361133235", - "price":"26.49997", - "amount":"0.10000000", - "tid":"48939" - }, - { - "date":"1361133249", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48940" - }, - { - "date":"1361133263", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48941" - }, - { - "date":"1361133277", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48942" - }, - { - "date":"1361133319", - "price":"26.50000", - "amount":"1.01000000", - "tid":"48943" - }, - { - "date":"1361133533", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48947" - }, - { - "date":"1361133548", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48950" - }, - { - "date":"1361133602", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48952" - }, - { - "date":"1361134333", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48970" - }, - { - "date":"1361134593", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48974" - }, - { - "date":"1361134607", - "price":"26.50000", - "amount":"0.94245377", - "tid":"48975" - }, - { - "date":"1361136826", - "price":"26.50000", - "amount":"6.00000000", - "tid":"48993" - }, - { - "date":"1361147977", - "price":"26.50000", - "amount":"0.10759960", - "tid":"49046" - }, - { - "date":"1361148166", - "price":"26.50000", - "amount":"1.00000000", - "tid":"49047" - }, - { - "date":"1361163998", - "price":"26.50000", - "amount":"2.09926415", - "tid":"49089" - }, - { - "date":"1361175199", - "price":"26.50000", - "amount":"1.50792603", - "tid":"49190" - }, - { - "date":"1361228228", - "price":"26.50000", - "amount":"0.49136075", - "tid":"49854" - }, - { - "date":"1361238250", - "price":"26.50000", - "amount":"12.07547170", - "tid":"49918" - }, - { - "date":"1361244658", - "price":"26.50000", - "amount":"2.04944528", - "tid":"49959" - }, - { - "date":"1361245073", - "price":"26.50000", - "amount":"15.00000000", - "tid":"49965" - }, - { - "date":"1361245096", - "price":"26.50000", - "amount":"2.00000000", - "tid":"49966" - }, - { - "date":"1361246876", - "price":"26.50000", - "amount":"18.26867924", - "tid":"49969" - }, - { - "date":"1361247588", - "price":"26.50000", - "amount":"18.71245283", - "tid":"49970" - }, - { - "date":"1361249965", - "price":"26.50000", - "amount":"11.19571649", - "tid":"49979" - }, - { - "date":"1361250201", - "price":"27.00000", - "amount":"0.99950000", - "tid":"49994" - }, - { - "date":"1361250201", - "price":"29.97829", - "amount":"0.00011675", - "tid":"49995" - }, - { - "date":"1361250410", - "price":"27.69000", - "amount":"4.09422310", - "tid":"49996" - }, - { - "date":"1361250774", - "price":"27.69000", - "amount":"3.44882087", - "tid":"49997" - }, - { - "date":"1361264345", - "price":"27.50000", - "amount":"1.00000000", - "tid":"50106" - }, - { - "date":"1361277425", - "price":"27.50000", - "amount":"95.00000000", - "tid":"50191" - }, - { - "date":"1361277500", - "price":"27.50000", - "amount":"2.00000000", - "tid":"50193" - }, - { - "date":"1361277511", - "price":"27.50000", - "amount":"0.50000000", - "tid":"50194" - }, - { - "date":"1361279071", - "price":"27.50000", - "amount":"21.50000000", - "tid":"50242" - }, - { - "date":"1361279196", - "price":"28.07425", - "amount":"1.00000000", - "tid":"50247" - }, - { - "date":"1361279722", - "price":"28.29990", - "amount":"1.95300000", - "tid":"50266" - }, - { - "date":"1361280497", - "price":"28.23081", - "amount":"1.00000000", - "tid":"50277" - }, - { - "date":"1361280512", - "price":"28.23081", - "amount":"1.04700000", - "tid":"50279" - }, - { - "date":"1361280518", - "price":"28.29990", - "amount":"1.04700000", - "tid":"50280" - }, - { - "date":"1361291704", - "price":"28.27518", - "amount":"0.19950000", - "tid":"50474" - }, - { - "date":"1361308458", - "price":"29.17541", - "amount":"2.00000000", - "tid":"50831" - }, - { - "date":"1361352618", - "price":"32.99999", - "amount":"4.46938469", - "tid":"51160" - }, - { - "date":"1361378581", - "price":"26.00001", - "amount":"0.16000000", - "tid":"51306" - }, - { - "date":"1361410947", - "price":"29.80000", - "amount":"3.28758490", - "tid":"51817" - }, - { - "date":"1361417614", - "price":"29.50002", - "amount":"14.36836000", - "tid":"51827" - }, - { - "date":"1361441054", - "price":"29.50002", - "amount":"0.81380000", - "tid":"52031" - }, - { - "date":"1361468655", - "price":"29.50000", - "amount":"0.60000000", - "tid":"52783" - }, - { - "date":"1361468655", - "price":"29.50002", - "amount":"1.67118531", - "tid":"52784" - }, - { - "date":"1361469860", - "price":"29.50002", - "amount":"23.76764795", - "tid":"52830" - }, - { - "date":"1361474172", - "price":"29.50002", - "amount":"8.20930189", - "tid":"53010" - }, - { - "date":"1361484523", - "price":"29.50002", - "amount":"2.44610004", - "tid":"54470" - }, - { - "date":"1361486564", - "price":"29.50002", - "amount":"10.03851523", - "tid":"54491" - }, - { - "date":"1361493760", - "price":"29.50002", - "amount":"1.39246346", - "tid":"54532" - }, - { - "date":"1361519205", - "price":"29.50002", - "amount":"0.89281983", - "tid":"55130" - }, - { - "date":"1361519205", - "price":"30.98999", - "amount":"0.01640811", - "tid":"55131" - }, - { - "date":"1361553611", - "price":"30.99000", - "amount":"1.00000000", - "tid":"55692" - }, - { - "date":"1361556960", - "price":"32.99950", - "amount":"0.38212700", - "tid":"55710" - }, - { - "date":"1361558331", - "price":"31.13997", - "amount":"3.58000000", - "tid":"55770" - }, - { - "date":"1361558332", - "price":"31.13995", - "amount":"0.00000000", - "tid":"55771" - }, - { - "date":"1361559236", - "price":"30.50020", - "amount":"1.95948578", - "tid":"55778" - }, - { - "date":"1361559486", - "price":"32.97997", - "amount":"0.40000000", - "tid":"55783" - }, - { - "date":"1361559486", - "price":"32.99970", - "amount":"1.37494620", - "tid":"55784" - }, - { - "date":"1361576986", - "price":"30.90000", - "amount":"1.00000000", - "tid":"56180" - }, - { - "date":"1361595767", - "price":"30.20003", - "amount":"0.43682040", - "tid":"56445" - }, - { - "date":"1361595847", - "price":"30.10000", - "amount":"0.17932960", - "tid":"56446" - }, - { - "date":"1361598247", - "price":"30.10000", - "amount":"0.63000000", - "tid":"56448" - }, - { - "date":"1361598600", - "price":"30.10000", - "amount":"3.00000000", - "tid":"56450" - }, - { - "date":"1361599978", - "price":"30.10000", - "amount":"17.24371000", - "tid":"56454" - }, - { - "date":"1361602604", - "price":"30.10000", - "amount":"1.08000000", - "tid":"56477" - }, - { - "date":"1361605262", - "price":"30.10000", - "amount":"1.34589502", - "tid":"56516" - }, - { - "date":"1361605287", - "price":"30.10000", - "amount":"1.34589502", - "tid":"56517" - }, - { - "date":"1361605309", - "price":"30.10000", - "amount":"1.34589502", - "tid":"56518" - }, - { - "date":"1361613344", - "price":"30.30000", - "amount":"0.96315651", - "tid":"56549" - }, - { - "date":"1361618633", - "price":"30.30000", - "amount":"0.12000000", - "tid":"56571" - }, - { - "date":"1361621909", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56575" - }, - { - "date":"1361621930", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56576" - }, - { - "date":"1361621951", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56580" - }, - { - "date":"1361621974", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56582" - }, - { - "date":"1361621995", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56585" - }, - { - "date":"1361622016", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56586" - }, - { - "date":"1361622040", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56587" - }, - { - "date":"1361622064", - "price":"30.30000", - "amount":"1.33779264", - "tid":"56588" - }, - { - "date":"1361623824", - "price":"30.30000", - "amount":"3.00000000", - "tid":"56604" - }, - { - "date":"1361627061", - "price":"30.30000", - "amount":"1.38264777", - "tid":"56653" - }, - { - "date":"1361627680", - "price":"30.30000", - "amount":"35.00000000", - "tid":"56656" - }, - { - "date":"1361633419", - "price":"30.30000", - "amount":"2.95120000", - "tid":"56746" - }, - { - "date":"1361633624", - "price":"30.30000", - "amount":"10.00000000", - "tid":"56761" - }, - { - "date":"1361633752", - "price":"30.30000", - "amount":"5.00000000", - "tid":"56766" - }, - { - "date":"1361634522", - "price":"30.30000", - "amount":"1.00000000", - "tid":"56784" - }, - { - "date":"1361635363", - "price":"30.30000", - "amount":"33.25560960", - "tid":"56801" - }, - { - "date":"1361636195", - "price":"29.57968", - "amount":"5.00000000", - "tid":"56849" - }, - { - "date":"1361636503", - "price":"29.30000", - "amount":"0.12409550", - "tid":"56858" - }, - { - "date":"1361636522", - "price":"29.19392", - "amount":"1.49920543", - "tid":"56859" - }, - { - "date":"1361636927", - "price":"29.19392", - "amount":"1.41492748", - "tid":"56875" - }, - { - "date":"1361636947", - "price":"29.19392", - "amount":"1.41193081", - "tid":"56877" - }, - { - "date":"1361636966", - "price":"29.19392", - "amount":"0.39720447", - "tid":"56879" - }, - { - "date":"1361636988", - "price":"29.19392", - "amount":"0.27673181", - "tid":"56882" - }, - { - "date":"1361637003", - "price":"29.03030", - "amount":"1.02201706", - "tid":"56883" - }, - { - "date":"1361637023", - "price":"29.03030", - "amount":"1.40894681", - "tid":"56885" - }, - { - "date":"1361637046", - "price":"29.03030", - "amount":"0.70024693", - "tid":"56886" - }, - { - "date":"1361637070", - "price":"29.00000", - "amount":"1.12100000", - "tid":"56887" - }, - { - "date":"1361641623", - "price":"28.10013", - "amount":"0.87087974", - "tid":"57032" - }, - { - "date":"1361657117", - "price":"29.98197", - "amount":"1.33213694", - "tid":"57459" - }, - { - "date":"1361657140", - "price":"29.98197", - "amount":"0.96000000", - "tid":"57483" - }, - { - "date":"1361657174", - "price":"29.99979", - "amount":"0.96000000", - "tid":"57494" - }, - { - "date":"1361657211", - "price":"29.99996", - "amount":"0.96000000", - "tid":"57507" - }, - { - "date":"1361657230", - "price":"29.99997", - "amount":"0.96000000", - "tid":"57509" - }, - { - "date":"1361657252", - "price":"29.99996", - "amount":"1.33133810", - "tid":"57513" - }, - { - "date":"1361657286", - "price":"29.99996", - "amount":"0.48001363", - "tid":"57515" - }, - { - "date":"1361657318", - "price":"29.99997", - "amount":"0.96000000", - "tid":"57529" - }, - { - "date":"1361657336", - "price":"29.99996", - "amount":"1.33133810", - "tid":"57535" - }, - { - "date":"1361658005", - "price":"29.99979", - "amount":"1.33134564", - "tid":"57559" - }, - { - "date":"1361658005", - "price":"29.98197", - "amount":"0.76865436", - "tid":"57560" - }, - { - "date":"1361659638", - "price":"29.98197", - "amount":"0.56000000", - "tid":"57713" - }, - { - "date":"1361659662", - "price":"29.98197", - "amount":"0.00348258", - "tid":"57714" - }, - { - "date":"1361661799", - "price":"29.99999", - "amount":"1.33133677", - "tid":"57881" - }, - { - "date":"1361661829", - "price":"29.99999", - "amount":"1.33133677", - "tid":"57894" - }, - { - "date":"1361661921", - "price":"29.99999", - "amount":"1.33133677", - "tid":"57898" - }, - { - "date":"1361661941", - "price":"29.99999", - "amount":"0.37132256", - "tid":"57900" - }, - { - "date":"1361661980", - "price":"29.99999", - "amount":"1.00000000", - "tid":"57901" - }, - { - "date":"1361661999", - "price":"29.99999", - "amount":"0.61752637", - "tid":"57904" - }, - { - "date":"1361662039", - "price":"29.99999", - "amount":"1.33133677", - "tid":"57907" - }, - { - "date":"1361662057", - "price":"30.00000", - "amount":"0.20531328", - "tid":"57909" - }, - { - "date":"1361662099", - "price":"30.00000", - "amount":"0.79468672", - "tid":"57910" - }, - { - "date":"1361691591", - "price":"30.99990", - "amount":"0.40000000", - "tid":"58693" - }, - { - "date":"1361691591", - "price":"31.40161", - "amount":"0.87161263", - "tid":"58694" - }, - { - "date":"1361708135", - "price":"30.07924", - "amount":"1.00000000", - "tid":"59097" - }, - { - "date":"1361708180", - "price":"30.00000", - "amount":"0.50161803", - "tid":"59100" - }, - { - "date":"1361709231", - "price":"30.00000", - "amount":"34.84838197", - "tid":"59127" - }, - { - "date":"1361709275", - "price":"29.90000", - "amount":"1.00000000", - "tid":"59128" - }, - { - "date":"1361717879", - "price":"30.01500", - "amount":"10.97182076", - "tid":"59233" - }, - { - "date":"1361718775", - "price":"29.10005", - "amount":"0.36000000", - "tid":"59235" - }, - { - "date":"1361718999", - "price":"30.01500", - "amount":"4.92748293", - "tid":"59236" - }, - { - "date":"1361722203", - "price":"30.01500", - "amount":"8.02669800", - "tid":"59261" - }, - { - "date":"1361729196", - "price":"30.01501", - "amount":"0.10000000", - "tid":"59314" - }, - { - "date":"1361734610", - "price":"29.31684", - "amount":"0.10000000", - "tid":"59354" - }, - { - "date":"1361843637", - "price":"31.00000", - "amount":"0.89950000", - "tid":"60607" - }, - { - "date":"1361844504", - "price":"32.79997", - "amount":"0.15000000", - "tid":"60658" - }, - { - "date":"1361867958", - "price":"31.00000", - "amount":"0.10050000", - "tid":"60811" - }, - { - "date":"1361869933", - "price":"32.79997", - "amount":"0.75000000", - "tid":"60943" - }, - { - "date":"1361870059", - "price":"32.79997", - "amount":"0.72078625", - "tid":"60945" - }, - { - "date":"1361870091", - "price":"32.79997", - "amount":"1.29785853", - "tid":"60947" - }, - { - "date":"1361870132", - "price":"32.79997", - "amount":"0.16902636", - "tid":"60948" - }, - { - "date":"1361870170", - "price":"32.79997", - "amount":"0.99788099", - "tid":"60950" - }, - { - "date":"1361870202", - "price":"32.79997", - "amount":"1.29785853", - "tid":"60953" - }, - { - "date":"1361870240", - "price":"32.79997", - "amount":"1.29785853", - "tid":"60956" - }, - { - "date":"1361870261", - "price":"32.79997", - "amount":"0.12849831", - "tid":"60957" - }, - { - "date":"1361870299", - "price":"32.79997", - "amount":"1.25733029", - "tid":"60960" - }, - { - "date":"1361870322", - "price":"32.79997", - "amount":"1.19745742", - "tid":"60962" - }, - { - "date":"1361870359", - "price":"32.79997", - "amount":"0.38544479", - "tid":"60964" - }, - { - "date":"1361872205", - "price":"31.33003", - "amount":"0.44749300", - "tid":"61000" - }, - { - "date":"1361874601", - "price":"31.30007", - "amount":"0.49520710", - "tid":"61041" - }, - { - "date":"1361880221", - "price":"30.00001", - "amount":"10.00000000", - "tid":"61244" - }, - { - "date":"1361974381", - "price":"32.87997", - "amount":"0.90000000", - "tid":"63081" - }, - { - "date":"1361974381", - "price":"32.88287", - "amount":"0.20000000", - "tid":"63082" - }, - { - "date":"1361974382", - "price":"32.88987", - "amount":"0.37498029", - "tid":"63083" - }, - { - "date":"1362019503", - "price":"32.89989", - "amount":"8.15096000", - "tid":"64007" - }, - { - "date":"1362019503", - "price":"32.89990", - "amount":"3.86047716", - "tid":"64008" - }, - { - "date":"1362020406", - "price":"31.30007", - "amount":"0.50000000", - "tid":"64009" - }, - { - "date":"1362041816", - "price":"32.89987", - "amount":"4.42775094", - "tid":"64152" - }, - { - "date":"1362044584", - "price":"32.89990", - "amount":"1.13952292", - "tid":"64251" - }, - { - "date":"1362057622", - "price":"32.98000", - "amount":"1.21103971", - "tid":"64541" - }, - { - "date":"1362057640", - "price":"32.98000", - "amount":"1.21103971", - "tid":"64542" - }, - { - "date":"1362060161", - "price":"33.23000", - "amount":"1.20192867", - "tid":"64588" - }, - { - "date":"1362060181", - "price":"33.23000", - "amount":"1.20192867", - "tid":"64590" - }, - { - "date":"1362060200", - "price":"33.23000", - "amount":"1.20192867", - "tid":"64591" - }, - { - "date":"1362060227", - "price":"33.23000", - "amount":"1.20192867", - "tid":"64592" - }, - { - "date":"1362060251", - "price":"33.23000", - "amount":"1.20192867", - "tid":"64595" - }, - { - "date":"1362081617", - "price":"33.86996", - "amount":"0.40000000", - "tid":"64971" - }, - { - "date":"1362081617", - "price":"33.87337", - "amount":"0.60000000", - "tid":"64972" - }, - { - "date":"1362081618", - "price":"33.87447", - "amount":"0.47000000", - "tid":"64973" - }, - { - "date":"1362081618", - "price":"33.87557", - "amount":"0.47000000", - "tid":"64974" - }, - { - "date":"1362081618", - "price":"33.89990", - "amount":"5.00000000", - "tid":"64975" - }, - { - "date":"1362081618", - "price":"34.45782", - "amount":"17.70902963", - "tid":"64976" - }, - { - "date":"1362094908", - "price":"31.30003", - "amount":"0.70000000", - "tid":"65338" - }, - { - "date":"1362095347", - "price":"31.30003", - "amount":"0.03130987", - "tid":"65346" - }, - { - "date":"1362095503", - "price":"31.30003", - "amount":"7.07603156", - "tid":"65347" - }, - { - "date":"1362096100", - "price":"31.30003", - "amount":"12.39615425", - "tid":"65348" - }, - { - "date":"1362098162", - "price":"31.30003", - "amount":"1.39950360", - "tid":"65349" - }, - { - "date":"1362102958", - "price":"31.30003", - "amount":"28.36570000", - "tid":"65398" - }, - { - "date":"1362104491", - "price":"31.30003", - "amount":"0.86370000", - "tid":"65415" - }, - { - "date":"1362105663", - "price":"31.30003", - "amount":"26.14374500", - "tid":"65431" - }, - { - "date":"1362106325", - "price":"31.30003", - "amount":"5.04088980", - "tid":"65433" - }, - { - "date":"1362107777", - "price":"31.30003", - "amount":"0.30000000", - "tid":"65449" - }, - { - "date":"1362108829", - "price":"31.30003", - "amount":"0.18190000", - "tid":"65450" - }, - { - "date":"1362125999", - "price":"31.30003", - "amount":"0.00106592", - "tid":"65584" - }, - { - "date":"1362125999", - "price":"34.43773", - "amount":"0.87000000", - "tid":"65585" - }, - { - "date":"1362125999", - "price":"34.43883", - "amount":"0.77000000", - "tid":"65586" - }, - { - "date":"1362125999", - "price":"34.43993", - "amount":"0.46000000", - "tid":"65587" - }, - { - "date":"1362125999", - "price":"34.45789", - "amount":"4.60326603", - "tid":"65588" - }, - { - "date":"1362131092", - "price":"33.98000", - "amount":"2.28200000", - "tid":"65769" - }, - { - "date":"1362131139", - "price":"33.98000", - "amount":"0.00015000", - "tid":"65771" - }, - { - "date":"1362131139", - "price":"34.45789", - "amount":"4.99985000", - "tid":"65772" - }, - { - "date":"1362131226", - "price":"34.45787", - "amount":"0.89000000", - "tid":"65776" - }, - { - "date":"1362165865", - "price":"34.45787", - "amount":"5.63006361", - "tid":"66427" - }, - { - "date":"1362233142", - "price":"31.34543", - "amount":"0.47900000", - "tid":"66794" - }, - { - "date":"1362235161", - "price":"31.34543", - "amount":"0.19012487", - "tid":"66802" - }, - { - "date":"1362235561", - "price":"34.43955", - "amount":"7.80000000", - "tid":"66803" - }, - { - "date":"1362247838", - "price":"32.00000", - "amount":"0.62000000", - "tid":"66877" - }, - { - "date":"1362281815", - "price":"32.00000", - "amount":"0.13000000", - "tid":"68495" - }, - { - "date":"1362282023", - "price":"31.34543", - "amount":"0.08628113", - "tid":"68552" - }, - { - "date":"1362282023", - "price":"31.30303", - "amount":"0.77700000", - "tid":"68553" - }, - { - "date":"1362282024", - "price":"31.30003", - "amount":"0.77700000", - "tid":"68554" - }, - { - "date":"1362282024", - "price":"30.10007", - "amount":"0.80797560", - "tid":"68555" - }, - { - "date":"1362282024", - "price":"30.10003", - "amount":"0.28343640", - "tid":"68556" - }, - { - "date":"1362282024", - "price":"30.00909", - "amount":"0.73335900", - "tid":"68557" - }, - { - "date":"1362282025", - "price":"30.00707", - "amount":"0.88800000", - "tid":"68558" - }, - { - "date":"1362282025", - "price":"30.00700", - "amount":"0.88800000", - "tid":"68559" - }, - { - "date":"1362282026", - "price":"30.00043", - "amount":"4.53694787", - "tid":"68560" - }, - { - "date":"1362330301", - "price":"34.39799", - "amount":"5.78000000", - "tid":"69378" - }, - { - "date":"1362335360", - "price":"30.50001", - "amount":"9.32000000", - "tid":"69435" - } -] \ No newline at end of file diff --git a/xchange-bitcoincentral/api-specification.txt b/xchange-bitcoincentral/api-specification.txt deleted file mode 100644 index 806ce67eb..000000000 --- a/xchange-bitcoincentral/api-specification.txt +++ /dev/null @@ -1,10 +0,0 @@ -Bitcoin Central Exchange API specification -================================ - -Public API - -## Documentation -https://bitcoin-central.net/s/api-v1-documentation - -## Trading Fee -0.498% \ No newline at end of file diff --git a/xchange-bitcoincentral/api_v1_reference.md b/xchange-bitcoincentral/api_v1_reference.md deleted file mode 100644 index 36c127f59..000000000 --- a/xchange-bitcoincentral/api_v1_reference.md +++ /dev/null @@ -1,1194 +0,0 @@ -API v1 Documentation -==================== - -This document describes the Bitcoin-Central.net v1 API. - -# General API description - -## Authentication - -Authentication is currently done as previously with `HTTP Basic`. The regular username and password should be used. This is deprecated and will soon be replaced with OAuth2. - -Calls that require authentication are marked with "A" in the call description title. - -## Base URL - -The base URL for all calls is `https://bitcoin-central.net`. A complete URL would look like this `https://bitcoin-central.net/api/v1/quotes/3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d`. - -## Formats and required HTTP request headers - -The API will only answer with JSON or empty responses. It expects parameters to be passed in JSON with the correct `Content-Type: application/json` being set. - -## Rate-limit - -API calls are rate-limited by IP to 5000 calls per day. Information about the status of the limit can be found in the `X-RateLimit-Limit` and `X-RateLimit-Remaining` HTTP headers. - -**Example response with rate-limit headers** - - HTTP/1.1 200 - Content-Type: application/json; charset=utf-8 - X-Ratelimit-Limit: 5000 - X-Ratelimit-Remaining: 4982 - Date: Wed, 30 Jan 2013 12:08:58 GMT - - -## Pagination - -Some API calls returning collections may be paginated. In this case the call description title mentions it. - -Calls that return paginated data are marked with "P" in the call description title. - -### HTTP response header - -Calls that return paginated collections will add a `Pagination` HTT header to the response. It will contain a pagination meta-data JSON object. - -**Pagination header example** - - { - // Whether the current page is the first of the collection - "first_page": true, - - // Total amount of available pages - "total_pages": 1, - - // Previous page number - "previous_page": null, - - // Total number of items in the collection - "total": 1, - - // Next page number - "next_page": null, - - // Whether the current page is the last available one - "last_page": true, - - // Record collection offset - "offset": 0 - } - -### Controlling pagination - -Optional pagination parameters may be passed in the request URI in order to control the way the collection gets paginated. If parameters are incorrect a HTTP 400 Bad request status is returned along with an empty body. - -| Parameter | Default | Acceptable values | -|-----------|---------|--------------------------------| -| page | 1 | Positive integer >0 | -| per_page | 20 | Positive integer >=5 and <=100 | - -## Localization - -The relevant results and error messages will be localized to the language associated to the user, currently English and French are supported. - -## Error handling - -Whenever an error is encountered, the answer to a JSON API call will have : - - * An HTTP 422 status (Unprocessable entity) or HTTP 400 (Bad request), - * A JSON array of localized error messages as body - -## Successful calls - -If the API call was successful, the platform will answer with : - - * An HTTP 200 status (OK) or HTTP 201 (Created), - * A JSON representation of the entity being created or updated if relevant - - - -# API Calls - -## Account operations - -An account operation is any ledger operation that changes the account's balance. - -### Get the details of an account operation (A) - -This call will return the details of a single account operation, the response contains : the UUID identifying the operation, the amount of this particular operation, its currency, its creation timestamp, its state (if relevant), a string indicating the type of the operation and the account balance that this operation led to (the sum of all transactions in the same currency including this one but not the ones that came after it). - -**Request path :** `/api/v1/account_operations/{uuid}` - -**Request method :** `GET` - -**Request parameters** - -| Name | Type | Description | -|------|------|-------------------------------| -| uuid | UUID | UUID of the account operation | - -**Response** - -A JSON object with the following attributes is returned : - -| Name | Type | Description | -|------------|----------|---------------------------------------------------| -| uuid | UUID | UUID of the account operation | -| amount | Decimal | Amount of the operation (1) | -| currency | String | Currency of the operation (2) | -| created_at | Datetime | Timestamp of operation creation | -| state | String | Operation state if relevant, `null` otherwise (3) | -| type | String | Operation type (4) | - - 1. Credits are expressed as positive amounts, debits are expressed as negative amounts - 2. See currencies table - 3. See states table - 4. See operation types table - -**Example request :** `GET /api/v1/account_operations/3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d` - -**Example response :** - - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d", - "amount" : 50.0, - "currency" : "EUR", - "created_at" : "2013-01-14T16:28:57Z", - "state" : null, - "type" : "wire_deposit", - "balance" : 550.0 - } - -### Get a list of account operations (A,P) - -This call will return a paginated list of account operations relative to the authenticated account. - -**Request path :** `/api/v1/account_operations` - -**Request method :** `GET` - -**Request parameters** - -_None_ - -**Response** - -A JSON array of account operations is returned. The structure collection elements is detailed at "Get the details of an account operation". - -**Example request :** `GET /api/v1/account_operations` - -**Example response :** - - [ - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d", - "amount" : 50.0, - "currency" : "EUR", - "created_at" : "2013-01-14T16:28:57Z", - "state" : null, - "type" : "wire_deposit", - "balance" : 550.0 - }, - { - "uuid" : "b3c08962-4dc3-9ffc-4dc3-3a7bc1b2ff4d", - "amount" : 500.0, - "currency" : "EUR", - "created_at" : "2013-01-10T12:45:50Z", - "state" : null, - "type" : "wire_deposit", - "balance" : 500.0 - } - ] - -## Send money - -### Send Bitcoins (A) - -This call will perform a Bitcoin transaction. - -**Request path :** `/api/v1/transfers/send_bitcoins` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|---------|---------|-----------------------------| -| amount | Decimal | Amount to send | -| address | String | Recipient's Bitcoin address | - -**Response** - -An `UUID` is returned after the request is queued for execution. It enables the client to make subsequent status check requests. - -**Example request :** `POST /api/v1/transfers/send_bitcoins` - - { - "amount" : 10.0, - "address" : "1KfNzSKFAmpC4kNYaGLqj8LGPHxGmRG2nZ" - } - -**Example response :** - - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d" - } - -### Send money to an e-mail address (A) - -This call will move money to the account identified with the given e-mail address. If no such account is found an e-mail gets sent inviting its recipient to create an account, or sign-in to one to retrieve the sent funds. If the amount isn't claimed after a week the funds are returned to the sender. - -**Request path :** `/api/v1/transfers/send_to_email` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|----------|---------|-------------------------------------------| -| amount | Decimal | Amount to send | -| currency | String | Currency in which the amount is expressed | -| address | String | Recipient's e-mail address | - -**Response** - -An `UUID` is returned after the request is queued for execution. It enables the client to make subsequent status check requests. - -**Example request :** `POST /api/v1/transfers/send_bitcoins` - - { - "amount" : 10.0, - "currency" : "EUR", - "address" : "david@bitcoin-central.net" - } - -**Example response :** - - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d" - } - -## Quotes - -Quotes are a mechanism for clients to send funds or exchange them to other currencies. They provide clients with a guaranteed fixed-rate at which the system will convert their funds before crediting them to their account or send them out. - -The canonical use of a quote is to pay in currency to a Bitcoin invoice, materialized as a QR code : - - 1. User scans Bitcoin QR code - 2. Client app extracts requested Bitcoin amount - 3. Client app requests a quote for this Bitcoin amount to the API and provides the currency in which debit upon quote payment - 4. A guaranteed rate is returned by the API - 5. Client app shows price expressed in the user's currency - 6. After user confirmation the client app instructs the API to pay the quote to a specific Bitcoin address - 7. The merchant receives the payment in Bitcoin and the user is debited in his native currency - -### Create a quote (A) - -This call will create a quote. When doing so clients must specify a currency (the other currency is always assumed to be "BTC") an amount they are requesting and a direction. Combining these parameters in various ways will have the system address a wide array of use cases. - -For example a client can request : - - 1. How much BTC would need to be sold to get exactly 10 EUR - 2. How much BTC could be bought with 10 EUR - 3. How much EUR would the sale of 1 BTC get - 4. How much EUR would be required to buy 1 BTC - -To obtain the relevant quote a client would pass the following parameters : - -| Case | Currency | direction | requested\_btc\_amount | requested\_currency\_amount | -|------|----------|-----------|------------------------|-----------------------------| -| 1 | EUR | sell | N/A | 10 | -| 2 | EUR | buy | N/A | 10 | -| 3 | EUR | sell | 1 | N/A | -| 4 | EUR | buy | 1 | N/A | - -**Request path :** `/api/v1/quotes` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|-----------------------------|---------|------------------------------------------------------------------------| -| requested\_currency\_amount | Decimal | Constrain on the currency amount (1) | -| requested\_btc\_amount | Decimal | Constrain on the Bitcoin amount (1) | -| direction | String | Whether the quote should apply to a sale or a purchase of Bitcoins (2) | -| currency | String | Currency in which the requested_amount is expressed | - - 1. Exactly one of the currencies must be constrained, the other parameter may be omitted - 2. Acceptable values are `buy` and `sell` - -**Response** - -A JSON object with the following parameters is returned. If the current market depth or volatility does not allow for a quote to be given an error will be returned. - -| Name | Type | Description | -|-----------------------------|----------|-------------------------------------------------------| -| uuid | UUID | Quote identifier | -| requested\_currency\_amount | Decimal | The instructed currency amount or `null` | -| requested\_btc\_amount | Decimal | The instructed Bitcoin amount or `null` | -| direction | String | The direction you provided | -| currency_amount | Decimal | The quoted currency amount or `null` | -| btc_amount | Decimal | The quoted Bitcoin amount or `null` | -| rate | Decimal | The quoted exchange rate | -| valid_until | Datetime | The timestamp at which this quote will be invalidated | -| created_at | Datetime | The creation date timestamp | -| executed | Boolean | Whether this quote has already been settled or paid | - - -**Example request :** `POST /api/v1/quotes` - -This demonstrates how to obtain a quote as described in the example use case #1. - - { - "requested_amount" : 10.0, - "currency" : "EUR", - "direction" : "sell" - } - -**Example response :** - - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d", - "currency" : "EUR", - "direction" : "sell", - "rate" : 10.65 - "currency_amount" : null, - "btc_amount" : 0.93896714 - "requested_currency_amount" : 10, - "requested_btc_amount" : null, - "valid_until" : "2013-01-10T13:00:50Z", - "created_at" : "2013-01-10T12:45:50Z", - "executed" : false - } - -### View a quote (A) - -This call will return a JSON object representing a quote - -**Request path :** `/api/v1/quotes/{uuid}` - -**Request method :** `GET` - -**Request parameters** - -| Name | Type | Description | -|------|------|------------------| -| uuid | UUID | Quote identifier | - - -**Response** - -A JSON object with the following parameters is returned. - -| Name | Type | Description | -|-----------------------------|----------|-------------------------------------------------------| -| uuid | UUID | Quote identifier | -| requested\_currency\_amount | Decimal | The instructed currency amount or `null` | -| requested\_btc\_amount | Decimal | The instructed Bitcoin amount or `null` | -| direction | String | The direction you provided | -| currency_amount | Decimal | The quoted currency amount or `null` | -| btc_amount | Decimal | The quoted Bitcoin amount or `null` | -| rate | Decimal | The quoted exchange rate | -| valid_until | Datetime | The timestamp at which this quote will be invalidated | -| created_at | Datetime | The creation date timestamp | -| executed | Boolean | Whether this quote has already been settled or paid | - - -**Example request :** `GET /api/v1/quotes/3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d` - -**Example response :** - - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d", - "currency" : "EUR", - "direction" : "sell", - "rate" : 10.65 - "currency_amount" : null, - "btc_amount" : 0.93896714 - "requested_currency_amount" : 10, - "requested_btc_amount" : null, - "valid_until" : "2013-01-10T13:00:50Z", - "created_at" : "2013-01-10T12:45:50Z", - "executed" : false - } - -### List quotes (A,P) - -This call will return a paginated list of quotes for the client account. - -**Request path :** `/api/v1/quotes` - -**Request method :** `GET` - -**Request parameters** - -N/A - -**Response** - -A JSON array of quote objects is returned. - -**Example request :** `GET /api/v1/quotes` - -**Example response :** - - [ - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d", - "currency" : "EUR", - "direction" : "sell", - "rate" : 10.65 - "currency_amount" : null, - "btc_amount" : 0.93896714 - "requested_currency_amount" : 10, - "requested_btc_amount" : null, - "valid_until" : "2013-01-10T13:00:50Z", - "created_at" : "2013-01-10T12:45:50Z", - "executed" : true - }, - { - "uuid" : "4dc33a7bc1b2-9b7e-3a7b-9ffc-b3c08962ff4d", - "currency" : "EUR", - "direction" : "sell", - "rate" : 10.65 - "currency_amount" : null, - "btc_amount" : 0.93896714 - "requested_currency_amount" : 10, - "requested_btc_amount" : null, - "valid_until" : "2013-01-10T13:00:50Z", - "created_at" : "2013-01-10T12:45:50Z", - "executed" : true - } - ] - -### Pay a quote (A) - -This action applies to quotes for buying BTC. It will perform the exchange creating a user account debit of the calculated `currency_amount` or instructed `requested_currency_amount` and send out the calculated `btc_amount` or instructed `requested_btc_amount` to the Bitcoin address in the `address` field. - -**Request path :** `/api/v1/quotes/{uuid}/pay` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|---------|--------|-----------------------| -| uuid | UUID | Quote identifier | -| address | String | Valid Bitcoin address | - - -**Response** - -A quote JSON object is returned. - -**Example request :** `GET /api/v1/quotes/3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d/pay` - -**Example response :** - - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d", - "currency" : "EUR", - "direction" : "sell", - "rate" : 10.65 - "currency_amount" : null, - "btc_amount" : 0.93896714 - "requested_currency_amount" : 10, - "requested_btc_amount" : null, - "valid_until" : "2013-01-10T13:00:50Z", - "created_at" : "2013-01-10T12:45:50Z", - "executed" : true - } - -### Execute a quote (A) - -This action applies to quotes for buying BTC. It will perform the exchange creating user account debit and credit operations depending on the quote requested. - -**Request path :** `/api/v1/quotes/{uuid}/execute` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|---------|--------|-----------------------| -| uuid | UUID | Quote identifier | - - -**Response** - -A quote JSON object is returned. - -**Example request :** `POST /api/v1/quotes/3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d/execute` - -**Example response :** - - { - "uuid" : "3a7bc1b2-9b7e-4dc3-9ffc-b3c08962ff4d", - "currency" : "EUR", - "direction" : "sell", - "rate" : 10.65 - "currency_amount" : null, - "btc_amount" : 0.93896714 - "requested_currency_amount" : 10, - "requested_btc_amount" : null, - "valid_until" : "2013-01-10T13:00:50Z", - "created_at" : "2013-01-10T12:45:50Z", - "executed" : true - } - -## Invoices - -Invoices are requests for payment. They can be expressed in any arbitrary currency. They all get a unique Bitcoin payment address assigned and a Bitcoin amount calculated from the requested currency amount. - -Payment can be made by sending the `btc_amount` amount of Bitcoins to the `payment_address` address or directly in the requested currency from another account. The invoice payment will trigger a `POST`to the `callback_url`. - -### View an invoice (A) - -This call will return a JSON object representing an invoice - -**Request path :** `/api/v1/invoices/{uuid}` - -**Request method :** `GET` - -**Request parameters** - -| Name | Type | Description | -|------|------|------------------| -| uuid | UUID | Quote identifier | - - -**Response** - -A JSON object with the following parameters is returned. - -| Name | Type | Description | -|-----------------------|----------|-----------------------------------------------------------------| -| uuid | UUID | Invoice identifier | -| state | String | Invoice state _(see appendix)_ | -| payment\_address | String | Bitcoin payment address | -| payment\_bitcoin_\uri | String | Payment URI, should be used to generate QR codes | -| amount | Decimal | Requested amount to be credited upon payment | -| btc_amount | Decimal | Payable amount expressed in BTC | -| currency | String | Currency in which the amount is expressed | -| merchant\_reference | String | Merchant reference | -| merchant\_memo | String | Merchant memo | -| callback\_url | String | URL to which a callback should be made when the invoice is paid | -| item\_url | String | Order-related URL | -| paid\_at | Datetime | Payment timestamp | -| created\_at | Datetime | Creation timestamp | -| updated\_at | Datetime | Update timestamp | -| expires\_at | Datetime | Expiration timestamp | -| settled | Boolean | Has this invoice already been credited ? | -| callback\_fired | Boolean | Has the HTTP callback been successfully fired ? | - - -**Example request :** `GET /api/v1/invoices/70c7936b-f8ce-443a-8338-3762de0a1e92` - -**Example response :** - - { - "uuid": "70c7936b-f8ce-443a-8338-3762de0a1e92", - "amount": 10.0, - "btc_amount": 1.021732, - "callback_fired": false, - "callback_url": null, - "created_at": "2013-01-21T10:20:07Z", - "currency": "EUR", - "expires_at": "2013-01-21T10:40:07Z", - "item_url": null, - "merchant_memo": null, - "merchant_reference": null, - "paid_at": null, - "payment_address": "1JnjJNhdKSgvMKr6xMbqVEudB3eACsGJSz", - "payment_bitcoin_uri" : "bitcoin:1JnjJNhdKSgvMKr6xMbqVEudB3eACsGJSz?amount=100.0&label=&x-pay-curamt=100.0&x-pay-cur=BTC&x-pay-id=7653453d-6372-4ffa-bc56-1e3182ef7f35", - "settled": false, - "state": "pending", - "updated_at": "2013-01-21T10:20:07Z" - } - -### View an invoice (Public) - -It is the same call as the above one, except this call will return a subset of the JSON object representing an invoice. - -**Request path :** `/api/v1/invoices/{uuid}` - -**Request method :** `GET` - -**Request parameters** - -| Name | Type | Description | -|------|------|------------------| -| uuid | UUID | Quote identifier | - - -**Response** - -A JSON object with the following parameters is returned. - -| Name | Type | Description | -|---------------------|----------|-----------------------------------------------------------------| -| uuid | UUID | Invoice identifier | -| state | String | Invoice state _(see appendix)_ | -| payment\_address | String | Bitcoin payment address | -| amount | Decimal | Requested amount to be credited upon payment | -| btc_amount | Decimal | Payable amount expressed in BTC | -| currency | String | Currency in which the amount is expressed | -| merchant\_reference | String | Merchant reference | -| merchant\_memo | String | Merchant memo | -| item\_url | String | Order-related URL | -| paid\_at | Datetime | Payment timestamp | -| created\_at | Datetime | Creation timestamp | -| updated\_at | Datetime | Update timestamp | -| expires\_at | Datetime | Expiration timestamp | - - -**Example request :** `GET /api/v1/invoices/70c7936b-f8ce-443a-8338-3762de0a1e92` - -**Example response :** - - { - "uuid": "70c7936b-f8ce-443a-8338-3762de0a1e92", - "amount": 10.0, - "btc_amount": 1.021732, - "callback_fired": false, - "callback_url": null, - "created_at": "2013-01-21T10:20:07Z", - "currency": "EUR", - "expires_at": "2013-01-21T10:40:07Z", - "item_url": null, - "merchant_memo": null, - "merchant_reference": null, - "paid_at": null, - "payment_address": "1JnjJNhdKSgvMKr6xMbqVEudB3eACsGJSz", - "payment_bitcoin_uri" : "bitcoin:1JnjJNhdKSgvMKr6xMbqVEudB3eACsGJSz?amount=100.0&label=&x-pay-curamt=100.0&x-pay-cur=BTC&x-pay-id=7653453d-6372-4ffa-bc56-1e3182ef7f35", - "settled": false, - "state": "pending", - "updated_at": "2013-01-21T10:20:07Z" - } - -### List invoices (A,P) - -This call will return a paginated list of invoices for the client account. - -**Request path :** `/api/v1/invoices` - -**Request method :** `GET` - -**Request parameters** - -N/A - -**Response** - -A JSON array of invoice objects is returned. - -**Example request :** `GET /api/v1/quotes` - -**Example response :** - - [ - { - "uuid": "8338936b-f8ce-443a-70c7-3762de0a1e92", - "amount": 10.0, - "btc_amount": 1.021732, - "callback_fired": false, - "callback_url": null, - "created_at": "2013-01-21T10:20:07Z", - "currency": "EUR", - "expires_at": "2013-01-21T10:40:07Z", - "item_url": null, - "merchant_memo": null, - "merchant_reference": null, - "paid_at": null, - "payment_address": "1JnjJNhdKSgvMKr6xMbqVEudB3eACsGJSz", - "settled": false, - "state": "pending", - "updated_at": "2013-01-21T10:20:07Z" - }, - { - "uuid": "70c7936b-f8ce-443a-8338-3762de0a1e92", - "amount": 10.0, - "btc_amount": 1.021732, - "callback_fired": false, - "callback_url": null, - "created_at": "2013-01-21T10:20:07Z", - "currency": "EUR", - "expires_at": "2013-01-21T10:40:07Z", - "item_url": null, - "merchant_memo": null, - "merchant_reference": null, - "paid_at": null, - "payment_address": "1JnjJNhdKSgvMKr6xMbqVEudB3eACsGJSz", - "settled": false, - "state": "pending", - "updated_at": "2013-01-21T10:20:07Z" - } - ] - -### Create an invoice (A) - -This call creates an invoice - -**Request path :** `/api/v1/invoices` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|---------------------|---------|------------------------------------------------------------------------------| -| amount | Decimal | Requested amount to be credited upon payment | -| currency | String | Currency in which the amount is expressed | -| merchant\_reference | String | Merchant reference _(optional)_ | -| merchant\_memo | String | Merchant memo _(optional)_ | -| callback\_url | String | URL to which a callback should be made when the invoice is paid _(optional)_ | -| item\_url | String | Order-related URL _(optional)_ | - -**Response** - -An invoice JSON object is returned. - -**Example request :** `POST /api/v1/invoices` - - { - "amount" : 10.0, - "currency" : "EUR" - } - -**Example response :** - - { - "uuid": "70c7936b-f8ce-443a-8338-3762de0a1e92", - "amount": 10.0, - "btc_amount": 1.021732, - "callback_fired": false, - "callback_url": null, - "created_at": "2013-01-21T10:20:07Z", - "currency": "EUR", - "expires_at": "2013-01-21T10:40:07Z", - "item_url": null, - "merchant_memo": null, - "merchant_reference": null, - "paid_at": null, - "payment_address": "1JnjJNhdKSgvMKr6xMbqVEudB3eACsGJSz", - "settled": false, - "state": "pending", - "updated_at": "2013-01-21T10:20:07Z" - } - -## Trading - -### Place an order (A) - -This call will place a trade order and queue it for execution. - -**Request path :** `/api/v1/trade_orders` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|----------|---------|--------------------------------------------------| -| amount | Decimal | Amount of Bitcoins to trade | -| currency | String | Currency to trade against | -| price | Decimal | Price _(may be omitted to place a market order)_ | -| type | String | Must be `buy` (bid) or `sell` (ask) | - -**Response** - -An trade order JSON object is returned with the following parameters - -| Name | Type | Description | -|-------------------|----------|-----------------------------------| -| uuid | UUID | Trade order identifier | -| amount | Decimal | Remaining Bitcoin amount to trade | -| instructed_amount | Decimal | Amount of Bitcoins to trade | -| currency | String | Currency to trade against | -| price | Decimal | Price _(null for a market order)_ | -| type | String | Either `buy` or `sell` | -| created_at | Datetime | Creation timestamp | -| updated_at | Datetime | Update timestamp | - -**Example request :** `POST /api/v1/trade_orders` - - { - "amount" : 10.0, - "type" : "buy", - "currency" : "EUR" - } - -**Example response :** - - { - "amount": 10.0, - "type": "buy", - "created_at": "2013-01-21T22:07:15Z", - "instructed_amount": 10.0, - "price": null, - "state": "pending_execution", - "updated_at": "2013-01-21T22:07:15Z", - "uuid": "8b3c3446-9c5d-48a8-8044-08622cd4607b" - } - -### Cancel an order (A) - -This call will enqueue a cancel order job to remove it from the order book. - -**Request path :** `/api/v1/trade_orders/{uuid}` - -**Request method :** `DELETE` - -**Request parameters** - -| Name | Type | Description | -|------|------|------------------------| -| uuid | UUID | Trade order identifier | - -**Example request :** `DELETE /api/v1/trade_orders/8b3c3446-9c5d-48a8-8044-08622cd4607b` - -**Example response :** - -N/A - -### View trades for an order (A) - -This call will return a collection of trades that were executed for a particular order. - -**Request path :** `/api/v1/trade_orders/{uuid}/trades` - -**Request method :** `GET` - -**Request parameters** - -| Name | Type | Description | -|------|------|------------------------| -| uuid | UUID | Trade order identifier | - -**Response** - -An array of trade JSON objects is returned. - -| Name | Type | Description | -|-----------------|----------|--------------------------------------------------| -| uuid | UUID | Trade identifier | -| traded_currency | Decimal | Amount traded, expressed in `currency` | -| traded_btc | Decimal | Amount of Bitcoins traded | -| currency | String | Currency in which `traded_currency` is expressed | -| price | Decimal | Price at which the exchange was made | -| created_at | Datetime | Creation timestamp | - - - -**Example request :** `GET /api/v1/trade_orders/8b32ddf1-1675-4ed3-b1bb-b4efc4ecd98c/trades` - -**Example response :** - - [ - { - "created_at": "2013-01-22T08:19:41Z", - "currency": "EUR", - "price": 5.0, - "traded_btc": 980.0, - "traded_currency": 4940.0, - "uuid": "1c86abf0-170a-4101-84d1-cdad913c95dd" - }, - { - "created_at": "2013-01-22T08:19:41Z", - "currency": "EUR", - "price": 6.0, - "traded_btc": 10.0, - "traded_currency": 60.0, - "uuid": "170aabf0-1c86-4101-84d1-cdad913c95dd" - } - ] - -### View an order (A) - -This call will return a trade order JSON object. - -**Request path :** `/api/v1/trade_orders/{uuid}` - -**Request method :** `GET` - -**Request parameters** - -| Name | Type | Description | -|------|------|------------------| -| uuid | UUID | Order identifier | - -**Response** - -A JSON object with the following parameters is returned. - -| Name | Type | Description | -|-------------------|----------|-----------------------------------| -| uuid | UUID | Trade order identifier | -| amount | Decimal | Remaining Bitcoin amount to trade | -| instructed_amount | Decimal | Amount of Bitcoins to trade | -| currency | String | Currency to trade against | -| price | Decimal | Price _(null for a market order)_ | -| type | String | Either `buy` or `sell` | -| created_at | Datetime | Creation timestamp | -| updated_at | Datetime | Update timestamp | - -**Example request :** `GET /api/v1/trade_orders/8b32ddf1-1675-4ed3-b1bb-b4efc4ecd98c` - -**Example response :** - - { - "amount": 10.0, - "type": "buy", - "created_at": "2013-01-22T08:19:37Z", - "instructed_amount": 1000.0, - "price": 11.0, - "state": "active", - "updated_at": "2013-01-22T08:19:41Z", - "uuid": "8b32ddf1-1675-4ed3-b1bb-b4efc4ecd98c" - } - -### List orders (A,P) - -This call will return a paginated list of the client's trade orders. - -**Request path :** `/api/v1/trade_orders` - -**Request method :** `GET` - -**Request parameters** - -N/A - -**Example request :** `GET /api/v1/trade_orders` - -**Example response :** - - [ - { - "amount": 10.0, - "type": "buy", - "created_at": "2013-01-21T22:15:38Z", - "instructed_amount": 10.0, - "price": null, - "state": "pending_execution", - "updated_at": "2013-01-21T22:15:38Z", - "uuid": "52823408-972f-4551-acc5-e7d3f032c6d5" - }, - { - "amount": 10.0, - "type": "buy", - "created_at": "2013-01-21T22:15:40Z", - "instructed_amount": 10.0, - "price": null, - "state": "pending_execution", - "updated_at": "2013-01-21T22:15:40Z", - "uuid": "6e3ea778-9ef7-4e4f-9910-85e735f7b42a" - } - ] - - -## Coupons - -Coupons are a way to easily move money between accounts, they are debited from the issuer's account upon creation and may be redeemed at anytime against any account (including the issuer). - -They are materialized by a unique redemption code. This code should be kept private as anyone having knowledge of it can redeem the funds. - -### Create a coupon (A) - -This call issues a coupon - -**Request path :** `/api/v1/coupons` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|---------------------|---------|-------------------------------------------| -| amount | Decimal | Currency value for the issued coupon | -| currency | String | Currency in which the amount is expressed | - -**Response** - -A coupon code is returned - -**Example request :** `POST /api/v1/coupons` - - { - "amount" : 12.0, - "currency" : "EUR" - } - -**Example response :** - - { - "code": "BP-EUR-9660407B43799CCED320" - } - -### View a coupon - -This call will return a JSON object representing a coupon - -**Request path :** `/api/v1/coupons/{code}` - -**Request method :** `GET` - -**Request parameters** - -| Name | Type | Description | -|------|--------|------------------| -| code | String | Coupon code | - - -**Response** - -A JSON object with the following parameters is returned. - -| Name | Type | Description | -|-----------------------|----------|-------------------------------------------| -| uuid | UUID | Coupon account operation identifier | -| code | String | Coupon code | -| state | String | Coupon state _(see appendix)_ | -| amount | Decimal | Coupon value | -| currency | String | Currency in which the amount is expressed | -| created\_at | Datetime | Creation timestamp | - - -**Example request :** `GET /api/v1/coupons/BP-EUR-9660407B43799CCED320` - -**Example response :** - - { - "amount": -12.0, - "code": "BP-EUR-9660407B43799CCED320", - "created_at": "2013-01-30T11:52:36Z", - "currency": "EUR", - "state": "pending", - "uuid": "c21adaf6-f5a2-4d93-a762-a63b89b52265" - } - -### Redeem a coupon (A) - -This call will a redeem a coupon to the client's account. It returns an `UUID`, this identifier can be used to request details about the account operation created for the client's account by the redemption of the coupon (credit of the coupon value). - -This call may be used to void a coupon by redeeming it against the account that issued it. - -**Request path :** `/api/v1/coupons/redeem` - -**Request method :** `POST` - -**Request parameters** - -| Name | Type | Description | -|------|--------|------------------| -| code | String | Coupon code | - -**Response** - -A JSON object with the following parameters is returned. - -| Name | Type | Description | -|-----------------------|----------|-------------------------------------------| -| uuid | UUID | Redemption account operation identifier | - -**Example request :** `POST /api/v1/coupons` - - { - "code": "BP-EUR-9660407B43799CCED320" - } - -**Example response :** - - { - "uuid": "3e0004cd-158c-40d6-b8f9-f4b672e86308" - } - -# Appendix - -## Codes and types tables - -### Currencies - -The following currencies are available : - -| Symbol | Currency | -|--------|----------------| -| BTC | Bitcoin | -| EUR | Euro | -| GBP | Pound Sterling | -| USD | US Dollar | - - -### Operation types - -| Type | Description | -|-----------------------------|---------------------------------------------------------| -| fee | Trading fee | -| coupon | Issue of a redeemable code | -| bitcoin_transfer | Bitcoin withdrawal | -| wire_transfer | Wire transfer withdrawal | -| email_transfer | Transfer of funds to an e-mail address | -| coupon_redemption | Redemption of a redeemable code | -| email\_transfer\_redemption | Redemption of an e-mail transfer | -| charge | Generic charge | -| bank_charge | Bank charge | -| invoice_credit | Payment of an invoice you issued (credits your account) | -| invoice_payment | Payment for an invoice (debits your account) | -| wire_deposit | Deposit by bank wire | -| trade | Trade | -| reversal | Reversal | - -### States - -#### Transfers (Bitcoin transfer, Wire transfer) - -The state of a transfer lets you check whether it has been sent out to the underlying network (banking network or Bitcoin network). - -| State | Description | -|-----------|---------------------------------------| -| pending | The transfer hasn't been sent out yet | -| processed | The transfer has been sent out | - -#### Coupons - -| State | Description | -|----------|-----------------------------------------| -| pending | The coupon is valid and may be redeemed | -| redeemed | The coupon has already been redeemed | -| canceled | The coupon was redeemed to the issuer | - -#### E-mail transfers - -| State | Description | -|----------------------|--------------------------------------------------------------------------| -| pending_collection | The recipient hasn't claimed the e-mail transfer amount yet | -| canceled | The e-mail transfer was canceled | -| expired | The transfer has expired | -| unreachable_receiver | An error occurred while sending the e-mail notification to its recipient | -| processed | The recipient has collected the sent amount | - -#### Invoices - -| State | Description | -|----------------|-------------------------------------------------| -| pending | The invoice is pending payment | -| partially_paid | The invoice has a partially confirmed payment | -| confirming | A full or over-payment is confirming | -| paid | The invoice has a confirmed payment | -| overpaid | The invoice has a confirmed over-payment | -| error | The payment could not be converted as requested | - -#### Trade orders - -| State | Description | -|--------------------|--------------------------------------------------------------------------------| -| pending_execution | The order has been queued for execution | -| active | The order has been executed but not filled it is visible in the order book (1) | -| filled | The order has been filled | -| canceled | The order has been canceled | -| insufficient_funds | The order cannot execute further due to lack of funds (2) | - - 1. The amount shown in the order book is the amount that is actually executable given your balance, not necessarily the instructed amount - 2. Order execution resumes as soon as more funds are available - -# Left TODO - -## Websockets - - * Document the socket.io API - -## Misc - - * Get an estimate (unsaved quote) - * Add a `/me` API call - * Add a call for account balances diff --git a/xchange-bitcoincentral/pom.xml b/xchange-bitcoincentral/pom.xml deleted file mode 100644 index 8e95bb665..000000000 --- a/xchange-bitcoincentral/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - develop-SNAPSHOT - - - xchange-bitcoincentral - - Bitcoin Central Exchange - XChange implementation for the Bitcoin Central Exchange - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - develop-SNAPSHOT - - - - - \ No newline at end of file diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentral.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentral.java deleted file mode 100644 index acd7fba19..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentral.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; - -import si.mazi.rescu.BasicAuthCredentials; - -import com.xeiam.xchange.bitcoincentral.dto.account.BitcoinCentralAccountInfo; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralDepth; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTicker; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTrade; -import com.xeiam.xchange.bitcoincentral.dto.trade.BitcoinCentralMyOrder; -import com.xeiam.xchange.bitcoincentral.dto.trade.TradeOrderRequestWrapper; - -/** - * @author Matija Mazi - */ -@Path("api/v1") -@Consumes(MediaType.APPLICATION_JSON) -public interface BitcoinCentral { - - @GET - @Path("account") - BitcoinCentralAccountInfo getAccountInfo(@HeaderParam("Authorization") BasicAuthCredentials credentials); - - @GET - @Path("account/transfers") - Object getAccountTransfers(@HeaderParam("Authorization") BasicAuthCredentials credentials); - - /** - * @param credentials username and password - * @param page the page to fetch (1-based) - * @param pageSize page size (between 5 and 100 inclusive) - * @return - */ - @GET - @Path("account/trade_orders") - BitcoinCentralMyOrder[] getAccountTradeOrders(@HeaderParam("Authorization") BasicAuthCredentials credentials, @QueryParam("page") int page, @QueryParam("per_page") int pageSize); - - /** - * @param credentials username and password - * @param order the order to place - * @return - */ - @POST - @Path("account/trade_orders") - BitcoinCentralMyOrder placeLimitOrder(@HeaderParam("Authorization") BasicAuthCredentials credentials, TradeOrderRequestWrapper order); - - @DELETE - @Path("/account/trade_orders/{id}") - String cancelOrder(@HeaderParam("Authorization") BasicAuthCredentials credentials, @PathParam("id") String orderId); - - @GET - @Path("ticker") - BitcoinCentralTicker getTicker(@QueryParam("currency") String currency); - - @GET - @Path("depth/{currency}") - BitcoinCentralDepth getOrderBook(@PathParam("currency") String currency); - - @GET - @Path("trades/{currency}") - BitcoinCentralTrade[] getTrades(@PathParam("currency") String currency, @QueryParam("per_page") int perPage); -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralAdapters.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralAdapters.java deleted file mode 100644 index 9ed18c916..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralAdapters.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -import com.xeiam.xchange.bitcoincentral.dto.account.BitcoinCentralAccountInfo; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BidAsk; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralDepth; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTicker; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTrade; -import com.xeiam.xchange.bitcoincentral.dto.trade.BitcoinCentralMyOrder; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.Wallet; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Various adapters for converting from Bitcoin Central DTOs to XChange DTOs - * - * @author Matija Mazi - */ -public final class BitcoinCentralAdapters { - - /** - * private Constructor - */ - private BitcoinCentralAdapters() { - - } - - /** - * Adapts a BitcoinCentralAccountInfo to a AccountInfo - */ - public static AccountInfo adaptAccountInfo(BitcoinCentralAccountInfo accountInfo, String userName) { - - Wallet eurWallet = new Wallet("EUR", BigMoney.of(CurrencyUnit.EUR, accountInfo.getEur())); - Wallet btcWallet = Wallet.createInstance("BTC", accountInfo.getBtc()); - Wallet usdWallet = new Wallet("GBP", BigMoney.of(CurrencyUnit.CAD, accountInfo.getGbp())); - Wallet inrWallet = new Wallet("USD", BigMoney.of(CurrencyUnit.getInstance("INR"), accountInfo.getUsd())); - - return new AccountInfo(userName, Arrays.asList(btcWallet, usdWallet, eurWallet, inrWallet)); - } - - /** - * Adapts a BitcoinCentralTicker to a Ticker Object - * - * @param bitcoinCentralTicker - * @return - */ - public static Ticker adaptTicker(BitcoinCentralTicker bitcoinCentralTicker, String tradableIdentifier) { - - BigMoney last = MoneyUtils.parseMoney(bitcoinCentralTicker.getCurrency().toUpperCase(), bitcoinCentralTicker.getPrice()); - BigMoney bid = MoneyUtils.parseMoney(bitcoinCentralTicker.getCurrency().toUpperCase(), bitcoinCentralTicker.getBid()); - BigMoney ask = MoneyUtils.parseMoney(bitcoinCentralTicker.getCurrency().toUpperCase(), bitcoinCentralTicker.getAsk()); - BigMoney high = MoneyUtils.parseMoney(bitcoinCentralTicker.getCurrency().toUpperCase(), bitcoinCentralTicker.getHigh()); - BigMoney low = MoneyUtils.parseMoney(bitcoinCentralTicker.getCurrency().toUpperCase(), bitcoinCentralTicker.getLow()); - BigDecimal volume = bitcoinCentralTicker.getVolume(); - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withBid(bid).withAsk(ask).withHigh(high).withLow(low).withVolume(volume).build(); - } - - /** - * BitcoinCentralDepth to a OrderBook Object - * - * @param bitcoinCentralDepth - * @param currency - * @param tradableIdentifier - * @return - */ - public static OrderBook adaptOrders(BitcoinCentralDepth bitcoinCentralDepth, String currency, String tradableIdentifier) { - - List asks = createOrders(tradableIdentifier, currency, Order.OrderType.ASK, bitcoinCentralDepth.getAsks()); - List bids = createOrders(tradableIdentifier, currency, Order.OrderType.BID, bitcoinCentralDepth.getBids()); - return new OrderBook(asks, bids); - } - - /** - * @param tradableIdentifier - * @param currency - * @param orderType - * @param orders - * @return - */ - private static List createOrders(String tradableIdentifier, String currency, Order.OrderType orderType, List orders) { - - List limitOrders = new ArrayList(); - for (BidAsk bidAsk : orders) { - limitOrders.add(new LimitOrder(orderType, bidAsk.getAmount(), tradableIdentifier, currency, MoneyUtils.parse(currency + " " + bidAsk.getPrice()))); - } - return limitOrders; - } - - /** - * Adapts a BitcoinCentralTrade[] to Trades DTO - * - * @param bitcoinCentralTrades - * @param currency - * @param tradableIdentifier - * @return - */ - public static Trades adaptTrades(BitcoinCentralTrade[] bitcoinCentralTrades, String currency, String tradableIdentifier) { - - List trades = new ArrayList(); - - for (BitcoinCentralTrade bitcoinCentralTrade : bitcoinCentralTrades) { - - Date date = DateUtils.fromMillisUtc(bitcoinCentralTrade.getCreatedAtInt() * 1000L); - - trades.add( - - new Trade( - - null, - - bitcoinCentralTrade.getTradedBtc(), - - tradableIdentifier, - - bitcoinCentralTrade.getCurrency(), - - BigMoney.of(CurrencyUnit.of(bitcoinCentralTrade.getCurrency()), - - bitcoinCentralTrade.getPrice()) - - , date)); - } - return new Trades(trades); - } - - public static List adaptActive(BitcoinCentralMyOrder[] accountTradeOrders) { - - List orders = new ArrayList(); - for (BitcoinCentralMyOrder order : accountTradeOrders) { - if (order.isPendingExecution()) { - orders.add(new LimitOrder(order.getCategory().type, order.getAmount(), "BTC", order.getCurrency(), Integer.toString(order.getId()), BigMoney.of(CurrencyUnit.getInstance(order.getCurrency()), - order.getPpc()))); - } - } - return orders; - } -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralExchange.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralExchange.java deleted file mode 100644 index f5c5b1184..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralExchange.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitcoincentral.service.account.polling.BitcoinCentralPollingAccountService; -import com.xeiam.xchange.bitcoincentral.service.marketdata.polling.BitcoinCentralPollingMarketDataService; -import com.xeiam.xchange.bitcoincentral.service.trade.polling.BitcoinCentralPollingTradeService; - -/** - * @author Matija Mazi - */ -public class BitcoinCentralExchange extends BaseExchange implements Exchange { - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://bitcoin-central.net"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("Bitcoin-Central"); - exchangeSpecification.setExchangeDescription("Bitcoin-Central is a service operated by the French company Paymium."); - return exchangeSpecification; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingAccountService = new BitcoinCentralPollingAccountService(exchangeSpecification); - this.pollingMarketDataService = new BitcoinCentralPollingMarketDataService(exchangeSpecification); - this.pollingTradeService = new BitcoinCentralPollingTradeService(exchangeSpecification); - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralUtils.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralUtils.java deleted file mode 100644 index 8f3b7a221..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/BitcoinCentralUtils.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * Copyright (C) 2013 Matija Mazi - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared BitcoinCentral properties - */ -public final class BitcoinCentralUtils { - - // private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); - - /** - * private Constructor - */ - private BitcoinCentralUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - CurrencyPair.BTC_EUR - - // for now, volume too low... - // CurrencyPair.BTC_GBP, - // CurrencyPair.BTC_USD - - ); - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - - // /** - // * Format a date String for Bitstamp - // * - // * @param dateString - // * @return - // */ - // public static Date parseDate(String dateString) { - // - // try { - // return DATE_FORMAT.parse(dateString); - // } catch (ParseException e) { - // throw new ExchangeException("Illegal date/time format", e); - // } - // } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/account/BitcoinCentralAccountInfo.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/account/BitcoinCentralAccountInfo.java deleted file mode 100644 index 1c5d5fe23..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/account/BitcoinCentralAccountInfo.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.account; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitcoinCentralAccountInfo { - - private final BigDecimal eur; - private final BigDecimal btc; - private final BigDecimal gbp; - private final BigDecimal usd; - private final String address; - private final BigDecimal unconfirmedBtc; - - public BitcoinCentralAccountInfo(@JsonProperty("EUR") BigDecimal eur, @JsonProperty("BTC") BigDecimal btc, @JsonProperty("GBP") BigDecimal gbp, @JsonProperty("USD") BigDecimal usd, - @JsonProperty("address") String address, @JsonProperty("UNCONFIRMED_BTC") BigDecimal unconfirmedBtc) { - - this.eur = eur; - this.btc = btc; - this.gbp = gbp; - this.usd = usd; - this.address = address; - this.unconfirmedBtc = unconfirmedBtc; - } - - public BigDecimal getEur() { - - return eur; - } - - public BigDecimal getBtc() { - - return btc; - } - - public BigDecimal getGbp() { - - return gbp; - } - - public BigDecimal getUsd() { - - return usd; - } - - public String getAddress() { - - return address; - } - - public BigDecimal getUnconfirmedBtc() { - - return unconfirmedBtc; - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BidAsk.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BidAsk.java deleted file mode 100644 index 07bf73138..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BidAsk.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author timmolter - */ -public final class BidAsk { - - private final BigDecimal amount; - private final String currency; - private final BigDecimal price; - private final BigDecimal timestamp; - - /** - * Constructor - * - * @param amount - * @param currency - * @param price - * @param timestamp - */ - public BidAsk(@JsonProperty("amount") BigDecimal amount, @JsonProperty("currency") String currency, @JsonProperty("price") BigDecimal price, @JsonProperty("timestamp") BigDecimal timestamp) { - - this.amount = amount; - this.currency = currency; - this.price = price; - this.timestamp = timestamp; - } - - public BigDecimal getAmount() { - - return this.amount; - } - - public String getCurrency() { - - return this.currency; - } - - public BigDecimal getPrice() { - - return this.price; - } - - public BigDecimal getTimestamp() { - - return this.timestamp; - } - - @Override - public String toString() { - - return "BidAsk [amount=" + amount + ", currency=" + currency + ", price=" + price + ", timestamp=" + timestamp + "]"; - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralDepth.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralDepth.java deleted file mode 100644 index c031a73f9..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralDepth.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.marketdata; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author timmolter - */ -public final class BitcoinCentralDepth { - - private final List asks; - private final List bids; - - /** - * Constructor - * - * @param asks - * @param bids - */ - public BitcoinCentralDepth(@JsonProperty("asks") List asks, @JsonProperty("bids") List bids) { - - this.asks = asks; - this.bids = bids; - } - - public List getAsks() { - - return this.asks; - } - - public List getBids() { - - return this.bids; - } - - @Override - public String toString() { - - return "BitcoinCentralDepth [asks=" + asks.toString() + ", bids=" + bids.toString() + "]"; - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTicker.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTicker.java deleted file mode 100644 index 1adcaa45c..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTicker.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author timmolter - */ -public final class BitcoinCentralTicker { - - private final BigDecimal ask; - private final BigDecimal at; - private final BigDecimal bid; - private final String currency; - private final BigDecimal high; - private final BigDecimal low; - private final BigDecimal midpoint; - private final BigDecimal price; - private final BigDecimal variation; - private final BigDecimal volume; - - public BitcoinCentralTicker(@JsonProperty("ask") BigDecimal ask, @JsonProperty("at") BigDecimal at, @JsonProperty("bid") BigDecimal bid, @JsonProperty("currency") String currency, - @JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("midpoint") BigDecimal midpoint, @JsonProperty("price") BigDecimal price, - @JsonProperty("variation") BigDecimal variation, @JsonProperty("volume") BigDecimal volume) { - - this.ask = ask; - this.at = at; - this.bid = bid; - this.currency = currency; - this.high = high; - this.low = low; - this.midpoint = midpoint; - this.price = price; - this.variation = variation; - this.volume = volume; - } - - public BigDecimal getAsk() { - - return this.ask; - } - - public BigDecimal getAt() { - - return this.at; - } - - public BigDecimal getBid() { - - return this.bid; - } - - public String getCurrency() { - - return this.currency; - } - - public BigDecimal getHigh() { - - return this.high; - } - - public BigDecimal getLow() { - - return this.low; - } - - public BigDecimal getMidpoint() { - - return this.midpoint; - } - - public BigDecimal getPrice() { - - return this.price; - } - - public BigDecimal getVariation() { - - return this.variation; - } - - public BigDecimal getVolume() { - - return this.volume; - } - - @Override - public String toString() { - - return "BitcoinCentralTicker [ask=" + ask + ", at=" + at + ", bid=" + bid + ", currency=" + currency + ", high=" + high + ", low=" + low + ", midpoint=" + midpoint + ", price=" + price - + ", variation=" + variation + ", volume=" + volume + "]"; - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTrade.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTrade.java deleted file mode 100644 index 0f82269ff..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/marketdata/BitcoinCentralTrade.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author timmolter - */ -public final class BitcoinCentralTrade { - - private final String uuid; - private final BigDecimal tradedBtc; - private final BigDecimal tradedCurrency; - private final String createdAt; - private final long createdAtInt; - private final String currency; - private final BigDecimal price; - - /** - * Constructor - * - * @param uuid - * @param tradedBtc - * @param tradedCurrency - * @param createdAt - * @param currency - * @param price - */ - public BitcoinCentralTrade(@JsonProperty("uuid") String uuid, @JsonProperty("traded_btc") BigDecimal tradedBtc, @JsonProperty("traded_currency") BigDecimal tradedCurrency, - @JsonProperty("created_at") String createdAt, @JsonProperty("created_at_int") long createdAtInt, @JsonProperty("currency") String currency, @JsonProperty("price") BigDecimal price) { - - this.uuid = uuid; - this.tradedBtc = tradedBtc; - this.tradedCurrency = tradedCurrency; - this.createdAt = createdAt; - this.createdAtInt = createdAtInt; - this.currency = currency; - this.price = price; - } - - public String getUuid() { - - return uuid; - } - - public BigDecimal getTradedBtc() { - - return tradedBtc; - } - - public BigDecimal getTradedCurrency() { - - return tradedCurrency; - } - - public String getCreatedAt() { - - return createdAt; - } - - public long getCreatedAtInt() { - - return createdAtInt; - } - - public String getCurrency() { - - return currency; - } - - public BigDecimal getPrice() { - - return price; - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralMyOrder.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralMyOrder.java deleted file mode 100644 index 19407886a..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralMyOrder.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.trade; - -import java.math.BigDecimal; -import java.text.ParseException; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BitcoinCentralMyOrder extends BitcoinCentralTradeData { - - public static final String STATE_PENDING_EXECUTION = "pending_execution"; - - private final String state; - - public BitcoinCentralMyOrder(@JsonProperty("ppc") BigDecimal ppc, @JsonProperty("category") Category category, @JsonProperty("currency") String currency, @JsonProperty("amount") BigDecimal amount, - @JsonProperty("created_at") String createdAt, @JsonProperty("id") int id, @JsonProperty("state") String state) throws ParseException { - - super(ppc, category, currency, amount, id, createdAt); - this.state = state; - } - - public String getState() { - - return state; - } - - public boolean isPendingExecution() { - - return STATE_PENDING_EXECUTION.equals(getState()); - } -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTrade.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTrade.java deleted file mode 100644 index 95ca71eaf..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTrade.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.trade; - -import java.math.BigDecimal; -import java.text.ParseException; -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BitcoinCentralTrade extends BitcoinCentralTradeData { - - private final BigDecimal tradedBtc; - private final BigDecimal tradedCurrency; - private Date createdTime; - - public BitcoinCentralTrade(@JsonProperty("ppc") BigDecimal ppc, @JsonProperty("category") Category category, @JsonProperty("currency") String currency, @JsonProperty("amount") BigDecimal amount, - @JsonProperty("created_at") String createdAt, @JsonProperty("id") int id, @JsonProperty("traded_btc") BigDecimal tradedBtc, @JsonProperty("traded_currency") BigDecimal tradedCurrency) - throws ParseException { - - super(ppc, category, currency, amount, id, createdAt); - this.tradedBtc = tradedBtc; - this.tradedCurrency = tradedCurrency; - } - - public BigDecimal getTradedBtc() { - - return tradedBtc; - } - - public BigDecimal getTradedCurrency() { - - return tradedCurrency; - } -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeBase.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeBase.java deleted file mode 100644 index d79e5e045..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeBase.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.trade; - -import java.math.BigDecimal; -import java.text.MessageFormat; - -import com.xeiam.xchange.dto.Order; - -/** - * @author Matija Mazi - */ -public abstract class BitcoinCentralTradeBase { - - protected final BigDecimal amount; - protected final Category category; - protected final String currency; - protected final BigDecimal ppc; - - protected BitcoinCentralTradeBase(Category category, String currency, BigDecimal amount, BigDecimal ppc) { - - this.category = category; - this.currency = currency; - this.amount = amount; - this.ppc = ppc; - } - - public BigDecimal getAmount() { - - return amount; - } - - public Category getCategory() { - - return category; - } - - public String getCurrency() { - - return currency; - } - - @Override - public String toString() { - - return MessageFormat.format("BitcoinCentralTradeBase[amount={0}, category={1}, currency=''{2}'']", amount, category, currency); - } - - public BigDecimal getPpc() { - - return ppc; - } - - public static enum Category { - buy(Order.OrderType.BID), sell(Order.OrderType.ASK); - - public Order.OrderType type; - - private Category(Order.OrderType type) { - - this.type = type; - } - } -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeData.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeData.java deleted file mode 100644 index 65edc0403..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeData.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.trade; - -import java.math.BigDecimal; -import java.text.MessageFormat; -import java.util.Date; - -/** - * @author Matija Mazi - */ -public abstract class BitcoinCentralTradeData extends BitcoinCentralTradeBase { - - protected final String createdAt; - protected final int id; - protected final Date createdTime; - - public BitcoinCentralTradeData(BigDecimal ppc, Category category, String currency, BigDecimal amount, int id, String createdAt) { - - super(category, currency, amount, ppc); - this.id = id; - this.createdAt = createdAt; - this.createdTime = null; - // todo: correct pattern for SimpleDateFormat - // this.createdTime = new SimpleDateFormat("2011-07-05T00:12:07+02:00").parse(createdAt); - } - - public String getCreatedAt() { - - return createdAt; - } - - public int getId() { - - return id; - } - - public Date getCreatedTime() { - - return createdTime; - } - - @Override - public String toString() { - - return MessageFormat.format("BitcoinCentralTradeBase[amount={0}, category={1}, currency=''{2}'', price={3}, createdAt=''{4}'', id={5}, createdTime={6}]", amount, category, currency, getPpc(), - createdAt, id, createdTime); - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeRequest.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeRequest.java deleted file mode 100644 index 82d85ce4c..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/BitcoinCentralTradeRequest.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.trade; - -import java.math.BigDecimal; -import java.text.MessageFormat; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BitcoinCentralTradeRequest extends BitcoinCentralTradeBase { - - @JsonProperty("type") - private final Type type; - - public BitcoinCentralTradeRequest(@JsonProperty("amount") BigDecimal amount, @JsonProperty("category") Category category, @JsonProperty("currency") String currency, - @JsonProperty("ppc") BigDecimal ppc, @JsonProperty("type") Type type) { - - super(category, currency, amount, ppc); - this.type = type; - } - - public Type getType() { - - return type; - } - - @Override - public String toString() { - - return MessageFormat.format("BitcoinCentralTradeBase[amount={0}, category={1}, currency={2}, ppc={3}, type={4}]", amount, category, currency, ppc, type); - } - - public static enum Type { - limit_order - } -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/TradeOrderRequestWrapper.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/TradeOrderRequestWrapper.java deleted file mode 100644 index 07162d03f..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/dto/trade/TradeOrderRequestWrapper.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.dto.trade; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class TradeOrderRequestWrapper { - - @JsonProperty("trade_order") - private final BitcoinCentralTradeRequest tradeOrder; - - public TradeOrderRequestWrapper(@JsonProperty("trade_order") BitcoinCentralTradeRequest tradeOrder) { - - this.tradeOrder = tradeOrder; - } - - public TradeOrderRequestWrapper(BigDecimal amount, BitcoinCentralTradeBase.Category category, String currency, BigDecimal ppc, BitcoinCentralTradeRequest.Type type) { - - this.tradeOrder = new BitcoinCentralTradeRequest(amount, category, currency, ppc, type); - } - - public BitcoinCentralTradeRequest getTradeOrder() { - - return tradeOrder; - } -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/account/polling/BitcoinCentralPollingAccountService.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/account/polling/BitcoinCentralPollingAccountService.java deleted file mode 100644 index 8903deae3..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/account/polling/BitcoinCentralPollingAccountService.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.account.polling; - -import java.math.BigDecimal; - -import si.mazi.rescu.BasicAuthCredentials; -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotYetImplementedForExchangeException; -import com.xeiam.xchange.bitcoincentral.BitcoinCentral; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralAdapters; -import com.xeiam.xchange.bitcoincentral.dto.account.BitcoinCentralAccountInfo; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.service.account.polling.PollingAccountService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; - -/** - * @author Matija Mazi - */ -public class BitcoinCentralPollingAccountService extends BasePollingExchangeService implements PollingAccountService { - - private BitcoinCentral bitcoincentral; - private BasicAuthCredentials credentials; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BitcoinCentralPollingAccountService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitcoincentral = RestProxyFactory.createProxy(BitcoinCentral.class, exchangeSpecification.getSslUri()); - this.credentials = new BasicAuthCredentials(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - } - - @Override - public AccountInfo getAccountInfo() { - - BitcoinCentralAccountInfo accountInfo = getBTCCAccountInfo(); - - return BitcoinCentralAdapters.adaptAccountInfo(accountInfo, exchangeSpecification.getUserName()); - } - - @Override - public String withdrawFunds(BigDecimal amount, String address) { - - throw new NotYetImplementedForExchangeException("Withdraw funds not implemented"); - } - - /** - * This returns the currently set deposit address. It will not generate a new address (ie. repeated calls will return the same address). - */ - @Override - public String requestBitcoinDepositAddress(final String... arguments) { - - return getBTCCAccountInfo().getAddress(); - } - - private BitcoinCentralAccountInfo getBTCCAccountInfo() { - - return bitcoincentral.getAccountInfo(credentials); - } - -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/marketdata/polling/BitcoinCentralPollingMarketDataService.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/marketdata/polling/BitcoinCentralPollingMarketDataService.java deleted file mode 100644 index 44b90d0d5..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/marketdata/polling/BitcoinCentralPollingMarketDataService.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.bitcoincentral.BitcoinCentral; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralAdapters; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralUtils; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralDepth; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTicker; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTrade; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - * @author Matija Mazi - */ -public class BitcoinCentralPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService { - - private BitcoinCentral bitcoincentral; - - public BitcoinCentralPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitcoincentral = RestProxyFactory.createProxy(BitcoinCentral.class, exchangeSpecification.getSslUri()); - } - - @Override - public List getExchangeSymbols() { - - return BitcoinCentralUtils.CURRENCY_PAIRS; - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - BitcoinCentralTicker bitcoinCentralTicker = bitcoincentral.getTicker(currency); - return BitcoinCentralAdapters.adaptTicker(bitcoinCentralTicker, tradableIdentifier); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - BitcoinCentralDepth bitcoinCentralDepth = bitcoincentral.getOrderBook(currency); - - return BitcoinCentralAdapters.adaptOrders(bitcoinCentralDepth, currency, tradableIdentifier); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - BitcoinCentralTrade[] bitcoinCentralTrades = bitcoincentral.getTrades(currency, 100); - return BitcoinCentralAdapters.adaptTrades(bitcoinCentralTrades, currency, tradableIdentifier); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(BitcoinCentralUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - } -} diff --git a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/trade/polling/BitcoinCentralPollingTradeService.java b/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/trade/polling/BitcoinCentralPollingTradeService.java deleted file mode 100644 index 3c1ddb40b..000000000 --- a/xchange-bitcoincentral/src/main/java/com/xeiam/xchange/bitcoincentral/service/trade/polling/BitcoinCentralPollingTradeService.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.trade.polling; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import si.mazi.rescu.BasicAuthCredentials; -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotYetImplementedForExchangeException; -import com.xeiam.xchange.bitcoincentral.BitcoinCentral; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralAdapters; -import com.xeiam.xchange.bitcoincentral.dto.trade.BitcoinCentralMyOrder; -import com.xeiam.xchange.bitcoincentral.dto.trade.BitcoinCentralTradeBase; -import com.xeiam.xchange.bitcoincentral.dto.trade.BitcoinCentralTradeRequest; -import com.xeiam.xchange.bitcoincentral.dto.trade.TradeOrderRequestWrapper; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * @author Matija Mazi - */ -public class BitcoinCentralPollingTradeService extends BasePollingExchangeService implements PollingTradeService { - - private static final Logger log = LoggerFactory.getLogger(BitcoinCentralPollingTradeService.class); - - private BitcoinCentral bitcoincentral; - private BasicAuthCredentials credentials; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BitcoinCentralPollingTradeService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitcoincentral = RestProxyFactory.createProxy(BitcoinCentral.class, exchangeSpecification.getSslUri()); - this.credentials = new BasicAuthCredentials(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - } - - @Override - public OpenOrders getOpenOrders() { - - BitcoinCentralMyOrder[] accountTradeOrders = bitcoincentral.getAccountTradeOrders(credentials, 1, 100); - return new OpenOrders(BitcoinCentralAdapters.adaptActive(accountTradeOrders)); - } - - @Override - public String placeMarketOrder(MarketOrder marketOrder) { - - throw new NotYetImplementedForExchangeException("Place market order not supported."); - } - - @Override - public String placeLimitOrder(LimitOrder limitOrder) { - - BitcoinCentralMyOrder myOrder = bitcoincentral.placeLimitOrder(credentials, new TradeOrderRequestWrapper(limitOrder.getTradableAmount(), getCategory(limitOrder.getType()), limitOrder - .getTransactionCurrency(), limitOrder.getLimitPrice().getAmount(), BitcoinCentralTradeRequest.Type.limit_order)); - log.debug("myOrder = {}", myOrder); - return Integer.toString(myOrder.getId()); - } - - @Override - public boolean cancelOrder(String orderId) { - - String ret = bitcoincentral.cancelOrder(credentials, orderId); - log.debug("Cancel order returned: {}", ret); - return true; - } - - private static BitcoinCentralTradeBase.Category getCategory(Order.OrderType type) { - - return type == Order.OrderType.ASK ? BitcoinCentralTradeBase.Category.sell : BitcoinCentralTradeBase.Category.buy; - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/FullDepthDemoTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/FullDepthDemoTest.java deleted file mode 100644 index 3ce4565a4..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/FullDepthDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at BitcoinCentral - */ -@Category(OnlineTest.class) -public class FullDepthDemoTest { - - @Test - public void testMain() throws Exception { - - com.xeiam.xchange.bitcoincentral.examplearchive.marketdata.FullDepthDemo.main(new String[] {}); - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TickerDemoTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TickerDemoTest.java deleted file mode 100644 index b0bfefac6..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TickerDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at BitcoinCentral - */ -@Category(OnlineTest.class) -public class TickerDemoTest { - - @Test - public void testMain() throws Exception { - - com.xeiam.xchange.bitcoincentral.examplearchive.marketdata.TickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TradesDemoTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TradesDemoTest.java deleted file mode 100644 index d03070cf7..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/TradesDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at BitcoinCentral - */ -@Category(OnlineTest.class) -public class TradesDemoTest { - - @Test - public void testMain() throws Exception { - - com.xeiam.xchange.bitcoincentral.examplearchive.marketdata.TradesDemo.main(new String[] {}); - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/account/BitcoinCentralAccountDemo.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/account/BitcoinCentralAccountDemo.java deleted file mode 100644 index 1e96dbd13..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/account/BitcoinCentralAccountDemo.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive.account; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralExchange; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitcoin Central exchange with authentication
  • - *
  • View account balance
  • - *
  • Get the bitcoin deposit address
  • Please provide your username and password as program arguments. - *
- */ -public class BitcoinCentralAccountDemo { - - public static void main(String[] args) { - - ExchangeSpecification exSpec = new ExchangeSpecification(BitcoinCentralExchange.class.getCanonicalName()); - exSpec.setSslUri("https://en.bitcoin-central.net"); - exSpec.setUserName(args[0]); - exSpec.setPassword(args[1]); - - Exchange btcCentral = ExchangeFactory.INSTANCE.createExchange(exSpec); - - PollingAccountService accountService = btcCentral.getPollingAccountService(); - - // Get the account information - AccountInfo accountInfo = accountService.getAccountInfo(); - System.out.println("AccountInfo: " + accountInfo); - - String depositAddress = accountService.requestBitcoinDepositAddress(); - System.out.println("Deposit address: " + depositAddress); - - // Withdraw not yet implemented. - // String ret = accountService.withdrawFunds(new BigDecimal("0.001"), "1AU9vVDp5njxucauraN3G21i2Eou9gpxUW"); - // System.out.println("ret = " + ret); - } -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/FullDepthDemo.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/FullDepthDemo.java deleted file mode 100644 index 553f9ceba..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/FullDepthDemo.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at BitcoinCentral - */ -public class FullDepthDemo { - - public static void main(String[] args) { - - // Use the factory to get BitcoinCentral exchange API using default settings - Exchange bitcoinCentralExchange = ExchangeFactory.INSTANCE.createExchange(BitcoinCentralExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitcoinCentralExchange.getPollingMarketDataService(); - - // Get the latest order book data for BTC/CAD - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.EUR); - - System.out.println("Current Order Book size for BTC / EUR: " + (orderBook.getAsks().size() + orderBook.getBids().size())); - - System.out.println("First Ask: " + orderBook.getAsks().get(0).toString()); - System.out.println("First Bid: " + orderBook.getBids().get(0).toString()); - - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TickerDemo.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TickerDemo.java deleted file mode 100644 index 96abeb54b..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TickerDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Ticker at BitcoinCentral - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get BitcoinCentral exchange API using default settings - Exchange bitcoinCentralExchange = ExchangeFactory.INSTANCE.createExchange(BitcoinCentralExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitcoinCentralExchange.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to CAD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.EUR); - double value = ticker.getLast().getAmount().doubleValue(); - String currency = ticker.getLast().getCurrencyUnit().toString(); - - System.out.println("Last: " + currency + "-" + value); - System.out.println("Last: " + ticker.getLast()); - System.out.println("Volume: " + ticker.getVolume()); - System.out.println("High: " + ticker.getHigh()); - System.out.println("Low: " + ticker.getLow()); - - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TradesDemo.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TradesDemo.java deleted file mode 100644 index 10b80599c..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/marketdata/TradesDemo.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Trades at BitcoinCentral - */ -public class TradesDemo { - - public static void main(String[] args) { - - // Use the factory to get BitcoinCentral exchange API using default settings - Exchange bitcoinCentralExchange = ExchangeFactory.INSTANCE.createExchange(BitcoinCentralExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitcoinCentralExchange.getPollingMarketDataService(); - - // Get the latest trade data for BTC/CAD - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.EUR); - - System.out.println(trades.toString()); - - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/trade/BitcoinCentralTradeDemo.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/trade/BitcoinCentralTradeDemo.java deleted file mode 100644 index 85e2d5a44..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/examplearchive/trade/BitcoinCentralTradeDemo.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.examplearchive.trade; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitcoincentral.BitcoinCentralExchange; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitcoin Central exchange with authentication
  • - *
  • Enter, review and cancel limit orders
  • - *
- */ -public class BitcoinCentralTradeDemo { - - public static void main(String[] args) { - - ExchangeSpecification exSpec = new ExchangeSpecification(BitcoinCentralExchange.class); - exSpec.setSslUri("https://en.bitcoin-central.net"); - exSpec.setUserName(args[0]); - exSpec.setPassword(args[1]); - - Exchange central = ExchangeFactory.INSTANCE.createExchange(exSpec); - PollingTradeService tradeService = central.getPollingTradeService(); - - printOpenOrders(tradeService); - - // place a limit buy order - LimitOrder limitOrder = new LimitOrder(OrderType.ASK, new BigDecimal("0.01"), "BTC", "EUR", MoneyUtils.parse("EUR 120.7")); - String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder); - System.out.println("Limit Order return value: " + limitOrderReturnValue); - - printOpenOrders(tradeService); - - // Cancel the added order - boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue); - System.out.println("Canceling returned " + cancelResult); - - printOpenOrders(tradeService); - } - - private static void printOpenOrders(PollingTradeService tradeService) { - - OpenOrders openOrders = tradeService.getOpenOrders(); - System.out.println("Open Orders: " + openOrders); - } -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/account/AccountInfoJSONTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/account/AccountInfoJSONTest.java deleted file mode 100644 index 2fbf42e01..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/account/AccountInfoJSONTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.account; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoincentral.dto.account.BitcoinCentralAccountInfo; - -/** - * @author Matija Mazi Test BitcoinCentral Account Info JSON parsing - */ -public class AccountInfoJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = AccountInfoJSONTest.class.getResourceAsStream("/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitcoinCentralAccountInfo bitcoinCentralAccountInfo = mapper.readValue(is, BitcoinCentralAccountInfo.class); - - // Verify that the example data was unmarshalled correctly - assertThat(bitcoinCentralAccountInfo.getBtc(), is(equalTo(new BigDecimal("0.0")))); - assertThat(bitcoinCentralAccountInfo.getEur(), is(equalTo(new BigDecimal("0.0")))); - assertThat(bitcoinCentralAccountInfo.getAddress(), is(equalTo("1CQvo88XrCsxauShZNsx7DvKDFxayGe5fo"))); - } -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/FullDepthJSONTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/FullDepthJSONTest.java deleted file mode 100644 index 913915a42..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/FullDepthJSONTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralDepth; - -/** - * Test MtGoxFullDepth JSON parsing - */ -public class FullDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FullDepthJSONTest.class.getResourceAsStream("/marketdata/example-full-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitcoinCentralDepth bitcoinCentralDepth = mapper.readValue(is, BitcoinCentralDepth.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", bitcoinCentralDepth.getAsks().size(), equalTo(24)); - } -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TickerJSONTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TickerJSONTest.java deleted file mode 100644 index 50207da53..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TickerJSONTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTicker; - -/** - * Test BitcoinCentralTicker JSON parsing - */ -public class TickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitcoinCentralTicker bitcoinCentralTicker = mapper.readValue(is, BitcoinCentralTicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Bid value", bitcoinCentralTicker.getBid(), equalTo(new BigDecimal("12.0"))); - assertThat("Unexpected Return Ask value", bitcoinCentralTicker.getAsk(), equalTo(new BigDecimal("12.199999999999999"))); - assertThat("Unexpected Return Last value", bitcoinCentralTicker.getPrice(), equalTo(new BigDecimal("12.25"))); - assertThat("Unexpected Return High value", bitcoinCentralTicker.getHigh(), equalTo(new BigDecimal("12.449999999999999"))); - assertThat("Unexpected Return Low value", bitcoinCentralTicker.getLow(), equalTo(new BigDecimal("11.088800000000001"))); - assertThat("Unexpected Return Volume value", bitcoinCentralTicker.getVolume(), equalTo(new BigDecimal("1038.1701690100001"))); - } - -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TradesJSONTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TradesJSONTest.java deleted file mode 100644 index 1d7dcdb2f..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/marketdata/TradesJSONTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoincentral.dto.marketdata.BitcoinCentralTrade; - -/** - * Test Transaction[] JSON parsing - */ -public class TradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitcoinCentralTrade[] bitcoinCentralTrades = mapper.readValue(is, BitcoinCentralTrade[].class); - - // Verify that the example data was unmarshalled correctly - // assertThat(bitcoinCentralTrades[0].getCreatedAt(), is(equalTo("2011-07-05T00:12:07+02:00"))); - assertThat(bitcoinCentralTrades[0].getCurrency(), is(equalTo("EUR"))); - assertThat(bitcoinCentralTrades[0].getPrice(), is(equalTo(new BigDecimal("36.68")))); - assertThat(bitcoinCentralTrades[0].getTradedBtc(), is(equalTo(new BigDecimal("2.726")))); - - } -} diff --git a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/trade/TradeOrderRequestTest.java b/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/trade/TradeOrderRequestTest.java deleted file mode 100644 index 549dbd22a..000000000 --- a/xchange-bitcoincentral/src/test/java/com/xeiam/xchange/bitcoincentral/service/trade/TradeOrderRequestTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincentral.service.trade; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitcoincentral.dto.trade.BitcoinCentralTradeRequest; -import com.xeiam.xchange.bitcoincentral.dto.trade.TradeOrderRequestWrapper; - -/** - * @author Matija Mazi - */ -public class TradeOrderRequestTest { - - @Test - public void testJsonCreate() throws Exception { - - // Read in the JSON from the example resources - InputStream is = TradeOrderRequestTest.class.getResourceAsStream("/trade/example-order-request.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitcoinCentralTradeRequest request = mapper.readValue(is, TradeOrderRequestWrapper.class).getTradeOrder(); - assertThat(request.getAmount(), is(equalTo(new BigDecimal("42")))); - assertThat(request.getCategory(), is(equalTo(BitcoinCentralTradeRequest.Category.buy))); - - } -} diff --git a/xchange-bitcoincentral/src/test/resources/account/example-accountinfo-data.json b/xchange-bitcoincentral/src/test/resources/account/example-accountinfo-data.json deleted file mode 100644 index d16729596..000000000 --- a/xchange-bitcoincentral/src/test/resources/account/example-accountinfo-data.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "EUR":0.0, - "BTC":0.0, - "GBP":0.0, - "USD":0.0, - "address":"1CQvo88XrCsxauShZNsx7DvKDFxayGe5fo", - "UNCONFIRMED_BTC":0.0 -} \ No newline at end of file diff --git a/xchange-bitcoincentral/src/test/resources/errors.json b/xchange-bitcoincentral/src/test/resources/errors.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/xchange-bitcoincentral/src/test/resources/marketdata/example-full-depth-data.json b/xchange-bitcoincentral/src/test/resources/marketdata/example-full-depth-data.json deleted file mode 100644 index daeae85ef..000000000 --- a/xchange-bitcoincentral/src/test/resources/marketdata/example-full-depth-data.json +++ /dev/null @@ -1,804 +0,0 @@ -{ - "asks": [ - { - "amount": 1.86, - "currency": "EUR", - "price": 12.2, - "timestamp": 1358531166 - }, - { - "amount": 9, - "currency": "EUR", - "price": 12.25, - "timestamp": 1358528883 - }, - { - "amount": 30, - "currency": "EUR", - "price": 12.278, - "timestamp": 1358532772 - }, - { - "amount": 40, - "currency": "EUR", - "price": 12.2799, - "timestamp": 1358529935 - }, - { - "amount": 80, - "currency": "EUR", - "price": 12.28, - "timestamp": 1358532452 - }, - { - "amount": 2.075, - "currency": "EUR", - "price": 12.29, - "timestamp": 1358512469 - }, - { - "amount": 1.21954, - "currency": "EUR", - "price": 12.36126, - "timestamp": 1358514301 - }, - { - "amount": 47.90225, - "currency": "EUR", - "price": 12.399, - "timestamp": 1358464789 - }, - { - "amount": 35, - "currency": "EUR", - "price": 12.47, - "timestamp": 1358461241 - }, - { - "amount": 1, - "currency": "EUR", - "price": 12.4859, - "timestamp": 1358440431 - }, - { - "amount": 200, - "currency": "EUR", - "price": 12.5, - "timestamp": 1355481451 - }, - { - "amount": 3, - "currency": "EUR", - "price": 12.5061, - "timestamp": 1345235273 - }, - { - "amount": 17, - "currency": "EUR", - "price": 12.7, - "timestamp": 1358527577 - }, - { - "amount": 5, - "currency": "EUR", - "price": 12.94, - "timestamp": 1358501525 - }, - { - "amount": 35.006775, - "currency": "EUR", - "price": 12.95, - "timestamp": 1358455003 - }, - { - "amount": 100, - "currency": "EUR", - "price": 13, - "timestamp": 1355383786 - }, - { - "amount": 10, - "currency": "EUR", - "price": 13.6, - "timestamp": 1358420006 - }, - { - "amount": 4, - "currency": "EUR", - "price": 14, - "timestamp": 1357464418 - }, - { - "amount": 200, - "currency": "EUR", - "price": 15, - "timestamp": 1355822943 - }, - { - "amount": 10, - "currency": "EUR", - "price": 25, - "timestamp": 1345234946 - }, - { - "amount": 10, - "currency": "EUR", - "price": 25.99, - "timestamp": 1345193535 - }, - { - "amount": 29.294409, - "currency": "EUR", - "price": 59, - "timestamp": 1353726320 - }, - { - "amount": 15, - "currency": "EUR", - "price": 60, - "timestamp": 1345193588 - }, - { - "amount": 3.2473E-4, - "currency": "EUR", - "price": 100, - "timestamp": 1358087628 - } - ], - "bids": [ - { - "amount": 10, - "currency": "EUR", - "price": 12, - "timestamp": 1358528235 - }, - { - "amount": 27.99, - "currency": "EUR", - "price": 11.9, - "timestamp": 1358519776 - }, - { - "amount": 0.36516416, - "currency": "EUR", - "price": 11.812345, - "timestamp": 1358492684 - }, - { - "amount": 3, - "currency": "EUR", - "price": 11.81, - "timestamp": 1358511233 - }, - { - "amount": 105.9, - "currency": "EUR", - "price": 11.8, - "timestamp": 1358511817 - }, - { - "amount": 2, - "currency": "EUR", - "price": 11.72222, - "timestamp": 1358492861 - }, - { - "amount": 10.9, - "currency": "EUR", - "price": 11.6, - "timestamp": 1358468748 - }, - { - "amount": 1, - "currency": "EUR", - "price": 11.57, - "timestamp": 1358503741 - }, - { - "amount": 2, - "currency": "EUR", - "price": 11.55555, - "timestamp": 1358514532 - }, - { - "amount": 75, - "currency": "EUR", - "price": 11.55, - "timestamp": 1358522716 - }, - { - "amount": 22, - "currency": "EUR", - "price": 11.5, - "timestamp": 1358508439 - }, - { - "amount": 6.9, - "currency": "EUR", - "price": 11.48, - "timestamp": 1358497842 - }, - { - "amount": 10.9, - "currency": "EUR", - "price": 11.471, - "timestamp": 1358497905 - }, - { - "amount": 1086, - "currency": "EUR", - "price": 11.47, - "timestamp": 1358458691 - }, - { - "amount": 4, - "currency": "EUR", - "price": 11.35, - "timestamp": 1358454877 - }, - { - "amount": 1.1111, - "currency": "EUR", - "price": 11.261111, - "timestamp": 1358456885 - }, - { - "amount": 17.76, - "currency": "EUR", - "price": 11.26, - "timestamp": 1358454393 - }, - { - "amount": 50, - "currency": "EUR", - "price": 11.25, - "timestamp": 1358453053 - }, - { - "amount": 31.078718, - "currency": "EUR", - "price": 11.15, - "timestamp": 1358461592 - }, - { - "amount": 2, - "currency": "EUR", - "price": 11.111111, - "timestamp": 1358455630 - }, - { - "amount": 1.35135, - "currency": "EUR", - "price": 11.10001, - "timestamp": 1358521649 - }, - { - "amount": 1.2625742, - "currency": "EUR", - "price": 11.0888, - "timestamp": 1358435099 - }, - { - "amount": 0.32195112, - "currency": "EUR", - "price": 11.05111, - "timestamp": 1358436064 - }, - { - "amount": 1.36364, - "currency": "EUR", - "price": 11.00001, - "timestamp": 1358403628 - }, - { - "amount": 169.23927, - "currency": "EUR", - "price": 11, - "timestamp": 1358528969 - }, - { - "amount": 1.37615, - "currency": "EUR", - "price": 10.90001, - "timestamp": 1358403567 - }, - { - "amount": 21.81193, - "currency": "EUR", - "price": 10.9, - "timestamp": 1358406856 - }, - { - "amount": 15, - "currency": "EUR", - "price": 10.85, - "timestamp": 1358356783 - }, - { - "amount": 1.38889, - "currency": "EUR", - "price": 10.80001, - "timestamp": 1358341570 - }, - { - "amount": 15, - "currency": "EUR", - "price": 10.8, - "timestamp": 1358277884 - }, - { - "amount": 28, - "currency": "EUR", - "price": 10.76, - "timestamp": 1358328474 - }, - { - "amount": 10.302325, - "currency": "EUR", - "price": 10.75, - "timestamp": 1358511394 - }, - { - "amount": 1.40187, - "currency": "EUR", - "price": 10.70001, - "timestamp": 1358341203 - }, - { - "amount": 20.95, - "currency": "EUR", - "price": 10.672458, - "timestamp": 1358225561 - }, - { - "amount": 26.94, - "currency": "EUR", - "price": 10.661726, - "timestamp": 1358225051 - }, - { - "amount": 0.5633274, - "currency": "EUR", - "price": 10.651, - "timestamp": 1358165058 - }, - { - "amount": 22.339893, - "currency": "EUR", - "price": 10.65, - "timestamp": 1358336947 - }, - { - "amount": 25.92, - "currency": "EUR", - "price": 10.621349, - "timestamp": 1358184338 - }, - { - "amount": 26.08, - "currency": "EUR", - "price": 10.61067, - "timestamp": 1358184298 - }, - { - "amount": 9.425, - "currency": "EUR", - "price": 10.61, - "timestamp": 1358272730 - }, - { - "amount": 1.41509, - "currency": "EUR", - "price": 10.60001, - "timestamp": 1358231271 - }, - { - "amount": 16.445486, - "currency": "EUR", - "price": 10.6, - "timestamp": 1358283742 - }, - { - "amount": 1.42857, - "currency": "EUR", - "price": 10.50001, - "timestamp": 1358173819 - }, - { - "amount": 32.88081, - "currency": "EUR", - "price": 10.5, - "timestamp": 1358511380 - }, - { - "amount": 29.26, - "currency": "EUR", - "price": 10.46, - "timestamp": 1357834993 - }, - { - "amount": 30, - "currency": "EUR", - "price": 10.45555, - "timestamp": 1358258253 - }, - { - "amount": 1, - "currency": "EUR", - "price": 10.45, - "timestamp": 1358181202 - }, - { - "amount": 1.44231, - "currency": "EUR", - "price": 10.40001, - "timestamp": 1357821031 - }, - { - "amount": 20, - "currency": "EUR", - "price": 10.4, - "timestamp": 1357934912 - }, - { - "amount": 5.314, - "currency": "EUR", - "price": 10.35, - "timestamp": 1358431345 - }, - { - "amount": 1.45631, - "currency": "EUR", - "price": 10.30001, - "timestamp": 1357801386 - }, - { - "amount": 22.4, - "currency": "EUR", - "price": 10.3, - "timestamp": 1357934923 - }, - { - "amount": 30, - "currency": "EUR", - "price": 10.25666, - "timestamp": 1358258292 - }, - { - "amount": 1, - "currency": "EUR", - "price": 10.25, - "timestamp": 1358511343 - }, - { - "amount": 1.47059, - "currency": "EUR", - "price": 10.20001, - "timestamp": 1357800647 - }, - { - "amount": 24.95059, - "currency": "EUR", - "price": 10.2, - "timestamp": 1357934948 - }, - { - "amount": 1.48515, - "currency": "EUR", - "price": 10.10001, - "timestamp": 1357646247 - }, - { - "amount": 26.058851, - "currency": "EUR", - "price": 10.1, - "timestamp": 1358341325 - }, - { - "amount": 4.8, - "currency": "EUR", - "price": 10.05, - "timestamp": 1357581946 - }, - { - "amount": 15.866536, - "currency": "EUR", - "price": 10.001, - "timestamp": 1358335249 - }, - { - "amount": 1.5, - "currency": "EUR", - "price": 10.00001, - "timestamp": 1357641444 - }, - { - "amount": 10, - "currency": "EUR", - "price": 10, - "timestamp": 1357511400 - }, - { - "amount": 58, - "currency": "EUR", - "price": 10, - "timestamp": 1358511321 - }, - { - "amount": 1.51515, - "currency": "EUR", - "price": 9.90001, - "timestamp": 1355754371 - }, - { - "amount": 20, - "currency": "EUR", - "price": 9.85, - "timestamp": 1356113586 - }, - { - "amount": 1.53061, - "currency": "EUR", - "price": 9.80001, - "timestamp": 1355748621 - }, - { - "amount": 0.25776, - "currency": "EUR", - "price": 9.8, - "timestamp": 1354819094 - }, - { - "amount": 1, - "currency": "EUR", - "price": 9.75, - "timestamp": 1358511298 - }, - { - "amount": 1.54639, - "currency": "EUR", - "price": 9.70001, - "timestamp": 1354689747 - }, - { - "amount": 2, - "currency": "EUR", - "price": 9.7, - "timestamp": 1356372139 - }, - { - "amount": 1.5625, - "currency": "EUR", - "price": 9.60001, - "timestamp": 1354635521 - }, - { - "amount": 0.069, - "currency": "EUR", - "price": 9.6, - "timestamp": 1358461422 - }, - { - "amount": 1.57895, - "currency": "EUR", - "price": 9.50001, - "timestamp": 1354634917 - }, - { - "amount": 10.5, - "currency": "EUR", - "price": 9.5, - "timestamp": 1357783049 - }, - { - "amount": 20, - "currency": "EUR", - "price": 9.48, - "timestamp": 1354199153 - }, - { - "amount": 1.59574, - "currency": "EUR", - "price": 9.40001, - "timestamp": 1354127707 - }, - { - "amount": 7.0223665, - "currency": "EUR", - "price": 9.305, - "timestamp": 1354071798 - }, - { - "amount": 1, - "currency": "EUR", - "price": 9.3, - "timestamp": 1355584413 - }, - { - "amount": 10, - "currency": "EUR", - "price": 9.15, - "timestamp": 1355781287 - }, - { - "amount": 21.35, - "currency": "EUR", - "price": 9.1, - "timestamp": 1355697377 - }, - { - "amount": 0.26881787, - "currency": "EUR", - "price": 9.06067, - "timestamp": 1357924201 - }, - { - "amount": 25.73173, - "currency": "EUR", - "price": 9, - "timestamp": 1358453919 - }, - { - "amount": 1.318621, - "currency": "EUR", - "price": 8.90324, - "timestamp": 1355261497 - }, - { - "amount": 1, - "currency": "EUR", - "price": 8.45, - "timestamp": 1357219006 - }, - { - "amount": 3, - "currency": "EUR", - "price": 8.3, - "timestamp": 1353092099 - }, - { - "amount": 1, - "currency": "EUR", - "price": 8.2, - "timestamp": 1355238395 - }, - { - "amount": 19.204685, - "currency": "EUR", - "price": 8.11, - "timestamp": 1356201272 - }, - { - "amount": 20, - "currency": "EUR", - "price": 7.9, - "timestamp": 1352258546 - }, - { - "amount": 10, - "currency": "EUR", - "price": 7.8, - "timestamp": 1352258607 - }, - { - "amount": 43.333332, - "currency": "EUR", - "price": 7.5, - "timestamp": 1353739603 - }, - { - "amount": 118.14781, - "currency": "EUR", - "price": 7, - "timestamp": 1352153518 - }, - { - "amount": 3, - "currency": "EUR", - "price": 6.2, - "timestamp": 1344597289 - }, - { - "amount": 1, - "currency": "EUR", - "price": 6.08308, - "timestamp": 1347759945 - }, - { - "amount": 5.8507667, - "currency": "EUR", - "price": 6, - "timestamp": 1358419873 - }, - { - "amount": 2.585, - "currency": "EUR", - "price": 5.8, - "timestamp": 1342111713 - }, - { - "amount": 1, - "currency": "EUR", - "price": 5.2, - "timestamp": 1340551015 - }, - { - "amount": 2, - "currency": "EUR", - "price": 5, - "timestamp": 1348587890 - }, - { - "amount": 10, - "currency": "EUR", - "price": 3.5, - "timestamp": 1351364150 - }, - { - "amount": 3.32556, - "currency": "EUR", - "price": 3.4, - "timestamp": 1329405510 - }, - { - "amount": 16.129, - "currency": "EUR", - "price": 3.100001, - "timestamp": 1330448348 - }, - { - "amount": 18, - "currency": "EUR", - "price": 3, - "timestamp": 1334256199 - }, - { - "amount": 3.5, - "currency": "EUR", - "price": 2.8, - "timestamp": 1324375883 - }, - { - "amount": 1, - "currency": "EUR", - "price": 1.5, - "timestamp": 1354626817 - }, - { - "amount": 1, - "currency": "EUR", - "price": 1.4997, - "timestamp": 1354002762 - }, - { - "amount": 74.83652, - "currency": "EUR", - "price": 1, - "timestamp": 1357825107 - }, - { - "amount": 1.1, - "currency": "EUR", - "price": 0.5, - "timestamp": 1356014235 - }, - { - "amount": 10, - "currency": "EUR", - "price": 0.112145, - "timestamp": 1357651903 - }, - { - "amount": 50, - "currency": "EUR", - "price": 0.1, - "timestamp": 1356092110 - }, - { - "amount": 1, - "currency": "EUR", - "price": 0.00745444, - "timestamp": 1357517661 - } - ] -} \ No newline at end of file diff --git a/xchange-bitcoincentral/src/test/resources/marketdata/example-ticker-data.json b/xchange-bitcoincentral/src/test/resources/marketdata/example-ticker-data.json deleted file mode 100644 index 116e50da9..000000000 --- a/xchange-bitcoincentral/src/test/resources/marketdata/example-ticker-data.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "at" : 1358530801, - "bid" : 12.0, - "high" : 12.449999999999999, - "currency" : "eur", - "midpoint" : 12.1, - "price" : 12.25, - "variation" : 8.407079646017699115044247788, - "low" : 11.088800000000001, - "ask" : 12.199999999999999, - "volume" : 1038.1701690100001 -} \ No newline at end of file diff --git a/xchange-bitcoincentral/src/test/resources/marketdata/example-trades-data.json b/xchange-bitcoincentral/src/test/resources/marketdata/example-trades-data.json deleted file mode 100644 index fb9dd83b6..000000000 --- a/xchange-bitcoincentral/src/test/resources/marketdata/example-trades-data.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "uuid":"920468f2-6510-469d-a834-35f570d5befa", - "traded_btc":2.726, - "traded_currency":99.98968, - "created_at":"2013-03-17T10:39:49-04:00", - "currency":"EUR", - "price":36.68 - }, - { - "uuid":"1099d8d9-c62f-4657-a7fa-59825a531514", - "traded_btc":2.5, - "traded_currency":91.7, - "created_at":"2013-03-17T09:21:55-04:00", - "currency":"EUR", - "price":36.68 - }, - { - "uuid":"da177925-9d14-40f1-bbce-907257b534f2", - "traded_btc":1.0, - "traded_currency":36.69, - "created_at":"2013-03-17T08:31:01-04:00", - "currency":"EUR", - "price":36.69 - }, - { - "uuid":"3a07764a-87fd-4b53-8269-caf5f0e318b3", - "traded_btc":5.91855986, - "traded_currency":217.15196126, - "created_at":"2013-03-17T08:30:58-04:00", - "currency":"EUR", - "price":36.69 - }, - { - "uuid":"7bf3b9ec-aa6b-4492-8a9e-412cbc9b31e4", - "traded_btc":0.250491, - "traded_currency":9.19052481, - "created_at":"2013-03-17T08:30:56-04:00", - "currency":"EUR", - "price":36.69004 - } -] \ No newline at end of file diff --git a/xchange-bitcoincentral/src/test/resources/trade/example-cancel-order.json b/xchange-bitcoincentral/src/test/resources/trade/example-cancel-order.json deleted file mode 100644 index 48feb6263..000000000 --- a/xchange-bitcoincentral/src/test/resources/trade/example-cancel-order.json +++ /dev/null @@ -1 +0,0 @@ -todo! \ No newline at end of file diff --git a/xchange-bitcoincentral/src/test/resources/trade/example-openorders.json b/xchange-bitcoincentral/src/test/resources/trade/example-openorders.json deleted file mode 100644 index 85841ef3f..000000000 --- a/xchange-bitcoincentral/src/test/resources/trade/example-openorders.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "active": true, - "amount": 5.56786641, - "category": "buy", - "created_at": "2012-02-03T12:49:21+01:00", - "currency": "EUR", - "id": 6721, - "ppc": 10.0 - } -] \ No newline at end of file diff --git a/xchange-bitcoincentral/src/test/resources/trade/example-order-request.json b/xchange-bitcoincentral/src/test/resources/trade/example-order-request.json deleted file mode 100644 index beae68d7b..000000000 --- a/xchange-bitcoincentral/src/test/resources/trade/example-order-request.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "trade_order": { - "amount": 42, - "category": "buy", - "currency": "EUR", - "ppc": 1, - "type": "limit_order" - } -} \ No newline at end of file diff --git a/xchange-bitcoincentral/src/test/resources/trade/example-place-limit-order.json b/xchange-bitcoincentral/src/test/resources/trade/example-place-limit-order.json deleted file mode 100644 index beae68d7b..000000000 --- a/xchange-bitcoincentral/src/test/resources/trade/example-place-limit-order.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "trade_order": { - "amount": 42, - "category": "buy", - "currency": "EUR", - "ppc": 1, - "type": "limit_order" - } -} \ No newline at end of file diff --git a/xchange-bitcoincharts/api-specification.txt b/xchange-bitcoincharts/api-specification.txt deleted file mode 100644 index 661ae51de..000000000 --- a/xchange-bitcoincharts/api-specification.txt +++ /dev/null @@ -1,20 +0,0 @@ -Bitcoin charts Exchange API specification -================================ - -Public API - -Documentation -------------- -http://bitcoincharts.com/about/markets-api/ - -Tickers ------- -http://bitcoincharts.com/t/markets.json - -Weighted Prices ------- -http://bitcoincharts.com/t/weighted_prices.json - -Pacing ------- -"Don't query more often than once every 15 minutes!" \ No newline at end of file diff --git a/xchange-bitcoincharts/pom.xml b/xchange-bitcoincharts/pom.xml deleted file mode 100644 index 0e3e61dae..000000000 --- a/xchange-bitcoincharts/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-bitcoincharts - - Bitcoin Charts Data Provider - XChange implementation for bitcoincharts - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - - diff --git a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinCharts.java b/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinCharts.java deleted file mode 100644 index 7959f616f..000000000 --- a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinCharts.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincharts; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; - -import com.xeiam.xchange.bitcoincharts.dto.marketdata.BitcoinChartsTicker; - -/** - * @author Matija Mazi - */ -@Path("t") -public interface BitcoinCharts { - - @GET - @Path("markets.json") - public BitcoinChartsTicker[] getMarketData(); - -} diff --git a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsAdapters.java b/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsAdapters.java deleted file mode 100644 index c7b4a712e..000000000 --- a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsAdapters.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincharts; - -import java.math.BigDecimal; -import java.util.Date; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.bitcoincharts.dto.marketdata.BitcoinChartsTicker; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; - -/** - * Various adapters for converting from BitcoinCharts DTOs to XChange DTOs - */ -public final class BitcoinChartsAdapters { - - /** - * private Constructor - */ - private BitcoinChartsAdapters() { - - } - - /** - * Adapts a BitcoinChartsTicker[] to a Ticker Object - * - * @param bitcoinChartsTickers - * @param currency - * @param tradableIdentifier - * @return - */ - public static Ticker adaptTicker(BitcoinChartsTicker[] bitcoinChartsTickers, String tradableIdentifier) { - - for (int i = 0; i < bitcoinChartsTickers.length; i++) { - if (bitcoinChartsTickers[i].getSymbol().equals(tradableIdentifier)) { - - BigMoney last = bitcoinChartsTickers[i].getClose() != null ? MoneyUtils.parse(bitcoinChartsTickers[i].getCurrency() + " " + bitcoinChartsTickers[i].getClose()) : null; - BigMoney bid = bitcoinChartsTickers[i].getBid() != null ? MoneyUtils.parse(bitcoinChartsTickers[i].getCurrency() + " " + bitcoinChartsTickers[i].getBid()) : null; - BigMoney ask = bitcoinChartsTickers[i].getAsk() != null ? MoneyUtils.parse(bitcoinChartsTickers[i].getCurrency() + " " + bitcoinChartsTickers[i].getAsk()) : null; - BigMoney high = bitcoinChartsTickers[i].getHigh() != null ? MoneyUtils.parse(bitcoinChartsTickers[i].getCurrency() + " " + bitcoinChartsTickers[i].getHigh()) : null; - BigMoney low = bitcoinChartsTickers[i].getLow() != null ? MoneyUtils.parse(bitcoinChartsTickers[i].getCurrency() + " " + bitcoinChartsTickers[i].getLow()) : null; - BigDecimal volume = bitcoinChartsTickers[i].getVolume(); - Date timeStamp = new Date(bitcoinChartsTickers[i].getLatestTrade() * 1000L); - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withBid(bid).withAsk(ask).withHigh(high).withLow(low).withVolume(volume).withTimestamp(timeStamp) - .build(); - - } - } - // TODO check on this logic returning null - return null; - - } -} diff --git a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsExchange.java b/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsExchange.java deleted file mode 100644 index 0d9579d69..000000000 --- a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsExchange.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincharts; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitcoincharts.service.marketdata.polling.BitcoinChartsPollingMarketDataService; - -/** - *

- * Exchange implementation to provide the following to applications: - *

- *
    - *
  • A wrapper for the BitcoinCharts API
  • - *
- */ -public class BitcoinChartsExchange extends BaseExchange implements Exchange { - - /** - * Constructor - */ - public BitcoinChartsExchange() { - - } - - /** - * @return A default configuration for this exchange - */ - public static Exchange newInstance() { - - Exchange exchange = new BitcoinChartsExchange(); - exchange.applySpecification(exchange.getDefaultExchangeSpecification()); - return exchange; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new BitcoinChartsPollingMarketDataService(exchangeSpecification); - } - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setPlainTextUri("http://bitcoincharts.com"); - exchangeSpecification.setHost("bitcoincharts.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("Bitcoin Charts"); - exchangeSpecification.setExchangeDescription("Bitcoin charts provides financial and technical data related to the Bitcoin network."); - - return exchangeSpecification; - } -} diff --git a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsFactory.java b/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsFactory.java deleted file mode 100644 index 5797643dd..000000000 --- a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsFactory.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincharts; - -import si.mazi.rescu.RestProxyFactory; - -/** - * @author Matija Mazi - */ -public class BitcoinChartsFactory { - - /** - * private Constructor - */ - private BitcoinChartsFactory() { - - } - - /** - * Get a RestProxy for BitcoinCharts - * - * @return the Rest Proxy - */ - public static BitcoinCharts createInstance() { - - return RestProxyFactory.createProxy(BitcoinCharts.class, "http://bitcoincharts.com"); - } -} diff --git a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsUtils.java b/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsUtils.java deleted file mode 100644 index 86626be08..000000000 --- a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsUtils.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincharts; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared BitcoinCharts properties - */ -public final class BitcoinChartsUtils { - - /** - * private Constructor - */ - private BitcoinChartsUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - new CurrencyPair("thAUD", Currencies.BTC), - - new CurrencyPair("bitmarketAUD", Currencies.BTC), - - new CurrencyPair("mtgoxAUD", Currencies.BTC), - - new CurrencyPair("ruxumAUD", Currencies.BTC), - - new CurrencyPair("weexAUD", Currencies.BTC), - - new CurrencyPair("wbxAUD", Currencies.BTC), - - new CurrencyPair("cryptoxAUD", Currencies.BTC), - - new CurrencyPair("mrcdBRL", Currencies.BTC), - - new CurrencyPair("bbmBRL", Currencies.BTC), - - new CurrencyPair("mtgoxCAD", Currencies.BTC), - - new CurrencyPair("virtexCAD", Currencies.BTC), - - new CurrencyPair("weexCAD", Currencies.BTC), - - new CurrencyPair("mtgoxCHF", Currencies.BTC), - - new CurrencyPair("ruxumCHF", Currencies.BTC), - - new CurrencyPair("thCLP", Currencies.BTC), - - new CurrencyPair("btcnCNY", Currencies.BTC), - - new CurrencyPair("mtgoxCNY", Currencies.BTC), - - new CurrencyPair("mtgoxDKK", Currencies.BTC), - - new CurrencyPair("bcEUR", Currencies.BTC), - - new CurrencyPair("btcexEUR", Currencies.BTC), - - new CurrencyPair("thEUR", Currencies.BTC), - - new CurrencyPair("rockEUR", Currencies.BTC), - - new CurrencyPair("b7EUR", Currencies.BTC), - - new CurrencyPair("mtgoxEUR", Currencies.BTC), - - new CurrencyPair("aqoinEUR", Currencies.BTC), - - new CurrencyPair("ruxumEUR", Currencies.BTC), - - new CurrencyPair("intrsngEUR", Currencies.BTC), - - new CurrencyPair("btcdeEUR", Currencies.BTC), - - new CurrencyPair("globalEUR", Currencies.BTC), - - new CurrencyPair("vcxEUR", Currencies.BTC), - - new CurrencyPair("imcexEUR", Currencies.BTC), - - new CurrencyPair("btc24EUR", Currencies.BTC), - - new CurrencyPair("bitcurexEUR", Currencies.BTC), - - new CurrencyPair("btceEUR", Currencies.BTC), - - new CurrencyPair("bcmPXGAU", Currencies.BTC), - - new CurrencyPair("bcmBMGAU", Currencies.BTC), - - new CurrencyPair("britcoinGBP", Currencies.BTC), - - new CurrencyPair("bitmarketGBP", Currencies.BTC), - - new CurrencyPair("bcGBP", Currencies.BTC), - - new CurrencyPair("bcGBP", Currencies.BTC), - - new CurrencyPair("intrsngGBP", Currencies.BTC), - - new CurrencyPair("ruxumGBP", Currencies.BTC), - - new CurrencyPair("globalGBP", Currencies.BTC), - - new CurrencyPair("mtgoxHKD", Currencies.BTC), - - new CurrencyPair("ruxumHKD", Currencies.BTC), - - new CurrencyPair("ruxumHUF", Currencies.BTC), - - new CurrencyPair("thINR", Currencies.BTC), - - new CurrencyPair("btcexJPY", Currencies.BTC), - - new CurrencyPair("ruxumJPY", Currencies.BTC), - - new CurrencyPair("mtgoxJPY", Currencies.BTC), - - new CurrencyPair("bitnzNZD", Currencies.BTC), - - new CurrencyPair("mtgoxNZD", Currencies.BTC), - - new CurrencyPair("bitomatPLN", Currencies.BTC), - - new CurrencyPair("bitmarketPLN", Currencies.BTC), - - new CurrencyPair("bitchangePLN", Currencies.BTC), - - new CurrencyPair("mtgoxPLN", Currencies.BTC), - - new CurrencyPair("intrsngPLN", Currencies.BTC), - - new CurrencyPair("ruxumPLN", Currencies.BTC), - - new CurrencyPair("globalPLN", Currencies.BTC), - - new CurrencyPair("freshPLN", Currencies.BTC), - - new CurrencyPair("bitcurexPLN", Currencies.BTC), - - new CurrencyPair("btcexWMR", Currencies.BTC), - - new CurrencyPair("btcexRUB", Currencies.BTC), - - new CurrencyPair("btcexYAD", Currencies.BTC), - - new CurrencyPair("bitmarketRUB", Currencies.BTC), - - new CurrencyPair("mtgoxRUB", Currencies.BTC), - - new CurrencyPair("ruxumRUB", Currencies.BTC), - - new CurrencyPair("btceRUR", Currencies.BTC), - - new CurrencyPair("mtgoxSEK", Currencies.BTC), - - new CurrencyPair("ruxumSEK", Currencies.BTC), - - new CurrencyPair("kptnSEK", Currencies.BTC), - - new CurrencyPair("mtgoxSGD", Currencies.BTC), - - new CurrencyPair("ruxumSGD", Currencies.BTC), - - new CurrencyPair("fybsgSGD", Currencies.BTC), - - new CurrencyPair("virwoxSLL", Currencies.BTC), - - new CurrencyPair("rockSLL", Currencies.BTC), - - new CurrencyPair("ruxumTHB", Currencies.BTC), - - new CurrencyPair("mtgoxTHB", Currencies.BTC), - - new CurrencyPair("ruxumUAH", Currencies.BTC), - - new CurrencyPair("bcmPPUSD", Currencies.BTC), - - new CurrencyPair("mtgoxUSD", Currencies.BTC), - - new CurrencyPair("bcmLRUSD", Currencies.BTC), - - new CurrencyPair("btcexUSD", Currencies.BTC), - - new CurrencyPair("btcexWMZ", Currencies.BTC), - - new CurrencyPair("bcmBMUSD", Currencies.BTC), - - new CurrencyPair("bcmMBUSD", Currencies.BTC), - - new CurrencyPair("b2cUSD", Currencies.BTC), - - new CurrencyPair("thLRUSD", Currencies.BTC), - - new CurrencyPair("thUSD", Currencies.BTC), - - new CurrencyPair("vcxUSD", Currencies.BTC), - - new CurrencyPair("exchbUSD", Currencies.BTC), - - new CurrencyPair("b7USD", Currencies.BTC), - - new CurrencyPair("ruxumUSD", Currencies.BTC), - - new CurrencyPair("cbxUSD", Currencies.BTC), - - new CurrencyPair("btceUSD", Currencies.BTC), - - new CurrencyPair("bitstampUSD", Currencies.BTC), - - new CurrencyPair("globalUSD", Currencies.BTC), - - new CurrencyPair("intrsngUSD", Currencies.BTC), - - new CurrencyPair("bitfloorUSD", Currencies.BTC), - - new CurrencyPair("rockUSD", Currencies.BTC), - - new CurrencyPair("cryptoxUSD", Currencies.BTC), - - new CurrencyPair("icbitUSD", Currencies.BTC), - - new CurrencyPair("bitmeUSD", Currencies.BTC), - - new CurrencyPair("imcexUSD", Currencies.BTC), - - new CurrencyPair("btctreeUSD", Currencies.BTC), - - new CurrencyPair("btc24USD", Currencies.BTC), - - new CurrencyPair("weexUSD", Currencies.BTC), - - new CurrencyPair("ruxumZAR", Currencies.BTC) - - ); - - public static final long REFRESH_RATE_MILLIS = 1000L * 60L * 15L; // rates refresh every 15 minutes - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - -} diff --git a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/dto/marketdata/BitcoinChartsTicker.java b/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/dto/marketdata/BitcoinChartsTicker.java deleted file mode 100644 index 548d56ac7..000000000 --- a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/dto/marketdata/BitcoinChartsTicker.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitcoincharts.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitcoinChartsTicker { - - private final BigDecimal ask; - private final BigDecimal avg; - private final BigDecimal bid; - private final BigDecimal close; - private final String currency; - private final BigDecimal currencyVolume; - private final BigDecimal high; - private final long latestTrade; - private final BigDecimal low; - private final String symbol; - private final BigDecimal volume; - - /** - * Constructor - * - * @param ask - * @param avg - * @param bid - * @param close - * @param currency - * @param currencyVolume - * @param high - * @param latestTrade - * @param low - * @param symbol - * @param volume - */ - public BitcoinChartsTicker(@JsonProperty("ask") BigDecimal ask, @JsonProperty("avg") BigDecimal avg, @JsonProperty("bid") BigDecimal bid, @JsonProperty("close") BigDecimal close, - @JsonProperty("currency") String currency, @JsonProperty("currency_volume") BigDecimal currencyVolume, @JsonProperty("high") BigDecimal high, @JsonProperty("latest_trade") long latestTrade, - @JsonProperty("low") BigDecimal low, @JsonProperty("symbol") String symbol, @JsonProperty("volume") BigDecimal volume) { - - this.ask = ask; - this.avg = avg; - this.bid = bid; - this.close = close; - this.currency = currency; - this.currencyVolume = currencyVolume; - this.high = high; - this.latestTrade = latestTrade; - this.low = low; - this.symbol = symbol; - this.volume = volume; - } - - public BigDecimal getAsk() { - - return ask; - } - - public BigDecimal getAvg() { - - return avg; - } - - public BigDecimal getBid() { - - return bid; - } - - public BigDecimal getClose() { - - return close; - } - - public String getCurrency() { - - return currency; - } - - public BigDecimal getCurrencyVolume() { - - return currencyVolume; - } - - public BigDecimal getHigh() { - - return high; - } - - public long getLatestTrade() { - - return latestTrade; - } - - public BigDecimal getLow() { - - return low; - } - - public String getSymbol() { - - return symbol; - } - - public BigDecimal getVolume() { - - return volume; - } - - @Override - public String toString() { - - return "BitcoinChartsTickers [ask=" + ask + ", avg=" + avg + ", bid=" + bid + ", close=" + close + ", currency=" + currency + ", currencyVolume=" + currencyVolume + ", high=" + high - + ", latestTrade=" + latestTrade + ", low=" + low + ", symbol=" + symbol + ", volume=" + volume + "]"; - } - -} diff --git a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/service/marketdata/polling/BitcoinChartsPollingMarketDataService.java b/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/service/marketdata/polling/BitcoinChartsPollingMarketDataService.java deleted file mode 100644 index 1409d306a..000000000 --- a/xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/service/marketdata/polling/BitcoinChartsPollingMarketDataService.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright 2012 Xeiam LLC. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.xeiam.xchange.bitcoincharts.service.marketdata.polling; - -import java.util.List; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.CachedDataSession; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.bitcoincharts.BitcoinCharts; -import com.xeiam.xchange.bitcoincharts.BitcoinChartsAdapters; -import com.xeiam.xchange.bitcoincharts.BitcoinChartsUtils; -import com.xeiam.xchange.bitcoincharts.dto.marketdata.BitcoinChartsTicker; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - * @author timmolter - */ -public class BitcoinChartsPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService, CachedDataSession { - - private final Logger logger = LoggerFactory.getLogger(BitcoinChartsPollingMarketDataService.class); - - private final BitcoinCharts bitcoinCharts; - - /** - * time stamps used to pace API calls - */ - private long tickerRequestTimeStamp = 0L; - - private BitcoinChartsTicker[] cachedBitcoinChartsTickers; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification - */ - public BitcoinChartsPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitcoinCharts = RestProxyFactory.createProxy(BitcoinCharts.class, exchangeSpecification.getPlainTextUri()); - } - - @Override - public long getRefreshRate() { - - return BitcoinChartsUtils.REFRESH_RATE_MILLIS; - } - - @Override - public List getExchangeSymbols() { - - return BitcoinChartsUtils.CURRENCY_PAIRS; - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - // check for pacing violation - if (tickerRequestTimeStamp == 0L || System.currentTimeMillis() - tickerRequestTimeStamp >= getRefreshRate()) { - - logger.debug("requesting BitcoinCharts tickers"); - tickerRequestTimeStamp = System.currentTimeMillis(); - - // Request data - cachedBitcoinChartsTickers = bitcoinCharts.getMarketData(); - } - - return BitcoinChartsAdapters.adaptTicker(cachedBitcoinChartsTickers, tradableIdentifier); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - throw new NotAvailableFromExchangeException(); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.isTrue(currency.equals(Currencies.BTC), "Base curreny must be " + Currencies.BTC + " for this exchange"); - Assert.isTrue(BitcoinChartsUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - - } - -} diff --git a/xchange-bitcoincharts/src/test/resources/market-data-sample.json b/xchange-bitcoincharts/src/test/resources/market-data-sample.json deleted file mode 100644 index 34303f988..000000000 --- a/xchange-bitcoincharts/src/test/resources/market-data-sample.json +++ /dev/null @@ -1,1367 +0,0 @@ -[ - { - "high": null, - "latest_trade": 1329028868, - "bid": null, - "volume": 0, - "currency": "AUD", - "currency_volume": 0, - "ask": null, - "close": 5.899978679200, - "avg": null, - "symbol": "thAUD", - "low": null - }, - { - "high": null, - "latest_trade": 1349296271, - "bid": null, - "volume": 0, - "currency": "AUD", - "currency_volume": 0, - "ask": 15.000000000000, - "close": 14.000000000000, - "avg": null, - "symbol": "bitmarketAUD", - "low": null - }, - { - "high": 13.071550000000, - "latest_trade": 1357245552, - "bid": 12.949700000000, - "volume": 205.526197850000, - "currency": "AUD", - "currency_volume": 2650.195294371626, - "ask": 13.039750000000, - "close": 13.027910000000, - "avg": 12.89468360771130764145550022, - "symbol": "mtgoxAUD", - "low": 12.740000000000 - }, - { - "high": null, - "latest_trade": 1318748737, - "bid": null, - "volume": 0, - "currency": "AUD", - "currency_volume": 0, - "ask": null, - "close": 4.250000000000, - "avg": null, - "symbol": "ruxumAUD", - "low": null - }, - { - "high": null, - "latest_trade": 1329864308, - "bid": null, - "volume": 0, - "currency": "AUD", - "currency_volume": 0, - "ask": null, - "close": 4.600000000000, - "avg": null, - "symbol": "wbxAUD", - "low": null - }, - { - "high": null, - "latest_trade": 1353317656, - "bid": 13.700000000000, - "volume": 0, - "currency": "AUD", - "currency_volume": 0, - "ask": 23.000000000000, - "close": 22.000000000000, - "avg": null, - "symbol": "cryptoxAUD", - "low": null - }, - { - "high": 32.600000000000, - "latest_trade": 1357225922, - "bid": 30.100000000000, - "volume": 127.539998290000, - "currency": "BRL", - "currency_volume": 4049.125180395000, - "ask": 32.600000000000, - "close": 32.000000000000, - "avg": 31.74788485717330332261524762, - "symbol": "mrcdBRL", - "low": 29.800000000000 - }, - { - "high": null, - "latest_trade": 1320965054, - "bid": null, - "volume": 0, - "currency": "BRL", - "currency_volume": 0, - "ask": null, - "close": 18.000000000000, - "avg": null, - "symbol": "bbmBRL", - "low": null - }, - { - "high": null, - "latest_trade": 1357150755, - "bid": 13.200000000000, - "volume": 0, - "currency": "CAD", - "currency_volume": 0, - "ask": 13.424850000000, - "close": 13.211280000000, - "avg": null, - "symbol": "mtgoxCAD", - "low": null - }, - { - "high": 12.978990000000, - "latest_trade": 1357247269, - "bid": 12.772010000000, - "volume": 566.660000000000, - "currency": "CAD", - "currency_volume": 7313.046258000000, - "ask": 12.978960000000, - "close": 12.978970000000, - "avg": 12.90552757914798997635266297, - "symbol": "virtexCAD", - "low": 12.772000000000 - }, - { - "high": 12.317220000000, - "latest_trade": 1357225716, - "bid": 12.086990000000, - "volume": 0.981185690000, - "currency": "CHF", - "currency_volume": 12.085480004582, - "ask": 12.474320000000, - "close": 12.317220000000, - "avg": 12.31722000000020383501516415, - "symbol": "mtgoxCHF", - "low": 12.317220000000 - }, - { - "volume": 0, - "latest_trade": 1318992534, - "bid": null, - "high": null, - "currency": "CHF", - "currency_volume": 0, - "ask": 3.900000000000, - "close": 3.000000000000, - "avg": null, - "symbol": "ruxumCHF", - "low": null - }, - { - "high": null, - "latest_trade": 1329168604, - "bid": null, - "volume": 0, - "currency": "CLP", - "currency_volume": 0, - "ask": null, - "close": 3050.000000000000, - "avg": null, - "symbol": "thCLP", - "low": null - }, - { - "volume": 1234.968000000000, - "latest_trade": 1357238977, - "bid": 82.010000000000, - "high": 82.590000000000, - "currency": "CNY", - "currency_volume": 101326.738210000000, - "ask": 82.800000000000, - "close": 82.010000000000, - "avg": 82.04806781228339519728446405, - "symbol": "btcnCNY", - "low": 81.950000000000 - }, - { - "high": null, - "latest_trade": 1355457356, - "bid": 82.642420000000, - "volume": 0, - "currency": "CNY", - "currency_volume": 0, - "ask": 85.297530000000, - "close": 85.136650000000, - "avg": null, - "symbol": "mtgoxCNY", - "low": null - }, - { - "high": 76.979620000000, - "latest_trade": 1357238747, - "bid": 74.583430000000, - "volume": 1.636800000000, - "currency": "DKK", - "currency_volume": 126.000242016000, - "ask": 76.979620000000, - "close": 76.979620000000, - "avg": 76.97962, - "symbol": "mtgoxDKK", - "low": 76.979620000000 - }, - { - "high": 10.500000000000, - "latest_trade": 1357245723, - "bid": 10.150000000000, - "volume": 1176.224473450000, - "currency": "EUR", - "currency_volume": 12102.568530803450, - "ask": 10.239999990000, - "close": 10.200000000000, - "avg": 10.28933575519410988327790945, - "symbol": "bcEUR", - "low": 10.000100000000 - }, - { - "high": null, - "latest_trade": 1305076646, - "bid": null, - "volume": 0, - "currency": "EUR", - "currency_volume": 0, - "ask": null, - "close": 3.900000000000, - "avg": null, - "symbol": "btcexEUR", - "low": null - }, - { - "volume": 3.000000000000, - "latest_trade": 1357233859, - "bid": 11.000000000000, - "high": 10.500000000000, - "currency": "EUR", - "currency_volume": 31.500000000000, - "ask": null, - "close": 10.500000000000, - "avg": 10.5, - "symbol": "bitmarketEUR", - "low": 10.500000000000 - }, - { - "high": null, - "latest_trade": 1329146896, - "bid": null, - "volume": 0, - "currency": "EUR", - "currency_volume": 0, - "ask": null, - "close": 4.160000000000, - "avg": null, - "symbol": "thEUR", - "low": null - }, - { - "high": 10.400000000000, - "latest_trade": 1357239305, - "bid": 10.220000000000, - "volume": 61.390000000000, - "currency": "EUR", - "currency_volume": 635.572600000000, - "ask": 10.390000000000, - "close": 10.390000000000, - "avg": 10.35303143834500733018406907, - "symbol": "rockEUR", - "low": 10.310000000000 - }, - { - "high": null, - "latest_trade": 1317822453, - "bid": null, - "volume": 0, - "currency": "EUR", - "currency_volume": 0, - "ask": null, - "close": 3.300000000000, - "avg": null, - "symbol": "b7EUR", - "low": null - }, - { - "high": 10.240000000000, - "latest_trade": 1357248015, - "bid": 10.087760000000, - "volume": 732.079339020000, - "currency": "EUR", - "currency_volume": 7452.587610923368, - "ask": 10.120000000000, - "close": 10.120000000000, - "avg": 10.18002723707487045370433899, - "symbol": "mtgoxEUR", - "low": 10.075400000000 - }, - { - "volume": 0, - "latest_trade": 1321512379, - "bid": null, - "high": null, - "currency": "EUR", - "currency_volume": 0, - "ask": null, - "close": 1.710000000000, - "avg": null, - "symbol": "aqoinEUR", - "low": null - }, - { - "high": null, - "latest_trade": 1338569911, - "bid": 4.407990000000, - "volume": 0, - "currency": "EUR", - "currency_volume": 0, - "ask": null, - "close": 5.000000000000, - "avg": null, - "symbol": "ruxumEUR", - "low": null - }, - { - "volume": 214.681860000000, - "latest_trade": 1357243784, - "bid": 9.821020000000, - "high": 9.999990000000, - "currency": "EUR", - "currency_volume": 2132.294130106100, - "ask": 9.998900000000, - "close": 9.825410000000, - "avg": 9.932344214392869523302993555, - "symbol": "intrsngEUR", - "low": 9.825210000000 - }, - { - "high": 11.000000000000, - "latest_trade": 1357248084, - "bid": 10.200000000000, - "volume": 1929.296285170000, - "currency": "EUR", - "currency_volume": 19831.756027921200, - "ask": 10.240000000000, - "close": 10.150000000000, - "avg": 10.27926927572647257915934859, - "symbol": "btcdeEUR", - "low": 9.990000000000 - }, - { - "volume": 0, - "latest_trade": 1317816883, - "bid": null, - "high": null, - "currency": "EUR", - "currency_volume": 0, - "ask": null, - "close": 4.000000000000, - "avg": null, - "symbol": "globalEUR", - "low": null - }, - { - "high": 10.699999000000, - "latest_trade": 1357209635, - "bid": 10.140000010000, - "volume": 0.006788940000, - "currency": "EUR", - "currency_volume": 0.070694434062, - "ask": 10.700000000000, - "close": 10.140000050000, - "avg": 10.41317702940370661693872681, - "symbol": "vcxEUR", - "low": 10.140000050000 - }, - { - "volume": 0, - "latest_trade": 1348229048, - "bid": 3.820000000000, - "high": null, - "currency": "EUR", - "currency_volume": 0, - "ask": 4.870000000000, - "close": 7.711538461540, - "avg": null, - "symbol": "imcexEUR", - "low": null - }, - { - "high": 10.135080000000, - "latest_trade": 1357248298, - "bid": 10.021010000000, - "volume": 839.756010260000, - "currency": "EUR", - "currency_volume": 8445.598915181996, - "ask": 10.021020000000, - "close": 10.021020000000, - "avg": 10.05720567878653529793195624, - "symbol": "btc24EUR", - "low": 9.936010000000 - }, - { - "volume": 203.582662500000, - "latest_trade": 1357237804, - "bid": 9.850000000000, - "high": 10.090000000000, - "currency": "EUR", - "currency_volume": 2034.969419510500, - "ask": 9.900000000000, - "close": 9.900000000000, - "avg": 9.995789398375217732502147623, - "symbol": "bitcurexEUR", - "low": 9.660000000000 - }, - { - "high": 9.004000000000, - "latest_trade": 1357242184, - "bid": 7.810000000000, - "volume": 154.242359000000, - "currency": "EUR", - "currency_volume": 1388.240808270000, - "ask": 9.000000000000, - "close": 9.000000000000, - "avg": 9.000386257513086920565056970, - "symbol": "btceEUR", - "low": 9.000000000000 - }, - { - "volume": 0, - "latest_trade": 1313452498, - "bid": null, - "high": null, - "currency": "GAU", - "currency_volume": 0, - "ask": null, - "close": 0.200000000000, - "avg": null, - "symbol": "bcmPXGAU", - "low": null - }, - { - "volume": 0, - "latest_trade": 1312214090, - "bid": null, - "high": null, - "currency": "GAU", - "currency_volume": 0, - "ask": null, - "close": 0.267000000000, - "avg": null, - "symbol": "bcmBMGAU", - "low": null - }, - { - "volume": 0, - "latest_trade": 1316391901, - "bid": null, - "high": null, - "currency": "GBP", - "currency_volume": 0, - "ask": null, - "close": 3.662700000000, - "avg": null, - "symbol": "britcoinGBP", - "low": null - }, - { - "volume": 0, - "latest_trade": 1314988355, - "bid": null, - "high": null, - "currency": "GBP", - "currency_volume": 0, - "ask": 8.700000000000, - "close": 5.500000000000, - "avg": null, - "symbol": "bitmarketGBP", - "low": null - }, - { - "high": 8.188270130000, - "latest_trade": 1357177714, - "bid": 8.188286870000, - "volume": 2.550000000000, - "currency": "GBP", - "currency_volume": 20.880088831500, - "ask": 9.251783130000, - "close": 8.188270130000, - "avg": 8.18827013, - "symbol": "bcGBP", - "low": 8.188270130000 - }, - { - "high": 8.398800000000, - "latest_trade": 1357245693, - "bid": 8.248890000000, - "volume": 977.514296540000, - "currency": "GBP", - "currency_volume": 8038.793366764705, - "ask": 8.280000000000, - "close": 8.285000000000, - "avg": 8.223709254400410326708693398, - "symbol": "mtgoxGBP", - "low": 8.021680000000 - }, - { - "volume": 0, - "latest_trade": 1355944256, - "bid": 8.710000000000, - "high": null, - "currency": "GBP", - "currency_volume": 0, - "ask": 11.500000000000, - "close": 11.499000000000, - "avg": null, - "symbol": "intrsngGBP", - "low": null - }, - { - "volume": 0, - "latest_trade": 1318792662, - "bid": null, - "high": null, - "currency": "GBP", - "currency_volume": 0, - "ask": 3.500000000000, - "close": 2.500000000000, - "avg": null, - "symbol": "ruxumGBP", - "low": null - }, - { - "high": null, - "latest_trade": 1320274888, - "bid": null, - "volume": 0, - "currency": "GBP", - "currency_volume": 0, - "ask": null, - "close": 2.990000000000, - "avg": null, - "symbol": "globalGBP", - "low": null - }, - { - "high": null, - "latest_trade": 1356099819, - "bid": 102.765410000000, - "volume": 0, - "currency": "HKD", - "currency_volume": 0, - "ask": 106.067030000000, - "close": 106.218040000000, - "avg": null, - "symbol": "mtgoxHKD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1318797312, - "bid": 6.120000000000, - "high": null, - "currency": "HKD", - "currency_volume": 0, - "ask": 48.000000000000, - "close": 29.000000000000, - "avg": null, - "symbol": "ruxumHKD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1319836324, - "bid": 79.000000000000, - "high": null, - "currency": "HUF", - "currency_volume": 0, - "ask": 1300.000000000000, - "close": 79.000000000000, - "avg": null, - "symbol": "ruxumHUF", - "low": null - }, - { - "high": null, - "latest_trade": 1327901200, - "bid": null, - "volume": 0, - "currency": "INR", - "currency_volume": 0, - "ask": null, - "close": 318.000000000000, - "avg": null, - "symbol": "thINR", - "low": null - }, - { - "high": null, - "latest_trade": 1299369401, - "bid": null, - "volume": 0, - "currency": "JPY", - "currency_volume": 0, - "ask": null, - "close": 1.000000000000, - "avg": null, - "symbol": "btcexJPY", - "low": null - }, - { - "volume": 0, - "latest_trade": 1319028730, - "bid": 210.000000000000, - "high": null, - "currency": "JPY", - "currency_volume": 0, - "ask": 490.000000000000, - "close": 210.000000000000, - "avg": null, - "symbol": "ruxumJPY", - "low": null - }, - { - "high": 1190.400000000000, - "latest_trade": 1357226623, - "bid": 1165.400000000000, - "volume": 13.720362130000, - "currency": "JPY", - "currency_volume": 16306.728518720450, - "ask": 1189.200000000000, - "close": 1189.200000000000, - "avg": 1188.505694253162543895625297, - "symbol": "mtgoxJPY", - "low": 1177.650000000000 - }, - { - "high": null, - "latest_trade": 1357012187, - "bid": 17.001000000000, - "volume": 0, - "currency": "NZD", - "currency_volume": 0, - "ask": 17.740000000000, - "close": 17.984000000000, - "avg": null, - "symbol": "bitnzNZD", - "low": null - }, - { - "high": null, - "latest_trade": 1356791578, - "bid": 15.864370000000, - "volume": 0, - "currency": "NZD", - "currency_volume": 0, - "ask": 16.364440000000, - "close": 16.055490000000, - "avg": null, - "symbol": "mtgoxNZD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1313056551, - "bid": null, - "high": null, - "currency": "PLN", - "currency_volume": 0, - "ask": null, - "close": 29.200000000000, - "avg": null, - "symbol": "bitomatPLN", - "low": null - }, - { - "volume": 0, - "latest_trade": 1355600551, - "bid": null, - "high": null, - "currency": "PLN", - "currency_volume": 0, - "ask": 43.000000000000, - "close": 45.000000000000, - "avg": null, - "symbol": "bitmarketPLN", - "low": null - }, - { - "volume": 0, - "latest_trade": 1319837979, - "bid": null, - "high": null, - "currency": "PLN", - "currency_volume": 0, - "ask": null, - "close": 10.000000000000, - "avg": null, - "symbol": "bitchangePLN", - "low": null - }, - { - "high": 41.200000000000, - "latest_trade": 1357243683, - "bid": 40.800000000000, - "volume": 21.705755040000, - "currency": "PLN", - "currency_volume": 886.649857025464, - "ask": 41.000000000000, - "close": 40.800000000000, - "avg": 40.84860698886169683779864494, - "symbol": "mtgoxPLN", - "low": 40.800000000000 - }, - { - "volume": 4.510000000000, - "latest_trade": 1357205503, - "bid": 40.000820000000, - "high": 40.900000000000, - "currency": "PLN", - "currency_volume": 180.486581000000, - "ask": 40.900000000000, - "close": 40.000000000000, - "avg": 40.01919756097560975609756098, - "symbol": "intrsngPLN", - "low": 40.000000000000 - }, - { - "volume": 0, - "latest_trade": 1318577499, - "bid": null, - "high": null, - "currency": "PLN", - "currency_volume": 0, - "ask": 18.000000000000, - "close": 13.500000000000, - "avg": null, - "symbol": "ruxumPLN", - "low": null - }, - { - "volume": 0, - "latest_trade": 1325440070, - "bid": null, - "high": null, - "currency": "PLN", - "currency_volume": 0, - "ask": null, - "close": 15.820000000000, - "avg": null, - "symbol": "globalPLN", - "low": null - }, - { - "volume": 0, - "latest_trade": 1315073674, - "bid": null, - "high": null, - "currency": "PLN", - "currency_volume": 0, - "ask": null, - "close": 25.000000000000, - "avg": null, - "symbol": "freshPLN", - "low": null - }, - { - "volume": 52.982367240000, - "latest_trade": 1357246994, - "bid": 39.980000000000, - "high": 40.390000000000, - "currency": "PLN", - "currency_volume": 2110.349374578700, - "ask": 39.990000000000, - "close": 39.510000000000, - "avg": 39.83116430074218027710760324, - "symbol": "bitcurexPLN", - "low": 39.500000000000 - }, - { - "volume": 0, - "latest_trade": 1306059105, - "bid": null, - "high": null, - "currency": "RUB", - "currency_volume": 0, - "ask": null, - "close": 155.000000000000, - "avg": null, - "symbol": "btcexWMR", - "low": null - }, - { - "volume": 0, - "latest_trade": 1305230002, - "bid": null, - "high": null, - "currency": "RUB", - "currency_volume": 0, - "ask": null, - "close": 199.000000000000, - "avg": null, - "symbol": "btcexRUB", - "low": null - }, - { - "volume": 0, - "latest_trade": 1305229968, - "bid": null, - "high": null, - "currency": "RUB", - "currency_volume": 0, - "ask": null, - "close": 132.000100000000, - "avg": null, - "symbol": "btcexYAD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1319445325, - "bid": null, - "high": null, - "currency": "RUB", - "currency_volume": 0, - "ask": null, - "close": 300.000000000000, - "avg": null, - "symbol": "bitmarketRUB", - "low": null - }, - { - "high": 411.000000000000, - "latest_trade": 1357171449, - "bid": 400.240320000000, - "volume": 2.000000000000, - "currency": "RUB", - "currency_volume": 822.000000000000, - "ask": 413.099140000000, - "close": 411.000000000000, - "avg": 411, - "symbol": "mtgoxRUB", - "low": 411.000000000000 - }, - { - "volume": 0, - "latest_trade": 1319202603, - "bid": null, - "high": null, - "currency": "RUB", - "currency_volume": 0, - "ask": 195.000000000000, - "close": 195.000000000000, - "avg": null, - "symbol": "ruxumRUB", - "low": null - }, - { - "high": null, - "latest_trade": 1356929094, - "bid": 85.683000000000, - "volume": 0, - "currency": "SEK", - "currency_volume": 0, - "ask": 88.435000000000, - "close": 89.465000000000, - "avg": null, - "symbol": "mtgoxSEK", - "low": null - }, - { - "volume": 0, - "latest_trade": 1319028697, - "bid": null, - "high": null, - "currency": "SEK", - "currency_volume": 0, - "ask": 35.000000000000, - "close": 20.000000000000, - "avg": null, - "symbol": "ruxumSEK", - "low": null - }, - { - "volume": 614.250828440000, - "latest_trade": 1357247626, - "bid": 91.000000000000, - "high": 94.938000000000, - "currency": "SEK", - "currency_volume": 57957.029171171420, - "ask": 94.937000000000, - "close": 94.938000000000, - "avg": 94.35401058939338595513771156, - "symbol": "kptnSEK", - "low": 91.000000000000 - }, - { - "high": null, - "latest_trade": 1356056315, - "bid": 16.179970000000, - "volume": 0, - "currency": "SGD", - "currency_volume": 0, - "ask": 16.699800000000, - "close": 16.438770000000, - "avg": null, - "symbol": "mtgoxSGD", - "low": null - }, - { - "high": null, - "latest_trade": 1318789490, - "bid": null, - "volume": 0, - "currency": "SGD", - "currency_volume": 0, - "ask": null, - "close": 5.200000000000, - "avg": null, - "symbol": "ruxumSGD", - "low": null - }, - { - "volume": 1513.000000000000, - "latest_trade": 1357246884, - "bid": 3389.600000000000, - "high": 3476.000000000000, - "currency": "SLL", - "currency_volume": 5213177.700000000000, - "ask": 3475.900000000000, - "close": 3475.900000000000, - "avg": 3445.590019828155981493721084, - "symbol": "virwoxSLL", - "low": 3356.000000000000 - }, - { - "high": 3455.010000000000, - "latest_trade": 1357240189, - "bid": 3455.000000000000, - "volume": 0.600000000000, - "currency": "SLL", - "currency_volume": 2073.001200000000, - "ask": 3550.000000000000, - "close": 3455.000000000000, - "avg": 3455.002, - "symbol": "rockSLL", - "low": 3455.000000000000 - }, - { - "volume": 0, - "latest_trade": 1318519297, - "bid": null, - "high": null, - "currency": "THB", - "currency_volume": 0, - "ask": 175.000000000000, - "close": 135.000000000000, - "avg": null, - "symbol": "ruxumTHB", - "low": null - }, - { - "high": null, - "latest_trade": 1353777037, - "bid": 402.269820000000, - "volume": 0, - "currency": "THB", - "currency_volume": 0, - "ask": 415.193830000000, - "close": 370.650100000000, - "avg": null, - "symbol": "mtgoxTHB", - "low": null - }, - { - "high": null, - "latest_trade": 1318793596, - "bid": null, - "volume": 0, - "currency": "UAH", - "currency_volume": 0, - "ask": 45.000000000000, - "close": 30.000000000000, - "avg": null, - "symbol": "ruxumUAH", - "low": null - }, - { - "volume": 0, - "latest_trade": 1307246798, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 23.500000000000, - "avg": null, - "symbol": "bcmPPUSD", - "low": null - }, - { - "high": 13.464000000000, - "latest_trade": 1357248358, - "bid": 13.357010000000, - "volume": 19129.113568530000, - "currency": "USD", - "currency_volume": 255316.858235221754, - "ask": 13.394500000000, - "close": 13.357010000000, - "avg": 13.34703029079469721228008815, - "symbol": "mtgoxUSD", - "low": 13.248970000000 - }, - { - "volume": 0, - "latest_trade": 1312408747, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 11.000000000000, - "avg": null, - "symbol": "bcmLRUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1342942225, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 6.801100000000, - "avg": null, - "symbol": "btcexUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1305094318, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 5.100000000000, - "avg": null, - "symbol": "btcexWMZ", - "low": null - }, - { - "volume": 0, - "latest_trade": 1312592486, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 15.000000000000, - "avg": null, - "symbol": "bcmBMUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1313715228, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 10.000000000000, - "avg": null, - "symbol": "bcmMBUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1327176610, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 6.500000000000, - "avg": null, - "symbol": "b2cUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1356047578, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": 14.500000000000, - "close": 14.000000000000, - "avg": null, - "symbol": "bitmarketUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1329154248, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 4.350275241100, - "avg": null, - "symbol": "thLRUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1329172006, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 5.590000000000, - "avg": null, - "symbol": "thUSD", - "low": null - }, - { - "high": 13.499000000000, - "latest_trade": 1357190513, - "bid": 13.240000000000, - "volume": 3.000000000000, - "currency": "USD", - "currency_volume": 40.397000000000, - "ask": 13.699999990000, - "close": 13.499000000000, - "avg": 13.46566666666666666666666667, - "symbol": "vcxUSD", - "low": 13.399000000000 - }, - { - "volume": 0, - "latest_trade": 1318805936, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 3.639900000000, - "avg": null, - "symbol": "exchbUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1317843215, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 4.750000000000, - "avg": null, - "symbol": "b7USD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1347450254, - "bid": 11.120000000000, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": 15.000000000000, - "close": 14.750010000000, - "avg": null, - "symbol": "ruxumUSD", - "low": null - }, - { - "high": 13.450000000000, - "latest_trade": 1357254325, - "bid": 13.290000000000, - "volume": 691.273053890000, - "currency": "USD", - "currency_volume": 9185.737885731300, - "ask": 13.300000000000, - "close": 13.300000000000, - "avg": 13.28814689657062223435483201, - "symbol": "cbxUSD", - "low": 13.150000000000 - }, - { - "high": 13.236000000000, - "latest_trade": 1357248180, - "bid": 13.130000000000, - "volume": 1234.083188100000, - "currency": "USD", - "currency_volume": 16252.483969792850, - "ask": 13.188000000000, - "close": 13.130000000000, - "avg": 13.16968266524661685406197942, - "symbol": "btceUSD", - "low": 13.129000000000 - }, - { - "high": 13.260000000000, - "latest_trade": 1357247558, - "bid": 13.090000000000, - "volume": 3309.205815030000, - "currency": "USD", - "currency_volume": 43444.865870970900, - "ask": 13.190000000000, - "close": 13.190000000000, - "avg": 13.12848710516878062081035494, - "symbol": "bitstampUSD", - "low": 12.960000000000 - }, - { - "volume": 0, - "latest_trade": 1318013969, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 4.700000000000, - "avg": null, - "symbol": "globalUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1350761253, - "bid": 10.000000000000, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 11.900000000000, - "avg": null, - "symbol": "intrsngUSD", - "low": null - }, - { - "high": 14.000000000000, - "latest_trade": 1357236878, - "bid": 13.340000000000, - "volume": 723.253950000000, - "currency": "USD", - "currency_volume": 9764.036767900000, - "ask": 13.360000000000, - "close": 13.350000000000, - "avg": 13.50014993751503189163363712, - "symbol": "bitfloorUSD", - "low": 12.750000000000 - }, - { - "high": 13.990000000000, - "latest_trade": 1357201488, - "bid": 13.430000000000, - "volume": 2.920000000000, - "currency": "USD", - "currency_volume": 40.723200000000, - "ask": 13.790000000000, - "close": 13.990000000000, - "avg": 13.94630136986301369863013699, - "symbol": "rockUSD", - "low": 13.410000000000 - }, - { - "high": null, - "latest_trade": 1353314729, - "bid": 13.350000000000, - "volume": 0, - "currency": "USD", - "currency_volume": 0, - "ask": 13.672050000000, - "close": 13.350000000000, - "avg": null, - "symbol": "cryptoxUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1355900976, - "bid": 13.010000000000, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": 13.900000000000, - "close": 13.700000000000, - "avg": null, - "symbol": "icbitUSD", - "low": null - }, - { - "high": 13.600000000000, - "latest_trade": 1357244158, - "bid": 13.202000000000, - "volume": 306.023546040000, - "currency": "USD", - "currency_volume": 4128.362831615650, - "ask": 13.450000000000, - "close": 13.450000000000, - "avg": 13.49034374981079478769116743, - "symbol": "bitmeUSD", - "low": 13.201000000000 - }, - { - "volume": 0, - "latest_trade": 1350223254, - "bid": 4.260000000000, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": 5.200000000000, - "close": 19.999140620000, - "avg": null, - "symbol": "imcexUSD", - "low": null - }, - { - "volume": 0, - "latest_trade": 1341981899, - "bid": null, - "high": null, - "currency": "USD", - "currency_volume": 0, - "ask": null, - "close": 6.470000000000, - "avg": null, - "symbol": "btctreeUSD", - "low": null - }, - { - "high": 13.368160000000, - "latest_trade": 1357213958, - "bid": 13.092290000000, - "volume": 18.643400000000, - "currency": "USD", - "currency_volume": 249.152379144000, - "ask": 13.368160000000, - "close": 13.217010000000, - "avg": 13.36410628662153898966926634, - "symbol": "btc24USD", - "low": 13.217010000000 - }, - { - "volume": 0, - "latest_trade": 1319028662, - "bid": null, - "high": null, - "currency": "ZAR", - "currency_volume": 0, - "ask": 41.000000000000, - "close": 25.000000000000, - "avg": null, - "symbol": "ruxumZAR", - "low": null - } -] \ No newline at end of file diff --git a/xchange-bitcoincharts/src/test/resources/weighted-prices-sample.json b/xchange-bitcoincharts/src/test/resources/weighted-prices-sample.json deleted file mode 100644 index 6e73e9597..000000000 --- a/xchange-bitcoincharts/src/test/resources/weighted-prices-sample.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "JPY":{ - "7d":"1169.56", - "30d":"1143.53", - "24h":"1188.51" - }, - "USD":{ - "7d":"13.37", - "30d":"13.37", - "24h":"13.31" - }, - "AUD":{ - "7d":"13.17", - "30d":"13.08", - "24h":"12.89" - }, - "CHF":{ - "7d":"12.44", - "30d":"12.56", - "24h":"12.32" - }, - "RUB":{ - "7d":"411.00", - "30d":"415.19", - "24h":"411.00" - }, - "SGD":{ - "30d":"16.87" - }, - "CNY":{ - "7d":"82.41", - "30d":"82.76", - "24h":"82.05" - }, - "SLL":{ - "7d":"3457.33", - "30d":"3442.73", - "24h":"3447.50" - }, - "BRL":{ - "7d":"30.67", - "30d":"29.85", - "24h":"31.75" - }, - "timestamp":1357250404, - "GBP":{ - "7d":"8.39", - "30d":"8.53", - "24h":"8.22" - }, - "NZD":{ - "7d":"16.20", - "30d":"17.41" - }, - "PLN":{ - "7d":"41.01", - "30d":"41.67", - "24h":"40.12" - }, - "CAD":{ - "7d":"13.03", - "30d":"13.11", - "24h":"12.90" - }, - "SEK":{ - "7d":"92.83", - "30d":"93.89", - "24h":"94.34" - }, - "DKK":{ - "7d":"76.98", - "30d":"79.08", - "24h":"76.98" - }, - "HKD":{ - "30d":"105.48" - }, - "EUR":{ - "7d":"10.21", - "30d":"10.33", - "24h":"10.16" - } -} \ No newline at end of file diff --git a/xchange-bitfloor/api-specification.txt b/xchange-bitfloor/api-specification.txt deleted file mode 100644 index 4da1138e5..000000000 --- a/xchange-bitfloor/api-specification.txt +++ /dev/null @@ -1,21 +0,0 @@ -Bitfloor Exchange API specification -================================ - -Public API - -Documentation -------------- -https://bitfloor.com/docs/api - -Ticker ------- -https://api.bitfloor.com/ticker/1 - -Orders ------- -https://api.bitfloor.com/book/L2/1 - -Trades ------- -https://api.bitfloor.com/trades/1 - diff --git a/xchange-bitfloor/pom.xml b/xchange-bitfloor/pom.xml deleted file mode 100644 index 0ac0f7c6d..000000000 --- a/xchange-bitfloor/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - develop-SNAPSHOT - - - xchange-bitfloor - - Bitfloor Exchange - XChange implementation for the Bitfloor Exchange - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - develop-SNAPSHOT - - - - - diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/Bitfloor.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/Bitfloor.java deleted file mode 100644 index 549e032c0..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/Bitfloor.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor; - -import java.math.BigDecimal; - -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; - -import si.mazi.rescu.ParamsDigest; - -import com.xeiam.xchange.bitfloor.dto.Product; -import com.xeiam.xchange.bitfloor.dto.account.BitfloorBalance; -import com.xeiam.xchange.bitfloor.dto.account.WithdrawResult; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorDayInfo; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorOrderBook; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTicker; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTransaction; -import com.xeiam.xchange.bitfloor.dto.trade.BitfloorOrder; -import com.xeiam.xchange.bitfloor.dto.trade.NewOrderResult; -import com.xeiam.xchange.bitfloor.dto.trade.OrderCancelResult; - -/** @author Matija Mazi See https://www.bitfloor.net/api/ for up-to-date docs. */ -@Path("/") -@Produces("application/json") -public interface Bitfloor { - - /** Returns "bids" and "asks". Each is a list of open orders and each order is represented as a list of price and amount. */ - @GET - @Path("book/L2/1") - @Produces("application/json") - public BitfloorOrderBook getOrderBook(); - - @GET - @Path("ticker/1") - @Produces("application/json") - public BitfloorTicker getTicker(); - - @GET - @Path("day-info/1") - @Produces("application/json") - public BitfloorDayInfo getDayInfo(); - - /** Returns descending list of transactions. */ - @GET - @Path("trades/1") - @Produces("application/json") - public BitfloorTransaction[] getTransactions(); - - @POST - @Path("accounts") - @Produces("application/json") - public BitfloorBalance[] getBalance(@HeaderParam("bitfloor-key") String key, @HeaderParam("bitfloor-sign") ParamsDigest sign, @HeaderParam("bitfloor-passphrase") String passphrase, - @HeaderParam("bitfloor-version") Version version, @FormParam("nonce") long nonce); - - // todo: converter from double to date - @POST - @Path("withdraw") - @Produces("application/json") - public WithdrawResult withdraw(@HeaderParam("bitfloor-key") String key, @HeaderParam("bitfloor-sign") ParamsDigest sign, @HeaderParam("bitfloor-passphrase") String passphrase, - @HeaderParam("bitfloor-version") Version version, @FormParam("nonce") long nonce, @FormParam("amount") BigDecimal amount, @FormParam("currency") String currency, - @FormParam("destination") String destination, @FormParam("method") WithdrawalMethod method); - - @POST - @Path("order/cancel") - @Produces("application/json") - public OrderCancelResult cancelOrder(@HeaderParam("bitfloor-key") String key, @HeaderParam("bitfloor-sign") ParamsDigest sign, @HeaderParam("bitfloor-passphrase") String passphrase, - @HeaderParam("bitfloor-version") Version version, @FormParam("nonce") long nonce, @FormParam("order_id") String orderId, @FormParam("product_id") Product product); - - @POST - @Path("orders") - @Produces("application/json") - public BitfloorOrder[] getOpenOrders(@HeaderParam("bitfloor-key") String key, @HeaderParam("bitfloor-sign") ParamsDigest sign, @HeaderParam("bitfloor-passphrase") String passphrase, - @HeaderParam("bitfloor-version") Version version, @FormParam("nonce") long nonce); - - @POST - @Path("order/new") - @Produces("application/json") - public NewOrderResult newOrder(@HeaderParam("bitfloor-key") String key, @HeaderParam("bitfloor-sign") ParamsDigest sign, @HeaderParam("bitfloor-passphrase") String passphrase, - @HeaderParam("bitfloor-version") Version version, @FormParam("nonce") long nonce, @FormParam("size") BigDecimal amount, @FormParam("price") BigDecimal price, - @FormParam("side") BitfloorOrder.Side side, @FormParam("product_id") Product product); - - public static enum Version { - v1; - - @Override - public String toString() { - - return name().substring(1); - } - } - - public static enum WithdrawalMethod { - bitcoin, ach - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorAdapters.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorAdapters.java deleted file mode 100644 index 6fc6a3535..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorAdapters.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor; - -import java.math.BigDecimal; -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -import com.xeiam.xchange.bitfloor.dto.account.BitfloorBalance; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorDayInfo; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorOrderBook; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTicker; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTransaction; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.Wallet; - -/** - * Various adapters for converting from Bitfloor DTOs to XChange DTOs - */ -public final class BitfloorAdapters { - - /** - * private Constructor - */ - private BitfloorAdapters() { - - } - - /** - * Adapts a BitfloorBalance to a AccountInfo - * - * @param bitfloorBalance@return - */ - public static AccountInfo adaptAccountInfo(BitfloorBalance[] bitfloorBalance, String userName) { - - // Adapt to XChange DTOs - List wallets = new ArrayList(); - for (BitfloorBalance balance : bitfloorBalance) { - wallets.add(new Wallet(balance.getCurrency(), BigMoney.of(CurrencyUnit.getInstance(balance.getCurrency()), balance.getAmount()))); - } - return new AccountInfo(userName, wallets); - } - - /** - * Adapts a com.xeiam.xchange.bitfloor.api.model.OrderBook to a OrderBook Object - */ - public static OrderBook adaptOrders(BitfloorOrderBook bitfloorOrderBook, String currency, String tradableIdentifier) { - - List asks = createOrders(tradableIdentifier, currency, Order.OrderType.ASK, bitfloorOrderBook.getAsks()); - List bids = createOrders(tradableIdentifier, currency, Order.OrderType.BID, bitfloorOrderBook.getBids()); - return new OrderBook(asks, bids); - } - - private static List createOrders(String tradableIdentifier, String currency, Order.OrderType orderType, List> orders) { - - List limitOrders = new ArrayList(); - for (List ask : orders) { - checkArgument(ask.size() == 2, "Expected a pair (price, amount) but got {0} elements.", ask.size()); - limitOrders.add(createOrder(tradableIdentifier, currency, ask, orderType)); - } - return limitOrders; - } - - private static LimitOrder createOrder(String tradableIdentifier, String currency, List priceAndAmount, Order.OrderType orderType) { - - return new LimitOrder(orderType, priceAndAmount.get(1), tradableIdentifier, currency, BigMoney.of(CurrencyUnit.USD, priceAndAmount.get(0))); - } - - private static void checkArgument(boolean argument, String msgPattern, Object... msgArgs) { - - if (!argument) { - throw new IllegalArgumentException(MessageFormat.format(msgPattern, msgArgs)); - } - } - - /** - * Adapts a Transaction[] to a Trades Object - */ - public static Trades adaptTrades(BitfloorTransaction[] transactions, String currency, String tradableIdentifier) { - - List trades = new ArrayList(); - for (BitfloorTransaction tx : transactions) { - trades.add(new Trade(null, tx.getAmount(), tradableIdentifier, currency, BigMoney.of(CurrencyUnit.of(currency), tx.getPrice()), tx.getTimestamp())); - } - return new Trades(trades); - } - - /** - * Adapts a BitfloorTicker to a Ticker Object - */ - public static Ticker adaptTicker(BitfloorTicker bitfloorTicker, BitfloorDayInfo dayInfo, String currency, String tradableIdentifier) { - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(getMoney(currency, bitfloorTicker.getPrice())).withVolume(dayInfo.getVolume()).withHigh( - getMoney(currency, dayInfo.getHigh())).withLow(getMoney(currency, dayInfo.getLow())).withTimestamp(bitfloorTicker.getTimestamp()).build(); - } - - private static BigMoney getMoney(String currency, BigDecimal price) { - - return MoneyUtils.parse(currency + " " + price); - } - -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorExchange.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorExchange.java deleted file mode 100644 index 89c144419..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorExchange.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitfloor.service.account.polling.BitfloorPollingAccountService; -import com.xeiam.xchange.bitfloor.service.marketdata.polling.BitfloorPollingMarketDataService; -import com.xeiam.xchange.bitfloor.service.trade.polling.BitfloorPollingTradeService; - -/** - * @author Matija Mazi - */ -public class BitfloorExchange extends BaseExchange implements Exchange { - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://api.bitfloor.com"); - exchangeSpecification.setHost("api.bitfloor.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("Bitfloor"); - exchangeSpecification.setExchangeDescription("Bitfloor."); - return exchangeSpecification; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new BitfloorPollingMarketDataService(exchangeSpecification); - this.pollingTradeService = new BitfloorPollingTradeService(exchangeSpecification); - this.pollingAccountService = new BitfloorPollingAccountService(exchangeSpecification); - } - -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorUtils.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorUtils.java deleted file mode 100644 index 4e8dee7c8..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/BitfloorUtils.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared Bitfloor properties - */ -public final class BitfloorUtils { - - /** - * private Constructor - */ - private BitfloorUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList(CurrencyPair.BTC_USD); - - /** - * Checks if a given CurrencyPair is covered by this exchange - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/Product.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/Product.java deleted file mode 100644 index f6fd260f2..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/Product.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto; - -import com.fasterxml.jackson.annotation.JsonCreator; - -/** - * @author Matija Mazi
- * @created 2/17/13 4:43 PM - */ -public enum Product { - BTCUSD(1); - - private int id; - - Product(int id) { - - this.id = id; - } - - @JsonCreator - public static Product getInstance(int id) { - - for (Product product : values()) { - if (product.id == id) { - return product; - } - } - throw new IllegalArgumentException("Unsported prouct id: " + id); - } - - @Override - public String toString() { - - return Integer.toString(id); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/BitfloorBalance.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/BitfloorBalance.java deleted file mode 100644 index 1a84dd80a..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/BitfloorBalance.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.account; - -import java.io.Serializable; -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitfloorBalance implements Serializable { - - private final BigDecimal amount; - private final BigDecimal hold; - private final String currency; - - public BitfloorBalance(@JsonProperty("amount") BigDecimal amount, @JsonProperty("hold") BigDecimal hold, @JsonProperty("currency") String currency) { - - this.amount = amount; - this.hold = hold; - this.currency = currency; - } - - public BigDecimal getAmount() { - - return amount; - } - - public BigDecimal getHold() { - - return hold; - } - - public String getCurrency() { - - return currency; - } - - @Override - public String toString() { - - return String.format("BitfloorBalance{amount=%s, hold=%s, currency='%s'}", amount, hold, currency); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/WithdrawResult.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/WithdrawResult.java deleted file mode 100644 index 07e697ec6..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/account/WithdrawResult.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.account; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.xeiam.xchange.utils.jackson.FloatingTimestampDeserializer; - -/** - * @author Matija Mazi - */ -public final class WithdrawResult { - - private final Date timestamp; - - public WithdrawResult(@JsonProperty("timestamp") @JsonDeserialize(using = FloatingTimestampDeserializer.class) Date timestamp) { - - this.timestamp = timestamp; - } - - public Date getTimestamp() { - - return timestamp; - } - - @Override - public String toString() { - - return String.format("OrderCancelResult{timestamp=%s}", timestamp); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorDayInfo.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorDayInfo.java deleted file mode 100644 index 54e75579a..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorDayInfo.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitfloorDayInfo { - - private final BigDecimal low; - private final BigDecimal high; - private final BigDecimal volume; - - public BitfloorDayInfo(@JsonProperty("low") BigDecimal low, @JsonProperty("high") BigDecimal high, @JsonProperty("volume") BigDecimal volume) { - - this.low = low; - this.high = high; - this.volume = volume; - } - - public BigDecimal getLow() { - - return low; - } - - public BigDecimal getHigh() { - - return high; - } - - public BigDecimal getVolume() { - - return volume; - } - - @Override - public String toString() { - - return String.format("BitfloorDayInfo{low=%s, high=%s, volume=%s}", low, high, volume); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorOrderBook.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorOrderBook.java deleted file mode 100644 index 4fbee9b44..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorOrderBook.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitfloorOrderBook { - - private final List> bids; - private final List> asks; - private final Long seq; - - /** - * Constructor - */ - public BitfloorOrderBook(@JsonProperty("bids") List> bids, @JsonProperty("asks") List> asks, @JsonProperty("seq") Long seq) { - - this.bids = bids; - this.asks = asks; - this.seq = seq; - } - - /** (price, amount) */ - public List> getBids() { - - return bids; - } - - /** (price, amount) */ - public List> getAsks() { - - return asks; - } - - public Long getSeq() { - - return seq; - } - - @Override - public String toString() { - - return String.format("OrderBook{bids=%s, asks=%s}", bids, asks); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTicker.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTicker.java deleted file mode 100644 index d6fa34011..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTicker.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.marketdata; - -import java.math.BigDecimal; -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitfloorTicker { - - // {"size":"5.15358000","price":"27.40000000","timestamp":1361036134.183366,"seq":3061020} - private final BigDecimal size; - private final BigDecimal price; - private final Long seq; - private Date timestamp; - - public BitfloorTicker(@JsonProperty("size") BigDecimal size, @JsonProperty("price") BigDecimal price, @JsonProperty("timestamp") Double timestamp, @JsonProperty("seq") Long seq) { - - this.size = size; - this.price = price; - this.seq = seq; - this.timestamp = new Date((long) (timestamp * 1000)); - } - - public Date getTimestamp() { - - return timestamp; - } - - public BigDecimal getSize() { - - return size; - } - - public BigDecimal getPrice() { - - return price; - } - - public Long getSeq() { - - return seq; - } - - @Override - public String toString() { - - return String.format("BitfloorTicker{size=%s, price=%s, timestamp=%s, seq=%d}", size, price, timestamp, seq); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTransaction.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTransaction.java deleted file mode 100644 index 689331db2..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/marketdata/BitfloorTransaction.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.marketdata; - -import java.math.BigDecimal; -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.xeiam.xchange.bitfloor.dto.Product; -import com.xeiam.xchange.utils.jackson.FloatingTimestampDeserializer; - -/** - * @author Matija Mazi - */ -public final class BitfloorTransaction { - - private final String id; - private final Date timestamp; - private final int providerSide; - private final long seq; - private final BigDecimal price; - private final BigDecimal amount; - private final Product product; - - public BitfloorTransaction(@JsonProperty("id") String id, @JsonProperty("timestamp") @JsonDeserialize(using = FloatingTimestampDeserializer.class) Date timestamp, - @JsonProperty("provider_side") int providerSide, @JsonProperty("seq") long seq, @JsonProperty("price") BigDecimal price, @JsonProperty("size") BigDecimal amount, - @JsonProperty("product_id") Product product) { - - this.id = id; - this.timestamp = timestamp; - this.providerSide = providerSide; - this.seq = seq; - this.price = price; - this.amount = amount; - this.product = product; - } - - public String getId() { - - return id; - } - - public Date getTimestamp() { - - return timestamp; - } - - public int getProviderSide() { - - return providerSide; - } - - public long getSeq() { - - return seq; - } - - public BigDecimal getPrice() { - - return price; - } - - public BigDecimal getAmount() { - - return amount; - } - - public Product getProduct() { - - return product; - } - - @Override - public String toString() { - - return String.format("BitfloorTransaction{id='%s', timestamp=%s, providerSide=%d, seq=%d, price=%s, size=%s, productId=%s}", id, timestamp, providerSide, seq, price, amount, product); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/BitfloorOrder.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/BitfloorOrder.java deleted file mode 100644 index 5e62d541d..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/BitfloorOrder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.trade; - -import java.math.BigDecimal; -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.xeiam.xchange.bitfloor.dto.Product; -import com.xeiam.xchange.utils.jackson.FloatingTimestampDeserializer; - -/** - * @author Matija Mazi - */ -public final class BitfloorOrder { - - private final String id; - private final Date timestamp; - private final BigDecimal price; - private final BigDecimal size; - private final Product product; - private final Side side; - - public BitfloorOrder(@JsonProperty("side") Side side, @JsonProperty("product_id") Product product, @JsonProperty("size") BigDecimal size, @JsonProperty("price") BigDecimal price, - @JsonProperty("timestamp") @JsonDeserialize(using = FloatingTimestampDeserializer.class) Date timestamp, @JsonProperty("order_id") String id) { - - this.side = side; - this.product = product; - this.size = size; - this.price = price; - this.timestamp = timestamp; - this.id = id; - } - - public String getId() { - - return id; - } - - public Date getTimestamp() { - - return timestamp; - } - - public BigDecimal getPrice() { - - return price; - } - - public BigDecimal getSize() { - - return size; - } - - public Product getProduct() { - - return product; - } - - public Side getSide() { - - return side; - } - - @Override - public String toString() { - - return String.format("BitfloorOrder{id='%s', timestamp=%s, price=%s, size=%s, product=%s, side=%s}", id, timestamp, price, size, product, side); - } - - public static enum Side { - buy(0), sell(1); - - private int id; - - Side(int id) { - - this.id = id; - } - - @JsonCreator - public static Side getInstance(int id) { - - for (Side side : values()) { - if (side.id == id) { - return side; - } - } - throw new IllegalArgumentException("Illegal side id: " + id); - } - - @Override - public String toString() { - - return Integer.toString(id); - } - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/NewOrderResult.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/NewOrderResult.java deleted file mode 100644 index 6c636ed2f..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/NewOrderResult.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.trade; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.xeiam.xchange.utils.jackson.FloatingTimestampDeserializer; - -/** - * @author Matija Mazi - */ -public final class NewOrderResult { - - private final String id; - private final Date timestamp; - - public NewOrderResult(@JsonProperty("timestamp") @JsonDeserialize(using = FloatingTimestampDeserializer.class) Date timestamp, @JsonProperty("order_id") String id) { - - this.timestamp = timestamp; - this.id = id; - } - - public String getId() { - - return id; - } - - public Date getTimestamp() { - - return timestamp; - } - - @Override - public String toString() { - - return String.format("NewOrderResult{id='%s', timestamp=%s}", id, timestamp); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/OrderCancelResult.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/OrderCancelResult.java deleted file mode 100644 index 24759fe3a..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/dto/trade/OrderCancelResult.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.dto.trade; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.xeiam.xchange.utils.jackson.FloatingTimestampDeserializer; - -/** - * @author Matija Mazi - */ -public final class OrderCancelResult { - - private final Date timestamp; - private final String orderId; - - public OrderCancelResult(@JsonProperty("timestamp") @JsonDeserialize(using = FloatingTimestampDeserializer.class) Date timestamp, @JsonProperty("order_id") String orderId) { - - this.timestamp = timestamp; - this.orderId = orderId; - } - - public Date getTimestamp() { - - return timestamp; - } - - public String getOrderId() { - - return orderId; - } - - @Override - public String toString() { - - return String.format("OrderCancelResult{timestamp=%s, orderId='%s'}", timestamp, orderId); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingAccountService.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingAccountService.java deleted file mode 100644 index abd55032b..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingAccountService.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.account.polling; - -import java.math.BigDecimal; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitfloor.Bitfloor; -import com.xeiam.xchange.bitfloor.BitfloorAdapters; -import com.xeiam.xchange.bitfloor.dto.account.BitfloorBalance; -import com.xeiam.xchange.bitfloor.dto.account.WithdrawResult; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - * @author Matija Mazi - */ -public class BitfloorPollingAccountService extends BitfloorPollingService implements PollingAccountService { - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BitfloorPollingAccountService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - } - - @Override - public AccountInfo getAccountInfo() { - - BitfloorBalance[] bitfloorBalance = bitfloor.getBalance(exchangeSpecification.getApiKey(), bodyDigest, exchangeSpecification.getPassword(), Bitfloor.Version.v1, nextNonce()); - - return BitfloorAdapters.adaptAccountInfo(bitfloorBalance, exchangeSpecification.getUserName()); - } - - @Override - public String withdrawFunds(BigDecimal amount, String address) { - - WithdrawResult withdrawResult = bitfloor.withdraw(exchangeSpecification.getApiKey(), bodyDigest, exchangeSpecification.getPassword(), Bitfloor.Version.v1, nextNonce(), amount, "BTC", address, - Bitfloor.WithdrawalMethod.bitcoin); - return Long.toString(withdrawResult.getTimestamp().getTime()); - } - - /** - * This returns the currently set deposit address. It will not generate a new address (ie. repeated calls will return the same address). - */ - @Override - public String requestBitcoinDepositAddress(final String... arguments) { - - throw new UnsupportedOperationException("Bitfloor doesn't support deposit address requests through REST API."); - } - -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingService.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingService.java deleted file mode 100644 index ce165ab9e..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/account/polling/BitfloorPollingService.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.account.polling; - -import si.mazi.rescu.HmacPostBodyDigest; -import si.mazi.rescu.ParamsDigest; -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitfloor.Bitfloor; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; - -/** - * @author Matija Mazi
- * @created 2/17/13 5:07 PM - */ -public class BitfloorPollingService extends BasePollingExchangeService { - - protected final Bitfloor bitfloor; - protected final ParamsDigest bodyDigest; - - public BitfloorPollingService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitfloor = RestProxyFactory.createProxy(Bitfloor.class, exchangeSpecification.getSslUri()); - this.bodyDigest = HmacPostBodyDigest.createInstance(exchangeSpecification.getSecretKey()); - } - - protected long nextNonce() { - - return System.currentTimeMillis(); - } -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/marketdata/polling/BitfloorPollingMarketDataService.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/marketdata/polling/BitfloorPollingMarketDataService.java deleted file mode 100644 index 63fc14568..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/marketdata/polling/BitfloorPollingMarketDataService.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.marketdata.polling; - -import java.util.List; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.bitfloor.Bitfloor; -import com.xeiam.xchange.bitfloor.BitfloorAdapters; -import com.xeiam.xchange.bitfloor.BitfloorUtils; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorDayInfo; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorOrderBook; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTicker; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTransaction; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -import si.mazi.rescu.RestProxyFactory; - -/** - * @author Matija Mazi - */ -public class BitfloorPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService { - - private final Bitfloor bitfloor; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BitfloorPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitfloor = RestProxyFactory.createProxy(Bitfloor.class, exchangeSpecification.getSslUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - BitfloorTicker bitfloorTicker = bitfloor.getTicker(); - BitfloorDayInfo dayInfo = bitfloor.getDayInfo(); - - return BitfloorAdapters.adaptTicker(bitfloorTicker, dayInfo, currency, tradableIdentifier); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - - BitfloorTransaction[] transactions = bitfloor.getTransactions(); - - return BitfloorAdapters.adaptTrades(transactions, tradableIdentifier, currency); - - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - BitfloorOrderBook bitfloorOrderBook = bitfloor.getOrderBook(); - - return BitfloorAdapters.adaptOrders(bitfloorOrderBook, tradableIdentifier, currency); - - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(BitfloorUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - } - - @Override - public List getExchangeSymbols() { - - return BitfloorUtils.CURRENCY_PAIRS; - } - -} diff --git a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/trade/polling/BitfloorPollingTradeService.java b/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/trade/polling/BitfloorPollingTradeService.java deleted file mode 100644 index 831bef385..000000000 --- a/xchange-bitfloor/src/main/java/com/xeiam/xchange/bitfloor/service/trade/polling/BitfloorPollingTradeService.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.trade.polling; - -import static com.xeiam.xchange.dto.Order.OrderType.ASK; -import static com.xeiam.xchange.dto.Order.OrderType.BID; - -import java.util.ArrayList; -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.bitfloor.Bitfloor; -import com.xeiam.xchange.bitfloor.dto.Product; -import com.xeiam.xchange.bitfloor.dto.trade.BitfloorOrder; -import com.xeiam.xchange.bitfloor.dto.trade.NewOrderResult; -import com.xeiam.xchange.bitfloor.dto.trade.OrderCancelResult; -import com.xeiam.xchange.bitfloor.service.account.polling.BitfloorPollingService; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** @author Matija Mazi */ -public class BitfloorPollingTradeService extends BitfloorPollingService implements PollingTradeService { - - public BitfloorPollingTradeService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - } - - @Override - public OpenOrders getOpenOrders() { - - BitfloorOrder[] openOrders = bitfloor.getOpenOrders(exchangeSpecification.getApiKey(), bodyDigest, exchangeSpecification.getPassword(), Bitfloor.Version.v1, nextNonce()); - List orders = new ArrayList(); - for (BitfloorOrder oo : openOrders) { - orders.add(new LimitOrder(oo.getSide() == BitfloorOrder.Side.buy ? BID : ASK, oo.getSize(), "BTC", "USD", oo.getId(), BigMoney.of(CurrencyUnit.USD, oo.getPrice()))); - } - return new OpenOrders(orders); - } - - @Override - public String placeMarketOrder(MarketOrder marketOrder) { - - throw new NotAvailableFromExchangeException("Placing market orders not supported by Bitfloor API."); - } - - @Override - public String placeLimitOrder(LimitOrder limitOrder) { - - NewOrderResult ord = bitfloor.newOrder(exchangeSpecification.getApiKey(), bodyDigest, exchangeSpecification.getPassword(), Bitfloor.Version.v1, nextNonce(), limitOrder.getTradableAmount(), - limitOrder.getLimitPrice().getAmount(), limitOrder.getType() == BID ? BitfloorOrder.Side.buy : BitfloorOrder.Side.sell, Product.BTCUSD); - - return ord.getId(); - } - - @Override - public boolean cancelOrder(String orderId) { - - OrderCancelResult orderCancelResult = bitfloor.cancelOrder(exchangeSpecification.getApiKey(), bodyDigest, exchangeSpecification.getPassword(), Bitfloor.Version.v1, nextNonce(), orderId, - Product.BTCUSD); - return orderCancelResult.getOrderId() != null; - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/BitfloorAdapterTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/BitfloorAdapterTest.java deleted file mode 100644 index cb1c30e3c..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/BitfloorAdapterTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.Date; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.account.BitfloorBalance; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorDayInfo; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorOrderBook; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTicker; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTransaction; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; - -/** - * Tests the BitfloorAdapter class - */ -public class BitfloorAdapterTest { - - @Test - public void testAccountInfoAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BitfloorAdapterTest.class.getResourceAsStream("/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorBalance[] bitfloorBalance = mapper.readValue(is, BitfloorBalance[].class); - - AccountInfo accountInfo = BitfloorAdapters.adaptAccountInfo(bitfloorBalance, "Joe Mama"); - assertThat(accountInfo.getUsername(), is(equalTo("Joe Mama"))); - assertThat(accountInfo.getWallets().get(0).getCurrency(), is(equalTo("BTC"))); - assertThat(accountInfo.getWallets().get(0).getBalance(), is(equalTo(MoneyUtils.parse("BTC 0.350000000000000000000000")))); - assertThat(accountInfo.getWallets().get(1).getCurrency(), is(equalTo("USD"))); - assertThat(accountInfo.getWallets().get(1).getBalance(), is(equalTo(MoneyUtils.parse("USD 0.810345600000000000000000")))); - } - - @Test - public void testOrderBookAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BitfloorAdapterTest.class.getResourceAsStream("/marketdata/example-full-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorOrderBook bitfloorOrderBook = mapper.readValue(is, BitfloorOrderBook.class); - - OrderBook orderBook = BitfloorAdapters.adaptOrders(bitfloorOrderBook, "USD", "BTC"); - assertThat(orderBook.getBids().size(), is(equalTo(50))); - - // verify all fields filled - assertThat(orderBook.getBids().get(0).getLimitPrice().getAmount(), is(equalTo(new BigDecimal("27.35000000")))); - assertThat(orderBook.getBids().get(0).getType(), is(equalTo(OrderType.BID))); - assertThat(orderBook.getBids().get(0).getTradableAmount(), is(equalTo(new BigDecimal("837.27084000")))); - assertThat(orderBook.getBids().get(0).getTradableIdentifier(), is(equalTo("BTC"))); - assertThat(orderBook.getBids().get(0).getTransactionCurrency(), is(equalTo("USD"))); - - } - - @Test - public void testTradeAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BitfloorAdapterTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorTransaction[] transactions = mapper.readValue(is, BitfloorTransaction[].class); - - Trades trades = BitfloorAdapters.adaptTrades(transactions, "USD", "BTC"); - assertThat(trades.getTrades().size(), is(equalTo(100))); - - // verify all fields filled - Trade secondLastTrade = trades.getTrades().get(1); - assertThat(secondLastTrade.getType(), is(equalTo(null))); - assertThat(secondLastTrade.getTradableIdentifier(), is(equalTo("BTC"))); - assertThat(secondLastTrade.getTransactionCurrency(), is(equalTo("USD"))); - assertThat(secondLastTrade.getPrice(), is(equalTo(MoneyUtils.parse("USD 27.30000000")))); - assertThat(secondLastTrade.getTradableAmount(), is(equalTo(new BigDecimal("42.70000000")))); - assertThat(secondLastTrade.getTimestamp(), is(equalTo(new Date(1360964010711L)))); - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream tickerIn = BitfloorAdapterTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - InputStream dayInfoIn = BitfloorAdapterTest.class.getResourceAsStream("/marketdata/example-day-info-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorTicker bitfloorTicker = mapper.readValue(tickerIn, BitfloorTicker.class); - BitfloorDayInfo dayInfo = mapper.readValue(dayInfoIn, BitfloorDayInfo.class); - - Ticker ticker = BitfloorAdapters.adaptTicker(bitfloorTicker, dayInfo, "USD", "BTC"); - - assertThat(ticker.getLast(), is(equalTo(MoneyUtils.parse("USD 27.40000000")))); - assertThat(ticker.getVolume(), is(equalTo(new BigDecimal("524.7550799999987")))); - assertThat(ticker.getLow(), is(equalTo(MoneyUtils.parse("USD 26.67")))); - assertThat(ticker.getHigh(), is(equalTo(MoneyUtils.parse("USD 27.99")))); - - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/BitfloorDemoUtils.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/BitfloorDemoUtils.java deleted file mode 100644 index 0a1b95ace..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/BitfloorDemoUtils.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitfloor.BitfloorExchange; - -/** - * @author Matija Mazi
- */ -public class BitfloorDemoUtils { - - public static Exchange getExchange() { - - ExchangeSpecification exSpec = new BitfloorExchange().getDefaultExchangeSpecification(); - exSpec.setUserName("matijamazi@gmail.com"); - exSpec.setPassword("Api Key Pass Phrase"); - exSpec.setApiKey("e62a9ee0-aabf-4448-a883-8fbc835b02f4"); - exSpec.setSecretKey("OHxIzrtDrhmUAbkpGJiZXSLdOkDdhxaqQrwFhiUomWZXiUXgs2YFMxAJqmarJvjS3GpVUNFCBoB4iS1NSdML0Q=="); - - return ExchangeFactory.INSTANCE.createExchange(exSpec); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemo.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemo.java deleted file mode 100644 index 0d42d4dbf..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.account; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.bitfloor.examplecodearchive.BitfloorDemoUtils; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitfloor exchange with authentication
  • - *
  • View account balance
  • - *
  • Withdraw BTC to arbitrary address
  • - *
- */ -public class BitfloorAccountDemo { - - public static void main(String[] args) { - - Exchange bitfloor = BitfloorDemoUtils.getExchange(); - - PollingAccountService accountService = bitfloor.getPollingAccountService(); - - // Get the account information. - AccountInfo accountInfo = accountService.getAccountInfo(); - System.out.println("AccountInfo: " + accountInfo); - - // Withdraw some funds. - String withdrawResult = accountService.withdrawFunds(new BigDecimal("0.01"), "143LjDFoyZgzh7CJ46Sp4bJtgshX3KPcLj"); - System.out.println("withdrawResult = " + withdrawResult); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemoTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemoTest.java deleted file mode 100644 index 4b4c91582..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/account/BitfloorAccountDemoTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.account; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitfloor exchange with authentication
  • - *
  • View account balance
  • - *
  • Get the bitcoin deposit address
  • - *
- */ -@Category(OnlineTest.class) -public class BitfloorAccountDemoTest { - - @Test - public void testMain() throws Exception { - - BitfloorAccountDemo.main(new String[] {}); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/BitfloorTickerDemo.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/BitfloorTickerDemo.java deleted file mode 100644 index 0a7545d9e..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/BitfloorTickerDemo.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitfloor.BitfloorExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitfloor - */ -public class BitfloorTickerDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitfloor exchange API using default settings - Exchange bitfloor = ExchangeFactory.INSTANCE.createExchange(BitfloorExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitfloor.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to CAD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - - System.out.println("Last: " + ticker.getLast()); - System.out.println("Volume: " + ticker.getVolume()); - System.out.println("Low: " + ticker.getLow()); - System.out.println("High: " + ticker.getHigh()); - System.out.println("Timestamp: " + ticker.getTimestamp()); - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemo.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemo.java deleted file mode 100644 index 15511e025..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemo.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitfloor.BitfloorExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitfloor - */ -public class FullDepthDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitfloor exchange API using default settings - Exchange bitfloor = ExchangeFactory.INSTANCE.createExchange(BitfloorExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitfloor.getPollingMarketDataService(); - - // Get the latest order book data for BTC/CAD - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.USD); - - System.out.println("Current Order Book size for BTC / USD: " + (orderBook.getAsks().size() + orderBook.getBids().size())); - - System.out.println("First Ask: " + orderBook.getAsks().get(0).toString()); - System.out.println("First Bid: " + orderBook.getBids().get(0).toString()); - - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemoTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemoTest.java deleted file mode 100644 index 7cdf1256e..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/FullDepthDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at Bitfloor - */ -@Category(OnlineTest.class) -public class FullDepthDemoTest { - - @Test - public void testMain() throws Exception { - - FullDepthDemo.main(new String[] {}); - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TickerDemoTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TickerDemoTest.java deleted file mode 100644 index 69830175d..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TickerDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at Bitfloor - */ -@Category(OnlineTest.class) -public class TickerDemoTest { - - @Test - public void testMain() throws Exception { - - BitfloorTickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemo.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemo.java deleted file mode 100644 index 36685442b..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemo.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitfloor.BitfloorExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitfloor - */ -public class TradesDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitfloor exchange API using default settings - Exchange bitfloor = ExchangeFactory.INSTANCE.createExchange(BitfloorExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitfloor.getPollingMarketDataService(); - - // Get the latest trade data for BTC/CAD - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.USD); - - System.out.println(trades.toString()); - - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemoTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemoTest.java deleted file mode 100644 index 760973ef7..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/marketdata/TradesDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at Bitfloor - */ -@Category(OnlineTest.class) -public class TradesDemoTest { - - @Test - public void testMain() throws Exception { - - TradesDemo.main(new String[] {}); - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemo.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemo.java deleted file mode 100644 index 645162668..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemo.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.trade; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.bitfloor.examplecodearchive.BitfloorDemoUtils; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitfloor exchange with authentication
  • - *
  • Enter, review and cancel limit orders
  • - *
- */ -public class BitfloorTradeDemo { - - public static void main(String[] args) { - - Exchange bitfloor = BitfloorDemoUtils.getExchange(); - PollingTradeService tradeService = bitfloor.getPollingTradeService(); - - printOpenOrders(tradeService); - - // place a limit buy order - LimitOrder limitOrder = new LimitOrder((OrderType.ASK), new BigDecimal("0.01"), "BTC", "USD", MoneyUtils.parse("USD 1250")); - String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder); - System.out.println("Limit Order return value: " + limitOrderReturnValue); - - printOpenOrders(tradeService); - - // Cancel the added order - boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue); - System.out.println("Canceling returned " + cancelResult); - - printOpenOrders(tradeService); - } - - private static void printOpenOrders(PollingTradeService tradeService) { - - OpenOrders openOrders = tradeService.getOpenOrders(); - System.out.println("Open Orders: " + openOrders.toString()); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemoTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemoTest.java deleted file mode 100644 index f74c9c31b..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/examplecodearchive/trade/BitfloorTradeDemoTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.examplecodearchive.trade; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -@Category(OnlineTest.class) -public class BitfloorTradeDemoTest { - - @Test - public void testMain() throws Exception { - - BitfloorTradeDemo.main(new String[] {}); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/account/AccountInfoJSONTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/account/AccountInfoJSONTest.java deleted file mode 100644 index 49c137ae2..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/account/AccountInfoJSONTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.account; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.account.BitfloorBalance; - -/** - * Test Bitfloor Full Depth JSON parsing - */ -public class AccountInfoJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = AccountInfoJSONTest.class.getResourceAsStream("/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorBalance[] bitfloorBalances = mapper.readValue(is, BitfloorBalance[].class); - - BitfloorBalance secondBalance = bitfloorBalances[1]; - - // Verify that the example data was unmarshalled correctly - assertThat(secondBalance.getCurrency(), is(equalTo("USD"))); - assertThat(secondBalance.getAmount(), is(equalTo(new BigDecimal("0.810345600000000000000000")))); - assertThat(secondBalance.getHold(), is(equalTo(new BigDecimal("0.000000000000000000000000")))); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/FullDepthJSONTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/FullDepthJSONTest.java deleted file mode 100644 index ecdb799fe..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/FullDepthJSONTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorOrderBook; - -/** - * Test Bitfloor Full Depth JSON parsing - */ -public class FullDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FullDepthJSONTest.class.getResourceAsStream("/marketdata/example-full-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorOrderBook orderBook = mapper.readValue(is, BitfloorOrderBook.class); - - // Verify that the example data was unmarshalled correctly - assertThat(orderBook.getBids().get(1).get(0), is(equalTo(new BigDecimal("27.34000000")))); - assertThat(orderBook.getBids().get(1).get(1), is(equalTo(new BigDecimal("1.00000000")))); - assertThat(orderBook.getAsks().get(1).get(0), is(equalTo(new BigDecimal("27.42000000")))); - assertThat(orderBook.getAsks().get(1).get(1), is(equalTo(new BigDecimal("1.25668000")))); - assertThat(orderBook.getSeq(), is(equalTo(3062588L))); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TickerJSONTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TickerJSONTest.java deleted file mode 100644 index 7cae6584b..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TickerJSONTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.Date; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTicker; - -/** - * Test BitfloorTicker JSON parsing - */ -public class TickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - BitfloorTicker bitfloorTicker = mapper.readValue(is, BitfloorTicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Size value", bitfloorTicker.getSize(), is(equalTo(new BigDecimal("5.15358000")))); - assertThat("Unexpected Return Price value", bitfloorTicker.getPrice(), is(equalTo(new BigDecimal("27.40000000")))); - assertThat("Unexpected Return timestamp value", bitfloorTicker.getTimestamp(), is(equalTo(new Date(1361036134183L)))); - assertThat("Unexpected Return seq value", bitfloorTicker.getSeq(), is(equalTo(3061020L))); - } - -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TradesJSONTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TradesJSONTest.java deleted file mode 100644 index d9f9ba502..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/marketdata/TradesJSONTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.Date; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.marketdata.BitfloorTransaction; - -/** - * Test Transaction[] JSON parsing - */ -public class TradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorTransaction[] transactions = mapper.readValue(is, BitfloorTransaction[].class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Date value", transactions[1].getTimestamp(), is(equalTo(new Date(Math.round(1361059502.894661 * 1000))))); - assertThat("Unexpected Return tid value", transactions[1].getId(), is(equalTo("1c32f6171b4641999b42056f496ca5f6"))); - assertThat("Unexpected Return price value", transactions[1].getPrice(), is(equalTo(new BigDecimal("27.98000000")))); - assertThat("Unexpected Return amount value", transactions[1].getAmount(), is(equalTo(new BigDecimal("0.83995000")))); - - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/CancelOrderJSONTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/CancelOrderJSONTest.java deleted file mode 100644 index 89e72a84b..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/CancelOrderJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.trade; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Date; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.trade.OrderCancelResult; - -/** - * Test Transaction[] JSON parsing - */ -public class CancelOrderJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = CancelOrderJSONTest.class.getResourceAsStream("/trade/example-cancel-order.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - OrderCancelResult result = mapper.readValue(is, OrderCancelResult.class); - - assertThat("Unexpected cancel order result", result.getOrderId(), is("d4eac1d6-08f5-4d69-b99b-8605894e7b27")); - assertThat("Unexpected cancel order result", result.getTimestamp(), is(new Date(1361138650409L))); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/OpenOrdersJSONTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/OpenOrdersJSONTest.java deleted file mode 100644 index a64deee71..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/OpenOrdersJSONTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.trade; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.Product; -import com.xeiam.xchange.bitfloor.dto.trade.BitfloorOrder; - -/** - * Test Transaction[] JSON parsing - */ -public class OpenOrdersJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = OpenOrdersJSONTest.class.getResourceAsStream("/trade/example-openorders.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitfloorOrder[] orders = mapper.readValue(is, BitfloorOrder[].class); - - assertThat("Unexpected order list size", orders.length, is(2)); - - // Verify that the example data was unmarshalled correctly - BitfloorOrder secondOrder = orders[1]; - assertThat("Unexpected Return tid value", secondOrder.getId(), is(equalTo("3d8ae0e0-82cc-4a2e-a16d-9e1dc2c9e028"))); - assertThat("Unexpected Return price value", secondOrder.getPrice(), is(equalTo(new BigDecimal("1111.00000000")))); - assertThat("Unexpected Return amount value", secondOrder.getSize(), is(equalTo(new BigDecimal("0.10000000")))); - assertThat("Unexpected Return amount value", secondOrder.getProduct(), is(equalTo(Product.BTCUSD))); - assertThat("Unexpected Return amount value", secondOrder.getSide(), is(equalTo(BitfloorOrder.Side.sell))); - } -} diff --git a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/PlaceLimitOrderJSONTest.java b/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/PlaceLimitOrderJSONTest.java deleted file mode 100644 index 122c670ad..000000000 --- a/xchange-bitfloor/src/test/java/com/xeiam/xchange/bitfloor/service/trade/PlaceLimitOrderJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitfloor.service.trade; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Date; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitfloor.dto.trade.NewOrderResult; - -/** - * Test Transaction[] JSON parsing - */ -public class PlaceLimitOrderJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = PlaceLimitOrderJSONTest.class.getResourceAsStream("/trade/example-place-limit-order.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - NewOrderResult newOrder = mapper.readValue(is, NewOrderResult.class); - - assertThat("Unexpected new order id", newOrder.getId(), is("ddf52f1d-22c8-4806-818e-19bec74765b8")); - assertThat("Unexpected new order timestamp", newOrder.getTimestamp(), is(new Date(1361137785696L))); - } -} diff --git a/xchange-bitfloor/src/test/resources/account/example-accountinfo-data.json b/xchange-bitfloor/src/test/resources/account/example-accountinfo-data.json deleted file mode 100644 index c03caffd0..000000000 --- a/xchange-bitfloor/src/test/resources/account/example-accountinfo-data.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "currency": "BTC", - "amount": "0.350000000000000000000000", - "hold": "0.000000000000000000000000" - }, - { - "currency": "USD", - "amount": "0.810345600000000000000000", - "hold": "0.000000000000000000000000" - } -] diff --git a/xchange-bitfloor/src/test/resources/account/example-withdrawal-result.json b/xchange-bitfloor/src/test/resources/account/example-withdrawal-result.json deleted file mode 100644 index 0d53b2d1c..000000000 --- a/xchange-bitfloor/src/test/resources/account/example-withdrawal-result.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "timestamp": 1361138335.217352 -} diff --git a/xchange-bitfloor/src/test/resources/errors.json b/xchange-bitfloor/src/test/resources/errors.json deleted file mode 100644 index be960b67a..000000000 --- a/xchange-bitfloor/src/test/resources/errors.json +++ /dev/null @@ -1,4 +0,0 @@ -{"error": "Invalid username and/or password"} -{"error": "API access disabled. Check your user settings."} -{"error": {"__all__": ["You need $1.26 to open that order. You have only $0.0 available. Check your account balance for details."]}} -{"error": "Order not found"} diff --git a/xchange-bitfloor/src/test/resources/marketdata/example-day-info-data.json b/xchange-bitfloor/src/test/resources/marketdata/example-day-info-data.json deleted file mode 100644 index 77ddbdc0e..000000000 --- a/xchange-bitfloor/src/test/resources/marketdata/example-day-info-data.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "low": 26.67, - "high": 27.99, - "volume": 524.7550799999987 -} diff --git a/xchange-bitfloor/src/test/resources/marketdata/example-full-depth-data.json b/xchange-bitfloor/src/test/resources/marketdata/example-full-depth-data.json deleted file mode 100644 index 92aa1857b..000000000 --- a/xchange-bitfloor/src/test/resources/marketdata/example-full-depth-data.json +++ /dev/null @@ -1,407 +0,0 @@ -{ - "bids":[ - [ - "27.35000000", - "837.27084000" - ], - [ - "27.34000000", - "1.00000000" - ], - [ - "27.33000000", - "1.00000000" - ], - [ - "27.32000000", - "1.00000000" - ], - [ - "27.31000000", - "1.00000000" - ], - [ - "27.30000000", - "1.00000000" - ], - [ - "27.29000000", - "1.00000000" - ], - [ - "27.28000000", - "1.00000000" - ], - [ - "27.27000000", - "1.00000000" - ], - [ - "27.26000000", - "1.00000000" - ], - [ - "27.25000000", - "8.90000000" - ], - [ - "27.24000000", - "1.00000000" - ], - [ - "27.23000000", - "1.00000000" - ], - [ - "27.22000000", - "1.00000000" - ], - [ - "27.21000000", - "1.00000000" - ], - [ - "27.20000000", - "1.00000000" - ], - [ - "27.19000000", - "1.06839000" - ], - [ - "27.18000000", - "1.00000000" - ], - [ - "27.17000000", - "1.00000000" - ], - [ - "27.16000000", - "18.80000000" - ], - [ - "27.15000000", - "1.00000000" - ], - [ - "27.14000000", - "1.00000000" - ], - [ - "27.13000000", - "1.00000000" - ], - [ - "27.12000000", - "1.00000000" - ], - [ - "27.11000000", - "61.00000000" - ], - [ - "27.10000000", - "1.00000000" - ], - [ - "27.09000000", - "1.00000000" - ], - [ - "27.08000000", - "1.00000000" - ], - [ - "27.07000000", - "1.00000000" - ], - [ - "27.06000000", - "1.00000000" - ], - [ - "27.05000000", - "1.00000000" - ], - [ - "27.04000000", - "1.00000000" - ], - [ - "27.03000000", - "1.00000000" - ], - [ - "27.02000000", - "1.00000000" - ], - [ - "27.01000000", - "1.00000000" - ], - [ - "27.00000000", - "1.79688000" - ], - [ - "26.99000000", - "1.00000000" - ], - [ - "26.98000000", - "1.00000000" - ], - [ - "26.97000000", - "1.00000000" - ], - [ - "26.96000000", - "1.00000000" - ], - [ - "26.95000000", - "1.00000000" - ], - [ - "26.94000000", - "1.00000000" - ], - [ - "26.93000000", - "1.00000000" - ], - [ - "26.92000000", - "1.00000000" - ], - [ - "26.91000000", - "1.00000000" - ], - [ - "26.90000000", - "1.50000000" - ], - [ - "26.89000000", - "1.00000000" - ], - [ - "26.88000000", - "1.00000000" - ], - [ - "26.87000000", - "1.00000000" - ], - [ - "26.86000000", - "1.00000000" - ] - ], - "asks":[ - [ - "27.41000000", - "10.66800000" - ], - [ - "27.42000000", - "1.25668000" - ], - [ - "27.43000000", - "2.00000000" - ], - [ - "27.44000000", - "2.00000000" - ], - [ - "27.45000000", - "2.00000000" - ], - [ - "27.46000000", - "2.00000000" - ], - [ - "27.47000000", - "2.00000000" - ], - [ - "27.48000000", - "2.00000000" - ], - [ - "27.49000000", - "2.00000000" - ], - [ - "27.50000000", - "2.00000000" - ], - [ - "27.51000000", - "2.02000000" - ], - [ - "27.52000000", - "2.00000000" - ], - [ - "27.53000000", - "2.02000000" - ], - [ - "27.54000000", - "2.00000000" - ], - [ - "27.55000000", - "2.02000000" - ], - [ - "27.56000000", - "2.00000000" - ], - [ - "27.57000000", - "2.02000000" - ], - [ - "27.58000000", - "2.00000000" - ], - [ - "27.59000000", - "2.02000000" - ], - [ - "27.60000000", - "2.00000000" - ], - [ - "27.61000000", - "2.02000000" - ], - [ - "27.62000000", - "2.00000000" - ], - [ - "27.63000000", - "2.02000000" - ], - [ - "27.64000000", - "2.00000000" - ], - [ - "27.65000000", - "2.02000000" - ], - [ - "27.67000000", - "0.02000000" - ], - [ - "27.69000000", - "0.02000000" - ], - [ - "27.71000000", - "0.02000000" - ], - [ - "27.73000000", - "0.02000000" - ], - [ - "27.75000000", - "0.02000000" - ], - [ - "27.77000000", - "0.02000000" - ], - [ - "27.79000000", - "0.02000000" - ], - [ - "27.81000000", - "0.02000000" - ], - [ - "27.83000000", - "0.02000000" - ], - [ - "27.85000000", - "0.02000000" - ], - [ - "27.87000000", - "0.02000000" - ], - [ - "27.89000000", - "0.02000000" - ], - [ - "27.90000000", - "1.00000000" - ], - [ - "27.91000000", - "1.02000000" - ], - [ - "27.92000000", - "1.00000000" - ], - [ - "27.93000000", - "1.02000000" - ], - [ - "27.94000000", - "1.00000000" - ], - [ - "27.95000000", - "1.02000000" - ], - [ - "27.96000000", - "1.00000000" - ], - [ - "27.97000000", - "0.02000000" - ], - [ - "27.98000000", - "0.85174000" - ], - [ - "27.99000000", - "19.81675000" - ], - [ - "28.00000000", - "5.04000000" - ], - [ - "28.01000000", - "0.02000000" - ], - [ - "28.02000000", - "0.02000000" - ] - ], - "seq":3062588 -} diff --git a/xchange-bitfloor/src/test/resources/marketdata/example-ticker-data.json b/xchange-bitfloor/src/test/resources/marketdata/example-ticker-data.json deleted file mode 100644 index 8e3d985d4..000000000 --- a/xchange-bitfloor/src/test/resources/marketdata/example-ticker-data.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "size": "5.15358000", - "price": "27.40000000", - "timestamp": 1361036134.183366, - "seq": 3061020 -} diff --git a/xchange-bitfloor/src/test/resources/marketdata/example-trades-data.json b/xchange-bitfloor/src/test/resources/marketdata/example-trades-data.json deleted file mode 100644 index cfb85d7d3..000000000 --- a/xchange-bitfloor/src/test/resources/marketdata/example-trades-data.json +++ /dev/null @@ -1,902 +0,0 @@ -[ - { - "id":"e39af692dd3d4c6ebd54c14d29a2c87c", - "size":"6.19005000", - "price":"27.99000000", - "provider_side":1, - "seq":3061975, - "timestamp":1361059504.185111, - "product_id":1 - }, - { - "id":"1c32f6171b4641999b42056f496ca5f6", - "size":"0.83995000", - "price":"27.98000000", - "provider_side":1, - "seq":3061971, - "timestamp":1361059502.894661, - "product_id":1 - }, - { - "id":"3ee09168f6a949da8d16cd021dbafcd8", - "size":"0.02000000", - "price":"27.98000000", - "provider_side":1, - "seq":3061969, - "timestamp":1361059502.89453, - "product_id":1 - }, - { - "id":"8ec08c30724949829bb1e4c8ab7332b5", - "size":"0.02000000", - "price":"27.97000000", - "provider_side":1, - "seq":3061965, - "timestamp":1361059502.046035, - "product_id":1 - }, - { - "id":"52faec0c842f41ccbcd6b93d812aa476", - "size":"0.02000000", - "price":"27.96000000", - "provider_side":1, - "seq":3061961, - "timestamp":1361059501.382543, - "product_id":1 - }, - { - "id":"71533107ea4349a1a0f4590455954420", - "size":"1.00000000", - "price":"27.96000000", - "provider_side":1, - "seq":3061959, - "timestamp":1361059501.382413, - "product_id":1 - }, - { - "id":"3d7bd6c6261b404b890f439fbe4a9127", - "size":"0.02000000", - "price":"27.95000000", - "provider_side":1, - "seq":3061955, - "timestamp":1361059500.326543, - "product_id":1 - }, - { - "id":"1f5eaccd2fea4d0d9beb95d2dc06fe39", - "size":"10.00000000", - "price":"27.95000000", - "provider_side":1, - "seq":3061953, - "timestamp":1361059500.32644, - "product_id":1 - }, - { - "id":"2271098787f548c2a7f13c15c1a0ce35", - "size":"0.90000000", - "price":"27.95000000", - "provider_side":1, - "seq":3061951, - "timestamp":1361059500.326317, - "product_id":1 - }, - { - "id":"9c3e45b05e314ac088bd189b55d14ca1", - "size":"0.99000000", - "price":"27.95000000", - "provider_side":1, - "seq":3061949, - "timestamp":1361059500.326154, - "product_id":1 - }, - { - "id":"d855ad952750471b8235364c2fbc95c7", - "size":"0.01000000", - "price":"27.94000000", - "provider_side":0, - "seq":3061903, - "timestamp":1361055967.459314, - "product_id":1 - }, - { - "id":"032946c8e6fd4c318e71e3c3e3841aec", - "size":"0.01000000", - "price":"27.95000000", - "provider_side":1, - "seq":3061702, - "timestamp":1361055313.595294, - "product_id":1 - }, - { - "id":"5e3155c46ce54282908a89b2fd5d9a13", - "size":"0.40000000", - "price":"27.60000000", - "provider_side":1, - "seq":3061490, - "timestamp":1361053291.786762, - "product_id":1 - }, - { - "id":"6c7b7064b04e48509f21e51f842f3903", - "size":"0.02000000", - "price":"27.60000000", - "provider_side":1, - "seq":3061488, - "timestamp":1361053291.78662, - "product_id":1 - }, - { - "id":"b06e53e82cf14f48bb73c3db957dc5e3", - "size":"0.02000000", - "price":"27.59000000", - "provider_side":1, - "seq":3061484, - "timestamp":1361053105.750286, - "product_id":1 - }, - { - "id":"a47ebb2038054ffaa52f42c3416f6642", - "size":"0.02000000", - "price":"27.58000000", - "provider_side":1, - "seq":3061480, - "timestamp":1361053104.570752, - "product_id":1 - }, - { - "id":"9a68609ae9bf4485877eafee1258ab95", - "size":"0.02000000", - "price":"27.57000000", - "provider_side":1, - "seq":3061476, - "timestamp":1361053103.776761, - "product_id":1 - }, - { - "id":"d4921f3c09424c57bc85d6ad1700de4b", - "size":"0.02000000", - "price":"27.56000000", - "provider_side":1, - "seq":3061472, - "timestamp":1361053102.98105, - "product_id":1 - }, - { - "id":"9cd2f216c80a45c0bf81d2599656eb3b", - "size":"0.02000000", - "price":"27.55000000", - "provider_side":1, - "seq":3061468, - "timestamp":1361053102.345375, - "product_id":1 - }, - { - "id":"8af341204ff6485ea95be3151205040f", - "size":"0.02000000", - "price":"27.54000000", - "provider_side":1, - "seq":3061464, - "timestamp":1361053101.734917, - "product_id":1 - }, - { - "id":"6695b50ec7f74e5dae81787e9a205183", - "size":"0.02000000", - "price":"27.53000000", - "provider_side":1, - "seq":3061460, - "timestamp":1361053100.995665, - "product_id":1 - }, - { - "id":"691c5de735d64f9fb878f915bf84de7c", - "size":"0.02000000", - "price":"27.52000000", - "provider_side":1, - "seq":3061456, - "timestamp":1361053100.233832, - "product_id":1 - }, - { - "id":"b034ca818b8140fabbe7edc97423963f", - "size":"2.00000000", - "price":"27.51000000", - "provider_side":1, - "seq":3061452, - "timestamp":1361053099.571185, - "product_id":1 - }, - { - "id":"c805c1585fcb4563be99b838821ac421", - "size":"0.20000000", - "price":"27.51000000", - "provider_side":1, - "seq":3061450, - "timestamp":1361053099.571081, - "product_id":1 - }, - { - "id":"e21391e5ed3e4fae80f6c73868dc4fec", - "size":"0.02000000", - "price":"27.51000000", - "provider_side":1, - "seq":3061448, - "timestamp":1361053099.570959, - "product_id":1 - }, - { - "id":"5ebb3f1bce4646c5b5cb2af4f12fbab3", - "size":"0.02000000", - "price":"27.50000000", - "provider_side":1, - "seq":3061444, - "timestamp":1361053098.959685, - "product_id":1 - }, - { - "id":"073ba8f0e6d343bb853dab1614c10148", - "size":"7.90000000", - "price":"27.50000000", - "provider_side":1, - "seq":3061442, - "timestamp":1361053098.959565, - "product_id":1 - }, - { - "id":"5d6e469a90f8425898813ca2ed9991f9", - "size":"0.02000000", - "price":"27.49000000", - "provider_side":1, - "seq":3061438, - "timestamp":1361053098.238388, - "product_id":1 - }, - { - "id":"f6d57b641d7b496a9712298a21e5d421", - "size":"0.02000000", - "price":"27.48000000", - "provider_side":1, - "seq":3061434, - "timestamp":1361053097.551596, - "product_id":1 - }, - { - "id":"6e5f1d9201864604a2348ad49cfe37e2", - "size":"0.02000000", - "price":"27.47000000", - "provider_side":1, - "seq":3061430, - "timestamp":1361053096.842947, - "product_id":1 - }, - { - "id":"e3845d3e77814484a625046e52f7efb7", - "size":"0.02000000", - "price":"27.46000000", - "provider_side":1, - "seq":3061426, - "timestamp":1361053096.28189, - "product_id":1 - }, - { - "id":"137fd5eb94194d3eb84661cbb531719e", - "size":"0.02000000", - "price":"27.45000000", - "provider_side":1, - "seq":3061421, - "timestamp":1361052967.023318, - "product_id":1 - }, - { - "id":"e01805da0674437988c58755537fb1d8", - "size":"0.02000000", - "price":"27.44000000", - "provider_side":1, - "seq":3061416, - "timestamp":1361052923.880393, - "product_id":1 - }, - { - "id":"34005888217c44b28b894dfe25934876", - "size":"0.02000000", - "price":"27.43000000", - "provider_side":1, - "seq":3061411, - "timestamp":1361052693.91975, - "product_id":1 - }, - { - "id":"060292aad1db4fecbe4a30cd8a3148f1", - "size":"0.02000000", - "price":"27.42000000", - "provider_side":1, - "seq":3061402, - "timestamp":1361051908.148498, - "product_id":1 - }, - { - "id":"33bd195b0c2a452d873b4c5c727c49b5", - "size":"1.12000000", - "price":"27.41000000", - "provider_side":1, - "seq":3061391, - "timestamp":1361051702.155399, - "product_id":1 - }, - { - "id":"4ba6dea0e7a2491ea942d79327fb6374", - "size":"0.02000000", - "price":"27.41000000", - "provider_side":1, - "seq":3061341, - "timestamp":1361051144.147873, - "product_id":1 - }, - { - "id":"b19408d3bf0d440a8fdc55fe1db32c6b", - "size":"5.00000000", - "price":"27.37000000", - "provider_side":0, - "seq":3061315, - "timestamp":1361050555.838582, - "product_id":1 - }, - { - "id":"55e2f1aa97644e0da11c92548ef136a0", - "size":"0.02000000", - "price":"27.38000000", - "provider_side":1, - "seq":3061310, - "timestamp":1361050334.191028, - "product_id":1 - }, - { - "id":"080f4fe4e81345e7bd054adc2e15a2e5", - "size":"5.00000000", - "price":"27.37000000", - "provider_side":0, - "seq":3061255, - "timestamp":1361048385.841532, - "product_id":1 - }, - { - "id":"2f2d4408788b47a39733d453227212f1", - "size":"0.02000000", - "price":"27.35000000", - "provider_side":1, - "seq":3061224, - "timestamp":1361047933.252341, - "product_id":1 - }, - { - "id":"0eb388cae08b48c9900f9a3bd3477dd3", - "size":"50.00000000", - "price":"27.40000000", - "provider_side":1, - "seq":3061199, - "timestamp":1361047754.163251, - "product_id":1 - }, - { - "id":"04fff49625af4d8bb3ad7820a7bcb602", - "size":"3.48852000", - "price":"27.40000000", - "provider_side":1, - "seq":3061196, - "timestamp":1361047754.163061, - "product_id":1 - }, - { - "id":"ab3030a5517e476a8d75c177d2d44d2a", - "size":"5.00000000", - "price":"27.39000000", - "provider_side":0, - "seq":3061159, - "timestamp":1361047500.223541, - "product_id":1 - }, - { - "id":"cdbc68f3c2d746f4a12491be486156bb", - "size":"8.72400000", - "price":"27.29000000", - "provider_side":1, - "seq":3061093, - "timestamp":1361047158.203557, - "product_id":1 - }, - { - "id":"e475cb33f8d74b31a715b800f559d35b", - "size":"0.40000000", - "price":"27.29000000", - "provider_side":1, - "seq":3061070, - "timestamp":1361043900.58693, - "product_id":1 - }, - { - "id":"fd7e91121c064050906f2e33033b8a70", - "size":"0.02815000", - "price":"27.24000000", - "provider_side":1, - "seq":3061053, - "timestamp":1361041865.596367, - "product_id":1 - }, - { - "id":"ddb4f833d7884058aa779a1621286111", - "size":"5.55779000", - "price":"27.24000000", - "provider_side":1, - "seq":3061050, - "timestamp":1361041835.463379, - "product_id":1 - }, - { - "id":"6e0421571a9d4738985e6c0168c47d98", - "size":"3.65644000", - "price":"27.24000000", - "provider_side":1, - "seq":3061046, - "timestamp":1361040725.69722, - "product_id":1 - }, - { - "id":"1365704e515140c59c0af581e16129e4", - "size":"1.81754000", - "price":"27.40000000", - "provider_side":1, - "seq":3061041, - "timestamp":1361040189.692913, - "product_id":1 - }, - { - "id":"bc01f511956a4e4599113f5d47ca9fac", - "size":"4.00000000", - "price":"27.23000000", - "provider_side":1, - "seq":3061037, - "timestamp":1361039641.641828, - "product_id":1 - }, - { - "id":"f019f5312bd24fc490b2687dd5be80a6", - "size":"1.00000000", - "price":"27.23000000", - "provider_side":0, - "seq":3061030, - "timestamp":1361038502.125955, - "product_id":1 - }, - { - "id":"15a61abea3564c4b8de86a615033511a", - "size":"5.15358000", - "price":"27.40000000", - "provider_side":1, - "seq":3061020, - "timestamp":1361036134.183366, - "product_id":1 - }, - { - "id":"9d0c4747ef9240c2acfb6339b637d327", - "size":"0.02000000", - "price":"27.39000000", - "provider_side":1, - "seq":3061016, - "timestamp":1361036133.691279, - "product_id":1 - }, - { - "id":"2406513b4cd44e078243b542321e5a91", - "size":"0.02000000", - "price":"27.38000000", - "provider_side":1, - "seq":3061012, - "timestamp":1361036132.877316, - "product_id":1 - }, - { - "id":"ba19a075638048f99a0ac4ab0e981745", - "size":"0.02000000", - "price":"27.37000000", - "provider_side":1, - "seq":3061008, - "timestamp":1361036132.525152, - "product_id":1 - }, - { - "id":"1e57c39d6f384a9382434278806de9ce", - "size":"0.02000000", - "price":"27.36000000", - "provider_side":1, - "seq":3061004, - "timestamp":1361036132.028677, - "product_id":1 - }, - { - "id":"f020690cd8064b238c5ecef8e5ec7e3b", - "size":"0.02000000", - "price":"27.35000000", - "provider_side":1, - "seq":3061000, - "timestamp":1361036130.934528, - "product_id":1 - }, - { - "id":"c4a857baa0244b84a30e2618324f0481", - "size":"0.02000000", - "price":"27.34000000", - "provider_side":1, - "seq":3060996, - "timestamp":1361036130.162053, - "product_id":1 - }, - { - "id":"7075699d143143889ebdbc4355ecdc18", - "size":"0.02000000", - "price":"27.33000000", - "provider_side":1, - "seq":3060992, - "timestamp":1361036129.767166, - "product_id":1 - }, - { - "id":"7a7ed742450b4997a45a53fa382bd23e", - "size":"0.02000000", - "price":"27.32000000", - "provider_side":1, - "seq":3060988, - "timestamp":1361036128.683979, - "product_id":1 - }, - { - "id":"9217f407d1b142b5aec8355b3fcbe706", - "size":"0.02000000", - "price":"27.31000000", - "provider_side":1, - "seq":3060984, - "timestamp":1361036127.653683, - "product_id":1 - }, - { - "id":"0847b866455a461faff46f6694d1f17c", - "size":"0.02000000", - "price":"27.30000000", - "provider_side":1, - "seq":3060980, - "timestamp":1361036126.942722, - "product_id":1 - }, - { - "id":"451d579385c849d6a5a30f8b08af72de", - "size":"0.02000000", - "price":"27.29000000", - "provider_side":1, - "seq":3060976, - "timestamp":1361036126.485034, - "product_id":1 - }, - { - "id":"4fb0a352ddba4f388a02778dc99b410d", - "size":"2.00000000", - "price":"27.27000000", - "provider_side":1, - "seq":3060972, - "timestamp":1361036125.989919, - "product_id":1 - }, - { - "id":"1924b4b7a4604aeeb01cde32009220e2", - "size":"1.74605000", - "price":"27.25000000", - "provider_side":1, - "seq":3060968, - "timestamp":1361036125.289901, - "product_id":1 - }, - { - "id":"ff6ccdab52ab43549ae785c029a40a85", - "size":"0.02100000", - "price":"27.24000000", - "provider_side":0, - "seq":3060963, - "timestamp":1361031729.927669, - "product_id":1 - }, - { - "id":"42e1cb3b27494c9ea4387a89d27b048d", - "size":"0.25395000", - "price":"27.25000000", - "provider_side":1, - "seq":3060937, - "timestamp":1361026248.904979, - "product_id":1 - }, - { - "id":"95c66d70ff9d40d1afe7e8f5ff11d3f0", - "size":"0.97900000", - "price":"27.24000000", - "provider_side":0, - "seq":3060924, - "timestamp":1361023736.382675, - "product_id":1 - }, - { - "id":"4d48bcf2ba9c42049e44125f2a0ef363", - "size":"1.00000000", - "price":"27.25000000", - "provider_side":0, - "seq":3060919, - "timestamp":1361023708.524334, - "product_id":1 - }, - { - "id":"7f87bffd42684007b6ce8896f32b4e7d", - "size":"1.00000000", - "price":"27.26000000", - "provider_side":0, - "seq":3060914, - "timestamp":1361023700.476707, - "product_id":1 - }, - { - "id":"feee80cdb9814bea98681e276557d8a2", - "size":"1.00000000", - "price":"27.27000000", - "provider_side":0, - "seq":3060909, - "timestamp":1361023692.449459, - "product_id":1 - }, - { - "id":"dc55e9cbf94a4597a959cde4f8d2d4ee", - "size":"1.00000000", - "price":"27.28000000", - "provider_side":0, - "seq":3060876, - "timestamp":1361013936.891937, - "product_id":1 - }, - { - "id":"04f03540a62b426d83b7aa1f5018ca1d", - "size":"0.02000000", - "price":"27.03000000", - "provider_side":1, - "seq":3060468, - "timestamp":1361009805.231706, - "product_id":1 - }, - { - "id":"551f476dcefb45ddb16e3b25cbb76f58", - "size":"0.02000000", - "price":"27.01000000", - "provider_side":1, - "seq":3060439, - "timestamp":1361008713.791587, - "product_id":1 - }, - { - "id":"25492ddb2efd4007aec784ea0f236bdf", - "size":"0.02000000", - "price":"27.00000000", - "provider_side":0, - "seq":3060427, - "timestamp":1361008051.879414, - "product_id":1 - }, - { - "id":"7f6f3b61b40940e28ae72879d79f9cef", - "size":"0.08500000", - "price":"27.19000000", - "provider_side":0, - "seq":3060365, - "timestamp":1361007887.275291, - "product_id":1 - }, - { - "id":"28ac1887ecdf47e3a051c7a48138708c", - "size":"2.50000000", - "price":"27.39000000", - "provider_side":0, - "seq":3060299, - "timestamp":1361005913.98818, - "product_id":1 - }, - { - "id":"eeb267645cb445998b884d2c7a0ca414", - "size":"0.72701000", - "price":"27.40000000", - "provider_side":1, - "seq":3060296, - "timestamp":1361003511.237774, - "product_id":1 - }, - { - "id":"b757556afea84f4c95140d31faae8e75", - "size":"1.00000000", - "price":"27.39000000", - "provider_side":0, - "seq":3060293, - "timestamp":1361002513.692462, - "product_id":1 - }, - { - "id":"53b1e1fa0e0c43459452a2fff45594ff", - "size":"5.00000000", - "price":"27.40000000", - "provider_side":1, - "seq":3060290, - "timestamp":1361000486.111296, - "product_id":1 - }, - { - "id":"022b972fc47a4c409109f27362e2def5", - "size":"1.83300000", - "price":"27.39000000", - "provider_side":0, - "seq":3060286, - "timestamp":1360997927.901121, - "product_id":1 - }, - { - "id":"880cb56cf82243b6861987fdaa46fb4f", - "size":"20.00000000", - "price":"27.40000000", - "provider_side":1, - "seq":3060283, - "timestamp":1360994037.612205, - "product_id":1 - }, - { - "id":"01ec41db75e9470e99f751e9cbe3865f", - "size":"0.38600000", - "price":"27.39000000", - "provider_side":0, - "seq":3060280, - "timestamp":1360991410.631402, - "product_id":1 - }, - { - "id":"f3db51c50ae24793b2655a1bf654f5d9", - "size":"13.81335000", - "price":"27.40000000", - "provider_side":1, - "seq":3060275, - "timestamp":1360982882.231058, - "product_id":1 - }, - { - "id":"24bbccd9390d486fa250934f0e7a50b2", - "size":"0.45600000", - "price":"27.30000000", - "provider_side":1, - "seq":3060108, - "timestamp":1360980354.653242, - "product_id":1 - }, - { - "id":"9f4d2620ec4b4d19a8f42052ef1d0860", - "size":"13.14321000", - "price":"27.30000000", - "provider_side":1, - "seq":3060106, - "timestamp":1360980354.653121, - "product_id":1 - }, - { - "id":"165af0f38dd7407d9a3dee7e5cd58863", - "size":"36.00360000", - "price":"27.29000000", - "provider_side":0, - "seq":3060103, - "timestamp":1360980342.384935, - "product_id":1 - }, - { - "id":"62ee66f7223b411faa9d6a4d03c5f5cb", - "size":"1.00000000", - "price":"27.29000000", - "provider_side":0, - "seq":3060101, - "timestamp":1360980342.384783, - "product_id":1 - }, - { - "id":"635b4407e1c64183a2943d51b675ed14", - "size":"100.00000000", - "price":"27.30000000", - "provider_side":1, - "seq":3060095, - "timestamp":1360979946.293318, - "product_id":1 - }, - { - "id":"962c18be37ca47eba66a2d4f136423e7", - "size":"0.34300000", - "price":"27.29000000", - "provider_side":0, - "seq":3060069, - "timestamp":1360976064.603187, - "product_id":1 - }, - { - "id":"c42dd80d199e4b5690cdac6ae76c33f1", - "size":"4.91500000", - "price":"27.19000000", - "provider_side":1, - "seq":3060014, - "timestamp":1360974906.806534, - "product_id":1 - }, - { - "id":"2fc14a4c7ad5447b8deefd502c92bc85", - "size":"6.86679000", - "price":"27.30000000", - "provider_side":1, - "seq":3059925, - "timestamp":1360969040.307962, - "product_id":1 - }, - { - "id":"4d4a3d26e28141e3804845d63e409971", - "size":"7.19303000", - "price":"27.30000000", - "provider_side":1, - "seq":3059923, - "timestamp":1360969040.307816, - "product_id":1 - }, - { - "id":"1743e08ecdb54f829bd38387250aded7", - "size":"0.53500000", - "price":"27.24000000", - "provider_side":1, - "seq":3059919, - "timestamp":1360969039.753566, - "product_id":1 - }, - { - "id":"aed147d18a32414c85c22bbdd3094a44", - "size":"2.37000000", - "price":"27.24000000", - "provider_side":1, - "seq":3059900, - "timestamp":1360967687.591107, - "product_id":1 - }, - { - "id":"aea7bce7830e4f57ad8e92685d5664dc", - "size":"3.24279000", - "price":"27.25000000", - "provider_side":1, - "seq":3059872, - "timestamp":1360966194.358258, - "product_id":1 - }, - { - "id":"6436fd620fb44156a94c02128bea59a7", - "size":"50.00000000", - "price":"27.30000000", - "provider_side":1, - "seq":3059854, - "timestamp":1360964523.857583, - "product_id":1 - }, - { - "id":"6d7850f7ae924995902f81edfb996ea2", - "size":"42.70000000", - "price":"27.30000000", - "provider_side":1, - "seq":3059842, - "timestamp":1360964010.711221, - "product_id":1 - }, - { - "id":"74de51eb3b76404b80a51824d5fd1b7e", - "size":"23.59300000", - "price":"27.30000000", - "provider_side":1, - "seq":3059839, - "timestamp":1360963893.287772, - "product_id":1 - } -] diff --git a/xchange-bitfloor/src/test/resources/trade/example-cancel-order.json b/xchange-bitfloor/src/test/resources/trade/example-cancel-order.json deleted file mode 100644 index a1b564230..000000000 --- a/xchange-bitfloor/src/test/resources/trade/example-cancel-order.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "order_id": "d4eac1d6-08f5-4d69-b99b-8605894e7b27", - "timestamp": 1361138650.409028 -} diff --git a/xchange-bitfloor/src/test/resources/trade/example-openorders.json b/xchange-bitfloor/src/test/resources/trade/example-openorders.json deleted file mode 100644 index 5072bbd23..000000000 --- a/xchange-bitfloor/src/test/resources/trade/example-openorders.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "order_id":"9e3d62af-085e-4b99-9216-f5d578a78c04", - "side":0, - "size":"0.10000000", - "price":"1.10000000", - "product_id":1, - "timestamp":"1361138747.485257" - }, - { - "order_id":"3d8ae0e0-82cc-4a2e-a16d-9e1dc2c9e028", - "side":1, - "size":"0.10000000", - "price":"1111.00000000", - "product_id":1, - "timestamp":"1361138757.893590" - } -] diff --git a/xchange-bitfloor/src/test/resources/trade/example-place-limit-order.json b/xchange-bitfloor/src/test/resources/trade/example-place-limit-order.json deleted file mode 100644 index 51aa945bf..000000000 --- a/xchange-bitfloor/src/test/resources/trade/example-place-limit-order.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "order_id": "ddf52f1d-22c8-4806-818e-19bec74765b8", - "timestamp": 1361137785.696198 -} diff --git a/xchange-bitstamp/api-specification.txt b/xchange-bitstamp/api-specification.txt deleted file mode 100644 index 49457bda6..000000000 --- a/xchange-bitstamp/api-specification.txt +++ /dev/null @@ -1,21 +0,0 @@ -Bitstamp Exchange API specification -================================ - -Public API - -Documentation -------------- -https://www.bitstamp.net/api/ - -Ticker ------- -https://www.bitstamp.net/api/ticker/ - -Orders ------- -https://www.bitstamp.net/api/order_book/ - -Trades ------- -https://www.bitstamp.net/api/transactions/ - diff --git a/xchange-bitstamp/pom.xml b/xchange-bitstamp/pom.xml deleted file mode 100644 index c072e899b..000000000 --- a/xchange-bitstamp/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-bitstamp - - Bitstamp Exchange - XChange implementation for the Bitstamp Exchange - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - - \ No newline at end of file diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitStamp.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitStamp.java deleted file mode 100644 index 81cdd92d2..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitStamp.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp; - -import java.math.BigDecimal; - -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; - -import com.xeiam.xchange.bitstamp.dto.account.BitstampBalance; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampOrderBook; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTicker; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTransaction; -import com.xeiam.xchange.bitstamp.dto.trade.BitstampOrder; -import com.xeiam.xchange.bitstamp.dto.trade.BitstampUserTransaction; - -/** - * @author Matija Mazi See https://www.bitstamp.net/api/ for up-to-date docs. - */ -@Path("api") -@Produces("application/json") -public interface BitStamp { - - /** - * Returns "bids" and "asks". Each is a list of open orders and each order is represented as a list of price and amount. - */ - @GET - @Path("order_book/") - @Produces("application/json") - public BitstampOrderBook getOrderBook(); - - @GET - @Path("ticker/") - @Produces("application/json") - public BitstampTicker getTicker(); - - /** - * Returns descending list of transactions. - */ - @GET - @Path("transactions/") - @Produces("application/json") - public BitstampTransaction[] getTransactions(); - - /** @return true if order has been canceled. */ - @POST - @Path("cancel_order/") - @Produces("application/json") - public Object cancelOrder(@FormParam("user") String user, @FormParam("password") String password, @FormParam("id") int orderId); - - @POST - @Path("balance/") - @Produces("application/json") - public BitstampBalance getBalance(@FormParam("user") String user, @FormParam("password") String password); - - @POST - @Path("user_transactions/") - @Produces("application/json") - public BitstampUserTransaction[] getUserTransactions(@FormParam("user") String user, @FormParam("password") String password, @QueryParam("timedelta") long timedeltaSec); - - @POST - @Path("user_transactions/") - @Produces("application/json") - public BitstampUserTransaction[] getUserTransactions(@FormParam("user") String user, @FormParam("password") String password); - - @POST - @Path("open_orders/") - @Produces("application/json") - public BitstampOrder[] getOpenOrders(@FormParam("user") String user, @FormParam("password") String password); - - /** buy limit order */ - @POST - @Path("buy/") - @Produces("application/json") - public BitstampOrder buy(@FormParam("user") String user, @FormParam("password") String password, @FormParam("amount") BigDecimal amount, @FormParam("price") BigDecimal price); - - /** sell limit order */ - @POST - @Path("sell/") - @Produces("application/json") - public BitstampOrder sell(@FormParam("user") String user, @FormParam("password") String password, @FormParam("amount") BigDecimal amount, @FormParam("price") BigDecimal price); - - @POST - @Path("bitcoin_deposit_address/") - @Produces("application/json") - public String getBitcoinDepositAddress(@FormParam("user") String user, @FormParam("password") String password); - - @POST - @Path("bitcoin_withdrawal/") - @Produces("application/json") - public Object withdrawBitcoin(@FormParam("user") String user, @FormParam("password") String password, @FormParam("amount") BigDecimal amount, @FormParam("address") String address); - - // TODO: bitstamp code handling, send to user -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampAdapters.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampAdapters.java deleted file mode 100644 index 73b18c838..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampAdapters.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp; - -import java.math.BigDecimal; -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -import com.xeiam.xchange.bitstamp.dto.account.BitstampBalance; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampOrderBook; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTicker; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTransaction; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.Wallet; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Various adapters for converting from Bitstamp DTOs to XChange DTOs - */ -public final class BitstampAdapters { - - /** - * private Constructor - */ - private BitstampAdapters() { - - } - - /** - * Adapts a BitstampBalance to a AccountInfo - * - * @param bitstampBalance The Bitstamp balance - * @param userName The user name - * @return The account info - */ - public static AccountInfo adaptAccountInfo(BitstampBalance bitstampBalance, String userName) { - - // Adapt to XChange DTOs - Wallet usdWallet = Wallet.createInstance(Currencies.USD, bitstampBalance.getUsdBalance()); - Wallet btcWallet = Wallet.createInstance(Currencies.BTC, bitstampBalance.getBtcBalance()); - - return new AccountInfo(userName, Arrays.asList(usdWallet, btcWallet)); - } - - /** - * Adapts a com.xeiam.xchange.bitstamp.api.model.OrderBook to a OrderBook Object - * - * @param bitstampOrderBook The bitstamp order book - * @param tradableIdentifier The tradeable identifier (e.g. BTC in BTC/USD) - * @param currency The currency (e.g. USD in BTC/USD) - * @return The XChange OrderBook - */ - public static OrderBook adaptOrders(BitstampOrderBook bitstampOrderBook, String tradableIdentifier, String currency) { - - List asks = createOrders(tradableIdentifier, currency, Order.OrderType.ASK, bitstampOrderBook.getAsks()); - List bids = createOrders(tradableIdentifier, currency, Order.OrderType.BID, bitstampOrderBook.getBids()); - return new OrderBook(asks, bids); - } - - private static List createOrders(String tradableIdentifier, String currency, Order.OrderType orderType, List> orders) { - - List limitOrders = new ArrayList(); - for (List ask : orders) { - checkArgument(ask.size() == 2, "Expected a pair (price, amount) but got {0} elements.", ask.size()); - limitOrders.add(createOrder(tradableIdentifier, currency, ask, orderType)); - } - return limitOrders; - } - - private static LimitOrder createOrder(String tradableIdentifier, String currency, List priceAndAmount, Order.OrderType orderType) { - - return new LimitOrder(orderType, priceAndAmount.get(1), tradableIdentifier, currency, BigMoney.of(CurrencyUnit.USD, priceAndAmount.get(0))); - } - - private static void checkArgument(boolean argument, String msgPattern, Object... msgArgs) { - - if (!argument) { - throw new IllegalArgumentException(MessageFormat.format(msgPattern, msgArgs)); - } - } - - /** - * Adapts a Transaction[] to a Trades Object - * - * @param transactions The Bitstamp transactions - * @param tradableIdentifier The tradeable identifier (e.g. BTC in BTC/USD) - * @param currency The currency (e.g. USD in BTC/USD) - * @return The XChange Trades - */ - public static Trades adaptTrades(BitstampTransaction[] transactions, String tradableIdentifier, String currency) { - - List trades = new ArrayList(); - for (BitstampTransaction tx : transactions) { - trades.add(new Trade(null, tx.getAmount(), tradableIdentifier, currency, BigMoney.of(CurrencyUnit.of(currency), tx.getPrice()), DateUtils.fromMillisUtc(tx.getDate() * 1000L))); - } - - return new Trades(trades); - } - - /** - * Adapts a BitstampTicker to a Ticker Object - * - * @param bitstampTicker The exchange specific ticker - * @param tradableIdentifier The tradeable identifier (e.g. BTC in BTC/USD) - * @param currency The currency (e.g. USD in BTC/USD) - * @return The ticker - */ - public static Ticker adaptTicker(BitstampTicker bitstampTicker, String tradableIdentifier, String currency) { - - BigMoney last = MoneyUtils.parse(currency + " " + bitstampTicker.getLast()); - BigMoney bid = MoneyUtils.parse(currency + " " + bitstampTicker.getBid()); - BigMoney ask = MoneyUtils.parse(currency + " " + bitstampTicker.getAsk()); - BigMoney high = MoneyUtils.parse(currency + " " + bitstampTicker.getHigh()); - BigMoney low = MoneyUtils.parse(currency + " " + bitstampTicker.getLow()); - BigDecimal volume = bitstampTicker.getVolume(); - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withBid(bid).withAsk(ask).withHigh(high).withLow(low).withVolume(volume).build(); - - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampExchange.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampExchange.java deleted file mode 100644 index 982a6c023..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampExchange.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitstamp.service.account.polling.BitstampPollingAccountService; -import com.xeiam.xchange.bitstamp.service.marketdata.polling.BitstampPollingMarketDataService; -import com.xeiam.xchange.bitstamp.service.trade.polling.BitstampPollingTradeService; - -/** - * @author Matija Mazi - */ -public class BitstampExchange extends BaseExchange implements Exchange { - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://www.bitstamp.net"); - exchangeSpecification.setHost("www.bitstamp.net"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("Bitstamp"); - exchangeSpecification.setExchangeDescription("Bitstamp is a Bitcoin exchange registered in Slovenia."); - return exchangeSpecification; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new BitstampPollingMarketDataService(exchangeSpecification); - this.pollingTradeService = new BitstampPollingTradeService(exchangeSpecification); - this.pollingAccountService = new BitstampPollingAccountService(exchangeSpecification); - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampUtils.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampUtils.java deleted file mode 100644 index c6c0ab856..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/BitstampUtils.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * Copyright (C) 2013 Matija Mazi - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.Date; -import java.util.List; - -import com.xeiam.xchange.ExchangeException; -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared Bitstamp properties - */ -public final class BitstampUtils { - - private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - - /** - * private Constructor - */ - private BitstampUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - CurrencyPair.BTC_USD - - ); - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - - /** - * Format a date String for Bitstamp - * - * @param dateString - * @return - */ - public static Date parseDate(String dateString) { - - try { - return DATE_FORMAT.parse(dateString); - } catch (ParseException e) { - throw new ExchangeException("Illegal date/time format", e); - } - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/account/BitstampBalance.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/account/BitstampBalance.java deleted file mode 100644 index a1e4b574e..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/account/BitstampBalance.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.dto.account; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitstampBalance { - - private final BigDecimal usdBalance; - private final BigDecimal btcBalance; - private final BigDecimal usdReserved; - private final BigDecimal btcReserved; - private final BigDecimal usdAvailable; - private final BigDecimal btcAvailable; - private final BigDecimal fee; - private final String error; - - /** - * Constructor - * - * @param usdBalance - * @param btcBalance - * @param usdReserved - * @param btcReserved - * @param usdAvailable - * @param btcAvailable - * @param fee - */ - public BitstampBalance(@JsonProperty("usd_balance") BigDecimal usdBalance, @JsonProperty("btc_balance") BigDecimal btcBalance, @JsonProperty("usd_reserved") BigDecimal usdReserved, - @JsonProperty("btc_reserved") BigDecimal btcReserved, @JsonProperty("usd_available") BigDecimal usdAvailable, @JsonProperty("btc_available") BigDecimal btcAvailable, - @JsonProperty("fee") BigDecimal fee, @JsonProperty("error") String error) { - - this.usdBalance = usdBalance; - this.btcBalance = btcBalance; - this.usdReserved = usdReserved; - this.btcReserved = btcReserved; - this.usdAvailable = usdAvailable; - this.btcAvailable = btcAvailable; - this.fee = fee; - this.error = error; - } - - public BigDecimal getUsdBalance() { - - return usdBalance; - } - - public BigDecimal getBtcBalance() { - - return btcBalance; - } - - public BigDecimal getUsdReserved() { - - return usdReserved; - } - - public BigDecimal getBtcReserved() { - - return btcReserved; - } - - public BigDecimal getUsdAvailable() { - - return usdAvailable; - } - - public BigDecimal getBtcAvailable() { - - return btcAvailable; - } - - public BigDecimal getFee() { - - return fee; - } - - public String getError() { - - return error; - } - - @Override - public String toString() { - - return String.format("Balance{usdBalance=%s, btcBalance=%s, usdReserved=%s, btcReserved=%s, usdAvailable=%s, btcAvailable=%s, fee=%s}", usdBalance, btcBalance, usdReserved, btcReserved, - usdAvailable, btcAvailable, fee); - } -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampOrderBook.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampOrderBook.java deleted file mode 100644 index 8e5eaae26..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampOrderBook.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitstampOrderBook { - - private final List> bids; - private final List> asks; - - /** - * Constructor - * - * @param bids - * @param asks - */ - public BitstampOrderBook(@JsonProperty("bids") List> bids, @JsonProperty("asks") List> asks) { - - this.bids = bids; - this.asks = asks; - } - - /** (price, amount) */ - public List> getBids() { - - return bids; - } - - /** (price, amount) */ - public List> getAsks() { - - return asks; - } - - @Override - public String toString() { - - return String.format("OrderBook{bids=%s, asks=%s}", bids, asks); - } -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTicker.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTicker.java deleted file mode 100644 index b890a4003..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTicker.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitstampTicker { - - private final BigDecimal last; - private final BigDecimal high; - private final BigDecimal low; - private final BigDecimal volume; - private final BigDecimal bid; - private final BigDecimal ask; - - /** - * Constructor - * - * @param last - * @param high - * @param low - * @param volume - * @param bid - * @param ask - */ - public BitstampTicker(@JsonProperty("last") BigDecimal last, @JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("volume") BigDecimal volume, - @JsonProperty("bid") BigDecimal bid, @JsonProperty("ask") BigDecimal ask) { - - this.last = last; - this.high = high; - this.low = low; - this.volume = volume; - this.bid = bid; - this.ask = ask; - } - - public BigDecimal getLast() { - - return last; - } - - public BigDecimal getHigh() { - - return high; - } - - public BigDecimal getLow() { - - return low; - } - - public BigDecimal getVolume() { - - return volume; - } - - public BigDecimal getBid() { - - return bid; - } - - public BigDecimal getAsk() { - - return ask; - } - - @Override - public String toString() { - - return "BitstampTicker [last=" + last + ", high=" + high + ", low=" + low + ", volume=" + volume + ", bid=" + bid + ", ask=" + ask + "]"; - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTransaction.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTransaction.java deleted file mode 100644 index f0d74241d..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/marketdata/BitstampTransaction.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class BitstampTransaction { - - private final long date; - private final int tid; - private final BigDecimal price; - private final BigDecimal amount; - - /** - * Constructor - * - * @param date Unix timestamp date and time - * @param tid Transaction id - * @param price BTC price - * @param amount BTC amount - */ - public BitstampTransaction(@JsonProperty("date") long date, @JsonProperty("tid") int tid, @JsonProperty("price") BigDecimal price, @JsonProperty("amount") BigDecimal amount) { - - this.date = date; - this.tid = tid; - this.price = price; - this.amount = amount; - } - - public int getTid() { - - return tid; - } - - public BigDecimal getPrice() { - - return price; - } - - public BigDecimal getAmount() { - - return amount; - } - - public long getDate() { - - return date; - } - - public BigDecimal calculateFeeBtc() { - - return roundUp(amount.multiply(new BigDecimal(.5))).divide(new BigDecimal(100.)); - } - - private BigDecimal roundUp(BigDecimal x) { - - long n = x.longValue(); - return new BigDecimal(x.equals(new BigDecimal(n)) ? n : n + 1); - } - - public BigDecimal calculateFeeUsd() { - - return calculateFeeBtc().multiply(price); - } - - @Override - public String toString() { - - return "Transaction [date=" + date + ", tid=" + tid + ", price=" + price + ", amount=" + amount + "]"; - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampOrder.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampOrder.java deleted file mode 100644 index 6281ee50e..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampOrder.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.dto.trade; - -import java.math.BigDecimal; -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.bitstamp.BitstampUtils; - -/** - * @author Matija Mazi - */ -public final class BitstampOrder { - - private final int id; - private final String datetime; - /** 0 - buy (bid); 1 - sell (ask) */ - private final int type; - private final BigDecimal price; - private final BigDecimal amount; - - /** - * Constructor - * - * @param id - * @param datetime - * @param type - * @param price - * @param amount - */ - public BitstampOrder(@JsonProperty("id") int id, @JsonProperty("datetime") String datetime, @JsonProperty("type") int type, @JsonProperty("price") BigDecimal price, - @JsonProperty("amount") BigDecimal amount) { - - this.id = id; - this.datetime = datetime; - this.type = type; - this.price = price; - this.amount = amount; - } - - public String getDatetime() { - - return datetime; - } - - public int getId() { - - return id; - } - - public int getType() { - - return type; - } - - public BigDecimal getPrice() { - - return price; - } - - public BigDecimal getAmount() { - - return amount; - } - - @JsonIgnore - public Date getTime() { - - return BitstampUtils.parseDate(getDatetime()); - } - - @Override - public String toString() { - - return String.format("Order{id=%s, datetime=%s, type=%s, price=%s, amount=%s}", id, datetime, type, price, amount); - } -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampUserTransaction.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampUserTransaction.java deleted file mode 100644 index b92a09811..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/dto/trade/BitstampUserTransaction.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.dto.trade; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.xeiam.xchange.bitstamp.util.BitstampTransactionTypeDeserializer; - -/** - * @author Matija Mazi - */ -public final class BitstampUserTransaction { - - private final String datetime; - private final long id; - private final TransactionType type; - private final BigDecimal usd; - private final BigDecimal btc; - private final BigDecimal fee; - - /** - * Constructor - * - * @param datetime - * @param id - * @param type - * @param usd - * @param btc - * @param fee - */ - public BitstampUserTransaction(@JsonProperty("datetime") String datetime, @JsonProperty("id") long id, - @JsonProperty("type") @JsonDeserialize(using = BitstampTransactionTypeDeserializer.class) TransactionType type, @JsonProperty("usd") BigDecimal usd, @JsonProperty("btc") BigDecimal btc, - @JsonProperty("fee") BigDecimal fee) { - - this.datetime = datetime; - this.id = id; - this.type = type; - this.usd = usd; - this.btc = btc; - this.fee = fee; - } - - public String getDatetime() { - - return datetime; - } - - public long getId() { - - return id; - } - - public TransactionType getType() { - - return type; - } - - public boolean isDeposit() { - - return type == TransactionType.deposit; - } - - public boolean isWithdrawal() { - - return type == TransactionType.withdrawal; - } - - public boolean isMarketTrade() { - - return type == TransactionType.trade; - } - - public BigDecimal getUsd() { - - return usd; - } - - public BigDecimal getBtc() { - - return btc; - } - - public BigDecimal getFee() { - - return fee; - } - - @Override - public String toString() { - - return String.format("UserTransaction{datetime=%s, id=%d, type=%s, usd=%s, btc=%s, fee=%s}", datetime, id, type, usd, btc, fee); - } - - public enum TransactionType { - deposit, withdrawal, trade - } -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/account/polling/BitstampPollingAccountService.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/account/polling/BitstampPollingAccountService.java deleted file mode 100644 index 0782a1dcd..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/account/polling/BitstampPollingAccountService.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.account.polling; - -import java.math.BigDecimal; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeException; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitstamp.BitStamp; -import com.xeiam.xchange.bitstamp.BitstampAdapters; -import com.xeiam.xchange.bitstamp.dto.account.BitstampBalance; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.service.account.polling.PollingAccountService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; - -/** - * @author Matija Mazi - */ -public class BitstampPollingAccountService extends BasePollingExchangeService implements PollingAccountService { - - private BitStamp bitstamp; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BitstampPollingAccountService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitstamp = RestProxyFactory.createProxy(BitStamp.class, exchangeSpecification.getSslUri()); - } - - @Override - public AccountInfo getAccountInfo() { - - BitstampBalance bitstampBalance = bitstamp.getBalance(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - if (bitstampBalance.getError() != null) { - throw new ExchangeException("Error getting balance. " + bitstampBalance.getError()); - } - - return BitstampAdapters.adaptAccountInfo(bitstampBalance, exchangeSpecification.getUserName()); - } - - @Override - public String withdrawFunds(BigDecimal amount, String address) { - - return bitstamp.withdrawBitcoin(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), amount, address).toString(); - } - - /** - * This returns the currently set deposit address. It will not generate a new address (ie. repeated calls will return the same address). - */ - @Override - public String requestBitcoinDepositAddress(final String... arguments) { - - return bitstamp.getBitcoinDepositAddress(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/marketdata/polling/BitstampPollingMarketDataService.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/marketdata/polling/BitstampPollingMarketDataService.java deleted file mode 100644 index 6f960a820..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/marketdata/polling/BitstampPollingMarketDataService.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.bitstamp.BitStamp; -import com.xeiam.xchange.bitstamp.BitstampAdapters; -import com.xeiam.xchange.bitstamp.BitstampUtils; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampOrderBook; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTicker; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTransaction; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - * @author Matija Mazi - */ -public class BitstampPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService { - - private final BitStamp bitstamp; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BitstampPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitstamp = RestProxyFactory.createProxy(BitStamp.class, exchangeSpecification.getSslUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - BitstampTicker bitstampTicker = bitstamp.getTicker(); - - return BitstampAdapters.adaptTicker(bitstampTicker, tradableIdentifier, currency); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - - BitstampTransaction[] transactions = bitstamp.getTransactions(); - - return BitstampAdapters.adaptTrades(transactions, tradableIdentifier, currency); - - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - BitstampOrderBook bitstampOrderBook = bitstamp.getOrderBook(); - - return BitstampAdapters.adaptOrders(bitstampOrderBook, tradableIdentifier, currency); - - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(BitstampUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - } - - @Override - public List getExchangeSymbols() { - - return BitstampUtils.CURRENCY_PAIRS; - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/trade/polling/BitstampPollingTradeService.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/trade/polling/BitstampPollingTradeService.java deleted file mode 100644 index 7d33a5e92..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/service/trade/polling/BitstampPollingTradeService.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.trade.polling; - -import static com.xeiam.xchange.dto.Order.OrderType.ASK; -import static com.xeiam.xchange.dto.Order.OrderType.BID; - -import java.util.ArrayList; -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.bitstamp.BitStamp; -import com.xeiam.xchange.bitstamp.dto.trade.BitstampOrder; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * @author Matija Mazi - */ -public class BitstampPollingTradeService extends BasePollingExchangeService implements PollingTradeService { - - private BitStamp bitstamp; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BitstampPollingTradeService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.bitstamp = RestProxyFactory.createProxy(BitStamp.class, exchangeSpecification.getSslUri()); - } - - @Override - public OpenOrders getOpenOrders() { - - BitstampOrder[] openOrders = bitstamp.getOpenOrders(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - List orders = new ArrayList(); - for (BitstampOrder oo : openOrders) { - orders.add(new LimitOrder(oo.getType() == 0 ? BID : ASK, oo.getAmount(), "BTC", "USD", Integer.toString(oo.getId()), BigMoney.of(CurrencyUnit.USD, oo.getPrice()))); - } - return new OpenOrders(orders); - } - - @Override - public String placeMarketOrder(MarketOrder marketOrder) { - - throw new NotAvailableFromExchangeException("Placing market orders not supported by Bitstamp API."); - } - - @Override - public String placeLimitOrder(LimitOrder limitOrder) { - - BitstampOrder ord; - if (limitOrder.getType() == BID) { - ord = bitstamp.buy(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), limitOrder.getTradableAmount(), limitOrder.getLimitPrice().getAmount()); - } else { - ord = bitstamp.sell(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), limitOrder.getTradableAmount(), limitOrder.getLimitPrice().getAmount()); - } - return Integer.toString(ord.getId()); - } - - @Override - public boolean cancelOrder(String orderId) { - - return bitstamp.cancelOrder(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), Integer.parseInt(orderId)).equals(true); - } - -} diff --git a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/util/BitstampTransactionTypeDeserializer.java b/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/util/BitstampTransactionTypeDeserializer.java deleted file mode 100644 index e688b8123..000000000 --- a/xchange-bitstamp/src/main/java/com/xeiam/xchange/bitstamp/util/BitstampTransactionTypeDeserializer.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xeiam.xchange.bitstamp.util; - -import com.xeiam.xchange.bitstamp.dto.trade.BitstampUserTransaction; -import com.xeiam.xchange.utils.jackson.EnumIntDeserializer; - -/** - * @author Matija Mazi
- * @created 3/2/13 12:28 PM - */ -public class BitstampTransactionTypeDeserializer extends EnumIntDeserializer { - - public BitstampTransactionTypeDeserializer() { - - super(BitstampUserTransaction.TransactionType.class); - } -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/BitstampAdapterTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/BitstampAdapterTest.java deleted file mode 100644 index e8ed478a5..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/BitstampAdapterTest.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitstamp.dto.account.BitstampBalance; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampOrderBook; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTicker; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTransaction; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; - -/** - * Tests the BitstampAdapter class - */ -public class BitstampAdapterTest { - - @Test - public void testAccountInfoAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BitstampAdapterTest.class.getResourceAsStream("/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampBalance bitstampBalance = mapper.readValue(is, BitstampBalance.class); - - AccountInfo accountInfo = BitstampAdapters.adaptAccountInfo(bitstampBalance, "Joe Mama"); - assertThat(accountInfo.getUsername(), is(equalTo("Joe Mama"))); - assertThat(accountInfo.getWallets().get(0).getCurrency(), is(equalTo("USD"))); - assertThat(accountInfo.getWallets().get(0).getBalance(), is(equalTo(MoneyUtils.parse("USD 172.87")))); - assertThat(accountInfo.getWallets().get(1).getCurrency(), is(equalTo("BTC"))); - assertThat(accountInfo.getWallets().get(1).getBalance(), is(equalTo(MoneyUtils.parse("BTC 6.99990000")))); - } - - @Test - public void testOrderBookAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BitstampAdapterTest.class.getResourceAsStream("/marketdata/example-full-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampOrderBook bitstampOrderBook = mapper.readValue(is, BitstampOrderBook.class); - - OrderBook orderBook = BitstampAdapters.adaptOrders(bitstampOrderBook, "BTC", "USD"); - assertThat(orderBook.getBids().size(), is(equalTo(107))); - - // verify all fields filled - assertThat(orderBook.getBids().get(0).getLimitPrice().getAmount(), is(equalTo(new BigDecimal("13.07")))); - assertThat(orderBook.getBids().get(0).getType(), is(equalTo(OrderType.BID))); - assertThat(orderBook.getBids().get(0).getTradableAmount(), is(equalTo(new BigDecimal("7.43517000")))); - assertThat(orderBook.getBids().get(0).getTradableIdentifier(), is(equalTo("BTC"))); - assertThat(orderBook.getBids().get(0).getTransactionCurrency(), is(equalTo("USD"))); - - } - - @Test - public void testTradeAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BitstampAdapterTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampTransaction[] transactions = mapper.readValue(is, BitstampTransaction[].class); - - Trades trades = BitstampAdapters.adaptTrades(transactions, "BTC", "USD"); - assertThat(trades.getTrades().size(), is(equalTo(125))); - - // verify all fields filled - assertThat(trades.getTrades().get(0).getPrice(), is(equalTo(MoneyUtils.parse("USD 13.14")))); - assertThat(trades.getTrades().get(0).getType(), is(equalTo(null))); - assertThat(trades.getTrades().get(0).getTradableAmount(), is(equalTo(new BigDecimal("10.11643836")))); - assertThat(trades.getTrades().get(0).getTradableIdentifier(), is(equalTo("BTC"))); - assertThat(trades.getTrades().get(0).getTransactionCurrency(), is(equalTo("USD"))); - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BitstampAdapterTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampTicker bitstampTicker = mapper.readValue(is, BitstampTicker.class); - - Ticker ticker = BitstampAdapters.adaptTicker(bitstampTicker, "BTC", "USD"); - - assertThat(ticker.getLast(), is(equalTo(MoneyUtils.parse("USD 13.06")))); - assertThat(ticker.getBid(), is(equalTo(MoneyUtils.parse("USD 13.06")))); - assertThat(ticker.getAsk(), is(equalTo(MoneyUtils.parse("USD 13.14")))); - assertThat(ticker.getVolume(), is(equalTo(new BigDecimal("1127.55649327")))); - - } -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/account/AccountInfoJSONTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/account/AccountInfoJSONTest.java deleted file mode 100644 index 5321d0ffd..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/account/AccountInfoJSONTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.account; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitstamp.dto.account.BitstampBalance; - -/** - * Test BitStamp Full Depth JSON parsing - */ -public class AccountInfoJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = AccountInfoJSONTest.class.getResourceAsStream("/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampBalance bitstampBalance = mapper.readValue(is, BitstampBalance.class); - - // Verify that the example data was unmarshalled correctly - assertThat(bitstampBalance.getBtcAvailable(), is(equalTo(new BigDecimal("6.99990000")))); - assertThat(bitstampBalance.getBtcReserved(), is(equalTo(new BigDecimal("0")))); - assertThat(bitstampBalance.getBtcBalance(), is(equalTo(new BigDecimal("6.99990000")))); - assertThat(bitstampBalance.getUsdAvailable(), is(equalTo(new BigDecimal("0.00")))); - assertThat(bitstampBalance.getUsdBalance(), is(equalTo(new BigDecimal("172.87")))); - assertThat(bitstampBalance.getUsdReserved(), is(equalTo(new BigDecimal("172.87")))); - assertThat(bitstampBalance.getFee(), is(equalTo(new BigDecimal("0.5000")))); - } -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/FullDepthJSONTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/FullDepthJSONTest.java deleted file mode 100644 index e967b8440..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/FullDepthJSONTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampOrderBook; - -/** - * Test BitStamp Full Depth JSON parsing - */ -public class FullDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FullDepthJSONTest.class.getResourceAsStream("/marketdata/example-full-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampOrderBook orderBook = mapper.readValue(is, BitstampOrderBook.class); - - // Verify that the example data was unmarshalled correctly - assertThat(orderBook.getBids().get(0).get(0), is(equalTo(new BigDecimal("13.07")))); - assertThat(orderBook.getBids().get(0).get(1), is(equalTo(new BigDecimal("7.43517000")))); - assertThat(orderBook.getAsks().get(0).get(0), is(equalTo(new BigDecimal("13.15")))); - assertThat(orderBook.getAsks().get(0).get(1), is(equalTo(new BigDecimal("843.29085332")))); - } -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TickerJSONTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TickerJSONTest.java deleted file mode 100644 index 47c8065f8..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TickerJSONTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTicker; - -/** - * Test BitstampTicker JSON parsing - */ -public class TickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - BitstampTicker bitstampTicker = mapper.readValue(is, BitstampTicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Last value", bitstampTicker.getLast(), is(equalTo(new BigDecimal("13.06")))); - assertThat("Unexpected Return High value", bitstampTicker.getHigh(), is(equalTo(new BigDecimal("13.15")))); - assertThat("Unexpected Return Low value", bitstampTicker.getLow(), is(equalTo(new BigDecimal("13.03")))); - assertThat("Unexpected Return Volume value", bitstampTicker.getVolume(), is(equalTo(new BigDecimal("1127.55649327")))); - assertThat("Unexpected Return Bid value", bitstampTicker.getBid(), is(equalTo(new BigDecimal("13.06")))); - assertThat("Unexpected Return Ask value", bitstampTicker.getAsk(), is(equalTo(new BigDecimal("13.14")))); - } - -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TradesJSONTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TradesJSONTest.java deleted file mode 100644 index d231ba3fd..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/marketdata/TradesJSONTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitstamp.dto.marketdata.BitstampTransaction; - -/** - * Test Transaction[] JSON parsing - */ -public class TradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampTransaction[] transactions = mapper.readValue(is, BitstampTransaction[].class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Date value", transactions[0].getDate(), is(equalTo(1357492264L))); - assertThat("Unexpected Return tid value", transactions[0].getTid(), is(equalTo(122260))); - assertThat("Unexpected Return price value", transactions[0].getPrice(), is(equalTo(new BigDecimal("13.06")))); - assertThat("Unexpected Return amount value", transactions[0].getAmount(), is(equalTo(new BigDecimal("28.75328052")))); - - } -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/CancelOrderJSONTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/CancelOrderJSONTest.java deleted file mode 100644 index 57f819a73..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/CancelOrderJSONTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.trade; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; - -/** - * Test Transaction[] JSON parsing - */ -public class CancelOrderJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = CancelOrderJSONTest.class.getResourceAsStream("/trade/example-cancel-order.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - Boolean result = mapper.readValue(is, Boolean.class); - - assertThat("Unexpected cancel order result", result, is(true)); - } -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/OpenOrdersJSONTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/OpenOrdersJSONTest.java deleted file mode 100644 index 473e5504c..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/OpenOrdersJSONTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.trade; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitstamp.dto.trade.BitstampOrder; - -/** - * Test Transaction[] JSON parsing - */ -public class OpenOrdersJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = OpenOrdersJSONTest.class.getResourceAsStream("/trade/example-openorders.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampOrder[] orders = mapper.readValue(is, BitstampOrder[].class); - - assertThat("Unexpected order list size", orders.length, is(4)); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return tid value", orders[1].getId(), is(equalTo(1262468))); - assertThat("Unexpected Return price value", orders[1].getPrice(), is(equalTo(new BigDecimal("12.15")))); - assertThat("Unexpected Return amount value", orders[1].getAmount(), is(equalTo(new BigDecimal("3.00000000")))); - - } -} diff --git a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/PlaceLimitOrderJSONTest.java b/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/PlaceLimitOrderJSONTest.java deleted file mode 100644 index 2a0e942f0..000000000 --- a/xchange-bitstamp/src/test/java/com/xeiam/xchange/bitstamp/service/trade/PlaceLimitOrderJSONTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.bitstamp.service.trade; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.bitstamp.dto.trade.BitstampOrder; - -/** - * Test Transaction[] JSON parsing - */ -public class PlaceLimitOrderJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = PlaceLimitOrderJSONTest.class.getResourceAsStream("/trade/example-place-limit-order.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BitstampOrder newOrder = mapper.readValue(is, BitstampOrder.class); - - assertThat("Unexpected new order id", newOrder.getId(), is(1273070)); - assertThat("Unexpected new order amount", newOrder.getAmount(), is(BigDecimal.ONE)); - assertThat("Unexpected new order price", newOrder.getPrice(), is(new BigDecimal("1.25"))); - assertThat("Unexpected new order type", newOrder.getType(), is(0)); - } -} diff --git a/xchange-bitstamp/src/test/resources/account/example-accountinfo-data.json b/xchange-bitstamp/src/test/resources/account/example-accountinfo-data.json deleted file mode 100644 index 0e10d53f8..000000000 --- a/xchange-bitstamp/src/test/resources/account/example-accountinfo-data.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "btc_reserved":"0", - "fee":"0.5000", - "btc_available":"6.99990000", - "usd_reserved":"172.87", - "btc_balance":"6.99990000", - "usd_balance":"172.87", - "usd_available":"0.00" -} \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/account/example-deposit-response.json b/xchange-bitstamp/src/test/resources/account/example-deposit-response.json deleted file mode 100644 index 1a3e95d84..000000000 --- a/xchange-bitstamp/src/test/resources/account/example-deposit-response.json +++ /dev/null @@ -1 +0,0 @@ -"183HpFEGWvc14wqaxoJ1CWaB5zNyGeRiw" \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/errors.json b/xchange-bitstamp/src/test/resources/errors.json deleted file mode 100644 index be960b67a..000000000 --- a/xchange-bitstamp/src/test/resources/errors.json +++ /dev/null @@ -1,4 +0,0 @@ -{"error": "Invalid username and/or password"} -{"error": "API access disabled. Check your user settings."} -{"error": {"__all__": ["You need $1.26 to open that order. You have only $0.0 available. Check your account balance for details."]}} -{"error": "Order not found"} diff --git a/xchange-bitstamp/src/test/resources/marketdata/example-full-depth-data.json b/xchange-bitstamp/src/test/resources/marketdata/example-full-depth-data.json deleted file mode 100644 index 3c5afe58b..000000000 --- a/xchange-bitstamp/src/test/resources/marketdata/example-full-depth-data.json +++ /dev/null @@ -1,670 +0,0 @@ -{ - "bids":[ - [ - "13.07", - "7.43517000" - ], - [ - "13.06", - "19.31224948" - ], - [ - "13.05", - "2.00000000" - ], - [ - "13.04", - "5.00000000" - ], - [ - "13.03", - "2.19186493" - ], - [ - "13.02", - "338.68020789" - ], - [ - "13.01", - "171.19907764" - ], - [ - "13.00", - "207.65210001" - ], - [ - "12.99", - "10.00000000" - ], - [ - "12.95", - "50.00000000" - ], - [ - "12.93", - "11.52720710" - ], - [ - "12.91", - "245.00000000" - ], - [ - "12.90", - "20.58837403" - ], - [ - "12.86", - "1.00000000" - ], - [ - "12.84", - "9.02237000" - ], - [ - "12.81", - "75.90000000" - ], - [ - "12.80", - "0.62000000" - ], - [ - "12.79", - "400.00000000" - ], - [ - "12.75", - "8.29000000" - ], - [ - "12.74", - "10.00000000" - ], - [ - "12.73", - "6.56343023" - ], - [ - "12.71", - "1.00000000" - ], - [ - "12.70", - "129.54029573" - ], - [ - "12.67", - "2.25946981" - ], - [ - "12.63", - "4.00000000" - ], - [ - "12.62", - "2.12698529" - ], - [ - "12.61", - "10.90000000" - ], - [ - "12.60", - "10.00000000" - ], - [ - "12.55", - "1.10996016" - ], - [ - "12.52", - "0.30000000" - ], - [ - "12.51", - "94.00000000" - ], - [ - "12.50", - "10.00000000" - ], - [ - "12.44", - "15.34078000" - ], - [ - "12.43", - "104.00000000" - ], - [ - "12.41", - "19.90000000" - ], - [ - "12.40", - "10.00000000" - ], - [ - "12.39", - "10.00000000" - ], - [ - "12.38", - "30.00000000" - ], - [ - "12.36", - "10.00000000" - ], - [ - "12.30", - "10.00000000" - ], - [ - "12.28", - "10.00000000" - ], - [ - "12.21", - "9.90000000" - ], - [ - "12.20", - "20.75462132" - ], - [ - "12.17", - "20.00000000" - ], - [ - "12.15", - "3.00000000" - ], - [ - "12.11", - "1.00000000" - ], - [ - "12.10", - "105.00000000" - ], - [ - "12.09", - "31.88579404" - ], - [ - "12.01", - "9.90000000" - ], - [ - "12.00", - "20.12733334" - ], - [ - "11.92", - "10.00000000" - ], - [ - "11.75", - "10.00000000" - ], - [ - "11.74", - "1.00000000" - ], - [ - "11.72", - "3.39000000" - ], - [ - "11.71", - "15.00000000" - ], - [ - "11.51", - "1.00000000" - ], - [ - "11.50", - "30.00000000" - ], - [ - "11.44", - "0.10000000" - ], - [ - "11.43", - "200.00000000" - ], - [ - "11.33", - "5.00000000" - ], - [ - "11.32", - "15.20000000" - ], - [ - "11.22", - "1.04030038" - ], - [ - "11.09", - "0.96495931" - ], - [ - "11.07", - "0.35019000" - ], - [ - "11.01", - "1.00000000" - ], - [ - "11.00", - "14.00000000" - ], - [ - "10.91", - "10.00000000" - ], - [ - "10.90", - "1.00000000" - ], - [ - "10.80", - "20.00000000" - ], - [ - "10.79", - "1.56590000" - ], - [ - "10.59", - "10.00000000" - ], - [ - "10.51", - "1.00000000" - ], - [ - "10.50", - "10.00000000" - ], - [ - "10.32", - "38.00000000" - ], - [ - "10.30", - "18.00000000" - ], - [ - "10.20", - "1.93529412" - ], - [ - "10.14", - "25.00000000" - ], - [ - "10.02", - "49.27944112" - ], - [ - "10.01", - "1.00000000" - ], - [ - "10.00", - "16.50000000" - ], - [ - "9.00", - "15.00000000" - ], - [ - "8.50", - "5.00000000" - ], - [ - "8.20", - "17.11000000" - ], - [ - "8.11", - "35.00000000" - ], - [ - "8.05", - "40.50000000" - ], - [ - "8.00", - "15.00000000" - ], - [ - "7.44", - "2.00000000" - ], - [ - "7.30", - "14.00000000" - ], - [ - "7.00", - "25.00000000" - ], - [ - "6.38", - "19.66000000" - ], - [ - "6.08", - "0.70000000" - ], - [ - "6.02", - "0.20000000" - ], - [ - "6.00", - "21.00000000" - ], - [ - "5.35", - "10.00000000" - ], - [ - "5.30", - "10.00000000" - ], - [ - "5.25", - "10.00000000" - ], - [ - "5.00", - "28.00000000" - ], - [ - "4.34", - "30.40000000" - ], - [ - "4.00", - "25.00000000" - ], - [ - "3.00", - "33.00000000" - ], - [ - "2.20", - "1.00000000" - ], - [ - "2.00", - "80.00000000" - ], - [ - "0.88", - "14.00000000" - ], - [ - "0.50", - "100.00000000" - ], - [ - "0.35", - "100.00000000" - ], - [ - "0.10", - "10.00000000" - ], - [ - "0.02", - "1000.00000000" - ] - ], - "asks":[ - [ - "13.15", - "843.29085332" - ], - [ - "13.17", - "43.49404373" - ], - [ - "13.18", - "16.34872470" - ], - [ - "13.19", - "7.60122230" - ], - [ - "13.22", - "103.53257827" - ], - [ - "13.25", - "327.09209012" - ], - [ - "13.26", - "527.53067525" - ], - [ - "13.27", - "45.99472804" - ], - [ - "13.28", - "568.28206851" - ], - [ - "13.29", - "305.87954039" - ], - [ - "13.30", - "266.47327869" - ], - [ - "13.31", - "67.33498746" - ], - [ - "13.32", - "44.34972931" - ], - [ - "13.37", - "7.60657000" - ], - [ - "13.39", - "29.69824444" - ], - [ - "13.40", - "29.30965178" - ], - [ - "13.41", - "10.33583128" - ], - [ - "13.42", - "9.04894125" - ], - [ - "13.43", - "0.39385380" - ], - [ - "13.44", - "8.04972000" - ], - [ - "13.45", - "60.16578428" - ], - [ - "13.47", - "0.10000000" - ], - [ - "13.48", - "50.41781010" - ], - [ - "13.49", - "358.88281116" - ], - [ - "13.50", - "10.00000000" - ], - [ - "13.51", - "10.70415930" - ], - [ - "13.52", - "201.67124040" - ], - [ - "13.57", - "0.10000000" - ], - [ - "13.59", - "50.00000000" - ], - [ - "13.62", - "43.38680000" - ], - [ - "13.65", - "98.37932506" - ], - [ - "13.67", - "0.10000000" - ], - [ - "13.69", - "59.68428000" - ], - [ - "13.70", - "205.67922831" - ], - [ - "13.74", - "77.80831484" - ], - [ - "13.77", - "0.10000000" - ], - [ - "13.79", - "50.00000000" - ], - [ - "13.85", - "10.00000000" - ], - [ - "13.89", - "50.00000000" - ], - [ - "13.90", - "20.00000000" - ], - [ - "13.95", - "10.00000000" - ], - [ - "13.99", - "98.82925696" - ], - [ - "14.00", - "122.01000000" - ], - [ - "14.04", - "12.32483000" - ], - [ - "14.18", - "0.83000000" - ], - [ - "14.20", - "10.00000000" - ], - [ - "14.30", - "30.01301685" - ], - [ - "14.47", - "0.82000000" - ], - [ - "14.49", - "375.51424531" - ], - [ - "14.50", - "580.19939805" - ], - [ - "14.63", - "16.49005000" - ], - [ - "14.75", - "5.00000000" - ], - [ - "14.99", - "342.76959121" - ], - [ - "15.00", - "49.60765547" - ], - [ - "15.81", - "1.16002000" - ], - [ - "15.90", - "5.00000000" - ], - [ - "30.00", - "0.86000000" - ], - [ - "99.90", - "0.10000000" - ], - [ - "159.15", - "0.63105865" - ] - ] -} \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/marketdata/example-ticker-data.json b/xchange-bitstamp/src/test/resources/marketdata/example-ticker-data.json deleted file mode 100644 index 7afddb116..000000000 --- a/xchange-bitstamp/src/test/resources/marketdata/example-ticker-data.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "high":"13.15", - "last":"13.06", - "bid":"13.06", - "volume":"1127.55649327", - "low":"13.03", - "ask":"13.14" -} \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/marketdata/example-trades-data.json b/xchange-bitstamp/src/test/resources/marketdata/example-trades-data.json deleted file mode 100644 index ab74b3e00..000000000 --- a/xchange-bitstamp/src/test/resources/marketdata/example-trades-data.json +++ /dev/null @@ -1,752 +0,0 @@ -[ - { - "date":"1357492264", - "tid":122260, - "price":"13.06", - "amount":"28.75328052" - }, - { - "date":"1357492229", - "tid":122259, - "price":"13.06", - "amount":"1.31000000" - }, - { - "date":"1357491660", - "tid":122255, - "price":"13.07", - "amount":"13.37566948" - }, - { - "date":"1357485563", - "tid":122246, - "price":"13.14", - "amount":"23.66362253" - }, - { - "date":"1357485458", - "tid":122245, - "price":"13.14", - "amount":"2.77092847" - }, - { - "date":"1357484894", - "tid":122243, - "price":"13.14", - "amount":"10.03805176" - }, - { - "date":"1357479799", - "tid":122237, - "price":"13.06", - "amount":"7.75097000" - }, - { - "date":"1357479678", - "tid":122236, - "price":"13.10", - "amount":"2.27903000" - }, - { - "date":"1357475561", - "tid":122233, - "price":"13.14", - "amount":"0.82900000" - }, - { - "date":"1357475559", - "tid":122232, - "price":"13.12", - "amount":"1.00000000" - }, - { - "date":"1357475557", - "tid":122231, - "price":"13.11", - "amount":"1.10000000" - }, - { - "date":"1357469809", - "tid":122228, - "price":"13.10", - "amount":"5.11904000" - }, - { - "date":"1357469715", - "tid":122227, - "price":"13.10", - "amount":"7.39806000" - }, - { - "date":"1357469261", - "tid":122224, - "price":"13.15", - "amount":"11.00000000" - }, - { - "date":"1357468564", - "tid":122222, - "price":"13.15", - "amount":"4.08212927" - }, - { - "date":"1357467922", - "tid":122221, - "price":"13.13", - "amount":"0.75813213" - }, - { - "date":"1357466584", - "tid":122217, - "price":"13.08", - "amount":"2.00000000" - }, - { - "date":"1357466524", - "tid":122216, - "price":"13.09", - "amount":"2.00000000" - }, - { - "date":"1357466463", - "tid":122215, - "price":"13.10", - "amount":"7.44584000" - }, - { - "date":"1357465839", - "tid":122214, - "price":"13.11", - "amount":"5.00000000" - }, - { - "date":"1357463467", - "tid":122210, - "price":"13.12", - "amount":"2.00000000" - }, - { - "date":"1357461092", - "tid":122209, - "price":"13.13", - "amount":"1.00000000" - }, - { - "date":"1357460031", - "tid":122207, - "price":"13.15", - "amount":"36.26007605" - }, - { - "date":"1357443012", - "tid":122193, - "price":"13.06", - "amount":"11.28524000" - }, - { - "date":"1357441206", - "tid":122191, - "price":"13.06", - "amount":"2.21476000" - }, - { - "date":"1357441205", - "tid":122190, - "price":"13.11", - "amount":"2.48524000" - }, - { - "date":"1357430493", - "tid":122179, - "price":"13.11", - "amount":"4.95000000" - }, - { - "date":"1357428608", - "tid":122178, - "price":"13.15", - "amount":"4.95817490" - }, - { - "date":"1357427368", - "tid":122177, - "price":"13.11", - "amount":"1.05400000" - }, - { - "date":"1357424792", - "tid":122167, - "price":"13.15", - "amount":"1.27500000" - }, - { - "date":"1357424529", - "tid":122166, - "price":"13.15", - "amount":"7.36186000" - }, - { - "date":"1357422972", - "tid":122164, - "price":"13.04", - "amount":"0.97000000" - }, - { - "date":"1357422964", - "tid":122163, - "price":"13.04", - "amount":"4.25036000" - }, - { - "date":"1357422956", - "tid":122162, - "price":"13.05", - "amount":"7.42641000" - }, - { - "date":"1357422904", - "tid":122161, - "price":"13.05", - "amount":"8.19814000" - }, - { - "date":"1357422844", - "tid":122159, - "price":"13.12", - "amount":"7.48271000" - }, - { - "date":"1357422192", - "tid":122156, - "price":"13.13", - "amount":"7.43238000" - }, - { - "date":"1357421729", - "tid":122155, - "price":"13.15", - "amount":"22.70494297" - }, - { - "date":"1357420781", - "tid":122149, - "price":"13.15", - "amount":"16.41500000" - }, - { - "date":"1357420736", - "tid":122147, - "price":"13.15", - "amount":"1.83800000" - }, - { - "date":"1357420702", - "tid":122146, - "price":"13.15", - "amount":"7.64400000" - }, - { - "date":"1357420671", - "tid":122143, - "price":"13.15", - "amount":"3.57800000" - }, - { - "date":"1357419068", - "tid":122142, - "price":"13.15", - "amount":"0.10000000" - }, - { - "date":"1357419008", - "tid":122141, - "price":"13.15", - "amount":"3.42000000" - }, - { - "date":"1357418955", - "tid":122140, - "price":"13.15", - "amount":"0.25000000" - }, - { - "date":"1357418888", - "tid":122138, - "price":"13.15", - "amount":"12.69000000" - }, - { - "date":"1357418883", - "tid":122137, - "price":"13.15", - "amount":"23.00000000" - }, - { - "date":"1357418860", - "tid":122136, - "price":"13.15", - "amount":"2.79968560" - }, - { - "date":"1357418847", - "tid":122135, - "price":"13.15", - "amount":"1.00000000" - }, - { - "date":"1357418845", - "tid":122134, - "price":"13.12", - "amount":"0.02712345" - }, - { - "date":"1357418288", - "tid":122133, - "price":"13.12", - "amount":"1.41000000" - }, - { - "date":"1357418229", - "tid":122132, - "price":"13.12", - "amount":"0.29000000" - }, - { - "date":"1357418201", - "tid":122130, - "price":"13.15", - "amount":"5.70700000" - }, - { - "date":"1357417702", - "tid":122127, - "price":"13.04", - "amount":"28.51893000" - }, - { - "date":"1357417701", - "tid":122126, - "price":"13.07", - "amount":"7.41507000" - }, - { - "date":"1357417699", - "tid":122125, - "price":"13.10", - "amount":"0.78000000" - }, - { - "date":"1357417670", - "tid":122124, - "price":"13.15", - "amount":"1.24866920" - }, - { - "date":"1357416747", - "tid":122119, - "price":"13.15", - "amount":"3.57800000" - }, - { - "date":"1357416715", - "tid":122117, - "price":"13.15", - "amount":"18.28900000" - }, - { - "date":"1357416677", - "tid":122116, - "price":"13.15", - "amount":"14.71000000" - }, - { - "date":"1357416646", - "tid":122113, - "price":"13.15", - "amount":"11.03000000" - }, - { - "date":"1357416592", - "tid":122111, - "price":"13.15", - "amount":"6.67600000" - }, - { - "date":"1357416564", - "tid":122110, - "price":"13.15", - "amount":"9.57900000" - }, - { - "date":"1357416527", - "tid":122108, - "price":"13.15", - "amount":"14.41700000" - }, - { - "date":"1357416445", - "tid":122105, - "price":"13.15", - "amount":"19.25800000" - }, - { - "date":"1357416415", - "tid":122103, - "price":"13.15", - "amount":"7.16000000" - }, - { - "date":"1357416369", - "tid":122102, - "price":"13.15", - "amount":"3.00100000" - }, - { - "date":"1357416212", - "tid":122099, - "price":"13.15", - "amount":"44.32200000" - }, - { - "date":"1357416177", - "tid":122097, - "price":"13.15", - "amount":"28.93500000" - }, - { - "date":"1357416144", - "tid":122096, - "price":"13.15", - "amount":"40.06600000" - }, - { - "date":"1357416106", - "tid":122094, - "price":"13.15", - "amount":"1.52800000" - }, - { - "date":"1357416047", - "tid":122090, - "price":"13.03", - "amount":"1.00000000" - }, - { - "date":"1357415956", - "tid":122087, - "price":"13.03", - "amount":"16.34622829" - }, - { - "date":"1357415954", - "tid":122086, - "price":"13.07", - "amount":"7.47055000" - }, - { - "date":"1357415953", - "tid":122085, - "price":"13.08", - "amount":"6.18272171" - }, - { - "date":"1357415936", - "tid":122084, - "price":"13.08", - "amount":"5.69827770" - }, - { - "date":"1357415933", - "tid":122083, - "price":"13.09", - "amount":"4.30172230" - }, - { - "date":"1357415530", - "tid":122076, - "price":"13.15", - "amount":"6.22000000" - }, - { - "date":"1357415524", - "tid":122074, - "price":"13.09", - "amount":"0.10000000" - }, - { - "date":"1357415457", - "tid":122071, - "price":"13.15", - "amount":"30.00000000" - }, - { - "date":"1357415280", - "tid":122064, - "price":"13.15", - "amount":"20.00000000" - }, - { - "date":"1357415077", - "tid":122060, - "price":"13.09", - "amount":"3.19950000" - }, - { - "date":"1357414930", - "tid":122059, - "price":"13.15", - "amount":"9.76655399" - }, - { - "date":"1357414928", - "tid":122058, - "price":"13.14", - "amount":"0.01004601" - }, - { - "date":"1357414926", - "tid":122057, - "price":"13.12", - "amount":"0.02340000" - }, - { - "date":"1357414925", - "tid":122056, - "price":"13.10", - "amount":"2.22531343" - }, - { - "date":"1357414920", - "tid":122055, - "price":"13.10", - "amount":"61.42258657" - }, - { - "date":"1357414748", - "tid":122053, - "price":"13.12", - "amount":"1.14000000" - }, - { - "date":"1357412288", - "tid":122050, - "price":"13.14", - "amount":"0.62000000" - }, - { - "date":"1357411674", - "tid":122049, - "price":"13.15", - "amount":"20.00000000" - }, - { - "date":"1357411431", - "tid":122043, - "price":"13.15", - "amount":"20.00000000" - }, - { - "date":"1357411214", - "tid":122038, - "price":"13.15", - "amount":"0.56806084" - }, - { - "date":"1357411173", - "tid":122037, - "price":"13.15", - "amount":"2.54622765" - }, - { - "date":"1357411169", - "tid":122036, - "price":"13.15", - "amount":"0.20000000" - }, - { - "date":"1357411117", - "tid":122035, - "price":"13.15", - "amount":"2.46000000" - }, - { - "date":"1357411089", - "tid":122034, - "price":"13.15", - "amount":"9.80000000" - }, - { - "date":"1357411051", - "tid":122031, - "price":"13.14", - "amount":"17.45377235" - }, - { - "date":"1357410969", - "tid":122029, - "price":"13.14", - "amount":"6.39000000" - }, - { - "date":"1357410910", - "tid":122028, - "price":"13.14", - "amount":"9.80000000" - }, - { - "date":"1357410849", - "tid":122025, - "price":"13.14", - "amount":"9.80000000" - }, - { - "date":"1357410750", - "tid":122024, - "price":"13.14", - "amount":"20.00000000" - }, - { - "date":"1357410695", - "tid":122021, - "price":"13.14", - "amount":"0.20547945" - }, - { - "date":"1357410412", - "tid":122014, - "price":"13.14", - "amount":"3.53000000" - }, - { - "date":"1357410389", - "tid":122013, - "price":"13.14", - "amount":"9.80000000" - }, - { - "date":"1357410370", - "tid":122012, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357410309", - "tid":122011, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357410285", - "tid":122010, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357410249", - "tid":122007, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357410234", - "tid":122006, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357410191", - "tid":122005, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357410171", - "tid":122003, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357409713", - "tid":121999, - "price":"13.14", - "amount":"130.50608829" - }, - { - "date":"1357409475", - "tid":121997, - "price":"13.14", - "amount":"0.42000000" - }, - { - "date":"1357409416", - "tid":121996, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357409357", - "tid":121995, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357409293", - "tid":121994, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357409228", - "tid":121993, - "price":"13.10", - "amount":"16.68123023" - }, - { - "date":"1357409227", - "tid":121992, - "price":"13.10", - "amount":"13.31876977" - }, - { - "date":"1357408932", - "tid":121990, - "price":"13.10", - "amount":"1.87000000" - }, - { - "date":"1357408750", - "tid":121989, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357408691", - "tid":121988, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357408631", - "tid":121987, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357408574", - "tid":121986, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357408513", - "tid":121985, - "price":"13.14", - "amount":"0.98000000" - }, - { - "date":"1357408464", - "tid":121984, - "price":"13.14", - "amount":"10.11643836" - } -] \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/trade/example-cancel-order.json b/xchange-bitstamp/src/test/resources/trade/example-cancel-order.json deleted file mode 100644 index f32a5804e..000000000 --- a/xchange-bitstamp/src/test/resources/trade/example-cancel-order.json +++ /dev/null @@ -1 +0,0 @@ -true \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/trade/example-openorders.json b/xchange-bitstamp/src/test/resources/trade/example-openorders.json deleted file mode 100644 index f0abfdd5a..000000000 --- a/xchange-bitstamp/src/test/resources/trade/example-openorders.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "price":"12.93", - "amount":"2.63031710", - "type":0, - "id":1271131, - "datetime":"2013-01-06 10:46:41" - }, - { - "price":"12.15", - "amount":"3.00000000", - "type":0, - "id":1262468, - "datetime":"2013-01-02 09:59:44" - }, - { - "price":"12.63", - "amount":"4.00000000", - "type":0, - "id":1262467, - "datetime":"2013-01-02 09:59:26" - }, - { - "price":"12.75", - "amount":"4.00000000", - "type":0, - "id":1262441, - "datetime":"2013-01-02 09:23:38" - } -] \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/trade/example-place-limit-order.json b/xchange-bitstamp/src/test/resources/trade/example-place-limit-order.json deleted file mode 100644 index 1e64647f4..000000000 --- a/xchange-bitstamp/src/test/resources/trade/example-place-limit-order.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "price":"1.25", - "amount":"1", - "type":0, - "id":1273070, - "datetime":"2013-01-07 08:44:04.656195" -} \ No newline at end of file diff --git a/xchange-btce/api-specification.txt b/xchange-btce/api-specification.txt deleted file mode 100644 index e0c38f9a9..000000000 --- a/xchange-btce/api-specification.txt +++ /dev/null @@ -1,22 +0,0 @@ -BTC-E Exchange API specification -================================ - -Public API - -Documentation -------------- -https://btc-e.com/page/2 (last entry in FAQ) -https://btc-e.com/api/documentation - -Ticker ------- -https://www.btc-e.com/api/btc_usd/ticker - -Orders ------- -https://www.btc-e.com/api/btc_usd/depth - -Trades ------- -https://www.btc-e.com/api/btc_usd/trades - diff --git a/xchange-btce/pom.xml b/xchange-btce/pom.xml deleted file mode 100644 index 417773df5..000000000 --- a/xchange-btce/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-btce - - BTCE Exchange - XChange implementation for the BTC-E Exchange - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - - \ No newline at end of file diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCE.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCE.java deleted file mode 100644 index ca4d191ee..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCE.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -import com.xeiam.xchange.btce.dto.marketdata.BTCEDepth; -import com.xeiam.xchange.btce.dto.marketdata.BTCETicker; -import com.xeiam.xchange.btce.dto.marketdata.BTCETrade; - -/** - * @author Matija Mazi - */ -@Path("api/2") -public interface BTCE { - - @GET - @Path("{ident}_{currency}/ticker") - BTCETicker getTicker(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency); - - @GET - @Path("{ident}_{currency}/depth?raw") - BTCEDepth getFullDepth(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency); - - @GET - @Path("{ident}_{currency}/trades") - BTCETrade[] getTrades(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency); - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAdapters.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAdapters.java deleted file mode 100644 index 7bb2d9332..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAdapters.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; -import org.joda.money.IllegalCurrencyException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.xeiam.xchange.btce.dto.account.BTCEAccountInfo; -import com.xeiam.xchange.btce.dto.marketdata.BTCETicker; -import com.xeiam.xchange.btce.dto.marketdata.BTCETrade; -import com.xeiam.xchange.btce.dto.trade.BTCEOrder; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.dto.trade.Wallet; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Various adapters for converting from BTCE DTOs to XChange DTOs - */ -public final class BTCEAdapters { - - private static final Logger log = LoggerFactory.getLogger(BTCEAdapters.class); - - /** - * private Constructor - */ - private BTCEAdapters() { - - } - - /** - * Adapts a BTCEOrder to a LimitOrder - * - * @param amount - * @param price - * @param currency - * @param orderTypeString - * @param id - * @return - */ - public static LimitOrder adaptOrder(BigDecimal amount, BigDecimal price, String tradableIdentifier, String currency, String orderTypeString, String id) { - - // place a limit order - OrderType orderType = orderTypeString.equalsIgnoreCase("bid") ? OrderType.BID : OrderType.ASK; - BigMoney limitPrice; - limitPrice = MoneyUtils.parse(currency + " " + price); - - return new LimitOrder(orderType, amount, tradableIdentifier, currency, limitPrice); - - } - - /** - * Adapts a List of BTCEOrders to a List of LimitOrders - * - * @param BTCEOrders - * @param currency - * @param orderType - * @param id - * @return - */ - public static List adaptOrders(List BTCEOrders, String tradableIdentifier, String currency, String orderType, String id) { - - List limitOrders = new ArrayList(); - - for (BigDecimal[] btceOrder : BTCEOrders) { - // Bid orderbook is reversed order. Insert at index 0 instead of - // appending - if (orderType.equalsIgnoreCase("bid")) { - limitOrders.add(0, adaptOrder(btceOrder[1], btceOrder[0], tradableIdentifier, currency, orderType, id)); - } else { - limitOrders.add(adaptOrder(btceOrder[1], btceOrder[0], tradableIdentifier, currency, orderType, id)); - } - } - - return limitOrders; - } - - /** - * Adapts a BTCETrade to a Trade Object - * - * @param BTCETrade A BTCE trade - * @return The XChange Trade - */ - public static Trade adaptTrade(BTCETrade BTCETrade) { - - OrderType orderType = BTCETrade.equals("bid") ? OrderType.BID : OrderType.ASK; - BigDecimal amount = BTCETrade.getAmount(); - String currency = BTCETrade.getPriceCurrency(); - BigMoney price = MoneyUtils.parse(currency + " " + BTCETrade.getPrice()); - String tradableIdentifier = BTCETrade.getItem(); - Date date = DateUtils.fromMillisUtc(BTCETrade.getDate() * 1000L); - - return new Trade(orderType, amount, tradableIdentifier, currency, price, date); - } - - /** - * Adapts a BTCETrade[] to a Trades Object - * - * @param BTCETrades The BTCE trade data - * @return The trades - */ - public static Trades adaptTrades(BTCETrade[] BTCETrades) { - - List tradesList = new ArrayList(); - for (BTCETrade BTCETrade : BTCETrades) { - // Date is reversed order. Insert at index 0 instead of appending - tradesList.add(0, adaptTrade(BTCETrade)); - } - return new Trades(tradesList); - } - - /** - * Adapts a BTCETicker to a Ticker Object - * - * @param bTCETicker - * @return - */ - public static Ticker adaptTicker(BTCETicker bTCETicker, String tradableIdentifier, String currency) { - - BigMoney last = MoneyUtils.parse(currency + " " + bTCETicker.getTicker().getLast()); - BigMoney bid = MoneyUtils.parse(currency + " " + bTCETicker.getTicker().getSell()); - BigMoney ask = MoneyUtils.parse(currency + " " + bTCETicker.getTicker().getBuy()); - BigMoney high = MoneyUtils.parse(currency + " " + bTCETicker.getTicker().getHigh()); - BigMoney low = MoneyUtils.parse(currency + " " + bTCETicker.getTicker().getLow()); - BigDecimal volume = bTCETicker.getTicker().getVolCur(); - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withBid(bid).withAsk(ask).withHigh(high).withLow(low).withVolume(volume).build(); - } - - public static AccountInfo adaptAccountInfo(BTCEAccountInfo btceAccountInfo) { - - List wallets = new ArrayList(); - Map funds = btceAccountInfo.getFunds(); - - for (String lcCurrency : funds.keySet()) { - String currency = lcCurrency.toUpperCase(); - try { - CurrencyUnit.of(currency); - } catch (IllegalCurrencyException e) { - log.warn("Ignoring unknown currency {}", currency); - continue; - } - wallets.add(Wallet.createInstance(currency, funds.get(lcCurrency))); - } - return new AccountInfo(null, wallets); - } - - public static OpenOrders adaptOrders(Map btceOrderMap) { - - List os = new ArrayList(); - for (Long id : btceOrderMap.keySet()) { - BTCEOrder o = btceOrderMap.get(id); - OrderType orderType = o.getType() == BTCEOrder.Type.buy ? OrderType.BID : OrderType.ASK; - String[] pair = o.getPair().split("_"); - String currency = pair[1].toUpperCase(); - BigMoney price = BigMoney.of(CurrencyUnit.of(currency), o.getRate()); - os.add(new LimitOrder(orderType, o.getAmount(), pair[0].toUpperCase(), currency, Long.toString(id), price)); - } - return new OpenOrders(os); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAuthenticated.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAuthenticated.java deleted file mode 100644 index 33eb88923..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEAuthenticated.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Matija Mazi - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce; - -import java.math.BigDecimal; - -import javax.ws.rs.FormParam; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; - -import si.mazi.rescu.ParamsDigest; - -import com.xeiam.xchange.btce.dto.account.BTCEAccountInfoReturn; -import com.xeiam.xchange.btce.dto.trade.BTCECancelOrderReturn; -import com.xeiam.xchange.btce.dto.trade.BTCEOpenOrdersReturn; -import com.xeiam.xchange.btce.dto.trade.BTCEOrder; -import com.xeiam.xchange.btce.dto.trade.BTCEPlaceOrderReturn; - -/** - * @author Matija Mazi - */ -@Path("tapi") -public interface BTCEAuthenticated { - - /** - * @param from The ID of the transaction to start displaying with; default 0 - * @param count The number of transactions for displaying default 1,000 - * @param fromId The ID of the transaction to start displaying with default 0 - * @param endId The ID of the transaction to finish displaying with default ∞ - * @param order sorting ASC or DESC default DESC - * @param since When to start displaying? UNIX time default 0 - * @param end When to finish displaying? UNIX time default ∞ - * @return {success=1, return={funds={usd=0, rur=0, eur=0, btc=0.1, ltc=0, nmc=0}, rights={info=1, trade=1, withdraw=1}, transaction_count=1, open_orders=0, server_time=1357678428}} - */ - @POST - @FormParam("method") - BTCEAccountInfoReturn getInfo(@HeaderParam("Key") String apiKey, @HeaderParam("Sign") ParamsDigest signer, @FormParam("nonce") int nonce, @FormParam("from") Long from, - @FormParam("count") Long count, @FormParam("from_id") Long fromId, @FormParam("end_id") Long endId, @FormParam("order") SortOrder order, @FormParam("since") Long since, - @FormParam("end") Long end); - - /** - * None of the parameters are obligatory (ie. all are nullable). - * - * @param from the number of the order to start displaying with (default: 0) - * @param count The number of orders for displaying (default: 1000) - * @param fromId id of the order to start displaying with (default: 0) - * @param endId id of the ordeк to finish displaying (default: ∞) - * @param order sorting (default: DESC) - * @param since when to start displaying UNIX time (default: 0) - * @param end when to finish displaying UNIX time (default: ∞) - * @param pair the pair to display the orders eg. btc_usd (default: all pairs) - * @param active is it displaying of active orders only? 1 or 0 (default: 1) - */ - @POST - @FormParam("method") - BTCEOpenOrdersReturn OrderList(@HeaderParam("Key") String apiKey, @HeaderParam("Sign") ParamsDigest signer, @FormParam("nonce") int nonce, @FormParam("from") Long from, - @FormParam("count") Long count, @FormParam("from_id") Long fromId, @FormParam("end_id") Long endId, @FormParam("order") SortOrder order, @FormParam("since") Long since, - @FormParam("end") Long end, @FormParam("pair") String pair, @FormParam("active") int active); - - /** - * All parameters are obligatory (ie. none may be null). - * - * @param pair pair, eg. btc_usd - * @param type The transaction type (buy or sell) - * @param rate The price to buy/sell - * @param amount The amount which is necessary to buy/sell - */ - @POST - @FormParam("method") - BTCEPlaceOrderReturn Trade(@HeaderParam("Key") String apiKey, @HeaderParam("Sign") ParamsDigest signer, @FormParam("nonce") int nonce, @FormParam("pair") String pair, - @FormParam("type") BTCEOrder.Type type, @FormParam("rate") BigDecimal rate, @FormParam("amount") BigDecimal amount); - - @POST - @FormParam("method") - BTCECancelOrderReturn CancelOrder(@HeaderParam("Key") String apiKey, @HeaderParam("Sign") ParamsDigest signer, @FormParam("nonce") int nonce, @FormParam("order_id") long orderId); - - enum SortOrder { - ASC, DESC - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEExchange.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEExchange.java deleted file mode 100644 index e260eac0e..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEExchange.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.btce.service.account.polling.BTCEPollingAccountService; -import com.xeiam.xchange.btce.service.marketdata.polling.BTCEPollingMarketDataService; -import com.xeiam.xchange.btce.service.trade.polling.BTCEPollingTradeService; - -/** - *

- * Exchange implementation to provide the following to applications: - *

- *
    - *
  • A wrapper for the BTCE exchange API
  • - *
- */ -public class BTCEExchange extends BaseExchange implements Exchange { - - /** - * Default constructor for ExchangeFactory - */ - public BTCEExchange() { - - } - - /** - * @return A default configuration for this exchange - */ - public static Exchange newInstance() { - - Exchange exchange = new BTCEExchange(); - exchange.applySpecification(exchange.getDefaultExchangeSpecification()); - return exchange; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - - this.pollingMarketDataService = new BTCEPollingMarketDataService(exchangeSpecification); - this.pollingAccountService = new BTCEPollingAccountService(exchangeSpecification); - this.pollingTradeService = new BTCEPollingTradeService(exchangeSpecification); - } - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://btc-e.com"); - exchangeSpecification.setHost("btc-e.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("BTC-e"); - exchangeSpecification.setExchangeDescription("BTC-e is a Bitcoin exchange registered in Russia."); - - return exchangeSpecification; - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEUtils.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEUtils.java deleted file mode 100644 index f16fe15ae..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/BTCEUtils.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared BTC-E properties - */ -public final class BTCEUtils { - - /** - * private Constructor - */ - private BTCEUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - CurrencyPair.BTC_USD, - - CurrencyPair.BTC_RUR, - - CurrencyPair.BTC_EUR, - - CurrencyPair.LTC_BTC, - - CurrencyPair.LTC_USD, - - CurrencyPair.LTC_RUR, - - CurrencyPair.NMC_BTC, - - CurrencyPair.USD_RUR, - - CurrencyPair.EUR_USD, - - CurrencyPair.NVC_BTC, - - CurrencyPair.TRC_BTC, - - CurrencyPair.PPC_BTC - - ); - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfo.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfo.java deleted file mode 100644 index 472d07e8c..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfo.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.account; - -import java.math.BigDecimal; -import java.text.MessageFormat; -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BTCEAccountInfo { - - private final int transactionCount; - private final int openOrders; - private final long serverTime; - private final Rights rights; - private final Map funds; - - /** - * Constructor - * - * @param transactionCount - * @param openOrders - * @param serverTime - * @param rights - * @param funds - */ - public BTCEAccountInfo(@JsonProperty("transaction_count") int transactionCount, @JsonProperty("open_orders") int openOrders, @JsonProperty("server_time") long serverTime, - @JsonProperty("rights") Rights rights, @JsonProperty("funds") Map funds) { - - this.transactionCount = transactionCount; - this.openOrders = openOrders; - this.serverTime = serverTime; - this.rights = rights; - this.funds = funds; - } - - public int getTransactionCount() { - - return transactionCount; - } - - public int getOpenOrders() { - - return openOrders; - } - - public long getServerTime() { - - return serverTime; - } - - public Rights getRights() { - - return rights; - } - - public Map getFunds() { - - return funds; - } - - @Override - public String toString() { - - return MessageFormat.format("BTCEAccountInfo[transactionCount={0}, openOrders={1}, serverTime={2}, rights={3}, funds=''{4}''']", transactionCount, openOrders, serverTime, rights, funds); - } - - public static class Rights { - - private final boolean info, trade, withdraw; - - private Rights(@JsonProperty("info") boolean info, @JsonProperty("trade") boolean trade, @JsonProperty("withdraw") boolean withdraw) { - - this.info = info; - this.trade = trade; - this.withdraw = withdraw; - } - - public boolean isInfo() { - - return info; - } - - public boolean isTrade() { - - return trade; - } - - public boolean isWithdraw() { - - return withdraw; - } - - @Override - public String toString() { - - return MessageFormat.format("Rights[info={0}, trade={1}, withdraw={2}]", info, trade, withdraw); - } - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfoReturn.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfoReturn.java deleted file mode 100644 index d6021d1ba..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/account/BTCEAccountInfoReturn.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.account; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.btce.dto.marketdata.BTCEReturn; - -/** - * @author Matija Mazi - */ -public class BTCEAccountInfoReturn extends BTCEReturn { - - /** - * Constructor - * - * @param success - * @param value - * @param error - */ - public BTCEAccountInfoReturn(@JsonProperty("success") boolean success, @JsonProperty("return") BTCEAccountInfo value, @JsonProperty("error") String error) { - - super(success, value, error); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEDepth.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEDepth.java deleted file mode 100644 index 741dae656..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEDepth.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing depth from BTCE - */ -public class BTCEDepth { - - private final List asks; - private final List bids; - - /** - * Constructor - * - * @param asks - * @param bids - */ - public BTCEDepth(@JsonProperty("asks") List asks, @JsonProperty("bids") List bids) { - - this.asks = asks; - this.bids = bids; - } - - public List getAsks() { - - return asks; - } - - public List getBids() { - - return bids; - } - - @Override - public String toString() { - - return "BTCEDepth [asks=" + asks.toString() + ", bids=" + bids.toString() + "]"; - } - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEReturn.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEReturn.java deleted file mode 100644 index 0c43a2cd5..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCEReturn.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BTCEReturn { - - private final boolean success; - private final V returnValue; - private final String error; - - /** - * Constructor - * - * @param success - * @param returnValue - * @param error - */ - @JsonCreator - public BTCEReturn(@JsonProperty("success") boolean success, @JsonProperty("return") V returnValue, @JsonProperty("error") String error) { - - this.success = success; - this.returnValue = returnValue; - this.error = error; - } - - public boolean isSuccess() { - - return success; - } - - public V getReturnValue() { - - return returnValue; - } - - public String getError() { - - return error; - } - - @Override - public String toString() { - - return String.format("BTCEReturn[%s: %s]", success ? "OK" : "error", success ? returnValue.toString() : error); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETicker.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETicker.java deleted file mode 100644 index cb4e8ee8e..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETicker.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing Ticker from BTCE - */ -public class BTCETicker { - - private BTCETickerObject ticker; - - /** - * Constructor - * - * @param ticker - */ - public BTCETicker(@JsonProperty("ticker") BTCETickerObject ticker) { - - this.ticker = ticker; - } - - public BTCETickerObject getTicker() { - - return ticker; - } - - @Override - public String toString() { - - return "BTCETicker [ticker=" + ticker.toString() + "]"; - } - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETickerObject.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETickerObject.java deleted file mode 100644 index 8279f482a..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETickerObject.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing Ticker from BTCE - */ -public final class BTCETickerObject { - - private final BigDecimal last; - private final BigDecimal high; - private final BigDecimal low; - private final BigDecimal avg; - private final BigDecimal buy; - private final BigDecimal sell; - private final BigDecimal serverTime; - private final BigDecimal vol; - private final BigDecimal volCur; - - /** - * Constructor - * - * @param high - * @param low - * @param vol - * @param last - * @param avg - * @param buy - * @param serverTime - * @param volCur - * @param sell - */ - public BTCETickerObject(@JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("vol") BigDecimal vol, @JsonProperty("last") BigDecimal last, - @JsonProperty("avg") BigDecimal avg, @JsonProperty("buy") BigDecimal buy, @JsonProperty("server_time") BigDecimal serverTime, @JsonProperty("vol_cur") BigDecimal volCur, - @JsonProperty("sell") BigDecimal sell) { - - this.high = high; - this.low = low; - this.last = last; - this.avg = avg; - this.buy = buy; - this.sell = sell; - this.serverTime = serverTime; - this.vol = vol; - this.volCur = volCur; - } - - public BigDecimal getAvg() { - - return avg; - } - - public BigDecimal getBuy() { - - return buy; - } - - public BigDecimal getHigh() { - - return high; - } - - public BigDecimal getLast() { - - return last; - } - - public BigDecimal getLow() { - - return low; - } - - public BigDecimal getSell() { - - return sell; - } - - public BigDecimal getServerTime() { - - return serverTime; - } - - public BigDecimal getVol() { - - return vol; - } - - public BigDecimal getVolCur() { - - return volCur; - } - - @Override - public String toString() { - - return "BTCETickerObject [last=" + last + ", high=" + high + ", low=" + low + ", avg=" + avg + ", buy=" + buy + ", sell=" + sell + ", serverTime=" + serverTime + ", vol=" + vol + ", volCur=" - + volCur + "]"; - } - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETrade.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETrade.java deleted file mode 100644 index 8de45e077..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/marketdata/BTCETrade.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - *

- * Data object representing a Trade from BTCE - *

- */ -public class BTCETrade { - - private final BigDecimal amount; - private final long date; - private final BigDecimal price; - private final long tid; - private String item; - private String priceCurrency; - private String tradeType; - - /** - * Constructor - * - * @param amount - * @param date - * @param price - * @param tid - * @param item - * @param priceCurrency - * @param tradeType - */ - public BTCETrade(@JsonProperty("amount") BigDecimal amount, @JsonProperty("date") long date, @JsonProperty("price") BigDecimal price, @JsonProperty("tid") long tid, - @JsonProperty("item") String item, @JsonProperty("price_currency") String priceCurrency, @JsonProperty("trade_type") String tradeType) { - - this.amount = amount; - this.date = date; - this.price = price; - this.tid = tid; - this.item = item; - this.priceCurrency = priceCurrency; - this.tradeType = tradeType; - } - - public BigDecimal getAmount() { - - return amount; - } - - public long getDate() { - - return date; - } - - public String getItem() { - - return item; - } - - public BigDecimal getPrice() { - - return price; - } - - public String getPriceCurrency() { - - return priceCurrency; - } - - public long getTid() { - - return tid; - } - - public String getTradeType() { - - return tradeType; - } - - @Override - public String toString() { - - return "BTCETrade [amount=" + amount + ", date=" + date + ", price=" + price + ", tid=" + tid + ", item=" + item + ", priceCurrency=" + priceCurrency + ", tradeType=" + tradeType + "]"; - } - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderResult.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderResult.java deleted file mode 100644 index e5be5d237..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderResult.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Matija Mazi - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.trade; - -import java.math.BigDecimal; -import java.text.MessageFormat; -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BTCECancelOrderResult { - - private final long orderId; - private final Map funds; - - /** - * Constructor - * - * @param orderId - * @param funds - */ - public BTCECancelOrderResult(@JsonProperty("order_id") long orderId, @JsonProperty("funds") Map funds) { - - this.orderId = orderId; - this.funds = funds; - } - - public long getOrderId() { - - return orderId; - } - - public Map getFunds() { - - return funds; - } - - @Override - public String toString() { - - return MessageFormat.format("BTCECancelOrderResult[orderId={0}, funds={1}]", orderId, funds); - } - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderReturn.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderReturn.java deleted file mode 100644 index c664243bb..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCECancelOrderReturn.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Matija Mazi - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.trade; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.btce.dto.marketdata.BTCEReturn; - -/** - * @author Matija Mazi - */ -public class BTCECancelOrderReturn extends BTCEReturn { - - /** - * Constructor - * - * @param success - * @param value - * @param error - */ - public BTCECancelOrderReturn(@JsonProperty("success") boolean success, @JsonProperty("return") BTCECancelOrderResult value, @JsonProperty("error") String error) { - - super(success, value, error); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOpenOrdersReturn.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOpenOrdersReturn.java deleted file mode 100644 index 5156df020..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOpenOrdersReturn.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.trade; - -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.btce.dto.marketdata.BTCEReturn; - -/** - * @author Matija Mazi - */ -public class BTCEOpenOrdersReturn extends BTCEReturn> { - - /** - * Constructor - * - * @param success - * @param value - * @param error - */ - public BTCEOpenOrdersReturn(@JsonProperty("success") boolean success, @JsonProperty("return") Map value, @JsonProperty("error") String error) { - - super(success, value, error); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOrder.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOrder.java deleted file mode 100644 index ff8b51d47..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEOrder.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.trade; - -import java.math.BigDecimal; -import java.text.MessageFormat; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BTCEOrder { - - private final String pair; - private final Type type; - private final BigDecimal amount; - private final BigDecimal rate; - private final Long timestampCreated; - /** 0: active; 1: ??; 2: cancelled */ - private final int status; - - /** - * Constructor - * - * @param status - * @param timestampCreated - * @param rate - * @param amount - * @param type - * @param pair - */ - public BTCEOrder(@JsonProperty("status") int status, @JsonProperty("timestamp_created") Long timestampCreated, @JsonProperty("rate") BigDecimal rate, @JsonProperty("amount") BigDecimal amount, - @JsonProperty("type") Type type, @JsonProperty("pair") String pair) { - - this.status = status; - this.timestampCreated = timestampCreated; - this.rate = rate; - this.amount = amount; - this.type = type; - this.pair = pair; - } - - public String getPair() { - - return pair; - } - - public Type getType() { - - return type; - } - - public BigDecimal getAmount() { - - return amount; - } - - public BigDecimal getRate() { - - return rate; - } - - public Long getTimestampCreated() { - - return timestampCreated; - } - - public int getStatus() { - - return status; - } - - @Override - public String toString() { - - return MessageFormat.format("BTCEOrder[pair=''{0}'', type={1}, amount={2}, rate={3}, timestampCreated={4}, status={5}]", pair, type, amount, rate, timestampCreated, status); - } - - public static enum Type { - buy, sell - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderResult.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderResult.java deleted file mode 100644 index 3b7c77978..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderResult.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.trade; - -import java.math.BigDecimal; -import java.text.MessageFormat; -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public class BTCEPlaceOrderResult { - - private final long orderId; - private final BigDecimal received; - private final BigDecimal remains; - private final Map funds; - - /** - * Constructor - * - * @param orderId - * @param received - * @param remains - * @param funds - */ - public BTCEPlaceOrderResult(@JsonProperty("order_id") long orderId, @JsonProperty("received") BigDecimal received, @JsonProperty("remains") BigDecimal remains, - @JsonProperty("funds") Map funds) { - - this.orderId = orderId; - this.received = received; - this.remains = remains; - this.funds = funds; - } - - public long getOrderId() { - - return orderId; - } - - public Map getFunds() { - - return funds; - } - - public BigDecimal getReceived() { - - return received; - } - - public BigDecimal getRemains() { - - return remains; - } - - @Override - public String toString() { - - return MessageFormat.format("BTCEPlaceOrderResult[orderId={0}, received={1}, remains={2}, funds={3}]", orderId, received, remains, funds); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderReturn.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderReturn.java deleted file mode 100644 index 49708126a..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/dto/trade/BTCEPlaceOrderReturn.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.dto.trade; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.btce.dto.marketdata.BTCEReturn; - -/** - * @author Matija Mazi - */ -public class BTCEPlaceOrderReturn extends BTCEReturn { - - /** - * Constructor - * - * @param success - * @param value - * @param error - */ - public BTCEPlaceOrderReturn(@JsonProperty("success") boolean success, @JsonProperty("return") BTCEPlaceOrderResult value, @JsonProperty("error") String error) { - - super(success, value, error); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEBasePollingService.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEBasePollingService.java deleted file mode 100644 index 6562675c0..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEBasePollingService.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service; - -import si.mazi.rescu.ParamsDigest; -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeException; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.btce.BTCEAuthenticated; -import com.xeiam.xchange.btce.dto.marketdata.BTCEReturn; - -/** - * @author Matija Mazi - */ -public class BTCEBasePollingService { - - private static final long START_MILLIS = 1356998400000L; // Jan 1st, 2013 in milliseconds from epoch - - protected final String apiKey; - protected final BTCEAuthenticated btce; - protected final ParamsDigest signatureCreator; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BTCEBasePollingService(ExchangeSpecification exchangeSpecification) { - - this.btce = RestProxyFactory.createProxy(BTCEAuthenticated.class, exchangeSpecification.getSslUri()); - this.apiKey = exchangeSpecification.getApiKey(); - this.signatureCreator = BTCEHmacPostBodyDigest.createInstance(exchangeSpecification.getSecretKey()); - } - - protected int nextNonce() { - - // NOTE: this nonce creation formula is not bullet-proof: - // - It allows for only one request per .25 seconds, - // - It will cycle over MAX_INTEGER and start producing illegal negative nonces on January 5, 2030 - - // If you run into problems with nonces (eg. you've once submitted a large nonce and can't use normal nonces any more), - // you can request new api credentials (key, secret) with BTCE. - return (int) ((System.currentTimeMillis() - START_MILLIS) / 250L); - } - - protected void checkResult(BTCEReturn info) { - - if (!info.isSuccess()) { - throw new ExchangeException("BTCE returned an error: " + info.getError()); - } else if (info.getReturnValue() == null) { - throw new ExchangeException("Didn't recieve any return value. Message: " + info.getError()); - } else if (info.getError() != null) { - throw new ExchangeException("Got error message: " + info.getError()); - } - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEHmacPostBodyDigest.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEHmacPostBodyDigest.java deleted file mode 100644 index f69a1bde1..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/BTCEHmacPostBodyDigest.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service; - -import java.io.UnsupportedEncodingException; -import java.math.BigInteger; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; - -import javax.crypto.Mac; -import javax.crypto.SecretKey; -import javax.crypto.spec.SecretKeySpec; - -import si.mazi.rescu.ParamsDigest; -import si.mazi.rescu.RestMethodMetadata; - -/** - * This may be used as the value of a @HeaderParam, @QueryParam or @PathParam to create a digest of the post body (composed of @FormParam's). Don't use as the value of a @FormParam, it will probably - * cause an infinite loop. - *

- * This may be used for REST APIs where some parameters' values must be digests of other parameters. An example is the MtGox API v1, where the Rest-Sign header parameter must be a digest of the - * request body (which is composed of @FormParams). - */ -public class BTCEHmacPostBodyDigest implements ParamsDigest { - - private static final String HMAC_SHA_512 = "HmacSHA512"; - private final Mac mac; - - /** - * Constructor - * - * @param secretKeyBase64 - * @throws IllegalArgumentException if key is invalid (cannot be base-64-decoded or the decoded key is invalid). - */ - private BTCEHmacPostBodyDigest(String secretKeyBase64) throws IllegalArgumentException { - - try { - SecretKey secretKey = new SecretKeySpec(secretKeyBase64.getBytes("UTF-8"), HMAC_SHA_512); - mac = Mac.getInstance(HMAC_SHA_512); - mac.init(secretKey); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException("Illegal encoding, check the code.", e); - } catch (InvalidKeyException e) { - throw new IllegalArgumentException("Invalid key for hmac initialization.", e); - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException("Illegal algorithm for post body digest. Check the implementation."); - } - } - - public static BTCEHmacPostBodyDigest createInstance(String secretKeyBase64) throws IllegalArgumentException { - - return secretKeyBase64 == null ? null : new BTCEHmacPostBodyDigest(secretKeyBase64); - } - - @Override - public String digestParams(RestMethodMetadata restMethodMetadata) { - - try { - String postBody = restMethodMetadata.getRequestBody(); - mac.update(postBody.getBytes("UTF-8")); - return String.format("%0128x", new BigInteger(1, mac.doFinal())); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException("Illegal encoding, check the code.", e); - } - // return Base64.encodeBytes(mac.doFinal()).trim(); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/account/polling/BTCEPollingAccountService.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/account/polling/BTCEPollingAccountService.java deleted file mode 100644 index c0e588c17..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/account/polling/BTCEPollingAccountService.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Matija Mazi - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.account.polling; - -import java.math.BigDecimal; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.btce.BTCEAdapters; -import com.xeiam.xchange.btce.BTCEAuthenticated; -import com.xeiam.xchange.btce.dto.account.BTCEAccountInfoReturn; -import com.xeiam.xchange.btce.service.BTCEBasePollingService; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - * @author Matija Mazi - */ -public class BTCEPollingAccountService extends BTCEBasePollingService implements PollingAccountService { - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BTCEPollingAccountService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - } - - @Override - public AccountInfo getAccountInfo() { - - BTCEAccountInfoReturn info = btce.getInfo(apiKey, signatureCreator, nextNonce(), null, null, null, null, BTCEAuthenticated.SortOrder.DESC, null, null); - checkResult(info); - return BTCEAdapters.adaptAccountInfo(info.getReturnValue()); - } - - @Override - public String withdrawFunds(BigDecimal amount, String address) { - - throw new UnsupportedOperationException("Funds withdrawal not supported by BTCE API."); - } - - @Override - public String requestBitcoinDepositAddress(final String... arguments) { - - throw new UnsupportedOperationException("Deposit address request not supported by BTCE API."); - } -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/marketdata/polling/BTCEPollingMarketDataService.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/marketdata/polling/BTCEPollingMarketDataService.java deleted file mode 100644 index 6c5f8d5f5..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/marketdata/polling/BTCEPollingMarketDataService.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.btce.BTCE; -import com.xeiam.xchange.btce.BTCEAdapters; -import com.xeiam.xchange.btce.BTCEUtils; -import com.xeiam.xchange.btce.dto.marketdata.BTCEDepth; -import com.xeiam.xchange.btce.dto.marketdata.BTCETicker; -import com.xeiam.xchange.btce.dto.marketdata.BTCETrade; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Implementation of the market data service for BTCE - *

- *
    - *
  • Provides access to various market data values
  • - *
- */ -public class BTCEPollingMarketDataService implements PollingMarketDataService { - - private final BTCE btce; - - /** - * @param exchangeSpecification The exchange specification - */ - public BTCEPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - btce = RestProxyFactory.createProxy(BTCE.class, exchangeSpecification.getSslUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - BTCETicker btceTicker = btce.getTicker(tradableIdentifier.toLowerCase(), currency.toLowerCase()); - - // Adapt to XChange DTOs - return BTCEAdapters.adaptTicker(btceTicker, tradableIdentifier, currency); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - BTCEDepth btceDepth = btce.getFullDepth(tradableIdentifier.toLowerCase(), currency.toLowerCase()); - - // Adapt to XChange DTOs - List asks = BTCEAdapters.adaptOrders(btceDepth.getAsks(), tradableIdentifier, currency, "ask", ""); - List bids = BTCEAdapters.adaptOrders(btceDepth.getBids(), tradableIdentifier, currency, "bid", ""); - - return new OrderBook(asks, bids); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - - BTCETrade[] BTCETrades = btce.getTrades(tradableIdentifier.toLowerCase(), currency.toLowerCase()); - - return BTCEAdapters.adaptTrades(BTCETrades); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(BTCEUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - - } - - @Override - public List getExchangeSymbols() { - - return BTCEUtils.CURRENCY_PAIRS; - } - -} diff --git a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/trade/polling/BTCEPollingTradeService.java b/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/trade/polling/BTCEPollingTradeService.java deleted file mode 100644 index 87a29fadd..000000000 --- a/xchange-btce/src/main/java/com/xeiam/xchange/btce/service/trade/polling/BTCEPollingTradeService.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Matija Mazi - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.trade.polling; - -import java.util.ArrayList; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.btce.BTCEAdapters; -import com.xeiam.xchange.btce.BTCEAuthenticated; -import com.xeiam.xchange.btce.BTCEUtils; -import com.xeiam.xchange.btce.dto.trade.BTCECancelOrderReturn; -import com.xeiam.xchange.btce.dto.trade.BTCEOpenOrdersReturn; -import com.xeiam.xchange.btce.dto.trade.BTCEOrder; -import com.xeiam.xchange.btce.dto.trade.BTCEPlaceOrderReturn; -import com.xeiam.xchange.btce.service.BTCEBasePollingService; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; -import com.xeiam.xchange.utils.Assert; - -/** @author Matija Mazi */ -public class BTCEPollingTradeService extends BTCEBasePollingService implements PollingTradeService { - - /** - * Constructor - * - * @param exchangeSpecification - */ - public BTCEPollingTradeService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - } - - @Override - public OpenOrders getOpenOrders() { - - BTCEOpenOrdersReturn orders = btce.OrderList(apiKey, signatureCreator, nextNonce(), null, null, null, null, BTCEAuthenticated.SortOrder.DESC, null, null, null, 1); - if ("no orders".equals(orders.getError())) { - return new OpenOrders(new ArrayList()); - } - checkResult(orders); - return BTCEAdapters.adaptOrders(orders.getReturnValue()); - } - - @Override - public String placeMarketOrder(MarketOrder marketOrder) { - - throw new UnsupportedOperationException("Market orders not supported by BTCE API."); - } - - @Override - public String placeLimitOrder(LimitOrder limitOrder) { - - Assert.isTrue(BTCEUtils.isValidCurrencyPair(new CurrencyPair(limitOrder.getTradableIdentifier(), limitOrder.getTransactionCurrency())), "currencyPair is not valid:" - + limitOrder.getTradableIdentifier() + " " + limitOrder.getTransactionCurrency()); - - String pair = String.format("%s_%s", limitOrder.getTradableIdentifier(), limitOrder.getTransactionCurrency()).toLowerCase(); - BTCEOrder.Type type = limitOrder.getType() == Order.OrderType.BID ? BTCEOrder.Type.buy : BTCEOrder.Type.sell; - BTCEPlaceOrderReturn ret = btce.Trade(apiKey, signatureCreator, nextNonce(), pair, type, limitOrder.getLimitPrice().getAmount(), limitOrder.getTradableAmount()); - checkResult(ret); - return Long.toString(ret.getReturnValue().getOrderId()); - } - - @Override - public boolean cancelOrder(String orderId) { - - BTCECancelOrderReturn ret = btce.CancelOrder(apiKey, signatureCreator, nextNonce(), Long.parseLong(orderId)); - checkResult(ret); - return ret.isSuccess(); - } -} diff --git a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEAdapterTest.java b/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEAdapterTest.java deleted file mode 100644 index 69ead09c4..000000000 --- a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEAdapterTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.List; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.btce.BTCEAdapters; -import com.xeiam.xchange.btce.dto.marketdata.BTCEDepth; -import com.xeiam.xchange.btce.dto.marketdata.BTCETicker; -import com.xeiam.xchange.btce.dto.marketdata.BTCETrade; -import com.xeiam.xchange.btce.service.marketdata.BTCEDepthJSONTest; -import com.xeiam.xchange.btce.service.marketdata.BTCETickerJSONTest; -import com.xeiam.xchange.btce.service.marketdata.BTCETradesJSONTest; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Tests the BTCEAdapter class - */ -public class BTCEAdapterTest { - - @Test - public void testOrderAdapterWithDepth() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCEDepthJSONTest.class.getResourceAsStream("/marketdata/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BTCEDepth BTCEDepth = mapper.readValue(is, BTCEDepth.class); - - List asks = BTCEAdapters.adaptOrders(BTCEDepth.getAsks(), "BTC", "USD", "ask", ""); - - // verify all fields filled - assertTrue("order type should be ASK", asks.get(0).getType() == OrderType.ASK); - assertTrue("tradableIdentifier should be BTC", asks.get(0).getTradableIdentifier().equals("BTC")); - assertTrue("transactionCurrency should be USD", asks.get(0).getTransactionCurrency().equals("USD")); - - } - - @Test - public void testTradeAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCETradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BTCETrade[] BTCETrades = mapper.readValue(is, BTCETrade[].class); - - Trades trades = BTCEAdapters.adaptTrades(BTCETrades); - // System.out.println(trades.getTrades().size()); - assertTrue("Trades size should be 150", trades.getTrades().size() == 150); - - // verify all fields filled - assertTrue("price should be 13.07", trades.getTrades().get(0).getPrice().getAmount().doubleValue() == 13.07); - assertTrue("order type should be ASK", trades.getTrades().get(0).getType() == OrderType.ASK); - assertTrue("tradableAmount should be 1.0", trades.getTrades().get(0).getTradableAmount().doubleValue() == 1.0); - assertTrue("tradableIdentifier should be BTC", trades.getTrades().get(0).getTradableIdentifier().equals("BTC")); - // assertTrue("transactionCurrency should be PLN", trades.getTrades().get(0).getTransactionCurrency().equals("PLN")); - assertEquals("timestamp incorrect", "2012-12-22 08:06:14 GMT", DateUtils.toUTCString(trades.getTrades().get(0).getTimestamp())); - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCETickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BTCETicker BTCETicker = mapper.readValue(is, BTCETicker.class); - - Ticker ticker = BTCEAdapters.adaptTicker(BTCETicker, "BTC", "USD"); - - assertEquals("last should be USD 13.07", ticker.getLast().toString(), "USD 13.07"); - assertEquals("low should be USD 13", ticker.getLow().toString(), "USD 13"); - assertEquals("high should be USD 13.23", ticker.getHigh().toString(), "USD 13.23"); - assertEquals("volume should be 3078.62284", ticker.getVolume(), new BigDecimal("3078.62284")); - assertEquals("Tradable Identifier should be BTC", ticker.getTradableIdentifier(), "BTC"); - - } -} diff --git a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEUtilsTest.java b/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEUtilsTest.java deleted file mode 100644 index abd81e89a..000000000 --- a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/BTCEUtilsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.xeiam.xchange.btce.BTCEUtils; -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * Test class for BTCEUtils class - */ -public class BTCEUtilsTest { - - @Test - public void testIsValidCurrencyPair() { - - assertTrue(BTCEUtils.isValidCurrencyPair(CurrencyPair.BTC_USD)); - assertTrue(BTCEUtils.isValidCurrencyPair(new CurrencyPair("BTC", "USD"))); - assertFalse(BTCEUtils.isValidCurrencyPair(new CurrencyPair("BTC", "CAD"))); - } -} diff --git a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/account/BTCEAccountInfoJSONTest.java b/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/account/BTCEAccountInfoJSONTest.java deleted file mode 100644 index 4bf15f69c..000000000 --- a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/account/BTCEAccountInfoJSONTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.account; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.btce.dto.account.BTCEAccountInfoReturn; - -/** - * Test BTCEDepth JSON parsing - */ -public class BTCEAccountInfoJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCEAccountInfoJSONTest.class.getResourceAsStream("/account/example-account-info-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BTCEAccountInfoReturn ai = mapper.readValue(is, BTCEAccountInfoReturn.class); - - // Verify that the example data was unmarshalled correctly - assertThat(ai.getReturnValue().getRights().isInfo(), is(equalTo(true))); - assertThat(ai.getReturnValue().getFunds().get("btc"), is(equalTo(new BigDecimal("0.1")))); - } -} diff --git a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCEDepthJSONTest.java b/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCEDepthJSONTest.java deleted file mode 100644 index 7bb692144..000000000 --- a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCEDepthJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.btce.dto.marketdata.BTCEDepth; - -/** - * Test BTCEDepth JSON parsing - */ -public class BTCEDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCEDepthJSONTest.class.getResourceAsStream("/marketdata/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BTCEDepth BTCEDepth = mapper.readValue(is, BTCEDepth.class); - - // Verify that the example data was unmarshalled correctly - assertThat(BTCEDepth.getAsks().get(0)[0], is(equalTo(new BigDecimal("13.07")))); - } -} diff --git a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETickerJSONTest.java b/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETickerJSONTest.java deleted file mode 100644 index b4514f642..000000000 --- a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETickerJSONTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.btce.dto.marketdata.BTCETicker; - -/** - * Test BTCETicker JSON parsing - */ -public class BTCETickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCETickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BTCETicker BTCETicker = mapper.readValue(is, BTCETicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Last value", BTCETicker.getTicker().getLast(), equalTo(new BigDecimal("13.07"))); - assertThat("Unexpected Return High value", BTCETicker.getTicker().getHigh(), equalTo(new BigDecimal("13.23"))); - assertThat("Unexpected Return Low value", BTCETicker.getTicker().getLow(), equalTo(new BigDecimal("13"))); - assertThat("Unexpected Return Volume value", BTCETicker.getTicker().getVol(), equalTo(new BigDecimal("40418.44988"))); - } - -} diff --git a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETradesJSONTest.java b/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETradesJSONTest.java deleted file mode 100644 index 32097e34d..000000000 --- a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/marketdata/BTCETradesJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.btce.dto.marketdata.BTCETrade; - -/** - * Test BTCETrade[] JSON parsing - */ -public class BTCETradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCETradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - BTCETrade[] BTCETrades = mapper.readValue(is, BTCETrade[].class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", BTCETrades[0].getPrice(), equalTo(new BigDecimal("13.07"))); - // System.out.println(BTCETrades[0].toString()); - } -} diff --git a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/trade/BTCETradeDataJSONTest.java b/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/trade/BTCETradeDataJSONTest.java deleted file mode 100644 index bd5e6a4fc..000000000 --- a/xchange-btce/src/test/java/com/xeiam/xchange/btce/service/trade/BTCETradeDataJSONTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.btce.service.trade; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import org.hamcrest.CoreMatchers; -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.btce.dto.marketdata.BTCEReturn; -import com.xeiam.xchange.btce.dto.trade.BTCECancelOrderResult; -import com.xeiam.xchange.btce.dto.trade.BTCECancelOrderReturn; -import com.xeiam.xchange.btce.dto.trade.BTCEOpenOrdersReturn; -import com.xeiam.xchange.btce.dto.trade.BTCEOrder; -import com.xeiam.xchange.btce.dto.trade.BTCEPlaceOrderResult; -import com.xeiam.xchange.btce.dto.trade.BTCEPlaceOrderReturn; - -/** - * Test BTCEDepth JSON parsing - */ -public class BTCETradeDataJSONTest { - - @Test - public void testOpenOrders() throws IOException { - - BTCEOpenOrdersReturn result = getResult("/trade/example-open-orders-data.json", BTCEOpenOrdersReturn.class); - // Verify that the example data was unmarshalled correctly - Map rv = result.getReturnValue(); - assertThat(rv.keySet(), is(CoreMatchers. equalTo(new HashSet(Arrays.asList(343152L))))); - assertThat(rv.get(343152L).getTimestampCreated(), is(equalTo(1342448420L))); - } - - @Test - public void testCancelOrder() throws IOException { - - BTCECancelOrderReturn result = getResult("/trade/example-cancel-order-data.json", BTCECancelOrderReturn.class); - // Verify that the example data was unmarshalled correctly - BTCECancelOrderResult rv = result.getReturnValue(); - Map funds = rv.getFunds(); - assertThat(funds.keySet().containsAll(Arrays.asList("btc", "nmc", "usd")), is(equalTo(true))); - assertThat(funds.get("usd"), is(equalTo(new BigDecimal(325)))); - assertThat(rv.getOrderId(), is(343154L)); - } - - @Test - public void testPlaceOrder() throws IOException { - - BTCEPlaceOrderReturn result = getResult("/trade/example-place-order-data.json", BTCEPlaceOrderReturn.class); - // Verify that the example data was unmarshalled correctly - BTCEPlaceOrderResult rv = result.getReturnValue(); - Map funds = rv.getFunds(); - assertThat(funds.keySet().containsAll(Arrays.asList("btc", "nmc", "usd")), is(equalTo(true))); - assertThat(funds.get("btc"), is(equalTo(new BigDecimal("2.498")))); - assertThat(rv.getOrderId(), is(0L)); - } - - private RC getResult(String file, Class resultClass) throws IOException { - - // Read in the JSON from the example resources - InputStream is = BTCETradeDataJSONTest.class.getResourceAsStream(file); - - // Use Jackson to parse it - return new ObjectMapper().readValue(is, resultClass); - } -} diff --git a/xchange-btce/src/test/resources/account/example-account-info-data.json b/xchange-btce/src/test/resources/account/example-account-info-data.json deleted file mode 100644 index 09b624054..000000000 --- a/xchange-btce/src/test/resources/account/example-account-info-data.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "success": 1, - "return": { - "funds": { - "usd": 0, - "rur": 0, - "eur": 0, - "btc": 0.1, - "ltc": 0, - "nmc": 0 - }, - "rights": { - "info": 1, - "trade": 1, - "withdraw": 1 - }, - "transaction_count": 1, - "open_orders": 0, - "server_time": 1357712800 - } -} \ No newline at end of file diff --git a/xchange-btce/src/test/resources/marketdata/example-depth-data.json b/xchange-btce/src/test/resources/marketdata/example-depth-data.json deleted file mode 100644 index 7be0706b9..000000000 --- a/xchange-btce/src/test/resources/marketdata/example-depth-data.json +++ /dev/null @@ -1,1206 +0,0 @@ -{ - "asks":[ - [ - 13.07, - 49.5104944 - ], - [ - 13.08, - 0.00021845 - ], - [ - 13.149, - 0.43761792 - ], - [ - 13.15, - 157.48155186 - ], - [ - 13.158, - 0.3 - ], - [ - 13.159, - 13 - ], - [ - 13.169, - 18.55473057 - ], - [ - 13.17, - 4 - ], - [ - 13.175, - 0.53670064 - ], - [ - 13.185, - 10.15266 - ], - [ - 13.189, - 8.4232763 - ], - [ - 13.19, - 13.9321 - ], - [ - 13.191, - 80.57419827 - ], - [ - 13.192, - 7 - ], - [ - 13.193, - 0.45148414 - ], - [ - 13.194, - 1.1265 - ], - [ - 13.196, - 1 - ], - [ - 13.197, - 0.21 - ], - [ - 13.198, - 18.79208767 - ], - [ - 13.199, - 13.81532317 - ], - [ - 13.2, - 151.08 - ], - [ - 13.21, - 3.53754439 - ], - [ - 13.225, - 0.2 - ], - [ - 13.227, - 1.01780176 - ], - [ - 13.228, - 52.58977332 - ], - [ - 13.23, - 1.30540868 - ], - [ - 13.239, - 10.65 - ], - [ - 13.24, - 40.15555659 - ], - [ - 13.244, - 0.57192 - ], - [ - 13.245, - 8.19235181 - ], - [ - 13.248, - 25.52198284 - ], - [ - 13.249, - 23.91540692 - ], - [ - 13.25, - 248.0962 - ], - [ - 13.259, - 0.125 - ], - [ - 13.26, - 2.5 - ], - [ - 13.27, - 10.5189 - ], - [ - 13.28, - 10 - ], - [ - 13.299, - 0.57 - ], - [ - 13.3, - 210.47623997 - ], - [ - 13.33, - 6.274 - ], - [ - 13.34, - 4 - ], - [ - 13.349, - 0.2395 - ], - [ - 13.35, - 19.3 - ], - [ - 13.354, - 1.39 - ], - [ - 13.37, - 2 - ], - [ - 13.371, - 0.16014 - ], - [ - 13.372, - 0.44 - ], - [ - 13.378, - 16.1086 - ], - [ - 13.386, - 2 - ], - [ - 13.39, - 2 - ], - [ - 13.398, - 3 - ], - [ - 13.399, - 2.829 - ], - [ - 13.4, - 275.87407094 - ], - [ - 13.423, - 0.9 - ], - [ - 13.429, - 0.10386768 - ], - [ - 13.43, - 1 - ], - [ - 13.438, - 2 - ], - [ - 13.44, - 11.976 - ], - [ - 13.45, - 3.62320387 - ], - [ - 13.46, - 5 - ], - [ - 13.468, - 9.7695 - ], - [ - 13.478, - 1.16683249 - ], - [ - 13.48, - 0.459 - ], - [ - 13.482, - 1.16683249 - ], - [ - 13.489, - 0.5 - ], - [ - 13.49, - 6.58 - ], - [ - 13.498, - 0.88467374 - ], - [ - 13.5, - 207.88126746 - ], - [ - 13.51, - 1.5 - ], - [ - 13.538, - 0.4 - ], - [ - 13.549, - 4.69251575 - ], - [ - 13.55, - 165.59 - ], - [ - 13.56, - 4.13355822 - ], - [ - 13.571, - 30 - ], - [ - 13.587, - 10.271 - ], - [ - 13.588, - 19.9 - ], - [ - 13.6, - 121.0120933 - ], - [ - 13.602, - 0.67924886 - ], - [ - 13.62, - 2.20204166 - ], - [ - 13.65, - 36.69521978 - ], - [ - 13.68, - 0.5 - ], - [ - 13.687, - 10 - ], - [ - 13.699, - 3.37017069 - ], - [ - 13.7, - 8.8238245 - ], - [ - 13.744, - 4 - ], - [ - 13.749, - 1 - ], - [ - 13.75, - 10.64596339 - ], - [ - 13.78, - 7.8 - ], - [ - 13.787, - 10 - ], - [ - 13.8, - 126.91226633 - ], - [ - 13.85, - 14.85 - ], - [ - 13.887, - 6.64919281 - ], - [ - 13.89, - 9.06828758 - ], - [ - 13.899, - 2.5 - ], - [ - 13.9, - 371.801 - ], - [ - 13.904, - 0.1 - ], - [ - 13.978, - 10 - ], - [ - 13.98, - 10 - ], - [ - 13.99, - 2.85936348 - ], - [ - 13.999, - 13.86512534 - ], - [ - 14, - 178.71646954 - ], - [ - 14.1, - 200 - ], - [ - 14.195, - 0.1 - ], - [ - 14.25, - 7.149 - ], - [ - 14.271, - 0.1 - ], - [ - 14.35, - 0.33 - ], - [ - 14.45, - 4.73437638 - ], - [ - 14.463, - 0.1 - ], - [ - 14.47, - 10 - ], - [ - 14.488, - 24.89 - ], - [ - 14.5, - 21.44 - ], - [ - 14.501, - 0.1 - ], - [ - 14.555, - 0.1 - ], - [ - 14.689, - 0.1 - ], - [ - 14.789, - 0.1 - ], - [ - 14.799, - 11.82 - ], - [ - 14.9, - 11.15039818 - ], - [ - 14.96, - 1.28 - ], - [ - 14.99, - 4 - ], - [ - 14.999, - 0.1 - ], - [ - 15, - 76.0666241 - ], - [ - 15.02, - 0.1 - ], - [ - 15.095, - 0.67262435 - ], - [ - 15.1, - 0.1 - ], - [ - 15.15, - 0.2 - ], - [ - 15.2, - 20 - ], - [ - 15.398, - 25.4722 - ], - [ - 15.489, - 9.5808 - ], - [ - 15.5, - 17.59 - ], - [ - 15.555, - 0.1 - ], - [ - 15.6, - 0.1 - ], - [ - 15.674, - 0.1 - ], - [ - 15.7, - 4.845 - ], - [ - 15.85, - 2 - ], - [ - 15.855, - 0.1 - ], - [ - 15.9, - 0.3 - ], - [ - 16, - 49.1 - ], - [ - 16.2, - 23.53139815 - ], - [ - 16.415, - 0.1 - ], - [ - 16.5, - 18.3999 - ], - [ - 16.8, - 10 - ], - [ - 16.96, - 0.1 - ], - [ - 17, - 2 - ], - [ - 17.119, - 0.1 - ], - [ - 17.567, - 0.1 - ], - [ - 17.6, - 0.1 - ], - [ - 17.907, - 0.1 - ], - [ - 18, - 4.1 - ], - [ - 18.132, - 0.1 - ], - [ - 18.184, - 0.1 - ] - ], - "bids":[ - [ - 13.069, - 9.767 - ], - [ - 13.067, - 0.39260982 - ], - [ - 13.065, - 6.87499747 - ], - [ - 13.064, - 6.1 - ], - [ - 13.055, - 3.12395052 - ], - [ - 13.053, - 30.07014028 - ], - [ - 13.052, - 11.68709434 - ], - [ - 13.051, - 22.27598659 - ], - [ - 13.05, - 157.94276183 - ], - [ - 13.049, - 0.1 - ], - [ - 13.048, - 0.2 - ], - [ - 13.031, - 0.1 - ], - [ - 13.03, - 2.81083719 - ], - [ - 13.02, - 0.2 - ], - [ - 13.019, - 2.7 - ], - [ - 13.01, - 0.25 - ], - [ - 13.009, - 6.48205168 - ], - [ - 13.005, - 1.3 - ], - [ - 13.003, - 30.07014028 - ], - [ - 13.002, - 20.95894578 - ], - [ - 13.001, - 0.57816844 - ], - [ - 13, - 192.78520208 - ], - [ - 12.997, - 0.155 - ], - [ - 12.995, - 0.16 - ], - [ - 12.982, - 2 - ], - [ - 12.978, - 0.31115651 - ], - [ - 12.971, - 0.14126033 - ], - [ - 12.97, - 0.68008119 - ], - [ - 12.96, - 0.10010033 - ], - [ - 12.958, - 2 - ], - [ - 12.955, - 0.182 - ], - [ - 12.952, - 1.91537061 - ], - [ - 12.951, - 0.1 - ], - [ - 12.95, - 19.96858517 - ], - [ - 12.94, - 0.17 - ], - [ - 12.933, - 3 - ], - [ - 12.929, - 8.42312859 - ], - [ - 12.928, - 3 - ], - [ - 12.927, - 3 - ], - [ - 12.926, - 11.17117614 - ], - [ - 12.925, - 208.83623318 - ], - [ - 12.91, - 7.17885863 - ], - [ - 12.901, - 19.44672262 - ], - [ - 12.9, - 44.12285009 - ], - [ - 12.899, - 5.045 - ], - [ - 12.881, - 24.67278296 - ], - [ - 12.87, - 1.8 - ], - [ - 12.859, - 8.1162 - ], - [ - 12.83, - 0.57191 - ], - [ - 12.81, - 5 - ], - [ - 12.807, - 0.1 - ], - [ - 12.8, - 90 - ], - [ - 12.776, - 0.2113 - ], - [ - 12.754, - 0.4077 - ], - [ - 12.727, - 0.8486 - ], - [ - 12.72, - 10 - ], - [ - 12.707, - 10 - ], - [ - 12.706, - 0.81473152 - ], - [ - 12.7, - 4 - ], - [ - 12.688, - 0.111 - ], - [ - 12.687, - 5 - ], - [ - 12.673, - 11 - ], - [ - 12.668, - 0.3789 - ], - [ - 12.655, - 1.03997391 - ], - [ - 12.611, - 5 - ], - [ - 12.61, - 21.83546 - ], - [ - 12.6, - 78.41868692 - ], - [ - 12.59, - 0.1 - ], - [ - 12.583, - 0.1 - ], - [ - 12.572, - 0.155 - ], - [ - 12.56, - 3.08292957 - ], - [ - 12.503, - 78.78830273 - ], - [ - 12.501, - 1.84612546 - ], - [ - 12.5, - 27.25658994 - ], - [ - 12.499, - 60 - ], - [ - 12.492, - 0.10025538 - ], - [ - 12.47, - 10 - ], - [ - 12.45, - 2.10452691 - ], - [ - 12.4, - 0.10246762 - ], - [ - 12.399, - 2.59780556 - ], - [ - 12.384, - 0.85773676 - ], - [ - 12.38, - 0.115 - ], - [ - 12.33, - 51 - ], - [ - 12.31, - 0.1 - ], - [ - 12.3, - 175.016 - ], - [ - 12.299, - 0.116 - ], - [ - 12.279, - 0.10937039 - ], - [ - 12.27, - 43.60445185 - ], - [ - 12.23, - 2.15627779 - ], - [ - 12.222, - 0.102 - ], - [ - 12.22, - 55 - ], - [ - 12.212, - 0.4237404 - ], - [ - 12.202, - 0.324 - ], - [ - 12.201, - 0.2592 - ], - [ - 12.2, - 4.32943336 - ], - [ - 12.19, - 0.194 - ], - [ - 12.18, - 0.346 - ], - [ - 12.131, - 0.12 - ], - [ - 12.11, - 21.485 - ], - [ - 12.1, - 2.41904532 - ], - [ - 12.051, - 0.233 - ], - [ - 12.022, - 28.86857558 - ], - [ - 12.01, - 10 - ], - [ - 12, - 20.97591629 - ], - [ - 11.976, - 2.66924002 - ], - [ - 11.9, - 1.03072801 - ], - [ - 11.862, - 0.15 - ], - [ - 11.85, - 2.03984532 - ], - [ - 11.81, - 10 - ], - [ - 11.8, - 0.27 - ], - [ - 11.733, - 2 - ], - [ - 11.7, - 46.39074512 - ], - [ - 11.51, - 10 - ], - [ - 11.5, - 11.662 - ], - [ - 11.426, - 3.79310602 - ], - [ - 11.424, - 10 - ], - [ - 11.4, - 1.05498676 - ], - [ - 11.299, - 0.78 - ], - [ - 11.261, - 3.96742659 - ], - [ - 11.21, - 15.29936751 - ], - [ - 11.2, - 0.52259547 - ], - [ - 11.178, - 10.36 - ], - [ - 11.03, - 10.46903191 - ], - [ - 11.02, - 10 - ], - [ - 11, - 32.60903744 - ], - [ - 10.9, - 13.3 - ], - [ - 10.82, - 5.01719134 - ], - [ - 10.8, - 3.81575644 - ], - [ - 10.792, - 13.5 - ], - [ - 10.737, - 1.5856 - ], - [ - 10.7, - 22.15 - ], - [ - 10.68, - 3.624 - ], - [ - 10.65, - 1 - ], - [ - 10.642, - 22 - ], - [ - 10.63, - 10.90737526 - ], - [ - 10.626, - 6.85557877 - ], - [ - 10.58, - 2 - ], - [ - 10.57, - 24.23525451 - ], - [ - 10.53, - 10.32851252 - ], - [ - 10.501, - 10 - ], - [ - 10.5, - 3.71092472 - ], - [ - 10.48, - 1 - ], - [ - 10.411, - 3.629 - ], - [ - 10.4, - 1 - ], - [ - 10.356, - 12.43209654 - ], - [ - 10.3, - 35.60900115 - ], - [ - 10.252, - 1.26155535 - ], - [ - 10.25, - 0.11 - ], - [ - 10.21, - 20.69754035 - ], - [ - 10.2, - 1.62 - ] - ] -} \ No newline at end of file diff --git a/xchange-btce/src/test/resources/marketdata/example-ticker-data.json b/xchange-btce/src/test/resources/marketdata/example-ticker-data.json deleted file mode 100644 index c3dda4947..000000000 --- a/xchange-btce/src/test/resources/marketdata/example-ticker-data.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "ticker":{ - "high":13.23, - "low":13, - "avg":13.115, - "vol":40418.44988, - "vol_cur":3078.62284, - "last":13.07, - "buy":13.07, - "sell":13.069, - "server_time":1356203529 - } -} \ No newline at end of file diff --git a/xchange-btce/src/test/resources/marketdata/example-trades-data.json b/xchange-btce/src/test/resources/marketdata/example-trades-data.json deleted file mode 100644 index f74243500..000000000 --- a/xchange-btce/src/test/resources/marketdata/example-trades-data.json +++ /dev/null @@ -1,1352 +0,0 @@ -[ - { - "date":1356203582, - "price":13.07, - "amount":6, - "tid":413400, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356203485, - "price":13.07, - "amount":8.28, - "tid":413399, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356203425, - "price":13.07, - "amount":6.06, - "tid":413398, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356203367, - "price":13.07, - "amount":10, - "tid":413397, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356203330, - "price":13.07, - "amount":0.2, - "tid":413396, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203330, - "price":13.07, - "amount":0.396073, - "tid":413395, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203330, - "price":13.07, - "amount":0.1, - "tid":413394, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203330, - "price":13.07, - "amount":0.243433, - "tid":413393, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203330, - "price":13.071, - "amount":0.92, - "tid":413392, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203127, - "price":13.08, - "amount":4.974, - "tid":413390, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356203123, - "price":13.08, - "amount":6.3419, - "tid":413389, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356203107, - "price":13.08, - "amount":0.1, - "tid":413388, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203107, - "price":13.08, - "amount":7.84307, - "tid":413387, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203107, - "price":13.081, - "amount":12, - "tid":413386, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203107, - "price":13.085, - "amount":0.954816, - "tid":413385, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356203065, - "price":13.09, - "amount":10, - "tid":413384, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356202546, - "price":13.1, - "amount":67.786, - "tid":413383, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356201199, - "price":13.15, - "amount":0.952, - "tid":413375, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356199296, - "price":13.08, - "amount":14.7499, - "tid":413369, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356199296, - "price":13.081, - "amount":1.52122, - "tid":413368, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356199296, - "price":13.081, - "amount":0.1, - "tid":413367, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356199296, - "price":13.084, - "amount":0.1, - "tid":413366, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356199276, - "price":13.085, - "amount":0.1, - "tid":413365, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356199276, - "price":13.085, - "amount":0.304119, - "tid":413364, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356199258, - "price":13.086, - "amount":1.94473, - "tid":413363, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356199209, - "price":13.096, - "amount":0.78, - "tid":413362, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356198522, - "price":13.096, - "amount":0.22, - "tid":413346, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356193728, - "price":13.15, - "amount":0.303222, - "tid":413327, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356193728, - "price":13.15, - "amount":1.55678, - "tid":413326, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356193728, - "price":13.146, - "amount":1, - "tid":413325, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356191446, - "price":13.07, - "amount":0.152, - "tid":413322, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356190386, - "price":13.092, - "amount":6.7, - "tid":413320, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356188718, - "price":13.092, - "amount":25, - "tid":413317, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356188684, - "price":13.169, - "amount":0.779612, - "tid":413315, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356188635, - "price":13.092, - "amount":36.6478, - "tid":413314, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356188635, - "price":13.094, - "amount":12.2637, - "tid":413313, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356188635, - "price":13.095, - "amount":4.08846, - "tid":413312, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356188498, - "price":13.095, - "amount":4.71154, - "tid":413311, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356187448, - "price":13.095, - "amount":5.2, - "tid":413308, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186830, - "price":13.092, - "amount":0.3962, - "tid":413307, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356186635, - "price":13.07, - "amount":0.0009333, - "tid":413305, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356186613, - "price":13.07, - "amount":0.411909, - "tid":413304, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356186588, - "price":13.07, - "amount":1.2115, - "tid":413303, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356186578, - "price":13.072, - "amount":0.311423, - "tid":413302, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186578, - "price":13.074, - "amount":10, - "tid":413301, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186578, - "price":13.075, - "amount":12, - "tid":413300, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186578, - "price":13.076, - "amount":3.56145, - "tid":413299, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186578, - "price":13.081, - "amount":1, - "tid":413298, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186578, - "price":13.087, - "amount":0.2264, - "tid":413297, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186279, - "price":13.092, - "amount":0.6038, - "tid":413296, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356186078, - "price":13.101, - "amount":0.6, - "tid":413295, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356186057, - "price":13.1, - "amount":0.899598, - "tid":413294, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356185703, - "price":13.1, - "amount":0.100402, - "tid":413292, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356185663, - "price":13.101, - "amount":0.543943, - "tid":413291, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356185599, - "price":13.101, - "amount":1.1, - "tid":413290, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356184074, - "price":13.188, - "amount":3.1, - "tid":413288, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356184074, - "price":13.186, - "amount":1, - "tid":413287, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356181664, - "price":13.073, - "amount":0.270939, - "tid":413282, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356179836, - "price":13.197, - "amount":1.8855, - "tid":413259, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179739, - "price":13.068, - "amount":0.94, - "tid":413258, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356179576, - "price":13.198, - "amount":1.20791, - "tid":413256, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179576, - "price":13.198, - "amount":0.290286, - "tid":413255, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179576, - "price":13.198, - "amount":10.311, - "tid":413254, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.197, - "amount":5, - "tid":413253, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.192, - "amount":30, - "tid":413252, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.192, - "amount":0.6005, - "tid":413251, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.188, - "amount":5, - "tid":413250, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.187, - "amount":1.38811, - "tid":413249, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.179, - "amount":0.1, - "tid":413248, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.17, - "amount":4.19428, - "tid":413247, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.167, - "amount":6.95497, - "tid":413246, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.152, - "amount":3.35905, - "tid":413245, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.152, - "amount":1, - "tid":413244, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.151, - "amount":6.84373, - "tid":413243, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.15, - "amount":0.127, - "tid":413242, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.149, - "amount":0.99, - "tid":413241, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179568, - "price":13.143, - "amount":0.5, - "tid":413240, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179567, - "price":13.142, - "amount":0.79, - "tid":413239, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179483, - "price":13.13, - "amount":0.310669, - "tid":413238, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356179287, - "price":13.1, - "amount":1.4416, - "tid":413237, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356178837, - "price":13.1, - "amount":1.578, - "tid":413236, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356178601, - "price":13.051, - "amount":7.67951, - "tid":413233, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356178601, - "price":13.053, - "amount":0.1, - "tid":413232, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356178601, - "price":13.053, - "amount":0.570486, - "tid":413231, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.051, - "amount":39.7204, - "tid":413224, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.052, - "amount":0.2, - "tid":413223, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.052, - "amount":1.1288, - "tid":413222, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.052, - "amount":0.99, - "tid":413221, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.052, - "amount":16.259, - "tid":413220, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.053, - "amount":3.02565, - "tid":413219, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.053, - "amount":5.35593, - "tid":413218, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177240, - "price":13.054, - "amount":28.782, - "tid":413217, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356177211, - "price":13.054, - "amount":23, - "tid":413216, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356176766, - "price":13.054, - "amount":5, - "tid":413215, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356176634, - "price":13.054, - "amount":23.1871, - "tid":413214, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356176634, - "price":13.055, - "amount":0.732888, - "tid":413213, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356175209, - "price":13.053, - "amount":2.64407, - "tid":413203, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356175186, - "price":13.053, - "amount":2.15593, - "tid":413202, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356175186, - "price":13.053, - "amount":0.2, - "tid":413201, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356173498, - "price":13.053, - "amount":4.09475, - "tid":413200, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356173498, - "price":13.055, - "amount":1, - "tid":413199, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356173498, - "price":13.055, - "amount":1.75865, - "tid":413198, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356173422, - "price":13.062, - "amount":0.53, - "tid":413197, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356173145, - "price":13.062, - "amount":0.93192, - "tid":413193, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356172707, - "price":13.062, - "amount":2.59578, - "tid":413189, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356172088, - "price":13.062, - "amount":0.340669, - "tid":413187, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356171187, - "price":13.1, - "amount":0.231, - "tid":413182, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356170337, - "price":13.051, - "amount":68.9575, - "tid":413180, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356170337, - "price":13.052, - "amount":6.34148, - "tid":413179, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356170313, - "price":13.051, - "amount":132.189, - "tid":413178, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356170313, - "price":13.052, - "amount":10, - "tid":413177, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356170313, - "price":13.053, - "amount":6, - "tid":413176, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356170313, - "price":13.053, - "amount":1, - "tid":413175, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356170313, - "price":13.053, - "amount":0.310971, - "tid":413174, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356170074, - "price":13.08, - "amount":4.21644, - "tid":413173, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356169262, - "price":13.08, - "amount":0.290868, - "tid":413171, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356168251, - "price":13.051, - "amount":5.1397, - "tid":413159, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356168251, - "price":13.052, - "amount":14.8603, - "tid":413158, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356168118, - "price":13.052, - "amount":0.1397, - "tid":413157, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.051, - "amount":24.2378, - "tid":413156, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.053, - "amount":1.39089, - "tid":413155, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.053, - "amount":10.0909, - "tid":413154, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.053, - "amount":0.3, - "tid":413153, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.054, - "amount":0.1, - "tid":413152, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.056, - "amount":10, - "tid":413151, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.056, - "amount":0.1, - "tid":413150, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.057, - "amount":10.58, - "tid":413149, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.057, - "amount":15, - "tid":413148, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167521, - "price":13.07, - "amount":0.100403, - "tid":413147, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167347, - "price":13.08, - "amount":4.20268, - "tid":413146, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167347, - "price":13.081, - "amount":18.6094, - "tid":413145, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167347, - "price":13.082, - "amount":8, - "tid":413144, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167347, - "price":13.089, - "amount":1, - "tid":413143, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356167347, - "price":13.09, - "amount":1.39, - "tid":413142, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356165030, - "price":13.15, - "amount":1, - "tid":413136, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356165029, - "price":13.149, - "amount":0.1, - "tid":413135, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356165029, - "price":13.147, - "amount":0.505456, - "tid":413134, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356164947, - "price":13.13, - "amount":1, - "tid":413133, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356164934, - "price":13.079, - "amount":0.198422, - "tid":413132, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356164116, - "price":13.057, - "amount":0.32323, - "tid":413127, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356164107, - "price":13.057, - "amount":1.81263, - "tid":413126, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356164101, - "price":13.057, - "amount":1.40019, - "tid":413125, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356164088, - "price":13.057, - "amount":9.52675, - "tid":413124, - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid" - }, - { - "date":1356164019, - "price":13.057, - "amount":5.00567, - "tid":413123, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356164019, - "price":13.057, - "amount":0.1, - "tid":413122, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356163890, - "price":13.068, - "amount":1, - "tid":413121, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356163890, - "price":13.068, - "amount":0.2, - "tid":413120, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356163890, - "price":13.068, - "amount":0.1, - "tid":413119, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356163733, - "price":13.069, - "amount":0.1, - "tid":413118, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - }, - { - "date":1356163574, - "price":13.07, - "amount":1, - "tid":413117, - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask" - } -] \ No newline at end of file diff --git a/xchange-btce/src/test/resources/trade/example-cancel-order-data.json b/xchange-btce/src/test/resources/trade/example-cancel-order-data.json deleted file mode 100644 index 4fb0e548f..000000000 --- a/xchange-btce/src/test/resources/trade/example-cancel-order-data.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "success":1, - "return":{ - "order_id":343154, - "funds":{ - "usd":325, - "btc":24.998, - "sc":121.998, - "ltc":0, - "ruc":0, - "nmc":0 - } - } -} - \ No newline at end of file diff --git a/xchange-btce/src/test/resources/trade/example-open-orders-data.json b/xchange-btce/src/test/resources/trade/example-open-orders-data.json deleted file mode 100644 index 006a47525..000000000 --- a/xchange-btce/src/test/resources/trade/example-open-orders-data.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "success":1, - "return":{ - "343152":{ - "pair":"btc_usd", - "type":"sell", - "amount":1.00000000, - "rate":3.00000000, - "timestamp_created":1342448420, - "status":0 - } - } -} \ No newline at end of file diff --git a/xchange-btce/src/test/resources/trade/example-place-order-data.json b/xchange-btce/src/test/resources/trade/example-place-order-data.json deleted file mode 100644 index fd0e3ba5d..000000000 --- a/xchange-btce/src/test/resources/trade/example-place-order-data.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "success":1, - "return":{ - "received":0.1, - "remains":0, - "order_id":0, - "funds":{ - "usd":325, - "btc":2.498, - "sc":121.998, - "ltc":0, - "ruc":0, - "nmc":0 - } - } -} \ No newline at end of file diff --git a/xchange-campbx/api-specification.txt b/xchange-campbx/api-specification.txt deleted file mode 100644 index 6db6d7163..000000000 --- a/xchange-campbx/api-specification.txt +++ /dev/null @@ -1,20 +0,0 @@ -CampBX Exchange API specification -================================ - -Public API - -Documentation -------------- -https://campbx.com/api.php - -Ticker ------- -http://CampBX.com/api/xticker.php - -Orders ------- -http://CampBX.com/api/xdepth.php - -Pacing ------- -Please do not abuse the API interface with brute-forcing bots, and ensure that there is at least 500 millisecond latency between two calls. \ No newline at end of file diff --git a/xchange-campbx/pom.xml b/xchange-campbx/pom.xml deleted file mode 100644 index b9a3edf56..000000000 --- a/xchange-campbx/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-campbx - - Campbx Exchange - XChange implementations for the CampBX Exchange. - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - - diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CambBXUtils.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CambBXUtils.java deleted file mode 100644 index ac4e2b03f..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CambBXUtils.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx; - -import com.xeiam.xchange.ExchangeException; -import com.xeiam.xchange.campbx.dto.CampBXResponse; - -/** - * @author Matija Mazi
- * @created 2/19/13 7:49 PM - */ -public class CambBXUtils { - - public static void handleError(CampBXResponse result) { - - if (result.isError()) { - throw new ExchangeException(result.getError()); - } - } -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBX.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBX.java deleted file mode 100644 index d3aac1b50..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBX.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx; - -import java.math.BigDecimal; - -import javax.annotation.Nonnull; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; - -import com.xeiam.xchange.campbx.dto.CampBXResponse; -import com.xeiam.xchange.campbx.dto.account.MyFunds; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXOrderBook; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXTicker; -import com.xeiam.xchange.campbx.dto.trade.MyOpenOrders; - -/** @author Matija Mazi */ -@Path("api") -@Produces("application/json") -public interface CampBX { - - @POST - @Path("xdepth.php") - @Produces("application/json") - public CampBXOrderBook getOrderBook(); - - @POST - @Path("xticker.php") - @Produces("application/json") - public CampBXTicker getTicker(); - - /** - * An API call to obtain list pending orders for an account can be made in following format: https://CampBX.com/api/myorders.php POST: user=USERNAME pass=PASSWORD Result is a JSON object with two - * arrays: Buy and Sell. Each array includes a sub-array of open Buy or Sell orders. - */ - @POST - @Path("myorders.php") - public MyOpenOrders getOpenOrders(@FormParam("user") String user, @FormParam("pass") String password); - - /** - * An API call to obtain latest account balances can be made in following format: https://CampBX.com/api/myfunds.php POST: user=USERNAME pass=PASSWORD Result is a JSON object with six members. First - * two members show Total USD and BTC balances for a given account, provided the login credentials are correct. Next two members show Liquid USD and BTC balances not tied up in open orders on the - * order book. Last two members show Margin Account USD and BTC balances. When you open or close a margin position, CampBX transparently moves funds in and out of the Margin Account; hence, no - * explicit funds-transfer is required. - */ - @POST - @Path("myfunds.php") - public MyFunds getMyFunds(@FormParam("user") String user, @FormParam("pass") String password); - - /** - * An API call to placing an order can be made in following format: - *

- * https://CampBX.com/api/tradeenter.php POST: user=USERNAME pass=PASSWORD TradeMode=QuickBuy Quantity=DECIMAL Price=DECIMAL - *

- * OR - *

- * https://CampBX.com/api/tradeenter.php POST: user=USERNAME pass=PASSWORD TradeMode=QuickSell Quantity=DECIMAL Price=DECIMAL Please note that the parameters listed below are case-sensitive. The - * TradeMode parameter refers to the type of the order, and permitted values are QuickBuy or QuickSell. Quick orders are described in more detail on the FAQ page; essentially they are limit-price - * orders that stay open on CampBX order book for up to 31 days. Quantity and Price are decimal values that must follow all rules / limits set by CampBX. Minimum quantity to place an order is 0.1 - * Bitcoins. - *

- * Return Values: If your entire order is executed immediately, the return value will be '0' in JSON format: {"Success":"0"} - *

- * In case the order was not filled entirely, the return value would be corresponding Order ID in our Order Book. - */ - @POST - @Path("tradeenter.php") - public CampBXResponse tradeEnter(@FormParam("user") String user, @FormParam("pass") String password, @FormParam("TradeMode") TradeMode mode, @FormParam("Quantity") BigDecimal quantity, - @FormParam("Price") BigDecimal price); - - /** - * An API call to place an advanced order can be made in following format: - *

- * https://CampBX.com/api/tradeadv.php - *

- * POST Mandatory fields: user=USERNAME pass=PASSWORD TradeMode=AdvancedBuy OR TradeMode=AdvancedSell Price=DECIMAL OR Price=Market Quantity=DECIMAL - *

- * Optional Fields: FillType=Incremental OR FillType=AON OR FillType=FOK (If omitted, default Fill Type is Incremental) - *

- * DarkPool=No OR DarkPool=Yes (Default is No Darkpool) - *

- * Expiry=YYYY/MM/DD (Allowed range is 1 Hour through 31 Days) (Many additional formats are supported as well, including relative values! Please contact our helpdesk if you would like additional - * information about time/date formats.) - *

- * Please note that all parameters are case-sensitive. We highly recommend executing small trades and experimenting with all of the possible parameter values before implementing them in your - * strategy. Expiry date field allows using many relative and absolute values and offers a lot of flexibility. If this is something that you rely on heavily in your strategy, please contact us for - * details about additional formats. Return Values: If your entire order is executed immediately, the return value will be '0' in JSON format: {"Success":"0"} - *

- * In case the order was not filled entirely, the return value would be corresponding Order ID in our Order Book. - */ - @POST - @Path("tradeadv.php") - public CampBXResponse tradeAdvancedEnter(@Nonnull @FormParam("user") String user, @Nonnull @FormParam("pass") String password, @Nonnull @FormParam("TradeMode") AdvTradeMode mode, - @Nonnull @FormParam("Quantity") BigDecimal quantity, @Nonnull @FormParam("Price") BigDecimal price, @FormParam("FillType") FillType fillType, @FormParam("DarkPool") DarkPool darkPool, - @FormParam("Expiry") String expiry - // todo: Date - ); - - @POST - @Path("tradeadv.php") - public CampBXResponse tradeAdvancedMarketEnter(@Nonnull @FormParam("user") String user, @Nonnull @FormParam("pass") String password, @Nonnull @FormParam("TradeMode") AdvTradeMode mode, - @Nonnull @FormParam("Quantity") BigDecimal quantity, @Nonnull @FormParam("Price") MarketPrice market, @FormParam("FillType") FillType fillType, @FormParam("DarkPool") DarkPool darkPool, - @FormParam("Expiry") String expiry - // todo: Date - ); - - /** - * An API call to cancel an open order can be made in following format: - *

- * https://CampBX.com/api/tradecancel.php POST: user=USERNAME pass=PASSWORD Type=Buy OrderID=NUMERIC_ID - *

- * OR - *

- * https://CampBX.com/api/tradecancel.php POST: user=USERNAME pass=PASSWORD Type=Sell OrderID=NUMERIC_ID - *

- * Please note that the parameters for this call are case-sensitive. Type and OrderID parameters must match the exact information provided by myorders.php call outlined in the previous section. The - * "Type" parameter refers to the type of order; permitted values are Buy or Sell. "OrderID" must be a numeric value corresponding to the order that you are attempting to cancel. - */ - @POST - @Path("tradecancel.php") - public CampBXResponse tradeCancel(@FormParam("user") String user, @FormParam("pass") String password, @FormParam("Type") OrderType type, @FormParam("OrderID") Long orderId); - - /** - * An API call to get Bitcoin deposit address for your account can be made in following format: - *

- * https://CampBX.com/api/getbtcaddr.php POST: user=USERNAME pass=PASSWORD - *

- * Please note that the parameters are case-sensitive. API call returns "Success" and the Bitcoin Address if request is successful. An address generated through this method is your dedicated - * address, and can be used to make deposits as long as you would like. - */ - @POST - @Path("getbtcaddr.php") - public CampBXResponse getDepositAddress(@FormParam("user") String user, @FormParam("pass") String password); - - /** - * An API call to send Bitcoins to an address can be made in following format: - *

- * https://CampBX.com/api/sendbtc.php POST: user=USERNAME pass=PASSWORD BTCTo=ADDRESS BTCAmt=DECIMAL - *

- * Please note that the parameters listed below are case-sensitive. The BTCTo parameter must be a valid Bitcoin address, while BTCAmt must be a decimal value less than your account balance. API call - * returns "Success" and the TX_ID if transfer is successful. The default withdrawal limit is 500 Bitcoins per 24 hours, and this limit can be raised by submitting a ticket to the helpdesk. - */ - @POST - @Path("sendbtc.php") - public CampBXResponse withdrawBtc(@FormParam("user") String user, @FormParam("pass") String password, @FormParam("BTCTo") String btcToAddress, @FormParam("BTCAmt") BigDecimal amount); - - public static enum TradeMode { - QuickBuy, QuickSell - } - - public static enum OrderType { - Buy, Sell - } - - public static enum AdvTradeMode { - AdvancedBuy, AdvancedSell - } - - public static enum FillType { - Incremental, AON, FOK - } - - public static enum DarkPool { - Yes, No - } - - public static enum MarketPrice { - Market - } - -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXAdapters.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXAdapters.java deleted file mode 100644 index 40c2529bb..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXAdapters.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx; - -import java.math.BigDecimal; -import java.text.MessageFormat; -import java.util.ArrayList; -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -import com.xeiam.xchange.campbx.dto.marketdata.CampBXOrderBook; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXTicker; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.trade.LimitOrder; - -/** - * Various adapters for converting from CampBX DTOs to XChange DTOs - */ -public final class CampBXAdapters { - - /** - * CampBXOrderBook to a OrderBook Object - * - * @param orderBook - * @param currency - * @param tradableIdentifier - * @return - */ - public static OrderBook adaptOrders(CampBXOrderBook orderBook, String currency, String tradableIdentifier) { - - List asks = createOrders(tradableIdentifier, currency, Order.OrderType.ASK, orderBook.getAsks()); - List bids = createOrders(tradableIdentifier, currency, Order.OrderType.BID, orderBook.getBids()); - return new OrderBook(asks, bids); - } - - private static List createOrders(String tradableIdentifier, String currency, Order.OrderType orderType, List> orders) { - - List limitOrders = new ArrayList(); - for (List ask : orders) { - checkArgument(ask.size() == 2, "Expected a pair (price, amount) but got {0} elements.", ask.size()); - limitOrders.add(createOrder(tradableIdentifier, currency, ask, orderType)); - } - return limitOrders; - } - - private static LimitOrder createOrder(String tradableIdentifier, String currency, List priceAndAmount, Order.OrderType orderType) { - - return new LimitOrder(orderType, priceAndAmount.get(1), tradableIdentifier, currency, BigMoney.of(CurrencyUnit.USD, priceAndAmount.get(0))); - } - - private static void checkArgument(boolean argument, String msgPattern, Object... msgArgs) { - - if (!argument) { - throw new IllegalArgumentException(MessageFormat.format(msgPattern, msgArgs)); - } - } - - /** - * Adapts a CampBXTicker to a Ticker Object - * - * @param campbxTicker - * @param currency - * @param tradableIdentifier - * @return - */ - public static Ticker adaptTicker(CampBXTicker campbxTicker, String currency, String tradableIdentifier) { - - BigMoney last = MoneyUtils.parse(currency + " " + campbxTicker.getLast()); - BigMoney bid = MoneyUtils.parse(currency + " " + campbxTicker.getBid()); - BigMoney ask = MoneyUtils.parse(currency + " " + campbxTicker.getAsk()); - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withBid(bid).withAsk(ask).build(); - - } - -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXExchange.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXExchange.java deleted file mode 100644 index 7320aee84..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXExchange.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.campbx.service.marketdata.polling.CampBXPollingAccountService; -import com.xeiam.xchange.campbx.service.marketdata.polling.CampBXPollingMarketDataService; -import com.xeiam.xchange.campbx.service.marketdata.polling.CampBXPollingTradeService; - -/** - * @author Matija Mazi
- * WARNING: Please heed the CampbBX's note: - *

- * Important: Please note that using API and Website interfaces concurrently may cause login interference issues. Please use different external IP addresses, or pause the bot when you need to - * use the Web UI. - *

- * Please do not abuse the API interface with brute-forcing bots, and ensure that there is at least 500 millisecond latency between two calls. We may revoke the API access without notice for - * accounts violating this requirement. - */ -public class CampBXExchange extends BaseExchange implements Exchange { - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://campbx.com"); - exchangeSpecification.setHost("campbx.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("CampBX"); - exchangeSpecification.setExchangeDescription("CampBX is a Bitcoin exchange registered in the USA."); - return exchangeSpecification; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new CampBXPollingMarketDataService(exchangeSpecification); - this.pollingTradeService = new CampBXPollingTradeService(exchangeSpecification); - this.pollingAccountService = new CampBXPollingAccountService(exchangeSpecification); - } - -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXUtils.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXUtils.java deleted file mode 100644 index 11b67c1a9..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/CampBXUtils.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared CampBX properties - */ -public final class CampBXUtils { - - public static final List CURRENCY_PAIRS = Arrays.asList( - - CurrencyPair.BTC_USD - - ); - - /** - *

- * According to CampBX API docs (https://campbx.com/api.php), do not make API calls faster than 500ms. - *

- */ - public static final int REFRESH_RATE = 1; // [seconds] - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXOrder.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXOrder.java deleted file mode 100644 index 9b5d37fe3..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXOrder.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto; - -import java.math.BigDecimal; -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.xeiam.xchange.utils.jackson.SqlTimeDeserializer; -import com.xeiam.xchange.utils.jackson.YesNoBooleanDeserializerImpl; - -/** - * @author Matija Mazi
- */ -public class CampBXOrder extends CampBXResponse { - - @JsonProperty("Order Entered") - @JsonDeserialize(using = SqlTimeDeserializer.class) - private Date orderEntered; - @JsonProperty("Order Expiry") - @JsonDeserialize(using = SqlTimeDeserializer.class) - private Date orderExpiry; - @JsonProperty("Order Type") - private String orderType; - @JsonProperty("Margin Percent") - private String marginPercent; - @JsonProperty("Quantity") - private BigDecimal quantity; - @JsonProperty("Price") - private BigDecimal price; - @JsonProperty("Stop-loss") - @JsonDeserialize(using = YesNoBooleanDeserializerImpl.class) - private Boolean stopLoss; - @JsonProperty("Fill Type") - private String fillType; - @JsonProperty("Dark Pool") - @JsonDeserialize(using = YesNoBooleanDeserializerImpl.class) - private Boolean darkPool; - @JsonProperty("Order ID") - private String orderID; - - @JsonProperty("Order Entered") - public Date getOrderEntered() { - - return orderEntered; - } - - @JsonProperty("Order Entered") - public void setOrderEntered(Date orderEntered) { - - this.orderEntered = orderEntered; - } - - @JsonProperty("Order Expiry") - public Date getOrderExpiry() { - - return orderExpiry; - } - - @JsonProperty("Order Expiry") - public void setOrderExpiry(Date orderExpiry) { - - this.orderExpiry = orderExpiry; - } - - @JsonProperty("Order Type") - public String getOrderType() { - - return orderType; - } - - @JsonProperty("Order Type") - public void setOrderType(String orderType) { - - this.orderType = orderType; - } - - @JsonProperty("Margin Percent") - public String getMarginPercent() { - - return marginPercent; - } - - @JsonProperty("Margin Percent") - public void setMarginPercent(String marginPercent) { - - this.marginPercent = marginPercent; - } - - @JsonProperty("Quantity") - public BigDecimal getQuantity() { - - return quantity; - } - - @JsonProperty("Quantity") - public void setQuantity(BigDecimal quantity) { - - this.quantity = quantity; - } - - @JsonProperty("Price") - public BigDecimal getPrice() { - - return price; - } - - @JsonProperty("Price") - public void setPrice(BigDecimal price) { - - this.price = price; - } - - @JsonProperty("Stop-loss") - public Boolean getStopLoss() { - - return stopLoss; - } - - @JsonProperty("Stop-loss") - public void setStopLoss(Boolean stopLoss) { - - this.stopLoss = stopLoss; - } - - @JsonProperty("Fill Type") - public String getFillType() { - - return fillType; - } - - @JsonProperty("Fill Type") - public void setFillType(String fillType) { - - this.fillType = fillType; - } - - @JsonProperty("Dark Pool") - public Boolean getDarkPool() { - - return darkPool; - } - - @JsonProperty("Dark Pool") - public void setDarkPool(Boolean darkPool) { - - this.darkPool = darkPool; - } - - @JsonProperty("Order ID") - public String getOrderID() { - - return orderID; - } - - @JsonProperty("Order ID") - public void setOrderID(String orderID) { - - this.orderID = orderID; - } - - @Override - public String toString() { - - return String.format("CampBXOrder{orderEntered=%s, orderExpiry=%s, orderType='%s', marginPercent='%s', quantity=%s, price=%s, stopLoss='%s', fillType='%s', darkPool='%s', orderID='%s'}", - orderEntered, orderExpiry, orderType, marginPercent, quantity, price, stopLoss, fillType, darkPool, orderID); - } -} \ No newline at end of file diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXResponse.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXResponse.java deleted file mode 100644 index c3090adc3..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/CampBXResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xeiam.xchange.campbx.dto; - -import java.io.Serializable; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi
- * @created 2/16/13 4:11 PM - */ -public class CampBXResponse implements Serializable { - - @JsonProperty("Success") - private String success; - @JsonProperty("Info") - private String info; - @JsonProperty("Error") - private String error; - - public String getSuccess() { - - return success; - } - - public String getInfo() { - - return info; - } - - public String getError() { - - return error; - } - - public boolean isError() { - - return error != null; - } - - public boolean isInfo() { - - return info != null; - } - - public boolean isSuccess() { - - return success != null; - } - - private String getUnwrappedResult() { - - return isError() ? error : isInfo() ? info : isSuccess() ? success : null; - } - - private String getType() { - - return isError() ? "Error" : isInfo() ? "Info" : isSuccess() ? "Success" : ""; - } - - @Override - public String toString() { - - return String.format("CampBXResponse[%s: %s]", getType(), getUnwrappedResult()); - } -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/account/MyFunds.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/account/MyFunds.java deleted file mode 100644 index d1d65c834..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/account/MyFunds.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto.account; - -/** - * @author Matija Mazi
- * @created 2/19/13 7:51 PM - */ - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.campbx.dto.CampBXResponse; - -public class MyFunds extends CampBXResponse { - - @JsonProperty("Total USD") - private BigDecimal totalUSD; - @JsonProperty("Total BTC") - private BigDecimal totalBTC; - @JsonProperty("Liquid USD") - private BigDecimal liquidUSD; - @JsonProperty("Liquid BTC") - private BigDecimal liquidBTC; - @JsonProperty("Margin Account USD") - private BigDecimal marginAccountUSD; - @JsonProperty("Margin Account BTC") - private BigDecimal marginAccountBTC; - - @JsonProperty("Total USD") - public BigDecimal getTotalUSD() { - - return totalUSD; - } - - @JsonProperty("Total USD") - public void setTotalUSD(BigDecimal totalUSD) { - - this.totalUSD = totalUSD; - } - - @JsonProperty("Total BTC") - public BigDecimal getTotalBTC() { - - return totalBTC; - } - - @JsonProperty("Total BTC") - public void setTotalBTC(BigDecimal totalBTC) { - - this.totalBTC = totalBTC; - } - - @JsonProperty("Liquid USD") - public BigDecimal getLiquidUSD() { - - return liquidUSD; - } - - @JsonProperty("Liquid USD") - public void setLiquidUSD(BigDecimal liquidUSD) { - - this.liquidUSD = liquidUSD; - } - - @JsonProperty("Liquid BTC") - public BigDecimal getLiquidBTC() { - - return liquidBTC; - } - - @JsonProperty("Liquid BTC") - public void setLiquidBTC(BigDecimal liquidBTC) { - - this.liquidBTC = liquidBTC; - } - - @JsonProperty("Margin Account USD") - public BigDecimal getMarginAccountUSD() { - - return marginAccountUSD; - } - - @JsonProperty("Margin Account USD") - public void setMarginAccountUSD(BigDecimal marginAccountUSD) { - - this.marginAccountUSD = marginAccountUSD; - } - - @JsonProperty("Margin Account BTC") - public BigDecimal getMarginAccountBTC() { - - return marginAccountBTC; - } - - @JsonProperty("Margin Account BTC") - public void setMarginAccountBTC(BigDecimal marginAccountBTC) { - - this.marginAccountBTC = marginAccountBTC; - } - - @Override - public String toString() { - - return String.format("MyFunds{marginAccountBTC='%s', marginAccountUSD='%s', liquidBTC='%s', liquidUSD='%s', totalBTC='%s', totalUSD='%s'}", marginAccountBTC, marginAccountUSD, liquidBTC, - liquidUSD, totalBTC, totalUSD); - } -} \ No newline at end of file diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXOrderBook.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXOrderBook.java deleted file mode 100644 index 7108dee04..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXOrderBook.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class CampBXOrderBook { - - private final List> bids; - private final List> asks; - - /** - * Constructor - * - * @param bids - * @param asks - */ - public CampBXOrderBook(@JsonProperty("Bids") List> bids, @JsonProperty("Asks") List> asks) { - - this.bids = bids; - this.asks = asks; - } - - /** (price, amount) */ - public List> getBids() { - - return bids; - } - - /** (price, amount) */ - public List> getAsks() { - - return asks; - } - - @Override - public String toString() { - - return String.format("OrderBook{bids=%s, asks=%s}", bids, asks); - } -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXTicker.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXTicker.java deleted file mode 100644 index 46b2da7ca..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/marketdata/CampBXTicker.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author Matija Mazi - */ -public final class CampBXTicker { - - private final BigDecimal last; - private final BigDecimal bid; - private final BigDecimal ask; - - /** - * Constructor - * - * @param last - * @param bid - * @param ask - */ - public CampBXTicker(@JsonProperty("Last Trade") BigDecimal last, @JsonProperty("Best Bid") BigDecimal bid, @JsonProperty("Best Ask") BigDecimal ask) { - - this.last = last; - this.bid = bid; - this.ask = ask; - } - - public BigDecimal getLast() { - - return last; - } - - public BigDecimal getBid() { - - return bid; - } - - public BigDecimal getAsk() { - - return ask; - } - - @Override - public String toString() { - - return "Ticker [last=" + last + ", bid=" + bid + ", ask=" + ask + "]"; - } - -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/trade/MyOpenOrders.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/trade/MyOpenOrders.java deleted file mode 100644 index f5b1f5034..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/dto/trade/MyOpenOrders.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto.trade; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.campbx.dto.CampBXOrder; -import com.xeiam.xchange.campbx.dto.CampBXResponse; - -/** - * @author Matija Mazi
- * @created 2/19/13 8:08 PM - */ - -public class MyOpenOrders extends CampBXResponse { - - @JsonProperty("Buy") - private List buy = new ArrayList(); - @JsonProperty("Sell") - private List sell = new ArrayList(); - - @JsonProperty("Buy") - public List getBuy() { - - return buy; - } - - @JsonProperty("Buy") - public void setBuy(List Buy) { - - this.buy = Buy; - } - - @JsonProperty("Sell") - public List getSell() { - - return sell; - } - - @JsonProperty("Sell") - public void setSell(List Sell) { - - this.sell = Sell; - } - - @Override - public String toString() { - - return String.format("MyOpenOrders{Buy=%s, Sell=%s}", buy, sell); - } -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingAccountService.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingAccountService.java deleted file mode 100644 index 4721a930e..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingAccountService.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.service.marketdata.polling; - -import java.math.BigDecimal; -import java.util.Arrays; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.campbx.CambBXUtils; -import com.xeiam.xchange.campbx.CampBX; -import com.xeiam.xchange.campbx.dto.CampBXResponse; -import com.xeiam.xchange.campbx.dto.account.MyFunds; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.trade.Wallet; -import com.xeiam.xchange.service.account.polling.PollingAccountService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; - -/** - * @author Matija Mazi - */ -public class CampBXPollingAccountService extends BasePollingExchangeService implements PollingAccountService { - - private static final Logger log = LoggerFactory.getLogger(CampBXPollingAccountService.class); - - private final CampBX campbx; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public CampBXPollingAccountService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.campbx = RestProxyFactory.createProxy(CampBX.class, exchangeSpecification.getSslUri()); - } - - @Override - public AccountInfo getAccountInfo() { - - MyFunds myFunds = campbx.getMyFunds(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - log.debug("myFunds = {}", myFunds); - CambBXUtils.handleError(myFunds); - return new AccountInfo(exchangeSpecification.getUserName(), Arrays.asList(Wallet.createInstance("BTC", myFunds.getTotalBTC()), Wallet.createInstance("USD", myFunds.getTotalUSD()))); - } - - @Override - public String withdrawFunds(BigDecimal amount, String address) { - - CampBXResponse result = campbx.withdrawBtc(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), address, amount); - log.debug("result = {}", result); - CambBXUtils.handleError(result); - return result.getSuccess(); - } - - @Override - public String requestBitcoinDepositAddress(String... arguments) { - - CampBXResponse result = campbx.getDepositAddress(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - log.debug("result = {}", result); - CambBXUtils.handleError(result); - return result.getSuccess(); - } - -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingMarketDataService.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingMarketDataService.java deleted file mode 100644 index 2e0413df5..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingMarketDataService.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.campbx.CampBX; -import com.xeiam.xchange.campbx.CampBXAdapters; -import com.xeiam.xchange.campbx.CampBXUtils; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXOrderBook; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXTicker; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - * @author Matija Mazi - */ -public class CampBXPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService { - - private final CampBX campbx; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public CampBXPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.campbx = RestProxyFactory.createProxy(CampBX.class, exchangeSpecification.getSslUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - CampBXTicker campbxTicker = campbx.getTicker(); - - return CampBXAdapters.adaptTicker(campbxTicker, currency, tradableIdentifier); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - CampBXOrderBook orderBook = campbx.getOrderBook(); - - return CampBXAdapters.adaptOrders(orderBook, currency, tradableIdentifier); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - throw new NotAvailableFromExchangeException(); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(CampBXUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - } - - @Override - public List getExchangeSymbols() { - - return CampBXUtils.CURRENCY_PAIRS; - } -} diff --git a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeService.java b/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeService.java deleted file mode 100644 index aea4eff42..000000000 --- a/xchange-campbx/src/main/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeService.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.service.marketdata.polling; - -import java.text.MessageFormat; -import java.text.ParseException; -import java.util.ArrayList; -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.campbx.CambBXUtils; -import com.xeiam.xchange.campbx.CampBX; -import com.xeiam.xchange.campbx.dto.CampBXOrder; -import com.xeiam.xchange.campbx.dto.CampBXResponse; -import com.xeiam.xchange.campbx.dto.trade.MyOpenOrders; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * @author Matija Mazi - */ -public class CampBXPollingTradeService extends BasePollingExchangeService implements PollingTradeService { - - private static final Logger log = LoggerFactory.getLogger(CampBXPollingTradeService.class); - private static final MessageFormat ID_FORMAT = new MessageFormat("{0}-{1}"); - - private final CampBX campbx; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public CampBXPollingTradeService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.campbx = RestProxyFactory.createProxy(CampBX.class, exchangeSpecification.getSslUri()); - } - - @Override - public OpenOrders getOpenOrders() { - - MyOpenOrders openOrders = campbx.getOpenOrders(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); - log.debug("openOrders = {}", openOrders); - CambBXUtils.handleError(openOrders); - List orders = new ArrayList(); - for (CampBXOrder cbo : openOrders.getBuy()) { - if (cbo.isError() || cbo.isInfo()) { - log.debug("Skipping non-order in Buy: " + cbo); - } else { - orders.add(new LimitOrder(Order.OrderType.BID, cbo.getQuantity(), "BTC", "USD", composeOrderId(CampBX.OrderType.Buy, cbo.getOrderID()), BigMoney.of(CurrencyUnit.USD, cbo.getPrice()))); - } - } - for (CampBXOrder cbo : openOrders.getSell()) { - if (cbo.isError() || cbo.isInfo()) { - log.debug("Skipping non-order in Sell: " + cbo); - } else { - orders.add(new LimitOrder(Order.OrderType.ASK, cbo.getQuantity(), "BTC", "USD", composeOrderId(CampBX.OrderType.Sell, cbo.getOrderID()), BigMoney.of(CurrencyUnit.USD, cbo.getPrice()))); - } - } - return new OpenOrders(orders); - } - - @Override - public String placeMarketOrder(MarketOrder marketOrder) { - - CampBX.AdvTradeMode mode = marketOrder.getType() == Order.OrderType.ASK ? CampBX.AdvTradeMode.AdvancedSell : CampBX.AdvTradeMode.AdvancedBuy; - CampBXResponse result = campbx.tradeAdvancedMarketEnter(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), mode, marketOrder.getTradableAmount(), CampBX.MarketPrice.Market, - null, null, null); - log.debug("result = {}", result); - CambBXUtils.handleError(result); - return composeOrderId(result.getSuccess(), marketOrder.getType()); - } - - @Override - public String placeLimitOrder(LimitOrder limitOrder) { - - CampBX.TradeMode mode = limitOrder.getType() == Order.OrderType.ASK ? CampBX.TradeMode.QuickSell : CampBX.TradeMode.QuickBuy; - CampBXResponse result = campbx.tradeEnter(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), mode, limitOrder.getTradableAmount(), limitOrder.getLimitPrice().getAmount()); - log.debug("result = {}", result); - CambBXUtils.handleError(result); - return composeOrderId(result.getSuccess(), limitOrder.getType()); - } - - @Override - public boolean cancelOrder(String orderId) { - - ParsedId parsedId = parseOrderId(orderId); - CampBXResponse response = campbx.tradeCancel(exchangeSpecification.getUserName(), exchangeSpecification.getPassword(), parsedId.type, Long.parseLong(parsedId.id)); - CambBXUtils.handleError(response); - return response.isSuccess(); - } - - static String composeOrderId(String id, Order.OrderType orderType) { - - CampBX.OrderType type = orderType == Order.OrderType.ASK ? CampBX.OrderType.Sell : CampBX.OrderType.Buy; - return composeOrderId(type, id); - } - - static String composeOrderId(CampBX.OrderType type, String id) { - - return ID_FORMAT.format(new Object[] { type, id }); - } - - static ParsedId parseOrderId(String compositeId) { - - try { - Object[] parts = ID_FORMAT.parse(compositeId); - return new ParsedId(CampBX.OrderType.valueOf(parts[0].toString()), parts[1].toString()); - } catch (ParseException e) { - throw new IllegalArgumentException("Can't parse order id: " + compositeId); - } - } - - static class ParsedId { - - final CampBX.OrderType type; - final String id; - - private ParsedId(CampBX.OrderType type, String id) { - - this.type = type; - this.id = id; - } - } -} diff --git a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/CampBXAdapterTest.java b/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/CampBXAdapterTest.java deleted file mode 100644 index adfec9cef..000000000 --- a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/CampBXAdapterTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXOrderBook; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXTicker; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; - -/** - * Tests the BitstampAdapter class - */ -public class CampBXAdapterTest { - - @Test - public void testOrderAdapterWithDepth() throws IOException { - - // Read in the JSON from the example resources - InputStream is = CampBXAdapterTest.class.getResourceAsStream("/marketdata/example-full-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - CampBXOrderBook bitstampOrderBook = mapper.readValue(is, CampBXOrderBook.class); - - OrderBook orderBook = CampBXAdapters.adaptOrders(bitstampOrderBook, "USD", "BTC"); - assertThat(orderBook.getBids().size(), is(equalTo(36))); - - // verify all fields filled - assertThat(orderBook.getBids().get(0).getLimitPrice().getAmount(), is(equalTo(new BigDecimal("13.3")))); - assertThat(orderBook.getBids().get(0).getType(), is(equalTo(OrderType.BID))); - assertThat(orderBook.getBids().get(0).getTradableAmount(), is(equalTo(new BigDecimal("0.00021609")))); - assertThat(orderBook.getBids().get(0).getTradableIdentifier(), is(equalTo("BTC"))); - assertThat(orderBook.getBids().get(0).getTransactionCurrency(), is(equalTo("USD"))); - - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = CampBXAdapterTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - CampBXTicker campBXTicker = mapper.readValue(is, CampBXTicker.class); - - Ticker ticker = CampBXAdapters.adaptTicker(campBXTicker, "USD", "BTC"); - - assertThat(ticker.getLast(), is(equalTo(MoneyUtils.parse("USD 13.30")))); - assertThat(ticker.getBid(), is(equalTo(MoneyUtils.parse("USD 13.30")))); - assertThat(ticker.getAsk(), is(equalTo(MoneyUtils.parse("USD 13.52")))); - - } -} diff --git a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/FullDepthJSONTest.java b/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/FullDepthJSONTest.java deleted file mode 100644 index 17dccb843..000000000 --- a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/FullDepthJSONTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXOrderBook; - -/** - * Test BitStamp Full Depth JSON parsing - */ -public class FullDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FullDepthJSONTest.class.getResourceAsStream("/marketdata/example-full-depth-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - CampBXOrderBook orderBook = mapper.readValue(is, CampBXOrderBook.class); - - // Verify that the example data was unmarshalled correctly - assertThat(orderBook.getBids().get(0).get(0), is(equalTo(new BigDecimal("13.3")))); - assertThat(orderBook.getBids().get(0).get(1), is(equalTo(new BigDecimal("0.00021609")))); - assertThat(orderBook.getAsks().get(0).get(0), is(equalTo(new BigDecimal("99.99")))); - assertThat(orderBook.getAsks().get(0).get(1), is(equalTo(new BigDecimal("0.10000000")))); - } -} diff --git a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyFundsJSONTest.java b/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyFundsJSONTest.java deleted file mode 100644 index fb06743be..000000000 --- a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyFundsJSONTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.campbx.dto.account.MyFunds; - -/** - * Test BitStamp Full Depth JSON parsing - */ -public class MyFundsJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - MyFunds myFunds = new ObjectMapper().readValue(MyFundsJSONTest.class.getResourceAsStream("/account/myfunds.json"), MyFunds.class); - - // Verify that the example data was unmarshalled correctly - assertThat(myFunds.getLiquidUSD(), is(equalTo(new BigDecimal("0.00")))); - assertThat(myFunds.getTotalBTC(), is(equalTo(new BigDecimal("0.10000000")))); - } -} diff --git a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyOrdersJSONTest.java b/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyOrdersJSONTest.java deleted file mode 100644 index c6a682679..000000000 --- a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/MyOrdersJSONTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.math.BigDecimal; -import java.util.List; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.campbx.dto.trade.MyOpenOrders; - -/** - * Test BitStamp Full Depth JSON parsing - */ -public class MyOrdersJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - MyOpenOrders orderBook = new ObjectMapper().readValue(MyOrdersJSONTest.class.getResourceAsStream("/trade/open-orders.json"), MyOpenOrders.class); - - // Verify that the example data was unmarshalled correctly - List buy = orderBook.getBuy(); - assertThat(buy.size(), is(equalTo(1))); - assertThat(buy.get(0).getInfo(), notNullValue()); - assertThat(buy.get(0).getPrice(), nullValue()); - - List sell = orderBook.getSell(); - CampBXOrder order = sell.get(0); - assertThat(order.getPrice(), is(equalTo(new BigDecimal("110.00")))); - assertThat(order.getOrderID(), is(equalTo("599254"))); - assertThat(order.getQuantity(), is(equalTo(new BigDecimal("0.10000000")))); - assertThat(order.getDarkPool(), is(false)); - assertThat(order.getOrderType(), is("Quick Sell")); - assertThat(order.getOrderExpiry().toString(), containsString("2013")); - assertThat(order.getOrderExpiry().toString(), containsString("29")); - } -} diff --git a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/TickerJSONTest.java b/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/TickerJSONTest.java deleted file mode 100644 index 033bbeab5..000000000 --- a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/dto/TickerJSONTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.dto; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.campbx.dto.marketdata.CampBXTicker; - -/** - * Test BitstampTicker JSON parsing - */ -public class TickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - CampBXTicker campBXTicker = mapper.readValue(is, CampBXTicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat(campBXTicker.getLast(), is(equalTo(new BigDecimal("13.30")))); - assertThat(campBXTicker.getBid(), is(equalTo(new BigDecimal("13.30")))); - assertThat(campBXTicker.getAsk(), is(equalTo(new BigDecimal("13.52")))); - } - -} diff --git a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeServiceTest.java b/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeServiceTest.java deleted file mode 100644 index 0916c61a3..000000000 --- a/xchange-campbx/src/test/java/com/xeiam/xchange/campbx/service/marketdata/polling/CampBXPollingTradeServiceTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.campbx.service.marketdata.polling; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import org.junit.Test; - -import com.xeiam.xchange.campbx.CampBX; - -/** - * @author Matija Mazi
- */ -public class CampBXPollingTradeServiceTest { - - @Test - public void testOrderIdParsing() throws Exception { - - testOrderId(CampBX.OrderType.Buy, "3", "Buy-3"); - testOrderId(CampBX.OrderType.Buy, "asdf", "Buy-asdf"); - testOrderId(CampBX.OrderType.Sell, "3-42-fa-asdf", "Sell-3-42-fa-asdf"); - testOrderId(CampBX.OrderType.Sell, "3:42-fa#asdf", "Sell-3:42-fa#asdf"); - - } - - private void testOrderId(CampBX.OrderType type, String id, String compositeId) { - - assertThat(CampBXPollingTradeService.composeOrderId(type, id), is(equalTo(compositeId))); - CampBXPollingTradeService.ParsedId parsedId = CampBXPollingTradeService.parseOrderId(compositeId); - assertThat(parsedId.id, is(equalTo(id))); - assertThat(parsedId.type, is(equalTo(type))); - } -} diff --git a/xchange-campbx/src/test/resources/account/getbtcaddr.json b/xchange-campbx/src/test/resources/account/getbtcaddr.json deleted file mode 100644 index 55f79d3be..000000000 --- a/xchange-campbx/src/test/resources/account/getbtcaddr.json +++ /dev/null @@ -1 +0,0 @@ -{"Success":"19VCxKQCogu6iEhB6ohymUW7LoUs8Qbmbp"} \ No newline at end of file diff --git a/xchange-campbx/src/test/resources/account/myfunds.json b/xchange-campbx/src/test/resources/account/myfunds.json deleted file mode 100644 index 7b5e893f9..000000000 --- a/xchange-campbx/src/test/resources/account/myfunds.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Total USD":"0.00", - "Total BTC":"0.10000000", - "Liquid USD":"0.00", - "Liquid BTC":"0.00000000", - "Margin Account USD":"0.00", - "Margin Account BTC":"0.00000000" -} \ No newline at end of file diff --git a/xchange-campbx/src/test/resources/error.json b/xchange-campbx/src/test/resources/error.json deleted file mode 100644 index c90d48960..000000000 --- a/xchange-campbx/src/test/resources/error.json +++ /dev/null @@ -1 +0,0 @@ -{"Error":"Minimum transfer allowed is BTC 0.10000000."} \ No newline at end of file diff --git a/xchange-campbx/src/test/resources/marketdata/example-full-depth-data.json b/xchange-campbx/src/test/resources/marketdata/example-full-depth-data.json deleted file mode 100644 index 6b0ffce4d..000000000 --- a/xchange-campbx/src/test/resources/marketdata/example-full-depth-data.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "Asks":[ - [ - 99.99, - 0.10000000 - ], - [ - 20, - 5.00000000 - ], - [ - 18, - 10.00000000 - ], - [ - 16.75, - 1.38850000 - ], - [ - 15, - 41.00000000 - ], - [ - 14, - 45.00000000 - ], - [ - 13.99, - 41.06613854 - ], - [ - 13.96, - 5.00000000 - ], - [ - 13.89, - 23.50000000 - ], - [ - 13.75, - 8.18000000 - ], - [ - 13.74, - 14.00000000 - ], - [ - 13.73, - 3.99950000 - ], - [ - 13.7, - 6.35000000 - ], - [ - 13.69, - 23.50000000 - ], - [ - 13.65, - 8.21755000 - ], - [ - 13.6, - 96.41736628 - ], - [ - 13.52, - 3.75000000 - ] - ], - "Bids":[ - [ - 13.3, - 0.00021609 - ], - [ - 13.29, - 6.00000000 - ], - [ - 13.21, - 19.99050000 - ], - [ - 13.17, - 12.80000000 - ], - [ - 13.15, - 6.65480602 - ], - [ - 13.14, - 9.40000000 - ], - [ - 13.12, - 10.60000000 - ], - [ - 13.11, - 4.00020916 - ], - [ - 13.1, - 20.00000000 - ], - [ - 13.08, - 2.02555668 - ], - [ - 13.07, - 57.50388357 - ], - [ - 13.06, - 24.82365366 - ], - [ - 13.01, - 21.00000000 - ], - [ - 13, - 126.15669878 - ], - [ - 12.99, - 15.31224148 - ], - [ - 12.81, - 15.00000000 - ], - [ - 12.8, - 10.00000000 - ], - [ - 12.6, - 10.00000000 - ], - [ - 12.5, - 5.44631818 - ], - [ - 12.2, - 12.17791000 - ], - [ - 12.01, - 20.60000000 - ], - [ - 12, - 9.98000000 - ], - [ - 11.72, - 0.99453007 - ], - [ - 11.5, - 11.60000000 - ], - [ - 11, - 14.15278919 - ], - [ - 10.4, - 7.30000000 - ], - [ - 10.3, - 6.55000000 - ], - [ - 9.01, - 19.45000000 - ], - [ - 9, - 552.54433946 - ], - [ - 7.21, - 18.20000000 - ], - [ - 7.2, - 14.69141941 - ], - [ - 5.5, - 0.40000000 - ], - [ - 4, - 5.00000000 - ], - [ - 3.57, - 0.10000000 - ], - [ - 2.5, - 1.00000000 - ], - [ - 0.9, - 0.40000000 - ] - ] -} \ No newline at end of file diff --git a/xchange-campbx/src/test/resources/marketdata/example-ticker-data.json b/xchange-campbx/src/test/resources/marketdata/example-ticker-data.json deleted file mode 100644 index 926649533..000000000 --- a/xchange-campbx/src/test/resources/marketdata/example-ticker-data.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Last Trade":"13.30", - "Best Bid":"13.30", - "Best Ask":"13.52" -} \ No newline at end of file diff --git a/xchange-campbx/src/test/resources/trade/enter-order.json b/xchange-campbx/src/test/resources/trade/enter-order.json deleted file mode 100644 index 743d391c7..000000000 --- a/xchange-campbx/src/test/resources/trade/enter-order.json +++ /dev/null @@ -1 +0,0 @@ -{"Success":"599276"} \ No newline at end of file diff --git a/xchange-campbx/src/test/resources/trade/open-orders.json b/xchange-campbx/src/test/resources/trade/open-orders.json deleted file mode 100644 index b3058e417..000000000 --- a/xchange-campbx/src/test/resources/trade/open-orders.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "Buy":[ - { - "Info":"No open Buy Orders" - } - ], - "Sell":[ - { - "Order Entered":"2013-02-19 10:21:15", - "Order Expiry":"2013-05-29 00:00:00", - "Order Type":"Quick Sell", - "Margin Percent":"None", - "Quantity":"0.10000000", - "Price":"110.00", - "Stop-loss":"No", - "Fill Type":"Incr", - "Dark Pool":"No", - "Order ID":"599254" - } - ] -} \ No newline at end of file diff --git a/xchange-cavirtex/api-specification.txt b/xchange-cavirtex/api-specification.txt deleted file mode 100644 index d5df6d532..000000000 --- a/xchange-cavirtex/api-specification.txt +++ /dev/null @@ -1,17 +0,0 @@ -VirtEx Exchange API specification -================================ - -Public API - -Ticker ------- -https://www.cavirtex.com/api/CAD/ticker.json - -Orders ------- -https://www.cavirtex.com/api/CAD/orderbook.json - -Trades ------- -https://www.cavirtex.com/api/CAD/trades.json - diff --git a/xchange-cavirtex/pom.xml b/xchange-cavirtex/pom.xml deleted file mode 100644 index b40c13684..000000000 --- a/xchange-cavirtex/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-cavirtex - - VirtEx Exchange - XChange implementation for the Canadian VirtEx Exchange - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - - \ No newline at end of file diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtEx.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtEx.java deleted file mode 100644 index 689c1bfe7..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtEx.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; - -import com.xeiam.xchange.virtex.dto.marketdata.VirtExDepth; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTicker; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTrade; - -/** - * @author timmolter - */ -@Path("api") -public interface VirtEx { - - @GET - @Path("{currency}/ticker.json") - @Produces("application/json") - public VirtExTicker getTicker(@PathParam("currency") String currency); - - @GET - @Path("{currency}/orderbook.json") - @Produces("application/json") - public VirtExDepth getFullDepth(@PathParam("currency") String currency); - - @GET - @Path("{currency}/trades.json") - @Produces("application/json") - public VirtExTrade[] getTrades(@PathParam("currency") String currency); - -} diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExAdapters.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExAdapters.java deleted file mode 100644 index 450e685bb..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExAdapters.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.utils.DateUtils; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTicker; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTrade; - -/** - * Various adapters for converting from VirtEx DTOs to XChange DTOs - */ -public final class VirtExAdapters { - - /** - * private Constructor - */ - private VirtExAdapters() { - - } - - /** - * Adapts a VirtExOrder to a LimitOrder - * - * @param amount - * @param price - * @param currency - * @param orderTypeString - * @param id - * @return - */ - public static LimitOrder adaptOrder(BigDecimal amount, BigDecimal price, String currency, String orderTypeString, String id) { - - // place a limit order - OrderType orderType = orderTypeString.equalsIgnoreCase("bid") ? OrderType.BID : OrderType.ASK; - String tradableIdentifier = Currencies.BTC; - BigMoney limitPrice = MoneyUtils.parse(currency + " " + price); - - return new LimitOrder(orderType, amount, tradableIdentifier, currency, limitPrice); - - } - - /** - * Adapts a List of virtexOrders to a List of LimitOrders - * - * @param virtexOrders - * @param currency - * @param orderType - * @param id - * @return - */ - public static List adaptOrders(List virtexOrders, String currency, String orderType, String id) { - - List limitOrders = new ArrayList(); - - for (BigDecimal[] virtexOrder : virtexOrders) { - limitOrders.add(adaptOrder(virtexOrder[1], virtexOrder[0], currency, orderType, id)); - } - - return limitOrders; - } - - /** - * Adapts a VirtExTrade to a Trade Object - * - * @param virtExTrade A VirtEx trade - * @return The XChange Trade - */ - public static Trade adaptTrade(VirtExTrade virtExTrade, String currency, String tradableIdentifier) { - - BigDecimal amount = virtExTrade.getAmount(); - BigMoney price = MoneyUtils.parse(currency + " " + virtExTrade.getPrice()); - Date date = DateUtils.fromMillisUtc((long) virtExTrade.getDate() * 1000L); - - return new Trade(null, amount, tradableIdentifier, currency, price, date); - } - - /** - * Adapts a VirtExTrade[] to a Trades Object - * - * @param virtexTrades The VirtEx trade data - * @return The trades - */ - public static Trades adaptTrades(VirtExTrade[] virtexTrades, String currency, String tradableIdentifier) { - - List tradesList = new ArrayList(); - for (VirtExTrade virtexTrade : virtexTrades) { - tradesList.add(adaptTrade(virtexTrade, currency, tradableIdentifier)); - } - return new Trades(tradesList); - } - - public static String getPriceString(BigMoney price) { - - return price.getAmount().stripTrailingZeros().toPlainString(); - } - - /** - * Adapts a VirtExTicker to a Ticker Object - * - * @param virtExTicker - * @return - */ - public static Ticker adaptTicker(VirtExTicker virtExTicker, String currency, String tradableIdentifier) { - - BigMoney last = MoneyUtils.parse(currency + " " + virtExTicker.getLast()); - BigMoney high = MoneyUtils.parse(currency + " " + virtExTicker.getHigh()); - BigMoney low = MoneyUtils.parse(currency + " " + virtExTicker.getLow()); - BigDecimal volume = virtExTicker.getVolume(); - - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withHigh(high).withLow(low).withVolume(volume).build(); - } - -} diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExExchange.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExExchange.java deleted file mode 100644 index 56ac4c35f..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExExchange.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.virtex.service.marketdata.polling.VirtExPollingMarketDataService; - -/** - *

- * Exchange implementation to provide the following to applications: - *

- *
    - *
  • A wrapper for the VirtEx exchange API
  • - *
- */ -public class VirtExExchange extends BaseExchange implements Exchange { - - /** - * Default constructor for ExchangeFactory - */ - public VirtExExchange() { - - } - - /** - * @return A default configuration for this exchange - */ - public static Exchange newInstance() { - - Exchange exchange = new VirtExExchange(); - exchange.applySpecification(exchange.getDefaultExchangeSpecification()); - return exchange; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new VirtExPollingMarketDataService(exchangeSpecification); - } - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://cavirtex.com"); - exchangeSpecification.setHost("cavirtex.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("VirtEx"); - exchangeSpecification.setExchangeDescription("CAVirtex is a Bitcoin exchange registered in Canada."); - - return exchangeSpecification; - } -} diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExUtils.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExUtils.java deleted file mode 100644 index 3a4472557..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/VirtExUtils.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared VirtEx properties - */ -public final class VirtExUtils { - - /** - * private Constructor - */ - private VirtExUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - CurrencyPair.BTC_CAD - - ); - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - -} diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExDepth.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExDepth.java deleted file mode 100644 index 08097f27c..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExDepth.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing depth from VirtEx - */ -public final class VirtExDepth { - - private final List asks; - private final List bids; - - /** - * Constructor - * - * @param asks - * @param bids - */ - public VirtExDepth(@JsonProperty("asks") List asks, @JsonProperty("bids") List bids) { - - this.asks = asks; - this.bids = bids; - } - - public List getAsks() { - - return asks; - } - - public List getBids() { - - return bids; - } - - @Override - public String toString() { - - return "VirtExDepth [asks=" + asks.toString() + ", bids=" + bids.toString() + "]"; - } - -} diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTicker.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTicker.java deleted file mode 100644 index 892f7286f..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTicker.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing Ticker from VirtEx - */ -public final class VirtExTicker { - - private final BigDecimal last; - private final BigDecimal high; - private final BigDecimal low; - private final BigDecimal volume; - - /** - * Constructor - * - * @param high - * @param low - * @param volume - * @param last - */ - public VirtExTicker(@JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("volume") BigDecimal volume, @JsonProperty("last") BigDecimal last) { - - this.high = high; - this.low = low; - this.volume = volume; - this.last = last; - } - - public BigDecimal getLast() { - - return last; - } - - public BigDecimal getHigh() { - - return high; - } - - public BigDecimal getLow() { - - return low; - } - - public BigDecimal getVolume() { - - return volume; - } - - @Override - public String toString() { - - return "VirtExTicker [last=" + last + ", high=" + high + ", low=" + low + ", volume=" + volume + "]"; - - } - -} diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTrade.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTrade.java deleted file mode 100644 index d5fb58824..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/dto/marketdata/VirtExTrade.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - *

- * Data object representing a Trade from VirtEx - *

- */ -public final class VirtExTrade { - - private final BigDecimal amount; - private final double date; - private final BigDecimal price; - private final long tid; - - /** - * Constructor - * - * @param amount - * @param date - * @param price - * @param tid - */ - public VirtExTrade(@JsonProperty("amount") BigDecimal amount, @JsonProperty("date") double date, @JsonProperty("price") BigDecimal price, @JsonProperty("tid") long tid) { - - this.amount = amount; - this.date = date; - this.price = price; - this.tid = tid; - } - - public BigDecimal getAmount() { - - return amount; - } - - public double getDate() { - - return date; - } - - public BigDecimal getPrice() { - - return price; - } - - public long getTid() { - - return tid; - } - - @Override - public String toString() { - - return "VirtExTrades [amount=" + amount + ", date=" + date + ", price=" + price + ", tid=" + tid + "]"; - } - -} diff --git a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/service/marketdata/polling/VirtExPollingMarketDataService.java b/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/service/marketdata/polling/VirtExPollingMarketDataService.java deleted file mode 100644 index c9cdece9a..000000000 --- a/xchange-cavirtex/src/main/java/com/xeiam/xchange/virtex/service/marketdata/polling/VirtExPollingMarketDataService.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; -import com.xeiam.xchange.virtex.VirtEx; -import com.xeiam.xchange.virtex.VirtExAdapters; -import com.xeiam.xchange.virtex.VirtExUtils; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExDepth; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTicker; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTrade; - -/** - *

- * Implementation of the market data service for VirtEx - *

- *
    - *
  • Provides access to various market data values
  • - *
- */ -public class VirtExPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService { - - private final VirtEx virtEx; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification - */ - public VirtExPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.virtEx = RestProxyFactory.createProxy(VirtEx.class, exchangeSpecification.getSslUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - // Request data - VirtExTicker virtExTicker = virtEx.getTicker(currency); - - // Adapt to XChange DTOs - return VirtExAdapters.adaptTicker(virtExTicker, currency, tradableIdentifier); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - // Request data - VirtExDepth virtExDepth = virtEx.getFullDepth(currency); - - // Adapt to XChange DTOs - List asks = VirtExAdapters.adaptOrders(virtExDepth.getAsks(), currency, "ask", ""); - List bids = VirtExAdapters.adaptOrders(virtExDepth.getBids(), currency, "bid", ""); - - return new OrderBook(asks, bids); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - - // Request data - VirtExTrade[] virtExTrades = virtEx.getTrades(currency); - - // Adapt to XChange DTOs - return VirtExAdapters.adaptTrades(virtExTrades, currency, tradableIdentifier); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(VirtExUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - - } - - @Override - public List getExchangeSymbols() { - - return VirtExUtils.CURRENCY_PAIRS; - } - -} diff --git a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExAdapterTest.java b/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExAdapterTest.java deleted file mode 100644 index 96b68c13f..000000000 --- a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExAdapterTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.service; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.List; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.utils.DateUtils; -import com.xeiam.xchange.virtex.VirtExAdapters; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExDepth; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTicker; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTrade; -import com.xeiam.xchange.virtex.service.marketdata.VirtExDepthJSONTest; -import com.xeiam.xchange.virtex.service.marketdata.VirtExTickerJSONTest; -import com.xeiam.xchange.virtex.service.marketdata.VirtExTradesJSONTest; - -/** - * Tests the VirtExAdapter class - */ -public class VirtExAdapterTest { - - @Test - public void testOrderAdapterWithDepth() throws IOException { - - // Read in the JSON from the example resources - InputStream is = VirtExDepthJSONTest.class.getResourceAsStream("/marketdata/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - VirtExDepth VirtExDepth = mapper.readValue(is, VirtExDepth.class); - - List asks = VirtExAdapters.adaptOrders(VirtExDepth.getAsks(), "CAD", "ask", ""); - // System.out.println(openorders.size()); - // assertTrue("ASKS size should be 1582", asks.size() == 1582); - - // verify all fields filled - assertTrue("limit price should be 16.90536", asks.get(0).getLimitPrice().getAmount().doubleValue() == 16.90536); - assertTrue("order type should be ASK", asks.get(0).getType() == OrderType.ASK); - assertTrue("tradableAmount should be 6.51", asks.get(0).getTradableAmount().doubleValue() == 6.51); - assertTrue("tradableIdentifier should be BTC", asks.get(0).getTradableIdentifier().equals("BTC")); - assertTrue("transactionCurrency should be CAD", asks.get(0).getTransactionCurrency().equals("CAD")); - - } - - @Test - public void testTradeAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = VirtExTradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - VirtExTrade[] VirtExTrades = mapper.readValue(is, VirtExTrade[].class); - - Trades trades = VirtExAdapters.adaptTrades(VirtExTrades, "CAD", "BTC"); - assertTrue("Trades size should be 558", trades.getTrades().size() == 558); - - // verify all fields filled - assertTrue("price should be 11.500000000", trades.getTrades().get(0).getPrice().getAmount().doubleValue() == 11.500000000); - assertTrue("tradableAmount should be 13.000000000", trades.getTrades().get(0).getTradableAmount().doubleValue() == 13.000000000); - assertEquals("timestamp incorrect", "2012-09-26 15:23:19 GMT", DateUtils.toUTCString(trades.getTrades().get(0).getTimestamp())); - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = VirtExTickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - VirtExTicker VirtExTicker = mapper.readValue(is, VirtExTicker.class); - - Ticker ticker = VirtExAdapters.adaptTicker(VirtExTicker, "CAD", "BTC"); - System.out.println(ticker.toString()); - - assertEquals("last should be CAD 12.32900", ticker.getLast().toString(), "CAD 12.32900"); - assertEquals("bid should be CAD 11.64001", ticker.getLow().toString(), "CAD 11.64001"); - assertEquals("ask should be CAD 12.37989", ticker.getHigh().toString(), "CAD 12.37989"); - assertEquals("volume should be 1866.56", ticker.getVolume(), new BigDecimal("1866.56")); - - } -} diff --git a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExUtilsTest.java b/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExUtilsTest.java deleted file mode 100644 index 747f9e554..000000000 --- a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/VirtExUtilsTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.service; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.virtex.VirtExUtils; - -/** - * Test class for VirtExUtils class - */ -public class VirtExUtilsTest { - - @Test - public void testIsValidCurrencyPair() { - - assertTrue(VirtExUtils.isValidCurrencyPair(CurrencyPair.BTC_CAD)); - assertTrue(VirtExUtils.isValidCurrencyPair(new CurrencyPair("BTC", "CAD"))); - assertFalse(VirtExUtils.isValidCurrencyPair(new CurrencyPair("BTC", "FFD"))); - } -} diff --git a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExDepthJSONTest.java b/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExDepthJSONTest.java deleted file mode 100644 index 87857f83b..000000000 --- a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExDepthJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExDepth; - -/** - * Test VirtExDepth JSON parsing - */ -public class VirtExDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = VirtExDepthJSONTest.class.getResourceAsStream("/marketdata/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - VirtExDepth virtExDepth = mapper.readValue(is, VirtExDepth.class); - - // Verify that the example data was unmarshalled correctly - assertThat(virtExDepth.getAsks().get(0)[0], is(equalTo(new BigDecimal("16.905360000")))); - } -} diff --git a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTickerJSONTest.java b/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTickerJSONTest.java deleted file mode 100644 index e6fa03bff..000000000 --- a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTickerJSONTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTicker; - -/** - * Test VirtExTicker JSON parsing - */ -public class VirtExTickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = VirtExTickerJSONTest.class.getResourceAsStream("/marketdata/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - VirtExTicker VirtExTicker = mapper.readValue(is, VirtExTicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Last value", VirtExTicker.getLast(), equalTo(new BigDecimal("12.32900"))); - assertThat("Unexpected Return High value", VirtExTicker.getHigh(), equalTo(new BigDecimal("12.37989"))); - assertThat("Unexpected Return Low value", VirtExTicker.getLow(), equalTo(new BigDecimal("11.64001"))); - assertThat("Unexpected Return Volume value", VirtExTicker.getVolume(), equalTo(new BigDecimal("1866.56"))); - } - -} diff --git a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTradesJSONTest.java b/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTradesJSONTest.java deleted file mode 100644 index 7d1363d2a..000000000 --- a/xchange-cavirtex/src/test/java/com/xeiam/xchange/virtex/service/marketdata/VirtExTradesJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.virtex.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.virtex.dto.marketdata.VirtExTrade; - -/** - * Test VirtExTrade[] JSON parsing - */ -public class VirtExTradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = VirtExTradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - VirtExTrade[] VirtExTrades = mapper.readValue(is, VirtExTrade[].class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", VirtExTrades[0].getPrice(), equalTo(new BigDecimal("11.500000000"))); - // System.out.println(VirtExTrades[0].toString()); - } -} diff --git a/xchange-cavirtex/src/test/resources/marketdata/example-depth-data.json b/xchange-cavirtex/src/test/resources/marketdata/example-depth-data.json deleted file mode 100644 index 5c99216eb..000000000 --- a/xchange-cavirtex/src/test/resources/marketdata/example-depth-data.json +++ /dev/null @@ -1,734 +0,0 @@ -{ - "bids":[ - [ - 0.010010000, - 150.000000000 - ], - [ - 0.000010000, - 7000.000000000 - ], - [ - 0.121000000, - 82.000000000 - ], - [ - 0.010000000, - 0.060000000 - ], - [ - 0.000010000, - 1000.000000000 - ], - [ - 1.000000000, - 100.000000000 - ], - [ - 0.070000000, - 1.000000000 - ], - [ - 0.013100000, - 700.000000000 - ], - [ - 0.800000000, - 100.000000000 - ], - [ - 0.001000000, - 3500.000000000 - ], - [ - 0.050000000, - 100.000000000 - ], - [ - 0.160000000, - 100.000000000 - ], - [ - 0.010000000, - 10.000000000 - ], - [ - 0.610000000, - 100.000000000 - ], - [ - 0.250000000, - 250.000000000 - ], - [ - 0.010000000, - 400.000000000 - ], - [ - 2.750000000, - 11.950000000 - ], - [ - 2.800000000, - 7.260000000 - ], - [ - 4.000000000, - 10.000000000 - ], - [ - 3.500000000, - 11.000000000 - ], - [ - 1.000000000, - 0.050000000 - ], - [ - 4.000000000, - 3.000000000 - ], - [ - 3.000000000, - 2.000000000 - ], - [ - 4.500000000, - 0.230000000 - ], - [ - 4.250000000, - 25.740000000 - ], - [ - 4.677000000, - 1.200000000 - ], - [ - 5.440000000, - 8.130000000 - ], - [ - 6.451000000, - 19.090000000 - ], - [ - 6.450000000, - 78.930000000 - ], - [ - 4.000000000, - 31.330000000 - ], - [ - 3.750000000, - 29.170000000 - ], - [ - 4.500000000, - 24.340000000 - ], - [ - 3.500000000, - 31.290000000 - ], - [ - 7.200000000, - 1.000000000 - ], - [ - 8.000000000, - 2.000000000 - ], - [ - 9.000000000, - 10.800000000 - ], - [ - 9.250000000, - 15.000000000 - ], - [ - 9.500010000, - 15.000000000 - ], - [ - 9.650010000, - 15.000000000 - ], - [ - 9.000000000, - 4.000000000 - ], - [ - 9.949900000, - 5.900000000 - ], - [ - 8.600000000, - 10.100000000 - ], - [ - 10.400000000, - 25.000000000 - ], - [ - 10.500000000, - 18.000000000 - ], - [ - 10.997000000, - 0.490000000 - ], - [ - 10.450000000, - 10.000000000 - ], - [ - 11.200000000, - 25.000000000 - ], - [ - 10.310000000, - 128.000000000 - ], - [ - 10.000000000, - 5.000000000 - ], - [ - 4.000000000, - 100.000000000 - ], - [ - 5.000000000, - 100.000000000 - ], - [ - 10.000010000, - 80.000000000 - ], - [ - 3.000000000, - 100.000000000 - ], - [ - 2.000000000, - 100.000000000 - ], - [ - 1.173800000, - 500.000000000 - ], - [ - 11.000000000, - 2.130000000 - ], - [ - 1.000000000, - 600.000000000 - ], - [ - 11.220010000, - 30.000000000 - ], - [ - 11.000000000, - 5.370000000 - ], - [ - 9.600000000, - 0.050000000 - ], - [ - 0.400000000, - 69.500000000 - ], - [ - 11.230000000, - 10.000000000 - ], - [ - 11.530000000, - 3.000000000 - ], - [ - 11.010000000, - 49.110000000 - ], - [ - 10.400010000, - 50.000000000 - ], - [ - 11.550900000, - 8.000000000 - ], - [ - 11.500000000, - 9.000000000 - ], - [ - 11.600000000, - 0.200000000 - ], - [ - 11.650000000, - 44.000000000 - ], - [ - 11.850000000, - 3.160000000 - ], - [ - 11.750000000, - 6.250000000 - ], - [ - 11.650000000, - 4.500000000 - ], - [ - 11.850000000, - 10.720000000 - ], - [ - 11.900000000, - 377.250000000 - ], - [ - 11.650000000, - 467.700000000 - ], - [ - 11.650100000, - 2.000000000 - ], - [ - 11.800000000, - 10.000000000 - ], - [ - 11.750000000, - 10.000000000 - ], - [ - 12.000000000, - 157.610000000 - ], - [ - 12.000000000, - 11.500000000 - ], - [ - 11.850000000, - 48.000000000 - ], - [ - 12.000020000, - 6.000000000 - ], - [ - 12.000000000, - 24.490000000 - ], - [ - 11.661000000, - 21.500000000 - ], - [ - 12.001000000, - 33.000000000 - ], - [ - 12.001010000, - 13.960000000 - ] - ], - "asks":[ - [ - 16.905360000, - 6.510000000 - ], - [ - 20.000000000, - 19.880000000 - ], - [ - 20.000000000, - 4.500000000 - ], - [ - 25.000000000, - 1.490000000 - ], - [ - 20.000000000, - 198.800000000 - ], - [ - 16.130000000, - 6.200000000 - ], - [ - 16.300000000, - 6.130000000 - ], - [ - 16.500000000, - 6.070000000 - ], - [ - 16.600000000, - 6.020000000 - ], - [ - 16.800000000, - 5.960000000 - ], - [ - 17.000000000, - 5.900000000 - ], - [ - 17.500000000, - 30.000000000 - ], - [ - 20.000000000, - 20.000000000 - ], - [ - 22.000000000, - 15.940000000 - ], - [ - 13.800000000, - 3.480000000 - ], - [ - 14.500000000, - 17.320000000 - ], - [ - 13.500000000, - 29.000000000 - ], - [ - 15.000000000, - 7.000000000 - ], - [ - 14.490000000, - 17.320000000 - ], - [ - 12.999000000, - 67.150000000 - ], - [ - 12.750000000, - 7.470000000 - ], - [ - 15.000000000, - 6.000000000 - ], - [ - 13.000000000, - 4.000000000 - ], - [ - 15.000000000, - 19.000000000 - ], - [ - 15.000000000, - 71.830000000 - ], - [ - 15.000000000, - 12.900000000 - ], - [ - 13.490000000, - 9.000000000 - ], - [ - 15.140000000, - 5.000000000 - ], - [ - 19.940000000, - 5.000000000 - ], - [ - 17.970000000, - 5.000000000 - ], - [ - 14.000000000, - 4.020000000 - ], - [ - 15.000000000, - 5.000000000 - ], - [ - 13.500000000, - 5.510000000 - ], - [ - 13.000000000, - 26.000000000 - ], - [ - 15.000000000, - 297.610000000 - ], - [ - 15.000000000, - 145.500000000 - ], - [ - 12.499000000, - 0.490000000 - ], - [ - 12.599000000, - 0.490000000 - ], - [ - 12.500000000, - 0.430000000 - ], - [ - 12.800000000, - 500.000000000 - ], - [ - 13.300000000, - 957.000000000 - ], - [ - 12.699000000, - 0.490000000 - ], - [ - 12.590000000, - 40.000000000 - ], - [ - 13.580000000, - 30.000000000 - ], - [ - 14.570000000, - 30.000000000 - ], - [ - 15.320000000, - 31.350000000 - ], - [ - 12.479900000, - 4.000000000 - ], - [ - 12.500000000, - 1.400000000 - ], - [ - 12.799000000, - 0.490000000 - ], - [ - 12.899000000, - 0.490000000 - ], - [ - 12.999000000, - 0.490000000 - ], - [ - 13.099000000, - 0.490000000 - ], - [ - 12.399000000, - 0.490000000 - ], - [ - 12.479880000, - 19.800000000 - ], - [ - 12.449490000, - 4.000000000 - ], - [ - 12.430000000, - 8.990000000 - ], - [ - 12.420000000, - 3.300000000 - ], - [ - 12.379890000, - 1.590000000 - ], - [ - 15.000000000, - 50.000000000 - ], - [ - 14.900000000, - 98.000000000 - ], - [ - 12.400000000, - 15.000000000 - ], - [ - 13.000000000, - 10.000000000 - ], - [ - 13.000000000, - 1.150000000 - ], - [ - 15.100000000, - 300.000000000 - ], - [ - 12.500000000, - 3.600000000 - ], - [ - 12.479870000, - 2.990000000 - ], - [ - 12.479870000, - 2.990000000 - ], - [ - 12.479870000, - 2.990000000 - ], - [ - 12.479870000, - 2.990000000 - ], - [ - 13.299900000, - 10.000000000 - ], - [ - 12.350000000, - 8.400000000 - ], - [ - 12.379980000, - 4.000000000 - ], - [ - 12.795000000, - 40.000000000 - ], - [ - 13.289990000, - 125.000000000 - ], - [ - 12.350000000, - 4.750000000 - ], - [ - 12.380000000, - 1.000000000 - ], - [ - 12.480000000, - 1.000000000 - ], - [ - 12.580000000, - 1.000000000 - ], - [ - 12.680000000, - 1.000000000 - ], - [ - 12.780000000, - 1.000000000 - ], - [ - 12.880000000, - 1.000000000 - ], - [ - 12.980000000, - 1.000000000 - ], - [ - 13.080000000, - 1.000000000 - ], - [ - 13.180000000, - 1.000000000 - ], - [ - 13.280000000, - 1.000000000 - ], - [ - 12.370000000, - 12.000000000 - ], - [ - 12.410000000, - 12.000000000 - ], - [ - 12.520000000, - 5.250000000 - ], - [ - 12.340000000, - 21.250000000 - ], - [ - 12.399000000, - 3.360000000 - ], - [ - 12.329000000, - 0.740000000 - ], - [ - 12.339990000, - 2.990000000 - ], - [ - 12.339990000, - 2.990000000 - ], - [ - 12.339990000, - 2.990000000 - ], - [ - 12.980000000, - 5.430000000 - ], - [ - 12.339980000, - 4.800000000 - ] - ] -} \ No newline at end of file diff --git a/xchange-cavirtex/src/test/resources/marketdata/example-ticker-data.json b/xchange-cavirtex/src/test/resources/marketdata/example-ticker-data.json deleted file mode 100644 index 60445e90f..000000000 --- a/xchange-cavirtex/src/test/resources/marketdata/example-ticker-data.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "high":12.37989, - "volume":1866.56, - "last":12.32900, - "low":11.64001 -} \ No newline at end of file diff --git a/xchange-cavirtex/src/test/resources/marketdata/example-trades-data.json b/xchange-cavirtex/src/test/resources/marketdata/example-trades-data.json deleted file mode 100644 index 57ebd6ffe..000000000 --- a/xchange-cavirtex/src/test/resources/marketdata/example-trades-data.json +++ /dev/null @@ -1,3350 +0,0 @@ -[ - { - "date":1348672999.0, - "tid":28898, - "price":11.500000000, - "amount":13.000000000 - }, - { - "date":1348673720.0, - "tid":28899, - "price":11.500000000, - "amount":2.910000000 - }, - { - "date":1348678922.0, - "tid":28900, - "price":11.500000000, - "amount":0.240000000 - }, - { - "date":1348682396.0, - "tid":28901, - "price":11.510000000, - "amount":12.800000000 - }, - { - "date":1348682661.0, - "tid":28902, - "price":11.500000000, - "amount":63.850000000 - }, - { - "date":1348683969.0, - "tid":28903, - "price":11.650000000, - "amount":4.000000000 - }, - { - "date":1348684019.0, - "tid":28904, - "price":11.660000000, - "amount":10.000000000 - }, - { - "date":1348688135.0, - "tid":28905, - "price":11.660000000, - "amount":7.100000000 - }, - { - "date":1348688355.0, - "tid":28906, - "price":11.670000000, - "amount":10.000000000 - }, - { - "date":1348688355.0, - "tid":28907, - "price":11.670000000, - "amount":4.940000000 - }, - { - "date":1348688355.0, - "tid":28908, - "price":11.675000000, - "amount":15.060000000 - }, - { - "date":1348688659.0, - "tid":28909, - "price":11.660000000, - "amount":1.160000000 - }, - { - "date":1348689987.0, - "tid":28910, - "price":11.675000000, - "amount":5.820000000 - }, - { - "date":1348690180.0, - "tid":28911, - "price":11.675000000, - "amount":5.000000000 - }, - { - "date":1348690943.0, - "tid":28912, - "price":11.675000000, - "amount":25.000000000 - }, - { - "date":1348692429.0, - "tid":28913, - "price":11.660000000, - "amount":8.460000000 - }, - { - "date":1348692724.0, - "tid":28914, - "price":11.660000000, - "amount":5.230000000 - }, - { - "date":1348692953.0, - "tid":28915, - "price":11.675000000, - "amount":20.620000000 - }, - { - "date":1348693270.0, - "tid":28916, - "price":11.700000000, - "amount":1.050000000 - }, - { - "date":1348693270.0, - "tid":28917, - "price":11.740000000, - "amount":5.250000000 - }, - { - "date":1348693737.0, - "tid":28918, - "price":11.740000000, - "amount":8.090000000 - }, - { - "date":1348694628.0, - "tid":28919, - "price":11.740000000, - "amount":1.360000000 - }, - { - "date":1348694697.0, - "tid":28920, - "price":11.749000000, - "amount":3.700000000 - }, - { - "date":1348695688.0, - "tid":28921, - "price":11.749000000, - "amount":15.000000000 - }, - { - "date":1348696783.0, - "tid":28922, - "price":11.749000000, - "amount":1.330000000 - }, - { - "date":1348696875.0, - "tid":28923, - "price":11.780000000, - "amount":0.100000000 - }, - { - "date":1348697077.0, - "tid":28924, - "price":11.780000000, - "amount":1.780000000 - }, - { - "date":1348697110.0, - "tid":28925, - "price":11.780000000, - "amount":0.030000000 - }, - { - "date":1348697521.0, - "tid":28926, - "price":11.780000000, - "amount":0.050000000 - }, - { - "date":1348698291.0, - "tid":28927, - "price":11.780000000, - "amount":5.760000000 - }, - { - "date":1348700225.0, - "tid":28928, - "price":11.740000000, - "amount":6.280000000 - }, - { - "date":1348700403.0, - "tid":28929, - "price":11.710000000, - "amount":19.500000000 - }, - { - "date":1348700825.0, - "tid":28930, - "price":11.710000000, - "amount":0.990000000 - }, - { - "date":1348700864.0, - "tid":28931, - "price":11.710000000, - "amount":0.990000000 - }, - { - "date":1348700894.0, - "tid":28932, - "price":11.710000000, - "amount":0.990000000 - }, - { - "date":1348700940.0, - "tid":28933, - "price":11.710000000, - "amount":10.900000000 - }, - { - "date":1348701839.0, - "tid":28934, - "price":11.740000000, - "amount":16.000000000 - }, - { - "date":1348701843.0, - "tid":28935, - "price":11.740000000, - "amount":8.280000000 - }, - { - "date":1348702193.0, - "tid":28936, - "price":11.710000000, - "amount":6.500000000 - }, - { - "date":1348703533.0, - "tid":28937, - "price":11.740000000, - "amount":8.000000000 - }, - { - "date":1348703559.0, - "tid":28938, - "price":11.740000000, - "amount":6.000000000 - }, - { - "date":1348703748.0, - "tid":28939, - "price":11.710000000, - "amount":60.130000000 - }, - { - "date":1348703792.0, - "tid":28940, - "price":11.700000000, - "amount":2.200000000 - }, - { - "date":1348703856.0, - "tid":28941, - "price":11.700000000, - "amount":0.310000000 - }, - { - "date":1348703859.0, - "tid":28942, - "price":11.740000000, - "amount":4.000000000 - }, - { - "date":1348704505.0, - "tid":28943, - "price":11.740000000, - "amount":150.440000000 - }, - { - "date":1348704506.0, - "tid":28944, - "price":11.779990000, - "amount":3.400000000 - }, - { - "date":1348704506.0, - "tid":28945, - "price":11.780000000, - "amount":4.160000000 - }, - { - "date":1348705444.0, - "tid":28946, - "price":11.700000000, - "amount":22.000000000 - }, - { - "date":1348706706.0, - "tid":28947, - "price":11.780000000, - "amount":6.000000000 - }, - { - "date":1348706971.0, - "tid":28948, - "price":11.780000000, - "amount":18.630000000 - }, - { - "date":1348709001.0, - "tid":28949, - "price":11.700000000, - "amount":0.420000000 - }, - { - "date":1348709059.0, - "tid":28950, - "price":11.700000000, - "amount":5.580000000 - }, - { - "date":1348709060.0, - "tid":28951, - "price":11.780000000, - "amount":9.420000000 - }, - { - "date":1348714054.0, - "tid":28952, - "price":11.750000000, - "amount":4.250000000 - }, - { - "date":1348715957.0, - "tid":28953, - "price":11.780000000, - "amount":25.350000000 - }, - { - "date":1348716621.0, - "tid":28954, - "price":11.780000000, - "amount":14.220000000 - }, - { - "date":1348716621.0, - "tid":28955, - "price":11.800000000, - "amount":0.780000000 - }, - { - "date":1348716777.0, - "tid":28956, - "price":11.700010000, - "amount":0.490000000 - }, - { - "date":1348716878.0, - "tid":28957, - "price":11.800000000, - "amount":0.720000000 - }, - { - "date":1348716878.0, - "tid":28958, - "price":11.899000000, - "amount":0.490000000 - }, - { - "date":1348716878.0, - "tid":28959, - "price":11.899960000, - "amount":1.290000000 - }, - { - "date":1348716878.0, - "tid":28960, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28961, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28962, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28963, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28964, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28965, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28966, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28967, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28968, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28969, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716878.0, - "tid":28970, - "price":11.899990000, - "amount":0.990000000 - }, - { - "date":1348716940.0, - "tid":28971, - "price":11.900000000, - "amount":2.110000000 - }, - { - "date":1348717206.0, - "tid":28972, - "price":11.950000000, - "amount":66.890000000 - }, - { - "date":1348719782.0, - "tid":28973, - "price":11.950000000, - "amount":19.110000000 - }, - { - "date":1348719829.0, - "tid":28974, - "price":11.950000000, - "amount":10.240000000 - }, - { - "date":1348720134.0, - "tid":28975, - "price":11.999000000, - "amount":0.490000000 - }, - { - "date":1348720135.0, - "tid":28976, - "price":11.999890000, - "amount":2.990000000 - }, - { - "date":1348720135.0, - "tid":28977, - "price":11.999890000, - "amount":2.990000000 - }, - { - "date":1348720135.0, - "tid":28978, - "price":11.999900000, - "amount":9.800000000 - }, - { - "date":1348720135.0, - "tid":28979, - "price":11.999980000, - "amount":2.990000000 - }, - { - "date":1348720135.0, - "tid":28980, - "price":11.999980000, - "amount":2.990000000 - }, - { - "date":1348720135.0, - "tid":28981, - "price":11.999980000, - "amount":2.990000000 - }, - { - "date":1348720135.0, - "tid":28982, - "price":11.999990000, - "amount":9.750000000 - }, - { - "date":1348720135.0, - "tid":28983, - "price":12.000000000, - "amount":11.000000000 - }, - { - "date":1348720135.0, - "tid":28984, - "price":12.000000000, - "amount":1.600000000 - }, - { - "date":1348720135.0, - "tid":28985, - "price":12.000000000, - "amount":2.000000000 - }, - { - "date":1348720135.0, - "tid":28986, - "price":12.000000000, - "amount":1.150000000 - }, - { - "date":1348720135.0, - "tid":28987, - "price":12.000000000, - "amount":4.000000000 - }, - { - "date":1348720135.0, - "tid":28988, - "price":12.000000000, - "amount":27.910000000 - }, - { - "date":1348722090.0, - "tid":28989, - "price":11.950000000, - "amount":17.450000000 - }, - { - "date":1348725666.0, - "tid":28990, - "price":11.920000000, - "amount":3.260000000 - }, - { - "date":1348727139.0, - "tid":28991, - "price":11.920000000, - "amount":2.850000000 - }, - { - "date":1348730785.0, - "tid":28992, - "price":11.920000000, - "amount":6.890000000 - }, - { - "date":1348734835.0, - "tid":28993, - "price":11.950000000, - "amount":0.400000000 - }, - { - "date":1348741804.0, - "tid":28994, - "price":11.950000000, - "amount":7.370000000 - }, - { - "date":1348745762.0, - "tid":28995, - "price":11.950010000, - "amount":21.400000000 - }, - { - "date":1348745798.0, - "tid":28996, - "price":11.950010000, - "amount":22.600000000 - }, - { - "date":1348745798.0, - "tid":28997, - "price":11.950000000, - "amount":0.180000000 - }, - { - "date":1348746344.0, - "tid":28998, - "price":12.000000000, - "amount":7.850000000 - }, - { - "date":1348749067.0, - "tid":28999, - "price":12.000000000, - "amount":14.240000000 - }, - { - "date":1348749067.0, - "tid":29000, - "price":12.000000000, - "amount":7.760000000 - }, - { - "date":1348750903.0, - "tid":29001, - "price":12.080000000, - "amount":1.660000000 - }, - { - "date":1348750903.0, - "tid":29002, - "price":12.099000000, - "amount":0.490000000 - }, - { - "date":1348750903.0, - "tid":29003, - "price":12.100000000, - "amount":1.500000000 - }, - { - "date":1348750903.0, - "tid":29004, - "price":12.100000000, - "amount":14.000000000 - }, - { - "date":1348750903.0, - "tid":29005, - "price":12.100000000, - "amount":1.600000000 - }, - { - "date":1348750903.0, - "tid":29006, - "price":12.180000000, - "amount":2.000000000 - }, - { - "date":1348750903.0, - "tid":29007, - "price":12.199000000, - "amount":0.490000000 - }, - { - "date":1348750903.0, - "tid":29008, - "price":12.200000000, - "amount":1.500000000 - }, - { - "date":1348750903.0, - "tid":29009, - "price":12.270000000, - "amount":3.200000000 - }, - { - "date":1348750903.0, - "tid":29010, - "price":12.280000000, - "amount":2.000000000 - }, - { - "date":1348750903.0, - "tid":29011, - "price":12.299000000, - "amount":0.490000000 - }, - { - "date":1348750904.0, - "tid":29012, - "price":12.330000000, - "amount":3.000000000 - }, - { - "date":1348750904.0, - "tid":29013, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348750904.0, - "tid":29014, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348750904.0, - "tid":29015, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348750904.0, - "tid":29016, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348750904.0, - "tid":29017, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348750904.0, - "tid":29018, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348750904.0, - "tid":29019, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348750904.0, - "tid":29020, - "price":12.339980000, - "amount":1.490000000 - }, - { - "date":1348752671.0, - "tid":29021, - "price":12.380000000, - "amount":2.000000000 - }, - { - "date":1348753551.0, - "tid":29022, - "price":12.399000000, - "amount":0.490000000 - }, - { - "date":1348754258.0, - "tid":29023, - "price":12.399010000, - "amount":23.490000000 - }, - { - "date":1348754275.0, - "tid":29024, - "price":12.399010000, - "amount":17.650000000 - }, - { - "date":1348754288.0, - "tid":29025, - "price":12.399010000, - "amount":5.840000000 - }, - { - "date":1348754289.0, - "tid":29026, - "price":12.399010000, - "amount":11.800000000 - }, - { - "date":1348754289.0, - "tid":29027, - "price":12.399000000, - "amount":67.710000000 - }, - { - "date":1348754337.0, - "tid":29028, - "price":12.399000000, - "amount":11.800000000 - }, - { - "date":1348754337.0, - "tid":29029, - "price":12.380010000, - "amount":9.250000000 - }, - { - "date":1348754337.0, - "tid":29030, - "price":12.380000000, - "amount":60.000000000 - }, - { - "date":1348754420.0, - "tid":29031, - "price":12.300900000, - "amount":10.000000000 - }, - { - "date":1348754420.0, - "tid":29032, - "price":12.300000000, - "amount":4.780000000 - }, - { - "date":1348754455.0, - "tid":29033, - "price":12.200010000, - "amount":8.040000000 - }, - { - "date":1348754455.0, - "tid":29034, - "price":12.200000000, - "amount":67.960000000 - }, - { - "date":1348754641.0, - "tid":29035, - "price":12.200010000, - "amount":0.160000000 - }, - { - "date":1348756032.0, - "tid":29036, - "price":12.479890000, - "amount":0.590000000 - }, - { - "date":1348756218.0, - "tid":29037, - "price":12.250000000, - "amount":0.960000000 - }, - { - "date":1348756943.0, - "tid":29038, - "price":12.250000000, - "amount":0.030000000 - }, - { - "date":1348756943.0, - "tid":29039, - "price":12.200000000, - "amount":58.250000000 - }, - { - "date":1348756968.0, - "tid":29040, - "price":12.200000000, - "amount":9.300000000 - }, - { - "date":1348758181.0, - "tid":29041, - "price":12.000000000, - "amount":10.000000000 - }, - { - "date":1348758843.0, - "tid":29042, - "price":12.000000000, - "amount":10.000000000 - }, - { - "date":1348762045.0, - "tid":29043, - "price":12.000000000, - "amount":7.000000000 - }, - { - "date":1348763008.0, - "tid":29044, - "price":11.950000000, - "amount":6.460000000 - }, - { - "date":1348763009.0, - "tid":29045, - "price":11.920000000, - "amount":3.110000000 - }, - { - "date":1348763755.0, - "tid":29046, - "price":11.750900000, - "amount":1.280000000 - }, - { - "date":1348764022.0, - "tid":29047, - "price":12.000000000, - "amount":3.000000000 - }, - { - "date":1348765519.0, - "tid":29048, - "price":11.829860000, - "amount":6.000000000 - }, - { - "date":1348765530.0, - "tid":29049, - "price":12.000000000, - "amount":10.000000000 - }, - { - "date":1348765611.0, - "tid":29050, - "price":12.000000000, - "amount":3.800000000 - }, - { - "date":1348767599.0, - "tid":29051, - "price":11.999000000, - "amount":1.000000000 - }, - { - "date":1348767664.0, - "tid":29052, - "price":11.750900000, - "amount":5.220000000 - }, - { - "date":1348768180.0, - "tid":29053, - "price":11.750890000, - "amount":7.820000000 - }, - { - "date":1348768387.0, - "tid":29054, - "price":11.750900000, - "amount":41.000000000 - }, - { - "date":1348768620.0, - "tid":29055, - "price":11.650000000, - "amount":11.450000000 - }, - { - "date":1348769314.0, - "tid":29056, - "price":11.650000000, - "amount":25.550000000 - }, - { - "date":1348769412.0, - "tid":29057, - "price":11.650000000, - "amount":11.140000000 - }, - { - "date":1348770568.0, - "tid":29058, - "price":11.650000000, - "amount":15.000000000 - }, - { - "date":1348770859.0, - "tid":29059, - "price":11.650000000, - "amount":28.110000000 - }, - { - "date":1348771170.0, - "tid":29060, - "price":11.520000000, - "amount":2.530000000 - }, - { - "date":1348772595.0, - "tid":29061, - "price":11.521010000, - "amount":3.680000000 - }, - { - "date":1348775399.0, - "tid":29062, - "price":11.521010000, - "amount":0.820000000 - }, - { - "date":1348775399.0, - "tid":29063, - "price":11.650000000, - "amount":10.680000000 - }, - { - "date":1348776917.0, - "tid":29064, - "price":11.650000000, - "amount":0.500000000 - }, - { - "date":1348779004.0, - "tid":29065, - "price":11.650000000, - "amount":7.500000000 - }, - { - "date":1348780164.0, - "tid":29066, - "price":11.530000000, - "amount":37.000000000 - }, - { - "date":1348780278.0, - "tid":29067, - "price":11.530000000, - "amount":18.300000000 - }, - { - "date":1348780342.0, - "tid":29068, - "price":11.520000000, - "amount":5.000000000 - }, - { - "date":1348780405.0, - "tid":29069, - "price":11.520000000, - "amount":7.220000000 - }, - { - "date":1348781122.0, - "tid":29070, - "price":11.650000000, - "amount":1.520000000 - }, - { - "date":1348781901.0, - "tid":29071, - "price":11.750890000, - "amount":8.000000000 - }, - { - "date":1348782272.0, - "tid":29072, - "price":11.750890000, - "amount":6.220000000 - }, - { - "date":1348782291.0, - "tid":29073, - "price":11.750890000, - "amount":5.570000000 - }, - { - "date":1348782740.0, - "tid":29074, - "price":11.750890000, - "amount":4.210000000 - }, - { - "date":1348785544.0, - "tid":29075, - "price":11.750900000, - "amount":20.570000000 - }, - { - "date":1348786167.0, - "tid":29076, - "price":11.750900000, - "amount":50.000000000 - }, - { - "date":1348787203.0, - "tid":29077, - "price":11.750900000, - "amount":8.300000000 - }, - { - "date":1348787554.0, - "tid":29078, - "price":11.750900000, - "amount":10.000000000 - }, - { - "date":1348789011.0, - "tid":29079, - "price":11.750900000, - "amount":39.910000000 - }, - { - "date":1348790582.0, - "tid":29080, - "price":11.980000000, - "amount":1.000000000 - }, - { - "date":1348790582.0, - "tid":29081, - "price":11.998960000, - "amount":4.000000000 - }, - { - "date":1348790582.0, - "tid":29082, - "price":11.999000000, - "amount":1.180000000 - }, - { - "date":1348790855.0, - "tid":29083, - "price":11.980000000, - "amount":13.020000000 - }, - { - "date":1348791260.0, - "tid":29084, - "price":11.999000000, - "amount":7.270000000 - }, - { - "date":1348791300.0, - "tid":29085, - "price":11.999000000, - "amount":21.470000000 - }, - { - "date":1348791779.0, - "tid":29086, - "price":11.999000000, - "amount":16.100000000 - }, - { - "date":1348792932.0, - "tid":29087, - "price":11.999000000, - "amount":20.160000000 - }, - { - "date":1348793506.0, - "tid":29088, - "price":11.750910000, - "amount":5.900000000 - }, - { - "date":1348796186.0, - "tid":29089, - "price":11.950000000, - "amount":14.600000000 - }, - { - "date":1348796266.0, - "tid":29090, - "price":11.950000000, - "amount":0.400000000 - }, - { - "date":1348801618.0, - "tid":29091, - "price":11.950000000, - "amount":1.500000000 - }, - { - "date":1348801783.0, - "tid":29092, - "price":11.760010000, - "amount":3.100000000 - }, - { - "date":1348804144.0, - "tid":29093, - "price":11.760010000, - "amount":3.860000000 - }, - { - "date":1348804593.0, - "tid":29094, - "price":11.760010000, - "amount":7.040000000 - }, - { - "date":1348808666.0, - "tid":29095, - "price":11.760010000, - "amount":0.260000000 - }, - { - "date":1348808691.0, - "tid":29096, - "price":11.760010000, - "amount":8.090000000 - }, - { - "date":1348808691.0, - "tid":29097, - "price":11.999950000, - "amount":2.990000000 - }, - { - "date":1348808691.0, - "tid":29098, - "price":11.999950000, - "amount":2.990000000 - }, - { - "date":1348808691.0, - "tid":29099, - "price":11.999950000, - "amount":0.930000000 - }, - { - "date":1348809067.0, - "tid":29100, - "price":11.999950000, - "amount":2.000000000 - }, - { - "date":1348814957.0, - "tid":29101, - "price":11.999950000, - "amount":0.060000000 - }, - { - "date":1348814957.0, - "tid":29102, - "price":11.999950000, - "amount":2.990000000 - }, - { - "date":1348814958.0, - "tid":29103, - "price":11.999960000, - "amount":2.990000000 - }, - { - "date":1348814958.0, - "tid":29104, - "price":11.999960000, - "amount":2.990000000 - }, - { - "date":1348814958.0, - "tid":29105, - "price":11.999980000, - "amount":2.990000000 - }, - { - "date":1348814958.0, - "tid":29106, - "price":11.999980000, - "amount":2.990000000 - }, - { - "date":1348814958.0, - "tid":29107, - "price":11.999990000, - "amount":4.000000000 - }, - { - "date":1348814958.0, - "tid":29108, - "price":12.000000000, - "amount":18.490000000 - }, - { - "date":1348829343.0, - "tid":29109, - "price":11.751000000, - "amount":12.000000000 - }, - { - "date":1348829343.0, - "tid":29110, - "price":11.750910000, - "amount":17.190000000 - }, - { - "date":1348829343.0, - "tid":29111, - "price":11.750900000, - "amount":97.690000000 - }, - { - "date":1348830130.0, - "tid":29112, - "price":11.750900000, - "amount":3.000000000 - }, - { - "date":1348858304.0, - "tid":29113, - "price":11.750900000, - "amount":5.800000000 - }, - { - "date":1348860879.0, - "tid":29114, - "price":11.750900000, - "amount":21.290000000 - }, - { - "date":1348863026.0, - "tid":29115, - "price":11.750900000, - "amount":23.710000000 - }, - { - "date":1348863093.0, - "tid":29116, - "price":11.989980000, - "amount":1.100000000 - }, - { - "date":1348863093.0, - "tid":29117, - "price":11.989980000, - "amount":2.990000000 - }, - { - "date":1348863093.0, - "tid":29118, - "price":11.989980000, - "amount":2.990000000 - }, - { - "date":1348863093.0, - "tid":29119, - "price":11.989980000, - "amount":2.990000000 - }, - { - "date":1348863093.0, - "tid":29120, - "price":11.989980000, - "amount":2.990000000 - }, - { - "date":1348863093.0, - "tid":29121, - "price":11.989980000, - "amount":2.990000000 - }, - { - "date":1348863127.0, - "tid":29122, - "price":11.989980000, - "amount":13.950000000 - }, - { - "date":1348863191.0, - "tid":29123, - "price":11.989980000, - "amount":3.500000000 - }, - { - "date":1348863250.0, - "tid":29124, - "price":11.989990000, - "amount":2.000000000 - }, - { - "date":1348863277.0, - "tid":29125, - "price":11.989990000, - "amount":1.960000000 - }, - { - "date":1348863280.0, - "tid":29126, - "price":11.990000000, - "amount":5.000000000 - }, - { - "date":1348863329.0, - "tid":29127, - "price":11.990000000, - "amount":16.000000000 - }, - { - "date":1348863361.0, - "tid":29128, - "price":11.990000000, - "amount":0.800000000 - }, - { - "date":1348864614.0, - "tid":29129, - "price":11.950000000, - "amount":0.900000000 - }, - { - "date":1348866411.0, - "tid":29130, - "price":11.950000000, - "amount":12.000000000 - }, - { - "date":1348868598.0, - "tid":29131, - "price":11.949800000, - "amount":0.070000000 - }, - { - "date":1348869394.0, - "tid":29132, - "price":11.750000000, - "amount":1.000000000 - }, - { - "date":1348869394.0, - "tid":29133, - "price":11.750000000, - "amount":14.000000000 - }, - { - "date":1348870406.0, - "tid":29134, - "price":11.750000000, - "amount":1.070000000 - }, - { - "date":1348870460.0, - "tid":29135, - "price":11.750000000, - "amount":0.040000000 - }, - { - "date":1348870730.0, - "tid":29136, - "price":11.750000000, - "amount":20.000000000 - }, - { - "date":1348872250.0, - "tid":29137, - "price":11.750000000, - "amount":7.600000000 - }, - { - "date":1348872273.0, - "tid":29138, - "price":11.750000000, - "amount":10.000000000 - }, - { - "date":1348873173.0, - "tid":29139, - "price":11.750000000, - "amount":21.750000000 - }, - { - "date":1348874750.0, - "tid":29140, - "price":11.948300000, - "amount":7.910000000 - }, - { - "date":1348876871.0, - "tid":29141, - "price":11.948300000, - "amount":1.850000000 - }, - { - "date":1348880135.0, - "tid":29142, - "price":11.948300000, - "amount":0.240000000 - }, - { - "date":1348880178.0, - "tid":29143, - "price":11.948300000, - "amount":3.190000000 - }, - { - "date":1348887163.0, - "tid":29144, - "price":11.949800000, - "amount":10.330000000 - }, - { - "date":1348887193.0, - "tid":29145, - "price":11.949800000, - "amount":28.540000000 - }, - { - "date":1348889953.0, - "tid":29146, - "price":11.949800000, - "amount":14.850000000 - }, - { - "date":1348893214.0, - "tid":29147, - "price":11.949800000, - "amount":51.900000000 - }, - { - "date":1348901631.0, - "tid":29148, - "price":11.939000000, - "amount":3.590000000 - }, - { - "date":1348907026.0, - "tid":29149, - "price":11.939000000, - "amount":0.900000000 - }, - { - "date":1348923957.0, - "tid":29150, - "price":11.949900000, - "amount":0.020000000 - }, - { - "date":1348929660.0, - "tid":29151, - "price":11.939000000, - "amount":3.910000000 - }, - { - "date":1348929660.0, - "tid":29152, - "price":11.939000000, - "amount":8.400000000 - }, - { - "date":1348943759.0, - "tid":29153, - "price":11.770000000, - "amount":12.000000000 - }, - { - "date":1348943759.0, - "tid":29154, - "price":11.760020000, - "amount":13.250000000 - }, - { - "date":1348943759.0, - "tid":29155, - "price":11.760010000, - "amount":16.500000000 - }, - { - "date":1348943759.0, - "tid":29156, - "price":11.760000000, - "amount":15.000000000 - }, - { - "date":1348943759.0, - "tid":29157, - "price":11.755000000, - "amount":24.550000000 - }, - { - "date":1348943759.0, - "tid":29158, - "price":11.750000000, - "amount":44.850000000 - }, - { - "date":1348943759.0, - "tid":29159, - "price":11.710030000, - "amount":2.000000000 - }, - { - "date":1348943759.0, - "tid":29160, - "price":11.710000000, - "amount":1.850000000 - }, - { - "date":1348943812.0, - "tid":29161, - "price":11.710000000, - "amount":78.200000000 - }, - { - "date":1348951252.0, - "tid":29162, - "price":11.710010000, - "amount":6.100000000 - }, - { - "date":1348951252.0, - "tid":29163, - "price":11.710000000, - "amount":8.900000000 - }, - { - "date":1348959444.0, - "tid":29164, - "price":11.725000000, - "amount":13.000000000 - }, - { - "date":1348960514.0, - "tid":29165, - "price":11.725000000, - "amount":0.200000000 - }, - { - "date":1348960891.0, - "tid":29166, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348960891.0, - "tid":29167, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348960891.0, - "tid":29168, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348960961.0, - "tid":29169, - "price":11.938990000, - "amount":19.250000000 - }, - { - "date":1348961150.0, - "tid":29170, - "price":11.939000000, - "amount":0.190000000 - }, - { - "date":1348961686.0, - "tid":29171, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348961727.0, - "tid":29172, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348961769.0, - "tid":29173, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348961817.0, - "tid":29174, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348961973.0, - "tid":29175, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348961988.0, - "tid":29176, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348962008.0, - "tid":29177, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348962022.0, - "tid":29178, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348962041.0, - "tid":29179, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348962079.0, - "tid":29180, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348962103.0, - "tid":29181, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348962134.0, - "tid":29182, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962142.0, - "tid":29183, - "price":11.939000000, - "amount":0.990000000 - }, - { - "date":1348962142.0, - "tid":29184, - "price":11.949870000, - "amount":2.010000000 - }, - { - "date":1348962187.0, - "tid":29185, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962212.0, - "tid":29186, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962237.0, - "tid":29187, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962294.0, - "tid":29188, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962328.0, - "tid":29189, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962405.0, - "tid":29190, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962450.0, - "tid":29191, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962471.0, - "tid":29192, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962489.0, - "tid":29193, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962522.0, - "tid":29194, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348962550.0, - "tid":29195, - "price":11.938990000, - "amount":0.990000000 - }, - { - "date":1348963232.0, - "tid":29196, - "price":11.938990000, - "amount":3.640000000 - }, - { - "date":1348969256.0, - "tid":29197, - "price":11.921900000, - "amount":10.950000000 - }, - { - "date":1348969314.0, - "tid":29198, - "price":11.921900000, - "amount":0.350000000 - }, - { - "date":1348973987.0, - "tid":29199, - "price":11.921100000, - "amount":11.000000000 - }, - { - "date":1348974329.0, - "tid":29200, - "price":11.921100000, - "amount":17.000000000 - }, - { - "date":1348975614.0, - "tid":29201, - "price":11.921890000, - "amount":0.990000000 - }, - { - "date":1348975614.0, - "tid":29202, - "price":11.921890000, - "amount":0.990000000 - }, - { - "date":1348975614.0, - "tid":29203, - "price":11.921890000, - "amount":0.990000000 - }, - { - "date":1348977447.0, - "tid":29204, - "price":11.921900000, - "amount":5.000000000 - }, - { - "date":1348978568.0, - "tid":29205, - "price":11.921890000, - "amount":111.710000000 - }, - { - "date":1348978949.0, - "tid":29206, - "price":11.921890000, - "amount":13.290000000 - }, - { - "date":1348979169.0, - "tid":29207, - "price":11.921890000, - "amount":1.100000000 - }, - { - "date":1348979731.0, - "tid":29208, - "price":11.949800000, - "amount":0.990000000 - }, - { - "date":1348979791.0, - "tid":29209, - "price":11.949860000, - "amount":0.990000000 - }, - { - "date":1348979791.0, - "tid":29210, - "price":11.949860000, - "amount":0.990000000 - }, - { - "date":1348979791.0, - "tid":29211, - "price":11.949860000, - "amount":0.990000000 - }, - { - "date":1348979791.0, - "tid":29212, - "price":11.949870000, - "amount":0.980000000 - }, - { - "date":1348979792.0, - "tid":29213, - "price":11.949870000, - "amount":2.990000000 - }, - { - "date":1348979792.0, - "tid":29214, - "price":11.949870000, - "amount":2.990000000 - }, - { - "date":1348979792.0, - "tid":29215, - "price":11.949870000, - "amount":2.990000000 - }, - { - "date":1348979792.0, - "tid":29216, - "price":11.949900000, - "amount":1.080000000 - }, - { - "date":1348981638.0, - "tid":29217, - "price":11.921890000, - "amount":1.000000000 - }, - { - "date":1348985037.0, - "tid":29218, - "price":11.921890000, - "amount":2.990000000 - }, - { - "date":1348985038.0, - "tid":29219, - "price":11.921890000, - "amount":2.990000000 - }, - { - "date":1348985137.0, - "tid":29220, - "price":11.921890000, - "amount":1.490000000 - }, - { - "date":1348994888.0, - "tid":29221, - "price":11.921890000, - "amount":0.390000000 - }, - { - "date":1349006196.0, - "tid":29222, - "price":11.921890000, - "amount":12.500000000 - }, - { - "date":1349014255.0, - "tid":29223, - "price":11.921890000, - "amount":0.760000000 - }, - { - "date":1349020106.0, - "tid":29224, - "price":11.800000000, - "amount":12.300000000 - }, - { - "date":1349020855.0, - "tid":29225, - "price":11.720000000, - "amount":9.000000000 - }, - { - "date":1349020943.0, - "tid":29226, - "price":11.710010000, - "amount":0.490000000 - }, - { - "date":1349021028.0, - "tid":29227, - "price":11.720000000, - "amount":20.000000000 - }, - { - "date":1349021113.0, - "tid":29228, - "price":11.720000000, - "amount":18.000000000 - }, - { - "date":1349024802.0, - "tid":29229, - "price":11.710010000, - "amount":10.280000000 - }, - { - "date":1349024802.0, - "tid":29230, - "price":11.710000000, - "amount":189.720000000 - }, - { - "date":1349024825.0, - "tid":29231, - "price":11.710020000, - "amount":3.230000000 - }, - { - "date":1349024825.0, - "tid":29232, - "price":11.710000000, - "amount":16.770000000 - }, - { - "date":1349025885.0, - "tid":29233, - "price":11.710000000, - "amount":160.000000000 - }, - { - "date":1349040120.0, - "tid":29234, - "price":11.880000000, - "amount":1.910000000 - }, - { - "date":1349047860.0, - "tid":29235, - "price":11.799990000, - "amount":5.150000000 - }, - { - "date":1349047876.0, - "tid":29236, - "price":11.799990000, - "amount":4.500000000 - }, - { - "date":1349047908.0, - "tid":29237, - "price":11.799990000, - "amount":3.940000000 - }, - { - "date":1349047936.0, - "tid":29238, - "price":11.799990000, - "amount":3.450000000 - }, - { - "date":1349047962.0, - "tid":29239, - "price":11.799990000, - "amount":3.010000000 - }, - { - "date":1349047991.0, - "tid":29240, - "price":11.799990000, - "amount":2.630000000 - }, - { - "date":1349048031.0, - "tid":29241, - "price":11.799990000, - "amount":2.300000000 - }, - { - "date":1349048057.0, - "tid":29242, - "price":11.799990000, - "amount":2.010000000 - }, - { - "date":1349048083.0, - "tid":29243, - "price":11.799990000, - "amount":1.760000000 - }, - { - "date":1349048115.0, - "tid":29244, - "price":11.799990000, - "amount":1.540000000 - }, - { - "date":1349048148.0, - "tid":29245, - "price":11.799990000, - "amount":1.350000000 - }, - { - "date":1349048180.0, - "tid":29246, - "price":11.799990000, - "amount":1.180000000 - }, - { - "date":1349048205.0, - "tid":29247, - "price":11.799990000, - "amount":0.530000000 - }, - { - "date":1349049947.0, - "tid":29248, - "price":11.800000000, - "amount":2.000000000 - }, - { - "date":1349055005.0, - "tid":29249, - "price":11.789990000, - "amount":7.650000000 - }, - { - "date":1349055005.0, - "tid":29250, - "price":11.790000000, - "amount":33.720000000 - }, - { - "date":1349056076.0, - "tid":29251, - "price":11.710000000, - "amount":0.560000000 - }, - { - "date":1349056392.0, - "tid":29252, - "price":11.790000000, - "amount":12.300000000 - }, - { - "date":1349056685.0, - "tid":29253, - "price":11.660000000, - "amount":1.420000000 - }, - { - "date":1349059807.0, - "tid":29254, - "price":11.790000000, - "amount":1.000000000 - }, - { - "date":1349061440.0, - "tid":29255, - "price":11.660000000, - "amount":1.580000000 - }, - { - "date":1349061493.0, - "tid":29256, - "price":11.650000000, - "amount":2.000000000 - }, - { - "date":1349061563.0, - "tid":29257, - "price":11.640010000, - "amount":0.800000000 - }, - { - "date":1349065200.0, - "tid":29258, - "price":11.640020000, - "amount":1.000000000 - }, - { - "date":1349066013.0, - "tid":29259, - "price":11.640020000, - "amount":0.660000000 - }, - { - "date":1349069533.0, - "tid":29260, - "price":11.640020000, - "amount":4.000000000 - }, - { - "date":1349079990.0, - "tid":29261, - "price":11.640020000, - "amount":13.000000000 - }, - { - "date":1349087523.0, - "tid":29262, - "price":11.640020000, - "amount":7.000000000 - }, - { - "date":1349087591.0, - "tid":29263, - "price":11.750000000, - "amount":1.010000000 - }, - { - "date":1349087649.0, - "tid":29264, - "price":11.780000000, - "amount":44.000000000 - }, - { - "date":1349087770.0, - "tid":29265, - "price":11.790000000, - "amount":20.980000000 - }, - { - "date":1349088083.0, - "tid":29266, - "price":11.800000000, - "amount":15.000000000 - }, - { - "date":1349088156.0, - "tid":29267, - "price":11.800000000, - "amount":0.710000000 - }, - { - "date":1349088520.0, - "tid":29268, - "price":11.800000000, - "amount":7.290000000 - }, - { - "date":1349094832.0, - "tid":29269, - "price":11.879970000, - "amount":5.270000000 - }, - { - "date":1349094865.0, - "tid":29270, - "price":11.879970000, - "amount":2.730000000 - }, - { - "date":1349095759.0, - "tid":29271, - "price":11.879980000, - "amount":2.990000000 - }, - { - "date":1349095759.0, - "tid":29272, - "price":11.879980000, - "amount":2.990000000 - }, - { - "date":1349095759.0, - "tid":29273, - "price":11.879980000, - "amount":2.990000000 - }, - { - "date":1349095759.0, - "tid":29274, - "price":11.879980000, - "amount":2.990000000 - }, - { - "date":1349095808.0, - "tid":29275, - "price":11.879980000, - "amount":0.340000000 - }, - { - "date":1349096549.0, - "tid":29276, - "price":11.879990000, - "amount":2.990000000 - }, - { - "date":1349096549.0, - "tid":29277, - "price":11.879990000, - "amount":2.990000000 - }, - { - "date":1349096569.0, - "tid":29278, - "price":11.879990000, - "amount":0.150000000 - }, - { - "date":1349100443.0, - "tid":29279, - "price":11.880000000, - "amount":15.060000000 - }, - { - "date":1349100459.0, - "tid":29280, - "price":11.880000000, - "amount":6.980000000 - }, - { - "date":1349101401.0, - "tid":29281, - "price":11.880000000, - "amount":0.960000000 - }, - { - "date":1349113885.0, - "tid":29282, - "price":11.790000000, - "amount":8.500000000 - }, - { - "date":1349116831.0, - "tid":29283, - "price":11.700900000, - "amount":0.400000000 - }, - { - "date":1349116831.0, - "tid":29284, - "price":11.640040000, - "amount":12.000000000 - }, - { - "date":1349116832.0, - "tid":29285, - "price":11.640030000, - "amount":14.810000000 - }, - { - "date":1349116832.0, - "tid":29286, - "price":11.640020000, - "amount":6.220000000 - }, - { - "date":1349116832.0, - "tid":29287, - "price":11.640010000, - "amount":2.060000000 - }, - { - "date":1349116832.0, - "tid":29288, - "price":11.640000000, - "amount":24.510000000 - }, - { - "date":1349122057.0, - "tid":29289, - "price":11.770000000, - "amount":14.500000000 - }, - { - "date":1349130371.0, - "tid":29290, - "price":11.769990000, - "amount":2.990000000 - }, - { - "date":1349130371.0, - "tid":29291, - "price":11.769990000, - "amount":2.990000000 - }, - { - "date":1349130371.0, - "tid":29292, - "price":11.769990000, - "amount":2.990000000 - }, - { - "date":1349130371.0, - "tid":29293, - "price":11.769990000, - "amount":2.990000000 - }, - { - "date":1349130458.0, - "tid":29294, - "price":11.770000000, - "amount":6.200000000 - }, - { - "date":1349130586.0, - "tid":29295, - "price":11.770000000, - "amount":69.300000000 - }, - { - "date":1349130586.0, - "tid":29296, - "price":11.785000000, - "amount":5.700000000 - }, - { - "date":1349131659.0, - "tid":29297, - "price":11.784990000, - "amount":2.990000000 - }, - { - "date":1349131659.0, - "tid":29298, - "price":11.784990000, - "amount":2.990000000 - }, - { - "date":1349131659.0, - "tid":29299, - "price":11.784990000, - "amount":2.990000000 - }, - { - "date":1349131659.0, - "tid":29300, - "price":11.784990000, - "amount":2.990000000 - }, - { - "date":1349131856.0, - "tid":29301, - "price":11.785000000, - "amount":13.100000000 - }, - { - "date":1349131856.0, - "tid":29302, - "price":11.789990000, - "amount":2.720000000 - }, - { - "date":1349131856.0, - "tid":29303, - "price":11.790000000, - "amount":9.340000000 - }, - { - "date":1349131975.0, - "tid":29304, - "price":11.790000000, - "amount":24.750000000 - }, - { - "date":1349132073.0, - "tid":29305, - "price":11.785000000, - "amount":2.990000000 - }, - { - "date":1349132102.0, - "tid":29306, - "price":11.785000000, - "amount":1.980000000 - }, - { - "date":1349132120.0, - "tid":29307, - "price":11.790000000, - "amount":7.410000000 - }, - { - "date":1349132120.0, - "tid":29308, - "price":11.790000000, - "amount":9.090000000 - }, - { - "date":1349132214.0, - "tid":29309, - "price":11.790000000, - "amount":3.900000000 - }, - { - "date":1349132988.0, - "tid":29310, - "price":11.785000000, - "amount":25.330000000 - }, - { - "date":1349132988.0, - "tid":29311, - "price":11.782000000, - "amount":25.120000000 - }, - { - "date":1349133302.0, - "tid":29312, - "price":11.790000000, - "amount":24.500000000 - }, - { - "date":1349133326.0, - "tid":29313, - "price":11.790000000, - "amount":8.000000000 - }, - { - "date":1349133501.0, - "tid":29314, - "price":11.782000000, - "amount":8.030000000 - }, - { - "date":1349134079.0, - "tid":29315, - "price":11.782000000, - "amount":11.000000000 - }, - { - "date":1349135280.0, - "tid":29316, - "price":11.782000000, - "amount":18.590000000 - }, - { - "date":1349136267.0, - "tid":29317, - "price":11.782000000, - "amount":16.250000000 - }, - { - "date":1349136668.0, - "tid":29318, - "price":11.782000000, - "amount":4.740000000 - }, - { - "date":1349138656.0, - "tid":29319, - "price":11.782000000, - "amount":8.690000000 - }, - { - "date":1349139557.0, - "tid":29320, - "price":11.790000000, - "amount":100.000000000 - }, - { - "date":1349139596.0, - "tid":29321, - "price":11.790000000, - "amount":50.000000000 - }, - { - "date":1349139635.0, - "tid":29322, - "price":11.790000000, - "amount":3.510000000 - }, - { - "date":1349139663.0, - "tid":29323, - "price":11.800000000, - "amount":5.000000000 - }, - { - "date":1349139722.0, - "tid":29324, - "price":11.850000000, - "amount":5.000000000 - }, - { - "date":1349139750.0, - "tid":29325, - "price":11.850000000, - "amount":10.000000000 - }, - { - "date":1349139777.0, - "tid":29326, - "price":11.850000000, - "amount":5.000000000 - }, - { - "date":1349139813.0, - "tid":29327, - "price":11.850000000, - "amount":2.000000000 - }, - { - "date":1349139840.0, - "tid":29328, - "price":11.782010000, - "amount":8.610000000 - }, - { - "date":1349139844.0, - "tid":29329, - "price":11.782010000, - "amount":2.000000000 - }, - { - "date":1349139886.0, - "tid":29330, - "price":11.782010000, - "amount":4.790000000 - }, - { - "date":1349140088.0, - "tid":29331, - "price":11.850000000, - "amount":7.450000000 - }, - { - "date":1349140231.0, - "tid":29332, - "price":11.850000000, - "amount":12.800000000 - }, - { - "date":1349143456.0, - "tid":29333, - "price":11.800000000, - "amount":24.490000000 - }, - { - "date":1349144193.0, - "tid":29334, - "price":11.782000000, - "amount":158.310000000 - }, - { - "date":1349144464.0, - "tid":29335, - "price":11.800000000, - "amount":20.000000000 - }, - { - "date":1349148116.0, - "tid":29336, - "price":11.700000000, - "amount":16.650000000 - }, - { - "date":1349148248.0, - "tid":29337, - "price":11.700000000, - "amount":5.810000000 - }, - { - "date":1349153316.0, - "tid":29338, - "price":11.799990000, - "amount":22.500000000 - }, - { - "date":1349153596.0, - "tid":29339, - "price":11.799990000, - "amount":0.150000000 - }, - { - "date":1349157649.0, - "tid":29340, - "price":11.640030000, - "amount":10.000000000 - }, - { - "date":1349158279.0, - "tid":29341, - "price":11.640020000, - "amount":4.900000000 - }, - { - "date":1349158389.0, - "tid":29342, - "price":11.640020000, - "amount":15.000000000 - }, - { - "date":1349158945.0, - "tid":29343, - "price":11.640030000, - "amount":1.410000000 - }, - { - "date":1349160181.0, - "tid":29344, - "price":11.640030000, - "amount":9.190000000 - }, - { - "date":1349174699.0, - "tid":29345, - "price":11.640030000, - "amount":7.000000000 - }, - { - "date":1349174761.0, - "tid":29346, - "price":11.640030000, - "amount":1.000000000 - }, - { - "date":1349175920.0, - "tid":29347, - "price":11.640030000, - "amount":2.400000000 - }, - { - "date":1349179670.0, - "tid":29348, - "price":11.640010000, - "amount":8.250000000 - }, - { - "date":1349180007.0, - "tid":29349, - "price":11.640010000, - "amount":23.750000000 - }, - { - "date":1349184674.0, - "tid":29350, - "price":11.640020000, - "amount":5.540000000 - }, - { - "date":1349184693.0, - "tid":29351, - "price":11.640020000, - "amount":3.890000000 - }, - { - "date":1349184706.0, - "tid":29352, - "price":11.640020000, - "amount":3.880000000 - }, - { - "date":1349184722.0, - "tid":29353, - "price":11.640020000, - "amount":3.870000000 - }, - { - "date":1349184758.0, - "tid":29354, - "price":11.640010000, - "amount":36.500000000 - }, - { - "date":1349187010.0, - "tid":29355, - "price":11.800000000, - "amount":0.540000000 - }, - { - "date":1349188430.0, - "tid":29356, - "price":11.800000000, - "amount":10.960000000 - }, - { - "date":1349190855.0, - "tid":29357, - "price":11.640010000, - "amount":2.910000000 - }, - { - "date":1349194092.0, - "tid":29358, - "price":11.750000000, - "amount":20.950000000 - }, - { - "date":1349194092.0, - "tid":29359, - "price":11.799990000, - "amount":8.740000000 - }, - { - "date":1349194092.0, - "tid":29360, - "price":11.800000000, - "amount":5.170000000 - }, - { - "date":1349194092.0, - "tid":29361, - "price":11.800000000, - "amount":30.000000000 - }, - { - "date":1349194092.0, - "tid":29362, - "price":11.850000000, - "amount":7.750000000 - }, - { - "date":1349194152.0, - "tid":29363, - "price":11.850000000, - "amount":6.760000000 - }, - { - "date":1349194186.0, - "tid":29364, - "price":11.850000000, - "amount":23.140000000 - }, - { - "date":1349194247.0, - "tid":29365, - "price":11.870000000, - "amount":8.230000000 - }, - { - "date":1349195709.0, - "tid":29366, - "price":11.870000000, - "amount":21.770000000 - }, - { - "date":1349195709.0, - "tid":29367, - "price":11.871000000, - "amount":5.000000000 - }, - { - "date":1349195709.0, - "tid":29368, - "price":11.880000000, - "amount":199.000000000 - }, - { - "date":1349195709.0, - "tid":29369, - "price":11.885000000, - "amount":3.900000000 - }, - { - "date":1349195709.0, - "tid":29370, - "price":11.900000000, - "amount":18.700000000 - }, - { - "date":1349195709.0, - "tid":29371, - "price":11.921890000, - "amount":8.950000000 - }, - { - "date":1349195709.0, - "tid":29372, - "price":11.930000000, - "amount":32.230000000 - }, - { - "date":1349195709.0, - "tid":29373, - "price":11.945000000, - "amount":2.000000000 - }, - { - "date":1349195709.0, - "tid":29374, - "price":11.949890000, - "amount":0.990000000 - }, - { - "date":1349195709.0, - "tid":29375, - "price":11.949890000, - "amount":0.990000000 - }, - { - "date":1349195709.0, - "tid":29376, - "price":11.949890000, - "amount":0.990000000 - }, - { - "date":1349195709.0, - "tid":29377, - "price":11.949890000, - "amount":0.990000000 - }, - { - "date":1349195709.0, - "tid":29378, - "price":11.950000000, - "amount":26.320000000 - }, - { - "date":1349195710.0, - "tid":29379, - "price":11.950000000, - "amount":28.170000000 - }, - { - "date":1349195834.0, - "tid":29380, - "price":11.950000000, - "amount":22.430000000 - }, - { - "date":1349195834.0, - "tid":29381, - "price":11.960000000, - "amount":100.000000000 - }, - { - "date":1349195834.0, - "tid":29382, - "price":11.990000000, - "amount":1.940000000 - }, - { - "date":1349195834.0, - "tid":29383, - "price":12.000000000, - "amount":37.710000000 - }, - { - "date":1349195834.0, - "tid":29384, - "price":12.000000000, - "amount":100.000000000 - }, - { - "date":1349195834.0, - "tid":29385, - "price":12.000000000, - "amount":2.030000000 - }, - { - "date":1349195879.0, - "tid":29386, - "price":12.050000000, - "amount":4.000000000 - }, - { - "date":1349197483.0, - "tid":29387, - "price":12.000000000, - "amount":121.000000000 - }, - { - "date":1349197768.0, - "tid":29388, - "price":12.090000000, - "amount":1.950000000 - }, - { - "date":1349198048.0, - "tid":29389, - "price":12.100000000, - "amount":1.700000000 - }, - { - "date":1349198048.0, - "tid":29390, - "price":12.100000000, - "amount":2.750000000 - }, - { - "date":1349198048.0, - "tid":29391, - "price":12.100000000, - "amount":19.970000000 - }, - { - "date":1349198391.0, - "tid":29392, - "price":12.100000000, - "amount":40.000000000 - }, - { - "date":1349198866.0, - "tid":29393, - "price":12.100000000, - "amount":11.030000000 - }, - { - "date":1349199264.0, - "tid":29394, - "price":12.150000000, - "amount":11.820000000 - }, - { - "date":1349199561.0, - "tid":29395, - "price":12.150000000, - "amount":0.990000000 - }, - { - "date":1349200545.0, - "tid":29396, - "price":12.150000000, - "amount":0.660000000 - }, - { - "date":1349200766.0, - "tid":29397, - "price":12.199000000, - "amount":0.420000000 - }, - { - "date":1349200799.0, - "tid":29398, - "price":12.200000000, - "amount":1.400000000 - }, - { - "date":1349200799.0, - "tid":29399, - "price":12.200000000, - "amount":8.600000000 - }, - { - "date":1349200834.0, - "tid":29400, - "price":12.200000000, - "amount":8.400000000 - }, - { - "date":1349214829.0, - "tid":29401, - "price":12.200000000, - "amount":1.490000000 - }, - { - "date":1349214831.0, - "tid":29402, - "price":12.299000000, - "amount":0.490000000 - }, - { - "date":1349214851.0, - "tid":29403, - "price":12.300000000, - "amount":15.000000000 - }, - { - "date":1349215002.0, - "tid":29404, - "price":12.379890000, - "amount":0.060000000 - }, - { - "date":1349216172.0, - "tid":29405, - "price":12.379890000, - "amount":2.350000000 - }, - { - "date":1349216948.0, - "tid":29406, - "price":12.299000000, - "amount":1.000000000 - }, - { - "date":1349217751.0, - "tid":29407, - "price":12.339000000, - "amount":3.000000000 - }, - { - "date":1349217953.0, - "tid":29408, - "price":12.340000000, - "amount":1.890000000 - }, - { - "date":1349218373.0, - "tid":29409, - "price":12.340000000, - "amount":1.000000000 - }, - { - "date":1349218704.0, - "tid":29410, - "price":12.340000000, - "amount":7.110000000 - }, - { - "date":1349220003.0, - "tid":29411, - "price":12.340000000, - "amount":13.130000000 - }, - { - "date":1349220317.0, - "tid":29412, - "price":12.299000000, - "amount":20.220000000 - }, - { - "date":1349220363.0, - "tid":29413, - "price":12.299000000, - "amount":38.000000000 - }, - { - "date":1349220440.0, - "tid":29414, - "price":12.349000000, - "amount":1.500000000 - }, - { - "date":1349220542.0, - "tid":29415, - "price":12.200000000, - "amount":12.340000000 - }, - { - "date":1349222063.0, - "tid":29416, - "price":12.349000000, - "amount":1.500000000 - }, - { - "date":1349222447.0, - "tid":29417, - "price":12.349000000, - "amount":12.260000000 - }, - { - "date":1349222447.0, - "tid":29418, - "price":12.200000000, - "amount":1.170000000 - }, - { - "date":1349222447.0, - "tid":29419, - "price":12.199010000, - "amount":5.790000000 - }, - { - "date":1349222447.0, - "tid":29420, - "price":12.199000000, - "amount":12.780000000 - }, - { - "date":1349222473.0, - "tid":29421, - "price":12.199000000, - "amount":13.060000000 - }, - { - "date":1349222563.0, - "tid":29422, - "price":12.199000000, - "amount":3.740000000 - }, - { - "date":1349223369.0, - "tid":29423, - "price":12.010010000, - "amount":12.550000000 - }, - { - "date":1349223398.0, - "tid":29424, - "price":12.010010000, - "amount":8.680000000 - }, - { - "date":1349223398.0, - "tid":29425, - "price":12.010000000, - "amount":91.320000000 - }, - { - "date":1349223425.0, - "tid":29426, - "price":12.010000000, - "amount":0.890000000 - }, - { - "date":1349223476.0, - "tid":29427, - "price":12.010000000, - "amount":7.790000000 - }, - { - "date":1349223507.0, - "tid":29428, - "price":12.000000000, - "amount":0.890000000 - }, - { - "date":1349223534.0, - "tid":29429, - "price":11.850010000, - "amount":5.280000000 - }, - { - "date":1349223560.0, - "tid":29430, - "price":11.850010000, - "amount":3.160000000 - }, - { - "date":1349223560.0, - "tid":29431, - "price":11.850000000, - "amount":256.330000000 - }, - { - "date":1349223624.0, - "tid":29432, - "price":12.010030000, - "amount":1.870000000 - }, - { - "date":1349223624.0, - "tid":29433, - "price":12.010020000, - "amount":43.290000000 - }, - { - "date":1349224185.0, - "tid":29434, - "price":12.349000000, - "amount":0.240000000 - }, - { - "date":1349224227.0, - "tid":29435, - "price":12.349000000, - "amount":4.230000000 - }, - { - "date":1349226198.0, - "tid":29436, - "price":12.339990000, - "amount":12.480000000 - }, - { - "date":1349226225.0, - "tid":29437, - "price":12.339990000, - "amount":11.030000000 - }, - { - "date":1349227489.0, - "tid":29438, - "price":12.010010000, - "amount":6.300000000 - }, - { - "date":1349227489.0, - "tid":29439, - "price":12.010000000, - "amount":100.000000000 - }, - { - "date":1349227518.0, - "tid":29440, - "price":12.000000000, - "amount":7.870000000 - }, - { - "date":1349227530.0, - "tid":29441, - "price":12.000000000, - "amount":7.860000000 - }, - { - "date":1349227544.0, - "tid":29442, - "price":12.000000000, - "amount":7.850000000 - }, - { - "date":1349227937.0, - "tid":29443, - "price":12.000000000, - "amount":6.690000000 - }, - { - "date":1349228429.0, - "tid":29444, - "price":12.000000000, - "amount":7.900000000 - }, - { - "date":1349234886.0, - "tid":29445, - "price":11.900000000, - "amount":10.400000000 - }, - { - "date":1349237323.0, - "tid":29446, - "price":12.000000000, - "amount":48.600000000 - }, - { - "date":1349240173.0, - "tid":29447, - "price":12.000000000, - "amount":1.000000000 - }, - { - "date":1349240973.0, - "tid":29448, - "price":12.000000000, - "amount":5.930000000 - }, - { - "date":1349244834.0, - "tid":29449, - "price":12.328850000, - "amount":1.000000000 - }, - { - "date":1349245788.0, - "tid":29450, - "price":12.328830000, - "amount":11.510000000 - }, - { - "date":1349245788.0, - "tid":29451, - "price":12.328840000, - "amount":6.090000000 - }, - { - "date":1349248952.0, - "tid":29452, - "price":12.329000000, - "amount":4.310000000 - }, - { - "date":1349248986.0, - "tid":29453, - "price":12.329000000, - "amount":24.740000000 - }, - { - "date":1349249684.0, - "tid":29454, - "price":12.330000000, - "amount":3.400000000 - }, - { - "date":1349253202.0, - "tid":29455, - "price":12.329000000, - "amount":2.250000000 - } -] \ No newline at end of file diff --git a/xchange-core/pom.xml b/xchange-core/pom.xml deleted file mode 100644 index 9983ec8b2..000000000 --- a/xchange-core/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - 4.0.0 - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-core - - XChange Core - Core functionality used by all other modules. - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - - org.java-websocket - Java-WebSocket - - - - org.slf4j - slf4j-api - - - - - org.joda - joda-money - - - - com.github.mmazi - rescu - - - - diff --git a/xchange-core/src/main/java/com/xeiam/xchange/BaseExchange.java b/xchange-core/src/main/java/com/xeiam/xchange/BaseExchange.java deleted file mode 100644 index a6e297716..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/BaseExchange.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -import com.xeiam.xchange.service.account.polling.PollingAccountService; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.ExchangeStreamingConfiguration; -import com.xeiam.xchange.service.streaming.StreamingExchangeService; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - *

- * Abstract base class to provide the following to {@link Exchange}s: - *

- *
    - *
  • Access to common methods and fields
  • - *
- */ -public abstract class BaseExchange implements Exchange { - - protected ExchangeSpecification exchangeSpecification; - - protected PollingMarketDataService pollingMarketDataService; - protected PollingTradeService pollingTradeService; - protected PollingAccountService pollingAccountService; - protected StreamingExchangeService streamingExchangeService; - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - ExchangeSpecification defaultSpecification = getDefaultExchangeSpecification(); - - // Check if default is for everything - if (exchangeSpecification == null) { - this.exchangeSpecification = defaultSpecification; - } else { - // Using a configured exchange - if (exchangeSpecification.getExchangeName() == null) { - exchangeSpecification.setExchangeName(defaultSpecification.getExchangeName()); - } - if (exchangeSpecification.getExchangeDescription() == null) { - exchangeSpecification.setExchangeDescription(defaultSpecification.getExchangeDescription()); - } - if (exchangeSpecification.getSslUri() == null) { - exchangeSpecification.setSslUri(defaultSpecification.getSslUri()); - } - if (exchangeSpecification.getHost() == null) { - exchangeSpecification.setHost(defaultSpecification.getHost()); - } - this.exchangeSpecification = exchangeSpecification; - } - - } - - @Override - public ExchangeSpecification getExchangeSpecification() { - - return exchangeSpecification; - } - - @Override - public PollingMarketDataService getPollingMarketDataService() { - - return pollingMarketDataService; - } - - @Override - public PollingTradeService getPollingTradeService() { - - return pollingTradeService; - } - - @Override - public StreamingExchangeService getStreamingExchangeService() { - - return streamingExchangeService; - } - - @Override - public PollingAccountService getPollingAccountService() { - - return pollingAccountService; - } - - @Override - public PollingMarketDataService getPollingMarketDataService(ExchangeStreamingConfiguration configuration) { - - return pollingMarketDataService; - } - - @Override - public PollingTradeService getPollingTradeService(ExchangeStreamingConfiguration configuration) { - - return pollingTradeService; - } - - @Override - public StreamingExchangeService getStreamingExchangeService(ExchangeStreamingConfiguration configuration) { - - return streamingExchangeService; - } - - @Override - public PollingAccountService getPollingAccountService(ExchangeStreamingConfiguration configuration) { - - return pollingAccountService; - } - - /* package */void setPollingMarketDataService(PollingMarketDataService marketDataService) { - - this.pollingMarketDataService = marketDataService; - } - - /* package */void setPollingTradeService(PollingTradeService tradeService) { - - this.pollingTradeService = tradeService; - } - - /* package */void setStreamingMarketDataService(StreamingExchangeService streamingExchangeService) { - - this.streamingExchangeService = streamingExchangeService; - } - - /* package */void setPollingAccountService(PollingAccountService pollingAccountService) { - - this.pollingAccountService = pollingAccountService; - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/CachedDataSession.java b/xchange-core/src/main/java/com/xeiam/xchange/CachedDataSession.java deleted file mode 100644 index 8ab95fb98..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/CachedDataSession.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -/** - *

- * Interface to provide the following the API - *

- *
    - *
  • Access to parameters associated with caching of data by exchanges
  • - *
- */ -public interface CachedDataSession { - - /** - * Some exchanges cache data, and only refresh it at a certain rate. - * - * @return The maximum allowable refresh rate in seconds - */ - public long getRefreshRate(); - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/Exchange.java b/xchange-core/src/main/java/com/xeiam/xchange/Exchange.java deleted file mode 100644 index ecb6ad844..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/Exchange.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -import com.xeiam.xchange.service.account.polling.PollingAccountService; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.ExchangeStreamingConfiguration; -import com.xeiam.xchange.service.streaming.StreamingExchangeService; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - *

- * Interface to provide the following to applications: - *

- *
    - *
  • Entry point to the XChange APIs
  • - *

    - * The consumer is given a choice of a default (no-args) or configured accessor - *

    - *
- */ -public interface Exchange { - - /** - * @return The ExchangeSpecification in use for this exchange - */ - ExchangeSpecification getExchangeSpecification(); - - /** - * @return A default ExchangeSpecification to use during the creation process if one is not supplied - */ - ExchangeSpecification getDefaultExchangeSpecification(); - - /** - * Applies any exchange specific parameters - * - * @param exchangeSpecification The exchange specification - */ - void applySpecification(ExchangeSpecification exchangeSpecification); - - /** - *

- * A market data service typically consists of a regularly updated list of the available prices for the various symbols - *

- *

- * This is the non-streaming (blocking) version of the service - *

- * - * @return The exchange's market data service - */ - PollingMarketDataService getPollingMarketDataService(); - - /** - *

- * A market data service typically consists of a regularly updated list of the available prices for the various symbols - *

- *

- * This is the non-streaming (blocking) version of the service - *

- * - * @param configuration The exchange-specific configuration to be applied after creation - * @return The exchange's market data service - */ - PollingMarketDataService getPollingMarketDataService(ExchangeStreamingConfiguration configuration); - - /** - *

- * A market data service typically consists of a regularly updated list of the available prices for the various symbols - *

- *

- * This is the streaming (non-blocking and event driven) version of the service, and requires an application to provide a suitable implementation of the listener to allow event callbacks to take - * place. - *

- * - * @return The exchange's "push" market data service - */ - StreamingExchangeService getStreamingExchangeService(); - - /** - *

- * A market data service typically consists of a regularly updated list of the available prices for the various symbols - *

- *

- * This is the streaming (non-blocking and event driven) version of the service, and requires an application to provide a suitable implementation of the listener to allow event callbacks to take - * place. - *

- * - * @param configuration The exchange-specific configuration to be applied after creation - * @return The exchange's "push" market data service - */ - StreamingExchangeService getStreamingExchangeService(ExchangeStreamingConfiguration configuration); - - /** - *

- * An trade service typically provides access to trading functionality - *

- *

- * Typically access is restricted by a secret API key and/or username password authentication which are usually provided in the {@link ExchangeSpecification} - *

- * - * @return The exchange's polling trade service - */ - PollingTradeService getPollingTradeService(); - - /** - *

- * An trade service typically provides access to trading functionality - *

- *

- * Typically access is restricted by a secret API key and/or username password authentication which are usually provided in the {@link ExchangeSpecification} - *

- * - * @param configuration The exchange-specific configuration to be applied after creation - * @return The exchange's polling trade service - */ - PollingTradeService getPollingTradeService(ExchangeStreamingConfiguration configuration); - - /** - *

- * An account service typically provides access to the user's private exchange data - *

- *

- * Typically access is restricted by a secret API key and/or username password authentication which are usually provided in the {@link ExchangeSpecification} - *

- * - * @return The exchange's polling account service - */ - PollingAccountService getPollingAccountService(); - - /** - *

- * An account service typically provides access to the user's private exchange data - *

- *

- * Typically access is restricted by a secret API key and/or username password authentication which are usually provided in the {@link ExchangeSpecification} - *

- * - * @param configuration The exchange-specific configuration to be applied after creation - * @return The exchange's polling account service - */ - PollingAccountService getPollingAccountService(ExchangeStreamingConfiguration configuration); - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/ExchangeException.java b/xchange-core/src/main/java/com/xeiam/xchange/ExchangeException.java deleted file mode 100644 index 7de9bbf66..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/ExchangeException.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -/** - *

- * Exception to provide the following to : - *

- *
    - *
  • Indication of generic Exchange exception
  • - *
- */ -public class ExchangeException extends RuntimeException { - - /** - * Constructor - * - * @param s - */ - public ExchangeException(String s) { - - super(s); - } - - /** - * Constructor - * - * @param s - * @param throwable - */ - public ExchangeException(String s, Throwable throwable) { - - super(s, throwable); - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/ExchangeFactory.java b/xchange-core/src/main/java/com/xeiam/xchange/ExchangeFactory.java deleted file mode 100644 index dcb09a5a9..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/ExchangeFactory.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Factory to provide the following to {@link Exchange}: - *

- *
    - *
  • Manages the creation of specific Exchange implementations using runtime dependencies
  • - *
- */ -public enum ExchangeFactory { - - INSTANCE; - - private final Logger log = LoggerFactory.getLogger(ExchangeFactory.class); - - /** - * Constructor - */ - private ExchangeFactory() { - - } - - /** - * Create an Exchange object - * - * @param exchangeClassName - * @return - */ - public Exchange createExchange(String exchangeClassName) { - - Assert.notNull(exchangeClassName, "exchangeClassName cannot be null"); - - log.debug("Creating default exchange from class name"); - - // Attempt to create an instance of the exchange provider - try { - - // Attempt to locate the exchange provider on the classpath - Class exchangeProviderClass = Class.forName(exchangeClassName); - - // Test that the class implements Exchange - if (Exchange.class.isAssignableFrom(exchangeProviderClass)) { - // Instantiate through the default constructor and use the default exchange specification - Exchange exchange = (Exchange) exchangeProviderClass.newInstance(); - exchange.applySpecification(exchange.getDefaultExchangeSpecification()); - return exchange; - } else { - throw new ExchangeException("Class '" + exchangeClassName + "' does not implement Exchange"); - } - } catch (ClassNotFoundException e) { - throw new ExchangeException("Problem creating Exchange (class not found)", e); - } catch (InstantiationException e) { - throw new ExchangeException("Problem creating Exchange (instantiation)", e); - } catch (IllegalAccessException e) { - throw new ExchangeException("Problem creating Exchange (illegal access)", e); - } - - // Cannot be here due to exceptions - - } - - public Exchange createExchange(ExchangeSpecification exchangeSpecification) { - - Assert.notNull(exchangeSpecification, "exchangeSpecfication cannot be null"); - - log.debug("Creating exchange from specification"); - - String exchangeClassName = exchangeSpecification.getExchangeClassName(); - - // Attempt to create an instance of the exchange provider - try { - - // Attempt to locate the exchange provider on the classpath - Class exchangeProviderClass = Class.forName(exchangeClassName); - - // Test that the class implements Exchange - if (Exchange.class.isAssignableFrom(exchangeProviderClass)) { - // Instantiate through the default constructor - Exchange exchange = (Exchange) exchangeProviderClass.newInstance(); - exchange.applySpecification(exchangeSpecification); - return exchange; - } else { - throw new ExchangeException("Class '" + exchangeClassName + "' does not implement Exchange"); - } - } catch (ClassNotFoundException e) { - throw new ExchangeException("Problem starting exchange provider (class not found)", e); - } catch (InstantiationException e) { - throw new ExchangeException("Problem starting exchange provider (instantiation)", e); - } catch (IllegalAccessException e) { - throw new ExchangeException("Problem starting exchange provider (illegal access)", e); - } - - // Cannot be here due to exceptions - - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/ExchangeSpecification.java b/xchange-core/src/main/java/com/xeiam/xchange/ExchangeSpecification.java deleted file mode 100644 index a03f857e1..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/ExchangeSpecification.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -import java.util.HashMap; -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - *

- * Specification to provide the following to {@link ExchangeFactory}: - *

- *
    - *
  • Provision of required exchangeSpecificParameters for creating an {@link Exchange}
  • - *
  • Provision of optional exchangeSpecificParameters for additional configuration
  • - *
- */ -public class ExchangeSpecification { - - @JsonProperty - private String exchangeName; - - @JsonProperty - private String exchangeDescription; - - @JsonProperty - private Double tradeFeePercent = Double.valueOf(0.0); - - @JsonProperty - private String minTradeFee; - - @JsonProperty - private String userName; - - @JsonProperty - private String password; - - @JsonProperty - private String secretKey; - - @JsonProperty - private String apiKey; - - @JsonProperty - private String sslUri; - - @JsonProperty - private String plainTextUri; - - @JsonProperty - private String host; - - @JsonProperty - private int port = 80; - - private final String exchangeClassName; - - @JsonProperty - private Map exchangeSpecificParameters = new HashMap(); - - /** - * Dynamic binding - * - * @param exchangeClassName The exchange class name (e.g. "com.xeiam.xchange.mtgox.v1.MtGoxExchange") - */ - @JsonCreator - public ExchangeSpecification(@JsonProperty("exchangeClassName") String exchangeClassName) { - - this.exchangeClassName = exchangeClassName; - } - - /** - * Static binding - * - * @param exchangeClass The exchange class - */ - public ExchangeSpecification(Class exchangeClass) { - - this.exchangeClassName = exchangeClass.getCanonicalName(); - } - - /** - * @return The exchange class name for loading at runtime - */ - public String getExchangeClassName() { - - return exchangeClassName; - } - - /** - * @param key The key into the parameter map (recommend using the provided standard static entries) - * @return Any additional exchangeSpecificParameters that the {@link Exchange} may consume to configure services - */ - public Object getParameter(String key) { - - return exchangeSpecificParameters.get(key); - } - - /** - * The host name of the server providing data (e.g. "intersango.com") - */ - public String getHost() { - - return host; - } - - public void setHost(String host) { - - this.host = host; - } - - /** - * The API key. For MtGox this would be the "Rest-Key" field - */ - public String getApiKey() { - - return apiKey; - } - - public void setApiKey(String apiKey) { - - this.apiKey = apiKey; - } - - /** - * The port number of the server providing direct socket data (e.g. "1337") - */ - public int getPort() { - - return port; - } - - public void setPort(int port) { - - this.port = port; - } - - /** - * The API secret key typically used in HMAC signing of requests. For MtGox this would be the "Rest-Sign" field - */ - public String getSecretKey() { - - return secretKey; - } - - public void setSecretKey(String secretKey) { - - this.secretKey = secretKey; - } - - /** - * The URI to reach the root of the exchange API for SSL queries
- * (e.g. use "https://example.com:8443/exchange", not "https://example.com:8443/exchange/api/v3/trades") - */ - public String getSslUri() { - - return sslUri; - } - - public void setSslUri(String uri) { - - this.sslUri = uri; - } - - /** - * The URI to reach the root of the exchange API for plaintext (non-SSL) queries
- * (e.g. use "http://example.com:8443/exchange", not "http://example.com:8443/exchange/api/v3/trades") - */ - public String getPlainTextUri() { - - return plainTextUri; - } - - public void setPlainTextUri(String plainTextUri) { - - this.plainTextUri = plainTextUri; - } - - /** - * Allows arbitrary exchange-specific parameters to be passed to the exchange implementation - */ - public Map getExchangeSpecificParameters() { - - return exchangeSpecificParameters; - } - - public void setExchangeSpecificParameters(Map exchangeSpecificParameters) { - - this.exchangeSpecificParameters = exchangeSpecificParameters; - } - - /** - * The password for authentication - */ - public String getPassword() { - - return password; - } - - public void setPassword(String password) { - - this.password = password; - } - - /** - * The username for authentication - */ - public String getUserName() { - - return userName; - } - - public void setUserName(String userName) { - - this.userName = userName; - } - - /** - * @return The exchange name (e.g. "Mt Gox") - */ - public String getExchangeName() { - - return exchangeName; - } - - public void setExchangeName(String exchangeName) { - - this.exchangeName = exchangeName; - } - - /** - * @return The exchange description (e.g. "Major exchange specialising in USD, EUR, GBP") - */ - public String getExchangeDescription() { - - return exchangeDescription; - } - - public void setExchangeDescription(String exchangeDescription) { - - this.exchangeDescription = exchangeDescription; - } - - /** - * Some exchanges offer a sliding scale that is earned based on trade history so this is normally set externally - * - * @return The fee per trade expressed as a percentage (e.g. 0.6 is 0.6%) - */ - public Double getTradeFeePercent() { - - return tradeFeePercent; - } - - public void setTradeFeePercent(Double tradeFeePercent) { - - this.tradeFeePercent = tradeFeePercent; - } - - /** - * Some exchanges offer a sliding scale that is earned based on trade history so this is normally set externally - * - * @return The minimum fee per trade expressed in the exchange's local currency (e.g. "USD 0.25") - */ - public String getMinTradeFee() { - - return minTradeFee; - } - - public void setMinTradeFee(String minTradeFee) { - - this.minTradeFee = minTradeFee; - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/NotAvailableFromExchangeException.java b/xchange-core/src/main/java/com/xeiam/xchange/NotAvailableFromExchangeException.java deleted file mode 100644 index e30573295..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/NotAvailableFromExchangeException.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -/** - *

- * Exception to provide the following to API: - *

- *
    - *
  • Indication that the exchange does not support the requested function or data
  • - *
- */ -public class NotAvailableFromExchangeException extends RuntimeException { - - /** - * Constructor - * - * @param message - */ - public NotAvailableFromExchangeException(String message) { - - super(message); - } - - /** - * Constructor - */ - public NotAvailableFromExchangeException() { - - this("Requested Information from Exchange is not available."); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/NotYetImplementedForExchangeException.java b/xchange-core/src/main/java/com/xeiam/xchange/NotYetImplementedForExchangeException.java deleted file mode 100644 index 37b76564a..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/NotYetImplementedForExchangeException.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -/** - *

- * Exception to provide the following to API: - *

- *
    - *
  • Indication that the exchange supports the requested function or data, but it's not yet been implemented
  • - *
- */ -public class NotYetImplementedForExchangeException extends RuntimeException { - - /** - * Constructor - * - * @param message - */ - public NotYetImplementedForExchangeException(String message) { - - super(message); - } - - /** - * Constructor - */ - public NotYetImplementedForExchangeException() { - - this("Capability not yet implemented for exchange."); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/OnlineTest.java b/xchange-core/src/main/java/com/xeiam/xchange/OnlineTest.java deleted file mode 100644 index ab52f322d..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/OnlineTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -/** - * Use this to mark tests that require an Internet connection. These tests will not be run with mvn test but only in Maven's integration-test phase (eg. when running mvn install). Usage: annotate the - * test class with @{@link org.junit.experimental.categories.Category}(OnlineTest.class) This class is in xchange-core because it must be visible in all test sources, as well as in core (it is - * referenced in the core pom). - * - * @author Matija Mazi - */ -public interface OnlineTest { - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/currency/Currencies.java b/xchange-core/src/main/java/com/xeiam/xchange/currency/Currencies.java deleted file mode 100644 index 2a5b63e9e..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/currency/Currencies.java +++ /dev/null @@ -1,204 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http; ////xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions; // - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.currency; - -/** - * Global currency symbols - */ -public class Currencies { - - /** - * Private constructor so it cannot be instantiated - */ - private Currencies() { - - } - - /** - * Currencies - */ - public static final String AED = "AED"; // "United Arab Emirates Dirham", - public static final String AFN = "AFN"; // "Afghan Afghani", - public static final String ALL = "ALL"; // "Albanian Lek", - public static final String AMD = "AMD"; // "Armenian Dram", - public static final String ANG = "ANG"; // "Netherlands Antillean Guilder", - public static final String AOA = "AOA"; // "Angolan Kwanza", - public static final String ARS = "ARS"; // "Argentine Peso", - public static final String AUD = "AUD"; // "Australian Dollar", - public static final String AWG = "AWG"; // "Aruban Florin", - public static final String AZN = "AZN"; // "Azerbaijani Manat", - public static final String BAM = "BAM"; // "Bosnia-Herzegovina Convertible Mark", - public static final String BBD = "BBD"; // "Barbadian Dollar", - public static final String BDT = "BDT"; // "Bangladeshi Taka", - public static final String BGN = "BGN"; // "Bulgarian Lev", - public static final String BHD = "BHD"; // "Bahraini Dinar", - public static final String BIF = "BIF"; // "Burundian Franc", - public static final String BMD = "BMD"; // "Bermudan Dollar", - public static final String BND = "BND"; // "Brunei Dollar", - public static final String BOB = "BOB"; // "Bolivian Boliviano", - public static final String BRL = "BRL"; // "Brazilian Real", - public static final String BSD = "BSD"; // "Bahamian Dollar", - public static final String BTC = "BTC"; // Bitcoin - public static final String BTN = "BTN"; // "Bhutanese Ngultrum", - public static final String BWP = "BWP"; // "Botswanan Pula", - public static final String BYR = "BYR"; // "Belarusian Ruble", - public static final String BZD = "BZD"; // "Belize Dollar", - public static final String CAD = "CAD"; // "Canadian Dollar", - public static final String CDF = "CDF"; // "Congolese Franc", - public static final String CHF = "CHF"; // "Swiss Franc", - public static final String CLF = "CLF"; // "Chilean Unit of Account (UF)", - public static final String CLP = "CLP"; // "Chilean Peso", - public static final String CNY = "CNY"; // "Chinese Yuan", - public static final String COP = "COP"; // "Colombian Peso", - public static final String CRC = "CRC"; // "Costa Rican Colón", - public static final String CUP = "CUP"; // "Cuban Peso", - public static final String CVE = "CVE"; // "Cape Verdean Escudo", - public static final String CZK = "CZK"; // "Czech Republic Koruna", - public static final String DJF = "DJF"; // "Djiboutian Franc", - public static final String DKK = "DKK"; // "Danish Krone", - public static final String DOP = "DOP"; // "Dominican Peso", - public static final String DZD = "DZD"; // "Algerian Dinar", - public static final String EEK = "EEK"; // "Estonian Kroon", - public static final String EGP = "EGP"; // "Egyptian Pound", - public static final String ETB = "ETB"; // "Ethiopian Birr", - public static final String EUR = "EUR"; // "Euro", - public static final String FJD = "FJD"; // "Fijian Dollar", - public static final String FKP = "FKP"; // "Falkland Islands Pound", - public static final String GBP = "GBP"; // "British Pound Sterling", - public static final String GEL = "GEL"; // "Georgian Lari", - public static final String GHS = "GHS"; // "Ghanaian Cedi", - public static final String GIP = "GIP"; // "Gibraltar Pound", - public static final String GMD = "GMD"; // "Gambian Dalasi", - public static final String GNF = "GNF"; // "Guinean Franc", - public static final String GTQ = "GTQ"; // "Guatemalan Quetzal", - public static final String GYD = "GYD"; // "Guyanaese Dollar", - public static final String HKD = "HKD"; // "Hong Kong Dollar", - public static final String HNL = "HNL"; // "Honduran Lempira", - public static final String HRK = "HRK"; // "Croatian Kuna", - public static final String HTG = "HTG"; // "Haitian Gourde", - public static final String HUF = "HUF"; // "Hungarian Forint", - public static final String IDR = "IDR"; // "Indonesian Rupiah", - public static final String ILS = "ILS"; // "Israeli New Sheqel", - public static final String INR = "INR"; // "Indian Rupee", - public static final String IQD = "IQD"; // "Iraqi Dinar", - public static final String IRR = "IRR"; // "Iranian Rial", - public static final String ISK = "ISK"; // "Icelandic Króna", - public static final String JEP = "JEP"; // "Jersey Pound", - public static final String JMD = "JMD"; // "Jamaican Dollar", - public static final String JOD = "JOD"; // "Jordanian Dinar", - public static final String JPY = "JPY"; // "Japanese Yen", - public static final String KES = "KES"; // "Kenyan Shilling", - public static final String KGS = "KGS"; // "Kyrgystani Som", - public static final String KHR = "KHR"; // "Cambodian Riel", - public static final String KMF = "KMF"; // "Comorian Franc", - public static final String KPW = "KPW"; // "North Korean Won", - public static final String KRW = "KRW"; // "South Korean Won", - public static final String KWD = "KWD"; // "Kuwaiti Dinar", - public static final String KYD = "KYD"; // "Cayman Islands Dollar", - public static final String KZT = "KZT"; // "Kazakhstani Tenge", - public static final String LAK = "LAK"; // "Laotian Kip", - public static final String LBP = "LBP"; // "Lebanese Pound", - public static final String LKR = "LKR"; // "Sri Lankan Rupee", - public static final String LRD = "LRD"; // "Liberian Dollar", - public static final String LSL = "LSL"; // "Lesotho Loti", - public static final String LTC = "LTC"; // "Litecoin", - public static final String LTL = "LTL"; // "Lithuanian Litas", - public static final String LVL = "LVL"; // "Latvian Lats", - public static final String LYD = "LYD"; // "Libyan Dinar", - public static final String MAD = "MAD"; // "Moroccan Dirham", - public static final String MDL = "MDL"; // "Moldovan Leu", - public static final String MGA = "MGA"; // "Malagasy Ariary", - public static final String MKD = "MKD"; // "Macedonian Denar", - public static final String MMK = "MMK"; // "Myanma Kyat", - public static final String MNT = "MNT"; // "Mongolian Tugrik", - public static final String MOP = "MOP"; // "Macanese Pataca", - public static final String MRO = "MRO"; // "Mauritanian Ouguiya", - public static final String MUR = "MUR"; // "Mauritian Rupee", - public static final String MVR = "MVR"; // "Maldivian Rufiyaa", - public static final String MWK = "MWK"; // "Malawian Kwacha", - public static final String MXN = "MXN"; // "Mexican Peso", - public static final String MYR = "MYR"; // "Malaysian Ringgit", - public static final String MZN = "MZN"; // "Mozambican Metical", - public static final String NAD = "NAD"; // "Namibian Dollar", - public static final String NGN = "NGN"; // "Nigerian Naira", - public static final String NIO = "NIO"; // "Nicaraguan Córdoba", - public static final String NMC = "NMC"; // "Namecoin", - public static final String NOK = "NOK"; // "Norwegian Krone", - public static final String NPR = "NPR"; // "Nepalese Rupee", - public static final String NZD = "NZD"; // "New Zealand Dollar", - public static final String OMR = "OMR"; // "Omani Rial", - public static final String PAB = "PAB"; // "Panamanian Balboa", - public static final String PEN = "PEN"; // "Peruvian Nuevo Sol", - public static final String PGK = "PGK"; // "Papua New Guinean Kina", - public static final String PHP = "PHP"; // "Philippine Peso", - public static final String PKR = "PKR"; // "Pakistani Rupee", - public static final String PLN = "PLN"; // "Polish Zloty", - public static final String PYG = "PYG"; // "Paraguayan Guarani", - public static final String QAR = "QAR"; // "Qatari Rial", - public static final String RON = "RON"; // "Romanian Leu", - public static final String RSD = "RSD"; // "Serbian Dinar", - public static final String RUB = "RUB"; // "Russian Ruble", - public static final String RUR = "RUR"; // "Old Russian Ruble", - public static final String RWF = "RWF"; // "Rwandan Franc", - public static final String SAR = "SAR"; // "Saudi Riyal", - public static final String SBD = "SBD"; // "Solomon Islands Dollar", - public static final String SCR = "SCR"; // "Seychellois Rupee", - public static final String SDG = "SDG"; // "Sudanese Pound", - public static final String SEK = "SEK"; // "Swedish Krona", - public static final String SGD = "SGD"; // "Singapore Dollar", - public static final String SHP = "SHP"; // "Saint Helena Pound", - public static final String SLL = "SLL"; // "Sierra Leonean Leone", - public static final String SOS = "SOS"; // "Somali Shilling", - public static final String SRD = "SRD"; // "Surinamese Dollar", - public static final String STD = "STD"; // "São Tomé and Príncipe Dobra", - public static final String SVC = "SVC"; // "Salvadoran Colón", - public static final String SYP = "SYP"; // "Syrian Pound", - public static final String SZL = "SZL"; // "Swazi Lilangeni", - public static final String THB = "THB"; // "Thai Baht", - public static final String TJS = "TJS"; // "Tajikistani Somoni", - public static final String TMT = "TMT"; // "Turkmenistani Manat", - public static final String TND = "TND"; // "Tunisian Dinar", - public static final String TOP = "TOP"; // "Tongan Paʻanga", - public static final String TRY = "TRY"; // "Turkish Lira", - public static final String TTD = "TTD"; // "Trinidad and Tobago Dollar", - public static final String TWD = "TWD"; // "New Taiwan Dollar", - public static final String TZS = "TZS"; // "Tanzanian Shilling", - public static final String UAH = "UAH"; // "Ukrainian Hryvnia", - public static final String UGX = "UGX"; // "Ugandan Shilling", - public static final String USD = "USD"; // "United States Dollar", - public static final String UYU = "UYU"; // "Uruguayan Peso", - public static final String UZS = "UZS"; // "Uzbekistan Som", - public static final String VEF = "VEF"; // "Venezuelan Bolívar", - public static final String VND = "VND"; // "Vietnamese Dong", - public static final String VUV = "VUV"; // "Vanuatu Vatu", - public static final String WST = "WST"; // "Samoan Tala", - public static final String XAF = "XAF"; // "CFA Franc BEAC", - public static final String XCD = "XCD"; // "East Caribbean Dollar", - public static final String XDR = "XDR"; // "Special Drawing Rights", - public static final String XOF = "XOF"; // "CFA Franc BCEAO", - public static final String XPF = "XPF"; // "CFP Franc", - public static final String YER = "YER"; // "Yemeni Rial", - public static final String ZAR = "ZAR"; // "South African Rand", - public static final String ZMK = "ZMK"; // "Zambian Kwacha", - public static final String ZWL = "ZWL"; // "Zimbabwean Dollar" - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/currency/CurrencyPair.java b/xchange-core/src/main/java/com/xeiam/xchange/currency/CurrencyPair.java deleted file mode 100644 index 93f963ccc..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/currency/CurrencyPair.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.currency; - -/** - *

- * Value object to provide the following to API: - *

- *
    - *
  • Provision of major currency symbol pairs (EUR/USD, GBP/USD etc)
  • - *
  • Provision of arbitrary symbol pairs for exchange index trading, notional currencies etc
  • - *
- *

- * Symbol pairs are quoted, for example, as EUR/USD 1.25 such that 1 EUR can be purchased with 1.25 USD - *

- */ -public class CurrencyPair { - - // Provide some standard major symbols - public static final CurrencyPair EUR_USD = new CurrencyPair("EUR"); - public static final CurrencyPair GBP_USD = new CurrencyPair("GBP"); - public static final CurrencyPair USD_JPY = new CurrencyPair("USD", "JPY"); - public static final CurrencyPair USD_CHF = new CurrencyPair("USD", "CHF"); - public static final CurrencyPair USD_AUD = new CurrencyPair("USD", "AUD"); - public static final CurrencyPair USD_CAD = new CurrencyPair("USD", "CAD"); - - // Provide some courtesy BTC major symbols - public static final CurrencyPair BTC_USD = new CurrencyPair("BTC"); - public static final CurrencyPair BTC_GBP = new CurrencyPair("BTC", "GBP"); - public static final CurrencyPair BTC_EUR = new CurrencyPair("BTC", "EUR"); - public static final CurrencyPair BTC_JPY = new CurrencyPair("BTC", "JPY"); - public static final CurrencyPair BTC_CHF = new CurrencyPair("BTC", "CHF"); - public static final CurrencyPair BTC_AUD = new CurrencyPair("BTC", "AUD"); - public static final CurrencyPair BTC_CAD = new CurrencyPair("BTC", "CAD"); - public static final CurrencyPair BTC_CNY = new CurrencyPair("BTC", "CNY"); - public static final CurrencyPair BTC_DKK = new CurrencyPair("BTC", "DKK"); - public static final CurrencyPair BTC_HKD = new CurrencyPair("BTC", "HKD"); - public static final CurrencyPair BTC_NZD = new CurrencyPair("BTC", "NZD"); - public static final CurrencyPair BTC_PLN = new CurrencyPair("BTC", "PLN"); - public static final CurrencyPair BTC_RUB = new CurrencyPair("BTC", "RUB"); - public static final CurrencyPair BTC_SEK = new CurrencyPair("BTC", "SEK"); - public static final CurrencyPair BTC_SGD = new CurrencyPair("BTC", "SGD"); - public static final CurrencyPair BTC_THB = new CurrencyPair("BTC", "THB"); - - public static final CurrencyPair BTC_RUR = new CurrencyPair("BTC", "RUR"); - public static final CurrencyPair LTC_BTC = new CurrencyPair("LTC", "BTC"); - public static final CurrencyPair LTC_USD = new CurrencyPair("LTC", "USD"); - public static final CurrencyPair LTC_RUR = new CurrencyPair("LTC", "RUR"); - public static final CurrencyPair NMC_BTC = new CurrencyPair("NMC", "BTC"); - public static final CurrencyPair USD_RUR = new CurrencyPair("USD", "RUR"); - - public static final CurrencyPair NVC_BTC = new CurrencyPair("NVC", "BTC"); - public static final CurrencyPair TRC_BTC = new CurrencyPair("TRC", "BTC"); - public static final CurrencyPair PPC_BTC = new CurrencyPair("PPC", "BTC"); - - public final String baseCurrency; - public final String counterCurrency; - - /** - *

- * Reduced constructor using the global reserve currency symbol (USD) as the default counter - *

- * - * @param baseCurrency The base symbol (single unit) - */ - public CurrencyPair(String baseCurrency) { - - this(baseCurrency, "USD"); - } - - /** - *

- * Full constructor - *

- * - * @param baseCurrency The base symbol (single unit) - * @param counterCurrency The counter symbol (multiple units) - */ - public CurrencyPair(String baseCurrency, String counterCurrency) { - - this.baseCurrency = baseCurrency; - this.counterCurrency = counterCurrency; - } - - @Override - public String toString() { - - return baseCurrency + "/" + counterCurrency; - } - - @Override - public int hashCode() { - - final int prime = 31; - int result = 1; - result = prime * result + ((baseCurrency == null) ? 0 : baseCurrency.hashCode()); - result = prime * result + ((counterCurrency == null) ? 0 : counterCurrency.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - CurrencyPair other = (CurrencyPair) obj; - if (baseCurrency == null) { - if (other.baseCurrency != null) { - return false; - } - } else if (!baseCurrency.equals(other.baseCurrency)) { - return false; - } - if (counterCurrency == null) { - if (other.counterCurrency != null) { - return false; - } - } else if (!counterCurrency.equals(other.counterCurrency)) { - return false; - } - return true; - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/currency/MoneyUtils.java b/xchange-core/src/main/java/com/xeiam/xchange/currency/MoneyUtils.java deleted file mode 100644 index 64faf58d3..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/currency/MoneyUtils.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.currency; - -import java.math.BigDecimal; -import java.math.RoundingMode; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -/** - *

- * Utilities to provide the following to application: - *

- *
    - *
  • Various shortcuts to common currencies from Joda Money
  • - *
- */ -public class MoneyUtils { - - /** - * private Constructor - */ - private MoneyUtils() { - - } - - /** - * @param value A general-purpose currency and value representation (e.g. "USD 3210.12345678") - * @return A standard fiat currency BigMoney that can handle complex calculations and display using a scale inferred from the minor part - * @see org.joda.money.Money For a simpler approach for fiat currencies not requiring precise calculations (e.g. display only) - */ - public static BigMoney parse(String value) { - - try { - return BigMoney.parse(value); - } catch (IllegalArgumentException e) { // for example, BigMoney cannot handle scientific notation in its constructor - BigDecimal bigDecimal = new BigDecimal(value.substring(4)); - return BigMoney.parse(value.substring(0, 3) + " " + bigDecimal.toPlainString()); // here we attempt to parse it manually with the BigDecimal constructor - } - } - - /** - * @return null if amount == null; otherwise appropriate BigMoney. - * @throws org.joda.money.IllegalCurrencyException if the currency is unknown - */ - public static BigMoney parseMoney(String currency, BigDecimal amount) { - - return amount == null ? null : BigMoney.of(CurrencyUnit.of(currency), amount); - } - - public static BigMoney parseMoney(String currency, double amount) { - - return BigMoney.of(CurrencyUnit.of(currency), amount); - } - - /** - * @param value A general-purpose currency and value representation (e.g. "BTC 3210.1234567800") - * @return A standard Bitcoin currency BigMoney that can handle complex calculations using a scale of 12 regardless of the minor part - */ - public static BigMoney parseBitcoin(String value) { - - BigMoney unscaled = BigMoney.parse(value); - if (!unscaled.getCurrencyUnit().getCode().equals("BTC")) { - throw new IllegalArgumentException("Must have BTC currency code"); - } - return unscaled.withScale(12); - } - - /** - * @param value A whole number of satoshis (e.g. 1 provides the same as "BTC 0.00000001") - * @return A standard Bitcoin currency BigMoney that can handle complex calculations using a scale of 12 regardless of the minor part as a multiplier/divisor - */ - public static BigMoney fromSatoshi(long value) { - - BigMoney unscaled = BigMoney.ofScale(CurrencyUnit.getInstance("BTC"), value, 8); - if (!unscaled.getCurrencyUnit().getCode().equals("BTC")) { - throw new IllegalArgumentException("Must have BTC currency code"); - } - return unscaled.withScale(12); - } - - /** - * @param value - * @return - */ - public static String formatBitcoin(BigMoney value) { - - if (!value.getCurrencyUnit().getCode().equals("BTC")) { - throw new IllegalArgumentException("Must have BTC currency code"); - } - return value.withScale(8, RoundingMode.HALF_UP).toString(); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/Order.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/Order.java deleted file mode 100644 index 6e23b2f45..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/Order.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto; - -import java.math.BigDecimal; -import java.util.Date; - -/** - * Data object representing an order - */ -public class Order { - - public enum OrderType { - - /** - * Buying order (you're making an offer) - */ - BID, - /** - * Selling order (you're asking for offers) - */ - ASK - } - - /** - * Order type i.e. bid or ask - */ - private final OrderType type; - - /** - * Amount to be ordered / amount that was ordered - */ - private final BigDecimal tradableAmount; - - /** - * An identifier that uniquely identifies the tradeable - */ - private final String tradableIdentifier; - - /** - * The currency used to settle the market order transaction - */ - private final String transactionCurrency; - - /** - * An identifier that uniquely identifies the order - */ - private final String id; - - /** - * The timestamp on the order - */ - private final Date timestamp; - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - * @param id An id (usually provided by the exchange) - */ - public Order(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, String id, Date timestamp) { - - this.type = type; - this.tradableAmount = tradableAmount; - this.tradableIdentifier = tradableIdentifier; - this.transactionCurrency = transactionCurrency; - this.id = id; - this.timestamp = timestamp; - } - - /** - * @return The type (BID or ASK) - */ - public OrderType getType() { - - return type; - } - - /** - * @return The amount to trade - */ - public BigDecimal getTradableAmount() { - - return tradableAmount; - } - - /** - * @return The tradeable identifier (e.g. BTC in BTC/USD) - */ - public String getTradableIdentifier() { - - return tradableIdentifier; - } - - /** - * @return The transaction currency (e.g. USD in BTC/USD) - */ - public String getTransactionCurrency() { - - return transactionCurrency; - } - - /** - * @return A unique identifier (normally provided by the exchange) - */ - public String getId() { - - return id; - } - - public Date getTimestamp() { - - return timestamp; - } - - @Override - public String toString() { - - return "Order [type=" + type + ", tradableAmount=" + tradableAmount + ", tradableIdentifier=" + tradableIdentifier + ", transactionCurrency=" + transactionCurrency + ", id=" + id + ", timestamp=" - + timestamp + "]"; - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/account/AccountInfo.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/account/AccountInfo.java deleted file mode 100644 index 5b2adbc15..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/account/AccountInfo.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.account; - -import java.util.List; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -import com.xeiam.xchange.dto.trade.Wallet; - -/** - *

- * DTO representing account information - *

- *

- * Account information is associated with the current balances in various currencies held on the exchange. - *

- */ -public final class AccountInfo { - - private final String username; - private final List wallets; - - /** - * @param username The user name - * @param wallets The available wallets - */ - public AccountInfo(String username, List wallets) { - - this.username = username; - this.wallets = wallets; - } - - /** - * @return The user name - */ - public String getUsername() { - - return username; - } - - /** - * @return The available wallets (balance and currency) - */ - public List getWallets() { - - return wallets; - } - - /** - * Utility method to locate an exchange balance in the given currency - * - * @param currencyUnit A valid currency unit (e.g. CurrencyUnit.USD or CurrencyUnit.of("BTC")) - * @return The balance, or zero if not found - */ - public BigMoney getBalance(CurrencyUnit currencyUnit) { - - for (Wallet wallet : wallets) { - if (wallet.getBalance().getCurrencyUnit().equals(currencyUnit)) { - return wallet.getBalance(); - } - } - - // Not found so treat as zero - return BigMoney.zero(currencyUnit); - } - - @Override - public String toString() { - - return "AccountInfo [username=" + username + ", wallets=" + wallets + "]"; - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBook.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBook.java deleted file mode 100644 index c3012686d..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBook.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.marketdata; - -import java.util.Collections; -import java.util.List; - -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; - -/** - *

- * DTO representing the exchange order book - *

- *

- *

- */ -public final class OrderBook { - - private final List asks; - private final List bids; - - /** - * Constructor - * - * @param asks The ASK orders - * @param bids The BID orders - */ - public OrderBook(List asks, List bids) { - - this.asks = asks; - this.bids = bids; - } - - public List getAsks() { - - Collections.sort(asks); - return asks; - } - - public List getBids() { - - Collections.sort(bids); - return bids; - } - - // TODO Breaks naming convention - public void Update(LimitOrder newOrder) { - - if (newOrder.getType().equals(OrderType.ASK)) { - int index = asks.indexOf(newOrder); - if (index > -1) - asks.set(index, newOrder); - else - asks.add(newOrder); - Collections.sort(asks); - } - if (newOrder.getType().equals(OrderType.BID)) { - int index = bids.indexOf(newOrder); - if (index > -1) - bids.set(index, newOrder); - else - bids.add(newOrder); - Collections.sort(bids); - } - - } - - @Override - public String toString() { - - return "Depth [asks=" + asks.toString() + ", bids=" + bids.toString() + "]"; - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBookUpdate.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBookUpdate.java deleted file mode 100644 index d22c4ef99..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBookUpdate.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.marketdata; - -import java.math.BigDecimal; -import java.util.Date; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; - -/** - * Data object representing a Market Depth update - */ -public final class OrderBookUpdate { - - private final LimitOrder limitOrder; - - /** this is the total volume at this price in the order book */ - private final BigDecimal totalVolume; - - /** - * Constructor - * - * @param type - * @param volume - * @param tradableIdentifier - * @param transactionCurrency - * @param limitPrice - * @param date - * @param totalVolume - */ - public OrderBookUpdate(OrderType type, BigDecimal volume, String tradableIdentifier, String transactionCurrency, BigMoney limitPrice, Date timestamp, BigDecimal totalVolume) { - - this.limitOrder = new LimitOrder(type, volume, tradableIdentifier, transactionCurrency, limitPrice, timestamp); - this.totalVolume = totalVolume; - } - - public LimitOrder getLimitOrder() { - - return limitOrder; - } - - public BigDecimal getTotalVolume() { - - return totalVolume; - } - - @Override - public String toString() { - - return "OrderBookUpdate [limitOrder=" + limitOrder + ", totalVolume=" + totalVolume + "]"; - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Ticker.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Ticker.java deleted file mode 100644 index 50cca0c1d..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Ticker.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.marketdata; - -import java.math.BigDecimal; -import java.util.Date; - -import org.joda.money.BigMoney; - -/** - *

- * A class encapsulating the most basic information a "Ticker" should contain. - *

- *

- * A ticker contains data representing the latest trade. - *

- */ -public final class Ticker { - - private final String tradableIdentifier; - private final BigMoney last; - private final BigMoney bid; - private final BigMoney ask; - private final BigMoney high; - private final BigMoney low; - private final BigDecimal volume; - private final Date timestamp; - - /** - * Constructor - * - * @param tradableIdentifier - * @param last - * @param bid - * @param ask - * @param high - * @param low - * @param volume - * @param timestamp - */ - private Ticker(String tradableIdentifier, BigMoney last, BigMoney bid, BigMoney ask, BigMoney high, BigMoney low, BigDecimal volume, Date timestamp) { - - this.tradableIdentifier = tradableIdentifier; - this.last = last; - this.bid = bid; - this.ask = ask; - this.high = high; - this.low = low; - this.volume = volume; - this.timestamp = timestamp; - } - - public String getTradableIdentifier() { - - return tradableIdentifier; - } - - public BigMoney getLast() { - - return last; - } - - public BigMoney getBid() { - - return bid; - } - - public BigMoney getAsk() { - - return ask; - } - - public BigMoney getHigh() { - - return high; - } - - public BigMoney getLow() { - - return low; - } - - public BigDecimal getVolume() { - - return volume; - } - - public Date getTimestamp() { - - return timestamp; - } - - @Override - public String toString() { - - return "Ticker [tradableIdentifier=" + tradableIdentifier + ", last=" + last + ", bid=" + bid + ", ask=" + ask + ", high=" + high + ", low=" + low + ", volume=" + volume + ", timestamp=" - + timestamp + "]"; - } - - /** - *

- * Builder to provide the following to {@link Ticker}: - *

- *
    - *
  • Provision of fluent chained construction interface
  • - *
- *   - */ - public static class TickerBuilder { - - private String tradableIdentifier; - private BigMoney last; - private BigMoney bid; - private BigMoney ask; - private BigMoney high; - private BigMoney low; - private BigDecimal volume; - private Date timestamp; - - /** - * @return A new instance of the builder - */ - public static TickerBuilder newInstance() { - - return new TickerBuilder(); - } - - // Prevent repeat builds - private boolean isBuilt = false; - - public Ticker build() { - - validateState(); - - Ticker ticker = new Ticker(tradableIdentifier, last, bid, ask, high, low, volume, timestamp); - - isBuilt = true; - - return ticker; - } - - private void validateState() { - - if (isBuilt) { - throw new IllegalStateException("The entity has been built"); - } - } - - public TickerBuilder withTradableIdentifier(String tradableIdentifier) { - - this.tradableIdentifier = tradableIdentifier; - return this; - } - - public TickerBuilder withLast(BigMoney last) { - - this.last = last; - return this; - } - - public TickerBuilder withBid(BigMoney bid) { - - this.bid = bid; - return this; - } - - public TickerBuilder withAsk(BigMoney ask) { - - this.ask = ask; - return this; - } - - public TickerBuilder withHigh(BigMoney high) { - - this.high = high; - return this; - } - - public TickerBuilder withLow(BigMoney low) { - - this.low = low; - return this; - } - - public TickerBuilder withVolume(BigDecimal volume) { - - this.volume = volume; - return this; - } - - public TickerBuilder withTimestamp(Date timestamp) { - - this.timestamp = timestamp; - return this; - } - - } -} \ No newline at end of file diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trade.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trade.java deleted file mode 100644 index 2018f2988..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trade.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.marketdata; - -import java.math.BigDecimal; -import java.util.Date; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.dto.Order.OrderType; - -/** - * Data object representing a Trade - */ -public final class Trade implements Comparable { - - /** - * Did this trade result from the execution of a bid or a ask? - */ - private final OrderType type; - - /** - * Amount that was traded - */ - private final BigDecimal tradableAmount; - - /** - * An identifier that uniquely identifies the tradable - */ - private final String tradableIdentifier; - - /** - * The currency used to settle the market order transaction - */ - private final String transactionCurrency; - - /** - * The price - */ - private final BigMoney price; - - /** - * The timestamp when it was placed on the exchange - */ - private final Date timestamp; - - /** - * @param type The trade type (BID side or ASK side) - * @param tradableAmount The depth of this trade - * @param tradableIdentifier The exchange identifier (e.g. "BTC/USD") - * @param transactionCurrency The currency - * @param price The price (either the bid or the ask) - * @param timestamp The timestamp when the order was placed. Exchange matching is usually price first then timestamp asc to clear older orders - */ - public Trade(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, BigMoney price, Date timestamp) { - - this.type = type; - this.tradableAmount = tradableAmount; - this.tradableIdentifier = tradableIdentifier; - this.transactionCurrency = transactionCurrency; - this.price = price; - this.timestamp = timestamp; - } - - public OrderType getType() { - - return type; - } - - public BigDecimal getTradableAmount() { - - return tradableAmount; - } - - public String getTradableIdentifier() { - - return tradableIdentifier; - } - - public String getTransactionCurrency() { - - return transactionCurrency; - } - - public BigMoney getPrice() { - - return price; - } - - public Date getTimestamp() { - - return timestamp; - } - - @Override - public String toString() { - - return "Trade [type=" + type + ", tradableAmount=" + tradableAmount + ", tradableIdentifier=" + tradableIdentifier + ", transactionCurrency=" + transactionCurrency + ", price=" + price - + ", timestamp=" + timestamp + "]"; - } - - @Override - public int compareTo(Trade trade) { - - if (this.getTimestamp().before(trade.getTimestamp())) { - return -1; - } else if (this.getTimestamp().after(trade.getTimestamp())) { - return 1; - } else { - return 0; - } - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trades.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trades.java deleted file mode 100644 index 89ad49a79..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/Trades.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.marketdata; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - *

- * DTO representing a collection of trades - *

- */ -public final class Trades { - - private final List trades; - - /** - * Constructor - * - * @param trades The list of trades - */ - public Trades(List trades) { - - this.trades = new ArrayList(trades); - } - - /** - * @return A list of trades ordered by timestamp - */ - public List getTrades() { - - Collections.sort(trades); - return trades; - } - - @Override - public String toString() { - - StringBuilder sb = new StringBuilder("Trades\n"); - for (Trade trade : getTrades()) { - sb.append("[trade="); - sb.append(trade.toString()); - sb.append("]\n"); - } - return sb.toString(); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/LimitOrder.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/LimitOrder.java deleted file mode 100644 index b6fde9f43..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/LimitOrder.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.trade; - -import java.math.BigDecimal; -import java.util.Date; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.dto.Order; - -/** - *

- * DTO representing a limit order - *

- *

- * A limit order lets you set a minimum or maximum price before your trade will be treated by the exchange as a {@link MarketOrder}. There is no guarantee that your conditions will be met on the - * exchange, so your order may not be executed. However, until you become very experienced, almost all orders should be limit orders to protect yourself. - *

- */ -public final class LimitOrder extends Order implements Comparable { - - /** - * The limit price - */ - private final BigMoney limitPrice; - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - * @param id An id (usually provided by the exchange) - * @param limitPrice In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price - * @param timestamp a Date object representing the order's timestamp - */ - public LimitOrder(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, String id, Date timestamp, BigMoney limitPrice) { - - super(type, tradableAmount, tradableIdentifier, transactionCurrency, id, timestamp); - this.limitPrice = limitPrice; - } - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - * @param id An id (usually provided by the exchange) - * @param limitPrice In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price - */ - public LimitOrder(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, String id, BigMoney limitPrice) { - - super(type, tradableAmount, tradableIdentifier, transactionCurrency, id, null); - this.limitPrice = limitPrice; - } - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - * @param limitPrice In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price - * @param timestamp a Date object representing the order's timestamp - */ - public LimitOrder(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, BigMoney limitPrice, Date timestamp) { - - super(type, tradableAmount, tradableIdentifier, transactionCurrency, "", timestamp); - this.limitPrice = limitPrice; - } - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - * @param limitPrice In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price - */ - public LimitOrder(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, BigMoney limitPrice) { - - super(type, tradableAmount, tradableIdentifier, transactionCurrency, "", null); - this.limitPrice = limitPrice; - } - - /** - * @return The limit price - */ - public BigMoney getLimitPrice() { - - return limitPrice; - } - - @Override - public String toString() { - - return "LimitOrder [limitPrice=" + limitPrice + ", " + super.toString() + "]"; - } - - @Override - public int compareTo(LimitOrder limitOrder) { - - return this.getLimitPrice().getAmount().compareTo(limitOrder.getLimitPrice().getAmount()) * (getType() == OrderType.BID ? -1 : 1); - - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/MarketOrder.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/MarketOrder.java deleted file mode 100644 index eb55e3a19..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/MarketOrder.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.trade; - -import java.math.BigDecimal; -import java.util.Date; - -import com.xeiam.xchange.dto.Order; - -/** - *

- * DTO representing a market order - *

- *

- * A market order is a buy or sell order to be executed immediately at current market prices. As long as there are willing sellers and buyers, market orders are filled. Market orders are therefore - * used when certainty of execution is a priority over price of execution. - *

- * Use market orders with caution, and review {@link LimitOrder} in case it is more suitable. - */ -public final class MarketOrder extends Order { - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - * @param id An id (usually provided by the exchange) - */ - public MarketOrder(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, String id, Date timestamp) { - - super(type, tradableAmount, tradableIdentifier, transactionCurrency, id, timestamp); - } - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - */ - public MarketOrder(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency, Date timestamp) { - - super(type, tradableAmount, tradableIdentifier, transactionCurrency, "", timestamp); - } - - /** - * @param type Either BID (buying) or ASK (selling) - * @param tradableAmount The amount to trade - * @param tradableIdentifier The identifier (e.g. BTC in BTC/USD) - * @param transactionCurrency The transaction currency (e.g. USD in BTC/USD) - */ - public MarketOrder(OrderType type, BigDecimal tradableAmount, String tradableIdentifier, String transactionCurrency) { - - super(type, tradableAmount, tradableIdentifier, transactionCurrency, "", null); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/OpenOrders.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/OpenOrders.java deleted file mode 100644 index d50125933..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/OpenOrders.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.trade; - -import java.util.List; - -/** - *

- * DTO representing open orders - *

- *

- * Open orders are orders that you have placed with the exchange that have not yet been matched to a counter-party. - *

- */ -public final class OpenOrders { - - private final List openOrders; - - /** - * Constructor TODO Consider Collection rather than List - * - * @param openOrders The list of open orders - */ - public OpenOrders(List openOrders) { - - this.openOrders = openOrders; - } - - public List getOpenOrders() { - - return openOrders; - } - - @Override - public String toString() { - - StringBuilder sb = new StringBuilder("Open orders\n"); - for (LimitOrder order : getOpenOrders()) { - sb.append("[order="); - sb.append(order.toString()); - sb.append("]\n"); - } - return sb.toString(); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/Wallet.java b/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/Wallet.java deleted file mode 100644 index c0b279b04..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/dto/trade/Wallet.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.dto.trade; - -import java.math.BigDecimal; - -import org.joda.money.BigMoney; -import org.joda.money.CurrencyUnit; - -/** - *

- * DTO representing a Wallet - *

- *

- * This is simply defined by an amount of money in a given currency, contained in the cash object. - *

- *

- * This class is immutable. - *

- */ -public final class Wallet { - - // TODO BigMoney contains a currency representation is this required? - private final String currency; - - private final BigMoney balance; - - /** - * Constructor - * - * @param currency The underlying currency - * @param balance The balance - */ - public Wallet(String currency, BigMoney balance) { - - this.currency = currency; - this.balance = balance; - } - - public static Wallet createInstance(String currency, BigDecimal amount) { - - return new Wallet(currency, BigMoney.of(CurrencyUnit.of(currency), amount)); - // return new Wallet(currency, MoneyUtils.parseMoney(currency, amount)); - } - - public String getCurrency() { - - return currency; - } - - public BigMoney getBalance() { - - return balance; - } - - @Override - public String toString() { - - return "Wallet [currency=" + currency + ", balance=" + balance + "]"; - } - - @Override - public int hashCode() { - - final int prime = 31; - int result = 1; - result = prime * result + ((balance == null) ? 0 : balance.hashCode()); - result = prime * result + ((currency == null) ? 0 : currency.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Wallet other = (Wallet) obj; - if (balance == null) { - if (other.balance != null) { - return false; - } - } else if (!balance.equals(other.balance)) { - return false; - } - if (currency == null) { - if (other.currency != null) { - return false; - } - } else if (!currency.equals(other.currency)) { - return false; - } - return true; - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/account/polling/PollingAccountService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/account/polling/PollingAccountService.java deleted file mode 100644 index 6183423aa..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/account/polling/PollingAccountService.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright 2012 Xeiam LLC. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.xeiam.xchange.service.account.polling; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.dto.account.AccountInfo; - -/** - *

- * Interface to provide the following to {@link Exchange}: - *

- *
    - *
  • Standard methods available to explore send/receive account-related data
  • - *
- *

- * The implementation of this service is expected to be based on a client polling mechanism of some kind - *

- */ -public interface PollingAccountService { - - /** - * Get account info - * - * @return the account info - */ - public AccountInfo getAccountInfo(); - - /** - * Withdraw funds - * - * @param amount - * @param address - * @return - */ - public String withdrawFunds(BigDecimal amount, String address); - - /** - * Request a bitcoin address to fund this account - * - * @param arguments - * @return the bitcoin address - */ - public String requestBitcoinDepositAddress(final String... arguments); - - // TODO: Transaction history, trade history -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/marketdata/polling/PollingMarketDataService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/marketdata/polling/PollingMarketDataService.java deleted file mode 100644 index a35f0b7e3..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/marketdata/polling/PollingMarketDataService.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.marketdata.polling; - -import java.util.List; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; - -/** - *

- * Interface to provide the following to {@link Exchange}: - *

- *
    - *
  • Standard methods available to explore the market data
  • - *
- *

- * The implementation of this service is expected to be based on a client polling mechanism of some kind - *

- */ -public interface PollingMarketDataService { - - /** - *

- * Ask the exchange what symbol pairs it supports - *

- * - * @return The symbol pairs supported by this exchange (e.g. EUR/USD) @ - */ - List getExchangeSymbols(); - - /** - *

- * Get a ticker representing the current exchange rate - *

- * - * @param tradableIdentifier The identifier to use (e.g. BTC or GOOG) - * @param currency The currency of interest, null if irrelevant - * @return The Ticker @ If the exchange does not support this request - */ - Ticker getTicker(String tradableIdentifier, String currency); - - /** - *

- * Get an order book representing the current offered exchange rates - *

- * - * @param tradableIdentifier The identifier to use (e.g. BTC or GOOG) - * @param currency The currency of interest, null if irrelevant - * @return The OrderBook @ If the exchange does not support this request - */ - OrderBook getPartialOrderBook(String tradableIdentifier, String currency); - - /** - *

- * Get a full order book representing the current offered exchange rates - *

- * - * @param tradableIdentifier The identifier to use (e.g. BTC or GOOG) - * @param currency The currency of interest, null if irrelevant - * @return The OrderBook @ If the exchange does not support this request - */ - OrderBook getFullOrderBook(String tradableIdentifier, String currency); - - /** - *

- * Get the trades recently performed by the exchange - *

- * - * @param tradableIdentifier The identifier to use (e.g. BTC or GOOG) - * @param currency The currency of interest, null if irrelevant - * @return The Trades @ If the exchange does not support this request - */ - Trades getTrades(String tradableIdentifier, String currency, Object... args); - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseExchangeService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseExchangeService.java deleted file mode 100644 index ae349cc39..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseExchangeService.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Abstract base class to provide the following to exchange services: - *

- *
    - *
  • Provision of standard specification parsing
  • - *
- */ -public abstract class BaseExchangeService { - - /** - * The exchange specification containing session-specific information - */ - protected final ExchangeSpecification exchangeSpecification; - - /** - * Constructor Initialize common properties from the exchange specification - * - * @param exchangeSpecification The exchange specification with the configuration parameters - */ - protected BaseExchangeService(ExchangeSpecification exchangeSpecification) { - - Assert.notNull(exchangeSpecification, "exchangeSpecification cannot be null"); - - this.exchangeSpecification = exchangeSpecification; - - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BasePollingExchangeService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BasePollingExchangeService.java deleted file mode 100644 index b0ba4a0f1..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BasePollingExchangeService.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -import com.xeiam.xchange.ExchangeSpecification; - -/** - *

- * Abstract base class to provide the following to exchange services: - *

- *
    - *
  • Provision of standard specification parsing
  • - *
- */ -public abstract class BasePollingExchangeService extends BaseExchangeService { - - /** - * Initialize common properties from the exchange specification - * - * @param exchangeSpecification The exchange specification with the configuration parameters - */ - protected BasePollingExchangeService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseWebSocketExchangeService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseWebSocketExchangeService.java deleted file mode 100644 index a63674f79..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/BaseWebSocketExchangeService.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Map; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.xeiam.xchange.ExchangeException; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Streaming market data service to provide the following to streaming market data API: - *

- *
    - *
  • Connection to an upstream market data source with a configured provider
  • - *
- */ -public abstract class BaseWebSocketExchangeService extends BaseExchangeService implements StreamingExchangeService { - - private final Logger log = LoggerFactory.getLogger(BaseWebSocketExchangeService.class); - - /** - * The event queue for the consumer - */ - protected final BlockingQueue consumerEventQueue = new LinkedBlockingQueue(1024); - - protected ReconnectService reconnectService; - - /** - * The exchange event producer - */ - private WebSocketEventProducer exchangeEventProducer; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification providing the required connection data - */ - public BaseWebSocketExchangeService(ExchangeSpecification exchangeSpecification, ExchangeStreamingConfiguration exchangeStreamingConfiguration) { - - super(exchangeSpecification); - reconnectService = new ReconnectService(this, exchangeStreamingConfiguration); - } - - protected synchronized void internalConnect(URI uri, ExchangeEventListener exchangeEventListener, - Map headers) { - - log.info("internalConnect"); - - // Validate inputs - Assert.notNull(exchangeEventListener, "runnableExchangeEventListener cannot be null"); - - try { - log.debug("Attempting to open a websocket against {}", uri); - this.exchangeEventProducer = new WebSocketEventProducer(uri.toString(), exchangeEventListener, headers); - exchangeEventProducer.connect(); - } catch (URISyntaxException e) { - throw new ExchangeException("Failed to open websocket!", e); - } - - } - - @Override - public synchronized void disconnect() { - - if (exchangeEventProducer != null) { - exchangeEventProducer.close(); - } - log.debug("disconnect() called"); - } - - @Override - public ExchangeEvent getNextEvent() throws InterruptedException { - - ExchangeEvent event = consumerEventQueue.take(); - - if (reconnectService != null) { // logic here to intercept errors and reconnect.. - reconnectService.intercept(event); - } - - return event; - - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/DefaultExchangeEvent.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/DefaultExchangeEvent.java deleted file mode 100644 index 5b3dd60e7..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/DefaultExchangeEvent.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -/** - *

- * Exchange event that provides convenience constructors for JSON wrapping - *

- */ -public class DefaultExchangeEvent implements ExchangeEvent { - - // Mandatory fields - protected final ExchangeEventType exchangeEventType; - protected final String data; - - // Optional fields - protected Object payload = null; - - /** - * @param exchangeEventType The exchange event type - * @param data The raw message content (original reference is kept) - */ - public DefaultExchangeEvent(ExchangeEventType exchangeEventType, String data) { - - this.exchangeEventType = exchangeEventType; - this.data = data; - } - - /** - * @param exchangeEventType The exchange event type - * @param data The raw message content (original reference is kept) - * @param payload The processed message content (e.g. a Ticker) - */ - public DefaultExchangeEvent(ExchangeEventType exchangeEventType, String data, Object payload) { - - this(exchangeEventType, data); - this.payload = payload; - } - - @Override - public Object getPayload() { - - return payload; - } - - @Override - public String getData() { - - return data; - - } - - @Override - public ExchangeEventType getEventType() { - - return exchangeEventType; - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEvent.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEvent.java deleted file mode 100644 index aa65bef74..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEvent.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -/** - *

- * Event interface to provide the following to API: - *

- *
    - *
  • Provision of exchange information to listeners through different implementations
  • - *
- */ -public interface ExchangeEvent { - - /** - * @return The processed data provided by the upstream server (can be null) - */ - Object getPayload(); - - /** - * @return The raw data provided by the upstream server - */ - String getData(); - - /** - * @return The ExchangeEventType - */ - ExchangeEventType getEventType(); - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventListener.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventListener.java deleted file mode 100644 index e4cacb951..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventListener.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.xeiam.xchange.ExchangeException; - -/** - *

- * Abstract base class to provide the following to XChange clients: - *

- *
    - *
  • Simple extension point for a {@link Runnable} designed for use with an ExecutorService
  • - *
- */ -public abstract class ExchangeEventListener { - - private final Logger log = LoggerFactory.getLogger(ExchangeEventListener.class); - - /** - * Constructor - */ - public ExchangeEventListener() { - - } - - /** - *

- * Client code is expected to implement this in a manner specific to their own application - *

- * - * @param event The exchange event containing the information - */ - public abstract void handleEvent(ExchangeEvent event) throws ExchangeException; -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventProducer.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventProducer.java deleted file mode 100644 index 1872e62c8..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventProducer.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -/** - *

- * Signature interface to provide the following to exchange data event producers: - *

- *
    - *
  • Allows for arbitrary exchange event production outside of a threaded approach
  • - *
- */ -public interface ExchangeEventProducer { -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventType.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventType.java deleted file mode 100644 index fcd15bac6..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeEventType.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -/** - *

- * Enum to provide the following to {@link RunnableExchangeEventProducer}: - *

- *
    - *
  • Classification of event type to allow clients to take appropriate action
  • - *
- */ -public enum ExchangeEventType { - - // Connection messages - - /** - * Issued when the upstream server has connected - */ - CONNECT, - - /** - * The upstream server has disconnected - */ - DISCONNECT, - - /** - * Represents an error condition - */ - ERROR, - - // Generic message types - /** - * A message encoding some plain text - */ - MESSAGE, - - /** - * Represents an event (server specific info) - */ - EVENT, - - // Specific message types to assist consumer processing - - /** - * A message with a Ticker payload - */ - TICKER, - - /** - * A message with a Trade payload - */ - TRADE, - - /** - * A message with a Market Depth update payload - */ - DEPTH - - ; - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeStreamingConfiguration.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeStreamingConfiguration.java deleted file mode 100644 index 69f37d6b4..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ExchangeStreamingConfiguration.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -/** - *

- * Signature interface to provide the following to exchange services: - *

- *
    - *
  • A common entry point for the application of configuration data
  • - *
- *

- * Often it is necessary for additional configuration to be applied to the exchange data feeds after the initial creation with ExchangeSpecification has completed. This is the mechanism to achieve - * this. - *

- */ -public interface ExchangeStreamingConfiguration { - - public int getMaxReconnectAttempts(); - - public int getRecconectWaitTimeInMs(); - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/JsonWrappedExchangeEvent.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/JsonWrappedExchangeEvent.java deleted file mode 100644 index 4c10f74cf..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/JsonWrappedExchangeEvent.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -/** - *

- * Exchange event that provides convenience constructors for JSON wrapping - *

- */ -public class JsonWrappedExchangeEvent extends DefaultExchangeEvent { - - /** - * @param exchangeEventType The exchange event type - * @param message The message content without JSON wrapping (will get a {"message":"parameter value"} wrapping) - */ - public JsonWrappedExchangeEvent(ExchangeEventType exchangeEventType, String message) { - - super(exchangeEventType, ("{\"message\":\"" + message + "\"}")); - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ReconnectService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ReconnectService.java deleted file mode 100644 index 625da74f6..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/ReconnectService.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * @author alexnugent - */ -public class ReconnectService { - - private final Logger log = LoggerFactory.getLogger(ReconnectService.class); - - private final ExchangeStreamingConfiguration exchangeStreamingConfiguration; - - private final StreamingExchangeService streamingExchangeService; - - private int numConnectionAttempts = 0; - - /** - * Constructor - * - * @param streamingExchangeService - */ - public ReconnectService(StreamingExchangeService streamingExchangeService, ExchangeStreamingConfiguration exchangeStreamingConfiguration) { - - this.streamingExchangeService = streamingExchangeService; - this.exchangeStreamingConfiguration = exchangeStreamingConfiguration; - } - - public void intercept(ExchangeEvent exchangeEvent) { - - if (exchangeEvent.getEventType() == ExchangeEventType.ERROR || exchangeEvent.getEventType() == ExchangeEventType.DISCONNECT) { - try { - Thread.sleep(exchangeStreamingConfiguration.getRecconectWaitTimeInMs()); - } catch (InterruptedException e) { - e.printStackTrace(); - } - reconnect(); - } else if (exchangeEvent.getEventType() == ExchangeEventType.CONNECT) { - numConnectionAttempts = 0; - } - - } - - private void reconnect() { - - log.debug("ExchangeType Error. Attempting reconnect " + numConnectionAttempts + " of " + exchangeStreamingConfiguration.getMaxReconnectAttempts()); - - if (numConnectionAttempts >= exchangeStreamingConfiguration.getMaxReconnectAttempts()) { - log.debug("Terminating reconnection attempts."); - streamingExchangeService.disconnect(); - Thread.currentThread().interrupt(); - return; - } - streamingExchangeService.disconnect(); - streamingExchangeService.connect(); - numConnectionAttempts++; - - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/StreamingExchangeService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/StreamingExchangeService.java deleted file mode 100644 index a5de007c7..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/StreamingExchangeService.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -/** - *

- * Interface to provide the following to {@link com.xeiam.xchange.Exchange}: - *

- *
    - *
  • Standard methods available to explore the market data using asynchronous streaming data feeds
  • - *
- */ -public interface StreamingExchangeService { - - /** - *

- * Opens the connection to the upstream server for this instance. - *

- */ - void connect(); - - /** - *

- * Closes the connection to the upstream server for this instance. - *

- */ - void disconnect(); - - /** - *

- * The consumer exchange event queue containing events as described in {@link ExchangeEventType}. Examples include: - *

- *
    - *
  • Connect/disconnect events
  • - *
  • Ticker events (with Ticker embedded)
  • - *
  • LimitOrder events (with LimitOrder embedded)
  • - *
- * - * @return A blocking queue - */ - ExchangeEvent getNextEvent() throws InterruptedException; - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/WebSocketEventProducer.java b/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/WebSocketEventProducer.java deleted file mode 100644 index 5f0d96a2a..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/streaming/WebSocketEventProducer.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.streaming; - -import org.java_websocket.client.WebSocketClient; -import org.java_websocket.drafts.Draft_17; -import org.java_websocket.handshake.ServerHandshake; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Map; - -/** - * @author timmolter - */ -public class WebSocketEventProducer extends WebSocketClient { - - private final Logger logger = LoggerFactory.getLogger(WebSocketEventProducer.class); - - private final ExchangeEventListener exchangeEventListener; - - /** - * Constructor - * - * @param url - * @param exchangeEventProducer - * @throws URISyntaxException - */ - public WebSocketEventProducer(String url, ExchangeEventListener exchangeEventListener, Map headers) - throws URISyntaxException { - - super(new URI(url), new Draft_17(), headers, 0); - this.exchangeEventListener = exchangeEventListener; - - } - - @Override - public void onOpen(ServerHandshake handshakedata) { - - // System.out.println("opened connection"); - // if you pan to refuse connection based on ip or httpfields overload: onWebsocketHandshakeReceivedAsClient - - logger.debug("onOpen"); - ExchangeEvent exchangeEvent = new JsonWrappedExchangeEvent(ExchangeEventType.CONNECT, "connected"); - exchangeEventListener.handleEvent(exchangeEvent); - } - - @Override - public void onMessage(String message) { - - // send( "you said: " + message ); - - // logger.debug(onMessage); - ExchangeEvent exchangeEvent = new DefaultExchangeEvent(ExchangeEventType.MESSAGE, message); - exchangeEventListener.handleEvent(exchangeEvent); - } - - @Override - public void onClose(int code, String reason, boolean remote) { - - // The codecodes are documented in class org.java_websocket.framing.CloseFrame - // System.out.println("Connection closed by " + (remote ? "remote peer" : "us")); - // System.out.println("reason= " + reason); - - logger.debug("onClose"); - ExchangeEvent exchangeEvent = new JsonWrappedExchangeEvent(ExchangeEventType.DISCONNECT, "disconnected"); - exchangeEventListener.handleEvent(exchangeEvent); - } - - @Override - public void onError(Exception ex) { - - // ex.printStackTrace(); - // if the error is fatal then onClose will be called additionally - - logger.error("onError: {}", ex.getMessage()); - ExchangeEvent exchangeEvent = new JsonWrappedExchangeEvent(ExchangeEventType.ERROR, ex.getMessage()); - exchangeEventListener.handleEvent(exchangeEvent); - } - -} \ No newline at end of file diff --git a/xchange-core/src/main/java/com/xeiam/xchange/service/trade/polling/PollingTradeService.java b/xchange-core/src/main/java/com/xeiam/xchange/service/trade/polling/PollingTradeService.java deleted file mode 100644 index fb0ff6230..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/service/trade/polling/PollingTradeService.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.service.trade.polling; - -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; - -/** - *

- * Interface to provide the following to {@link com.xeiam.xchange.Exchange}: - *

- *
    - *
  • Retrieve the user's account info on the exchange
  • - *
  • Retrieve the user's open orders on the exchange
  • - *
  • Place market orders on the exchange
  • - *
  • Place limit orders on the exchange
  • - *
- *

- * The implementation of this service is expected to be based on a client polling mechanism of some kind - *

- */ -public interface PollingTradeService { - - /** - * Gets the open orders - * - * @return the open orders - */ - public OpenOrders getOpenOrders(); - - /** - * Place a limit order - * - * @param marketOrder - * @return the order ID - */ - public String placeMarketOrder(MarketOrder marketOrder); - - /** - * Place a limit order - * - * @param limitOrder - * @return the order ID - */ - public String placeLimitOrder(LimitOrder limitOrder); - - /** - * cancels order with matching orderId - * - * @param orderId - * @return true if order was successfully cancelled, false otherwise. - */ - public boolean cancelOrder(String orderId); - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/Assert.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/Assert.java deleted file mode 100644 index a90c7181d..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/Assert.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -import java.util.Collection; - -/** - *

- * Abstract class to provide the following to framework: - *

- *
    - *
  • Provision of useful assertions to trap programmer errors early
  • - *
- */ -public abstract class Assert { - - /** - *

- * Asserts that a condition is true - *

- * - * @param boolean The condition under test - * @param message The message for any exception - */ - public static void isTrue(boolean condition, String message) { - - if (!condition) { - throw new IllegalArgumentException(message); - } - } - - /** - *

- * Asserts that an object is not null - *

- * - * @param object The object under test - * @param message The message for any exception - */ - public static void notNull(Object object, String message) { - - if (object == null) { - throw new IllegalArgumentException(message); - } - } - - /** - * Asserts that a String is not null and of a certain length - * - * @param input The input under test - * @param message The message for any exception - */ - public static void hasLength(String input, int length, String message) { - - notNull(input, message); - if (input.trim().length() != length) { - throw new IllegalArgumentException(message); - } - } - - /** - * Asserts that a Collection is not null and of a certain size - * - * @param input The input under test - * @param message The message for any exception - */ - public static void hasSize(Collection input, int length, String message) { - - notNull(input, message); - if (input.size() != length) { - throw new IllegalArgumentException(message); - } - } - -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/Base64.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/Base64.java deleted file mode 100644 index 634c68232..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/Base64.java +++ /dev/null @@ -1,1841 +0,0 @@ -package com.xeiam.xchange.utils; - -/** - *

- * Encodes and decodes to and from Base64 notation. - *

- *

- * Homepage: http://iharder.net/base64. - *

- *

- * Example: - *

- * String encoded = Base64.encode( myByteArray );
- * byte[] myByteArray = Base64.decode( encoded ); - *

- * The options parameter, which appears in a few places, is used to pass several pieces of information to the encoder. In the "higher level" methods such as encodeBytes( bytes, options ) the - * options parameter can be used to indicate such things as first gzipping the bytes before encoding them, not inserting linefeeds, and encoding using the URL-safe and Ordered dialects. - *

- *

- * Note, according to RFC3548, Section 2.1, implementations should not add line feeds unless explicitly told to do so. I've got Base64 set to this - * behavior now, although earlier versions broke lines by default. - *

- *

- * The constants defined in Base64 can be OR-ed together to combine options, so you might make a call like this: - *

- * String encoded = Base64.encodeBytes( mybytes, Base64.GZIP | Base64.DO_BREAK_LINES ); - *

- * to compress the data before encoding it and then making the output have newline characters. - *

- *

- * Also... - *

- * String encoded = Base64.encodeBytes( crazyString.getBytes() ); - *

- * Change Log: - *

- *
    - *
  • v2.3.7 - Fixed subtle bug when base 64 input stream contained the value 01111111, which is an invalid base 64 character but should not throw an ArrayIndexOutOfBoundsException either. Led to - * discovery of mishandling (or potential for better handling) of other bad input characters. You should now get an IOException if you try decoding something that has bad characters in it.
  • - *
  • v2.3.6 - Fixed bug when breaking lines and the final byte of the encoded string ended in the last column; the buffer was not properly shrunk and contained an extra (null) byte that made it into - * the string.
  • - *
  • v2.3.5 - Fixed bug in {@link #encodeFromFile} where estimated buffer size was wrong for files of size 31, 34, and 37 bytes.
  • - *
  • v2.3.4 - Fixed bug when working with gzipped streams whereby flushing the Base64.OutputStream closed the Base64 encoding (by padding with equals signs) too soon. Also added an option to - * suppress the automatic decoding of gzipped streams. Also added experimental support for specifying a class loader when using the {@link #decodeToObject(String, int, ClassLoader)} method.
  • - *
  • v2.3.3 - Changed default char encoding to US-ASCII which reduces the internal Java footprint with its CharEncoders and so forth. Fixed some javadocs that were inconsistent. Removed imports and - * specified things like java.io.IOException explicitly inline.
  • - *
  • v2.3.2 - Reduced memory footprint! Finally refined the "guessing" of how big the final encoded data will be so that the code doesn't have to create two output arrays: an oversized initial one - * and then a final, exact-sized one. Big win when using the {@link #encodeBytesToBytes(byte[])} family of methods (and not using the gzip options which uses a different mechanism with streams and - * stuff).
  • - *
  • v2.3.1 - Added {@link #encodeBytesToBytes(byte[], int, int, int)} and some similar helper methods to be more efficient with memory by not returning a String but just a byte array.
  • - *
  • v2.3 - This is not a drop-in replacement! This is two years of comments and bug fixes queued up and finally executed. Thanks to everyone who sent me stuff, and I'm sorry I - * wasn't able to distribute your fixes to everyone else. Much bad coding was cleaned up including throwing exceptions where necessary instead of returning null values or something similar. Here are - * some changes that may affect you: - *
      - *
    • Does not break lines, by default. This is to keep in compliance with RFC3548.
    • - *
    • Throws exceptions instead of returning null values. Because some operations (especially those that may permit the GZIP option) use IO streams, there is a possiblity of an - * java.io.IOException being thrown. After some discussion and thought, I've changed the behavior of the methods to throw java.io.IOExceptions rather than return null if ever there's an error. I think - * this is more appropriate, though it will require some changes to your code. Sorry, it should have been done this way to begin with.
    • - *
    • Removed all references to System.out, System.err, and the like. Shame on me. All I can say is sorry they were ever there.
    • - *
    • Throws NullPointerExceptions and IllegalArgumentExceptions as needed such as when passed arrays are null or offsets are invalid.
    • - *
    • Cleaned up as much javadoc as I could to avoid any javadoc warnings. This was especially annoying before for people who were thorough in their own projects and then had gobs of javadoc warnings - * on this file.
    • - *
    - *
  • v2.2.1 - Fixed bug using URL_SAFE and ORDERED encodings. Fixed bug when using very small files (~< 40 bytes).
  • - *
  • v2.2 - Added some helper methods for encoding/decoding directly from one file to the next. Also added a main() method to support command line encoding/decoding from one file to the next. Also - * added these Base64 dialects: - *
      - *
    1. The default is RFC3548 format.
    2. - *
    3. Calling Base64.setFormat(Base64.BASE64_FORMAT.URLSAFE_FORMAT) generates URL and file name friendly format as described in Section 4 of RFC3548. http://www.faqs.org/rfcs/rfc3548.html
    4. - *
    5. Calling Base64.setFormat(Base64.BASE64_FORMAT.ORDERED_FORMAT) generates URL and file name friendly format that preserves lexical ordering as described in http://www.faqs.org/qa/rfcc-1940.html
    6. - *
    - * Special thanks to Jim Kellerman at http://www.powerset.com/ for contributing the new Base64 dialects.
  • - *
  • v2.1 - Cleaned up javadoc comments and unused variables and methods. Added some convenience methods for reading and writing to and from files.
  • - *
  • v2.0.2 - Now specifies UTF-8 encoding in places where the code fails on systems with other encodings (like EBCDIC).
  • - *
  • v2.0.1 - Fixed an error when decoding a single byte, that is, when the encoded data was a single byte.
  • - *
  • v2.0 - I got rid of methods that used booleans to set options. Now everything is more consolidated and cleaner. The code now detects when data that's being decoded is gzip-compressed and will - * decompress it automatically. Generally things are cleaner. You'll probably have to change some method calls that you were making to support the new options format (ints that you "OR" - * together).
  • - *
  • v1.5.1 - Fixed bug when decompressing and decoding to a byte[] using decode( String s, boolean gzipCompressed ). Added the ability to "suspend" encoding in the Output Stream so you can - * turn on and off the encoding if you need to embed base64 data in an otherwise "normal" stream (like an XML file).
  • - *
  • v1.5 - Output stream pases on flush() command but doesn't do anything itself. This helps when using GZIP streams. Added the ability to GZip-compress objects before encoding them.
  • - *
  • v1.4 - Added helper methods to read/write files.
  • - *
  • v1.3.6 - Fixed OutputStream.flush() so that 'position' is reset.
  • - *
  • v1.3.5 - Added flag to turn on and off line breaks. Fixed bug in input stream where last buffer being read, if not completely full, was not returned.
  • - *
  • v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.
  • - *
  • v1.3.3 - Fixed I/O streams which were totally messed up.
  • - *
- *

- * I am placing this code in the Public Domain. Do with it as you will. This software comes with no guarantees or warranties but with plenty of well-wishing instead! Please visit http://iharder.net/base64 periodically to check for updates or to contribute improvements. - *

- * - * @author Robert Harder - * @author rob@iharder.net - * @version 2.3.7 - */ -public class Base64 { - - /* ******** P U B L I C F I E L D S ******** */ - - /** - * No options specified. Value is zero. - */ - public final static int NO_OPTIONS = 0; - - /** - * Specify encoding in first bit. Value is one. - */ - public final static int ENCODE = 1; - - /** - * Specify decoding in first bit. Value is zero. - */ - public final static int DECODE = 0; - - /** - * Specify that data should be gzip-compressed in second bit. Value is two. - */ - public final static int GZIP = 2; - - /** - * Specify that gzipped data should not be automatically gunzipped. - */ - public final static int DONT_GUNZIP = 4; - - /** - * Do break lines when encoding. Value is 8. - */ - public final static int DO_BREAK_LINES = 8; - - /** - * Encode using Base64-like encoding that is URL- and Filename-safe as described in Section 4 of RFC3548: http://www.faqs.org/rfcs/rfc3548.html. - * It is important to note that data encoded this way is not officially valid Base64, or at the very least should not be called Base64 without also specifying that is was encoded using the - * URL- and Filename-safe dialect. - */ - public final static int URL_SAFE = 16; - - /** - * Encode using the special "ordered" dialect of Base64 described here: http://www.faqs.org/qa/rfcc-1940.html. - */ - public final static int ORDERED = 32; - - /* ******** P R I V A T E F I E L D S ******** */ - - /** - * Maximum line length (76) of Base64 output. - */ - private final static int MAX_LINE_LENGTH = 76; - - /** - * The equals sign (=) as a byte. - */ - private final static byte EQUALS_SIGN = (byte) '='; - - /** - * The new line character (\n) as a byte. - */ - private final static byte NEW_LINE = (byte) '\n'; - - /** - * Preferred encoding. - */ - private final static String PREFERRED_ENCODING = "US-ASCII"; - - private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding - private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding - - /* ******** S T A N D A R D B A S E 6 4 A L P H A B E T ******** */ - - /** - * The 64 valid Base64 values. - */ - /* Host platform me be something funny like EBCDIC, so we hardcode these values. */ - private final static byte[] _STANDARD_ALPHABET = { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', - (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a', (byte) 'b', - (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', - (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', - (byte) '8', (byte) '9', (byte) '+', (byte) '/' }; - - /** - * Translates a Base64 value to either its 6-bit reconstruction value or a negative number indicating some other meaning. - */ - private final static byte[] _STANDARD_DECODABET = { -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8 - -5, -5, // Whitespace: Tab and Linefeed - -9, -9, // Decimal 11 - 12 - -5, // Whitespace: Carriage Return - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26 - -9, -9, -9, -9, -9, // Decimal 27 - 31 - -5, // Whitespace: Space - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42 - 62, // Plus sign at decimal 43 - -9, -9, -9, // Decimal 44 - 46 - 63, // Slash at decimal 47 - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine - -9, -9, -9, // Decimal 58 - 60 - -1, // Equals sign at decimal 61 - -9, -9, -9, // Decimal 62 - 64 - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N' - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z' - -9, -9, -9, -9, -9, -9, // Decimal 91 - 96 - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm' - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z' - -9, -9, -9, -9, -9 // Decimal 123 - 127 - , -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 128 - 139 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 140 - 152 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 153 - 165 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 166 - 178 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 179 - 191 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 192 - 204 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 205 - 217 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 218 - 230 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 231 - 243 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9 // Decimal 244 - 255 - }; - - /* ******** U R L S A F E B A S E 6 4 A L P H A B E T ******** */ - - /** - * Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548: http://www.faqs.org/rfcs/rfc3548.html. Notice that the last two - * bytes become "hyphen" and "underscore" instead of "plus" and "slash." - */ - private final static byte[] _URL_SAFE_ALPHABET = { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', - (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) 'a', (byte) 'b', - (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', - (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', - (byte) '8', (byte) '9', (byte) '-', (byte) '_' }; - - /** - * Used in decoding URL- and Filename-safe dialects of Base64. - */ - private final static byte[] _URL_SAFE_DECODABET = { -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8 - -5, -5, // Whitespace: Tab and Linefeed - -9, -9, // Decimal 11 - 12 - -5, // Whitespace: Carriage Return - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26 - -9, -9, -9, -9, -9, // Decimal 27 - 31 - -5, // Whitespace: Space - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42 - -9, // Plus sign at decimal 43 - -9, // Decimal 44 - 62, // Minus sign at decimal 45 - -9, // Decimal 46 - -9, // Slash at decimal 47 - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine - -9, -9, -9, // Decimal 58 - 60 - -1, // Equals sign at decimal 61 - -9, -9, -9, // Decimal 62 - 64 - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N' - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z' - -9, -9, -9, -9, // Decimal 91 - 94 - 63, // Underscore at decimal 95 - -9, // Decimal 96 - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm' - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z' - -9, -9, -9, -9, -9 // Decimal 123 - 127 - , -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 128 - 139 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 140 - 152 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 153 - 165 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 166 - 178 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 179 - 191 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 192 - 204 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 205 - 217 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 218 - 230 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 231 - 243 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9 // Decimal 244 - 255 - }; - - /* ******** O R D E R E D B A S E 6 4 A L P H A B E T ******** */ - - /** - * I don't get the point of this technique, but someone requested it, and it is described here: http://www.faqs.org/qa/rfcc-1940.html. - */ - private final static byte[] _ORDERED_ALPHABET = { (byte) '-', (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'A', - (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', - (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', (byte) 'V', (byte) 'W', (byte) 'X', (byte) 'Y', (byte) 'Z', (byte) '_', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f', - (byte) 'g', (byte) 'h', (byte) 'i', (byte) 'j', (byte) 'k', (byte) 'l', (byte) 'm', (byte) 'n', (byte) 'o', (byte) 'p', (byte) 'q', (byte) 'r', (byte) 's', (byte) 't', (byte) 'u', (byte) 'v', - (byte) 'w', (byte) 'x', (byte) 'y', (byte) 'z' }; - - /** - * Used in decoding the "ordered" dialect of Base64. - */ - private final static byte[] _ORDERED_DECODABET = { -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8 - -5, -5, // Whitespace: Tab and Linefeed - -9, -9, // Decimal 11 - 12 - -5, // Whitespace: Carriage Return - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26 - -9, -9, -9, -9, -9, // Decimal 27 - 31 - -5, // Whitespace: Space - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42 - -9, // Plus sign at decimal 43 - -9, // Decimal 44 - 0, // Minus sign at decimal 45 - -9, // Decimal 46 - -9, // Slash at decimal 47 - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, // Numbers zero through nine - -9, -9, -9, // Decimal 58 - 60 - -1, // Equals sign at decimal 61 - -9, -9, -9, // Decimal 62 - 64 - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, // Letters 'A' through 'M' - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, // Letters 'N' through 'Z' - -9, -9, -9, -9, // Decimal 91 - 94 - 37, // Underscore at decimal 95 - -9, // Decimal 96 - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, // Letters 'a' through 'm' - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, // Letters 'n' through 'z' - -9, -9, -9, -9, -9 // Decimal 123 - 127 - , -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 128 - 139 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 140 - 152 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 153 - 165 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 166 - 178 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 179 - 191 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 192 - 204 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 205 - 217 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 218 - 230 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 231 - 243 - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9 // Decimal 244 - 255 - }; - - /* ******** D E T E R M I N E W H I C H A L H A B E T ******** */ - - /** - * Returns one of the _SOMETHING_ALPHABET byte arrays depending on the options specified. It's possible, though silly, to specify ORDERED and URLSAFE in which case one of them will be picked, - * though there is no guarantee as to which one will be picked. - */ - private final static byte[] getAlphabet(int options) { - - if ((options & URL_SAFE) == URL_SAFE) { - return _URL_SAFE_ALPHABET; - } else if ((options & ORDERED) == ORDERED) { - return _ORDERED_ALPHABET; - } else { - return _STANDARD_ALPHABET; - } - } // end getAlphabet - - /** - * Returns one of the _SOMETHING_DECODABET byte arrays depending on the options specified. It's possible, though silly, to specify ORDERED and URL_SAFE in which case one of them will be picked, - * though there is no guarantee as to which one will be picked. - */ - private final static byte[] getDecodabet(int options) { - - if ((options & URL_SAFE) == URL_SAFE) { - return _URL_SAFE_DECODABET; - } else if ((options & ORDERED) == ORDERED) { - return _ORDERED_DECODABET; - } else { - return _STANDARD_DECODABET; - } - } // end getAlphabet - - /** - * Defeats instantiation. - */ - private Base64() { - - } - - /* ******** E N C O D I N G M E T H O D S ******** */ - - /** - * Encodes up to the first three bytes of array threeBytes and returns a four-byte array in Base64 notation. The actual number of significant bytes in your array is given by - * numSigBytes. The array threeBytes needs only be as big as numSigBytes. Code can reuse a byte array by passing a four-byte array as b4. - * - * @param b4 A reusable byte array to reduce array instantiation - * @param threeBytes the array to convert - * @param numSigBytes the number of significant bytes in your array - * @return four byte array in Base64 notation. - * @since 1.5.1 - */ - private static byte[] encode3to4(byte[] b4, byte[] threeBytes, int numSigBytes, int options) { - - encode3to4(threeBytes, 0, numSigBytes, b4, 0, options); - return b4; - } // end encode3to4 - - /** - *

- * Encodes up to three bytes of the array source and writes the resulting four Base64 bytes to destination. The source and destination arrays can be manipulated anywhere along - * their length by specifying srcOffset and destOffset. This method does not check to make sure your arrays are large enough to accomodate srcOffset + 3 for the - * source array or destOffset + 4 for the destination array. The actual number of significant bytes in your array is given by numSigBytes. - *

- *

- * This is the lowest level of the encoding methods with all possible parameters. - *

- * - * @param source the array to convert - * @param srcOffset the index where conversion begins - * @param numSigBytes the number of significant bytes in your array - * @param destination the array to hold the conversion - * @param destOffset the index where output will be put - * @return the destination array - * @since 1.3 - */ - private static byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset, int options) { - - byte[] ALPHABET = getAlphabet(options); - - // 1 2 3 - // 01234567890123456789012345678901 Bit position - // --------000000001111111122222222 Array position from threeBytes - // --------| || || || | Six bit groups to index ALPHABET - // >>18 >>12 >> 6 >> 0 Right shift necessary - // 0x3f 0x3f 0x3f Additional AND - - // Create buffer with zero-padding if there are only one or two - // significant bytes passed in the array. - // We have to shift left 24 in order to flush out the 1's that appear - // when Java treats a value as negative that is cast from a byte to an int. - int inBuff = (numSigBytes > 0 ? ((source[srcOffset] << 24) >>> 8) : 0) | (numSigBytes > 1 ? ((source[srcOffset + 1] << 24) >>> 16) : 0) - | (numSigBytes > 2 ? ((source[srcOffset + 2] << 24) >>> 24) : 0); - - switch (numSigBytes) { - case 3: - destination[destOffset] = ALPHABET[(inBuff >>> 18)]; - destination[destOffset + 1] = ALPHABET[(inBuff >>> 12) & 0x3f]; - destination[destOffset + 2] = ALPHABET[(inBuff >>> 6) & 0x3f]; - destination[destOffset + 3] = ALPHABET[(inBuff) & 0x3f]; - return destination; - - case 2: - destination[destOffset] = ALPHABET[(inBuff >>> 18)]; - destination[destOffset + 1] = ALPHABET[(inBuff >>> 12) & 0x3f]; - destination[destOffset + 2] = ALPHABET[(inBuff >>> 6) & 0x3f]; - destination[destOffset + 3] = EQUALS_SIGN; - return destination; - - case 1: - destination[destOffset] = ALPHABET[(inBuff >>> 18)]; - destination[destOffset + 1] = ALPHABET[(inBuff >>> 12) & 0x3f]; - destination[destOffset + 2] = EQUALS_SIGN; - destination[destOffset + 3] = EQUALS_SIGN; - return destination; - - default: - return destination; - } // end switch - } // end encode3to4 - - /** - * Performs Base64 encoding on the raw ByteBuffer, writing it to the encoded ByteBuffer. This is an experimental feature. Currently it does not pass along any options (such - * as {@link #DO_BREAK_LINES} or {@link #GZIP}. - * - * @param raw input buffer - * @param encoded output buffer - * @since 2.3 - */ - public static void encode(java.nio.ByteBuffer raw, java.nio.ByteBuffer encoded) { - - byte[] raw3 = new byte[3]; - byte[] enc4 = new byte[4]; - - while (raw.hasRemaining()) { - int rem = Math.min(3, raw.remaining()); - raw.get(raw3, 0, rem); - Base64.encode3to4(enc4, raw3, rem, Base64.NO_OPTIONS); - encoded.put(enc4); - } // end input remaining - } - - /** - * Performs Base64 encoding on the raw ByteBuffer, writing it to the encoded CharBuffer. This is an experimental feature. Currently it does not pass along any options (such - * as {@link #DO_BREAK_LINES} or {@link #GZIP}. - * - * @param raw input buffer - * @param encoded output buffer - * @since 2.3 - */ - public static void encode(java.nio.ByteBuffer raw, java.nio.CharBuffer encoded) { - - byte[] raw3 = new byte[3]; - byte[] enc4 = new byte[4]; - - while (raw.hasRemaining()) { - int rem = Math.min(3, raw.remaining()); - raw.get(raw3, 0, rem); - Base64.encode3to4(enc4, raw3, rem, Base64.NO_OPTIONS); - for (int i = 0; i < 4; i++) { - encoded.put((char) (enc4[i] & 0xFF)); - } - } // end input remaining - } - - /** - * Serializes an object and returns the Base64-encoded version of that serialized object. - *

- * As of v 2.3, if the object cannot be serialized or there is another error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned a null - * value, but in retrospect that's a pretty poor way to handle it. - *

- * The object is not GZip-compressed before being encoded. - * - * @param serializableObject The object to encode - * @return The Base64-encoded object - * @throws java.io.IOException if there is an error - * @throws NullPointerException if serializedObject is null - * @since 1.4 - */ - public static String encodeObject(java.io.Serializable serializableObject) throws java.io.IOException { - - return encodeObject(serializableObject, NO_OPTIONS); - } // end encodeObject - - /** - * Serializes an object and returns the Base64-encoded version of that serialized object. - *

- * As of v 2.3, if the object cannot be serialized or there is another error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned a null - * value, but in retrospect that's a pretty poor way to handle it. - *

- * The object is not GZip-compressed before being encoded. - *

- * Example options: - * - *

-   *   GZIP: gzip-compresses object before encoding it.
-   *   DO_BREAK_LINES: break lines at 76 characters
-   * 
- *

- * Example: encodeObject( myObj, Base64.GZIP ) or - *

- * Example: encodeObject( myObj, Base64.GZIP | Base64.DO_BREAK_LINES ) - * - * @param serializableObject The object to encode - * @param options Specified options - * @return The Base64-encoded object - * @throws java.io.IOException if there is an error - * @see Base64#GZIP - * @see Base64#DO_BREAK_LINES - * @since 2.0 - */ - public static String encodeObject(java.io.Serializable serializableObject, int options) throws java.io.IOException { - - if (serializableObject == null) { - throw new NullPointerException("Cannot serialize a null object."); - } // end if: null - - // Streams - java.io.ByteArrayOutputStream baos = null; - java.io.OutputStream b64os = null; - java.util.zip.GZIPOutputStream gzos = null; - java.io.ObjectOutputStream oos = null; - - try { - // ObjectOutputStream -> (GZIP) -> Base64 -> ByteArrayOutputStream - baos = new java.io.ByteArrayOutputStream(); - b64os = new Base64.OutputStream(baos, ENCODE | options); - if ((options & GZIP) != 0) { - // Gzip - gzos = new java.util.zip.GZIPOutputStream(b64os); - oos = new java.io.ObjectOutputStream(gzos); - } else { - // Not gzipped - oos = new java.io.ObjectOutputStream(b64os); - } - oos.writeObject(serializableObject); - } // end try - catch (java.io.IOException e) { - // Catch it and then throw it immediately so that - // the finally{} block is called for cleanup. - throw e; - } // end catch - finally { - try { - oos.close(); - } catch (Exception e) { - } - try { - gzos.close(); - } catch (Exception e) { - } - try { - b64os.close(); - } catch (Exception e) { - } - try { - baos.close(); - } catch (Exception e) { - } - } // end finally - - // Return value according to relevant encoding. - try { - return new String(baos.toByteArray(), PREFERRED_ENCODING); - } // end try - catch (java.io.UnsupportedEncodingException uue) { - // Fall back to some Java default - return new String(baos.toByteArray()); - } // end catch - - } // end encode - - /** - * Encodes a byte array into Base64 notation. Does not GZip-compress data. - * - * @param source The data to convert - * @return The data in Base64-encoded form - * @throws NullPointerException if source array is null - * @since 1.4 - */ - public static String encodeBytes(byte[] source) { - - // Since we're not going to have the GZIP encoding turned on, - // we're not going to have an java.io.IOException thrown, so - // we should not force the user to have to catch it. - String encoded = null; - try { - encoded = encodeBytes(source, 0, source.length, NO_OPTIONS); - } catch (java.io.IOException ex) { - assert false : ex.getMessage(); - } // end catch - assert encoded != null; - return encoded; - } // end encodeBytes - - /** - * Encodes a byte array into Base64 notation. - *

- * Example options: - * - *

-   *   GZIP: gzip-compresses object before encoding it.
-   *   DO_BREAK_LINES: break lines at 76 characters
-   *     Note: Technically, this makes your encoding non-compliant.
-   * 
- *

- * Example: encodeBytes( myData, Base64.GZIP ) or - *

- * Example: encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES ) - *

- * As of v 2.3, if there is an error with the GZIP stream, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned a null value, but in - * retrospect that's a pretty poor way to handle it. - *

- * - * @param source The data to convert - * @param options Specified options - * @return The Base64-encoded data as a String - * @throws java.io.IOException if there is an error - * @throws NullPointerException if source array is null - * @see Base64#GZIP - * @see Base64#DO_BREAK_LINES - * @since 2.0 - */ - public static String encodeBytes(byte[] source, int options) throws java.io.IOException { - - return encodeBytes(source, 0, source.length, options); - } // end encodeBytes - - /** - * Encodes a byte array into Base64 notation. Does not GZip-compress data. - *

- * As of v 2.3, if there is an error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned a null value, but in retrospect that's a pretty - * poor way to handle it. - *

- * - * @param source The data to convert - * @param off Offset in array where conversion should begin - * @param len Length of data to convert - * @return The Base64-encoded data as a String - * @throws NullPointerException if source array is null - * @throws IllegalArgumentException if source array, offset, or length are invalid - * @since 1.4 - */ - public static String encodeBytes(byte[] source, int off, int len) { - - // Since we're not going to have the GZIP encoding turned on, - // we're not going to have an java.io.IOException thrown, so - // we should not force the user to have to catch it. - String encoded = null; - try { - encoded = encodeBytes(source, off, len, NO_OPTIONS); - } catch (java.io.IOException ex) { - assert false : ex.getMessage(); - } // end catch - assert encoded != null; - return encoded; - } // end encodeBytes - - /** - * Encodes a byte array into Base64 notation. - *

- * Example options: - * - *

-   *   GZIP: gzip-compresses object before encoding it.
-   *   DO_BREAK_LINES: break lines at 76 characters
-   *     Note: Technically, this makes your encoding non-compliant.
-   * 
- *

- * Example: encodeBytes( myData, Base64.GZIP ) or - *

- * Example: encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES ) - *

- * As of v 2.3, if there is an error with the GZIP stream, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned a null value, but in - * retrospect that's a pretty poor way to handle it. - *

- * - * @param source The data to convert - * @param off Offset in array where conversion should begin - * @param len Length of data to convert - * @param options Specified options - * @return The Base64-encoded data as a String - * @throws java.io.IOException if there is an error - * @throws NullPointerException if source array is null - * @throws IllegalArgumentException if source array, offset, or length are invalid - * @see Base64#GZIP - * @see Base64#DO_BREAK_LINES - * @since 2.0 - */ - public static String encodeBytes(byte[] source, int off, int len, int options) throws java.io.IOException { - - byte[] encoded = encodeBytesToBytes(source, off, len, options); - - // Return value according to relevant encoding. - try { - return new String(encoded, PREFERRED_ENCODING); - } // end try - catch (java.io.UnsupportedEncodingException uue) { - return new String(encoded); - } // end catch - - } // end encodeBytes - - /** - * Similar to {@link #encodeBytes(byte[])} but returns a byte array instead of instantiating a String. This is more efficient if you're working with I/O streams and have large data sets to encode. - * - * @param source The data to convert - * @return The Base64-encoded data as a byte[] (of ASCII characters) - * @throws NullPointerException if source array is null - * @since 2.3.1 - */ - public static byte[] encodeBytesToBytes(byte[] source) { - - byte[] encoded = null; - try { - encoded = encodeBytesToBytes(source, 0, source.length, Base64.NO_OPTIONS); - } catch (java.io.IOException ex) { - assert false : "IOExceptions only come from GZipping, which is turned off: " + ex.getMessage(); - } - return encoded; - } - - /** - * Similar to {@link #encodeBytes(byte[], int, int, int)} but returns a byte array instead of instantiating a String. This is more efficient if you're working with I/O streams and have large data - * sets to encode. - * - * @param source The data to convert - * @param off Offset in array where conversion should begin - * @param len Length of data to convert - * @param options Specified options - * @return The Base64-encoded data as a String - * @throws java.io.IOException if there is an error - * @throws NullPointerException if source array is null - * @throws IllegalArgumentException if source array, offset, or length are invalid - * @see Base64#GZIP - * @see Base64#DO_BREAK_LINES - * @since 2.3.1 - */ - public static byte[] encodeBytesToBytes(byte[] source, int off, int len, int options) throws java.io.IOException { - - if (source == null) { - throw new NullPointerException("Cannot serialize a null array."); - } // end if: null - - if (off < 0) { - throw new IllegalArgumentException("Cannot have negative offset: " + off); - } // end if: off < 0 - - if (len < 0) { - throw new IllegalArgumentException("Cannot have length offset: " + len); - } // end if: len < 0 - - if (off + len > source.length) { - throw new IllegalArgumentException(String.format("Cannot have offset of %d and length of %d with array of length %d", off, len, source.length)); - } // end if: off < 0 - - // Compress? - if ((options & GZIP) != 0) { - java.io.ByteArrayOutputStream baos = null; - java.util.zip.GZIPOutputStream gzos = null; - Base64.OutputStream b64os = null; - - try { - // GZip -> Base64 -> ByteArray - baos = new java.io.ByteArrayOutputStream(); - b64os = new Base64.OutputStream(baos, ENCODE | options); - gzos = new java.util.zip.GZIPOutputStream(b64os); - - gzos.write(source, off, len); - gzos.close(); - } // end try - catch (java.io.IOException e) { - // Catch it and then throw it immediately so that - // the finally{} block is called for cleanup. - throw e; - } // end catch - finally { - try { - gzos.close(); - } catch (Exception e) { - } - try { - b64os.close(); - } catch (Exception e) { - } - try { - baos.close(); - } catch (Exception e) { - } - } // end finally - - return baos.toByteArray(); - } // end if: compress - - // Else, don't compress. Better not to use streams at all then. - else { - boolean breakLines = (options & DO_BREAK_LINES) != 0; - - // int len43 = len * 4 / 3; - // byte[] outBuff = new byte[ ( len43 ) // Main 4:3 - // + ( (len % 3) > 0 ? 4 : 0 ) // Account for padding - // + (breakLines ? ( len43 / MAX_LINE_LENGTH ) : 0) ]; // New lines - // Try to determine more precisely how big the array needs to be. - // If we get it right, we don't have to do an array copy, and - // we save a bunch of memory. - int encLen = (len / 3) * 4 + (len % 3 > 0 ? 4 : 0); // Bytes needed for actual encoding - if (breakLines) { - encLen += encLen / MAX_LINE_LENGTH; // Plus extra newline characters - } - byte[] outBuff = new byte[encLen]; - - int d = 0; - int e = 0; - int len2 = len - 2; - int lineLength = 0; - for (; d < len2; d += 3, e += 4) { - encode3to4(source, d + off, 3, outBuff, e, options); - - lineLength += 4; - if (breakLines && lineLength >= MAX_LINE_LENGTH) { - outBuff[e + 4] = NEW_LINE; - e++; - lineLength = 0; - } // end if: end of line - } // en dfor: each piece of array - - if (d < len) { - encode3to4(source, d + off, len - d, outBuff, e, options); - e += 4; - } // end if: some padding needed - - // Only resize array if we didn't guess it right. - if (e <= outBuff.length - 1) { - // If breaking lines and the last byte falls right at - // the line length (76 bytes per line), there will be - // one extra byte, and the array will need to be resized. - // Not too bad of an estimate on array size, I'd say. - byte[] finalOut = new byte[e]; - System.arraycopy(outBuff, 0, finalOut, 0, e); - // System.err.println("Having to resize array from " + outBuff.length + " to " + e ); - return finalOut; - } else { - // System.err.println("No need to resize array."); - return outBuff; - } - - } // end else: don't compress - - } // end encodeBytesToBytes - - /* ******** D E C O D I N G M E T H O D S ******** */ - - /** - * Decodes four bytes from array source and writes the resulting bytes (up to three of them) to destination. The source and destination arrays can be manipulated anywhere along - * their length by specifying srcOffset and destOffset. This method does not check to make sure your arrays are large enough to accomodate srcOffset + 4 for the - * source array or destOffset + 3 for the destination array. This method returns the actual number of bytes that were converted from the Base64 encoding. - *

- * This is the lowest level of the decoding methods with all possible parameters. - *

- * - * @param source the array to convert - * @param srcOffset the index where conversion begins - * @param destination the array to hold the conversion - * @param destOffset the index where output will be put - * @param options alphabet type is pulled from this (standard, url-safe, ordered) - * @return the number of decoded bytes converted - * @throws NullPointerException if source or destination arrays are null - * @throws IllegalArgumentException if srcOffset or destOffset are invalid or there is not enough room in the array. - * @since 1.3 - */ - private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset, int options) { - - // Lots of error checking and exception throwing - if (source == null) { - throw new NullPointerException("Source array was null."); - } // end if - if (destination == null) { - throw new NullPointerException("Destination array was null."); - } // end if - if (srcOffset < 0 || srcOffset + 3 >= source.length) { - throw new IllegalArgumentException(String.format("Source array with length %d cannot have offset of %d and still process four bytes.", source.length, srcOffset)); - } // end if - if (destOffset < 0 || destOffset + 2 >= destination.length) { - throw new IllegalArgumentException(String.format("Destination array with length %d cannot have offset of %d and still store three bytes.", destination.length, destOffset)); - } // end if - - byte[] DECODABET = getDecodabet(options); - - // Example: Dk== - if (source[srcOffset + 2] == EQUALS_SIGN) { - // Two ways to do the same thing. Don't know which way I like best. - // int outBuff = ( ( DECODABET[ source[ srcOffset ] ] << 24 ) >>> 6 ) - // | ( ( DECODABET[ source[ srcOffset + 1] ] << 24 ) >>> 12 ); - int outBuff = ((DECODABET[source[srcOffset]] & 0xFF) << 18) | ((DECODABET[source[srcOffset + 1]] & 0xFF) << 12); - - destination[destOffset] = (byte) (outBuff >>> 16); - return 1; - } - - // Example: DkL= - else if (source[srcOffset + 3] == EQUALS_SIGN) { - // Two ways to do the same thing. Don't know which way I like best. - // int outBuff = ( ( DECODABET[ source[ srcOffset ] ] << 24 ) >>> 6 ) - // | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 ) - // | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 ); - int outBuff = ((DECODABET[source[srcOffset]] & 0xFF) << 18) | ((DECODABET[source[srcOffset + 1]] & 0xFF) << 12) | ((DECODABET[source[srcOffset + 2]] & 0xFF) << 6); - - destination[destOffset] = (byte) (outBuff >>> 16); - destination[destOffset + 1] = (byte) (outBuff >>> 8); - return 2; - } - - // Example: DkLE - else { - // Two ways to do the same thing. Don't know which way I like best. - // int outBuff = ( ( DECODABET[ source[ srcOffset ] ] << 24 ) >>> 6 ) - // | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 ) - // | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 ) - // | ( ( DECODABET[ source[ srcOffset + 3 ] ] << 24 ) >>> 24 ); - int outBuff = ((DECODABET[source[srcOffset]] & 0xFF) << 18) | ((DECODABET[source[srcOffset + 1]] & 0xFF) << 12) | ((DECODABET[source[srcOffset + 2]] & 0xFF) << 6) - | ((DECODABET[source[srcOffset + 3]] & 0xFF)); - - destination[destOffset] = (byte) (outBuff >> 16); - destination[destOffset + 1] = (byte) (outBuff >> 8); - destination[destOffset + 2] = (byte) (outBuff); - - return 3; - } - } // end decodeToBytes - - /** - * Low-level access to decoding ASCII characters in the form of a byte array. Ignores GUNZIP option, if it's set. This is not generally a recommended method, although it is used - * internally as part of the decoding process. Special case: if len = 0, an empty array is returned. Still, if you need more speed and reduced memory footprint (and aren't gzipping), consider this - * method. - * - * @param source The Base64 encoded data - * @return decoded data - * @since 2.3.1 - */ - public static byte[] decode(byte[] source) throws java.io.IOException { - - byte[] decoded = null; - // try { - decoded = decode(source, 0, source.length, Base64.NO_OPTIONS); - // } catch( java.io.IOException ex ) { - // assert false : "IOExceptions only come from GZipping, which is turned off: " + ex.getMessage(); - // } - return decoded; - } - - /** - * Low-level access to decoding ASCII characters in the form of a byte array. Ignores GUNZIP option, if it's set. This is not generally a recommended method, although it is used - * internally as part of the decoding process. Special case: if len = 0, an empty array is returned. Still, if you need more speed and reduced memory footprint (and aren't gzipping), consider this - * method. - * - * @param source The Base64 encoded data - * @param off The offset of where to begin decoding - * @param len The length of characters to decode - * @param options Can specify options such as alphabet type to use - * @return decoded data - * @throws java.io.IOException If bogus characters exist in source data - * @since 1.3 - */ - public static byte[] decode(byte[] source, int off, int len, int options) throws java.io.IOException { - - // Lots of error checking and exception throwing - if (source == null) { - throw new NullPointerException("Cannot decode null source array."); - } // end if - if (off < 0 || off + len > source.length) { - throw new IllegalArgumentException(String.format("Source array with length %d cannot have offset of %d and process %d bytes.", source.length, off, len)); - } // end if - - if (len == 0) { - return new byte[0]; - } else if (len < 4) { - throw new IllegalArgumentException("Base64-encoded string must have at least four characters, but length specified was " + len); - } // end if - - byte[] DECODABET = getDecodabet(options); - - int len34 = len * 3 / 4; // Estimate on array size - byte[] outBuff = new byte[len34]; // Upper limit on size of output - int outBuffPosn = 0; // Keep track of where we're writing - - byte[] b4 = new byte[4]; // Four byte buffer from source, eliminating white space - int b4Posn = 0; // Keep track of four byte input buffer - int i = 0; // Source array counter - byte sbiDecode = 0; // Special value from DECODABET - - for (i = off; i < off + len; i++) { // Loop through source - - sbiDecode = DECODABET[source[i] & 0xFF]; - - // White space, Equals sign, or legit Base64 character - // Note the values such as -5 and -9 in the - // DECODABETs at the top of the file. - if (sbiDecode >= WHITE_SPACE_ENC) { - if (sbiDecode >= EQUALS_SIGN_ENC) { - b4[b4Posn++] = source[i]; // Save non-whitespace - if (b4Posn > 3) { // Time to decode? - outBuffPosn += decode4to3(b4, 0, outBuff, outBuffPosn, options); - b4Posn = 0; - - // If that was the equals sign, break out of 'for' loop - if (source[i] == EQUALS_SIGN) { - break; - } // end if: equals sign - } // end if: quartet built - } // end if: equals sign or better - } // end if: white space, equals sign or better - else { - // There's a bad input character in the Base64 stream. - throw new java.io.IOException(String.format("Bad Base64 input character decimal %d in array position %d", (source[i]) & 0xFF, i)); - } // end else: - } // each input character - - byte[] out = new byte[outBuffPosn]; - System.arraycopy(outBuff, 0, out, 0, outBuffPosn); - return out; - } // end decode - - /** - * Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it. - * - * @param s the string to decode - * @return the decoded data - * @throws java.io.IOException If there is a problem - * @since 1.4 - */ - public static byte[] decode(String s) throws java.io.IOException { - - return decode(s, NO_OPTIONS); - } - - /** - * Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it. - * - * @param s the string to decode - * @param options encode options such as URL_SAFE - * @return the decoded data - * @throws java.io.IOException if there is an error - * @throws NullPointerException if s is null - * @since 1.4 - */ - public static byte[] decode(String s, int options) throws java.io.IOException { - - if (s == null) { - throw new NullPointerException("Input string was null."); - } // end if - - byte[] bytes; - try { - bytes = s.getBytes(PREFERRED_ENCODING); - } // end try - catch (java.io.UnsupportedEncodingException uee) { - bytes = s.getBytes(); - } // end catch - // - - // Decode - bytes = decode(bytes, 0, bytes.length, options); - - // Check to see if it's gzip-compressed - // GZIP Magic Two-Byte Number: 0x8b1f (35615) - boolean dontGunzip = (options & DONT_GUNZIP) != 0; - if ((bytes != null) && (bytes.length >= 4) && (!dontGunzip)) { - - int head = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00); - if (java.util.zip.GZIPInputStream.GZIP_MAGIC == head) { - java.io.ByteArrayInputStream bais = null; - java.util.zip.GZIPInputStream gzis = null; - java.io.ByteArrayOutputStream baos = null; - byte[] buffer = new byte[2048]; - int length = 0; - - try { - baos = new java.io.ByteArrayOutputStream(); - bais = new java.io.ByteArrayInputStream(bytes); - gzis = new java.util.zip.GZIPInputStream(bais); - - while ((length = gzis.read(buffer)) >= 0) { - baos.write(buffer, 0, length); - } // end while: reading input - - // No error? Get new bytes. - bytes = baos.toByteArray(); - - } // end try - catch (java.io.IOException e) { - e.printStackTrace(); - // Just return originally-decoded bytes - } // end catch - finally { - try { - baos.close(); - } catch (Exception e) { - } - try { - gzis.close(); - } catch (Exception e) { - } - try { - bais.close(); - } catch (Exception e) { - } - } // end finally - - } // end if: gzipped - } // end if: bytes.length >= 2 - - return bytes; - } // end decode - - /** - * Attempts to decode Base64 data and deserialize a Java Object within. Returns null if there was an error. - * - * @param encodedObject The Base64 data to decode - * @return The decoded and deserialized object - * @throws NullPointerException if encodedObject is null - * @throws java.io.IOException if there is a general error - * @throws ClassNotFoundException if the decoded object is of a class that cannot be found by the JVM - * @since 1.5 - */ - public static Object decodeToObject(String encodedObject) throws java.io.IOException, ClassNotFoundException { - - return decodeToObject(encodedObject, NO_OPTIONS, null); - } - - /** - * Attempts to decode Base64 data and deserialize a Java Object within. Returns null if there was an error. If loader is not null, it will be the class loader used when - * deserializing. - * - * @param encodedObject The Base64 data to decode - * @param options Various parameters related to decoding - * @param loader Optional class loader to use in deserializing classes. - * @return The decoded and deserialized object - * @throws NullPointerException if encodedObject is null - * @throws java.io.IOException if there is a general error - * @throws ClassNotFoundException if the decoded object is of a class that cannot be found by the JVM - * @since 2.3.4 - */ - public static Object decodeToObject(String encodedObject, int options, final ClassLoader loader) throws java.io.IOException, ClassNotFoundException { - - // Decode and gunzip if necessary - byte[] objBytes = decode(encodedObject, options); - - java.io.ByteArrayInputStream bais = null; - java.io.ObjectInputStream ois = null; - Object obj = null; - - try { - bais = new java.io.ByteArrayInputStream(objBytes); - - // If no custom class loader is provided, use Java's builtin OIS. - if (loader == null) { - ois = new java.io.ObjectInputStream(bais); - } // end if: no loader provided - - // Else make a customized object input stream that uses - // the provided class loader. - else { - ois = new java.io.ObjectInputStream(bais) { - - @Override - public Class resolveClass(java.io.ObjectStreamClass streamClass) throws java.io.IOException, ClassNotFoundException { - - Class c = Class.forName(streamClass.getName(), false, loader); - if (c == null) { - return super.resolveClass(streamClass); - } else { - return c; // Class loader knows of this class. - } // end else: not null - } // end resolveClass - }; // end ois - } // end else: no custom class loader - - obj = ois.readObject(); - } // end try - catch (java.io.IOException e) { - throw e; // Catch and throw in order to execute finally{} - } // end catch - catch (ClassNotFoundException e) { - throw e; // Catch and throw in order to execute finally{} - } // end catch - finally { - try { - bais.close(); - } catch (Exception e) { - } - try { - ois.close(); - } catch (Exception e) { - } - } // end finally - - return obj; - } // end decodeObject - - /** - * Convenience method for encoding data to a file. - *

- * As of v 2.3, if there is a error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned false, but in retrospect that's a pretty poor way - * to handle it. - *

- * - * @param dataToEncode byte array of data to encode in base64 form - * @param filename Filename for saving encoded data - * @throws java.io.IOException if there is an error - * @throws NullPointerException if dataToEncode is null - * @since 2.1 - */ - public static void encodeToFile(byte[] dataToEncode, String filename) throws java.io.IOException { - - if (dataToEncode == null) { - throw new NullPointerException("Data to encode was null."); - } // end iff - - Base64.OutputStream bos = null; - try { - bos = new Base64.OutputStream(new java.io.FileOutputStream(filename), Base64.ENCODE); - bos.write(dataToEncode); - } // end try - catch (java.io.IOException e) { - throw e; // Catch and throw to execute finally{} block - } // end catch: java.io.IOException - finally { - try { - bos.close(); - } catch (Exception e) { - } - } // end finally - - } // end encodeToFile - - /** - * Convenience method for decoding data to a file. - *

- * As of v 2.3, if there is a error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned false, but in retrospect that's a pretty poor way - * to handle it. - *

- * - * @param dataToDecode Base64-encoded data as a string - * @param filename Filename for saving decoded data - * @throws java.io.IOException if there is an error - * @since 2.1 - */ - public static void decodeToFile(String dataToDecode, String filename) throws java.io.IOException { - - Base64.OutputStream bos = null; - try { - bos = new Base64.OutputStream(new java.io.FileOutputStream(filename), Base64.DECODE); - bos.write(dataToDecode.getBytes(PREFERRED_ENCODING)); - } // end try - catch (java.io.IOException e) { - throw e; // Catch and throw to execute finally{} block - } // end catch: java.io.IOException - finally { - try { - bos.close(); - } catch (Exception e) { - } - } // end finally - - } // end decodeToFile - - /** - * Convenience method for reading a base64-encoded file and decoding it. - *

- * As of v 2.3, if there is a error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned false, but in retrospect that's a pretty poor way - * to handle it. - *

- * - * @param filename Filename for reading encoded data - * @return decoded byte array - * @throws java.io.IOException if there is an error - * @since 2.1 - */ - public static byte[] decodeFromFile(String filename) throws java.io.IOException { - - byte[] decodedData = null; - Base64.InputStream bis = null; - try { - // Set up some useful variables - java.io.File file = new java.io.File(filename); - byte[] buffer = null; - int length = 0; - int numBytes = 0; - - // Check for size of file - if (file.length() > Integer.MAX_VALUE) { - throw new java.io.IOException("File is too big for this convenience method (" + file.length() + " bytes)."); - } // end if: file too big for int index - buffer = new byte[(int) file.length()]; - - // Open a stream - bis = new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(file)), Base64.DECODE); - - // Read until done - while ((numBytes = bis.read(buffer, length, 4096)) >= 0) { - length += numBytes; - } // end while - - // Save in a variable to return - decodedData = new byte[length]; - System.arraycopy(buffer, 0, decodedData, 0, length); - - } // end try - catch (java.io.IOException e) { - throw e; // Catch and release to execute finally{} - } // end catch: java.io.IOException - finally { - try { - bis.close(); - } catch (Exception e) { - } - } // end finally - - return decodedData; - } // end decodeFromFile - - /** - * Convenience method for reading a binary file and base64-encoding it. - *

- * As of v 2.3, if there is a error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned false, but in retrospect that's a pretty poor way - * to handle it. - *

- * - * @param filename Filename for reading binary data - * @return base64-encoded string - * @throws java.io.IOException if there is an error - * @since 2.1 - */ - public static String encodeFromFile(String filename) throws java.io.IOException { - - String encodedData = null; - Base64.InputStream bis = null; - try { - // Set up some useful variables - java.io.File file = new java.io.File(filename); - byte[] buffer = new byte[Math.max((int) (file.length() * 1.4 + 1), 40)]; // Need max() for math on small files (v2.2.1); Need +1 for a few corner cases (v2.3.5) - int length = 0; - int numBytes = 0; - - // Open a stream - bis = new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(file)), Base64.ENCODE); - - // Read until done - while ((numBytes = bis.read(buffer, length, 4096)) >= 0) { - length += numBytes; - } // end while - - // Save in a variable to return - encodedData = new String(buffer, 0, length, Base64.PREFERRED_ENCODING); - - } // end try - catch (java.io.IOException e) { - throw e; // Catch and release to execute finally{} - } // end catch: java.io.IOException - finally { - try { - bis.close(); - } catch (Exception e) { - } - } // end finally - - return encodedData; - } // end encodeFromFile - - /** - * Reads infile and encodes it to outfile. - * - * @param infile Input file - * @param outfile Output file - * @throws java.io.IOException if there is an error - * @since 2.2 - */ - public static void encodeFileToFile(String infile, String outfile) throws java.io.IOException { - - String encoded = Base64.encodeFromFile(infile); - java.io.OutputStream out = null; - try { - out = new java.io.BufferedOutputStream(new java.io.FileOutputStream(outfile)); - out.write(encoded.getBytes("US-ASCII")); // Strict, 7-bit output. - } // end try - catch (java.io.IOException e) { - throw e; // Catch and release to execute finally{} - } // end catch - finally { - try { - out.close(); - } catch (Exception ex) { - } - } // end finally - } // end encodeFileToFile - - /** - * Reads infile and decodes it to outfile. - * - * @param infile Input file - * @param outfile Output file - * @throws java.io.IOException if there is an error - * @since 2.2 - */ - public static void decodeFileToFile(String infile, String outfile) throws java.io.IOException { - - byte[] decoded = Base64.decodeFromFile(infile); - java.io.OutputStream out = null; - try { - out = new java.io.BufferedOutputStream(new java.io.FileOutputStream(outfile)); - out.write(decoded); - } // end try - catch (java.io.IOException e) { - throw e; // Catch and release to execute finally{} - } // end catch - finally { - try { - out.close(); - } catch (Exception ex) { - } - } // end finally - } // end decodeFileToFile - - /* ******** I N N E R C L A S S I N P U T S T R E A M ******** */ - - /** - * A {@link Base64.InputStream} will read data from another java.io.InputStream, given in the constructor, and encode/decode to/from Base64 notation on the fly. - * - * @see Base64 - * @since 1.3 - */ - public static class InputStream extends java.io.FilterInputStream { - - private boolean encode; // Encoding or decoding - private int position; // Current position in the buffer - private byte[] buffer; // Small buffer holding converted data - private int bufferLength; // Length of buffer (3 or 4) - private int numSigBytes; // Number of meaningful bytes in the buffer - private int lineLength; - private boolean breakLines; // Break lines at less than 80 characters - private int options; // Record options used to create the stream. - private byte[] decodabet; // Local copies to avoid extra method calls - - /** - * Constructs a {@link Base64.InputStream} in DECODE mode. - * - * @param in the java.io.InputStream from which to read data. - * @since 1.3 - */ - public InputStream(java.io.InputStream in) { - - this(in, DECODE); - } // end constructor - - /** - * Constructs a {@link Base64.InputStream} in either ENCODE or DECODE mode. - *

- * Valid options: - * - *

-     *   ENCODE or DECODE: Encode or Decode as data is read.
-     *   DO_BREAK_LINES: break lines at 76 characters
-     *     (only meaningful when encoding)
-     * 
- *

- * Example: new Base64.InputStream( in, Base64.DECODE ) - * - * @param in the java.io.InputStream from which to read data. - * @param options Specified options - * @see Base64#ENCODE - * @see Base64#DECODE - * @see Base64#DO_BREAK_LINES - * @since 2.0 - */ - public InputStream(java.io.InputStream in, int options) { - - super(in); - this.options = options; // Record for later - this.breakLines = (options & DO_BREAK_LINES) > 0; - this.encode = (options & ENCODE) > 0; - this.bufferLength = encode ? 4 : 3; - this.buffer = new byte[bufferLength]; - this.position = -1; - this.lineLength = 0; - this.decodabet = getDecodabet(options); - } // end constructor - - /** - * Reads enough of the input stream to convert to/from Base64 and returns the next byte. - * - * @return next byte - * @since 1.3 - */ - @Override - public int read() throws java.io.IOException { - - // Do we need to get data? - if (position < 0) { - if (encode) { - byte[] b3 = new byte[3]; - int numBinaryBytes = 0; - for (int i = 0; i < 3; i++) { - int b = in.read(); - - // If end of stream, b is -1. - if (b >= 0) { - b3[i] = (byte) b; - numBinaryBytes++; - } else { - break; // out of for loop - } // end else: end of stream - - } // end for: each needed input byte - - if (numBinaryBytes > 0) { - encode3to4(b3, 0, numBinaryBytes, buffer, 0, options); - position = 0; - numSigBytes = 4; - } // end if: got data - else { - return -1; // Must be end of stream - } // end else - } // end if: encoding - - // Else decoding - else { - byte[] b4 = new byte[4]; - int i = 0; - for (i = 0; i < 4; i++) { - // Read four "meaningful" bytes: - int b = 0; - do { - b = in.read(); - } while (b >= 0 && decodabet[b & 0x7f] <= WHITE_SPACE_ENC); - - if (b < 0) { - break; // Reads a -1 if end of stream - } // end if: end of stream - - b4[i] = (byte) b; - } // end for: each needed input byte - - if (i == 4) { - numSigBytes = decode4to3(b4, 0, buffer, 0, options); - position = 0; - } // end if: got four characters - else if (i == 0) { - return -1; - } // end else if: also padded correctly - else { - // Must have broken out from above. - throw new java.io.IOException("Improperly padded Base64 input."); - } // end - - } // end else: decode - } // end else: get data - - // Got data? - if (position >= 0) { - // End of relevant data? - if ( /* !encode && */position >= numSigBytes) { - return -1; - } // end if: got data - - if (encode && breakLines && lineLength >= MAX_LINE_LENGTH) { - lineLength = 0; - return '\n'; - } // end if - else { - lineLength++; // This isn't important when decoding - // but throwing an extra "if" seems - // just as wasteful. - - int b = buffer[position++]; - - if (position >= bufferLength) { - position = -1; - } // end if: end - - return b & 0xFF; // This is how you "cast" a byte that's - // intended to be unsigned. - } // end else - } // end if: position >= 0 - - // Else error - else { - throw new java.io.IOException("Error in Base64 code reading stream."); - } // end else - } // end read - - /** - * Calls {@link #read()} repeatedly until the end of stream is reached or len bytes are read. Returns number of bytes read into array or -1 if end of stream is encountered. - * - * @param dest array to hold values - * @param off offset for array - * @param len max number of bytes to read into array - * @return bytes read into array or -1 if end of stream is encountered. - * @since 1.3 - */ - @Override - public int read(byte[] dest, int off, int len) throws java.io.IOException { - - int i; - int b; - for (i = 0; i < len; i++) { - b = read(); - - if (b >= 0) { - dest[off + i] = (byte) b; - } else if (i == 0) { - return -1; - } else { - break; // Out of 'for' loop - } // Out of 'for' loop - } // end for: each byte read - return i; - } // end read - - } // end inner class InputStream - - /* ******** I N N E R C L A S S O U T P U T S T R E A M ******** */ - - /** - * A {@link Base64.OutputStream} will write data to another java.io.OutputStream, given in the constructor, and encode/decode to/from Base64 notation on the fly. - * - * @see Base64 - * @since 1.3 - */ - public static class OutputStream extends java.io.FilterOutputStream { - - private boolean encode; - private int position; - private byte[] buffer; - private int bufferLength; - private int lineLength; - private boolean breakLines; - private byte[] b4; // Scratch used in a few places - private boolean suspendEncoding; - private int options; // Record for later - private byte[] decodabet; // Local copies to avoid extra method calls - - /** - * Constructs a {@link Base64.OutputStream} in ENCODE mode. - * - * @param out the java.io.OutputStream to which data will be written. - * @since 1.3 - */ - public OutputStream(java.io.OutputStream out) { - - this(out, ENCODE); - } // end constructor - - /** - * Constructs a {@link Base64.OutputStream} in either ENCODE or DECODE mode. - *

- * Valid options: - * - *

-     *   ENCODE or DECODE: Encode or Decode as data is read.
-     *   DO_BREAK_LINES: don't break lines at 76 characters
-     *     (only meaningful when encoding)
-     * 
- *

- * Example: new Base64.OutputStream( out, Base64.ENCODE ) - * - * @param out the java.io.OutputStream to which data will be written. - * @param options Specified options. - * @see Base64#ENCODE - * @see Base64#DECODE - * @see Base64#DO_BREAK_LINES - * @since 1.3 - */ - public OutputStream(java.io.OutputStream out, int options) { - - super(out); - this.breakLines = (options & DO_BREAK_LINES) != 0; - this.encode = (options & ENCODE) != 0; - this.bufferLength = encode ? 3 : 4; - this.buffer = new byte[bufferLength]; - this.position = 0; - this.lineLength = 0; - this.suspendEncoding = false; - this.b4 = new byte[4]; - this.options = options; - this.decodabet = getDecodabet(options); - } // end constructor - - /** - * Writes the byte to the output stream after converting to/from Base64 notation. When encoding, bytes are buffered three at a time before the output stream actually gets a write() call. When - * decoding, bytes are buffered four at a time. - * - * @param theByte the byte to write - * @since 1.3 - */ - @Override - public void write(int theByte) throws java.io.IOException { - - // Encoding suspended? - if (suspendEncoding) { - this.out.write(theByte); - return; - } // end if: supsended - - // Encode? - if (encode) { - buffer[position++] = (byte) theByte; - if (position >= bufferLength) { // Enough to encode. - - this.out.write(encode3to4(b4, buffer, bufferLength, options)); - - lineLength += 4; - if (breakLines && lineLength >= MAX_LINE_LENGTH) { - this.out.write(NEW_LINE); - lineLength = 0; - } // end if: end of line - - position = 0; - } // end if: enough to output - } // end if: encoding - - // Else, Decoding - else { - // Meaningful Base64 character? - if (decodabet[theByte & 0x7f] > WHITE_SPACE_ENC) { - buffer[position++] = (byte) theByte; - if (position >= bufferLength) { // Enough to output. - - int len = Base64.decode4to3(buffer, 0, b4, 0, options); - out.write(b4, 0, len); - position = 0; - } // end if: enough to output - } // end if: meaningful base64 character - else if (decodabet[theByte & 0x7f] != WHITE_SPACE_ENC) { - throw new java.io.IOException("Invalid character in Base64 data."); - } // end else: not white space either - } // end else: decoding - } // end write - - /** - * Calls {@link #write(int)} repeatedly until len bytes are written. - * - * @param theBytes array from which to read bytes - * @param off offset for array - * @param len max number of bytes to read into array - * @since 1.3 - */ - @Override - public void write(byte[] theBytes, int off, int len) throws java.io.IOException { - - // Encoding suspended? - if (suspendEncoding) { - this.out.write(theBytes, off, len); - return; - } // end if: supsended - - for (int i = 0; i < len; i++) { - write(theBytes[off + i]); - } // end for: each byte written - - } // end write - - /** - * Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer without closing the stream. - * - * @throws java.io.IOException if there's an error. - */ - public void flushBase64() throws java.io.IOException { - - if (position > 0) { - if (encode) { - out.write(encode3to4(b4, buffer, position, options)); - position = 0; - } // end if: encoding - else { - throw new java.io.IOException("Base64 input not properly padded."); - } // end else: decoding - } // end if: buffer partially full - - } // end flush - - /** - * Flushes and closes (I think, in the superclass) the stream. - * - * @since 1.3 - */ - @Override - public void close() throws java.io.IOException { - - // 1. Ensure that pending characters are written - flushBase64(); - - // 2. Actually close the stream - // Base class both flushes and closes. - super.close(); - - buffer = null; - out = null; - } // end close - - /** - * Suspends encoding of the stream. May be helpful if you need to embed a piece of base64-encoded data in a stream. - * - * @throws java.io.IOException if there's an error flushing - * @since 1.5.1 - */ - public void suspendEncoding() throws java.io.IOException { - - flushBase64(); - this.suspendEncoding = true; - } // end suspendEncoding - - /** - * Resumes encoding of the stream. May be helpful if you need to embed a piece of base64-encoded data in a stream. - * - * @since 1.5.1 - */ - public void resumeEncoding() { - - this.suspendEncoding = false; - } // end resumeEncoding - - } // end inner class OutputStream - -} // end class Base64 diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/DateUtils.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/DateUtils.java deleted file mode 100644 index 675f0a42d..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/DateUtils.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.TimeZone; - -/** - *

- * Utilities to provide the following to application: - *

- *
    - *
  • Provision of standard date and time handling
  • - *
- */ -public class DateUtils { - - /** - * private Constructor - */ - private DateUtils() { - - } - - /** - * Creates a Date instance for this instant in the UTC timezone - * - * @return the Date instance - */ - public static Date nowUtc() { - - return new Date(); - } - - /** - * Creates a date from a long representing milliseconds from epoch - * - * @param millisecondsFromEpoch - * @return the Date object - */ - public static Date fromMillisUtc(long millisecondsFromEpoch) { - - return new Date(millisecondsFromEpoch); - } - - /** - * Converts a date to a UTC String representation - * - * @param date - * @return the formatted date - */ - public static String toUTCString(Date date) { - - SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); - sd.setTimeZone(TimeZone.getTimeZone("GMT")); - return sd.format(date); - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/BooleanDeserializer.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/BooleanDeserializer.java deleted file mode 100644 index d8c8826d5..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/BooleanDeserializer.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils.jackson; - -import java.io.IOException; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.exc.InvalidFormatException; - -/** - * @author Matija Mazi
- * @created 2/19/13 9:06 PM - */ -public abstract class BooleanDeserializer extends JsonDeserializer { - - private String trueValue, falseValue; - - protected BooleanDeserializer(String trueValue, String falseValue) { - - this.trueValue = trueValue; - this.falseValue = falseValue; - } - - @Override - public Boolean deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - - String valueAsString = jp.getValueAsString(); - if (trueValue.equals(valueAsString)) { - return true; - } else if (falseValue.equals(valueAsString)) { - return false; - } - throw new InvalidFormatException(String.format("Unrecognized value; expected %s or %s: %s", trueValue, falseValue, valueAsString), valueAsString, Boolean.class); - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializer.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializer.java deleted file mode 100644 index 028a857f6..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializer.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.xeiam.xchange.utils.jackson; - -import java.io.IOException; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; - -/** - * @author Matija Mazi
- * 0-based enum deserializer. This wil deserialize 0 as the first enum constant, 1 as the second etc. - */ -public abstract class EnumIntDeserializer> extends JsonDeserializer { - - private Class enumClass; - - protected EnumIntDeserializer(Class enumClass) { - - this.enumClass = enumClass; - } - - @Override - public E deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - - E[] constants = enumClass.getEnumConstants(); - return constants[jp.getValueAsInt() + getIndexBase()]; - } - - protected int getIndexBase() { - - return 0; - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializerOneBased.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializerOneBased.java deleted file mode 100644 index 3be4ce748..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/EnumIntDeserializerOneBased.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xeiam.xchange.utils.jackson; - -/** - * @author Matija Mazi
- * 1-based enum deserializer. This wil deserialize 1 as the first enum constant, 2 as the second etc. - */ -public class EnumIntDeserializerOneBased> extends EnumIntDeserializer { - - protected EnumIntDeserializerOneBased(Class enumClass) { - - super(enumClass); - } - - @Override - protected int getIndexBase() { - - return 1; - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/FloatingTimestampDeserializer.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/FloatingTimestampDeserializer.java deleted file mode 100644 index de9f544fb..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/FloatingTimestampDeserializer.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils.jackson; - -import java.io.IOException; -import java.util.Date; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; - -/** - * @author Matija Mazi
- */ -public class FloatingTimestampDeserializer extends JsonDeserializer { - - @Override - public Date deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - - return new Date(Math.round(jp.getValueAsDouble() * 1000)); - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/SqlTimeDeserializer.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/SqlTimeDeserializer.java deleted file mode 100644 index 3c03413f1..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/SqlTimeDeserializer.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils.jackson; - -import java.io.IOException; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.exc.InvalidFormatException; - -/** - * @author Matija Mazi
- */ -public class SqlTimeDeserializer extends JsonDeserializer { - - private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - - @Override - public Date deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - - String str = jp.getValueAsString(); - try { - return dateFormat.parse(str); - } catch (ParseException e) { - throw new InvalidFormatException("Error parsing as date", str, Date.class); - } - } -} diff --git a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/YesNoBooleanDeserializerImpl.java b/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/YesNoBooleanDeserializerImpl.java deleted file mode 100644 index 85bae36be..000000000 --- a/xchange-core/src/main/java/com/xeiam/xchange/utils/jackson/YesNoBooleanDeserializerImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils.jackson; - -/** - * @author Matija Mazi
- * @created 2/19/13 9:27 PM - */ -public class YesNoBooleanDeserializerImpl extends BooleanDeserializer { - - protected YesNoBooleanDeserializerImpl() { - - super("Yes", "No"); - } -} diff --git a/xchange-core/src/main/resources/org/joda/money/MoneyDataExtension.csv b/xchange-core/src/main/resources/org/joda/money/MoneyDataExtension.csv deleted file mode 100644 index 54d1cdecf..000000000 --- a/xchange-core/src/main/resources/org/joda/money/MoneyDataExtension.csv +++ /dev/null @@ -1,7 +0,0 @@ -#Code,Numeric,DecPlaces,CountryCodes -BTC,-1,-1, -NMC,-1,-1, -LTC,-1,-1, -NVC,-1,-1, -TRC,-1,-1, -PPC,-1,-1, diff --git a/xchange-core/src/test/java/com/xeiam/xchange/CurrencyPairTest.java b/xchange-core/src/test/java/com/xeiam/xchange/CurrencyPairTest.java deleted file mode 100644 index 1826ed924..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/CurrencyPairTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.xeiam.xchange.currency.CurrencyPair; - -public class CurrencyPairTest { - - @Test - public void testMajors() { - - assertEquals("EUR", CurrencyPair.EUR_USD.baseCurrency); - assertEquals("USD", CurrencyPair.EUR_USD.counterCurrency); - - assertEquals("GBP", CurrencyPair.GBP_USD.baseCurrency); - assertEquals("USD", CurrencyPair.GBP_USD.counterCurrency); - - assertEquals("USD", CurrencyPair.USD_JPY.baseCurrency); - assertEquals("JPY", CurrencyPair.USD_JPY.counterCurrency); - - assertEquals("USD", CurrencyPair.USD_CHF.baseCurrency); - assertEquals("CHF", CurrencyPair.USD_CHF.counterCurrency); - - assertEquals("USD", CurrencyPair.USD_AUD.baseCurrency); - assertEquals("AUD", CurrencyPair.USD_AUD.counterCurrency); - - assertEquals("USD", CurrencyPair.USD_CAD.baseCurrency); - assertEquals("CAD", CurrencyPair.USD_CAD.counterCurrency); - } - - @Test - public void testBitcoinCourtesy() { - - assertEquals("BTC", CurrencyPair.BTC_USD.baseCurrency); - assertEquals("USD", CurrencyPair.BTC_USD.counterCurrency); - - assertEquals("BTC", CurrencyPair.BTC_GBP.baseCurrency); - assertEquals("USD", CurrencyPair.BTC_USD.counterCurrency); - - assertEquals("BTC", CurrencyPair.BTC_EUR.baseCurrency); - assertEquals("EUR", CurrencyPair.BTC_EUR.counterCurrency); - - assertEquals("BTC", CurrencyPair.BTC_JPY.baseCurrency); - assertEquals("JPY", CurrencyPair.BTC_JPY.counterCurrency); - - assertEquals("BTC", CurrencyPair.BTC_CHF.baseCurrency); - assertEquals("CHF", CurrencyPair.BTC_CHF.counterCurrency); - - assertEquals("BTC", CurrencyPair.BTC_AUD.baseCurrency); - assertEquals("AUD", CurrencyPair.BTC_AUD.counterCurrency); - - assertEquals("BTC", CurrencyPair.BTC_CAD.baseCurrency); - assertEquals("CAD", CurrencyPair.BTC_CAD.counterCurrency); - - } - -} diff --git a/xchange-core/src/test/java/com/xeiam/xchange/utils/AssertTest.java b/xchange-core/src/test/java/com/xeiam/xchange/utils/AssertTest.java deleted file mode 100644 index 45bbec362..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/utils/AssertTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.junit.Test; - -/** - * Test class for testing various Assert methods - */ -public class AssertTest { - - @Test - public void testNotNull() { - - Assert.notNull("", "Not null"); - - try { - Assert.notNull(null, "null"); - fail("Expected exception"); - } catch (IllegalArgumentException e) { - assertEquals("null", e.getMessage()); - } - - } - - @Test - public void testHasLength() { - - Assert.hasLength("Test", 4, "Wrong length"); - - try { - Assert.hasLength(null, 4, "null"); - fail("Expected exception"); - } catch (IllegalArgumentException e) { - assertEquals("null", e.getMessage()); - } - - try { - Assert.hasLength("", 4, "short"); - fail("Expected exception"); - } catch (IllegalArgumentException e) { - assertEquals("short", e.getMessage()); - } - - } - - @Test - public void testHasSize() { - - Assert.hasSize(Arrays.asList("1", "2", "3"), 3, "Wrong length"); - - try { - Assert.hasSize(null, 4, "null"); - fail("Expected exception"); - } catch (IllegalArgumentException e) { - assertEquals("null", e.getMessage()); - } - - try { - Assert.hasSize(Arrays.asList("1", "2", "3"), 4, "short"); - fail("Expected exception"); - } catch (IllegalArgumentException e) { - assertEquals("short", e.getMessage()); - } - - } - -} diff --git a/xchange-core/src/test/java/com/xeiam/xchange/utils/Base64Test.java b/xchange-core/src/test/java/com/xeiam/xchange/utils/Base64Test.java deleted file mode 100644 index 557e783a5..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/utils/Base64Test.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.util.Arrays; -import java.util.Random; - -import junit.framework.TestCase; - -import org.junit.Test; - -/** - * Based on iHarder - */ -public class Base64Test extends TestCase { - - private static final long SEED = 12345678; - private static Random s_random = new Random(SEED); - - @Test - public void testStreams() throws Exception { - - for (int i = 0; i < 100; ++i) { - runStreamTest(i); - } - for (int i = 100; i < 2000; i += 250) { - runStreamTest(i); - } - for (int i = 2000; i < 80000; i += 1000) { - runStreamTest(i); - } - } - - private byte[] createData(int length) throws Exception { - - byte[] bytes = new byte[length]; - s_random.nextBytes(bytes); - return bytes; - } - - private void runStreamTest(int length) throws Exception { - - byte[] data = createData(length); - ByteArrayOutputStream out_bytes = new ByteArrayOutputStream(); - OutputStream out = new Base64.OutputStream(out_bytes); - out.write(data); - out.close(); - byte[] encoded = out_bytes.toByteArray(); - byte[] decoded = Base64.decode(encoded, 0, encoded.length, 0); - assertTrue(Arrays.equals(data, decoded)); - - Base64.InputStream in = new Base64.InputStream(new ByteArrayInputStream(encoded)); - out_bytes = new ByteArrayOutputStream(); - byte[] buffer = new byte[3]; - for (int n = in.read(buffer); n > 0; n = in.read(buffer)) { - out_bytes.write(buffer, 0, n); - } - out_bytes.close(); - in.close(); - decoded = out_bytes.toByteArray(); - assertTrue(Arrays.equals(data, decoded)); - } - -} diff --git a/xchange-core/src/test/java/com/xeiam/xchange/utils/BigDecimalTest.java b/xchange-core/src/test/java/com/xeiam/xchange/utils/BigDecimalTest.java deleted file mode 100644 index a968e22c6..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/utils/BigDecimalTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -import static org.junit.Assert.assertTrue; - -import java.math.BigDecimal; - -import org.junit.Test; - -/** - * Tests various BigMoney and BigDecimal behavior - */ -public class BigDecimalTest { - - @Test - public void test() { - - int BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR = 100000000; - - long amount_int = 23385868; - - // FYI DO NOT divide like this - BigDecimal testAmount = new BigDecimal((double) amount_int / BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR); - assertTrue("testAmount should be 0.2338586800000000132104815975253586657345294952392578125", testAmount.toPlainString().equals("0.2338586800000000132104815975253586657345294952392578125")); - - // FYI DO divide like this - BigDecimal testAmount2 = new BigDecimal(amount_int).divide(new BigDecimal(BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)); - assertTrue("testAmount2 should be 0.23385868", testAmount2.toPlainString().equals("0.23385868")); - - } -} diff --git a/xchange-core/src/test/java/com/xeiam/xchange/utils/DummyAccountInfo.java b/xchange-core/src/test/java/com/xeiam/xchange/utils/DummyAccountInfo.java deleted file mode 100644 index fdc73f4be..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/utils/DummyAccountInfo.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -/** - * A mutable AccountInfo class used for HttpTemplate testing. - */ -public class DummyAccountInfo { - - String username; - String currency; - int amount_int; - - public String getUsername() { - - return username; - } - - public void setUsername(String username) { - - this.username = username; - } - - public String getCurrency() { - - return currency; - } - - public void setCurrency(String currency) { - - this.currency = currency; - } - - public int getAmount_int() { - - return amount_int; - } - - public void setAmount_int(int amount_int) { - - this.amount_int = amount_int; - } - -} diff --git a/xchange-core/src/test/java/com/xeiam/xchange/utils/DummyTicker.java b/xchange-core/src/test/java/com/xeiam/xchange/utils/DummyTicker.java deleted file mode 100644 index 8ad9454d2..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/utils/DummyTicker.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -/** - * A mutable Ticker class used for HttpTemplate testing. - */ -public class DummyTicker { - - long last; - long volume; - - public long getLast() { - - return last; - } - - public void setLast(long last) { - - this.last = last; - } - - public long getVolume() { - - return volume; - } - - public void setVolume(long volume) { - - this.volume = volume; - } - -} diff --git a/xchange-core/src/test/java/com/xeiam/xchange/utils/MoneyUtilsTest.java b/xchange-core/src/test/java/com/xeiam/xchange/utils/MoneyUtilsTest.java deleted file mode 100644 index 89b921ed8..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/utils/MoneyUtilsTest.java +++ /dev/null @@ -1,350 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.utils; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.math.BigDecimal; -import java.math.RoundingMode; - -import org.joda.money.BigMoney; -import org.junit.Test; - -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.MoneyUtils; - -/** - * Test class for testing MoneyUtils methods - */ -public class MoneyUtilsTest { - - /** - * Tests the constructors - */ - @Test - public void testConstructors() { - - // String - // create a monetary value - BigMoney testObject1 = MoneyUtils.parse("USD 23.87"); - assertEquals("USD", testObject1.getCurrencyUnit().getCurrencyCode()); - BigMoney testObject2 = MoneyUtils.parseBitcoin("BTC 1"); - assertEquals("BTC", testObject2.getCurrencyUnit().getCurrencyCode()); - } - - /** - * Tests incompatible currencies - */ - @Test - public void testIncompatibleCurrencies() { - - BigMoney testObject1 = MoneyUtils.parse("USD 10.50"); - BigMoney testObject2 = MoneyUtils.parse("GBP 10.50"); - try { - testObject1.plus(testObject2); - fail("Expected exception"); - } catch (IllegalArgumentException e) { - // Do nothing - } - } - - /** - * Tests the various comparison operators - */ - @Test - public void testComparisonOperators() { - - BigMoney testObject1 = MoneyUtils.parse("USD 10.50"); - BigMoney testObject2 = MoneyUtils.parse("USD 10.50"); - BigMoney testObject3 = MoneyUtils.parse("USD 10.51"); - // GT - assertFalse(testObject1.isGreaterThan(testObject2)); - assertFalse(testObject2.isGreaterThan(testObject1)); - assertTrue(testObject3.isGreaterThan(testObject1)); - // LT - assertFalse(testObject1.isLessThan(testObject2)); - assertFalse(testObject2.isLessThan(testObject1)); - assertTrue(testObject1.isLessThan(testObject3)); - // Compare to - assertEquals(-1, testObject1.compareTo(testObject3)); - assertEquals(0, testObject1.compareTo(testObject2)); - assertEquals(1, testObject3.compareTo(testObject1)); - } - - /** - * Tests addition of simple numbers over several iterations - */ - @Test - public void testSimpleAdd() { - - String[] column = new String[] { "1.0", "2.0", "3.0", "4.5" }; - - BigMoney testObject = MoneyUtils.parse("USD 0.00"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.plus(MoneyUtils.parse("USD " + column[i])); - } - - assertEquals("Unexpected value", "USD 10.50", testObject.toString()); - } - - /** - * Verifies ability to handle non-binary fractions over several iterations - */ - @Test - public void testComplexAdd() { - - String[] column = new String[] { "3.33", "3.33", "3.34", "3.43", "7.99", "6.53" }; - - BigMoney testObject = MoneyUtils.parse("USD 0"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.plus(MoneyUtils.parse("USD " + column[i])); - } - - assertEquals("Unexpected value", "USD 27.95", testObject.toString()); - } - - /** - * Verifies ability to handle non-binary fractions over several iterations - */ - @Test - public void testSimpleSubtract() { - - String[] column = new String[] { "1.0", "2.0", "3.0", "4.5" }; - - BigMoney testObject = MoneyUtils.parse("USD 0.00"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.minus(MoneyUtils.parse("USD " + column[i])); - } - - assertEquals("Unexpected value", "USD -10.50", testObject.toString()); - } - - /** - * Verifies ability to handle non-binary fractions over several iterations - */ - @Test - public void testComplexSubtract() { - - String[] column = new String[] { "3.33", "3.33", "3.34", "3.43", "7.99", "6.53" }; - - BigMoney testObject = MoneyUtils.parse("USD 0"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.minus(MoneyUtils.parse("USD " + column[i])); - } - - assertEquals("Unexpected value", "USD -27.95", testObject.toString()); - } - - /** - * Verifies ability to handle simple multiplications over several iterations - */ - @Test - public void testSimpleMultiply() { - - String[] column = new String[] { "1.0", "2.0", "3.0", "4.5" }; - - BigMoney testObject = MoneyUtils.parse("USD 10.00"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.multipliedBy(new BigDecimal(column[i])); - } - - // Exact answer is 270.0 - assertEquals("Unexpected value", "USD 270.00000", testObject.toString()); - } - - /** - * Verifies ability to handle simple integer multiplications over several iterations - */ - @Test - public void testSimpleIntegerMultiply() { - - String[] column = new String[] { "1", "2", "3", "4" }; - - BigMoney testObject = MoneyUtils.parse("USD 10.00"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.multipliedBy(new BigDecimal(column[i])); - } - - // Exact answer is 240 - assertEquals("Unexpected value", "USD 240.00", testObject.toString()); - } - - /** - * Verifies ability to handle non-binary fractions over several iterations - */ - @Test - public void testComplexMultiply() { - - String[] column = new String[] { "3.33", "3.33", "3.34", "3.43", "7.99", "6.53" }; - - BigMoney testObject = MoneyUtils.parse("USD 13.33"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.multipliedBy(new BigDecimal(column[i])); - } - - // Exact answer (as calculated) is 88352.56533784463118 - assertEquals("Unexpected value", "USD 88352.56533784463118", testObject.toString()); - } - - /** - * Verifies ability to handle simple fractions over several iterations - */ - @Test - public void testSimpleDivide() { - - String[] column = new String[] { "1.0", "2.0", "3.0", "4.5" }; - - BigMoney testObject = MoneyUtils.parse("USD 270.00"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.dividedBy(new BigDecimal(column[i]), RoundingMode.HALF_EVEN); - } - - // Exact answer (as calculated) is 10 - assertEquals("Unexpected value", "USD 10.00", testObject.toString()); - } - - /** - * Verifies ability to handle simple integer fractions over several iterations - */ - @Test - public void testSimpleIntegerDivide() { - - String[] column = new String[] { "1", "2", "3", "4" }; - - BigMoney testObject = MoneyUtils.parse("USD 270.00"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.dividedBy(new BigDecimal(column[i]), RoundingMode.HALF_EVEN); - } - - // Exact answer (as calculated) is 11.25 - assertEquals("Unexpected value", "USD 11.25", testObject.toString()); - } - - /** - * Verifies ability to handle simple integer divisions over several iterations followed by a series of integer multiplications to establish preservation of rounding - */ - @Test - public void testComplexIntegerDivideAndMultiply() { - - String[] column = new String[] { "1", "2", "3", "4" }; - - BigMoney testObject = MoneyUtils.parse("USD 270.00"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.dividedBy(new BigDecimal(column[i]), RoundingMode.HALF_EVEN); - } - for (int i = 0; i < column.length; i++) { - testObject = testObject.multipliedBy(new BigDecimal(column[i])); - } - - // Exact answer (as calculated) is 1) 11.25 2) 270 - assertEquals("Unexpected value", "USD 270.00", testObject.toString()); - } - - /** - * Verifies ability to handle non-binary fractions over several iterations - */ - @Test - public void testComplexDivide() { - - String[] column = new String[] { "3.33", "3.33", "3.34", "3.43", "7.99", "6.53" }; - - BigMoney testObject = MoneyUtils.parse("USD 435700.42"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.dividedBy(new BigDecimal(column[i]), RoundingMode.HALF_EVEN); - } - - // Exact answer (as calculated) is 65.735347653932 - // Locale representation is 2dp - assertEquals("Unexpected value", "USD 65.74", testObject.toString()); - } - - /** - * Verifies ability to handle non-binary divisions and multiplications over several iterations to high precision - */ - @Test - public void testComplexDivideAndMultiplyBitcoin() { - - String[] column = new String[] { "3.33", "3.33", "3.34", "3.43", "7.99", "6.53" }; - - BigMoney testObject = MoneyUtils.parseBitcoin("BTC 20999999.12345678"); - for (int i = 0; i < column.length; i++) { - testObject = testObject.dividedBy(new BigDecimal(column[i]), RoundingMode.HALF_EVEN); - } - - // Exact answer (as calculated) is 3168.32892452274544 - assertEquals("Unexpected value", "BTC 3168.328924522745", testObject.toString()); - - for (int i = 0; i < column.length; i++) { - testObject = testObject.multipliedBy(new BigDecimal(column[i])); - } - - // Exact answer (as calculated) is 20999999.12345678 - assertEquals("Unexpected value", "BTC 20999999.12345678", MoneyUtils.formatBitcoin(testObject)); - - } - - /** - * Verifies ability to handle non-binary divisions and multiplications over several iterations to high precision using Satoshis as the starting point - */ - @Test - public void testComplexDivideAndMultiplySatoshi() { - - String[] column = new String[] { "3.33", "3.33", "3.34", "3.43", "7.99", "6.53" }; - - BigMoney testObject = MoneyUtils.fromSatoshi(2099999912345678L); - for (int i = 0; i < column.length; i++) { - testObject = testObject.dividedBy(new BigDecimal(column[i]), RoundingMode.HALF_EVEN); - } - - // Exact answer (as calculated) is 3168.32892452274544 - assertEquals("Unexpected value", "BTC 3168.328924522745", testObject.toString()); - - for (int i = 0; i < column.length; i++) { - testObject = testObject.multipliedBy(new BigDecimal(column[i])); - } - - // Exact answer (as calculated) is 20999999.12345678 - assertEquals("Unexpected value", "BTC 20999999.12345678", MoneyUtils.formatBitcoin(testObject)); - - } - - @Test - public void testScientificNotation() { - - String amount = "USD 1.0E7"; - MoneyUtils.parse(amount); - - } - - @Test - public void testParseMoney() throws Exception { - - assertEquals(null, MoneyUtils.parseMoney(Currencies.EUR, null)); - - BigMoney eur344 = MoneyUtils.parseMoney(Currencies.EUR, new BigDecimal("3.44")); - assertEquals(new BigDecimal("3.44"), eur344.getAmount()); - assertEquals("EUR", eur344.getCurrencyUnit().getCurrencyCode()); - } -} diff --git a/xchange-core/src/test/java/com/xeiam/xchange/websocket/ExampleClient.java b/xchange-core/src/test/java/com/xeiam/xchange/websocket/ExampleClient.java deleted file mode 100644 index e811be3ae..000000000 --- a/xchange-core/src/test/java/com/xeiam/xchange/websocket/ExampleClient.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.xeiam.xchange.websocket; - -import java.net.URI; -import java.net.URISyntaxException; - -import org.java_websocket.client.WebSocketClient; -import org.java_websocket.drafts.Draft; -import org.java_websocket.drafts.Draft_10; -import org.java_websocket.handshake.ServerHandshake; -import org.junit.Ignore; - -/** This example demonstrates how to create a websocket connection to a server. Only the most important callbacks are overloaded. */ -@Ignore -public class ExampleClient extends WebSocketClient { - - public ExampleClient(URI serverUri, Draft draft) { - - super(serverUri, draft); - } - - public ExampleClient(URI serverURI) { - - super(serverURI); - } - - @Override - public void onOpen(ServerHandshake handshakedata) { - - System.out.println("opened connection"); - // if you pan to refuse connection based on ip or httpfields overload: onWebsocketHandshakeReceivedAsClient - } - - @Override - public void onMessage(String message) { - - System.out.println("received: " + message); - // send( "you said: " + message ); - } - - @Override - public void onClose(int code, String reason, boolean remote) { - - // The codecodes are documented in class org.java_websocket.framing.CloseFrame - System.out.println("Connection closed by " + (remote ? "remote peer" : "us")); - System.out.println("reason= " + reason); - } - - @Override - public void onError(Exception ex) { - - ex.printStackTrace(); - // if the error is fatal then onClose will be called additionally - } - - public static void main(String[] args) throws URISyntaxException { - - // ExampleClient c = new ExampleClient(new URI("ws://websocket.mtgox.com:80/mtgox?Currency=EUR&Channel=dbf1dee9-4f2e-4a08-8cb7-748919a71b21"), new Draft_10()); // more about drafts here: - ExampleClient c = new ExampleClient(new URI("ws://websocket.mtgox.com:80/mtgox?Currency=EUR"), new Draft_10()); // more about drafts here: - // http://github.com/TooTallNate/Java-WebSocket/wiki/Drafts - c.connect(); - } - -} \ No newline at end of file diff --git a/xchange-core/src/test/resources/logback.xml b/xchange-core/src/test/resources/logback.xml deleted file mode 100644 index 34382245a..000000000 --- a/xchange-core/src/test/resources/logback.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - %d{HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{36} - %msg %xEx%n - - - - - - - log/xchange-detail.log - - - - log/xchange-detail-%d{yyyy-MM-dd}.%i.log.gz - - - 100MB - - 7 - - - - - %d{HH:mm:ss.SSS} ${HOSTNAME} [%thread] %-5level %logger{36} - - %msg %xEx%n - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xchange-core/src/test/resources/marketdata/example-ticker.json b/xchange-core/src/test/resources/marketdata/example-ticker.json deleted file mode 100644 index ffc53f178..000000000 --- a/xchange-core/src/test/resources/marketdata/example-ticker.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "last":"12345", - "volume":"34567" -} diff --git a/xchange-core/src/test/resources/text/example-httpdata.txt b/xchange-core/src/test/resources/text/example-httpdata.txt deleted file mode 100644 index 94ddf2f61..000000000 --- a/xchange-core/src/test/resources/text/example-httpdata.txt +++ /dev/null @@ -1 +0,0 @@ -Test data \ No newline at end of file diff --git a/xchange-core/src/test/resources/trade/example-accountinfo-data.json b/xchange-core/src/test/resources/trade/example-accountinfo-data.json deleted file mode 100644 index 46204cb87..000000000 --- a/xchange-core/src/test/resources/trade/example-accountinfo-data.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "username":"test", - "currency":"BTC", - "amount_int":"123456" - -} diff --git a/xchange-core/src/test/resources/utils/example-ticker-streaming-data.json b/xchange-core/src/test/resources/utils/example-ticker-streaming-data.json deleted file mode 100644 index af49cd31f..000000000 --- a/xchange-core/src/test/resources/utils/example-ticker-streaming-data.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "ticker":{ - "vol":{ - "value_int":"1547500497509", - "value":"15475.00497509", - "display":"15,475.00497509 BTC", - "display_short":"15,475.00 BTC", - "currency":"BTC" - }, - "vwap":{ - "value_int":"509838", - "value":"5.09838", - "display":"$5.09838", - "display_short":"$5.10", - "currency":"USD" - }, - "last":{ - "value_int":"510991", - "value":"5.10991", - "display":"$5.10991", - "display_short":"$5.11", - "currency":"USD" - }, - "sell":{ - "value_int":"511000", - "value":"5.11000", - "display":"$5.11000", - "display_short":"$5.11", - "currency":"USD" - }, - "buy":{ - "value_int":"510991", - "value":"5.10991", - "display":"$5.10991", - "display_short":"$5.11", - "currency":"USD" - }, - "last_orig":{ - "value_int":"510991", - "value":"5.10991", - "display":"$5.10991", - "display_short":"$5.11", - "currency":"USD" - }, - "last_all":{ - "value_int":"510991", - "value":"5.10991", - "display":"$5.10991", - "display_short":"$5.11", - "currency":"USD" - }, - "high":{ - "value_int":"512500", - "value":"5.12500", - "display":"$5.12500", - "display_short":"$5.13", - "currency":"USD" - }, - "last_local":{ - "value_int":"510991", - "value":"5.10991", - "display":"$5.10991", - "display_short":"$5.11", - "currency":"USD" - }, - "avg":{ - "value_int":"509888", - "value":"5.09888", - "display":"$5.09888", - "display_short":"$5.10", - "currency":"USD" - }, - "low":{ - "value_int":"507000", - "value":"5.07000", - "display":"$5.07000", - "display_short":"$5.07", - "currency":"USD" - } - }, - "op":"private", - "origin":"broadcast", - "channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f", - "private":"ticker" -} \ No newline at end of file diff --git a/xchange-examples/pom.xml b/xchange-examples/pom.xml deleted file mode 100644 index d77091762..000000000 --- a/xchange-examples/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - 4.0.0 - - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-examples - - XChange Examples - Provides a set of examples that demonstrate how to use XChange in client applications - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - com.xeiam.xchange - xchange-mtgox - 1.6.1-SNAPSHOT - - - - com.xeiam.xchange - xchange-cavirtex - 1.6.1-SNAPSHOT - - - - com.xeiam.xchange - xchange-openexchangerates - 1.6.1-SNAPSHOT - - - - com.xeiam.xchange - xchange-btce - 1.6.1-SNAPSHOT - - - - com.xeiam.xchange - xchange-bitstamp - 1.6.1-SNAPSHOT - - - - com.xeiam.xchange - xchange-campbx - 1.6.1-SNAPSHOT - - - - com.xeiam.xchange - xchange-bitcoincharts - 1.6.1-SNAPSHOT - - - - ch.qos.logback - logback-classic - runtime - - - - com.xeiam.xchart - xchart - - - - - diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemo.java deleted file mode 100644 index 075f93f5c..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemo.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitcoincharts; - -import com.xeiam.xchange.bitcoincharts.BitcoinCharts; -import com.xeiam.xchange.bitcoincharts.BitcoinChartsFactory; -import com.xeiam.xchange.bitcoincharts.dto.marketdata.BitcoinChartsTicker; - -/** - * Demonstrates using the REST proxy to get the raw deserialized JSON object from BitcoinCharts - * - * @author timmolter - */ -public class BitcoinChartsRawDataDemo { - - public static void main(String[] args) { - - BitcoinCharts bitcoinCharts = BitcoinChartsFactory.createInstance(); - BitcoinChartsTicker[] marketData = bitcoinCharts.getMarketData(); - for (BitcoinChartsTicker data : marketData) { - System.out.println(data.getSymbol() + ": " + data); - } - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemo.java deleted file mode 100644 index 57bc5cb65..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemo.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitcoincharts; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitcoincharts.BitcoinChartsExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demo requesting polling Ticker at BitcoinCharts - * - * @author timmolter - */ -public class BitcoinChartsTickerDemo { - - public static void main(String[] args) { - - // Use the factory to get BitcoinCharts exchange API using default settings - Exchange bitcoinChartsExchange = ExchangeFactory.INSTANCE.createExchange(BitcoinChartsExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitcoinChartsExchange.getPollingMarketDataService(); - - // Get the latest ticker data showing EUR/USD - Ticker ticker = marketDataService.getTicker("mtgoxUSD", Currencies.BTC); - - double value = ticker.getLast().getAmount().doubleValue(); - String currency = ticker.getLast().getCurrencyUnit().toString(); - System.out.println("mtgoxUSD Last: " + currency + "-" + value); - - System.out.println("mtgoxUSD Last: " + ticker.getLast().toString()); - - ticker = marketDataService.getTicker("bitstampUSD", Currencies.BTC); - System.out.println("bitstampUSD Last: " + ticker.getLast().toString()); - - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/BitstampDemoUtils.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/BitstampDemoUtils.java deleted file mode 100644 index a7e46c722..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/BitstampDemoUtils.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.bitstamp.BitstampExchange; - -/** - * @author Matija Mazi
- */ -public class BitstampDemoUtils { - - public static Exchange getExchange() { - - ExchangeSpecification exSpec = new BitstampExchange().getDefaultExchangeSpecification(); - exSpec.setUserName("34387"); - exSpec.setPassword("H?kRyaslJp44"); - - return ExchangeFactory.INSTANCE.createExchange(exSpec); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemo.java deleted file mode 100644 index 2444c26e9..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemo.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.account; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.examples.bitstamp.BitstampDemoUtils; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitstamp exchange with authentication
  • - *
  • View account balance
  • - *
  • Get the bitcoin deposit address
  • - *
- */ -public class BitstampAccountDemo { - - public static void main(String[] args) { - - Exchange bitstamp = BitstampDemoUtils.getExchange(); - - PollingAccountService accountService = bitstamp.getPollingAccountService(); - - // Get the account information - AccountInfo accountInfo = accountService.getAccountInfo(); - System.out.println("AccountInfo as String: " + accountInfo.toString()); - - String depositAddress = accountService.requestBitcoinDepositAddress(null, null); - System.out.println("Deposit address: " + depositAddress); - - String withdrawResult = accountService.withdrawFunds(new BigDecimal(1).movePointLeft(4), "1AU9vVDp5njxucauraN3G21i2Eou9gpxUW"); - System.out.println("withdrawResult = " + withdrawResult); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemo.java deleted file mode 100644 index 82fc248dd..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemo.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitstamp.BitstampExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitstamp - */ -public class FullDepthDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitstamp exchange API using default settings - Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BitstampExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitstamp.getPollingMarketDataService(); - - // Get the latest order book data for BTC/CAD - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.USD); - - System.out.println("Current Order Book size for BTC / USD: " + (orderBook.getAsks().size() + orderBook.getBids().size())); - - System.out.println("First Ask: " + orderBook.getAsks().get(0).toString()); - System.out.println("First Bid: " + orderBook.getBids().get(0).toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemo.java deleted file mode 100644 index 7b7dcd5f4..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemo.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitstamp.BitstampExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitstamp - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitstamp exchange API using default settings - Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BitstampExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitstamp.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to USD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - - System.out.println("Currency: " + Currencies.USD); - System.out.println("Last: " + ticker.getLast().toString()); - System.out.println("Volume: " + ticker.getVolume().toString()); - System.out.println("High: " + ticker.getHigh().toString()); - System.out.println("Low: " + ticker.getLow().toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemo.java deleted file mode 100644 index e4ae988c7..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemo.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.bitstamp.BitstampExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at Bitstamp - */ -public class TradesDemo { - - public static void main(String[] args) { - - // Use the factory to get Bitstamp exchange API using default settings - Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BitstampExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = bitstamp.getPollingMarketDataService(); - - // Get the latest trade data for BTC/USD - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.USD); - - System.out.println(trades.toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemo.java deleted file mode 100644 index cc4cddb7f..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemo.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.trade; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.examples.bitstamp.BitstampDemoUtils; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitstamp exchange with authentication
  • - *
  • Enter, review and cancel limit orders
  • - *
- */ -public class BitstampTradeDemo { - - public static void main(String[] args) { - - Exchange bitstamp = BitstampDemoUtils.getExchange(); - PollingTradeService tradeService = bitstamp.getPollingTradeService(); - - printOpenOrders(tradeService); - - // place a limit buy order - LimitOrder limitOrder = new LimitOrder((OrderType.BID), BigDecimal.ONE, "BTC", "USD", MoneyUtils.parse("USD 1.25")); - String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder); - System.out.println("Limit Order return value: " + limitOrderReturnValue); - - printOpenOrders(tradeService); - - // Cancel the added order - boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue); - System.out.println("Canceling returned " + cancelResult); - - printOpenOrders(tradeService); - } - - private static void printOpenOrders(PollingTradeService tradeService) { - - OpenOrders openOrders = tradeService.getOpenOrders(); - System.out.println("Open Orders: " + openOrders.toString()); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/BTCEExamplesUtils.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/BTCEExamplesUtils.java deleted file mode 100644 index cd0111358..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/BTCEExamplesUtils.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.btce.BTCEExchange; - -/** - * @author Matija Mazi - */ -public class BTCEExamplesUtils { - - public static Exchange createExchange() { - - ExchangeSpecification exSpec = new ExchangeSpecification(BTCEExchange.class); - exSpec.setSecretKey("804ace4f64b9cac6b6584f70af3ab66c8415538c8c006c8728c937d680cafece"); - exSpec.setApiKey("7A2REWZK-PVJK1CRF-374Z6J13-SO2R3EIX-EMF3OCBR"); - exSpec.setSslUri("https://btc-e.com"); - return ExchangeFactory.INSTANCE.createExchange(exSpec); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemo.java deleted file mode 100644 index eb84139c0..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemo.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Matija Mazi - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.account; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.examples.btce.BTCEExamplesUtils; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - * Demo requesting account info at BTC-E - */ -public class BTCEAccountInfoDemo { - - public static void main(String[] args) { - - Exchange btce = BTCEExamplesUtils.createExchange(); - - // Interested in the private account functionality (authentication) - PollingAccountService accountService = btce.getPollingAccountService(); - - // Get the account information - AccountInfo accountInfo = accountService.getAccountInfo(); - System.out.println("BTCE AccountInfo as String: " + accountInfo.toString()); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemo.java deleted file mode 100644 index d8c590a54..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemo.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.btce.BTCEExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at BTC-E - */ -public class DepthDemo { - - public static void main(String[] args) { - - // Use the factory to get BTC-E exchange API using default settings - Exchange btce = ExchangeFactory.INSTANCE.createExchange(BTCEExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = btce.getPollingMarketDataService(); - - // Get the latest order book data for BTC/CAD - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.LTC, Currencies.RUR); - - System.out.println(orderBook.toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemo.java deleted file mode 100644 index d7998a82a..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.btce.BTCEExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at BTC-E - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get BTC-E exchange API using default settings - Exchange btce = ExchangeFactory.INSTANCE.createExchange(BTCEExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = btce.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to CAD - Ticker ticker = marketDataService.getTicker(Currencies.LTC, Currencies.USD); - double value = ticker.getLast().getAmount().doubleValue(); - String currency = ticker.getLast().getCurrencyUnit().toString(); - - System.out.println("Last: " + currency + "-" + value); - System.out.println("Last: " + ticker.getLast().toString()); - System.out.println("Volume: " + ticker.getVolume().toString()); - System.out.println("High: " + ticker.getHigh().toString()); - System.out.println("Low: " + ticker.getLow().toString()); - System.out.println("tradeable ID: " + ticker.getTradableIdentifier()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemo.java deleted file mode 100644 index db19655dc..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemo.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.btce.BTCEExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Order Book at BTC-E - */ -public class TradesDemo { - - public static void main(String[] args) { - - // Use the factory to get BTC-E exchange API using default settings - Exchange btce = ExchangeFactory.INSTANCE.createExchange(BTCEExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = btce.getPollingMarketDataService(); - - // Get the latest trade data for BTC/CAD - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.EUR); - - System.out.println(trades.toString()); - - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemo.java deleted file mode 100644 index 35a2e4f71..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemo.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.trade; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.examples.btce.BTCEExamplesUtils; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * @author Matija Mazi - */ -public class BTCETradeDemo { - - public static void main(String[] args) { - - Exchange btce = BTCEExamplesUtils.createExchange(); - PollingTradeService tradeService = btce.getPollingTradeService(); - - printOpenOrders(tradeService); - - // place a limit buy order - LimitOrder limitOrder = new LimitOrder(Order.OrderType.ASK, new BigDecimal("0.1"), "BTC", "USD", MoneyUtils.parse("USD 99.025")); - String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder); - System.out.println("Limit Order return value: " + limitOrderReturnValue); - - printOpenOrders(tradeService); - - // Cancel the added order - boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue); - System.out.println("Canceling returned " + cancelResult); - - printOpenOrders(tradeService); - } - - private static void printOpenOrders(PollingTradeService tradeService) { - - OpenOrders openOrders = tradeService.getOpenOrders(); - System.out.println("Open Orders: " + openOrders.toString()); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDataDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDataDemo.java deleted file mode 100644 index 8f3a2d863..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDataDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.campbx.account; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.campbx.CampBXExchange; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - * Demonstrate requesting Market Data from CampBX - */ -public class CampBXAccountDataDemo { - - public static void main(String[] args) { - - // Use the factory to get Campbx exchange API using default settings - Exchange campbx = ExchangeFactory.INSTANCE.createExchange(CampBXExchange.class.getName()); - - campbx.getExchangeSpecification().setUserName("XChange"); - campbx.getExchangeSpecification().setPassword("The Java API"); - - PollingAccountService accountService = campbx.getPollingAccountService(); - - AccountInfo accountInfo = accountService.getAccountInfo(); - System.out.println("accountInfo = " + accountInfo); - - String depositAddr = accountService.requestBitcoinDepositAddress(); - System.out.println("depositAddr = " + depositAddr); - - String txid = accountService.withdrawFunds(new BigDecimal("0.1"), "1FgpMU9CgQffjLK5YoR2yK5XGj5cq4iCBf"); - System.out.println("See the withdrawal transaction: http://blockchain.info/tx-index/" + txid); - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemo.java deleted file mode 100644 index 47ebff5a9..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemo.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.campbx.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.campbx.CampBXExchange; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Market Data from CampBX - */ -public class MarketDataDemo { - - public static void main(String[] args) { - - // Use the factory to get Campbx exchange API using default settings - Exchange campbx = ExchangeFactory.INSTANCE.createExchange(CampBXExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = campbx.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to USD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - - System.out.println("Last: " + ticker.getLast()); - System.out.println("Bid: " + ticker.getBid()); - System.out.println("Ask: " + ticker.getAsk()); - System.out.println("Volume: " + ticker.getVolume()); - System.out.println("High: " + ticker.getHigh()); - System.out.println("Low: " + ticker.getLow()); - - // Get the latest order book data for BTC/USD - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.USD); - - System.out.println("Order book: " + orderBook); - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemo.java deleted file mode 100644 index c6a1d1d32..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemo.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.campbx.trade; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.campbx.CampBXExchange; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Camp BX exchange with authentication
  • - *
  • Enter, review and cancel limit orders
  • - *
- */ -public class CampBXTradeDemo { - - public static void main(String[] args) { - - Exchange campbx = ExchangeFactory.INSTANCE.createExchange(CampBXExchange.class.getName()); - - ExchangeSpecification exSpec = campbx.getExchangeSpecification(); - exSpec.setUserName("XChange"); - exSpec.setPassword("The Java API"); - - PollingTradeService tradeService = campbx.getPollingTradeService(); - - printOpenOrders(tradeService); - - LimitOrder lo = new LimitOrder((OrderType.ASK), new BigDecimal("0.1"), "BTC", "USD", MoneyUtils.parse("USD 28.99")); - String rv = tradeService.placeLimitOrder(lo); - System.out.println("Limit Order return value: " + rv); - // place a limit sell order - LimitOrder limitOrder = new LimitOrder((OrderType.ASK), new BigDecimal("0.1"), "BTC", "USD", MoneyUtils.parse("USD 110")); - String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder); - System.out.println("Limit Order return value: " + limitOrderReturnValue); - - printOpenOrders(tradeService); - - // Cancel the added order - boolean cancelResult = tradeService.cancelOrder(limitOrderReturnValue); - // boolean cancelResult = tradeService.cancelOrder("Buy-1234"); - System.out.println("Canceling returned " + cancelResult); - - printOpenOrders(tradeService); - } - - private static void printOpenOrders(PollingTradeService tradeService) { - - OpenOrders openOrders = tradeService.getOpenOrders(); - System.out.println("Open Orders: " + openOrders.toString()); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemo.java deleted file mode 100644 index 4ee2bc57c..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemo.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.cavirtex.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.virtex.VirtExExchange; - -/** - * Demonstrate requesting Order Book at VirtEx - */ -public class DepthDemo { - - public static void main(String[] args) { - - // Use the factory to get the VirtEx exchange API using default settings - Exchange cavirtex = ExchangeFactory.INSTANCE.createExchange(VirtExExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = cavirtex.getPollingMarketDataService(); - - // Get the latest order book data for BTC/CAD - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.CAD); - - // System.out.println(orderBook.toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemo.java deleted file mode 100644 index a54334c6f..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemo.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.cavirtex.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.virtex.VirtExExchange; - -/** - * Demonstrate requesting Ticker at VirtEx - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get the VirtEx exchange API using default settings - Exchange cavirtex = ExchangeFactory.INSTANCE.createExchange(VirtExExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = cavirtex.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to CAD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.CAD); - double value = ticker.getLast().getAmount().doubleValue(); - String currency = ticker.getLast().getCurrencyUnit().toString(); - - System.out.println("Last: " + currency + "-" + value); - System.out.println("Last: " + ticker.getLast().toString()); - System.out.println("Volume: " + ticker.getVolume().toString()); - System.out.println("High: " + ticker.getHigh().toString()); - System.out.println("Low: " + ticker.getLow().toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemo.java deleted file mode 100644 index ec93496df..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemo.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.cavirtex.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.virtex.VirtExExchange; - -/** - * Demonstrate requesting Trades at VirtEx - */ -public class TradesDemo { - - public static void main(String[] args) { - - // Use the factory to get the VirtEx exchange API using default settings - Exchange cavirtex = ExchangeFactory.INSTANCE.createExchange(VirtExExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = cavirtex.getPollingMarketDataService(); - - // Get the latest trade data for BTC/CAD - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.CAD); - - System.out.println(trades.toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemo.java deleted file mode 100644 index 38b346d42..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemo.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright 2013 Xeiam LLC. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.xeiam.xchange.examples.charts; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collection; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchart.Chart; -import com.xeiam.xchart.Series; -import com.xeiam.xchart.SeriesMarker; -import com.xeiam.xchart.StyleManager.ChartType; -import com.xeiam.xchart.SwingWrapper; - -/** - * Demonstrates plotting an OrderBook with XChart - * - * @author timmolter - */ -public class MtGoxOrderBookChartDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGox = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public market data feed (no authentication) - PollingMarketDataService marketDataService = mtGox.getPollingMarketDataService(); - - System.out.println("fetching data..."); - - // Get the current orderbook - OrderBook orderBook = marketDataService.getPartialOrderBook(Currencies.BTC, Currencies.USD); - - System.out.println("received data."); - - System.out.println("plotting..."); - - // Create Chart - Chart chart = new Chart(800, 500); - - // Customize Chart - chart.setChartTitle("MtGox Order Book"); - chart.setYAxisTitle("BTC"); - chart.setXAxisTitle("USD"); - chart.getStyleManager().setChartType(ChartType.Area); - - // BIDS - Collection xData = new ArrayList(); - Collection yData = new ArrayList(); - BigDecimal accumulatedBidUnits = new BigDecimal("0"); - for (LimitOrder limitOrder : orderBook.getBids()) { - xData.add(limitOrder.getLimitPrice().getAmount()); - accumulatedBidUnits = accumulatedBidUnits.add(limitOrder.getTradableAmount()); - yData.add(accumulatedBidUnits); - } - - // Bids Series - Series series = chart.addSeries("bids", xData, yData); - series.setMarker(SeriesMarker.NONE); - - // ASKS - xData = new ArrayList(); - yData = new ArrayList(); - BigDecimal accumulatedAskUnits = new BigDecimal("0"); - for (LimitOrder limitOrder : orderBook.getAsks()) { - xData.add(limitOrder.getLimitPrice().getAmount()); - accumulatedAskUnits = accumulatedAskUnits.add(limitOrder.getTradableAmount()); - yData.add(accumulatedAskUnits); - } - - // Asks Series - series = chart.addSeries("asks", xData, yData); - series.setMarker(SeriesMarker.NONE); - - new SwingWrapper(chart).displayChart(); - - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/FullDepthDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/FullDepthDemo.java deleted file mode 100644 index 34400c6c6..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/FullDepthDemo.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v0.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.mtgox.v0.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Test requesting depth at MtGox - */ -public class FullDepthDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public market data feed (no authentication) - PollingMarketDataService marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get the current orderbook - OrderBook orderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.USD); - System.out.println("Current Order Book size for BTC / USD: " + (orderBook.getAsks().size() + orderBook.getBids().size())); - - System.out.println("First Ask: " + orderBook.getAsks().get(0).toString()); - System.out.println("First Bid: " + orderBook.getBids().get(0).toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TickerDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TickerDemo.java deleted file mode 100644 index 5f9d921be..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TickerDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v0.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.mtgox.v0.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Test requesting polling Ticker at MtGox - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to USD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - System.out.println(ticker.toString()); - - // Get the latest ticker data showing BTC to EUR - ticker = marketDataService.getTicker(Currencies.BTC, Currencies.EUR); - System.out.println(ticker.toString()); - - // Get the latest ticker data showing BTC to GBP - ticker = marketDataService.getTicker(Currencies.BTC, Currencies.GBP); - System.out.println(ticker.toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TradesDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TradesDemo.java deleted file mode 100644 index 2b4ea56ef..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v0/marketdata/polling/TradesDemo.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v0.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Test requesting trades at MtGox - */ -public class TradesDemo { - - private static PollingMarketDataService marketDataService; - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public market data feed (no authentication) - marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get trades - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.PLN); - System.out.println("Current trades size for BTC / PLN: " + trades.getTrades().size()); - - // Verify that trades is not null - System.out.println("Trades NOT null ? " + trades != null); - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemo.java deleted file mode 100644 index a2d15cea4..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemo.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.account; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - * Demo requesting account info at MtGox - */ -public class AccountInfoDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private account functionality (authentication) - PollingAccountService accountService = mtgox.getPollingAccountService(); - - // Get the account information - AccountInfo accountInfo = accountService.getAccountInfo(); - System.out.println("AccountInfo as String: " + accountInfo.toString()); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemo.java deleted file mode 100644 index c359eca00..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemo.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Mark van Cuijk mark@van-cuijk.nl - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.account; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - * Demo requesting account info at MtGox - */ -public class BitcoinDepositAddressDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private account functionality (authentication) - PollingAccountService accountService = mtgox.getPollingAccountService(); - - // Request a Bitcoin deposit address - String address = accountService.requestBitcoinDepositAddress("Demonstation address", null); - System.out.println("Address to deposit Bitcoins to: " + address); - } -} \ No newline at end of file diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemo.java deleted file mode 100644 index 6490bd688..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.account; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - * Demo requesting account info at MtGox - */ -public class WithdrawalFundsDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private account functionality (authentication) - PollingAccountService accountService = mtgox.getPollingAccountService(); - - System.out.println(accountService.getAccountInfo()); - - // Withdrawal transactions may be slow to appear for amounts less than 0.01, even though the API returns success. - // Change the amount to 0.01 or more to see the transaction appear in the block chain quickly. - // May be a general Bitcoin thing. - String transactionID = accountService.withdrawFunds(new BigDecimal("0.001"), "17dQktcAmU4urXz7tGk2sbuiCqykm3WLs6"); - System.out.println("transactionID= " + transactionID); - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemo.java deleted file mode 100644 index 20777ee34..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemo.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Test requesting depth at MtGox - */ -public class DepthDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public market data feed (no authentication) - PollingMarketDataService marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get the current orderbook - OrderBook orderBook = marketDataService.getPartialOrderBook(Currencies.BTC, Currencies.USD); - System.out.println("Current Order Book size for BTC / USD: " + (orderBook.getAsks().size() + orderBook.getBids().size())); - - System.out.println("First Ask: " + orderBook.getAsks().get(0).toString()); - System.out.println("First Bid: " + orderBook.getBids().get(0).toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemo.java deleted file mode 100644 index 937f6354a..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemo.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Test requesting full depth at MtGox - */ -public class FullDepthDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public market data feed (no authentication) - PollingMarketDataService marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get the current full orderbook - OrderBook fullOrderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.USD); - System.out.println("Current Full Order Book size for BTC / USD: " + fullOrderBook.getAsks().size() + fullOrderBook.getBids().size()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemo.java deleted file mode 100644 index 427542962..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemo.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connecting to Mt Gox BTC exchange
  • - *
  • Retrieving the last tick
  • - *
  • Retrieving the current order book
  • - *
  • Retrieving the current full order book
  • - *
  • Retrieving trades
  • - *
- */ -public class MtGoxMarketdataDemo { - - public static void main(String[] args) { - - // Demonstrate the public market data service - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public market data feed (no authentication) - PollingMarketDataService marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to USD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - String btcusd = ticker.getLast().toString(); - System.out.println("Current exchange rate for BTC / USD: " + btcusd); - - // Get the current orderbook - OrderBook orderBook = marketDataService.getPartialOrderBook(Currencies.BTC, Currencies.USD); - System.out.println("Current Order Book size for BTC / USD: " + orderBook.getAsks().size() + orderBook.getBids().size()); - - // Get the current full orderbook - OrderBook fullOrderBook = marketDataService.getFullOrderBook(Currencies.BTC, Currencies.USD); - System.out.println("Current Full Order Book size for BTC / USD: " + fullOrderBook.getAsks().size() + fullOrderBook.getBids().size()); - - // Get trades - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.PLN); - System.out.println("Current trades size for BTC / PLN: " + trades.getTrades().size()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemo.java deleted file mode 100644 index a2ce095f6..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Test requesting polling Ticker at MtGox - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public polling market data feed (no authentication) - PollingMarketDataService marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get the latest ticker data showing BTC to USD - Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - System.out.println(ticker.toString()); - - // Get the latest ticker data showing BTC to EUR - ticker = marketDataService.getTicker(Currencies.BTC, Currencies.EUR); - System.out.println(ticker.toString()); - - // Get the latest ticker data showing BTC to GBP - ticker = marketDataService.getTicker(Currencies.BTC, Currencies.GBP); - System.out.println(ticker.toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemo.java deleted file mode 100644 index fac8a8e95..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemo.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Test requesting trades at MtGox - */ -public class TradesDemo { - - private static PollingMarketDataService marketDataService; - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Interested in the public market data feed (no authentication) - marketDataService = mtGoxExchange.getPollingMarketDataService(); - - // Get trades - // Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.PLN); - Trades trades = marketDataService.getTrades(Currencies.BTC, Currencies.PLN, 1365502698000000L); - System.out.println("Current trades size for BTC / PLN: " + trades.getTrades().size()); - - // Verify that trades is not null - System.out.println("Trades NOT null ? " + trades != null); - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/MtGoxWebSocketMarketDataDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/MtGoxWebSocketMarketDataDemo.java deleted file mode 100644 index c72e588a3..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/MtGoxWebSocketMarketDataDemo.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.streaming; - -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.OrderBookUpdate; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.mtgox.v1.service.marketdata.streaming.MtGoxStreamingConfiguration; -import com.xeiam.xchange.service.streaming.ExchangeEvent; -import com.xeiam.xchange.service.streaming.ExchangeEventType; -import com.xeiam.xchange.service.streaming.ExchangeStreamingConfiguration; -import com.xeiam.xchange.service.streaming.StreamingExchangeService; - -/** - * Demonstrate streaming market data from the MtGox Websocket API - *

- * Note: requesting certain "channels" or specific currencies does not work. I believe this is the fault of MtGox and not XChange - */ -public class MtGoxWebSocketMarketDataDemo { - - public static void main(String[] args) throws ExecutionException, InterruptedException { - - MtGoxWebSocketMarketDataDemo streamingTickerDemo = new MtGoxWebSocketMarketDataDemo(); - streamingTickerDemo.start(); - } - - public void start() throws ExecutionException, InterruptedException { - - // Use the default MtGox settings - Exchange mtGoxExchange = ExchangeFactory.INSTANCE.createExchange(MtGoxExchange.class.getName()); - - // Configure BTC/USD ticker stream for MtGox - ExchangeStreamingConfiguration btcusdConfiguration = new MtGoxStreamingConfiguration(10, 10000, Currencies.BTC, Currencies.USD); - - // Interested in the public streaming market data feed (no authentication) - StreamingExchangeService btcusdStreamingMarketDataService = mtGoxExchange.getStreamingExchangeService(btcusdConfiguration); - - // Open the connections to the exchange - btcusdStreamingMarketDataService.connect(); - - ExecutorService executorService = Executors.newSingleThreadExecutor(); - Future mtGoxMarketDataFuture = executorService.submit(new MarketDataRunnable(btcusdStreamingMarketDataService)); - - // the thread waits here until the Runnable is done. - mtGoxMarketDataFuture.get(); - - executorService.shutdown(); - - // Disconnect and exit - System.out.println(Thread.currentThread().getName() + ": Disconnecting..."); - btcusdStreamingMarketDataService.disconnect(); - } - - /** - * Encapsulates some market data monitoring behavior - */ - class MarketDataRunnable implements Runnable { - - private final StreamingExchangeService streamingExchangeService; - - /** - * Constructor - * - * @param streamingExchangeService - */ - public MarketDataRunnable(StreamingExchangeService streamingExchangeService) { - - this.streamingExchangeService = streamingExchangeService; - } - - @Override - public void run() { - - try { - - while (true) { - - ExchangeEvent exchangeEvent = streamingExchangeService.getNextEvent(); - - if (exchangeEvent.getEventType() == ExchangeEventType.TICKER) { - Ticker ticker = (Ticker) exchangeEvent.getPayload(); - System.out.println(ticker.toString()); - } - - else if (exchangeEvent.getEventType() == ExchangeEventType.TRADE) { - Trade trade = (Trade) exchangeEvent.getPayload(); - System.out.println(trade.toString()); - } - - else if (exchangeEvent.getEventType() == ExchangeEventType.DEPTH) { - OrderBookUpdate orderBookUpdate = (OrderBookUpdate) exchangeEvent.getPayload(); - System.out.println(orderBookUpdate.toString()); - } - } - - } catch (InterruptedException e) { - System.out.println("ERROR in Runnable!!!"); - } - - } - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemo.java deleted file mode 100644 index e0a395a8a..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemo.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * Test placing a limit order at MtGox. Note that this is using the old V0 API, since at this time the V1 API has no cancel order functionality - */ -public class CancelOrderDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private trading functionality (authentication) - PollingTradeService tradeService = mtgox.getPollingTradeService(); - - boolean success = tradeService.cancelOrder("fa432315-a929-4202-a681-9a8fbd0e2549"); - System.out.println("success= " + success); - - // get open orders - OpenOrders openOrders = tradeService.getOpenOrders(); - for (LimitOrder openOrder : openOrders.getOpenOrders()) { - System.out.println(openOrder.toString()); - } - - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemo.java deleted file mode 100644 index 012edef9c..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemo.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import java.math.BigDecimal; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * Test placing a limit order at MtGox - */ -public class LimitOrderDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private trading functionality (authentication) - PollingTradeService tradeService = mtgox.getPollingTradeService(); - - // place a limit order for a random amount of BTC at USD 1.25 - OrderType orderType = (OrderType.BID); - BigDecimal tradeableAmount = new BigDecimal(Math.random()); - String tradableIdentifier = "BTC"; - String transactionCurrency = "USD"; - BigMoney limitPrice = MoneyUtils.parse("USD 1.25"); - - LimitOrder limitOrder = new LimitOrder(orderType, tradeableAmount, tradableIdentifier, transactionCurrency, limitPrice); - - String orderID = tradeService.placeLimitOrder(limitOrder); - System.out.println("Limit Order ID: " + orderID); - - // get open orders - OpenOrders openOrders = tradeService.getOpenOrders(); - for (LimitOrder openOrder : openOrders.getOpenOrders()) { - System.out.println(openOrder.toString()); - } - - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemo.java deleted file mode 100644 index 298c14205..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemo.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * Test placing a market order at MtGox - */ -public class MarketOrderDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private trading functionality (authentication) - PollingTradeService tradeService = mtgox.getPollingTradeService(); - - // place a market order for 1 Bitcoin at market price - OrderType orderType = (OrderType.BID); - BigDecimal tradeableAmount = new BigDecimal(1); - String tradableIdentifier = "BTC"; - String transactionCurrency = "USD"; - - MarketOrder marketOrder = new MarketOrder(orderType, tradeableAmount, tradableIdentifier, transactionCurrency); - - String orderID = tradeService.placeMarketOrder(marketOrder); - System.out.println("Market Order return value: " + orderID); - - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemo.java deleted file mode 100644 index 8930f1779..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemo.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import java.math.BigDecimal; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.account.polling.PollingAccountService; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connecting to Mt Gox BTC exchange with authentication
  • - *
  • Retrieving account info data
  • - *
- */ -public class MtGoxTradeDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private trading functionality (authentication) - PollingTradeService tradeService = mtgox.getPollingTradeService(); - PollingAccountService accountService = mtgox.getPollingAccountService(); - - // Get the account information - AccountInfo accountInfo = accountService.getAccountInfo(); - System.out.println("AccountInfo as String: " + accountInfo.toString()); - - // Get the open orders - OpenOrders openOrders = tradeService.getOpenOrders(); - System.out.println("Open Orders: " + openOrders.toString()); - - // place a market order - OrderType orderType = (OrderType.BID); - BigDecimal tradeableAmount = new BigDecimal(1); - String tradableIdentifier = "BTC"; - String transactionCurrency = "USD"; - - MarketOrder marketOrder = new MarketOrder(orderType, tradeableAmount, tradableIdentifier, transactionCurrency); - String marketOrderReturnValue = tradeService.placeMarketOrder(marketOrder); - System.out.println("Market Order return value: " + marketOrderReturnValue); - - // place a limit order - orderType = (OrderType.BID); - tradeableAmount = new BigDecimal(Math.random()); - tradableIdentifier = "BTC"; - transactionCurrency = "USD"; - BigMoney limitPrice = MoneyUtils.parse("USD 1.25"); - - LimitOrder limitOrder = new LimitOrder(orderType, tradeableAmount, tradableIdentifier, transactionCurrency, limitPrice); - String limitOrderReturnValue = tradeService.placeLimitOrder(limitOrder); - System.out.println("Limit Order return value: " + limitOrderReturnValue); - - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemo.java deleted file mode 100644 index bae9fb1b8..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemo.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import java.math.BigDecimal; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.account.polling.PollingAccountService; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connecting to Mt Gox BTC exchange with authentication
  • - *
  • Retrieving account info data
  • - *
- */ -public class MtGoxWithdrawDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - PollingAccountService accountService = mtgox.getPollingAccountService(); - System.out.println(accountService.getAccountInfo()); - - String withdrawResult = accountService.withdrawFunds(new BigDecimal(1).movePointLeft(2), "1Mh5brotRiiLYbbA1vqRDMNKgjSxoxLevi"); - System.out.println("withdrawResult = " + withdrawResult); - } -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemo.java deleted file mode 100644 index d0f60a4f8..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemo.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.mtgox.v1.MtGoxExchange; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; - -/** - * Test requesting all open orders at MtGox - */ -public class OpenOrdersDemo { - - public static void main(String[] args) { - - // Use the factory to get the version 1 MtGox exchange API using default settings - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(MtGoxExchange.class.getName()); - exchangeSpecification.setApiKey("150c6db9-e5ab-47ac-83d6-4440d1b9ce49"); - exchangeSpecification.setSecretKey("olHM/yl3CAuKMXFS2+xlP/MC0Hs1M9snHpaHwg0UZW52Ni0Tf4FhGFELO9cHcDNGKvFrj8CgyQUA4VsMTZ6dXg=="); - exchangeSpecification.setSslUri("https://mtgox.com"); - Exchange mtgox = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the private trading functionality (authentication) - PollingTradeService tradeService = mtgox.getPollingTradeService(); - - // Get the open orders - OpenOrders openOrders = tradeService.getOpenOrders(); - System.out.println("Open Orders: " + openOrders.toString()); - - } - -} diff --git a/xchange-examples/src/main/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemo.java b/xchange-examples/src/main/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemo.java deleted file mode 100644 index 5eea45a43..000000000 --- a/xchange-examples/src/main/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemo.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.openexchangerates.marketdata; - -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeFactory; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.oer.OERExchange; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; - -/** - * Demonstrate requesting Ticker at Open Exchange Rates - */ -public class TickerDemo { - - public static void main(String[] args) { - - // Use the factory to get the Open Exchange Rates exchange API - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(OERExchange.class.getName()); - exchangeSpecification.setPlainTextUri("http://openexchangerates.org"); - exchangeSpecification.setApiKey("ab32c922bca749ec9345b4717914ee1f"); - Exchange openExchangeRates = ExchangeFactory.INSTANCE.createExchange(exchangeSpecification); - - // Interested in the polling market data feed - PollingMarketDataService marketDataService = openExchangeRates.getPollingMarketDataService(); - - // Get the latest ticker data showing EUR/USD - Ticker ticker = marketDataService.getTicker(Currencies.EUR, Currencies.USD); - System.out.println("Last: " + ticker.getLast().toString()); - - // Alternate way to print out ticker currency and amount - double value = ticker.getLast().getAmount().doubleValue(); - String currency = ticker.getLast().getCurrencyUnit().toString(); - System.out.println("Last: " + currency + "-" + value); - - // Request another ticker. it will return a cached object - ticker = marketDataService.getTicker(Currencies.JPY, Currencies.USD); - System.out.println("cached Last: " + ticker.getLast().toString()); - - // Request BTC ticker. it will return a cached object - ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD); - System.out.println("cached Last: " + ticker.getLast().toString()); - - } - -} diff --git a/xchange-examples/src/main/resources/logback.xml b/xchange-examples/src/main/resources/logback.xml deleted file mode 100644 index 11744db98..000000000 --- a/xchange-examples/src/main/resources/logback.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - %d{HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{36} - %msg %xEx%n - - - - - - - log/xchange-detail.log - - - - log/xchange-detail-%d{yyyy-MM-dd}.%i.log.gz - - - 100MB - - 7 - - - - %d{HH:mm:ss.SSS} ${HOSTNAME} [%thread] %-5level %logger{36} - %msg %xEx%n - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemoTest.java deleted file mode 100644 index 41de76f4f..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsRawDataDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitcoincharts; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrates using the REST proxy to get the raw deserialized JSON object from BitcoinCharts - * - * @author timmolter - */ -@Category(OnlineTest.class) -public class BitcoinChartsRawDataDemoTest { - - @Test - public void testMain() throws Exception { - - com.xeiam.xchange.examples.bitcoincharts.BitcoinChartsRawDataDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemoTest.java deleted file mode 100644 index dcb860ff4..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitcoincharts/BitcoinChartsTickerDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitcoincharts; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demo requesting polling Ticker at BitcoinCharts - * - * @author timmolter - */ -@Category(OnlineTest.class) -public class BitcoinChartsTickerDemoTest { - - @Test - public void testMain() throws Exception { - - BitcoinChartsTickerDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemoTest.java deleted file mode 100644 index c7d49784d..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/account/BitstampAccountDemoTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.account; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitstamp exchange with authentication
  • - *
  • View account balance
  • - *
  • Get the bitcoin deposit address
  • - *
- */ -@Category(OnlineTest.class) -public class BitstampAccountDemoTest { - - @Test - public void testMain() throws Exception { - - BitstampAccountDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemoTest.java deleted file mode 100644 index a5d05cf6f..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/FullDepthDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at Bitstamp - */ -@Category(OnlineTest.class) -public class FullDepthDemoTest { - - @Test - public void testMain() throws Exception { - - FullDepthDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemoTest.java deleted file mode 100644 index 7b96e461a..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TickerDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at Bitstamp - */ -@Category(OnlineTest.class) -public class TickerDemoTest { - - @Test - public void testMain() throws Exception { - - TickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemoTest.java deleted file mode 100644 index cdbc452aa..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/marketdata/TradesDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at Bitstamp - */ -@Category(OnlineTest.class) -public class TradesDemoTest { - - @Test - public void testMain() throws Exception { - - TradesDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemoTest.java deleted file mode 100644 index 40f4f08d7..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/bitstamp/trade/BitstampTradeDemoTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.bitstamp.trade; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -@Category(OnlineTest.class) -public class BitstampTradeDemoTest { - - @Test - public void testMain() throws Exception { - - BitstampTradeDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemoTest.java deleted file mode 100644 index 65e6e0257..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/account/BTCEAccountInfoDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.account; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demo requesting account info at BTC-E - */ - -@Category(OnlineTest.class) -public class BTCEAccountInfoDemoTest { - - @Test - public void testMain() throws Exception { - - BTCEAccountInfoDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemoTest.java deleted file mode 100644 index 53764becf..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/DepthDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at BTC-E - */ - -@Category(OnlineTest.class) -public class DepthDemoTest { - - @Test - public void testMain() throws Exception { - - DepthDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemoTest.java deleted file mode 100644 index d09858b9e..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TickerDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at BTC-E - */ - -@Category(OnlineTest.class) -public class TickerDemoTest { - - @Test - public void testMain() throws Exception { - - TickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemoTest.java deleted file mode 100644 index 4847e9c6a..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/marketdata/TradesDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at BTC-E - */ - -@Category(OnlineTest.class) -public class TradesDemoTest { - - @Test - public void testMain() throws Exception { - - TradesDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemoTest.java deleted file mode 100644 index e68eea532..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/btce/trade/BTCETradeDemoTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.btce.trade; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * @author Matija Mazi - */ -@Category(OnlineTest.class) -public class BTCETradeDemoTest { - - @Test - public void testMain() throws Exception { - - BTCETradeDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDemoTest.java deleted file mode 100644 index b6c5e1e29..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/account/CampBXAccountDemoTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.campbx.account; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connect to Bitstamp exchange with authentication
  • - *
  • View account balance
  • - *
  • Get the bitcoin deposit address
  • - *
- */ -@Category(OnlineTest.class) -public class CampBXAccountDemoTest { - - @Test - public void testMain() throws Exception { - - CampBXAccountDataDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemoTest.java deleted file mode 100644 index 21f0b5372..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/marketdata/MarketDataDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.campbx.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Market Data from CampBX - */ - -@Category(OnlineTest.class) -public class MarketDataDemoTest { - - @Test - public void testMain() throws Exception { - - MarketDataDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemoTest.java deleted file mode 100644 index c0bf42878..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/campbx/trade/CampBXTradeDemoTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.campbx.trade; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -@Category(OnlineTest.class) -public class CampBXTradeDemoTest { - - @Test - public void testMain() throws Exception { - - CampBXTradeDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemoTest.java deleted file mode 100644 index 2676717ab..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/DepthDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.cavirtex.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Order Book at VirtEx - */ - -@Category(OnlineTest.class) -public class DepthDemoTest { - - @Test - public void testMain() throws Exception { - - DepthDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemoTest.java deleted file mode 100644 index c1431cba5..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TickerDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.cavirtex.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Ticker at VirtEx - */ - -@Category(OnlineTest.class) -public class TickerDemoTest { - - @Test - public void testMain() throws Exception { - - TickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemoTest.java deleted file mode 100644 index 5bd7d442e..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/cavirtex/marketdata/TradesDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.cavirtex.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Trades at VirtEx - */ - -@Category(OnlineTest.class) -public class TradesDemoTest { - - @Test - public void testMain() throws Exception { - - TradesDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemoTest.java deleted file mode 100644 index 53a2c91de..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/charts/MtGoxOrderBookChartDemoTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.charts; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrates plotting an OrderBook with XChart - * - * @author timmolter - */ - -@Category(OnlineTest.class) -public class MtGoxOrderBookChartDemoTest { - - @Test - public void testMain() throws Exception { - - MtGoxOrderBookChartDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemoTest.java deleted file mode 100644 index 2c280d742..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/AccountInfoDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.account; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demo requesting account info at MtGox - */ - -@Category(OnlineTest.class) -public class AccountInfoDemoTest { - - @Test - public void testMain() throws Exception { - - AccountInfoDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemoTest.java deleted file mode 100644 index e25d22791..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/BitcoinDepositAddressDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.account; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demo requesting account info at MtGox - */ - -@Category(OnlineTest.class) -public class BitcoinDepositAddressDemoTest { - - @Test - public void testMain() throws Exception { - - BitcoinDepositAddressDemo.main(new String[] {}); - } -} \ No newline at end of file diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemoTest.java deleted file mode 100644 index f439561b2..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/account/WithdrawalFundsDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.account; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demo requesting account info at MtGox - */ - -@Category(OnlineTest.class) -public class WithdrawalFundsDemoTest { - - @Test - public void testMain() throws Exception { - - WithdrawalFundsDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemoTest.java deleted file mode 100644 index fa70bfa6f..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/DepthDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Test requesting depth at MtGox - */ -@Category(OnlineTest.class) -public class DepthDemoTest { - - @Test - public void testMain() throws Exception { - - DepthDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemoTest.java deleted file mode 100644 index 626dad9e9..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/FullDepthDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Test requesting full depth at MtGox - */ -@Category(OnlineTest.class) -public class FullDepthDemoTest { - - @Test - public void testMain() throws Exception { - - FullDepthDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemoTest.java deleted file mode 100644 index 08bae6556..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/MtGoxMarketdataDemoTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -@Category(OnlineTest.class) -public class MtGoxMarketdataDemoTest { - - @Test - public void testMain() throws Exception { - - MtGoxMarketdataDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemoTest.java deleted file mode 100644 index ac9c52ddc..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TickerDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Test requesting polling Ticker at MtGox - */ -@Category(OnlineTest.class) -public class TickerDemoTest { - - @Test - public void testMain() throws Exception { - - TickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemoTest.java deleted file mode 100644 index 023aad478..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/polling/TradesDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Test requesting trades at MtGox - */ -@Category(OnlineTest.class) -public class TradesDemoTest { - - @Test - public void testMain() throws Exception { - - TradesDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/StreamingTickerDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/StreamingTickerDemoTest.java deleted file mode 100644 index c43bda0a6..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/marketdata/streaming/StreamingTickerDemoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.marketdata.streaming; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Test requesting streaming Ticker at MtGox - */ -@Category(OnlineTest.class) -public class StreamingTickerDemoTest { - - @Test - public void testMain() throws Exception { - - // MtGoxStreamingTickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemoTest.java deleted file mode 100644 index 34d8ac314..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/CancelOrderDemoTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -@Category(OnlineTest.class) -public class CancelOrderDemoTest { - - @Test - public void testMain() throws Exception { - - CancelOrderDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemoTest.java deleted file mode 100644 index 7ed1029cf..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/LimitOrderDemoTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -@Category(OnlineTest.class) -public class LimitOrderDemoTest { - - @Test - public void testMain() throws Exception { - - LimitOrderDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemoTest.java deleted file mode 100644 index 680fa776f..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MarketOrderDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Test placing a market order at MtGox - */ - -@Category(OnlineTest.class) -public class MarketOrderDemoTest { - - @Test - public void testMain() throws Exception { - - MarketOrderDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemoTest.java deleted file mode 100644 index d5985e4d8..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxTradeDemoTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connecting to Mt Gox BTC exchange with authentication
  • - *
  • Retrieving account info data
  • - *
- */ - -@Category(OnlineTest.class) -public class MtGoxTradeDemoTest { - - @Test - public void testMain() throws Exception { - - MtGoxTradeDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemoTest.java deleted file mode 100644 index 42652ab83..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/MtGoxWithdrawDemoTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - *

- * Example showing the following: - *

- *
    - *
  • Connecting to Mt Gox BTC exchange with authentication
  • - *
  • Retrieving account info data
  • - *
- */ - -@Category(OnlineTest.class) -public class MtGoxWithdrawDemoTest { - - @Test - public void testMain() throws Exception { - - MtGoxWithdrawDemo.main(new String[] {}); - } -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemoTest.java deleted file mode 100644 index 691ee18cb..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/mtgox/v1/service/trade/polling/OpenOrdersDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.mtgox.v1.service.trade.polling; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Test requesting all open orders at MtGox - */ - -@Category(OnlineTest.class) -public class OpenOrdersDemoTest { - - @Test - public void testMain() throws Exception { - - OpenOrdersDemo.main(new String[] {}); - } - -} diff --git a/xchange-examples/src/test/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemoTest.java b/xchange-examples/src/test/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemoTest.java deleted file mode 100644 index b0e539cef..000000000 --- a/xchange-examples/src/test/java/com/xeiam/xchange/examples/openexchangerates/marketdata/TickerDemoTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2013 Matija Mazi - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.examples.openexchangerates.marketdata; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import com.xeiam.xchange.OnlineTest; - -/** - * Demonstrate requesting Ticker at Open Exchange Rates - */ - -@Category(OnlineTest.class) -public class TickerDemoTest { - - @Test - public void testMain() throws Exception { - - TickerDemo.main(new String[] {}); - } - -} diff --git a/xchange-mtgox/api-specification.txt b/xchange-mtgox/api-specification.txt deleted file mode 100644 index e80c123e0..000000000 --- a/xchange-mtgox/api-specification.txt +++ /dev/null @@ -1,13 +0,0 @@ -MtGox API specification -================================ - -Full Depth ------- -According to https://en.bitcoin.it/wiki/MtGox/API/HTTP/v1: WARNING : since this is a big download, there is a rate limit on how often you can get it, limit your requests to 5 / hour or you could be dropped / banned. - -Bitcoin deposit address ------- -https://mtgox.com/api/1/generic/bitcoin/address -optional parameters : -description : a description for the address , a new description will generate a new address -ipn : an URL that will be pinged when this new address receives a transaction, the ping is a POST request with txid, blockid, description . . . as parameters \ No newline at end of file diff --git a/xchange-mtgox/pom.xml b/xchange-mtgox/pom.xml deleted file mode 100644 index 9750fcea7..000000000 --- a/xchange-mtgox/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-mtgox - 1.6.1-SNAPSHOT - - MtGox Exchange - XChange implementations for the MtGox Exchange. - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/MtGoxUtils.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/MtGoxUtils.java deleted file mode 100644 index c62c6dc44..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/MtGoxUtils.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox; - -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import java.net.URLEncoder; -import java.util.Arrays; -import java.util.List; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.currency.MoneyUtils; - -/** - * A central place for shared Mt Gox properties - */ -public final class MtGoxUtils { - - /** - * private Constructor - */ - private MtGoxUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - CurrencyPair.BTC_USD, - - CurrencyPair.BTC_EUR, - - CurrencyPair.BTC_GBP, - - CurrencyPair.BTC_AUD, - - CurrencyPair.BTC_CAD, - - CurrencyPair.BTC_CHF, - - CurrencyPair.BTC_JPY, - - CurrencyPair.BTC_CNY, - - CurrencyPair.BTC_DKK, - - CurrencyPair.BTC_HKD, - - CurrencyPair.BTC_NZD, - - CurrencyPair.BTC_PLN, - - CurrencyPair.BTC_RUB, - - CurrencyPair.BTC_SEK, - - CurrencyPair.BTC_SGD, - - CurrencyPair.BTC_THB - - ); - - /** - *

- * According to Mt.Gox API docs (https://en.bitcoin.it/wiki/MtGox/API), data is cached for 10 seconds. - *

- */ - public static final int REFRESH_RATE = 10; // [seconds] - - public static final int BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR = 100000000; - - public static final int PRICE_INT_2_DECIMAL_FACTOR = 100000; - - public static final int JPY_PRICE_INT_2_DECIMAL_FACTOR = 1000; - - /** - * Converts a price in decimal form to a properly scaled int-String for Mt Gox - * - * @param price - * @return - */ - public static String getPriceString(BigMoney price) { - - if (!price.getCurrencyUnit().toString().equals("JPY")) { - return price.getAmount().multiply(new BigDecimal(MtGoxUtils.PRICE_INT_2_DECIMAL_FACTOR)).stripTrailingZeros().toPlainString(); - } else { // JPY - return price.getAmount().multiply(new BigDecimal(MtGoxUtils.JPY_PRICE_INT_2_DECIMAL_FACTOR)).stripTrailingZeros().toPlainString(); - } - } - - /** - * Converts a currency and long price into a BigMoney Object - * - * @param currency - * @param price - * @return - */ - public static BigMoney getPrice(String currency, long price) { - - if (!currency.equals("JPY")) { - - return MoneyUtils.parse(currency + " " + new BigDecimal(price).divide(new BigDecimal(MtGoxUtils.PRICE_INT_2_DECIMAL_FACTOR))); - } else { // JPY - return MoneyUtils.parse(currency + " " + new BigDecimal(price).divide(new BigDecimal(MtGoxUtils.JPY_PRICE_INT_2_DECIMAL_FACTOR))); - } - } - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - - public static String urlEncode(String str) { - - try { - return URLEncoder.encode(str, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException("Problem encoding, probably bug in code.", e); - } - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxAdapters.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxAdapters.java deleted file mode 100644 index 84a5a2833..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxAdapters.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.mtgox.MtGoxUtils; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTrades; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Various adapters for converting from MtGox DTOs to XChange DTOs - */ -public final class MtGoxAdapters { - - /** - * private Constructor - */ - private MtGoxAdapters() { - - } - - /** - * Adapts a MtGoxOrder to a LimitOrder - * - * @param amount The amount - * @param price The price - * @param currency The currency - * @param orderTypeString The order type (e.g. "bid") - * @param id The id - * @return A generic limit order - */ - public static LimitOrder adaptOrder(BigDecimal amount, BigDecimal price, String currency, String orderTypeString, String id) { - - // place a limit order - OrderType orderType = orderTypeString.equalsIgnoreCase("bid") ? OrderType.BID : OrderType.ASK; - String tradableIdentifier = Currencies.BTC; - BigMoney limitPrice = MoneyUtils.parse(currency + " " + price); - - return new LimitOrder(orderType, amount, tradableIdentifier, currency, id, limitPrice); - - } - - /** - * Adapts a List of mtgoxOrders to a List of LimitOrders - * - * @param mtgoxOrders The MtGox orders - * @param currency The currency - * @param orderType The order type - * @param id The id - * @return A collection of limit orders - */ - public static List adaptOrders(List mtgoxOrders, String currency, String orderType, String id) { - - List limitOrders = new ArrayList(); - - if (mtgoxOrders == null) { - return limitOrders; - } - - for (BigDecimal[] mtgoxOrder : mtgoxOrders) { - limitOrders.add(adaptOrder(mtgoxOrder[1], mtgoxOrder[0], currency, orderType, id)); - } - - return limitOrders; - } - - /** - * Adapts a MtGoxTrade to a Trade Object - * - * @param mtGoxTrade A MtGox trade - * @return A generic trade - */ - public static Trade adaptTrade(MtGoxTrades mtGoxTrade) { - - OrderType orderType = mtGoxTrade.getTrade_type().equals("bid") ? OrderType.BID : OrderType.ASK; - BigDecimal amount = new BigDecimal(mtGoxTrade.getAmount_int()).divide(new BigDecimal(MtGoxUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)); - String tradableIdentifier = mtGoxTrade.getItem(); - String transactionCurrency = mtGoxTrade.getPrice_currency(); - BigMoney price = MtGoxUtils.getPrice(transactionCurrency, mtGoxTrade.getPrice_int()); - - Date dateTime = DateUtils.fromMillisUtc(mtGoxTrade.getDate() * 1000L); - - return new Trade(orderType, amount, tradableIdentifier, transactionCurrency, price, dateTime); - } - - /** - * Adapts a MtGoxTrade[] to a Trades Object - * - * @param mtGoxTrades MtGox trades - * @return A collection of trades - */ - public static Trades adaptTrades(MtGoxTrades[] mtGoxTrades) { - - List tradesList = new ArrayList(); - - if (mtGoxTrades == null) { - return new Trades(tradesList); - } - - for (MtGoxTrades mtGoxTrade : mtGoxTrades) { - - tradesList.add(adaptTrade(mtGoxTrade)); - } - return new Trades(tradesList); - } - - /** - * @param mtGoxTicker The MtGox ticker - * @param tradeableIdentifier The tradeable identifier (e.g. BTC in BTC/USD) - * @param currency The currency (e.g. USD in BTC/USD) - * @return A generic Ticker - */ - public static Ticker adaptTicker(MtGoxTicker mtGoxTicker, String tradeableIdentifier, String currency) { - - BigMoney last = MoneyUtils.parse(currency + " " + mtGoxTicker.getTicker().getLast()); - BigMoney bid = MoneyUtils.parse(currency + " " + mtGoxTicker.getTicker().getBuy()); - BigMoney ask = MoneyUtils.parse(currency + " " + mtGoxTicker.getTicker().getSell()); - BigMoney high = MoneyUtils.parse(currency + " " + mtGoxTicker.getTicker().getHigh()); - BigMoney low = MoneyUtils.parse(currency + " " + mtGoxTicker.getTicker().getLow()); - BigDecimal volume = mtGoxTicker.getTicker().getVol(); - - return TickerBuilder.newInstance().withTradableIdentifier(tradeableIdentifier).withLast(last).withBid(bid).withAsk(ask).withHigh(high).withLow(low).withVolume(volume).build(); - - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxExchange.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxExchange.java deleted file mode 100644 index b7e7fc4c9..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxExchange.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.mtgox.v0.service.marketdata.polling.MtGoxPollingMarketDataService; - -/** - *

- * Exchange implementation to provide the following to applications: - *

- *
    - *
  • A wrapper for the MtGox exchange API
  • - *
- */ -public class MtGoxExchange extends BaseExchange implements Exchange { - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new MtGoxPollingMarketDataService(exchangeSpecification); - } - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://data.mtgox.com"); - exchangeSpecification.setPlainTextUri("http://data.mtgox.com"); - exchangeSpecification.setHost("mtgox.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("MtGox"); - exchangeSpecification.setExchangeDescription("MtGox is a Bitcoin exchange registered in Japan."); - - return exchangeSpecification; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxV0.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxV0.java deleted file mode 100644 index 86fe0bbf2..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/MtGoxV0.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0; - -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -import si.mazi.rescu.ParamsDigest; - -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxDepth; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTrades; -import com.xeiam.xchange.mtgox.v0.dto.trade.MtGoxCancelOrder; - -/** - * @author timmolter - */ -@Path("api/0") -public interface MtGoxV0 { - - @GET - @Path("data/getDepth.php?Currency={currency}") - MtGoxDepth getFullDepth(@PathParam("currency") String currency); - - @GET - @Path("data/ticker.php?Currency={currency}") - MtGoxTicker getTicker(@PathParam("currency") String currency); - - @GET - @Path("data/getTrades.php?Currency={currency}") - MtGoxTrades[] getTrades(@PathParam("currency") String currency); - - @POST - @Path("cancelOrder.php") - MtGoxCancelOrder cancelOrder(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") long nonce, @FormParam("oid") String orderId); - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxDepth.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxDepth.java deleted file mode 100644 index 04e528ce3..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxDepth.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * Copyright (C) 2012 - 2013 Michael Lagace - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing depth from Mt Gox - */ -public final class MtGoxDepth { - - private final List asks; - private final List bids; - - /** - * Constructor - * - * @param asks - * @param bids - */ - public MtGoxDepth(@JsonProperty("asks") List asks, @JsonProperty("bids") List bids) { - - this.asks = asks; - this.bids = bids; - } - - public List getAsks() { - - return asks; - } - - public List getBids() { - - return bids; - } - - @Override - public String toString() { - - return "MtGoxDepth [asks=" + asks.toString() + ", bids=" + bids.toString() + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTicker.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTicker.java deleted file mode 100644 index 6b1c64f29..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTicker.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * Copyright (C) 2012 - 2013 Michael Lagace - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class MtGoxTicker { - - private Ticker ticker; - - /** - * Constructor - * - * @param ticker - */ - public MtGoxTicker(@JsonProperty("ticker") Ticker ticker) { - - this.ticker = ticker; - } - - public Ticker getTicker() { - - return ticker; - } - - @Override - public String toString() { - - return "MtGoxTicker [ticker=" + ticker.toString() + "]"; - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTrades.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTrades.java deleted file mode 100644 index 75a22f9ca..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/MtGoxTrades.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * Copyright (C) 2012 - 2013 Michael Lagace - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class MtGoxTrades { - - private BigDecimal amount; - private long amount_int; - private long date; - private String item; - private BigDecimal price; - private String price_currency; - private long price_int; - private long tid; - private String trade_type; - - /** - * Constructor - * - * @param amount - * @param amountInt - * @param date - * @param item - * @param price - * @param priceCurrency - * @param priceInt - * @param tid - * @param tradeType - */ - public MtGoxTrades(@JsonProperty("amount") BigDecimal amount, @JsonProperty("amount_int") long amountInt, @JsonProperty("date") long date, @JsonProperty("item") String item, - @JsonProperty("price") BigDecimal price, @JsonProperty("price_currency") String priceCurrency, @JsonProperty("price_int") long priceInt, @JsonProperty("tid") long tid, - @JsonProperty("trade_type") String tradeType) { - - this.amount = amount; - this.amount_int = amountInt; - this.date = date; - this.item = item; - this.price = price; - this.price_currency = priceCurrency; - this.price_int = priceInt; - this.tid = tid; - this.trade_type = tradeType; - } - - public BigDecimal getAmount() { - - return this.amount; - } - - public long getAmount_int() { - - return this.amount_int; - } - - public long getDate() { - - return this.date; - } - - public String getItem() { - - return this.item; - } - - public BigDecimal getPrice() { - - return this.price; - } - - public String getPrice_currency() { - - return this.price_currency; - } - - public long getPrice_int() { - - return this.price_int; - } - - public long getTid() { - - return this.tid; - } - - public String getTrade_type() { - - return this.trade_type; - } - - public void setTrade_type(String trade_type) { - - this.trade_type = trade_type; - } - - @Override - public String toString() { - - return "MtGoxTrade [amount=" + amount + ", date=" + date + ", item=" + item + ", price=" + price + ", tid=" + tid + "]"; - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/Ticker.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/Ticker.java deleted file mode 100644 index c68dd1ea4..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/marketdata/Ticker.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * Copyright (C) 2012 - 2013 Michael Lagace - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Ticker { - - private BigDecimal avg; - private BigDecimal buy; - private BigDecimal high; - private BigDecimal last; - private BigDecimal last_all; - private BigDecimal last_local; - private BigDecimal low; - private BigDecimal sell; - private BigDecimal vol; - private BigDecimal vwap; - - /** - * Constructor - * - * @param high - * @param low - * @param avg - * @param vwap - * @param vol - * @param last_local - * @param last - * @param last_all - * @param buy - * @param sell - */ - public Ticker(@JsonProperty("high") BigDecimal high, @JsonProperty("low") BigDecimal low, @JsonProperty("avg") BigDecimal avg, @JsonProperty("vwap") BigDecimal vwap, - @JsonProperty("vol") BigDecimal vol, @JsonProperty("last_local") BigDecimal last_local, @JsonProperty("last") BigDecimal last, @JsonProperty("last_all") BigDecimal last_all, - @JsonProperty("buy") BigDecimal buy, @JsonProperty("sell") BigDecimal sell) { - - this.high = high; - this.low = low; - this.avg = avg; - this.vwap = vwap; - this.vol = vol; - this.last_local = last_local; - this.last = last; - this.last_all = last_all; - this.buy = buy; - this.sell = sell; - } - - public BigDecimal getAvg() { - - return this.avg; - } - - public BigDecimal getBuy() { - - return this.buy; - } - - public BigDecimal getHigh() { - - return this.high; - } - - public BigDecimal getLast() { - - return this.last; - } - - public BigDecimal getLast_all() { - - return this.last_all; - } - - public BigDecimal getLast_local() { - - return this.last_local; - } - - public BigDecimal getLow() { - - return this.low; - } - - public BigDecimal getSell() { - - return this.sell; - } - - public BigDecimal getVol() { - - return this.vol; - } - - public BigDecimal getVwap() { - - return this.vwap; - } - - @Override - public String toString() { - - return "MtGoxTicker [high=" + high + ", low=" + low + ", avg=" + avg + ", vwap=" + vwap + ", vol=" + vol + ", last=" + last + ", buy=" + buy + ", sell=" + sell + "]"; - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxCancelOrder.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxCancelOrder.java deleted file mode 100644 index df1b63bfc..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxCancelOrder.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.dto.trade; - -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author timmolter - */ -public final class MtGoxCancelOrder { - - private final List orders; - - /** - * Constructor - * - * @param orders - */ - public MtGoxCancelOrder(@JsonProperty("orders") List orders) { - - this.orders = orders; - } - - public List getOrders() { - - return this.orders; - } - - @Override - public String toString() { - - return "MtGoxCancelOrder [orders=" + orders + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxOrders.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxOrders.java deleted file mode 100644 index f193c24c8..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/dto/trade/MtGoxOrders.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.dto.trade; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author timmolter - */ -public final class MtGoxOrders { - - private final BigDecimal amount; - private final long amountInt; - private final String currency; - private final Number dark; - private final long date; - private final String item; - private final String oid; - private final BigDecimal price; - private final long priceInt; - private final String priority; - private final String realStatus; - private final Number status; - private final Number type; - - /** - * Constructor - * - * @param amount - * @param amount_int - * @param currency - * @param dark - * @param date - * @param item - * @param oid - * @param price - * @param price_int - * @param priority - * @param real_status - * @param status - * @param type - */ - public MtGoxOrders(@JsonProperty("amount") BigDecimal amount, @JsonProperty("amount_int") long amount_int, @JsonProperty("currency") String currency, @JsonProperty("dark") Number dark, - @JsonProperty("date") long date, @JsonProperty("item") String item, @JsonProperty("oid") String oid, @JsonProperty("price") BigDecimal price, @JsonProperty("price_int") long price_int, - @JsonProperty("priority") String priority, @JsonProperty("real_status") String real_status, @JsonProperty("status") Number status, @JsonProperty("type") Number type) { - - this.amount = amount; - this.amountInt = amount_int; - this.currency = currency; - this.dark = dark; - this.date = date; - this.item = item; - this.oid = oid; - this.price = price; - this.priceInt = price_int; - this.priority = priority; - this.realStatus = real_status; - this.status = status; - this.type = type; - } - - public BigDecimal getAmount() { - - return amount; - } - - public long getAmountInt() { - - return amountInt; - } - - public String getCurrency() { - - return currency; - } - - public Number getDark() { - - return dark; - } - - public long getDate() { - - return date; - } - - public String getItem() { - - return item; - } - - public String getOid() { - - return oid; - } - - public BigDecimal getPrice() { - - return price; - } - - public long getPriceInt() { - - return priceInt; - } - - public String getPriority() { - - return priority; - } - - public String getRealStatus() { - - return realStatus; - } - - public Number getStatus() { - - return status; - } - - public Number getType() { - - return type; - } - - @Override - public String toString() { - - return "Orders [amount=" + amount + ", amountInt=" + amountInt + ", currency=" + currency + ", dark=" + dark + ", date=" + date + ", item=" + item + ", oid=" + oid + ", price=" + price - + ", priceInt=" + priceInt + ", priority=" + priority + ", realStatus=" + realStatus + ", status=" + status + ", type=" + type + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/service/marketdata/polling/MtGoxPollingMarketDataService.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/service/marketdata/polling/MtGoxPollingMarketDataService.java deleted file mode 100644 index ef5262220..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v0/service/marketdata/polling/MtGoxPollingMarketDataService.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotYetImplementedForExchangeException; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.mtgox.MtGoxUtils; -import com.xeiam.xchange.mtgox.v0.MtGoxAdapters; -import com.xeiam.xchange.mtgox.v0.MtGoxV0; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxDepth; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTrades; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Implementation of the market data service for Mt Gox V0 - *

- *
    - *
  • Provides access to various market data values
  • - *
- */ -public class MtGoxPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService { - - private final MtGoxV0 mtGoxV0; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification - */ - public MtGoxPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.mtGoxV0 = RestProxyFactory.createProxy(MtGoxV0.class, exchangeSpecification.getPlainTextUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - // Request data - MtGoxTicker mtGoxTicker = mtGoxV0.getTicker(currency); - - // Adapt to XChange DTOs - return MtGoxAdapters.adaptTicker(mtGoxTicker, tradableIdentifier, currency); - - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - // TODO: implement the V0 orderBook here - throw new NotYetImplementedForExchangeException("Try V1: com.xeiam.xchange.mtgox.v1.service.marketdata.polling.MtGoxPollingMarketDataService"); - - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - MtGoxDepth mtgoxFullDepth = mtGoxV0.getFullDepth(currency); - - // Adapt to XChange DTOs - List asks = MtGoxAdapters.adaptOrders(mtgoxFullDepth.getAsks(), currency, "ask", ""); - List bids = MtGoxAdapters.adaptOrders(mtgoxFullDepth.getBids(), currency, "bid", ""); - - return new OrderBook(asks, bids); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - - // Request data - MtGoxTrades[] mtGoxTrades = mtGoxV0.getTrades(currency); - - return MtGoxAdapters.adaptTrades(mtGoxTrades); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(MtGoxUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - - } - - @Override - public List getExchangeSymbols() { - - return MtGoxUtils.CURRENCY_PAIRS; - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxAdapters.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxAdapters.java deleted file mode 100644 index 2ab300e67..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxAdapters.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.OrderBookUpdate; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.Wallet; -import com.xeiam.xchange.mtgox.MtGoxUtils; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxAccountInfo; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepthUpdate; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxOrder; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxOpenOrder; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxWallet; -import com.xeiam.xchange.mtgox.v1.dto.trade.Wallets; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Various adapters for converting from mtgox DTOs to XChange DTOs - */ -public final class MtGoxAdapters { - - /** - * private Constructor - */ - private MtGoxAdapters() { - - } - - /** - * Adapts a MtGoxAccountInfo to a AccountInfo - * - * @param mtGoxAccountInfo - * @return - */ - public static AccountInfo adaptAccountInfo(MtGoxAccountInfo mtGoxAccountInfo) { - - // Adapt to XChange DTOs - AccountInfo accountInfo = new AccountInfo(mtGoxAccountInfo.getLogin(), MtGoxAdapters.adaptWallets(mtGoxAccountInfo.getWallets())); - return accountInfo; - } - - /** - * Adapts a MtGoxOrder to a LimitOrder - * - * @param price - * @param currency - * @param orderTypeString - * @return - */ - public static LimitOrder adaptOrder(BigDecimal amount, BigDecimal price, String currency, String orderTypeString, String id, Date timestamp) { - - // place a limit order - OrderType orderType = orderTypeString.equalsIgnoreCase("bid") ? OrderType.BID : OrderType.ASK; - String tradableIdentifier = Currencies.BTC; - String transactionCurrency = currency; - BigMoney limitPrice = MoneyUtils.parse(currency + " " + price); - - LimitOrder limitOrder = new LimitOrder(orderType, amount, tradableIdentifier, transactionCurrency, id, timestamp, limitPrice); - - return limitOrder; - - } - - /** - * Adapts a List of MtGoxOrders to a List of LimitOrders - * - * @param mtGoxOrders - * @param currency - * @param orderType - * @return - */ - public static List adaptOrders(List mtGoxOrders, String currency, String orderType, String id) { - - List limitOrders = new ArrayList(); - - for (MtGoxOrder mtGoxOrder : mtGoxOrders) { - limitOrders.add(adaptOrder(mtGoxOrder.getAmount(), mtGoxOrder.getPrice(), currency, orderType, id, new Date(mtGoxOrder.getStamp()))); - } - - return limitOrders; - } - - public static List adaptOrders(MtGoxOpenOrder[] mtGoxOpenOrders) { - - List limitOrders = new ArrayList(); - - for (int i = 0; i < mtGoxOpenOrders.length; i++) { - limitOrders.add(adaptOrder(mtGoxOpenOrders[i].getAmount().getValue(), mtGoxOpenOrders[i].getPrice().getValue(), mtGoxOpenOrders[i].getCurrency(), mtGoxOpenOrders[i].getType(), - mtGoxOpenOrders[i].getOid(), new Date(mtGoxOpenOrders[i].getDate()))); - } - - return limitOrders; - } - - /** - * Adapts a MtGox Wallet to a XChange Wallet - * - * @param mtGoxWallet - * @return - */ - public static Wallet adaptWallet(MtGoxWallet mtGoxWallet) { - - if (mtGoxWallet == null) { // use the presence of a currency String to indicate existing wallet at MtGox - return null; // an account maybe doesn't contain a MtGoxWallet - } else { - BigMoney cash = MoneyUtils.parse(mtGoxWallet.getBalance().getCurrency() + " " + mtGoxWallet.getBalance().getValue()); - return new Wallet(mtGoxWallet.getBalance().getCurrency(), cash); - } - - } - - /** - * Adapts a List of MtGox Wallets to a List of XChange Wallets - * - * @param mtGoxWallets - * @return - */ - public static List adaptWallets(Wallets mtGoxWallets) { - - List wallets = new ArrayList(); - - for (MtGoxWallet mtGoxWallet : mtGoxWallets.getMtGoxWallets()) { - Wallet wallet = adaptWallet(mtGoxWallet); - if (wallet != null) { - wallets.add(wallet); - } - } - return wallets; - - } - - /** - * Adapts a MtGoxTrade to a Trade Object - * - * @param mtGoxTrade - * @return - */ - public static Trade adaptTrade(MtGoxTrade mtGoxTrade) { - - OrderType orderType = mtGoxTrade.getTradeType().equals("bid") ? OrderType.BID : OrderType.ASK; - BigDecimal amount = new BigDecimal(mtGoxTrade.getAmountInt()).divide(new BigDecimal(MtGoxUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)); - String tradableIdentifier = mtGoxTrade.getItem(); - String transactionCurrency = mtGoxTrade.getPriceCurrency(); - BigMoney price = MtGoxUtils.getPrice(transactionCurrency, mtGoxTrade.getPriceInt()); - - Date dateTime = DateUtils.fromMillisUtc(mtGoxTrade.getDate() * 1000L); - - return new Trade(orderType, amount, tradableIdentifier, transactionCurrency, price, dateTime); - } - - public static OrderBookUpdate adaptDepthUpdate(MtGoxDepthUpdate mtGoxDepthUpdate) { - - OrderType orderType = mtGoxDepthUpdate.getTradeType().equals("bid") ? OrderType.BID : OrderType.ASK; - BigDecimal volume = new BigDecimal(mtGoxDepthUpdate.getVolumeInt()).divide(new BigDecimal(MtGoxUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)); - String tradableIdentifier = mtGoxDepthUpdate.getItem(); - String transactionCurrency = mtGoxDepthUpdate.getCurrency(); - BigMoney price = MtGoxUtils.getPrice(transactionCurrency, mtGoxDepthUpdate.getPriceInt()); - BigDecimal totalVolume = new BigDecimal(mtGoxDepthUpdate.getTotalVolumeInt()).divide(new BigDecimal(MtGoxUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)); - Date date = new Date(mtGoxDepthUpdate.getNow() / 1000); - - OrderBookUpdate orderBookUpdate = new OrderBookUpdate(orderType, volume, tradableIdentifier, transactionCurrency, price, date, totalVolume); - - return orderBookUpdate; - } - - /** - * Adapts a MtGoxTrade[] to a Trades Object - * - * @param mtGoxTrades - * @return - */ - public static Trades adaptTrades(MtGoxTrade[] mtGoxTrades) { - - List tradesList = new ArrayList(); - for (int i = 0; i < mtGoxTrades.length; i++) { - - tradesList.add(adaptTrade(mtGoxTrades[i])); - } - return new Trades(tradesList); - } - - public static Ticker adaptTicker(MtGoxTicker mtGoxTicker) { - - BigMoney last = MoneyUtils.parse(mtGoxTicker.getLast().getCurrency() + " " + mtGoxTicker.getLast().getValue()); - BigMoney bid = MoneyUtils.parse(mtGoxTicker.getBuy().getCurrency() + " " + mtGoxTicker.getBuy().getValue()); - BigMoney ask = MoneyUtils.parse(mtGoxTicker.getSell().getCurrency() + " " + mtGoxTicker.getSell().getValue()); - BigMoney high = MoneyUtils.parse(mtGoxTicker.getHigh().getCurrency() + " " + mtGoxTicker.getHigh().getValue()); - BigMoney low = MoneyUtils.parse(mtGoxTicker.getLow().getCurrency() + " " + mtGoxTicker.getLow().getValue()); - BigDecimal volume = mtGoxTicker.getVol().getValue(); - - return TickerBuilder.newInstance().withTradableIdentifier(mtGoxTicker.getVol().getCurrency()).withLast(last).withBid(bid).withAsk(ask).withHigh(high).withLow(low).withVolume(volume) - .withTimestamp(new Date(mtGoxTicker.getNow() / 1000)).build(); - - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxExchange.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxExchange.java deleted file mode 100644 index 225ccee30..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxExchange.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.mtgox.v1.service.account.MtGoxPollingAccountService; -import com.xeiam.xchange.mtgox.v1.service.marketdata.polling.MtGoxPollingMarketDataService; -import com.xeiam.xchange.mtgox.v1.service.marketdata.streaming.MtGoxStreamingConfiguration; -import com.xeiam.xchange.mtgox.v1.service.marketdata.streaming.MtGoxWebsocketMarketDataService; -import com.xeiam.xchange.mtgox.v1.service.trade.polling.MtGoxPollingTradeService; -import com.xeiam.xchange.service.streaming.ExchangeStreamingConfiguration; -import com.xeiam.xchange.service.streaming.StreamingExchangeService; - -/** - *

- * Exchange implementation to provide the following to applications: - *

- *
    - *
  • A wrapper for the MtGox exchange API
  • - *
- */ -public class MtGoxExchange extends BaseExchange implements Exchange { - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - - // Configure the basic services if configuration does not apply - this.pollingMarketDataService = new MtGoxPollingMarketDataService(exchangeSpecification); - this.pollingTradeService = new MtGoxPollingTradeService(exchangeSpecification); - this.pollingAccountService = new MtGoxPollingAccountService(exchangeSpecification); - } - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setSslUri("https://data.mtgox.com"); - exchangeSpecification.setPlainTextUri("http://data.mtgox.com"); - exchangeSpecification.setHost("mtgox.com"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("MtGox"); - exchangeSpecification.setExchangeDescription("MtGox is a Bitcoin exchange registered in Japan."); - - return exchangeSpecification; - } - - @Override - public StreamingExchangeService getStreamingExchangeService(ExchangeStreamingConfiguration configuration) { - - if (configuration instanceof MtGoxStreamingConfiguration) { - return new MtGoxWebsocketMarketDataService(getExchangeSpecification(), (MtGoxStreamingConfiguration) configuration); - } - - throw new IllegalArgumentException("MtGox only supports the MtGoxExchangeServiceConfiguration"); - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxV1.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxV1.java deleted file mode 100644 index 7e303b6ad..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/MtGoxV1.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1; - -import java.math.BigDecimal; - -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; - -import si.mazi.rescu.ParamsDigest; - -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxAccountInfo; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxBitcoinDepositAddress; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxWithdrawalResponse; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepth; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxGenericResponse; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxOpenOrder; - -/** - * @author Matija Mazi - */ -@Path("api/1") -public interface MtGoxV1 { - - @GET - @Path("{ident}{currency}/ticker?raw") - MtGoxTicker getTicker(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency); - - @GET - @Path("{ident}{currency}/depth/fetch?raw") - MtGoxDepth getDepth(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency); - - @GET - @Path("{ident}{currency}/depth/full?raw") - MtGoxDepth getFullDepth(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency); - - @GET - @Path("{ident}{currency}/trades/fetch?raw") - MtGoxTrade[] getTrades(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency); - - @GET - @Path("{ident}{currency}/trades/fetch") - MtGoxTrade[] getTrades(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency, @QueryParam("raw") String raw, @QueryParam("since") long since); - - @POST - @Path("generic/private/info?raw") - MtGoxAccountInfo getAccountInfo(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") long nonce); - - @POST - @Path("generic/bitcoin/address?raw") - MtGoxBitcoinDepositAddress requestDepositAddress(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") long nonce, - @FormParam("description") String description, @FormParam("ipn") String notificationUrl); - - @POST - @Path("generic/private/orders?raw") - MtGoxOpenOrder[] getOpenOrders(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") long nonce); - - @POST - @Path("generic/bitcoin/send_simple?raw") - MtGoxWithdrawalResponse withdrawBtc(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") long nonce, - @FormParam("address") String address, @FormParam("amount_int") int amount, @FormParam("fee_int") int fee, @FormParam("no_instant") boolean noInstant, @FormParam("green") boolean green); - - /** - * @param postBodySignatureCreator - * @param amount can be omitted to place market order - */ - @POST - @Path("{tradeIdent}{currency}/private/order/add") - MtGoxGenericResponse placeOrder(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") long nonce, - @PathParam("tradeIdent") String tradableIdentifier, @PathParam("currency") String currency, @FormParam("type") String type, @FormParam("amount_int") BigDecimal amount, - @FormParam("price_int") String price); - - /** - * Note: I know it's weird to have BTCEUR hardcoded in the URL, but it really doesn't seems to matter. BTCUSD works too. - *

- * - * @param apiKey - * @param postBodySignatureCreator - * @param nonce - * @param orderId - * @return - */ - @POST - @Path("BTCEUR/private/order/cancel") - MtGoxGenericResponse cancelOrder(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") long nonce, - @FormParam("oid") String orderId); - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/MtGoxValue.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/MtGoxValue.java deleted file mode 100644 index a91e746f0..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/MtGoxValue.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing a Value from Mt Gox - */ -public final class MtGoxValue { - - private final BigDecimal value; - private final String currency; - - /** - * Constructor - * - * @param value - * @param currency - */ - public MtGoxValue(@JsonProperty("value") BigDecimal value, @JsonProperty("currency") String currency) { - - this.value = value; - this.currency = currency; - } - - public BigDecimal getValue() { - - return value; - } - - public String getCurrency() { - - return currency; - } - - @Override - public String toString() { - - return "MtGoxValue [value=" + value + ", currency=" + currency + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxAccountInfo.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxAccountInfo.java deleted file mode 100644 index ae5b2448a..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxAccountInfo.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.account; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.mtgox.v1.dto.MtGoxValue; -import com.xeiam.xchange.mtgox.v1.dto.trade.Wallets; - -/** - * Data object representing Account Info from Mt Gox - */ -public final class MtGoxAccountInfo { - - private final String login; - private final String index; - private final String id; - private final List rights; - private final String language; - private final String created; - private final String lastLogin; - private final Wallets wallets; - private final MtGoxValue monthlyVolume; - private final BigDecimal tradeFee; - - /** - * Constructor - * - * @param login - * @param index - * @param id - * @param rights - * @param language - * @param created - * @param lastLogin - * @param wallets - * @param monthlyVolume - * @param tradeFee - */ - public MtGoxAccountInfo(@JsonProperty("Login") String login, @JsonProperty("Index") String index, @JsonProperty("Id") String id, @JsonProperty("Rights") List rights, - @JsonProperty("Language") String language, @JsonProperty("Created") String created, @JsonProperty("Last_Login") String lastLogin, @JsonProperty("Wallets") Wallets wallets, - @JsonProperty("Monthly_Volume") MtGoxValue monthlyVolume, @JsonProperty("Trade_Fee") BigDecimal tradeFee) { - - this.login = login; - this.index = index; - this.id = id; - this.rights = rights; - this.language = language; - this.created = created; - this.lastLogin = lastLogin; - this.wallets = wallets; - this.monthlyVolume = monthlyVolume; - this.tradeFee = tradeFee; - } - - public String getLogin() { - - return login; - } - - public String getIndex() { - - return index; - } - - public String getId() { - - return id; - } - - public List getRights() { - - return rights; - } - - public String getLanguage() { - - return language; - } - - public String getCreated() { - - return created; - } - - public String getLastLogin() { - - return lastLogin; - } - - public Wallets getWallets() { - - return wallets; - } - - public MtGoxValue getMonthlyVolume() { - - return monthlyVolume; - } - - public BigDecimal getTradeFee() { - - return tradeFee; - } - - @Override - public String toString() { - - return "MtGoxAccountInfo [login=" + login + ", index=" + index + ", id=" + id + ", rights=" + rights + ", language=" + language + ", created=" + created + ", lastLogin=" + lastLogin - + ", wallets=" + wallets + ", monthlyVolume=" + monthlyVolume + ", tradeFee=" + tradeFee + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxBitcoinDepositAddress.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxBitcoinDepositAddress.java deleted file mode 100644 index 05e626cee..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxBitcoinDepositAddress.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Mark van Cuijk mark@van-cuijk.nl - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.account; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing the content of a response message from MtGox after requesting a bitcoin deposit address - */ -public final class MtGoxBitcoinDepositAddress { - - private final String address; - - /** - * Constructor - * - * @param address - */ - public MtGoxBitcoinDepositAddress(@JsonProperty("addr") String address) { - - this.address = address; - } - - public String getAddres() { - - return address; - } - - @Override - public String toString() { - - return "MtGoxBitcoinDepositAddress [address=" + address + "]"; - } - -} \ No newline at end of file diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxWithdrawalResponse.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxWithdrawalResponse.java deleted file mode 100644 index 703d246eb..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/account/MtGoxWithdrawalResponse.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Mark van Cuijk mark@van-cuijk.nl - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.account; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing the content of a response message from MtGox after requesting a bitcoin withdrawal - */ -public final class MtGoxWithdrawalResponse { - - /** - * Bitcion transaction id (in the block chain) - */ - private final String transactionId; - - /** - * Constructor - * - * @param transactionId - */ - public MtGoxWithdrawalResponse(@JsonProperty("trx") String transactionId) { - - this.transactionId = transactionId; - } - - public String getTransactionId() { - - return transactionId; - } - - @Override - public String toString() { - - return "MtGoxWithdrawalResponse [transactionId=" + transactionId + "]"; - } - -} \ No newline at end of file diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepth.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepth.java deleted file mode 100644 index 523dd9ef1..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepth.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.marketdata; - -import java.math.BigDecimal; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing depth from Mt Gox - */ -public final class MtGoxDepth { - - private final List asks; - private final List bids; - private final FilterPrice filterMinPrice; - private final FilterPrice filterMaxPrice; - - /** - * Constructor - * - * @param asks - * @param bids - */ - public MtGoxDepth(@JsonProperty("asks") List asks, @JsonProperty("bids") List bids, @JsonProperty("filter_min_price") FilterPrice filterMinPrice, - @JsonProperty("filter_max_price") FilterPrice filterMaxPrice) { - - this.asks = asks; - this.bids = bids; - this.filterMinPrice = filterMinPrice; - this.filterMaxPrice = filterMaxPrice; - } - - public List getAsks() { - - return asks; - } - - public List getBids() { - - return bids; - } - - public FilterPrice getFilterMinPrice() { - - return filterMinPrice; - } - - public FilterPrice getFilterMaxPrice() { - - return filterMaxPrice; - } - - @Override - public String toString() { - - return "MtGoxDepth [asks=" + asks.toString() + ", bids=" + bids.toString() + "]"; - } - - public static class FilterPrice { - - private final BigDecimal value; - private final long valueInt; - private final String currency; - - /** - * Constructor - * - * @param value - * @param valueInt - * @param currency - */ - public FilterPrice(@JsonProperty("value") BigDecimal value, @JsonProperty("value_int") long valueInt, @JsonProperty("currency") String currency) { - - this.value = value; - this.valueInt = valueInt; - this.currency = currency; - } - - public BigDecimal getValue() { - - return value; - } - - public long getValueInt() { - - return valueInt; - } - - public String getCurrency() { - - return currency; - } - - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepthUpdate.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepthUpdate.java deleted file mode 100644 index daefca251..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxDepthUpdate.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - *

- * Data object representing a Market Depth Change from Mt Gox - *

- * Auto-generated using the simplest types possible with conversion delegated to the adapter - *

- * Note: deprecated fields are not included in this value object - */ -public final class MtGoxDepthUpdate { - - private final String tradeType; - private final long priceInt; - private final long volumeInt; - private final String item; - private final String currency; - private final long now; - private final long totalVolumeInt; - - /** - * Constructor - * - * @param tradeType - * @param priceInt - * @param volumeInt - * @param item - * @param currency - * @param now - * @param totalVolumeInt - */ - public MtGoxDepthUpdate(@JsonProperty("type_str") String tradeType, @JsonProperty("price_int") long priceInt, @JsonProperty("volume_int") long volumeInt, @JsonProperty("item") String item, - @JsonProperty("currency") String currency, @JsonProperty("now") long now, @JsonProperty("total_volume_int") long totalVolumeInt) { - - this.tradeType = tradeType; - this.priceInt = priceInt; - this.volumeInt = volumeInt; - this.item = item; - this.currency = currency; - this.now = now; - this.totalVolumeInt = totalVolumeInt; - } - - public String getTradeType() { - - return tradeType; - } - - public long getPriceInt() { - - return priceInt; - } - - public long getVolumeInt() { - - return volumeInt; - } - - public String getItem() { - - return item; - } - - public String getCurrency() { - - return currency; - } - - public long getNow() { - - return now; - } - - public long getTotalVolumeInt() { - - return totalVolumeInt; - } - - @Override - public String toString() { - - return "MtGoxDepthUpdate [tradeType=" + tradeType + ", priceInt=" + priceInt + ", volumeInt=" + volumeInt + ", item=" + item + ", currency=" + currency + ", now=" + now + ", totalVolumeInt=" - + totalVolumeInt + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxOrder.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxOrder.java deleted file mode 100644 index a5c55cdc3..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxOrder.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.marketdata; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing a buy or sell order from Mt Gox - */ -public final class MtGoxOrder { - - private final BigDecimal price; - private final BigDecimal amount; - private final long priceInt; - private final long amountInt; - private final long stamp; - - /** - * Constructor - * - * @param price - * @param amount - * @param priceInt - * @param amountInt - * @param stamp - */ - public MtGoxOrder(@JsonProperty("price") BigDecimal price, @JsonProperty("amount") BigDecimal amount, @JsonProperty("price_int") long priceInt, @JsonProperty("amount_int") long amountInt, - @JsonProperty("stamp") long stamp) { - - this.price = price; - this.amount = amount; - this.priceInt = priceInt; - this.amountInt = amountInt; - this.stamp = stamp; - } - - public BigDecimal getPrice() { - - return price; - } - - public BigDecimal getAmount() { - - return amount; - } - - public long getPriceInt() { - - return priceInt; - } - - public long getAmountInt() { - - return amountInt; - } - - public long getStamp() { - - return stamp; - } - - @Override - public String toString() { - - return "MtGoxOrder [price=" + price + ", amount=" + amount + ", priceInt=" + priceInt + ", amountInt=" + amountInt + ", stamp=" + stamp + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTicker.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTicker.java deleted file mode 100644 index fafdda396..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTicker.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.mtgox.v1.dto.MtGoxValue; - -/** - * Data object representing Ticker from Mt Gox - */ -public final class MtGoxTicker { - - private final MtGoxValue high; - private final MtGoxValue low; - private final MtGoxValue avg; - private final MtGoxValue vwap; - private final MtGoxValue vol; - private final MtGoxValue last; - private final MtGoxValue buy; - private final MtGoxValue sell; - private final long now; - - /** - * Constructor - * - * @param high - * @param low - * @param avg - * @param vwap - * @param vol - * @param last - * @param buy - * @param sell - * @param now - */ - public MtGoxTicker(@JsonProperty("high") MtGoxValue high, @JsonProperty("low") MtGoxValue low, @JsonProperty("avg") MtGoxValue avg, @JsonProperty("vwap") MtGoxValue vwap, - @JsonProperty("vol") MtGoxValue vol, @JsonProperty("last") MtGoxValue last, @JsonProperty("buy") MtGoxValue buy, @JsonProperty("sell") MtGoxValue sell, @JsonProperty("now") long now) { - - this.high = high; - this.low = low; - this.avg = avg; - this.vwap = vwap; - this.vol = vol; - this.last = last; - this.buy = buy; - this.sell = sell; - this.now = now; - } - - public MtGoxValue getHigh() { - - return high; - } - - public MtGoxValue getLow() { - - return low; - } - - public MtGoxValue getAvg() { - - return avg; - } - - public MtGoxValue getVwap() { - - return vwap; - } - - public MtGoxValue getVol() { - - return vol; - } - - public MtGoxValue getLast() { - - return last; - } - - public MtGoxValue getBuy() { - - return buy; - } - - public MtGoxValue getSell() { - - return sell; - } - - public long getNow() { - - return now; - } - - @Override - public String toString() { - - return "MtGoxTicker [high=" + high + ", low=" + low + ", avg=" + avg + ", vwap=" + vwap + ", vol=" + vol + ", last=" + last + ", buy=" + buy + ", sell=" + sell + ", now=" + now + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTrade.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTrade.java deleted file mode 100644 index ec238513e..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/marketdata/MtGoxTrade.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - *

- * Data object representing a Trade from Mt Gox - *

- * Auto-generated using the simplest types possible with conversion delegated to the adapter - */ -public final class MtGoxTrade { - - private final long amountInt; - private final Long date; - private final String item; - private final String priceCurrency; - private final long priceInt; - private final String primary; - private final String properties; - private final long tid; - private final String tradeType; - - /** - * Constructor - * - * @param amount - * @param amountInt - * @param date - * @param item - * @param price - * @param priceCurrency - * @param priceInt - * @param primary - * @param properties - * @param tid - * @param tradeType - */ - public MtGoxTrade(@JsonProperty("amount_int") long amountInt, @JsonProperty("date") Long date, @JsonProperty("item") String item, @JsonProperty("price_currency") String priceCurrency, - @JsonProperty("price_int") long priceInt, @JsonProperty("primary") String primary, @JsonProperty("properties") String properties, @JsonProperty("tid") long tid, - @JsonProperty("trade_type") String tradeType) { - - this.amountInt = amountInt; - this.date = date; - this.item = item; - this.priceCurrency = priceCurrency; - this.priceInt = priceInt; - this.primary = primary; - this.properties = properties; - this.tid = tid; - this.tradeType = tradeType; - } - - public long getAmountInt() { - - return amountInt; - } - - public Long getDate() { - - return date; - } - - public String getItem() { - - return item; - } - - public String getPriceCurrency() { - - return priceCurrency; - } - - public long getPriceInt() { - - return priceInt; - } - - public String getPrimary() { - - return primary; - } - - public String getProperties() { - - return properties; - } - - public long getTid() { - - return tid; - } - - public String getTradeType() { - - return tradeType; - } - - @Override - public String toString() { - - return "MtGoxTrade [amountInt=" + amountInt + ", date=" + date + ", item=" + item + ", priceCurrency=" + priceCurrency + ", priceInt=" + priceInt + ", primary=" + primary + ", properties=" - + properties + ", tid=" + tid + ", tradeType=" + tradeType + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxGenericResponse.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxGenericResponse.java deleted file mode 100644 index f17b79835..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxGenericResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.trade; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonRawValue; - -/** - * Data object representing a response message from Mt Gox after placing and order - */ -public final class MtGoxGenericResponse { - - private final String result; - private final Object _return; - private final String error; - - /** - * Constructor - * - * @param result - * @param _return - * @param error - */ - public MtGoxGenericResponse(@JsonProperty("result") String result, @JsonProperty("return") Object _return, @JsonProperty("error") String error) { - - this.result = result; - this._return = _return; - this.error = error; - } - - public String getResult() { - - return result; - } - - @JsonRawValue - public Object getReturn() { - - return _return; - } - - public String getError() { - - return error; - } - - @Override - public String toString() { - - return "MtGoxGenericResponse [result=" + result + ", _return=" + _return + ", error=" + error + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxOpenOrder.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxOpenOrder.java deleted file mode 100644 index 055a0e456..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxOpenOrder.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.trade; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.mtgox.v1.dto.MtGoxValue; - -/** - * Data object representing Open Orders from Mt Gox - */ -public final class MtGoxOpenOrder { - - private final String oid; - private final String currency; - private final String item; - private final String type; - private final MtGoxValue amount; - private final MtGoxValue invalidAmount; - private final MtGoxValue price; - private final String status; - private final long date; - private final long priority; - - /** - * Constructor - * - * @param oid - * @param currency - * @param item - * @param type - * @param amount - * @param invalidAmount - * @param price - * @param status - * @param date - * @param priority - */ - public MtGoxOpenOrder(@JsonProperty("oid") String oid, @JsonProperty("currency") String currency, @JsonProperty("item") String item, @JsonProperty("type") String type, - @JsonProperty("amount") MtGoxValue amount, @JsonProperty("invalid_amount") MtGoxValue invalidAmount, @JsonProperty("price") MtGoxValue price, @JsonProperty("status") String status, - @JsonProperty("date") long date, @JsonProperty("priority") long priority) { - - this.oid = oid; - this.currency = currency; - this.item = item; - this.type = type; - this.amount = amount; - this.invalidAmount = invalidAmount; - this.price = price; - this.status = status; - this.date = date; - this.priority = priority; - } - - public String getOid() { - - return oid; - } - - public String getCurrency() { - - return currency; - } - - public String getItem() { - - return item; - } - - public String getType() { - - return type; - } - - public MtGoxValue getAmount() { - - return amount; - } - - public MtGoxValue getInvalidAmount() { - - return invalidAmount; - } - - public MtGoxValue getPrice() { - - return price; - } - - public String getStatus() { - - return status; - } - - public long getDate() { - - return date; - } - - public long getPriority() { - - return priority; - } - - @Override - public String toString() { - - return "MtGoxOpenOrder [oid=" + oid + ", currency=" + currency + ", item=" + item + ", type=" + type + ", amount=" + amount + ", invalidAmount=" + invalidAmount + ", price=" + price + ", status=" - + status + ", date=" + date + ", priority=" + priority + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxWallet.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxWallet.java deleted file mode 100644 index 9c0ed2cf8..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/MtGoxWallet.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.trade; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xeiam.xchange.mtgox.v1.dto.MtGoxValue; - -/** - * Data object representing a Wallet from Mt Gox - */ -public final class MtGoxWallet { - - private final MtGoxValue balance; - private final MtGoxValue dailyWithdrawLimit; - private final MtGoxValue maxWithdraw; - private final MtGoxValue monthlyWithdrawLimit; - private final int operations; - - /** - * Constructor - * - * @param balance - * @param dailyWithdrawLimit - * @param maxWithdraw - * @param monthlyWithdrawLimit - * @param operations - */ - public MtGoxWallet(@JsonProperty("Balance") MtGoxValue balance, @JsonProperty("Daily_Withdraw_Limit") MtGoxValue dailyWithdrawLimit, @JsonProperty("Max_Withdraw") MtGoxValue maxWithdraw, - @JsonProperty("Monthly_Withdraw_Limit") MtGoxValue monthlyWithdrawLimit, @JsonProperty("Operations") int operations) { - - this.balance = balance; - this.dailyWithdrawLimit = dailyWithdrawLimit; - this.maxWithdraw = maxWithdraw; - this.monthlyWithdrawLimit = monthlyWithdrawLimit; - this.operations = operations; - } - - public MtGoxValue getBalance() { - - return this.balance; - } - - public MtGoxValue getDailyWithdrawLimit() { - - return this.dailyWithdrawLimit; - } - - public MtGoxValue getMaxWithdraw() { - - return this.maxWithdraw; - } - - public MtGoxValue getMonthlyWithdrawLimit() { - - return this.monthlyWithdrawLimit; - } - - public int getOperations() { - - return this.operations; - } - - @Override - public String toString() { - - return "MtGoxWallet [balance=" + balance + ", dailyWithdrawLimit=" + dailyWithdrawLimit + ", maxWithdraw=" + maxWithdraw + ", monthlyWithdrawLimit=" + monthlyWithdrawLimit + ", operations=" - + operations + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/Wallets.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/Wallets.java deleted file mode 100644 index 8b7f23ee4..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/dto/trade/Wallets.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.dto.trade; - -import java.util.Arrays; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Data object representing Wallets from Mt Gox - */ -public final class Wallets { - - private final MtGoxWallet bTC; - private final MtGoxWallet uSD; - private final MtGoxWallet eUR; - private final MtGoxWallet gBP; - private final MtGoxWallet aUD; - private final MtGoxWallet cAD; - private final MtGoxWallet cHF; - private final MtGoxWallet jPY; - private final MtGoxWallet cNY; - private final MtGoxWallet dKK; - private final MtGoxWallet hKD; - private final MtGoxWallet nZD; - private final MtGoxWallet pLN; - private final MtGoxWallet rUB; - private final MtGoxWallet sEK; - private final MtGoxWallet tHB; - - /** - * Constructor - * - * @param bTC - * @param uSD - * @param eUR - * @param gBP - * @param aUD - * @param cAD - * @param cHF - * @param jPY - * @param cNY - * @param dKK - * @param hKD - * @param nZD - * @param pLN - * @param rUB - * @param sEK - * @param tHB - */ - public Wallets(@JsonProperty("BTC") MtGoxWallet bTC, @JsonProperty("USD") MtGoxWallet uSD, @JsonProperty("EUR") MtGoxWallet eUR, @JsonProperty("GBP") MtGoxWallet gBP, - @JsonProperty("AUD") MtGoxWallet aUD, @JsonProperty("CAD") MtGoxWallet cAD, @JsonProperty("CHF") MtGoxWallet cHF, @JsonProperty("JPY") MtGoxWallet jPY, @JsonProperty("CNY") MtGoxWallet cNY, - @JsonProperty("DKK") MtGoxWallet dKK, @JsonProperty("HKD") MtGoxWallet hKD, @JsonProperty("NZD") MtGoxWallet nZD, @JsonProperty("PLN") MtGoxWallet pLN, @JsonProperty("RUB") MtGoxWallet rUB, - @JsonProperty("SEK") MtGoxWallet sEK, @JsonProperty("THB") MtGoxWallet tHB) { - - this.bTC = bTC; - this.uSD = uSD; - this.eUR = eUR; - this.gBP = gBP; - this.aUD = aUD; - this.cAD = cAD; - this.cHF = cHF; - this.jPY = jPY; - this.cNY = cNY; - this.dKK = dKK; - this.hKD = hKD; - this.nZD = nZD; - this.pLN = pLN; - this.rUB = rUB; - this.sEK = sEK; - this.tHB = tHB; - } - - public MtGoxWallet getBTC() { - - return this.bTC; - } - - public MtGoxWallet getUSD() { - - return this.uSD; - } - - public MtGoxWallet getEUR() { - - return eUR; - } - - public MtGoxWallet getGBP() { - - return gBP; - } - - public MtGoxWallet getAUD() { - - return aUD; - } - - public MtGoxWallet getCAD() { - - return cAD; - } - - public MtGoxWallet getCHF() { - - return cHF; - } - - public MtGoxWallet getJPY() { - - return jPY; - } - - public MtGoxWallet getCNY() { - - return cNY; - } - - public MtGoxWallet getDKK() { - - return dKK; - } - - public MtGoxWallet getHKD() { - - return hKD; - } - - public MtGoxWallet getNZD() { - - return nZD; - } - - public MtGoxWallet getPLN() { - - return pLN; - } - - public MtGoxWallet getRUB() { - - return rUB; - } - - public MtGoxWallet getSEK() { - - return sEK; - } - - public MtGoxWallet getTHB() { - - return tHB; - } - - public List getMtGoxWallets() { - - return Arrays.asList(bTC, uSD, eUR, gBP, aUD, cAD, cHF, jPY, cNY, dKK, hKD, nZD, pLN, rUB, sEK, tHB); - } - - @Override - public String toString() { - - return "Wallets [BTC=" + bTC + ", USD=" + uSD + ", EUR=" + eUR + ", GBP=" + gBP + ", AUD=" + aUD + ", CAD=" + cAD + ", CHF=" + cHF + ", JPY=" + jPY + ", CNY=" + cNY + ", DKK=" + dKK + ", HKD=" - + hKD + ", NZD=" + nZD + ", PLN=" + pLN + ", RUB=" + rUB + ", SEK=" + sEK + ", THB=" + tHB + "]"; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/account/MtGoxPollingAccountService.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/account/MtGoxPollingAccountService.java deleted file mode 100644 index c6d111058..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/account/MtGoxPollingAccountService.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.account; - -import java.math.BigDecimal; - -import si.mazi.rescu.HmacPostBodyDigest; -import si.mazi.rescu.ParamsDigest; -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.mtgox.MtGoxUtils; -import com.xeiam.xchange.mtgox.v1.MtGoxAdapters; -import com.xeiam.xchange.mtgox.v1.MtGoxV1; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxAccountInfo; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxBitcoinDepositAddress; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxWithdrawalResponse; -import com.xeiam.xchange.service.account.polling.PollingAccountService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * XChange service to provide the following to {@link com.xeiam.xchange.Exchange}: - *

- *
    - *
  • MtGox specific methods to handle account-related operations
  • - *
- */ -public class MtGoxPollingAccountService extends BasePollingExchangeService implements PollingAccountService { - - /** - * Configured from the super class reading of the exchange specification - */ - private final MtGoxV1 mtGoxV1; - private ParamsDigest signatureCreator; - - /** - * Constructor - * - * @param exchangeSpecification - */ - public MtGoxPollingAccountService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - - Assert.notNull(exchangeSpecification.getSslUri(), "Exchange specification URI cannot be null"); - this.mtGoxV1 = RestProxyFactory.createProxy(MtGoxV1.class, exchangeSpecification.getSslUri()); - signatureCreator = HmacPostBodyDigest.createInstance(exchangeSpecification.getSecretKey()); - } - - @Override - public AccountInfo getAccountInfo() { - - MtGoxAccountInfo mtGoxAccountInfo = mtGoxV1.getAccountInfo(exchangeSpecification.getApiKey(), signatureCreator, getNonce()); - return MtGoxAdapters.adaptAccountInfo(mtGoxAccountInfo); - } - - @Override - public String withdrawFunds(BigDecimal amount, String address) { - - MtGoxWithdrawalResponse result = mtGoxV1.withdrawBtc(exchangeSpecification.getApiKey(), signatureCreator, getNonce(), address, amount.multiply( - new BigDecimal(MtGoxUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)).intValue(), 1, false, false); - return result.getTransactionId(); - } - - @Override - public String requestBitcoinDepositAddress(final String... arguments) { - - String description = arguments[0]; - String notificationUrl = arguments[1]; - MtGoxBitcoinDepositAddress mtGoxBitcoinDepositAddress = mtGoxV1.requestDepositAddress(exchangeSpecification.getApiKey(), signatureCreator, getNonce(), description, notificationUrl); - - return mtGoxBitcoinDepositAddress.getAddres(); - } - - private long getNonce() { - - return System.currentTimeMillis(); - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/MtGoxPollingMarketDataService.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/MtGoxPollingMarketDataService.java deleted file mode 100644 index 575c2197b..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/MtGoxPollingMarketDataService.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.polling; - -import java.util.List; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.mtgox.MtGoxUtils; -import com.xeiam.xchange.mtgox.v1.MtGoxAdapters; -import com.xeiam.xchange.mtgox.v1.MtGoxV1; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepth; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Implementation of the market data service for Mt Gox V1 - *

- *
    - *
  • Provides access to various market data values
  • - *
- */ -public class MtGoxPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService { - - private final MtGoxV1 mtGoxV1; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification - */ - public MtGoxPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.mtGoxV1 = RestProxyFactory.createProxy(MtGoxV1.class, exchangeSpecification.getPlainTextUri()); - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - // Request data - MtGoxTicker mtGoxTicker = mtGoxV1.getTicker(tradableIdentifier, currency); - - // Adapt to XChange DTOs - return MtGoxAdapters.adaptTicker(mtGoxTicker); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - // Request data - MtGoxDepth mtgoxDepth = mtGoxV1.getDepth(tradableIdentifier, currency); - - // Adapt to XChange DTOs - List asks = MtGoxAdapters.adaptOrders(mtgoxDepth.getAsks(), currency, "ask", ""); - List bids = MtGoxAdapters.adaptOrders(mtgoxDepth.getBids(), currency, "bid", ""); - - return new OrderBook(asks, bids); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - MtGoxDepth mtgoxFullDepth = mtGoxV1.getFullDepth(tradableIdentifier, currency); - - // Adapt to XChange DTOs - List asks = MtGoxAdapters.adaptOrders(mtgoxFullDepth.getAsks(), currency, "ask", ""); - List bids = MtGoxAdapters.adaptOrders(mtgoxFullDepth.getBids(), currency, "bid", ""); - - return new OrderBook(asks, bids); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - verify(tradableIdentifier, currency); - MtGoxTrade[] mtGoxTrades = null; - if (args.length > 0) { - Long sinceTimeStamp = (Long) args[0]; - // Request data - mtGoxTrades = mtGoxV1.getTrades(tradableIdentifier, currency, "y", sinceTimeStamp); - } else { - // Request data - mtGoxTrades = mtGoxV1.getTrades(tradableIdentifier, currency); - } - - return MtGoxAdapters.adaptTrades(mtGoxTrades); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.notNull(currency, "currency cannot be null"); - Assert.isTrue(MtGoxUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - - } - - @Override - public List getExchangeSymbols() { - - return MtGoxUtils.CURRENCY_PAIRS; - } -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxExchangeEventListener.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxExchangeEventListener.java deleted file mode 100644 index 134d6edaf..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxExchangeEventListener.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.streaming; - -import java.util.Map; -import java.util.concurrent.BlockingQueue; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import si.mazi.rescu.JSONUtils; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.ExchangeException; -import com.xeiam.xchange.dto.marketdata.OrderBookUpdate; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trade; -import com.xeiam.xchange.mtgox.v1.MtGoxAdapters; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepthUpdate; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; -import com.xeiam.xchange.service.streaming.DefaultExchangeEvent; -import com.xeiam.xchange.service.streaming.ExchangeEvent; -import com.xeiam.xchange.service.streaming.ExchangeEventListener; -import com.xeiam.xchange.service.streaming.ExchangeEventType; - -/** - * @author timmolter - */ -public class MtGoxExchangeEventListener extends ExchangeEventListener { - - private static final Logger log = LoggerFactory.getLogger(MtGoxExchangeEventListener.class); - - private final ObjectMapper streamObjectMapper; - - private final BlockingQueue consumerEventQueue; - - /** - * Constructor - * - * @param consumerEventQueue - */ - public MtGoxExchangeEventListener(BlockingQueue consumerEventQueue) { - - this.consumerEventQueue = consumerEventQueue; - streamObjectMapper = new ObjectMapper(); - streamObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - - } - - @Override - public void handleEvent(ExchangeEvent exchangeEvent) { - - // log.debug("exchangeEvent: " + exchangeEvent.getEventType()); - - switch (exchangeEvent.getEventType()) { - case CONNECT: - log.debug("MtGox connected"); - addToEventQueue(exchangeEvent); - break; - case DISCONNECT: - log.debug("MtGox disconnected"); - addToEventQueue(exchangeEvent); - break; - case MESSAGE: - // log.debug("Generic message. Length=" + exchangeEvent.getData().length()); - // log.debug("JSON message =" + exchangeEvent.getData()); - - // Get raw JSON - Map rawJSON = JSONUtils.getJsonGenericMap(exchangeEvent.getData(), streamObjectMapper); - - // Determine what has been sent - if (rawJSON.containsKey("ticker")) { - - // Get MtGoxTicker from JSON String - MtGoxTicker mtGoxTicker = JSONUtils.getJsonObject(JSONUtils.getJSONString(rawJSON.get("ticker"), streamObjectMapper), MtGoxTicker.class, streamObjectMapper); - - // Adapt to XChange DTOs - Ticker ticker = MtGoxAdapters.adaptTicker(mtGoxTicker); - - // Create a ticker event - ExchangeEvent tickerEvent = new DefaultExchangeEvent(ExchangeEventType.TICKER, exchangeEvent.getData(), ticker); - addToEventQueue(tickerEvent); - break; - } else { - if (rawJSON.containsKey("trade")) { - - // log.debug("exchangeEvent: " + exchangeEvent.getEventType()); - - // Get MtGoxTradeStream from JSON String - MtGoxTrade mtGoxTradeStream = JSONUtils.getJsonObject(JSONUtils.getJSONString(rawJSON.get("trade"), streamObjectMapper), MtGoxTrade.class, streamObjectMapper); - - // Adapt to XChange DTOs - Trade trade = MtGoxAdapters.adaptTrade(mtGoxTradeStream); - - // Create a trade event - ExchangeEvent tradeEvent = new DefaultExchangeEvent(ExchangeEventType.TRADE, exchangeEvent.getData(), trade); - addToEventQueue(tradeEvent); - break; - } else { - if (rawJSON.containsKey("depth")) { - - // Get MtGoxDepthStream from JSON String - MtGoxDepthUpdate mtGoxDepthStream = JSONUtils.getJsonObject(JSONUtils.getJSONString(rawJSON.get("depth"), streamObjectMapper), MtGoxDepthUpdate.class, streamObjectMapper); - - // Adapt to XChange DTOs - OrderBookUpdate orderBookUpdate = MtGoxAdapters.adaptDepthUpdate(mtGoxDepthStream); - - // Create a depth event - ExchangeEvent depthEvent = new DefaultExchangeEvent(ExchangeEventType.DEPTH, exchangeEvent.getData(), orderBookUpdate); - addToEventQueue(depthEvent); - break; - } else { - log.debug("MtGox operational message"); - addToEventQueue(exchangeEvent); - } - } - } - break; - case ERROR: - log.error("Error message: " + exchangeEvent.getPayload()); - addToEventQueue(exchangeEvent); - break; - default: - throw new IllegalStateException("Unknown ExchangeEventType " + exchangeEvent.getEventType().name()); - } - - } - - private void addToEventQueue(ExchangeEvent event) { - - try { - consumerEventQueue.put(event); - } catch (InterruptedException e) { - throw new ExchangeException("InterruptedException!", e); - } - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxStreamingConfiguration.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxStreamingConfiguration.java deleted file mode 100644 index 0caae6b65..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxStreamingConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xeiam.xchange.mtgox.v1.service.marketdata.streaming; - -import com.xeiam.xchange.service.streaming.ExchangeStreamingConfiguration; - -/** - *

- * Value object to provide the following - *

- *
    - *
  • Access to streaming data configuration specific to MtGox exchange streaming API
  • - *
- */ -public class MtGoxStreamingConfiguration implements ExchangeStreamingConfiguration { - - private final int maxReconnectAttempts; - private final int reconnectWaitTimeInMs; - private final String tradeableIdentifier; - private final String currencyCode; - - /** - * Constructor - * - * @param maxReconnectAttempts - * @param reconnectWaitTimeInMs - * @param tradeableIdentifier - * @param currencyCode - */ - public MtGoxStreamingConfiguration(int maxReconnectAttempts, int reconnectWaitTimeInMs, String tradeableIdentifier, String currencyCode) { - - this.maxReconnectAttempts = maxReconnectAttempts; - this.reconnectWaitTimeInMs = reconnectWaitTimeInMs; - this.tradeableIdentifier = tradeableIdentifier; - this.currencyCode = currencyCode; - } - - public String getTradeableIdentifier() { - - return tradeableIdentifier; - } - - public String getCurrencyCode() { - - return currencyCode; - } - - @Override - public int getMaxReconnectAttempts() { - - return maxReconnectAttempts; - } - - @Override - public int getRecconectWaitTimeInMs() { - - return reconnectWaitTimeInMs; - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxWebsocketMarketDataService.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxWebsocketMarketDataService.java deleted file mode 100644 index b513aad49..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/MtGoxWebsocketMarketDataService.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.streaming; - -import java.net.URI; -import java.util.HashMap; -import java.util.Map; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.mtgox.MtGoxUtils; -import com.xeiam.xchange.service.streaming.BaseWebSocketExchangeService; -import com.xeiam.xchange.service.streaming.ExchangeEventListener; -import com.xeiam.xchange.service.streaming.StreamingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - *

- * Streaming market data service for the MtGox exchange - *

- *

- * MtGox provides a Websocket implementation - *

- */ -public class MtGoxWebsocketMarketDataService extends BaseWebSocketExchangeService implements StreamingExchangeService { - - private final Logger logger = LoggerFactory.getLogger(MtGoxWebsocketMarketDataService.class); - - /** - * Configured from the super class reading of the exchange specification - */ - - private final String apiBase = String.format("ws://websocket.%s:%s/mtgox", exchangeSpecification.getHost(), exchangeSpecification.getPort()); - private final ExchangeEventListener exchangeEventListener; - - /** - * Ensures that exchange-specific configuration is available - */ - private final MtGoxStreamingConfiguration configuration; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification providing the required connection data - */ - public MtGoxWebsocketMarketDataService(ExchangeSpecification exchangeSpecification, MtGoxStreamingConfiguration configuration) { - - super(exchangeSpecification, configuration); - - Assert.notNull(configuration, "configuration cannot be null"); - Assert.notNull(configuration.getTradeableIdentifier(), "tradableIdentifier cannot be null"); - Assert.notNull(configuration.getCurrencyCode(), "currencyCode cannot be null"); - Assert.isTrue(MtGoxUtils.isValidCurrencyPair(new CurrencyPair(configuration.getTradeableIdentifier(), configuration.getCurrencyCode())), "currencyPair is not valid:" - + configuration.getTradeableIdentifier() + " " + configuration.getCurrencyCode()); - - this.configuration = configuration; - - // Create the listener for the specified eventType - this.exchangeEventListener = new MtGoxExchangeEventListener(consumerEventQueue); - - } - - @Override - public void connect() { - - URI uri = URI.create(apiBase + "?Currency=" + configuration.getCurrencyCode()); - Map headers = new HashMap(1); - headers.put("Origin", String.format("%s:%s", exchangeSpecification.getHost(), exchangeSpecification.getPort())); - - logger.debug("Streaming URI='{}'", uri); - - // Use the default internal connect - internalConnect(uri, exchangeEventListener, headers); - } - -} diff --git a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/trade/polling/MtGoxPollingTradeService.java b/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/trade/polling/MtGoxPollingTradeService.java deleted file mode 100644 index f2ec7be94..000000000 --- a/xchange-mtgox/src/main/java/com/xeiam/xchange/mtgox/v1/service/trade/polling/MtGoxPollingTradeService.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.trade.polling; - -import java.math.BigDecimal; - -import si.mazi.rescu.HmacPostBodyDigest; -import si.mazi.rescu.ParamsDigest; -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.Order; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.MarketOrder; -import com.xeiam.xchange.dto.trade.OpenOrders; -import com.xeiam.xchange.mtgox.MtGoxUtils; -import com.xeiam.xchange.mtgox.v1.MtGoxAdapters; -import com.xeiam.xchange.mtgox.v1.MtGoxV1; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxGenericResponse; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxOpenOrder; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.service.trade.polling.PollingTradeService; -import com.xeiam.xchange.utils.Assert; - -/** - * @author timmolter - */ -public class MtGoxPollingTradeService extends BasePollingExchangeService implements PollingTradeService { - - private final ParamsDigest postBodySignatureCreator; - private final MtGoxV1 mtGoxV1; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification with the configuration parameters - */ - public MtGoxPollingTradeService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - - Assert.notNull(exchangeSpecification.getSslUri(), "Exchange specification URI cannot be null"); - this.mtGoxV1 = RestProxyFactory.createProxy(MtGoxV1.class, exchangeSpecification.getSslUri()); - postBodySignatureCreator = HmacPostBodyDigest.createInstance(exchangeSpecification.getSecretKey()); - } - - @Override - public OpenOrders getOpenOrders() { - - MtGoxOpenOrder[] mtGoxOpenOrders = mtGoxV1.getOpenOrders(MtGoxUtils.urlEncode(exchangeSpecification.getApiKey()), postBodySignatureCreator, getNonce()); - return new OpenOrders(MtGoxAdapters.adaptOrders(mtGoxOpenOrders)); - } - - @Override - public String placeMarketOrder(MarketOrder marketOrder) { - - verify(marketOrder); - - MtGoxGenericResponse mtGoxSuccess = mtGoxV1.placeOrder(exchangeSpecification.getApiKey(), postBodySignatureCreator, getNonce(), marketOrder.getTradableIdentifier(), marketOrder - .getTransactionCurrency(), marketOrder.getType().equals(OrderType.BID) ? "bid" : "ask", marketOrder.getTradableAmount().multiply( - new BigDecimal(MtGoxUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)), null); - - return mtGoxSuccess.getReturn().toString(); - } - - @Override - public String placeLimitOrder(LimitOrder limitOrder) { - - verify(limitOrder); - Assert.notNull(limitOrder.getLimitPrice().getAmount(), "getLimitPrice().getAmount() cannot be null"); - Assert.notNull(limitOrder.getLimitPrice().getCurrencyUnit(), "getLimitPrice().getCurrencyUnit() cannot be null"); - - MtGoxGenericResponse mtGoxSuccess = mtGoxV1.placeOrder(exchangeSpecification.getApiKey(), postBodySignatureCreator, getNonce(), limitOrder.getTradableIdentifier(), limitOrder.getLimitPrice() - .getCurrencyUnit().toString(), limitOrder.getType().equals(OrderType.BID) ? "bid" : "ask", limitOrder.getTradableAmount().multiply( - new BigDecimal(MtGoxUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR)), MtGoxUtils.getPriceString(limitOrder.getLimitPrice())); - - return mtGoxSuccess.getReturn().toString(); - } - - @Override - public boolean cancelOrder(String orderId) { - - Assert.notNull(orderId, "orderId cannot be null"); - - MtGoxGenericResponse mtGoxGenericResponse = mtGoxV1.cancelOrder(exchangeSpecification.getApiKey(), postBodySignatureCreator, getNonce(), orderId); - - return mtGoxGenericResponse.getResult().equals("success"); - } - - private void verify(Order order) { - - Assert.notNull(order.getTradableIdentifier(), "getTradableIdentifier() cannot be null"); - Assert.notNull(order.getType(), "getType() cannot be null"); - Assert.notNull(order.getTradableAmount(), "getAmount_int() cannot be null"); - Assert.isTrue(MtGoxUtils.isValidCurrencyPair(new CurrencyPair(order.getTradableIdentifier(), order.getTransactionCurrency())), "currencyPair is not valid"); - - } - - private long getNonce() { - - return System.currentTimeMillis(); - } - -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/MtGoxAdapterTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/MtGoxAdapterTest.java deleted file mode 100644 index a2f9e7dc0..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/MtGoxAdapterTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.service; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.List; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.mtgox.v0.MtGoxAdapters; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxDepth; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTrades; -import com.xeiam.xchange.mtgox.v0.service.marketdata.FullDepthJSONTest; -import com.xeiam.xchange.utils.DateUtils; - -public class MtGoxAdapterTest { - - @Test - public void testOrderAdapterWithDepth() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FullDepthJSONTest.class.getResourceAsStream("/v0/marketdata/example-depth-data-v0.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxDepth mtGoxDepth = mapper.readValue(is, MtGoxDepth.class); - - List asks = MtGoxAdapters.adaptOrders(mtGoxDepth.getAsks(), "USD", "ask", ""); - - // Verify all fields filled - assertTrue("Limit price should be 16.634", asks.get(0).getLimitPrice().getAmount().doubleValue() == 16.634); - assertTrue("Order type should be ASK", asks.get(0).getType() == OrderType.ASK); - assertTrue("TradableAmount should be 21.989000000000001", asks.get(0).getTradableAmount().doubleValue() == 21.989000000000001); - assertTrue("TradableIdentifier should be BTC", asks.get(0).getTradableIdentifier().equals("BTC")); - assertTrue("TransactionCurrency should be USD", asks.get(0).getTransactionCurrency().equals("USD")); - - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v0/marketdata/example-ticker-data-v0.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxTicker mtGoxTicker = mapper.readValue(is, MtGoxTicker.class); - - Ticker ticker = MtGoxAdapters.adaptTicker(mtGoxTicker, "BTC", "USD"); - // System.out.println(ticker.toString()); - - assertThat(ticker.getLast(), is(equalTo(MoneyUtils.parse("USD 16.800000000000001")))); - assertThat(ticker.getBid(), is(equalTo(MoneyUtils.parse("USD 16.79036")))); - assertThat(ticker.getAsk(), is(equalTo(MoneyUtils.parse("USD 16.800000000000001")))); - assertThat(ticker.getVolume(), is(equalTo(new BigDecimal("60418")))); - - } - - @Test - public void testTradeAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v0/marketdata/example-trades-data-v0.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxTrades[] mtGoxTrades = mapper.readValue(is, MtGoxTrades[].class); - - Trades trades = MtGoxAdapters.adaptTrades(mtGoxTrades); - System.out.println(trades.getTrades().size()); - assertTrue("Trades size should be 609", trades.getTrades().size() == 609); - - // verify all fields filled - // System.out.println(trades.getTrades().get(0).toString()); - assertTrue("Price should be 16.75", trades.getTrades().get(0).getPrice().getAmount().doubleValue() == 16.75); - assertTrue("Order type should be Bid", trades.getTrades().get(0).getType() == OrderType.BID); - assertTrue("TradableAmount should be 0.09910328", trades.getTrades().get(0).getTradableAmount().doubleValue() == 0.09910328); - assertTrue("TradableIdentifier should be BTC", trades.getTrades().get(0).getTradableIdentifier().equals("BTC")); - assertTrue("TransactionCurrency should be USD", trades.getTrades().get(0).getTransactionCurrency().equals("USD")); - // Unix 1358803625 = Mon, 21 Jan 2013 21:27:05 GMT - assertThat("2013-01-21 21:27:05 GMT", is(equalTo(DateUtils.toUTCString(trades.getTrades().get(0).getTimestamp())))); - - } - -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/FullDepthJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/FullDepthJSONTest.java deleted file mode 100644 index 9406080a2..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/FullDepthJSONTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.service.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxDepth; - -/** - * Test MtGoxFullDepth JSON parsing - */ -public class FullDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FullDepthJSONTest.class.getResourceAsStream("/v0/marketdata/example-depth-data-v0.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxDepth mtGoxDepth = mapper.readValue(is, MtGoxDepth.class); - - // Verify that the example data was unmarshalled correctly - assertThat(mtGoxDepth.getAsks().get(0)[0], is(equalTo(new BigDecimal("16.634")))); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TickerJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TickerJSONTest.java deleted file mode 100644 index b2dc9dba1..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TickerJSONTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v0.dto.marketdata.MtGoxTicker; - -/** - * Test MtGoxTicker JSON parsing - */ -public class TickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TickerJSONTest.class.getResourceAsStream("/v0/marketdata/example-ticker-data-v0.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxTicker mtGoxTicker = mapper.readValue(is, MtGoxTicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", mtGoxTicker.getTicker().getBuy().doubleValue(), equalTo(16.79036)); - assertThat("Unexpected Return Last value", mtGoxTicker.getTicker().getLast().doubleValue(), equalTo(16.800000000000001)); - assertThat("Unexpected Return Ask value", mtGoxTicker.getTicker().getSell().doubleValue(), equalTo(16.800000000000001)); - assertThat("Unexpected Return High value", mtGoxTicker.getTicker().getHigh().doubleValue(), equalTo(16.98)); - assertThat("Unexpected Return Low value", mtGoxTicker.getTicker().getLow().doubleValue(), equalTo(15.634119999999999)); - assertThat("Unexpected Return Volume value", mtGoxTicker.getTicker().getVol().longValue(), equalTo(60418L)); - - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TradesJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TradesJSONTest.java deleted file mode 100644 index f7397971b..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/marketdata/TradesJSONTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.service.marketdata; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; - -/** - * Test MtGoxTrade[] JSON parsing - */ -public class TradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TradesJSONTest.class.getResourceAsStream("/v0/marketdata/example-trades-data-v0.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxTrade[] mtGoxTrades = mapper.readValue(is, MtGoxTrade[].class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", mtGoxTrades[0].getPriceInt(), equalTo(1675000L)); - // System.out.println(mtGoxTrades[0].toString()); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/trade/CancelOrdersJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/trade/CancelOrdersJSONTest.java deleted file mode 100644 index 5be8454ce..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v0/service/trade/CancelOrdersJSONTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v0.service.trade; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v0.dto.trade.MtGoxCancelOrder; - -/** - * Test MtGoxCancelOrder JSON parsing - */ -public class CancelOrdersJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = CancelOrdersJSONTest.class.getResourceAsStream("/v0/trade/example-cancel-order-response.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxCancelOrder mtGoxOpenOrders = mapper.readValue(is, MtGoxCancelOrder.class); - - // System.out.println(mtGoxOpenOrders.toString()); - - // Verify that the example data was unmarshalled correctly - assertThat(mtGoxOpenOrders.getOrders().get(0).getAmount(), equalTo(new BigDecimal("0.92907324"))); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxAdapterTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxAdapterTest.java deleted file mode 100644 index 3a356afc8..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxAdapterTest.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.List; -import java.util.Map; - -import org.junit.Test; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.Order.OrderType; -import com.xeiam.xchange.dto.account.AccountInfo; -import com.xeiam.xchange.dto.marketdata.OrderBookUpdate; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.dto.trade.LimitOrder; -import com.xeiam.xchange.dto.trade.Wallet; -import com.xeiam.xchange.mtgox.v1.MtGoxAdapters; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxAccountInfo; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepth; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepthUpdate; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTicker; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxOpenOrder; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxWallet; -import com.xeiam.xchange.utils.DateUtils; - -/** - * Tests the MtGoxAdapter class - */ -public class MtGoxAdapterTest { - - @Test - public void testAccountInfoAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v1/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxAccountInfo mtGoxAccountInfo = mapper.readValue(is, MtGoxAccountInfo.class); - - AccountInfo accountInfo = MtGoxAdapters.adaptAccountInfo(mtGoxAccountInfo); - assertThat(accountInfo.getUsername(), is(equalTo("xchange"))); - assertThat(accountInfo.getWallets().get(0).getCurrency(), is(equalTo("BTC"))); - assertThat(accountInfo.getWallets().get(0).getBalance(), is(equalTo(MoneyUtils.parse("BTC 0.00000000")))); - } - - @Test - public void testOrderAdapterWithOpenOrders() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v1/trade/example-openorders-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxOpenOrder[] mtGoxOpenOrders = mapper.readValue(is, MtGoxOpenOrder[].class); - - List openorders = MtGoxAdapters.adaptOrders(mtGoxOpenOrders); - // System.out.println(openorders.size()); - assertTrue("ASKS size should be 38", openorders.size() == 38); - - // verify all fields filled - // System.out.println(openorders.get(0).toString()); - assertTrue("limit price should be 1.25", openorders.get(0).getLimitPrice().getAmount().doubleValue() == 1.25); - assertTrue("order type should be BID", openorders.get(0).getType() == OrderType.BID); - assertTrue("tradableAmount should be 0.23385868", openorders.get(0).getTradableAmount().doubleValue() == 0.23385868); - assertTrue("tradableIdentifier should be BTC", openorders.get(0).getTradableIdentifier().equals("BTC")); - assertTrue("transactionCurrency should be USD", openorders.get(0).getTransactionCurrency().equals("USD")); - - } - - @Test - public void testOrderAdapterWithDepth() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v1/marketdata/polling/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxDepth mtGoxDepth = mapper.readValue(is, MtGoxDepth.class); - - List asks = MtGoxAdapters.adaptOrders(mtGoxDepth.getAsks(), "USD", "ask", "id_567"); - System.out.println(asks.size()); - assertTrue("ASKS size should be 503", asks.size() == 503); - - // verify all fields filled - // System.out.println(asks.get(0).toString()); - assertThat(asks.get(0).getLimitPrice().getAmount().doubleValue(), equalTo(182.99999)); - assertTrue("order type should be ASK", asks.get(0).getType() == OrderType.ASK); - assertThat("tradableAmount should be 20", asks.get(0).getTradableAmount().doubleValue(), equalTo(2.46297453)); - assertTrue("tradableIdentifier should be BTC", asks.get(0).getTradableIdentifier().equals("BTC")); - assertTrue("transactionCurrency should be USD", asks.get(0).getTransactionCurrency().equals("USD")); - - } - - @Test - public void testTradeAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v1/marketdata/polling/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxTrade[] mtGoxTrades = mapper.readValue(is, MtGoxTrade[].class); - - Trades trades = MtGoxAdapters.adaptTrades(mtGoxTrades); - // System.out.println(trades.getTrades().size()); - assertThat(trades.getTrades().size(), equalTo(30)); - - // verify all fields filled - // System.out.println(trades.getTrades().get(0).toString()); - assertThat(trades.getTrades().get(0).getPrice().getAmount().doubleValue(), equalTo(193.99989)); - assertThat(trades.getTrades().get(0).getType(), equalTo(OrderType.BID)); - assertThat(trades.getTrades().get(0).getTradableAmount().doubleValue(), equalTo(0.01985186)); - assertThat(trades.getTrades().get(0).getTradableIdentifier(), equalTo("BTC")); - assertThat(trades.getTrades().get(0).getTransactionCurrency(), equalTo("USD")); - // Unix 1334177326 = Wed, 11 Apr 2012 20:48:46 GMT - assertThat("2013-04-09 09:18:23 GMT", is(equalTo(DateUtils.toUTCString(trades.getTrades().get(0).getTimestamp())))); - } - - @Test - public void testWalletAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v1/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxAccountInfo mtGoxAccountInfo = mapper.readValue(is, MtGoxAccountInfo.class); - - // in MtGoxAccountInfo.getWallets, no wallets are null - MtGoxWallet CADWallet = mtGoxAccountInfo.getWallets().getCAD(); - assertTrue("CAD should be null", CADWallet == null); - MtGoxWallet USDWallet = mtGoxAccountInfo.getWallets().getUSD(); - assertTrue("USD should NOT be null", USDWallet != null); - - // in Wallet(s), only wallets from MtGoxAccountInfo.getWallets that contained data are NOT null. - List wallets = MtGoxAdapters.adaptWallets(mtGoxAccountInfo.getWallets()); - // System.out.println(wallets.toString()); - assertTrue("List size should be true!", wallets.size() == 2); - assertTrue("CAD should be null", !wallets.contains(new Wallet(Currencies.CAD, MoneyUtils.parse("CAD 0.0")))); - assertTrue("BTC should NOT be null", wallets.contains(new Wallet(Currencies.BTC, MoneyUtils.parse("BTC 0.00000000")))); - - // System.out.println(wallets.get(0).toString()); - assertTrue("wallets.get(0).getBalance().getAmount().doubleValue() should be 0.0", wallets.get(0).getBalance().getAmount().doubleValue() == 0.0); - assertTrue("wallets.get(0).getBalance().getCurrencyUnit().toString() should be BTC", wallets.get(0).getBalance().getCurrencyUnit().toString().equals("BTC")); - } - - @Test - public void testTickerAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v1/marketdata/polling/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxTicker mtGoxTicker = mapper.readValue(is, MtGoxTicker.class); - - Ticker ticker = MtGoxAdapters.adaptTicker(mtGoxTicker); - // System.out.println(ticker.toString()); - - assertThat(ticker.getLast(), is(equalTo(MoneyUtils.parse("USD 91.46000")))); - assertThat(ticker.getBid(), is(equalTo(MoneyUtils.parse("USD 90.68502")))); - assertThat(ticker.getAsk(), is(equalTo(MoneyUtils.parse("USD 91.45898")))); - assertThat(ticker.getVolume(), is(equalTo(new BigDecimal("49524.15110020")))); - - } - - @Test - public void testOrderBookUpdateAdapter() throws IOException { - - // Read in the JSON from the example resources - InputStream is = MtGoxAdapterTest.class.getResourceAsStream("/v1/marketdata/streaming/example-depth-streaming-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - Map userInMap = mapper.readValue(is, new TypeReference>() { - }); - - MtGoxDepthUpdate mtGoxDepthUpdate = mapper.readValue(mapper.writeValueAsString(userInMap.get("depth")), MtGoxDepthUpdate.class); - - OrderBookUpdate orderBookUpdate = MtGoxAdapters.adaptDepthUpdate(mtGoxDepthUpdate); - // System.out.println(orderBookUpdate.toString()); - - assertThat(orderBookUpdate.getTotalVolume(), is(equalTo(new BigDecimal("324.02839775")))); - assertThat(orderBookUpdate.getLimitOrder().getTradableAmount(), is(equalTo(new BigDecimal("4.97732719")))); - assertThat(orderBookUpdate.getLimitOrder().getTimestamp().getTime(), is(equalTo(1364643714372L))); - - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxHmacPostBodyDigestTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxHmacPostBodyDigestTest.java deleted file mode 100644 index bfb854365..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxHmacPostBodyDigestTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service; - -import java.lang.annotation.Annotation; -import java.security.GeneralSecurityException; -import java.util.HashMap; -import java.util.Map; - -import javax.ws.rs.FormParam; - -import org.junit.Assert; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import si.mazi.rescu.HmacPostBodyDigest; -import si.mazi.rescu.Params; -import si.mazi.rescu.RestMethodMetadata; - -public class MtGoxHmacPostBodyDigestTest { - - private static final Logger log = LoggerFactory.getLogger(MtGoxHmacPostBodyDigestTest.class); - - @Test - public void testSignature() throws GeneralSecurityException { - - String secretKey = "9WkB3zUil6h5pXrqUX7XT57c+g2rxxemeGYv3aBSW4hlkwSIgmul+mC3yxwU8fPtQsR8jTpyI2xo7WznjhTf4g=="; - - Map, Params> paramsMap = new HashMap, Params>(); - paramsMap.put(FormParam.class, Params.of("nonce", 1328626350245256L)); - - String restSign = HmacPostBodyDigest.createInstance(secretKey).digestParams(new RestMethodMetadata(paramsMap, "application/x-www-form-urlencoded")); - log.debug("Rest-Sign : " + restSign); - String expectedResult = "eNjLVoVh6LVQfzgv7qFMCL48b5d2Qd1gvratXGA76W6+g46Jl9TNkiTCHks5sLXjfAQ1rGnvWxRHu6pYjC5FSQ=="; - log.debug("Expected-Sign: " + expectedResult); - - Assert.assertEquals(restSign, expectedResult); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxUtilsTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxUtilsTest.java deleted file mode 100644 index 477db7953..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/MtGoxUtilsTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.joda.money.BigMoney; -import org.junit.Test; - -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.mtgox.MtGoxUtils; - -/** - * Test class for MtGoxUtils class - */ -public class MtGoxUtilsTest { - - @Test - public void testJPYScaling() { - - BigMoney priceJPY = MoneyUtils.parse("JPY 544.44"); - String mtGoxRequestStringJPY = MtGoxUtils.getPriceString(priceJPY); - // System.out.println(mtGoxRequestStringJPY); - - BigMoney priceUSD = MoneyUtils.parse("USD 5.4444"); - String mtGoxRequestStringUSD = MtGoxUtils.getPriceString(priceUSD); - // System.out.println(mtGoxRequestStringUSD); - - assertEquals("Unexpected value", mtGoxRequestStringJPY, mtGoxRequestStringUSD); - - } - - @Test - public void testIsValidCurrencyPair() { - - assertTrue(MtGoxUtils.isValidCurrencyPair(CurrencyPair.BTC_USD)); - assertTrue(MtGoxUtils.isValidCurrencyPair(new CurrencyPair("BTC", "USD"))); - assertFalse(MtGoxUtils.isValidCurrencyPair(new CurrencyPair("BTC", "FFD"))); - - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/AccountInfoJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/AccountInfoJSONTest.java deleted file mode 100644 index 2bb584566..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/AccountInfoJSONTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.account; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxAccountInfo; - -/** - * Test MtGoxAccountInfo JSON parsing - */ -public class AccountInfoJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = AccountInfoJSONTest.class.getResourceAsStream("/v1/account/example-accountinfo-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxAccountInfo mtGoxAccountInfo = mapper.readValue(is, MtGoxAccountInfo.class); - - // System.out.println(mtGoxAccountInfo.toString()); - - // Verify that the example data was unmarshalled correctly - assertTrue(mtGoxAccountInfo.getLogin().equals("xchange")); - } - -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/DepositResponseJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/DepositResponseJSONTest.java deleted file mode 100644 index b0673616d..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/DepositResponseJSONTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Mark van Cuijk mark@van-cuijk.nl - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.account; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxBitcoinDepositAddress; - -/** - * Test MtGoxDepositResponse JSON parsing - */ -public class DepositResponseJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = DepositResponseJSONTest.class.getResourceAsStream("/v1/account/example-deposit-response.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxBitcoinDepositAddress mtGoxBitcoinDepositAddress = mapper.readValue(is, MtGoxBitcoinDepositAddress.class); - - System.out.println(mtGoxBitcoinDepositAddress.toString()); - - // Verify that the example data was unmarshalled correctly - assertThat("15xmfK1f1BnUWVaoZpjPWJmUHaexp8FHVs", is(equalTo(mtGoxBitcoinDepositAddress.getAddres()))); - } -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/WithdrawalResponseJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/WithdrawalResponseJSONTest.java deleted file mode 100644 index f9cabfe63..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/account/WithdrawalResponseJSONTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Mark van Cuijk mark@van-cuijk.nl - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.account; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.account.MtGoxWithdrawalResponse; - -/** - * Test MtGoxWithdrawalResponse JSON parsing - */ -public class WithdrawalResponseJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = WithdrawalResponseJSONTest.class.getResourceAsStream("/v1/account/example-withdrawal-response.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxWithdrawalResponse mtGoxWithdrawalResponse = mapper.readValue(is, MtGoxWithdrawalResponse.class); - - System.out.println(mtGoxWithdrawalResponse.toString()); - - // Verify that the example data was unmarshalled correctly - assertThat("9921d2c5abecfd3604e921888b32e48256c914156cc76c4c8eca1ad2709b48e6", is(equalTo(mtGoxWithdrawalResponse.getTransactionId()))); - } -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/DepthJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/DepthJSONTest.java deleted file mode 100644 index 26d2631de..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/DepthJSONTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.polling; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepth; - -/** - * Test MtGoxDepth JSON parsing - */ -public class DepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = DepthJSONTest.class.getResourceAsStream("/v1/marketdata/polling/example-depth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxDepth mtGoxDepth = mapper.readValue(is, MtGoxDepth.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", mtGoxDepth.getAsks().get(0).getAmountInt(), equalTo(246297453L)); - assertThat(mtGoxDepth.getFilterMaxPrice().getValueInt(), equalTo(20021100L)); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/FullDepthJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/FullDepthJSONTest.java deleted file mode 100644 index bd29a8fe4..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/FullDepthJSONTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.polling; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepth; - -/** - * Test MtGoxFullDepth JSON parsing - */ -public class FullDepthJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FullDepthJSONTest.class.getResourceAsStream("/v1/marketdata/polling/example-fulldepth-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxDepth mtGoxFullDepth = mapper.readValue(is, MtGoxDepth.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", mtGoxFullDepth.getAsks().get(0).getAmountInt(), equalTo(727610000L)); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TickerJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TickerJSONTest.java deleted file mode 100644 index 7b633d2b8..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TickerJSONTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.polling; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTicker; - -/** - * Test MtGoxTicker JSON parsing - */ -public class TickerJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TickerJSONTest.class.getResourceAsStream("/v1/marketdata/polling/example-ticker-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - - MtGoxTicker mtGoxTicker = mapper.readValue(is, MtGoxTicker.class); - - System.out.println(mtGoxTicker.toString()); - - // Verify that the example data was unmarshalled correctly - assertThat(mtGoxTicker.getLast().getValue(), is(equalTo(new BigDecimal("91.46000")))); - assertThat(mtGoxTicker.getNow(), is(equalTo(1364669160478556L))); - } - -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TradesJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TradesJSONTest.java deleted file mode 100644 index 76b3d8a71..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/polling/TradesJSONTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.polling; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; - -/** - * Test MtGoxTrade[] JSON parsing - */ -public class TradesJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TradesJSONTest.class.getResourceAsStream("/v1/marketdata/polling/example-trades-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxTrade[] mtGoxTrades = mapper.readValue(is, MtGoxTrade[].class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", mtGoxTrades[0].getPriceInt(), equalTo(19399989L)); - // System.out.println(mtGoxTrades[0].toString()); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/DepthUpdateJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/DepthUpdateJSONTest.java deleted file mode 100644 index c0b2b6d1a..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/DepthUpdateJSONTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.streaming; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; - -import org.junit.Test; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxDepthUpdate; - -/** - * Test MtGoxDepthStream JSON parsing - */ -public class DepthUpdateJSONTest { - - @Test - public void testStreamingUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = DepthUpdateJSONTest.class.getResourceAsStream("/v1/marketdata/streaming/example-depth-streaming-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - Map userInMap = mapper.readValue(is, new TypeReference>() { - }); - - MtGoxDepthUpdate mtGoxDepthUpdate = mapper.readValue(mapper.writeValueAsString(userInMap.get("depth")), MtGoxDepthUpdate.class); - - // Verify that the example data was unmarshalled correctly - assertThat(mtGoxDepthUpdate.getPriceInt(), equalTo(6250000L)); - assertThat(mtGoxDepthUpdate.getCurrency(), equalTo("USD")); - - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TickerJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TickerJSONTest.java deleted file mode 100644 index 4e7b2243a..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TickerJSONTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.streaming; - -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.util.Map; - -import org.junit.Test; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTicker; - -/** - * Test MtGoxTicker JSON parsing - */ -public class TickerJSONTest { - - @Test - public void testStreamingUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TickerJSONTest.class.getResourceAsStream("/v1/marketdata/streaming/example-ticker-streaming-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - - Map userInMap = mapper.readValue(is, new TypeReference>() { - }); - - // Use Jackson to parse it - mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxTicker mtGoxTicker = mapper.readValue(mapper.writeValueAsString(userInMap.get("ticker")), MtGoxTicker.class); - - // Verify that the example data was unmarshalled correctly - assertThat("Unexpected Return Buy value", mtGoxTicker.getBuy().getValue(), equalTo(new BigDecimal("90.78469"))); - assertThat(mtGoxTicker.getNow(), equalTo(1364667533416136L)); - - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TradeJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TradeJSONTest.java deleted file mode 100644 index 8f5605a45..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/marketdata/streaming/TradeJSONTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.marketdata.streaming; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; - -import org.junit.Test; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.marketdata.MtGoxTrade; - -/** - * Test MtGoxDepthStream JSON parsing - */ -public class TradeJSONTest { - - @Test - public void testStreamingUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TradeJSONTest.class.getResourceAsStream("/v1/marketdata/streaming/example-trade-streaming-data.json"); - - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - Map userInMap = mapper.readValue(is, new TypeReference>() { - }); - - MtGoxTrade mtGoxTrade = mapper.readValue(mapper.writeValueAsString(userInMap.get("trade")), MtGoxTrade.class); - - // Verify that the example data was unmarshalled correctly - assertThat(mtGoxTrade.getPriceInt(), equalTo(9079995L)); - assertThat(mtGoxTrade.getAmountInt(), equalTo(1851242L)); - - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/FailureMessageJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/FailureMessageJSONTest.java deleted file mode 100644 index c97ff3b4e..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/FailureMessageJSONTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.trade; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxGenericResponse; - -/** - * Test MtGoxGenericResponse JSON parsing - */ -public class FailureMessageJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = FailureMessageJSONTest.class.getResourceAsStream("/v1/trade/example-failure-response-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxGenericResponse mtGoxGenericResponse = mapper.readValue(is, MtGoxGenericResponse.class); - - // System.out.println(mtGoxGenericResponse.getResult()); - - // Verify that the example data was unmarshalled correctly - assertTrue(mtGoxGenericResponse.getResult().equals("error")); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/OpenOrdersJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/OpenOrdersJSONTest.java deleted file mode 100644 index 3f4f66875..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/OpenOrdersJSONTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.trade; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxOpenOrder; - -/** - * Test MtGoxOpenOrders JSON parsing - */ -public class OpenOrdersJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = OpenOrdersJSONTest.class.getResourceAsStream("/v1/trade/example-openorders-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - MtGoxOpenOrder[] mtGoxOpenOrders = mapper.readValue(is, MtGoxOpenOrder[].class); - - // System.out.println(mtGoxOpenOrders[0].getOid()); - - // Verify that the example data was unmarshalled correctly - assertTrue(mtGoxOpenOrders[0].getOid().equals("055e81e4-fe38-4b3c-bbca-69e61724f64a")); - } -} diff --git a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/SuccessMessageJSONTest.java b/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/SuccessMessageJSONTest.java deleted file mode 100644 index ee4c5cee1..000000000 --- a/xchange-mtgox/src/test/java/com/xeiam/xchange/mtgox/v1/service/trade/SuccessMessageJSONTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.mtgox.v1.service.trade; - -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xeiam.xchange.mtgox.v1.dto.trade.MtGoxGenericResponse; - -/** - * Test MtGoxGenericResponse JSON parsing - */ -public class SuccessMessageJSONTest { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = SuccessMessageJSONTest.class.getResourceAsStream("/v1/trade/example-success-response-data.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - MtGoxGenericResponse mtGoxGenericResponse = mapper.readValue(is, MtGoxGenericResponse.class); - - // System.out.println(mtGoxGenericResponse.getResult()); - - // Verify that the example data was unmarshalled correctly - assertTrue(mtGoxGenericResponse.getResult().equals("success")); - } -} diff --git a/xchange-mtgox/src/test/resources/logback.xml b/xchange-mtgox/src/test/resources/logback.xml deleted file mode 100644 index b4b70ab10..000000000 --- a/xchange-mtgox/src/test/resources/logback.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - %d{HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{36} - %msg %xEx%n - - - - - - - log/xchange-mtgox-detail.log - - - - log/xchange-mtgox-detail-%d{yyyy-MM-dd}.%i.log.gz - - 100MB - - 7 - - - - - %d{HH:mm:ss.SSS} ${HOSTNAME} [%thread] %-5level %logger{36} - %msg %xEx%n - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v0/marketdata/example-depth-data-v0.json b/xchange-mtgox/src/test/resources/v0/marketdata/example-depth-data-v0.json deleted file mode 100644 index 703695d20..000000000 --- a/xchange-mtgox/src/test/resources/v0/marketdata/example-depth-data-v0.json +++ /dev/null @@ -1,1551 +0,0 @@ -{ "asks" : [ [ 16.634, - 21.989000000000001 - ], - [ 16.666599999999999, - 3.6909561000000002 - ], - [ 16.667000000000002, - 0.16261285 - ], - [ 16.678979999999999, - 14.20543178 - ], - [ 16.678999999999998, - 17 - ], - [ 16.68, - 2 - ], - [ 16.690000000000001, - 5 - ], - [ 16.698, - 5 - ], - [ 16.698779999999999, - 1.80606008 - ], - [ 16.698789999999999, - 25.6920991 - ], - [ 16.698799999999999, - 45.457220040000003 - ], - [ 16.699000000000002, - 0.87730399999999997 - ], - [ 16.69999, - 195.4384522 - ], - [ 16.728000000000002, - 59.972499999999997 - ], - [ 16.728999999999999, - 10 - ], - [ 16.73, - 0.10000000000000001 - ], - [ 16.74999, - 10.727 - ], - [ 16.75, - 268.5994 - ], - [ 16.755500000000001, - 5 - ], - [ 16.800000000000001, - 210 - ], - [ 16.80115, - 0.031410880000000002 - ], - [ 16.812159999999999, - 0.02855535 - ], - [ 16.824269999999999, - 0.03800717 - ], - [ 16.828320000000001, - 0.033626700000000002 - ], - [ 16.829930000000001, - 246.28337153000001 - ], - [ 16.836490000000001, - 0.039946240000000001 - ], - [ 16.84601, - 89.971000000000004 - ], - [ 16.847010000000001, - 0.96933906000000003 - ], - [ 16.847950000000001, - 0.04332043 - ], - [ 16.850000000000001, - 18.986000000000001 - ], - [ 16.851009999999999, - 0.054156129999999997 - ], - [ 16.858170000000001, - 0.058069599999999999 - ], - [ 16.860520000000001, - 0.047016000000000002 - ], - [ 16.862570000000002, - 0.074065220000000001 - ], - [ 16.865539999999999, - 0.016619999999999999 - ], - [ 16.870000000000001, - 5.96 - ], - [ 16.88514, - 19.67049755 - ], - [ 16.885149999999999, - 6.7039900000000001 - ], - [ 16.885870000000001, - 0.10843888 - ], - [ 16.892399999999999, - 0.061894930000000001 - ], - [ 16.899000000000001, - 2.8479999999999999 - ], - [ 16.89911, - 28.010000000000002 - ], - [ 16.899989999999999, - 14.15 - ], - [ 16.899999999999999, - 30.678344979999999 - ], - [ 16.90436, - 99 - ], - [ 16.904399999999999, - 171.07458849 - ], - [ 16.908999999999999, - 10 - ], - [ 16.909990000000001, - 21.067394329999999 - ], - [ 16.91, - 294.31587898999999 - ], - [ 16.91629, - 0.019029999999999998 - ], - [ 16.917999999999999, - 10 - ], - [ 16.919830000000001, - 0.07324928 - ], - [ 16.920000000000002, - 14 - ], - [ 16.921279999999999, - 0.051189999999999999 - ], - [ 16.92238, - 0.081720730000000005 - ], - [ 16.9299, - 10 - ], - [ 16.93, - 92.505911800000007 - ], - [ 16.936990000000002, - 50.216321899999997 - ], - [ 16.937000000000001, - 42.63407393 - ], - [ 16.939800000000002, - 333 - ], - [ 16.939990000000002, - 183.47 - ], - [ 16.940000000000001, - 1016 - ], - [ 16.949999999999999, - 118 - ], - [ 16.958480000000002, - 0.16131999999999999 - ], - [ 16.959, - 249 - ], - [ 16.960000000000001, - 2149.89406302 - ], - [ 16.965450000000001, - 0.1067138 - ], - [ 16.967189999999999, - 0.021909999999999999 - ], - [ 16.968800000000002, - 3.29039064 - ], - [ 16.969580000000001, - 7.3507800000000003 - ], - [ 16.97279, - 0.17891778 - ], - [ 16.978000000000002, - 5 - ], - [ 16.979990000000001, - 20 - ], - [ 16.98, - 420.85810436000003 - ], - [ 16.981400000000001, - 1 - ], - [ 16.9832, - 0.12463 - ], - [ 16.983470000000001, - 0.21573999999999999 - ], - [ 16.983509999999999, - 0.054010000000000002 - ], - [ 16.988409999999998, - 0.039690000000000003 - ], - [ 16.989799999999999, - 1 - ], - [ 16.989989999999999, - 268.85000000000002 - ], - [ 16.989999999999998, - 435.62 - ], - [ 16.994219999999999, - 0.05851 - ], - [ 16.995000000000001, - 15 - ], - [ 16.997, - 152.97100986999999 - ], - [ 16.998000000000001, - 10 - ], - [ 16.99888, - 1.2623603000000001 - ], - [ 16.998999999999999, - 8.2599999999999998 - ], - [ 16.99934, - 0.27496999999999999 - ], - [ 16.999849999999999, - 100 - ], - [ 16.9999, - 50 - ], - [ 17, - 2991.5305705999999 - ], - [ 17.003360000000001, - 0.26234343999999998 - ], - [ 17.004580000000001, - 0.23839716 - ], - [ 17.010000000000002, - 0.29999999999999999 - ], - [ 17.013400000000001, - 2.2371629199999998 - ], - [ 17.01699, - 0.50749 - ], - [ 17.018239999999999, - 0.033250000000000002 - ], - [ 17.02, - 1 - ], - [ 17.022010000000002, - 0.018790000000000001 - ], - [ 17.030000000000001, - 0.29999999999999999 - ], - [ 17.033280000000001, - 0.012120000000000001 - ], - [ 17.043299999999999, - 0.049680000000000002 - ], - [ 17.050000000000001, - 7.7000000000000002 - ], - [ 17.051179999999999, - 0.043990000000000001 - ], - [ 17.05443, - 7.9943299999999997 - ], - [ 17.060880000000001, - 0.047660000000000001 - ], - [ 17.065049999999999, - 1.24119 - ], - [ 17.067599999999999, - 0.44520999999999999 - ], - [ 17.069040000000001, - 0.086099999999999996 - ], - [ 17.06945, - 0.03508 - ], - [ 17.07, - 0.29999999999999999 - ], - [ 17.074770000000001, - 0.061850000000000002 - ], - [ 17.085740000000001, - 0.74045000000000005 - ], - [ 17.088999999999999, - 25 - ], - [ 17.0898, - 1 - ], - [ 17.09, - 6.9848379999999999 - ], - [ 17.098490000000002, - 0.48873 - ], - [ 17.100000000000001, - 103.77 - ], - [ 17.106829999999999, - 1.1124717900000001 - ], - [ 17.109999999999999, - 0.29999999999999999 - ], - [ 17.111999999999998, - 0.80000000000000004 - ], - [ 17.119990000000001, - 5.2699999999999996 - ], - [ 17.120000000000001, - 5.9500000000000002 - ], - [ 17.120180000000001, - 0.21682000000000001 - ], - [ 17.120809999999999, - 0.036909999999999998 - ], - [ 17.12978, - 0.50641000000000003 - ], - [ 17.129999999999999, - 0.29999999999999999 - ], - [ 17.130600000000001, - 0.038980000000000001 - ], - [ 17.13195, - 0.53571000000000002 - ], - [ 17.142569999999999, - 0.070940000000000003 - ], - [ 17.149989999999999, - 5 - ], - [ 17.149999999999999, - 0.90000000000000002 - ], - [ 17.153320000000001, - 31.748431220000001 - ], - [ 17.154109999999999, - 0.077689999999999995 - ], - [ 17.15474, - 0.13408 - ], - [ 17.15502, - 0.23730999999999999 - ], - [ 17.155059999999999, - 0.061429999999999998 - ], - [ 17.165880000000001, - 0.062960000000000002 - ], - [ 17.168189999999999, - 0.58638999999999997 - ], - [ 17.170000000000002, - 0.29999999999999999 - ], - [ 17.171050000000001, - 0.29500999999999999 - ], - [ 17.172329999999999, - 0.038739999999999997 - ], - [ 17.176400000000001, - 0.5 - ], - [ 17.18, - 179.59 - ], - [ 17.189, - 1.865 - ], - [ 17.189800000000002, - 1 - ], - [ 17.193950000000001, - 0.021569999999999999 - ], - [ 17.199999999999999, - 22.428185549999998 - ], - [ 17.20533, - 0.012630000000000001 - ], - [ 17.206579999999999, - 59.9803 - ], - [ 17.207460000000001, - 0.64105999999999996 - ], - [ 17.20795, - 262.45182662000002 - ], - [ 17.210000000000001, - 50.299999999999997 - ], - [ 17.21546, - 0.055469999999999998 - ], - [ 17.219999999999999, - 5.8399999999999999 - ], - [ 17.224, - 0.040559999999999999 - ], - [ 17.228560000000002, - 0.096170000000000005 - ], - [ 17.23, - 0.29999999999999999 - ], - [ 17.23321, - 0.049180000000000001 - ], - [ 17.2347, - 1.6699999999999999 - ], - [ 17.23742, - 1.3348500000000001 - ], - [ 17.242090000000001, - 5 - ], - [ 17.247240000000001, - 0.066989999999999994 - ], - [ 17.248919999999998, - 13.83055942 - ], - [ 17.248999999999999, - 7.2699999999999996 - ], - [ 17.24999, - 2 - ], - [ 17.25, - 28.600616980000002 - ], - [ 17.256309999999999, - 0.081900000000000001 - ], - [ 17.25637, - 0.031300000000000001 - ], - [ 17.258320000000001, - 0.79705000000000004 - ], - [ 17.27, - 1.3 - ], - [ 17.275829999999999, - 0.042369999999999998 - ], - [ 17.276230000000002, - 0.46171299999999998 - ], - [ 17.277940000000001, - 46 - ], - [ 17.288489999999999, - 0.010449999999999999 - ], - [ 17.2898, - 11 - ], - [ 17.28989, - 0.015699999999999999 - ], - [ 17.289999999999999, - 16 - ], - [ 17.293109999999999, - 0.23077 - ], - [ 17.300000000000001, - 20.75 - ], - [ 17.302810000000001, - 0.53205000000000002 - ], - [ 17.303640000000001, - 0.042189999999999998 - ], - [ 17.309999999999999, - 0.29999999999999999 - ], - [ 17.312000000000001, - 0.80000000000000004 - ], - [ 17.314340000000001, - 0.00086260999999999998 - ], - [ 17.32732, - 0.16769999999999999 - ], - [ 17.327809999999999, - 0.044179999999999997 - ], - [ 17.328019999999999, - 0.14344000000000001 - ], - [ 17.328299999999999, - 0.26221 - ], - [ 17.32835, - 0.069159999999999999 - ], - [ 17.329999999999998, - 0.29999999999999999 - ] - ], - "bids" : [ [ 16.001799999999999, - 6.5429000000000004 - ], - [ 16.001809999999999, - 1.6247 - ], - [ 16.001999999999999, - 10 - ], - [ 16.00339, - 0.2036299 - ], - [ 16.007490000000001, - 0.01010465 - ], - [ 16.008120000000002, - 0.96989999999999998 - ], - [ 16.010000000000002, - 81.263000000000005 - ], - [ 16.010020000000001, - 0.11409999999999999 - ], - [ 16.0105, - 15 - ], - [ 16.010999999999999, - 27.100000000000001 - ], - [ 16.012, - 1.5 - ], - [ 16.013190000000002, - 0.20362988000000001 - ], - [ 16.014800000000001, - 10 - ], - [ 16.014810000000001, - 1.6234 - ], - [ 16.0154, - 1.24 - ], - [ 16.015999999999998, - 0.030099999999999998 - ], - [ 16.016010000000001, - 0.01721 - ], - [ 16.02, - 23 - ], - [ 16.020009999999999, - 0.057729999999999997 - ], - [ 16.0213, - 0.46999999999999997 - ], - [ 16.021599999999999, - 1.6899999999999999 - ], - [ 16.022200000000002, - 10.352 - ], - [ 16.02299, - 0.20362986 - ], - [ 16.02364, - 0.96899999999999997 - ], - [ 16.025359999999999, - 6.2000000000000002 - ], - [ 16.02638, - 0.14893000000000001 - ], - [ 16.02675, - 7.9592000000000001 - ], - [ 16.026769999999999, - 0.14033698 - ], - [ 16.027799999999999, - 9 - ], - [ 16.027809999999999, - 1.6221000000000001 - ], - [ 16.030000000000001, - 0.30299999999999999 - ], - [ 16.031700000000001, - 1 - ], - [ 16.032260000000001, - 8 - ], - [ 16.032789999999999, - 0.20362984000000001 - ], - [ 16.037929999999999, - 0.01012557 - ], - [ 16.039169999999999, - 0.96809999999999996 - ], - [ 16.039999999999999, - 24.30089027 - ], - [ 16.04081, - 1.6207 - ], - [ 16.042110000000001, - 60.0105 - ], - [ 16.042590000000001, - 0.20362981999999999 - ], - [ 16.043900000000001, - 4 - ], - [ 16.048999999999999, - 0.5 - ], - [ 16.050000000000001, - 367.38336136999999 - ], - [ 16.051369999999999, - 0.046309999999999997 - ], - [ 16.052099999999999, - 461.30648637000002 - ], - [ 16.052389999999999, - 0.20362980999999999 - ], - [ 16.052499999999998, - 20.369375959999999 - ], - [ 16.053799999999999, - 20 - ], - [ 16.053809999999999, - 1.6194 - ], - [ 16.0547, - 0.96709999999999996 - ], - [ 16.055009999999999, - 0.27431 - ], - [ 16.05639, - 50 - ], - [ 16.05819, - 0.1082 - ], - [ 16.059999999999999, - 14.42628206 - ], - [ 16.061350000000001, - 85.799999999999997 - ], - [ 16.062190000000001, - 0.20362979 - ], - [ 16.062799999999999, - 0.08825653 - ], - [ 16.063040000000001, - 33.396099999999997 - ], - [ 16.0656, - 0.28000000000000003 - ], - [ 16.06681, - 1.6181000000000001 - ], - [ 16.067240000000002, - 0.33000000000000002 - ], - [ 16.068359999999998, - 0.01010465 - ], - [ 16.0688, - 4.79 - ], - [ 16.069400000000002, - 0.93145999999999995 - ], - [ 16.07, - 0.30299999999999999 - ], - [ 16.070219999999999, - 0.96619999999999995 - ], - [ 16.071339999999999, - 0.44592999999999999 - ], - [ 16.07199, - 0.20362976999999999 - ], - [ 16.074929999999998, - 0.079880000000000007 - ], - [ 16.079809999999998, - 1.6168 - ], - [ 16.079999999999998, - 20 - ], - [ 16.08032, - 0.12647 - ], - [ 16.081790000000002, - 0.20362975 - ], - [ 16.085750000000001, - 0.96530000000000005 - ], - [ 16.085999999999999, - 0.015169999999999999 - ], - [ 16.086010000000002, - 0.095880000000000007 - ], - [ 16.086400000000001, - 0.088127070000000002 - ], - [ 16.088999999999999, - 1.8700000000000001 - ], - [ 16.09159, - 0.20362973000000001 - ], - [ 16.092099999999999, - 15 - ], - [ 16.09281, - 1.6154999999999999 - ], - [ 16.09404, - 0.19778000000000001 - ], - [ 16.094090000000001, - 11.61329976 - ], - [ 16.094200000000001, - 3 - ], - [ 16.097999999999999, - 3.0299999999999998 - ], - [ 16.098009999999999, - 0.59138343999999998 - ], - [ 16.098790000000001, - 0.01010465 - ], - [ 16.099, - 2.1000000000000001 - ], - [ 16.099399999999999, - 1.6471899999999999 - ], - [ 16.099799999999998, - 0.47999999999999998 - ], - [ 16.099900000000002, - 1 - ], - [ 16.100000000000001, - 2554.3010421099998 - ], - [ 16.100010000000001, - 152 - ], - [ 16.100999999999999, - 1 - ], - [ 16.101389999999999, - 0.20362971999999999 - ], - [ 16.102, - 401.60000000000002 - ], - [ 16.103159999999999, - 0.088035349999999998 - ], - [ 16.105, - 15 - ], - [ 16.105789999999999, - 0.37585738000000002 - ], - [ 16.10651, - 0.10231999999999999 - ], - [ 16.109999999999999, - 51.277999999999999 - ], - [ 16.110130000000002, - 0.62344646000000004 - ], - [ 16.111190000000001, - 0.2036297 - ], - [ 16.119330000000001, - 1 - ], - [ 16.12039, - 0.21573999999999999 - ], - [ 16.120989999999999, - 0.20362967000000001 - ], - [ 16.127369999999999, - 0.046539999999999998 - ], - [ 16.127379999999999, - 0.15731999999999999 - ], - [ 16.127680000000002, - 0.50019000000000002 - ], - [ 16.12922, - 0.01012624 - ], - [ 16.130790000000001, - 0.20362965999999999 - ], - [ 16.131740000000001, - 0.13458000000000001 - ], - [ 16.14059, - 0.20362964 - ], - [ 16.141120000000001, - 0.014710000000000001 - ], - [ 16.146000000000001, - 0.10000000000000001 - ], - [ 16.14883, - 1 - ], - [ 16.149999999999999, - 730.10029999999995 - ], - [ 16.150390000000002, - 0.20362962000000001 - ], - [ 16.151, - 5 - ], - [ 16.151199999999999, - 0.028299999999999999 - ], - [ 16.151509999999998, - 500 - ], - [ 16.152999999999999, - 5 - ], - [ 16.154969999999999, - 0.10732 - ], - [ 16.155000000000001, - 12.130000000000001 - ], - [ 16.15645, - 0.084750000000000006 - ], - [ 16.157959999999999, - 10 - ], - [ 16.159659999999999, - 0.01012594 - ], - [ 16.16, - 101.2 - ], - [ 16.16019, - 0.20362959999999999 - ], - [ 16.160340000000001, - 0.048160000000000001 - ], - [ 16.160830000000001, - 0.64448000000000005 - ], - [ 16.16499, - 5.6313000000000004 - ], - [ 16.169989999999999, - 0.20362959 - ], - [ 16.170000000000002, - 170.13422201 - ], - [ 16.176649999999999, - 0.23000000000000001 - ], - [ 16.177779999999998, - 0.02563 - ], - [ 16.177790000000002, - 0.015810000000000001 - ], - [ 16.17877, - 8.2027900000000002 - ], - [ 16.179790000000001, - 0.20362957000000001 - ], - [ 16.180019999999999, - 169.62552579999999 - ], - [ 16.181830000000001, - 0.048379999999999999 - ], - [ 16.183440000000001, - 6.1399999999999997 - ], - [ 16.189589999999999, - 0.20362954999999999 - ], - [ 16.190090000000001, - 0.010125540000000001 - ], - [ 16.195, - 0.59999999999999998 - ], - [ 16.198899999999998, - 0.55000000000000004 - ], - [ 16.199390000000001, - 0.20362953 - ], - [ 16.199999999999999, - 166.41969134999999 - ], - [ 16.202999999999999, - 5.9060540000000001 - ], - [ 16.203589999999998, - 20.10191 - ], - [ 16.204239999999999, - 0.061940000000000002 - ], - [ 16.20919, - 0.20362952000000001 - ], - [ 16.2121, - 5 - ], - [ 16.213509999999999, - 0.038370000000000001 - ], - [ 16.214200000000002, - 10.352 - ], - [ 16.217549999999999, - 8.7318050700000001 - ], - [ 16.218990000000002, - 0.20362949999999999 - ], - [ 16.22052, - 0.010125139999999999 - ], - [ 16.222829999999998, - 200 - ], - [ 16.223109999999998, - 148.90887813000001 - ], - [ 16.228490000000001, - 45.113300000000002 - ], - [ 16.2285, - 0.48182999999999998 - ], - [ 16.231719999999999, - 0.78491 - ], - [ 16.23368, - 0.36846000000000001 - ], - [ 16.234680000000001, - 20 - ], - [ 16.237300000000001, - 0.065809999999999994 - ], - [ 16.242709999999999, - 0.31542999999999999 - ], - [ 16.244, - 0.59999999999999998 - ], - [ 16.248480000000001, - 0.01273 - ], - [ 16.25, - 13.124584609999999 - ], - [ 16.25095, - 0.01012468 - ], - [ 16.25234, - 0.090090000000000003 - ], - [ 16.253, - 5 - ], - [ 16.256609999999998, - 0.16733000000000001 - ], - [ 16.25966, - 7.5202600000000004 - ], - [ 16.260000000000002, - 20.25 - ], - [ 16.26069, - 0.43753999999999998 - ], - [ 16.26202, - 1.48573 - ], - [ 16.27, - 107.68613829 - ], - [ 16.270250000000001, - 99 - ], - [ 16.281389999999998, - 0.01012418 - ], - [ 16.28322, - 0.21725 - ], - [ 16.287600000000001, - 0.01329456 - ], - [ 16.289870000000001, - 0.44469999999999998 - ], - [ 16.290279999999999, - 0.17459 - ], - [ 16.290590000000002, - 0.40072000000000002 - ], - [ 16.292999999999999, - 0.59999999999999998 - ], - [ 16.300000000000001, - 15.08444723 - ], - [ 16.30124, - 0.08448 - ], - [ 16.30198, - 83.562899999999999 - ], - [ 16.303000000000001, - 5 - ], - [ 16.30416, - 0.0121 - ], - [ 16.309999999999999, - 0.10000000000000001 - ], - [ 16.311599999999999, - 0.33000000000000002 - ], - [ 16.311820000000001, - 0.01012357 - ], - [ 16.314340000000001, - 0.023769999999999999 - ], - [ 16.3155, - 0.36381000000000002 - ], - [ 16.31964, - 0.069309999999999997 - ], - [ 16.322310000000002, - 8.2070299999999996 - ], - [ 16.32358, - 0.038640000000000001 - ], - [ 16.335360000000001, - 100 - ], - [ 16.34, - 153.15369154999999 - ], - [ 16.340959999999999, - 6.8411299999999997 - ], - [ 16.341000000000001, - 0.20000000000000001 - ], - [ 16.341190000000001, - 0.02121 - ], - [ 16.341200000000001, - 0.01298 - ], - [ 16.341519999999999, - 6.0800000000000001 - ], - [ 16.34225, - 0.010122890000000001 - ], - [ 16.343869999999999, - 0.10000000000000001 - ], - [ 16.343879999999999, - 0.40000000000000002 - ], - [ 16.344760000000001, - 0.1115 - ], - [ 16.345279999999999, - 0.039120000000000002 - ], - [ 16.350000000000001, - 85.661214049999998 - ], - [ 16.350290000000001, - 0.085779999999999995 - ], - [ 16.351099999999999, - 0.23999999999999999 - ], - [ 16.353000000000002, - 5 - ], - [ 16.359000000000002, - 50 - ], - [ 16.359670000000001, - 0.10000000000000001 - ], - [ 16.359680000000001, - 0.10000000000000001 - ], - [ 16.3599, - 0.29999999999999999 - ], - [ 16.360029999999998, - 1.772e-05 - ], - [ 16.362269999999999, - 0.10000000000000001 - ], - [ 16.367909999999998, - 0.048090000000000001 - ], - [ 16.372679999999999, - 0.010101819999999999 - ], - [ 16.375, - 35 - ], - [ 16.377279999999999, - 0.030509999999999999 - ], - [ 16.38786, - 1 - ], - [ 16.390000000000001, - 0.59999999999999998 - ], - [ 16.395669999999999, - 0.62543000000000004 - ], - [ 16.397269999999999, - 0.42999999999999999 - ], - [ 16.397649999999999, - 0.32751999999999998 - ], - [ 16.39949, - 0.080430000000000001 - ], - [ 16.399999999999999, - 10.699999999999999 - ], - [ 16.401319999999998, - 0.051880000000000003 - ], - [ 16.4025, - 200 - ], - [ 16.402999999999999, - 5 - ], - [ 16.403120000000001, - 0.010111719999999999 - ], - [ 16.403929999999999, - 8.1721699999999995 - ], - [ 16.407520000000002, - 0.57916199000000002 - ], - [ 16.41, - 269.5 - ], - [ 16.412489999999998, - 0.29027999999999998 - ], - [ 16.412610000000001, - 0.01008 - ], - [ 16.414899999999999, - 0.18934999999999999 - ], - [ 16.41958, - 32.657794789999997 - ], - [ 16.420809999999999, - 0.1258 - ], - [ 16.42266, - 6.8071299999999999 - ], - [ 16.422799999999999, - 0.95999999999999996 - ], - [ 16.424199999999999, - 5 - ], - [ 16.426290000000002, - 1.32589 - ], - [ 16.433009999999999, - 7.798 - ], - [ 16.43355, - 0.01011131 - ], - [ 16.436859999999999, - 0.073469999999999994 - ], - [ 16.439, - 0.59999999999999998 - ], - [ 16.447700000000001, - 0.19034999999999999 - ], - [ 16.448840000000001, - 0.0751 - ], - [ 16.449839999999998, - 89.972499999999997 - ], - [ 16.452999999999999, - 5 - ], - [ 16.454820000000002, - 0.03397 - ], - [ 16.454830000000001, - 0.10691000000000001 - ], - [ 16.45514, - 0.30225000000000002 - ], - [ 16.456130000000002, - 11.937824470000001 - ], - [ 16.4572, - 0.096310000000000007 - ], - [ 16.462299999999999, - 0.39000000000000001 - ], - [ 16.479130000000001, - 0.019290000000000002 - ], - [ 16.48, - 38.32251213 - ], - [ 16.484490000000001, - 0.054030000000000002 - ], - [ 16.485949999999999, - 7.53118 - ], - [ 16.488, - 0.59999999999999998 - ], - [ 16.48846, - 0.02921 - ], - [ 16.491, - 100 - ], - [ 16.498339999999999, - 0.069790000000000005 - ], - [ 16.5, - 53.737067269999997 - ], - [ 16.500119999999999, - 99 - ], - [ 16.501000000000001, - 59.996400000000001 - ], - [ 16.503, - 5 - ], - [ 16.50301, - 28.59501448 - ], - [ 16.506250000000001, - 0.016830000000000001 - ], - [ 16.506260000000001, - 0.01018 - ], - [ 16.508009999999999, - 0.70091537999999998 - ], - [ 16.50948, - 6.0199999999999996 - ], - [ 16.510380000000001, - 0.029960000000000001 - ], - [ 16.51379, - 0.10377 - ], - [ 16.52, - 60 - ], - [ 16.5212, - 55 - ], - [ 16.524999999999999, - 100 - ], - [ 16.525200000000002, - 5 - ], - [ 16.533249999999999, - 0.034380000000000001 - ], - [ 16.5365, - 0.085580000000000003 - ], - [ 16.536999999999999, - 0.59999999999999998 - ], - [ 16.54271, - 0.02273 - ], - [ 16.546209999999999, - 0.47962285999999998 - ], - [ 16.547979999999999, - 0.064490000000000006 - ], - [ 16.550000000000001, - 6.5 - ], - [ 16.553000000000001, - 5 - ], - [ 16.558530000000001, - 0.71660005999999998 - ], - [ 16.56128, - 0.51483000000000001 - ], - [ 16.561540000000001, - 35.719326819999999 - ], - [ 16.562639999999998, - 0.79263802999999999 - ], - [ 16.563279999999999, - 0.25247000000000003 - ], - [ 16.565300000000001, - 0.33645786999999999 - ], - [ 16.566299999999998, - 59.911799999999999 - ], - [ 16.568380000000001, - 6.8933799999999996 - ], - [ 16.57535, - 0.43562176000000002 - ], - [ 16.57827, - 0.13250999999999999 - ], - [ 16.58175, - 0.60175846 - ], - [ 16.583919999999999, - 0.59339856000000002 - ], - [ 16.585000000000001, - 0.59999999999999998 - ], - [ 16.586639999999999, - 0.54319317 - ], - [ 16.58953, - 0.50733748999999995 - ], - [ 16.59066, - 0.16 - ], - [ 16.592210000000001, - 1.16764 - ], - [ 16.59778, - 0.059209999999999999 - ], - [ 16.598179999999999, - 0.49082176 - ], - [ 16.598880000000001, - 0.54144731999999995 - ], - [ 16.600000000000001, - 50.973132530000001 - ], - [ 16.602060000000002, - 0.54684591000000005 - ], - [ 16.602270000000001, - 0.66651355999999995 - ], - [ 16.603000000000002, - 5 - ], - [ 16.604369999999999, - 0.60353345000000003 - ], - [ 16.606560000000002, - 0.46103358 - ], - [ 16.606860000000001, - 0.50018894000000003 - ], - [ 16.60961, - 0.45070075999999998 - ], - [ 16.614100000000001, - 0.32721319999999998 - ], - [ 16.623000000000001, - 43.98991453 - ] - ] -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v0/marketdata/example-ticker-data-v0.json b/xchange-mtgox/src/test/resources/v0/marketdata/example-ticker-data-v0.json deleted file mode 100644 index b444dd2cd..000000000 --- a/xchange-mtgox/src/test/resources/v0/marketdata/example-ticker-data-v0.json +++ /dev/null @@ -1,11 +0,0 @@ -{ "ticker" : { "avg" : 16.369430127000001, - "buy" : 16.79036, - "high" : 16.98, - "last" : 16.800000000000001, - "last_all" : 16.868179999999999, - "last_local" : 16.800000000000001, - "low" : 15.634119999999999, - "sell" : 16.800000000000001, - "vol" : 60418, - "vwap" : 16.348098027999999 - } } \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v0/marketdata/example-trades-data-v0.json b/xchange-mtgox/src/test/resources/v0/marketdata/example-trades-data-v0.json deleted file mode 100644 index 4c77781bf..000000000 --- a/xchange-mtgox/src/test/resources/v0/marketdata/example-trades-data-v0.json +++ /dev/null @@ -1,6091 +0,0 @@ -[ { "amount" : "0.09910328", - "amount_int" : "9910328", - "date" : 1358803625, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358803625711331", - "trade_type" : "bid" - }, - { "amount" : "4.1689467", - "amount_int" : "416894670", - "date" : 1358803627, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358803627860900", - "trade_type" : "bid" - }, - { "amount" : "16.28137198", - "amount_int" : "1628137198", - "date" : 1358803635, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358803635420680", - "trade_type" : "bid" - }, - { "amount" : "9.98867752", - "amount_int" : "998867752", - "date" : 1358803635, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358803635508327", - "trade_type" : "bid" - }, - { "amount" : "0.29683587", - "amount_int" : "29683587", - "date" : 1358803801, - "item" : "BTC", - "price" : "16.78999", - "price_currency" : "USD", - "price_int" : "1678999", - "tid" : "1358803801792834", - "trade_type" : "bid" - }, - { "amount" : "1.70316413", - "amount_int" : "170316413", - "date" : 1358803801, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358803801925154", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358803804, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358803804030017", - "trade_type" : "ask" - }, - { "amount" : "2.64845741", - "amount_int" : "264845741", - "date" : 1358803815, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358803815204654", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358803817, - "item" : "BTC", - "price" : "16.75001", - "price_currency" : "USD", - "price_int" : "1675001", - "tid" : "1358803817423584", - "trade_type" : "ask" - }, - { "amount" : "4.65970094", - "amount_int" : "465970094", - "date" : 1358803846, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358803846457151", - "trade_type" : "bid" - }, - { "amount" : "3.48294212", - "amount_int" : "348294212", - "date" : 1358803846, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358803846528719", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358803848, - "item" : "BTC", - "price" : "16.75001", - "price_currency" : "USD", - "price_int" : "1675001", - "tid" : "1358803848772584", - "trade_type" : "ask" - }, - { "amount" : "0.04526105", - "amount_int" : "4526105", - "date" : 1358803860, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358803860065003", - "trade_type" : "bid" - }, - { "amount" : "5.35473895", - "amount_int" : "535473895", - "date" : 1358803860, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358803860133402", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358803865, - "item" : "BTC", - "price" : "16.75001", - "price_currency" : "USD", - "price_int" : "1675001", - "tid" : "1358803865057295", - "trade_type" : "ask" - }, - { "amount" : "11.9928511", - "amount_int" : "1199285110", - "date" : 1358803905, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358803905375184", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358803910, - "item" : "BTC", - "price" : "16.75002", - "price_currency" : "USD", - "price_int" : "1675002", - "tid" : "1358803910213157", - "trade_type" : "ask" - }, - { "amount" : "7", - "amount_int" : "700000000", - "date" : 1358803944, - "item" : "BTC", - "price" : "16.75002", - "price_currency" : "USD", - "price_int" : "1675002", - "tid" : "1358803944046133", - "trade_type" : "ask" - }, - { "amount" : "3.1980943", - "amount_int" : "319809430", - "date" : 1358803948, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358803948086838", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358803949, - "item" : "BTC", - "price" : "16.75002", - "price_currency" : "USD", - "price_int" : "1675002", - "tid" : "1358803949549325", - "trade_type" : "ask" - }, - { "amount" : "2", - "amount_int" : "200000000", - "date" : 1358803956, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358803956459814", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358803959, - "item" : "BTC", - "price" : "16.75002", - "price_currency" : "USD", - "price_int" : "1675002", - "tid" : "1358803959065945", - "trade_type" : "ask" - }, - { "amount" : "3", - "amount_int" : "300000000", - "date" : 1358804039, - "item" : "BTC", - "price" : "16.76002", - "price_currency" : "USD", - "price_int" : "1676002", - "tid" : "1358804039504339", - "trade_type" : "ask" - }, - { "amount" : "2", - "amount_int" : "200000000", - "date" : 1358804059, - "item" : "BTC", - "price" : "16.786", - "price_currency" : "USD", - "price_int" : "1678600", - "tid" : "1358804059303042", - "trade_type" : "ask" - }, - { "amount" : "7.55584396", - "amount_int" : "755584396", - "date" : 1358804141, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804141409151", - "trade_type" : "bid" - }, - { "amount" : "11.34037734", - "amount_int" : "1134037734", - "date" : 1358804141, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358804141507350", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804142, - "item" : "BTC", - "price" : "16.76002", - "price_currency" : "USD", - "price_int" : "1676002", - "tid" : "1358804142407985", - "trade_type" : "ask" - }, - { "amount" : "15.14", - "amount_int" : "1514000000", - "date" : 1358804203, - "item" : "BTC", - "price" : "16.76003", - "price_currency" : "USD", - "price_int" : "1676003", - "tid" : "1358804203664520", - "trade_type" : "ask" - }, - { "amount" : "6.33130415", - "amount_int" : "633130415", - "date" : 1358804243, - "item" : "BTC", - "price" : "16.76003", - "price_currency" : "USD", - "price_int" : "1676003", - "tid" : "1358804243659772", - "trade_type" : "ask" - }, - { "amount" : "2", - "amount_int" : "200000000", - "date" : 1358804243, - "item" : "BTC", - "price" : "16.76001", - "price_currency" : "USD", - "price_int" : "1676001", - "tid" : "1358804243714110", - "trade_type" : "ask" - }, - { "amount" : "2.62887887", - "amount_int" : "262887887", - "date" : 1358804243, - "item" : "BTC", - "price" : "16.76", - "price_currency" : "USD", - "price_int" : "1676000", - "tid" : "1358804243791049", - "trade_type" : "ask" - }, - { "amount" : "5.06992009", - "amount_int" : "506992009", - "date" : 1358804243, - "item" : "BTC", - "price" : "16.74999", - "price_currency" : "USD", - "price_int" : "1674999", - "tid" : "1358804243860779", - "trade_type" : "ask" - }, - { "amount" : "0.2987", - "amount_int" : "29870000", - "date" : 1358804244, - "item" : "BTC", - "price" : "16.74", - "price_currency" : "USD", - "price_int" : "1674000", - "tid" : "1358804244028912", - "trade_type" : "ask" - }, - { "amount" : "4.47", - "amount_int" : "447000000", - "date" : 1358804244, - "item" : "BTC", - "price" : "16.72998", - "price_currency" : "USD", - "price_int" : "1672998", - "tid" : "1358804244076366", - "trade_type" : "ask" - }, - { "amount" : "59.9207", - "amount_int" : "5992070000", - "date" : 1358804244, - "item" : "BTC", - "price" : "16.701", - "price_currency" : "USD", - "price_int" : "1670100", - "tid" : "1358804244592487", - "trade_type" : "ask" - }, - { "amount" : "1.54999601", - "amount_int" : "154999601", - "date" : 1358804244, - "item" : "BTC", - "price" : "16.7", - "price_currency" : "USD", - "price_int" : "1670000", - "tid" : "1358804244717165", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804244, - "item" : "BTC", - "price" : "16.7", - "price_currency" : "USD", - "price_int" : "1670000", - "tid" : "1358804244888807", - "trade_type" : "ask" - }, - { "amount" : "2", - "amount_int" : "200000000", - "date" : 1358804244, - "item" : "BTC", - "price" : "16.7", - "price_currency" : "USD", - "price_int" : "1670000", - "tid" : "1358804244954333", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804245, - "item" : "BTC", - "price" : "16.6905", - "price_currency" : "USD", - "price_int" : "1669050", - "tid" : "1358804245017155", - "trade_type" : "ask" - }, - { "amount" : "5.9984368", - "amount_int" : "599843680", - "date" : 1358804245, - "item" : "BTC", - "price" : "16.67101", - "price_currency" : "USD", - "price_int" : "1667101", - "tid" : "1358804245060242", - "trade_type" : "ask" - }, - { "amount" : "0.3354747", - "amount_int" : "33547470", - "date" : 1358804245, - "item" : "BTC", - "price" : "16.671", - "price_currency" : "USD", - "price_int" : "1667100", - "tid" : "1358804245153242", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804245, - "item" : "BTC", - "price" : "16.67", - "price_currency" : "USD", - "price_int" : "1667000", - "tid" : "1358804245238250", - "trade_type" : "ask" - }, - { "amount" : "209.86568938", - "amount_int" : "20986568938", - "date" : 1358804245, - "item" : "BTC", - "price" : "16.67", - "price_currency" : "USD", - "price_int" : "1667000", - "tid" : "1358804245295982", - "trade_type" : "ask" - }, - { "amount" : "22.3070669", - "amount_int" : "2230706690", - "date" : 1358804262, - "item" : "BTC", - "price" : "16.79897", - "price_currency" : "USD", - "price_int" : "1679897", - "tid" : "1358804262041015", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804262, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804262101107", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804329, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804329409655", - "trade_type" : "ask" - }, - { "amount" : "0.8", - "amount_int" : "80000000", - "date" : 1358804336, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804336756696", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804346, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804346881637", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804357, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804357598578", - "trade_type" : "ask" - }, - { "amount" : "5.7261243", - "amount_int" : "572612430", - "date" : 1358804361, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358804361534364", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804392, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804392614832", - "trade_type" : "ask" - }, - { "amount" : "0.31449826", - "amount_int" : "31449826", - "date" : 1358804421, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804421209374", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804424, - "item" : "BTC", - "price" : "16.67101", - "price_currency" : "USD", - "price_int" : "1667101", - "tid" : "1358804424956074", - "trade_type" : "ask" - }, - { "amount" : "1.02231609", - "amount_int" : "102231609", - "date" : 1358804457, - "item" : "BTC", - "price" : "16.67403", - "price_currency" : "USD", - "price_int" : "1667403", - "tid" : "1358804457363140", - "trade_type" : "ask" - }, - { "amount" : "0.33370766", - "amount_int" : "33370766", - "date" : 1358804458, - "item" : "BTC", - "price" : "16.79897", - "price_currency" : "USD", - "price_int" : "1679897", - "tid" : "1358804458814883", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804463, - "item" : "BTC", - "price" : "16.67404", - "price_currency" : "USD", - "price_int" : "1667404", - "tid" : "1358804463080727", - "trade_type" : "ask" - }, - { "amount" : "0.2412315", - "amount_int" : "24123150", - "date" : 1358804485, - "item" : "BTC", - "price" : "16.79799", - "price_currency" : "USD", - "price_int" : "1679799", - "tid" : "1358804485822922", - "trade_type" : "bid" - }, - { "amount" : "0.55927612", - "amount_int" : "55927612", - "date" : 1358804485, - "item" : "BTC", - "price" : "16.798", - "price_currency" : "USD", - "price_int" : "1679800", - "tid" : "1358804485906267", - "trade_type" : "bid" - }, - { "amount" : "0.34472128", - "amount_int" : "34472128", - "date" : 1358804485, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804485996538", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804489, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804489202184", - "trade_type" : "ask" - }, - { "amount" : "0.19762866", - "amount_int" : "19762866", - "date" : 1358804490, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804490139469", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804494, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804494671854", - "trade_type" : "ask" - }, - { "amount" : "0.1431518", - "amount_int" : "14315180", - "date" : 1358804511, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804511859585", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804511, - "item" : "BTC", - "price" : "16.79898", - "price_currency" : "USD", - "price_int" : "1679898", - "tid" : "1358804511924701", - "trade_type" : "bid" - }, - { "amount" : "16.0352312", - "amount_int" : "1603523120", - "date" : 1358804511, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358804511986031", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804512, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804512730117", - "trade_type" : "ask" - }, - { "amount" : "0.86964069", - "amount_int" : "86964069", - "date" : 1358804523, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358804523664418", - "trade_type" : "bid" - }, - { "amount" : "3.99756951", - "amount_int" : "399756951", - "date" : 1358804523, - "item" : "BTC", - "price" : "16.799", - "price_currency" : "USD", - "price_int" : "1679900", - "tid" : "1358804523712698", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804525, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804525276035", - "trade_type" : "ask" - }, - { "amount" : "11.4522587", - "amount_int" : "1145225870", - "date" : 1358804532, - "item" : "BTC", - "price" : "16.799", - "price_currency" : "USD", - "price_int" : "1679900", - "tid" : "1358804532608397", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804533, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804533102492", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358804543, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804543374738", - "trade_type" : "ask" - }, - { "amount" : "10.826", - "amount_int" : "1082600000", - "date" : 1358804630, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804630103733", - "trade_type" : "ask" - }, - { "amount" : "1.0205", - "amount_int" : "102050000", - "date" : 1358804657, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804657613461", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804690, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358804690877965", - "trade_type" : "bid" - }, - { "amount" : "8.1618009", - "amount_int" : "816180090", - "date" : 1358804690, - "item" : "BTC", - "price" : "16.799", - "price_currency" : "USD", - "price_int" : "1679900", - "tid" : "1358804690960601", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804691, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804691791006", - "trade_type" : "ask" - }, - { "amount" : "28.6306417", - "amount_int" : "2863064170", - "date" : 1358804698, - "item" : "BTC", - "price" : "16.799", - "price_currency" : "USD", - "price_int" : "1679900", - "tid" : "1358804698130508", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804698, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804698945806", - "trade_type" : "ask" - }, - { "amount" : "0.2", - "amount_int" : "20000000", - "date" : 1358804727, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804727563557", - "trade_type" : "ask" - }, - { "amount" : "9.55", - "amount_int" : "955000000", - "date" : 1358804728, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804728915665", - "trade_type" : "ask" - }, - { "amount" : "0.95", - "amount_int" : "95000000", - "date" : 1358804733, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804733072492", - "trade_type" : "ask" - }, - { "amount" : "0.7992198", - "amount_int" : "79921980", - "date" : 1358804734, - "item" : "BTC", - "price" : "16.67606", - "price_currency" : "USD", - "price_int" : "1667606", - "tid" : "1358804734242171", - "trade_type" : "ask" - }, - { "amount" : "3.39633", - "amount_int" : "339633000", - "date" : 1358804755, - "item" : "BTC", - "price" : "16.77848", - "price_currency" : "USD", - "price_int" : "1677848", - "tid" : "1358804755374997", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804760, - "item" : "BTC", - "price" : "16.67101", - "price_currency" : "USD", - "price_int" : "1667101", - "tid" : "1358804760847436", - "trade_type" : "ask" - }, - { "amount" : "10", - "amount_int" : "1000000000", - "date" : 1358804777, - "item" : "BTC", - "price" : "16.77848", - "price_currency" : "USD", - "price_int" : "1677848", - "tid" : "1358804777791916", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804786, - "item" : "BTC", - "price" : "16.67302", - "price_currency" : "USD", - "price_int" : "1667302", - "tid" : "1358804786138675", - "trade_type" : "ask" - }, - { "amount" : "8.55936859", - "amount_int" : "855936859", - "date" : 1358804843, - "item" : "BTC", - "price" : "16.79799", - "price_currency" : "USD", - "price_int" : "1679799", - "tid" : "1358804843794875", - "trade_type" : "bid" - }, - { "amount" : "8.59063141", - "amount_int" : "859063141", - "date" : 1358804843, - "item" : "BTC", - "price" : "16.798", - "price_currency" : "USD", - "price_int" : "1679800", - "tid" : "1358804843869395", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804846, - "item" : "BTC", - "price" : "16.76895", - "price_currency" : "USD", - "price_int" : "1676895", - "tid" : "1358804846489363", - "trade_type" : "ask" - }, - { "amount" : "1.5", - "amount_int" : "150000000", - "date" : 1358804853, - "item" : "BTC", - "price" : "16.7979", - "price_currency" : "USD", - "price_int" : "1679790", - "tid" : "1358804853318043", - "trade_type" : "bid" - }, - { "amount" : "4.3979152", - "amount_int" : "439791520", - "date" : 1358804853, - "item" : "BTC", - "price" : "16.798", - "price_currency" : "USD", - "price_int" : "1679800", - "tid" : "1358804853389052", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804854, - "item" : "BTC", - "price" : "16.76895", - "price_currency" : "USD", - "price_int" : "1676895", - "tid" : "1358804854382685", - "trade_type" : "ask" - }, - { "amount" : "7.01145339", - "amount_int" : "701145339", - "date" : 1358804859, - "item" : "BTC", - "price" : "16.798", - "price_currency" : "USD", - "price_int" : "1679800", - "tid" : "1358804859990417", - "trade_type" : "bid" - }, - { "amount" : "2.63256667", - "amount_int" : "263256667", - "date" : 1358804860, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358804860051002", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804860, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358804860105908", - "trade_type" : "bid" - }, - { "amount" : "12.23802819", - "amount_int" : "1223802819", - "date" : 1358804860, - "item" : "BTC", - "price" : "16.799", - "price_currency" : "USD", - "price_int" : "1679900", - "tid" : "1358804860164454", - "trade_type" : "bid" - }, - { "amount" : "1.16768795", - "amount_int" : "116768795", - "date" : 1358804860, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804860233242", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804861, - "item" : "BTC", - "price" : "16.76895", - "price_currency" : "USD", - "price_int" : "1676895", - "tid" : "1358804861383345", - "trade_type" : "ask" - }, - { "amount" : "20", - "amount_int" : "2000000000", - "date" : 1358804903, - "item" : "BTC", - "price" : "16.796", - "price_currency" : "USD", - "price_int" : "1679600", - "tid" : "1358804903745890", - "trade_type" : "bid" - }, - { "amount" : "8.6146029", - "amount_int" : "861460290", - "date" : 1358804903, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804903866846", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804906, - "item" : "BTC", - "price" : "16.76895", - "price_currency" : "USD", - "price_int" : "1676895", - "tid" : "1358804906273159", - "trade_type" : "ask" - }, - { "amount" : "11.80693644", - "amount_int" : "1180693644", - "date" : 1358804918, - "item" : "BTC", - "price" : "16.76895", - "price_currency" : "USD", - "price_int" : "1676895", - "tid" : "1358804918255344", - "trade_type" : "ask" - }, - { "amount" : "8.19306356", - "amount_int" : "819306356", - "date" : 1358804918, - "item" : "BTC", - "price" : "16.76893", - "price_currency" : "USD", - "price_int" : "1676893", - "tid" : "1358804918324678", - "trade_type" : "ask" - }, - { "amount" : "11.81616182", - "amount_int" : "1181616182", - "date" : 1358804934, - "item" : "BTC", - "price" : "16.79949", - "price_currency" : "USD", - "price_int" : "1679949", - "tid" : "1358804934302057", - "trade_type" : "bid" - }, - { "amount" : "8.22528838", - "amount_int" : "822528838", - "date" : 1358804934, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804934392217", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804938, - "item" : "BTC", - "price" : "16.76895", - "price_currency" : "USD", - "price_int" : "1676895", - "tid" : "1358804938634398", - "trade_type" : "ask" - }, - { "amount" : "0.00046965", - "amount_int" : "46965", - "date" : 1358804940, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804940228704", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804944, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358804944314010", - "trade_type" : "ask" - }, - { "amount" : "17.178383", - "amount_int" : "1717838300", - "date" : 1358804946, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804946519011", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804950, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358804950018193", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358804953, - "item" : "BTC", - "price" : "16.79949", - "price_currency" : "USD", - "price_int" : "1679949", - "tid" : "1358804953434289", - "trade_type" : "bid" - }, - { "amount" : "1.8630672", - "amount_int" : "186306720", - "date" : 1358804954, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804954298830", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804957, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358804957438211", - "trade_type" : "ask" - }, - { "amount" : "28.493211", - "amount_int" : "2849321100", - "date" : 1358804963, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804963671591", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804964, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358804964536273", - "trade_type" : "ask" - }, - { "amount" : "0.35209164", - "amount_int" : "35209164", - "date" : 1358804981, - "item" : "BTC", - "price" : "16.79949", - "price_currency" : "USD", - "price_int" : "1679949", - "tid" : "1358804981405027", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804981, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358804981935757", - "trade_type" : "ask" - }, - { "amount" : "0.36790836", - "amount_int" : "36790836", - "date" : 1358804995, - "item" : "BTC", - "price" : "16.79949", - "price_currency" : "USD", - "price_int" : "1679949", - "tid" : "1358804995312117", - "trade_type" : "bid" - }, - { "amount" : "5.35821594", - "amount_int" : "535821594", - "date" : 1358804995, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358804995386766", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358804996, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358804996826025", - "trade_type" : "ask" - }, - { "amount" : "9", - "amount_int" : "900000000", - "date" : 1358804997, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358804997335747", - "trade_type" : "ask" - }, - { "amount" : "4.13897304", - "amount_int" : "413897304", - "date" : 1358805055, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358805055914884", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805058, - "item" : "BTC", - "price" : "16.79949", - "price_currency" : "USD", - "price_int" : "1679949", - "tid" : "1358805058558276", - "trade_type" : "bid" - }, - { "amount" : "22.7634315", - "amount_int" : "2276343150", - "date" : 1358805059, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358805059041170", - "trade_type" : "bid" - }, - { "amount" : "0.05143725", - "amount_int" : "5143725", - "date" : 1358805068, - "item" : "BTC", - "price" : "16.76894", - "price_currency" : "USD", - "price_int" : "1676894", - "tid" : "1358805068889207", - "trade_type" : "ask" - }, - { "amount" : "6.80693644", - "amount_int" : "680693644", - "date" : 1358805069, - "item" : "BTC", - "price" : "16.76893", - "price_currency" : "USD", - "price_int" : "1676893", - "tid" : "1358805069020568", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805074, - "item" : "BTC", - "price" : "16.67691", - "price_currency" : "USD", - "price_int" : "1667691", - "tid" : "1358805074699193", - "trade_type" : "ask" - }, - { "amount" : "26", - "amount_int" : "2600000000", - "date" : 1358805097, - "item" : "BTC", - "price" : "16.7985", - "price_currency" : "USD", - "price_int" : "1679850", - "tid" : "1358805097587285", - "trade_type" : "bid" - }, - { "amount" : "12.12816", - "amount_int" : "1212816000", - "date" : 1358805118, - "item" : "BTC", - "price" : "16.67591", - "price_currency" : "USD", - "price_int" : "1667591", - "tid" : "1358805118720813", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805128, - "item" : "BTC", - "price" : "16.67591", - "price_currency" : "USD", - "price_int" : "1667591", - "tid" : "1358805128189119", - "trade_type" : "ask" - }, - { "amount" : "3.4356766", - "amount_int" : "343567660", - "date" : 1358805147, - "item" : "BTC", - "price" : "16.79949", - "price_currency" : "USD", - "price_int" : "1679949", - "tid" : "1358805147326474", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805155, - "item" : "BTC", - "price" : "16.67591", - "price_currency" : "USD", - "price_int" : "1667591", - "tid" : "1358805155136780", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805165, - "item" : "BTC", - "price" : "16.67591", - "price_currency" : "USD", - "price_int" : "1667591", - "tid" : "1358805165066407", - "trade_type" : "ask" - }, - { "amount" : "14.1671", - "amount_int" : "1416710000", - "date" : 1358805204, - "item" : "BTC", - "price" : "16.79947", - "price_currency" : "USD", - "price_int" : "1679947", - "tid" : "1358805204577928", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805208, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358805208820838", - "trade_type" : "ask" - }, - { "amount" : "0.01084827", - "amount_int" : "1084827", - "date" : 1358805238, - "item" : "BTC", - "price" : "16.79899", - "price_currency" : "USD", - "price_int" : "1679899", - "tid" : "1358805238300059", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805239, - "item" : "BTC", - "price" : "16.67701", - "price_currency" : "USD", - "price_int" : "1667701", - "tid" : "1358805239530840", - "trade_type" : "ask" - }, - { "amount" : "5", - "amount_int" : "500000000", - "date" : 1358805259, - "item" : "BTC", - "price" : "16.79897", - "price_currency" : "USD", - "price_int" : "1679897", - "tid" : "1358805259594571", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805261, - "item" : "BTC", - "price" : "16.67701", - "price_currency" : "USD", - "price_int" : "1667701", - "tid" : "1358805261589000", - "trade_type" : "ask" - }, - { "amount" : "4.15135575", - "amount_int" : "415135575", - "date" : 1358805270, - "item" : "BTC", - "price" : "16.79897", - "price_currency" : "USD", - "price_int" : "1679897", - "tid" : "1358805270948811", - "trade_type" : "bid" - }, - { "amount" : "5.84864425", - "amount_int" : "584864425", - "date" : 1358805280, - "item" : "BTC", - "price" : "16.79897", - "price_currency" : "USD", - "price_int" : "1679897", - "tid" : "1358805280538682", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805281, - "item" : "BTC", - "price" : "16.67801", - "price_currency" : "USD", - "price_int" : "1667801", - "tid" : "1358805281735448", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805302, - "item" : "BTC", - "price" : "16.79945", - "price_currency" : "USD", - "price_int" : "1679945", - "tid" : "1358805302147341", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805302, - "item" : "BTC", - "price" : "16.79946", - "price_currency" : "USD", - "price_int" : "1679946", - "tid" : "1358805302242125", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805302, - "item" : "BTC", - "price" : "16.79947", - "price_currency" : "USD", - "price_int" : "1679947", - "tid" : "1358805302332657", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805302, - "item" : "BTC", - "price" : "16.79948", - "price_currency" : "USD", - "price_int" : "1679948", - "tid" : "1358805302429382", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805302, - "item" : "BTC", - "price" : "16.79949", - "price_currency" : "USD", - "price_int" : "1679949", - "tid" : "1358805302505941", - "trade_type" : "bid" - }, - { "amount" : "6.03564248", - "amount_int" : "603564248", - "date" : 1358805302, - "item" : "BTC", - "price" : "16.7995", - "price_currency" : "USD", - "price_int" : "1679950", - "tid" : "1358805302637868", - "trade_type" : "bid" - }, - { "amount" : "0.41661622", - "amount_int" : "41661622", - "date" : 1358805302, - "item" : "BTC", - "price" : "16.8", - "price_currency" : "USD", - "price_int" : "1680000", - "tid" : "1358805302752908", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805305, - "item" : "BTC", - "price" : "16.67801", - "price_currency" : "USD", - "price_int" : "1667801", - "tid" : "1358805305127338", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805342, - "item" : "BTC", - "price" : "16.79941", - "price_currency" : "USD", - "price_int" : "1679941", - "tid" : "1358805342201734", - "trade_type" : "bid" - }, - { "amount" : "0.1452289", - "amount_int" : "14522890", - "date" : 1358805342, - "item" : "BTC", - "price" : "16.79942", - "price_currency" : "USD", - "price_int" : "1679942", - "tid" : "1358805342257014", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805342, - "item" : "BTC", - "price" : "16.67801", - "price_currency" : "USD", - "price_int" : "1667801", - "tid" : "1358805342813143", - "trade_type" : "ask" - }, - { "amount" : "0.8547711", - "amount_int" : "85477110", - "date" : 1358805352, - "item" : "BTC", - "price" : "16.79942", - "price_currency" : "USD", - "price_int" : "1679942", - "tid" : "1358805352011330", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805352, - "item" : "BTC", - "price" : "16.79943", - "price_currency" : "USD", - "price_int" : "1679943", - "tid" : "1358805352071350", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805352, - "item" : "BTC", - "price" : "16.79944", - "price_currency" : "USD", - "price_int" : "1679944", - "tid" : "1358805352133197", - "trade_type" : "bid" - }, - { "amount" : "0.4091247", - "amount_int" : "40912470", - "date" : 1358805352, - "item" : "BTC", - "price" : "16.79995", - "price_currency" : "USD", - "price_int" : "1679995", - "tid" : "1358805352189117", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805353, - "item" : "BTC", - "price" : "16.67801", - "price_currency" : "USD", - "price_int" : "1667801", - "tid" : "1358805353020744", - "trade_type" : "ask" - }, - { "amount" : "0.5908753", - "amount_int" : "59087530", - "date" : 1358805356, - "item" : "BTC", - "price" : "16.79995", - "price_currency" : "USD", - "price_int" : "1679995", - "tid" : "1358805356835883", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805356, - "item" : "BTC", - "price" : "16.79996", - "price_currency" : "USD", - "price_int" : "1679996", - "tid" : "1358805356912168", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805356, - "item" : "BTC", - "price" : "16.79997", - "price_currency" : "USD", - "price_int" : "1679997", - "tid" : "1358805356966187", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805357, - "item" : "BTC", - "price" : "16.79998", - "price_currency" : "USD", - "price_int" : "1679998", - "tid" : "1358805357018028", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805357, - "item" : "BTC", - "price" : "16.79999", - "price_currency" : "USD", - "price_int" : "1679999", - "tid" : "1358805357088440", - "trade_type" : "bid" - }, - { "amount" : "1.4215537", - "amount_int" : "142155370", - "date" : 1358805357, - "item" : "BTC", - "price" : "16.8", - "price_currency" : "USD", - "price_int" : "1680000", - "tid" : "1358805357171290", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805358, - "item" : "BTC", - "price" : "16.67801", - "price_currency" : "USD", - "price_int" : "1667801", - "tid" : "1358805358481642", - "trade_type" : "ask" - }, - { "amount" : "8.16183008", - "amount_int" : "816183008", - "date" : 1358805367, - "item" : "BTC", - "price" : "16.8", - "price_currency" : "USD", - "price_int" : "1680000", - "tid" : "1358805367341589", - "trade_type" : "bid" - }, - { "amount" : "19.60988742", - "amount_int" : "1960988742", - "date" : 1358805367, - "item" : "BTC", - "price" : "16.8", - "price_currency" : "USD", - "price_int" : "1680000", - "tid" : "1358805367426534", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805368, - "item" : "BTC", - "price" : "16.67801", - "price_currency" : "USD", - "price_int" : "1667801", - "tid" : "1358805368341864", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805405, - "item" : "BTC", - "price" : "16.79995", - "price_currency" : "USD", - "price_int" : "1679995", - "tid" : "1358805405728170", - "trade_type" : "ask" - }, - { "amount" : "7.5715", - "amount_int" : "757150000", - "date" : 1358805423, - "item" : "BTC", - "price" : "16.79995", - "price_currency" : "USD", - "price_int" : "1679995", - "tid" : "1358805423920753", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805425, - "item" : "BTC", - "price" : "16.68001", - "price_currency" : "USD", - "price_int" : "1668001", - "tid" : "1358805425055990", - "trade_type" : "ask" - }, - { "amount" : "205.46128636", - "amount_int" : "20546128636", - "date" : 1358805456, - "item" : "BTC", - "price" : "16.68001", - "price_currency" : "USD", - "price_int" : "1668001", - "tid" : "1358805456147660", - "trade_type" : "ask" - }, - { "amount" : "30", - "amount_int" : "3000000000", - "date" : 1358805456, - "item" : "BTC", - "price" : "16.679", - "price_currency" : "USD", - "price_int" : "1667900", - "tid" : "1358805456212145", - "trade_type" : "ask" - }, - { "amount" : "59.9214", - "amount_int" : "5992140000", - "date" : 1358805456, - "item" : "BTC", - "price" : "16.6769", - "price_currency" : "USD", - "price_int" : "1667690", - "tid" : "1358805456909511", - "trade_type" : "ask" - }, - { "amount" : "0.90628991", - "amount_int" : "90628991", - "date" : 1358805456, - "item" : "BTC", - "price" : "16.6759", - "price_currency" : "USD", - "price_int" : "1667590", - "tid" : "1358805456966650", - "trade_type" : "ask" - }, - { "amount" : "90.13431062", - "amount_int" : "9013431062", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.67", - "price_currency" : "USD", - "price_int" : "1667000", - "tid" : "1358805457027896", - "trade_type" : "ask" - }, - { "amount" : "0.5", - "amount_int" : "50000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.67", - "price_currency" : "USD", - "price_int" : "1667000", - "tid" : "1358805457073005", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66957", - "price_currency" : "USD", - "price_int" : "1666957", - "tid" : "1358805457133989", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66957", - "price_currency" : "USD", - "price_int" : "1666957", - "tid" : "1358805457257606", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66956", - "price_currency" : "USD", - "price_int" : "1666956", - "tid" : "1358805457398869", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66956", - "price_currency" : "USD", - "price_int" : "1666956", - "tid" : "1358805457532638", - "trade_type" : "ask" - }, - { "amount" : "23.54404413", - "amount_int" : "2354404413", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66885", - "price_currency" : "USD", - "price_int" : "1666885", - "tid" : "1358805457664672", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66857", - "price_currency" : "USD", - "price_int" : "1666857", - "tid" : "1358805457699591", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66857", - "price_currency" : "USD", - "price_int" : "1666857", - "tid" : "1358805457837455", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805457, - "item" : "BTC", - "price" : "16.66856", - "price_currency" : "USD", - "price_int" : "1666856", - "tid" : "1358805457956807", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805458, - "item" : "BTC", - "price" : "16.66856", - "price_currency" : "USD", - "price_int" : "1666856", - "tid" : "1358805458108913", - "trade_type" : "ask" - }, - { "amount" : "0.08991512", - "amount_int" : "8991512", - "date" : 1358805458, - "item" : "BTC", - "price" : "16.6682", - "price_currency" : "USD", - "price_int" : "1666820", - "tid" : "1358805458306142", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805458, - "item" : "BTC", - "price" : "16.66142", - "price_currency" : "USD", - "price_int" : "1666142", - "tid" : "1358805458343300", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805458, - "item" : "BTC", - "price" : "16.66142", - "price_currency" : "USD", - "price_int" : "1666142", - "tid" : "1358805458523568", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805458, - "item" : "BTC", - "price" : "16.66142", - "price_currency" : "USD", - "price_int" : "1666142", - "tid" : "1358805458736694", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805458, - "item" : "BTC", - "price" : "16.66142", - "price_currency" : "USD", - "price_int" : "1666142", - "tid" : "1358805458873871", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.66142", - "price_currency" : "USD", - "price_int" : "1666142", - "tid" : "1358805459008630", - "trade_type" : "ask" - }, - { "amount" : "0.09890535", - "amount_int" : "9890535", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.65727", - "price_currency" : "USD", - "price_int" : "1665727", - "tid" : "1358805459121348", - "trade_type" : "ask" - }, - { "amount" : "0.1446224", - "amount_int" : "14462240", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.65395", - "price_currency" : "USD", - "price_int" : "1665395", - "tid" : "1358805459158433", - "trade_type" : "ask" - }, - { "amount" : "0.3003", - "amount_int" : "30030000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.65", - "price_currency" : "USD", - "price_int" : "1665000", - "tid" : "1358805459207823", - "trade_type" : "ask" - }, - { "amount" : "0.1315644", - "amount_int" : "13156440", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.64713", - "price_currency" : "USD", - "price_int" : "1664713", - "tid" : "1358805459259343", - "trade_type" : "ask" - }, - { "amount" : "0.10867538", - "amount_int" : "10867538", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.64688", - "price_currency" : "USD", - "price_int" : "1664688", - "tid" : "1358805459292418", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.64659", - "price_currency" : "USD", - "price_int" : "1664659", - "tid" : "1358805459324199", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.64659", - "price_currency" : "USD", - "price_int" : "1664659", - "tid" : "1358805459439350", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.64659", - "price_currency" : "USD", - "price_int" : "1664659", - "tid" : "1358805459554762", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.64659", - "price_currency" : "USD", - "price_int" : "1664659", - "tid" : "1358805459684637", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.64659", - "price_currency" : "USD", - "price_int" : "1664659", - "tid" : "1358805459791901", - "trade_type" : "ask" - }, - { "amount" : "0.11951808", - "amount_int" : "11951808", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.63915", - "price_currency" : "USD", - "price_int" : "1663915", - "tid" : "1358805459905728", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805459, - "item" : "BTC", - "price" : "16.63817", - "price_currency" : "USD", - "price_int" : "1663817", - "tid" : "1358805459942282", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.63817", - "price_currency" : "USD", - "price_int" : "1663817", - "tid" : "1358805460054635", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.63817", - "price_currency" : "USD", - "price_int" : "1663817", - "tid" : "1358805460172989", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.63817", - "price_currency" : "USD", - "price_int" : "1663817", - "tid" : "1358805460286860", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.63817", - "price_currency" : "USD", - "price_int" : "1663817", - "tid" : "1358805460402561", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.62728", - "price_currency" : "USD", - "price_int" : "1662728", - "tid" : "1358805460516444", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.62728", - "price_currency" : "USD", - "price_int" : "1662728", - "tid" : "1358805460626240", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.62728", - "price_currency" : "USD", - "price_int" : "1662728", - "tid" : "1358805460749465", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.62523", - "price_currency" : "USD", - "price_int" : "1662523", - "tid" : "1358805460874857", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805460, - "item" : "BTC", - "price" : "16.62523", - "price_currency" : "USD", - "price_int" : "1662523", - "tid" : "1358805460989904", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.62523", - "price_currency" : "USD", - "price_int" : "1662523", - "tid" : "1358805461116398", - "trade_type" : "ask" - }, - { "amount" : "6.87028", - "amount_int" : "687028000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.6242", - "price_currency" : "USD", - "price_int" : "1662420", - "tid" : "1358805461274310", - "trade_type" : "ask" - }, - { "amount" : "10.11736462", - "amount_int" : "1011736462", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.62", - "price_currency" : "USD", - "price_int" : "1662000", - "tid" : "1358805461313880", - "trade_type" : "ask" - }, - { "amount" : "0.1825", - "amount_int" : "18250000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.61384", - "price_currency" : "USD", - "price_int" : "1661384", - "tid" : "1358805461364798", - "trade_type" : "ask" - }, - { "amount" : "5", - "amount_int" : "500000000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.611", - "price_currency" : "USD", - "price_int" : "1661100", - "tid" : "1358805461417150", - "trade_type" : "ask" - }, - { "amount" : "53.38442444", - "amount_int" : "5338442444", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.61", - "price_currency" : "USD", - "price_int" : "1661000", - "tid" : "1358805461479859", - "trade_type" : "ask" - }, - { "amount" : "0.15893607", - "amount_int" : "15893607", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.60686", - "price_currency" : "USD", - "price_int" : "1660686", - "tid" : "1358805461516228", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.604", - "price_currency" : "USD", - "price_int" : "1660400", - "tid" : "1358805461557789", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.604", - "price_currency" : "USD", - "price_int" : "1660400", - "tid" : "1358805461672366", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.604", - "price_currency" : "USD", - "price_int" : "1660400", - "tid" : "1358805461781802", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805461, - "item" : "BTC", - "price" : "16.604", - "price_currency" : "USD", - "price_int" : "1660400", - "tid" : "1358805461894769", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.60301", - "price_currency" : "USD", - "price_int" : "1660301", - "tid" : "1358805462011263", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.60301", - "price_currency" : "USD", - "price_int" : "1660301", - "tid" : "1358805462125462", - "trade_type" : "ask" - }, - { "amount" : "0.21180167", - "amount_int" : "21180167", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.60227", - "price_currency" : "USD", - "price_int" : "1660227", - "tid" : "1358805462241549", - "trade_type" : "ask" - }, - { "amount" : "12", - "amount_int" : "1200000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.60206", - "price_currency" : "USD", - "price_int" : "1660206", - "tid" : "1358805462283158", - "trade_type" : "ask" - }, - { "amount" : "2", - "amount_int" : "200000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.60001", - "price_currency" : "USD", - "price_int" : "1660001", - "tid" : "1358805462347580", - "trade_type" : "ask" - }, - { "amount" : "97.7563253", - "amount_int" : "9775632530", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.6", - "price_currency" : "USD", - "price_int" : "1660000", - "tid" : "1358805462430900", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.6", - "price_currency" : "USD", - "price_int" : "1660000", - "tid" : "1358805462489116", - "trade_type" : "ask" - }, - { "amount" : "10", - "amount_int" : "1000000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.6", - "price_currency" : "USD", - "price_int" : "1660000", - "tid" : "1358805462537201", - "trade_type" : "ask" - }, - { "amount" : "60.241", - "amount_int" : "6024100000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.6", - "price_currency" : "USD", - "price_int" : "1660000", - "tid" : "1358805462596147", - "trade_type" : "ask" - }, - { "amount" : "2", - "amount_int" : "200000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.6", - "price_currency" : "USD", - "price_int" : "1660000", - "tid" : "1358805462642499", - "trade_type" : "ask" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358805462, - "item" : "BTC", - "price" : "16.6", - "price_currency" : "USD", - "price_int" : "1660000", - "tid" : "1358805462733521", - "trade_type" : "ask" - }, - { "amount" : "2", - "amount_int" : "200000000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.6", - "price_currency" : "USD", - "price_int" : "1660000", - "tid" : "1358805463116455", - "trade_type" : "ask" - }, - { "amount" : "20", - "amount_int" : "2000000000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59951", - "price_currency" : "USD", - "price_int" : "1659951", - "tid" : "1358805463194563", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59888", - "price_currency" : "USD", - "price_int" : "1659888", - "tid" : "1358805463262526", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59888", - "price_currency" : "USD", - "price_int" : "1659888", - "tid" : "1358805463374870", - "trade_type" : "ask" - }, - { "amount" : "0.25646832", - "amount_int" : "25646832", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59888", - "price_currency" : "USD", - "price_int" : "1659888", - "tid" : "1358805463491438", - "trade_type" : "ask" - }, - { "amount" : "0.04386", - "amount_int" : "4386000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59777", - "price_currency" : "USD", - "price_int" : "1659777", - "tid" : "1358805463543917", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59051", - "price_currency" : "USD", - "price_int" : "1659051", - "tid" : "1358805463696417", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59051", - "price_currency" : "USD", - "price_int" : "1659051", - "tid" : "1358805463812864", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805463, - "item" : "BTC", - "price" : "16.59051", - "price_currency" : "USD", - "price_int" : "1659051", - "tid" : "1358805463932370", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805464, - "item" : "BTC", - "price" : "16.59051", - "price_currency" : "USD", - "price_int" : "1659051", - "tid" : "1358805464049104", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805464, - "item" : "BTC", - "price" : "16.59051", - "price_currency" : "USD", - "price_int" : "1659051", - "tid" : "1358805464510680", - "trade_type" : "ask" - }, - { "amount" : "19.94381968", - "amount_int" : "1994381968", - "date" : 1358805464, - "item" : "BTC", - "price" : "16.58784", - "price_currency" : "USD", - "price_int" : "1658784", - "tid" : "1358805464668104", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805464, - "item" : "BTC", - "price" : "16.58764", - "price_currency" : "USD", - "price_int" : "1658764", - "tid" : "1358805464701332", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805464, - "item" : "BTC", - "price" : "16.58764", - "price_currency" : "USD", - "price_int" : "1658764", - "tid" : "1358805464837154", - "trade_type" : "ask" - }, - { "amount" : "0.17476005", - "amount_int" : "17476005", - "date" : 1358805464, - "item" : "BTC", - "price" : "16.58664", - "price_currency" : "USD", - "price_int" : "1658664", - "tid" : "1358805464955308", - "trade_type" : "ask" - }, - { "amount" : "0.28181385", - "amount_int" : "28181385", - "date" : 1358805464, - "item" : "BTC", - "price" : "16.58392", - "price_currency" : "USD", - "price_int" : "1658392", - "tid" : "1358805464989156", - "trade_type" : "ask" - }, - { "amount" : "1.59580566", - "amount_int" : "159580566", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.58331", - "price_currency" : "USD", - "price_int" : "1658331", - "tid" : "1358805465039591", - "trade_type" : "ask" - }, - { "amount" : "1.50432823", - "amount_int" : "150432823", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.5823", - "price_currency" : "USD", - "price_int" : "1658230", - "tid" : "1358805465082669", - "trade_type" : "ask" - }, - { "amount" : "0.60175846", - "amount_int" : "60175846", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.58175", - "price_currency" : "USD", - "price_int" : "1658175", - "tid" : "1358805465128997", - "trade_type" : "ask" - }, - { "amount" : "0.13251", - "amount_int" : "13251000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.57827", - "price_currency" : "USD", - "price_int" : "1657827", - "tid" : "1358805465181974", - "trade_type" : "ask" - }, - { "amount" : "0.43562176", - "amount_int" : "43562176", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.57535", - "price_currency" : "USD", - "price_int" : "1657535", - "tid" : "1358805465222314", - "trade_type" : "ask" - }, - { "amount" : "0.04064", - "amount_int" : "4064000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.56699", - "price_currency" : "USD", - "price_int" : "1656699", - "tid" : "1358805465282721", - "trade_type" : "ask" - }, - { "amount" : "0.33645787", - "amount_int" : "33645787", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.5653", - "price_currency" : "USD", - "price_int" : "1656530", - "tid" : "1358805465342699", - "trade_type" : "ask" - }, - { "amount" : "0.25247", - "amount_int" : "25247000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.56328", - "price_currency" : "USD", - "price_int" : "1656328", - "tid" : "1358805465435840", - "trade_type" : "ask" - }, - { "amount" : "0.79263803", - "amount_int" : "79263803", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.56264", - "price_currency" : "USD", - "price_int" : "1656264", - "tid" : "1358805465472729", - "trade_type" : "ask" - }, - { "amount" : "0.51483", - "amount_int" : "51483000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.56128", - "price_currency" : "USD", - "price_int" : "1656128", - "tid" : "1358805465544048", - "trade_type" : "ask" - }, - { "amount" : "90.0127", - "amount_int" : "9001270000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.55953", - "price_currency" : "USD", - "price_int" : "1655953", - "tid" : "1358805465580756", - "trade_type" : "ask" - }, - { "amount" : "0.71660006", - "amount_int" : "71660006", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.55853", - "price_currency" : "USD", - "price_int" : "1655853", - "tid" : "1358805465624929", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.55649", - "price_currency" : "USD", - "price_int" : "1655649", - "tid" : "1358805465662934", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.55649", - "price_currency" : "USD", - "price_int" : "1655649", - "tid" : "1358805465784461", - "trade_type" : "ask" - }, - { "amount" : "5", - "amount_int" : "500000000", - "date" : 1358805465, - "item" : "BTC", - "price" : "16.553", - "price_currency" : "USD", - "price_int" : "1655300", - "tid" : "1358805465948979", - "trade_type" : "ask" - }, - { "amount" : "6.75427", - "amount_int" : "675427000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.5513", - "price_currency" : "USD", - "price_int" : "1655130", - "tid" : "1358805466012913", - "trade_type" : "ask" - }, - { "amount" : "5", - "amount_int" : "500000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805466081230", - "trade_type" : "ask" - }, - { "amount" : "1.5", - "amount_int" : "150000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805466131013", - "trade_type" : "ask" - }, - { "amount" : "59.7347", - "amount_int" : "5973470000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805466175444", - "trade_type" : "ask" - }, - { "amount" : "0.3021", - "amount_int" : "30210000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805466220970", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805466261291", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805466391144", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805466511728", - "trade_type" : "ask" - }, - { "amount" : "0.06449", - "amount_int" : "6449000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.54798", - "price_currency" : "USD", - "price_int" : "1654798", - "tid" : "1358805466629153", - "trade_type" : "ask" - }, - { "amount" : "0.47962286", - "amount_int" : "47962286", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.54621", - "price_currency" : "USD", - "price_int" : "1654621", - "tid" : "1358805466668263", - "trade_type" : "ask" - }, - { "amount" : "0.02273", - "amount_int" : "2273000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.54271", - "price_currency" : "USD", - "price_int" : "1654271", - "tid" : "1358805466709868", - "trade_type" : "ask" - }, - { "amount" : "6.90461", - "amount_int" : "690461000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.54149", - "price_currency" : "USD", - "price_int" : "1654149", - "tid" : "1358805466744437", - "trade_type" : "ask" - }, - { "amount" : "0.19", - "amount_int" : "19000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.53816", - "price_currency" : "USD", - "price_int" : "1653816", - "tid" : "1358805466825329", - "trade_type" : "ask" - }, - { "amount" : "0.5", - "amount_int" : "50000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.537", - "price_currency" : "USD", - "price_int" : "1653700", - "tid" : "1358805466880267", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.537", - "price_currency" : "USD", - "price_int" : "1653700", - "tid" : "1358805466927148", - "trade_type" : "ask" - }, - { "amount" : "0.08558", - "amount_int" : "8558000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.5365", - "price_currency" : "USD", - "price_int" : "1653650", - "tid" : "1358805466968717", - "trade_type" : "ask" - }, - { "amount" : "20", - "amount_int" : "2000000000", - "date" : 1358805466, - "item" : "BTC", - "price" : "16.5365", - "price_currency" : "USD", - "price_int" : "1653650", - "tid" : "1358805466999147", - "trade_type" : "ask" - }, - { "amount" : "14.25375128", - "amount_int" : "1425375128", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.53434", - "price_currency" : "USD", - "price_int" : "1653434", - "tid" : "1358805467047227", - "trade_type" : "ask" - }, - { "amount" : "0.03438", - "amount_int" : "3438000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.53325", - "price_currency" : "USD", - "price_int" : "1653325", - "tid" : "1358805467111831", - "trade_type" : "ask" - }, - { "amount" : "100", - "amount_int" : "10000000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.5307", - "price_currency" : "USD", - "price_int" : "1653070", - "tid" : "1358805467168160", - "trade_type" : "ask" - }, - { "amount" : "5", - "amount_int" : "500000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.5252", - "price_currency" : "USD", - "price_int" : "1652520", - "tid" : "1358805467234538", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.5252", - "price_currency" : "USD", - "price_int" : "1652520", - "tid" : "1358805467287474", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.5252", - "price_currency" : "USD", - "price_int" : "1652520", - "tid" : "1358805467399012", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.52511", - "price_currency" : "USD", - "price_int" : "1652511", - "tid" : "1358805467512045", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.52511", - "price_currency" : "USD", - "price_int" : "1652511", - "tid" : "1358805467637281", - "trade_type" : "ask" - }, - { "amount" : "200", - "amount_int" : "20000000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.5225", - "price_currency" : "USD", - "price_int" : "1652250", - "tid" : "1358805467783504", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.52154", - "price_currency" : "USD", - "price_int" : "1652154", - "tid" : "1358805467826469", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805467, - "item" : "BTC", - "price" : "16.52154", - "price_currency" : "USD", - "price_int" : "1652154", - "tid" : "1358805467937948", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.52154", - "price_currency" : "USD", - "price_int" : "1652154", - "tid" : "1358805468045216", - "trade_type" : "ask" - }, - { "amount" : "0.70137555", - "amount_int" : "70137555", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.52001", - "price_currency" : "USD", - "price_int" : "1652001", - "tid" : "1358805468163707", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.52", - "price_currency" : "USD", - "price_int" : "1652000", - "tid" : "1358805468203594", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.51875", - "price_currency" : "USD", - "price_int" : "1651875", - "tid" : "1358805468237821", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.51875", - "price_currency" : "USD", - "price_int" : "1651875", - "tid" : "1358805468350800", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.51875", - "price_currency" : "USD", - "price_int" : "1651875", - "tid" : "1358805468467088", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.51875", - "price_currency" : "USD", - "price_int" : "1651875", - "tid" : "1358805468593553", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.51875", - "price_currency" : "USD", - "price_int" : "1651875", - "tid" : "1358805468742090", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805468, - "item" : "BTC", - "price" : "16.51875", - "price_currency" : "USD", - "price_int" : "1651875", - "tid" : "1358805468886877", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51875", - "price_currency" : "USD", - "price_int" : "1651875", - "tid" : "1358805469016769", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51601", - "price_currency" : "USD", - "price_int" : "1651601", - "tid" : "1358805469136535", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51601", - "price_currency" : "USD", - "price_int" : "1651601", - "tid" : "1358805469259934", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51601", - "price_currency" : "USD", - "price_int" : "1651601", - "tid" : "1358805469385816", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51601", - "price_currency" : "USD", - "price_int" : "1651601", - "tid" : "1358805469499888", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51601", - "price_currency" : "USD", - "price_int" : "1651601", - "tid" : "1358805469610134", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51601", - "price_currency" : "USD", - "price_int" : "1651601", - "tid" : "1358805469722679", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.51601", - "price_currency" : "USD", - "price_int" : "1651601", - "tid" : "1358805469837203", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805469, - "item" : "BTC", - "price" : "16.516", - "price_currency" : "USD", - "price_int" : "1651600", - "tid" : "1358805469946119", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805470, - "item" : "BTC", - "price" : "16.516", - "price_currency" : "USD", - "price_int" : "1651600", - "tid" : "1358805470058270", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805470, - "item" : "BTC", - "price" : "16.516", - "price_currency" : "USD", - "price_int" : "1651600", - "tid" : "1358805470182000", - "trade_type" : "ask" - }, - { "amount" : "0.10377", - "amount_int" : "10377000", - "date" : 1358805470, - "item" : "BTC", - "price" : "16.51379", - "price_currency" : "USD", - "price_int" : "1651379", - "tid" : "1358805470298046", - "trade_type" : "ask" - }, - { "amount" : "0.02996", - "amount_int" : "2996000", - "date" : 1358805470, - "item" : "BTC", - "price" : "16.51038", - "price_currency" : "USD", - "price_int" : "1651038", - "tid" : "1358805470577675", - "trade_type" : "ask" - }, - { "amount" : "255.81811449", - "amount_int" : "25581811449", - "date" : 1358805470, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805470636613", - "trade_type" : "ask" - }, - { "amount" : "0.03", - "amount_int" : "3000000", - "date" : 1358805471, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805471434883", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805471, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805471784069", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805472, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805472032593", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805472, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805472283772", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805472, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805472568534", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805472, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805472801656", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805473, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805473045712", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805473, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805473283868", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805473, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805473775446", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805474, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805474022380", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805474, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805474288431", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805474, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805474561853", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805474, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805474843640", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805475, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805475075214", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805475, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805475333546", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805475, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805475603968", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805475, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805475886443", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805476, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805476215571", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805476, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805476812532", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805477, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805477354725", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805477, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805477636539", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805477, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805477902471", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805478, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805478142107", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805478, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805478363726", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805478, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805478623711", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805478, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805478855855", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805479, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805479132763", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805479, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805479396984", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805479, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805479639837", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805479, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805479901723", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805480, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805480150802", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805480, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805480404450", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805480, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805480644263", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805480, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805480884427", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805481, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805481125396", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805481, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805481390807", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805481, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805481647781", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805481, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805481936336", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805482, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805482400092", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805482, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805482682708", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805482, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805482945997", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805483, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805483369238", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805484, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805484317296", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805484, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805484641294", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805484, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805484891649", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805486, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805486119434", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805486, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805486710388", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805487, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805487305563", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805487, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805487607885", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805487, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805487954371", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805488, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805488499745", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805491, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805491093843", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805491, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805491504428", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805492, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805492594389", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805493, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805493824762", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805494, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805494096274", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805495, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805495459513", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805495, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805495724834", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805496, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805496632406", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805497, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805497328796", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805497, - "item" : "BTC", - "price" : "16.51001", - "price_currency" : "USD", - "price_int" : "1651001", - "tid" : "1358805497769120", - "trade_type" : "ask" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805572, - "item" : "BTC", - "price" : "16.525", - "price_currency" : "USD", - "price_int" : "1652500", - "tid" : "1358805572933195", - "trade_type" : "bid" - }, - { "amount" : "0.07993276", - "amount_int" : "7993276", - "date" : 1358805573, - "item" : "BTC", - "price" : "16.525", - "price_currency" : "USD", - "price_int" : "1652500", - "tid" : "1358805573032953", - "trade_type" : "bid" - }, - { "amount" : "0.02006724", - "amount_int" : "2006724", - "date" : 1358805573, - "item" : "BTC", - "price" : "16.525", - "price_currency" : "USD", - "price_int" : "1652500", - "tid" : "1358805573849136", - "trade_type" : "bid" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805573, - "item" : "BTC", - "price" : "16.525", - "price_currency" : "USD", - "price_int" : "1652500", - "tid" : "1358805573945980", - "trade_type" : "bid" - }, - { "amount" : "0.07758677", - "amount_int" : "7758677", - "date" : 1358805574, - "item" : "BTC", - "price" : "16.525", - "price_currency" : "USD", - "price_int" : "1652500", - "tid" : "1358805574038286", - "trade_type" : "bid" - }, - { "amount" : "0.02241323", - "amount_int" : "2241323", - "date" : 1358805575, - "item" : "BTC", - "price" : "16.525", - "price_currency" : "USD", - "price_int" : "1652500", - "tid" : "1358805575500645", - "trade_type" : "bid" - }, - { "amount" : "0.1", - "amount_int" : "10000000", - "date" : 1358805575, - "item" : "BTC", - "price" : "16.525", - "price_currency" : "USD", - "price_int" : "1652500", - "tid" : "1358805575610265", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805575, - "item" : "BTC", - "price" : "16.529", - "price_currency" : "USD", - "price_int" : "1652900", - "tid" : "1358805575705645", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805575, - "item" : "BTC", - "price" : "16.53203", - "price_currency" : "USD", - "price_int" : "1653203", - "tid" : "1358805575798181", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805575, - "item" : "BTC", - "price" : "16.53319", - "price_currency" : "USD", - "price_int" : "1653319", - "tid" : "1358805575891844", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805575, - "item" : "BTC", - "price" : "16.53419", - "price_currency" : "USD", - "price_int" : "1653419", - "tid" : "1358805575980950", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.53419", - "price_currency" : "USD", - "price_int" : "1653419", - "tid" : "1358805576069056", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.53585", - "price_currency" : "USD", - "price_int" : "1653585", - "tid" : "1358805576157075", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.53585", - "price_currency" : "USD", - "price_int" : "1653585", - "tid" : "1358805576240751", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.54", - "price_currency" : "USD", - "price_int" : "1654000", - "tid" : "1358805576325773", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.54", - "price_currency" : "USD", - "price_int" : "1654000", - "tid" : "1358805576415014", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.54001", - "price_currency" : "USD", - "price_int" : "1654001", - "tid" : "1358805576500261", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.54001", - "price_currency" : "USD", - "price_int" : "1654001", - "tid" : "1358805576586330", - "trade_type" : "bid" - }, - { "amount" : "0.00171624", - "amount_int" : "171624", - "date" : 1358805576, - "item" : "BTC", - "price" : "16.54001", - "price_currency" : "USD", - "price_int" : "1654001", - "tid" : "1358805576676621", - "trade_type" : "bid" - }, - { "amount" : "0.01328376", - "amount_int" : "1328376", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.54001", - "price_currency" : "USD", - "price_int" : "1654001", - "tid" : "1358805579108912", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.5419", - "price_currency" : "USD", - "price_int" : "1654190", - "tid" : "1358805579198946", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.5419", - "price_currency" : "USD", - "price_int" : "1654190", - "tid" : "1358805579284221", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.5419", - "price_currency" : "USD", - "price_int" : "1654190", - "tid" : "1358805579370092", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.5419", - "price_currency" : "USD", - "price_int" : "1654190", - "tid" : "1358805579456396", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.54801", - "price_currency" : "USD", - "price_int" : "1654801", - "tid" : "1358805579557637", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.54801", - "price_currency" : "USD", - "price_int" : "1654801", - "tid" : "1358805579646751", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.54801", - "price_currency" : "USD", - "price_int" : "1654801", - "tid" : "1358805579735153", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.54801", - "price_currency" : "USD", - "price_int" : "1654801", - "tid" : "1358805579826636", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805579, - "item" : "BTC", - "price" : "16.54801", - "price_currency" : "USD", - "price_int" : "1654801", - "tid" : "1358805579920720", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.54801", - "price_currency" : "USD", - "price_int" : "1654801", - "tid" : "1358805580017739", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805580104068", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805580211880", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805580306717", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805580409396", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805580509679", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.55", - "price_currency" : "USD", - "price_int" : "1655000", - "tid" : "1358805580603670", - "trade_type" : "bid" - }, - { "amount" : "0.0093194", - "amount_int" : "931940", - "date" : 1358805580, - "item" : "BTC", - "price" : "16.55001", - "price_currency" : "USD", - "price_int" : "1655001", - "tid" : "1358805580706776", - "trade_type" : "bid" - }, - { "amount" : "0.0056806", - "amount_int" : "568060", - "date" : 1358805583, - "item" : "BTC", - "price" : "16.55001", - "price_currency" : "USD", - "price_int" : "1655001", - "tid" : "1358805583916094", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55001", - "price_currency" : "USD", - "price_int" : "1655001", - "tid" : "1358805584046916", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55001", - "price_currency" : "USD", - "price_int" : "1655001", - "tid" : "1358805584166215", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55001", - "price_currency" : "USD", - "price_int" : "1655001", - "tid" : "1358805584263311", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55001", - "price_currency" : "USD", - "price_int" : "1655001", - "tid" : "1358805584358878", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55001", - "price_currency" : "USD", - "price_int" : "1655001", - "tid" : "1358805584455241", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55053", - "price_currency" : "USD", - "price_int" : "1655053", - "tid" : "1358805584547021", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55053", - "price_currency" : "USD", - "price_int" : "1655053", - "tid" : "1358805584650892", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55053", - "price_currency" : "USD", - "price_int" : "1655053", - "tid" : "1358805584762364", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55053", - "price_currency" : "USD", - "price_int" : "1655053", - "tid" : "1358805584880446", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805584, - "item" : "BTC", - "price" : "16.55402", - "price_currency" : "USD", - "price_int" : "1655402", - "tid" : "1358805584988189", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805585, - "item" : "BTC", - "price" : "16.55402", - "price_currency" : "USD", - "price_int" : "1655402", - "tid" : "1358805585089042", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805585, - "item" : "BTC", - "price" : "16.55402", - "price_currency" : "USD", - "price_int" : "1655402", - "tid" : "1358805585236048", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805585, - "item" : "BTC", - "price" : "16.55402", - "price_currency" : "USD", - "price_int" : "1655402", - "tid" : "1358805585344561", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805585, - "item" : "BTC", - "price" : "16.55402", - "price_currency" : "USD", - "price_int" : "1655402", - "tid" : "1358805585439033", - "trade_type" : "bid" - }, - { "amount" : "0.0014087", - "amount_int" : "140870", - "date" : 1358805585, - "item" : "BTC", - "price" : "16.56", - "price_currency" : "USD", - "price_int" : "1656000", - "tid" : "1358805585535371", - "trade_type" : "bid" - }, - { "amount" : "0.0985913", - "amount_int" : "9859130", - "date" : 1358805593, - "item" : "BTC", - "price" : "16.56", - "price_currency" : "USD", - "price_int" : "1656000", - "tid" : "1358805593640123", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805643, - "item" : "BTC", - "price" : "16.61113", - "price_currency" : "USD", - "price_int" : "1661113", - "tid" : "1358805643696316", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805646, - "item" : "BTC", - "price" : "16.6117", - "price_currency" : "USD", - "price_int" : "1661170", - "tid" : "1358805646112616", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805663, - "item" : "BTC", - "price" : "16.6117", - "price_currency" : "USD", - "price_int" : "1661170", - "tid" : "1358805663610541", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805664, - "item" : "BTC", - "price" : "16.61201", - "price_currency" : "USD", - "price_int" : "1661201", - "tid" : "1358805664156237", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805664, - "item" : "BTC", - "price" : "16.61495", - "price_currency" : "USD", - "price_int" : "1661495", - "tid" : "1358805664275883", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805664, - "item" : "BTC", - "price" : "16.63501", - "price_currency" : "USD", - "price_int" : "1663501", - "tid" : "1358805664371892", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805664, - "item" : "BTC", - "price" : "16.63501", - "price_currency" : "USD", - "price_int" : "1663501", - "tid" : "1358805664481219", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805666, - "item" : "BTC", - "price" : "16.63627", - "price_currency" : "USD", - "price_int" : "1663627", - "tid" : "1358805666628731", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805666, - "item" : "BTC", - "price" : "16.63627", - "price_currency" : "USD", - "price_int" : "1663627", - "tid" : "1358805666728420", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805667, - "item" : "BTC", - "price" : "16.63728", - "price_currency" : "USD", - "price_int" : "1663728", - "tid" : "1358805667102296", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805667, - "item" : "BTC", - "price" : "16.63728", - "price_currency" : "USD", - "price_int" : "1663728", - "tid" : "1358805667201292", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805667, - "item" : "BTC", - "price" : "16.63889", - "price_currency" : "USD", - "price_int" : "1663889", - "tid" : "1358805667812260", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805667, - "item" : "BTC", - "price" : "16.63889", - "price_currency" : "USD", - "price_int" : "1663889", - "tid" : "1358805667910930", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.64084", - "price_currency" : "USD", - "price_int" : "1664084", - "tid" : "1358805668006308", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.64084", - "price_currency" : "USD", - "price_int" : "1664084", - "tid" : "1358805668107419", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.64445", - "price_currency" : "USD", - "price_int" : "1664445", - "tid" : "1358805668372800", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.64445", - "price_currency" : "USD", - "price_int" : "1664445", - "tid" : "1358805668580735", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805668681157", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805668777285", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805668873386", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805668, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805668967145", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805669, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805669059567", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805669, - "item" : "BTC", - "price" : "16.75001", - "price_currency" : "USD", - "price_int" : "1675001", - "tid" : "1358805669417756", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805670, - "item" : "BTC", - "price" : "16.75001", - "price_currency" : "USD", - "price_int" : "1675001", - "tid" : "1358805670166265", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805670, - "item" : "BTC", - "price" : "16.75001", - "price_currency" : "USD", - "price_int" : "1675001", - "tid" : "1358805670390971", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805670, - "item" : "BTC", - "price" : "16.75001", - "price_currency" : "USD", - "price_int" : "1675001", - "tid" : "1358805670495720", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805670, - "item" : "BTC", - "price" : "16.75551", - "price_currency" : "USD", - "price_int" : "1675551", - "tid" : "1358805670588847", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805670, - "item" : "BTC", - "price" : "16.75551", - "price_currency" : "USD", - "price_int" : "1675551", - "tid" : "1358805670689517", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805670, - "item" : "BTC", - "price" : "16.75551", - "price_currency" : "USD", - "price_int" : "1675551", - "tid" : "1358805670797644", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805670, - "item" : "BTC", - "price" : "16.75551", - "price_currency" : "USD", - "price_int" : "1675551", - "tid" : "1358805670903381", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805671, - "item" : "BTC", - "price" : "16.75701", - "price_currency" : "USD", - "price_int" : "1675701", - "tid" : "1358805671719862", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805671, - "item" : "BTC", - "price" : "16.75701", - "price_currency" : "USD", - "price_int" : "1675701", - "tid" : "1358805671816709", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.75701", - "price_currency" : "USD", - "price_int" : "1675701", - "tid" : "1358805672107477", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.75701", - "price_currency" : "USD", - "price_int" : "1675701", - "tid" : "1358805672204070", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.7576", - "price_currency" : "USD", - "price_int" : "1675760", - "tid" : "1358805672299294", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.7576", - "price_currency" : "USD", - "price_int" : "1675760", - "tid" : "1358805672392383", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.7576", - "price_currency" : "USD", - "price_int" : "1675760", - "tid" : "1358805672485487", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.7576", - "price_currency" : "USD", - "price_int" : "1675760", - "tid" : "1358805672577018", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.75996", - "price_currency" : "USD", - "price_int" : "1675996", - "tid" : "1358805672704154", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805672, - "item" : "BTC", - "price" : "16.75996", - "price_currency" : "USD", - "price_int" : "1675996", - "tid" : "1358805672793715", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805673, - "item" : "BTC", - "price" : "16.75996", - "price_currency" : "USD", - "price_int" : "1675996", - "tid" : "1358805673605782", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805674, - "item" : "BTC", - "price" : "16.75996", - "price_currency" : "USD", - "price_int" : "1675996", - "tid" : "1358805674693165", - "trade_type" : "bid" - }, - { "amount" : "0.095", - "amount_int" : "9500000", - "date" : 1358805674, - "item" : "BTC", - "price" : "16.77388", - "price_currency" : "USD", - "price_int" : "1677388", - "tid" : "1358805674905299", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805679, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805679161615", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805679, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805679293193", - "trade_type" : "bid" - }, - { "amount" : "0.21", - "amount_int" : "21000000", - "date" : 1358805679, - "item" : "BTC", - "price" : "16.77388", - "price_currency" : "USD", - "price_int" : "1677388", - "tid" : "1358805679386876", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805693, - "item" : "BTC", - "price" : "16.75", - "price_currency" : "USD", - "price_int" : "1675000", - "tid" : "1358805693100812", - "trade_type" : "bid" - }, - { "amount" : "6.44345", - "amount_int" : "644345000", - "date" : 1358805693, - "item" : "BTC", - "price" : "16.77388", - "price_currency" : "USD", - "price_int" : "1677388", - "tid" : "1358805693311178", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805693, - "item" : "BTC", - "price" : "16.77491", - "price_currency" : "USD", - "price_int" : "1677491", - "tid" : "1358805693366144", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805693, - "item" : "BTC", - "price" : "16.77762", - "price_currency" : "USD", - "price_int" : "1677762", - "tid" : "1358805693466916", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805695, - "item" : "BTC", - "price" : "16.77762", - "price_currency" : "USD", - "price_int" : "1677762", - "tid" : "1358805695163640", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805695, - "item" : "BTC", - "price" : "16.77949", - "price_currency" : "USD", - "price_int" : "1677949", - "tid" : "1358805695292395", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805695, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358805695711289", - "trade_type" : "bid" - }, - { "amount" : "2.4021715", - "amount_int" : "240217150", - "date" : 1358805695, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358805695833095", - "trade_type" : "bid" - }, - { "amount" : "3.4356766", - "amount_int" : "343567660", - "date" : 1358805709, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358805709757488", - "trade_type" : "bid" - }, - { "amount" : "17.178383", - "amount_int" : "1717838300", - "date" : 1358805788, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358805788366983", - "trade_type" : "bid" - }, - { "amount" : "19.8640444", - "amount_int" : "1986404440", - "date" : 1358805792, - "item" : "BTC", - "price" : "16.77999", - "price_currency" : "USD", - "price_int" : "1677999", - "tid" : "1358805792794732", - "trade_type" : "bid" - }, - { "amount" : "6.9837689", - "amount_int" : "698376890", - "date" : 1358805792, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358805792846133", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805792, - "item" : "BTC", - "price" : "16.78001", - "price_currency" : "USD", - "price_int" : "1678001", - "tid" : "1358805792951504", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805793, - "item" : "BTC", - "price" : "16.78002", - "price_currency" : "USD", - "price_int" : "1678002", - "tid" : "1358805793056838", - "trade_type" : "bid" - }, - { "amount" : "0.08521164", - "amount_int" : "8521164", - "date" : 1358805793, - "item" : "BTC", - "price" : "16.78186", - "price_currency" : "USD", - "price_int" : "1678186", - "tid" : "1358805793353930", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805793, - "item" : "BTC", - "price" : "16.78192", - "price_currency" : "USD", - "price_int" : "1678192", - "tid" : "1358805793396105", - "trade_type" : "bid" - }, - { "amount" : "1.02197506", - "amount_int" : "102197506", - "date" : 1358805793, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358805793493747", - "trade_type" : "bid" - }, - { "amount" : "0.90085217", - "amount_int" : "90085217", - "date" : 1358805805, - "item" : "BTC", - "price" : "16.779", - "price_currency" : "USD", - "price_int" : "1677900", - "tid" : "1358805805156895", - "trade_type" : "bid" - }, - { "amount" : "0.5", - "amount_int" : "50000000", - "date" : 1358805805, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358805805195469", - "trade_type" : "bid" - }, - { "amount" : "2.02377503", - "amount_int" : "202377503", - "date" : 1358805805, - "item" : "BTC", - "price" : "16.78999", - "price_currency" : "USD", - "price_int" : "1678999", - "tid" : "1358805805237573", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805812, - "item" : "BTC", - "price" : "16.70001", - "price_currency" : "USD", - "price_int" : "1670001", - "tid" : "1358805812831962", - "trade_type" : "ask" - }, - { "amount" : "0.005", - "amount_int" : "500000", - "date" : 1358805813, - "item" : "BTC", - "price" : "16.70001", - "price_currency" : "USD", - "price_int" : "1670001", - "tid" : "1358805813758431", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805813, - "item" : "BTC", - "price" : "16.70001", - "price_currency" : "USD", - "price_int" : "1670001", - "tid" : "1358805813941329", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805814, - "item" : "BTC", - "price" : "16.70001", - "price_currency" : "USD", - "price_int" : "1670001", - "tid" : "1358805814094852", - "trade_type" : "ask" - }, - { "amount" : "0.25", - "amount_int" : "25000000", - "date" : 1358805814, - "item" : "BTC", - "price" : "16.61113", - "price_currency" : "USD", - "price_int" : "1661113", - "tid" : "1358805814210275", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358805818, - "item" : "BTC", - "price" : "16.608", - "price_currency" : "USD", - "price_int" : "1660800", - "tid" : "1358805818743501", - "trade_type" : "ask" - }, - { "amount" : "20", - "amount_int" : "2000000000", - "date" : 1358805820, - "item" : "BTC", - "price" : "16.61112", - "price_currency" : "USD", - "price_int" : "1661112", - "tid" : "1358805820209217", - "trade_type" : "bid" - }, - { "amount" : "30.8855", - "amount_int" : "3088550000", - "date" : 1358805820, - "item" : "BTC", - "price" : "16.61112", - "price_currency" : "USD", - "price_int" : "1661112", - "tid" : "1358805820848224", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805854, - "item" : "BTC", - "price" : "16.77", - "price_currency" : "USD", - "price_int" : "1677000", - "tid" : "1358805854542159", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805854, - "item" : "BTC", - "price" : "16.77", - "price_currency" : "USD", - "price_int" : "1677000", - "tid" : "1358805854655485", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805854, - "item" : "BTC", - "price" : "16.76999", - "price_currency" : "USD", - "price_int" : "1676999", - "tid" : "1358805854742950", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805854, - "item" : "BTC", - "price" : "16.76999", - "price_currency" : "USD", - "price_int" : "1676999", - "tid" : "1358805854831617", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805856, - "item" : "BTC", - "price" : "16.67199", - "price_currency" : "USD", - "price_int" : "1667199", - "tid" : "1358805856525940", - "trade_type" : "ask" - }, - { "amount" : "8.6467766", - "amount_int" : "864677660", - "date" : 1358805856, - "item" : "BTC", - "price" : "16.608", - "price_currency" : "USD", - "price_int" : "1660800", - "tid" : "1358805856629991", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805857, - "item" : "BTC", - "price" : "16.76996", - "price_currency" : "USD", - "price_int" : "1676996", - "tid" : "1358805857906050", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805865, - "item" : "BTC", - "price" : "16.76895", - "price_currency" : "USD", - "price_int" : "1676895", - "tid" : "1358805865832267", - "trade_type" : "bid" - }, - { "amount" : "6.012429", - "amount_int" : "601242900", - "date" : 1358805877, - "item" : "BTC", - "price" : "16.76476", - "price_currency" : "USD", - "price_int" : "1676476", - "tid" : "1358805877677253", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805941, - "item" : "BTC", - "price" : "16.67073", - "price_currency" : "USD", - "price_int" : "1667073", - "tid" : "1358805941794493", - "trade_type" : "ask" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358805941, - "item" : "BTC", - "price" : "16.67069", - "price_currency" : "USD", - "price_int" : "1667069", - "tid" : "1358805941897594", - "trade_type" : "ask" - }, - { "amount" : "3.43", - "amount_int" : "343000000", - "date" : 1358805942, - "item" : "BTC", - "price" : "16.61101", - "price_currency" : "USD", - "price_int" : "1661101", - "tid" : "1358805942105981", - "trade_type" : "ask" - }, - { "amount" : "34", - "amount_int" : "3400000000", - "date" : 1358805947, - "item" : "BTC", - "price" : "16.61102", - "price_currency" : "USD", - "price_int" : "1661102", - "tid" : "1358805947707772", - "trade_type" : "ask" - }, - { "amount" : "12.5974876", - "amount_int" : "1259748760", - "date" : 1358805959, - "item" : "BTC", - "price" : "16.75923", - "price_currency" : "USD", - "price_int" : "1675923", - "tid" : "1358805959600676", - "trade_type" : "bid" - }, - { "amount" : "59.9418", - "amount_int" : "5994180000", - "date" : 1358806018, - "item" : "BTC", - "price" : "16.75318", - "price_currency" : "USD", - "price_int" : "1675318", - "tid" : "1358806018822287", - "trade_type" : "bid" - }, - { "amount" : "0.0582", - "amount_int" : "5820000", - "date" : 1358806019, - "item" : "BTC", - "price" : "16.75318", - "price_currency" : "USD", - "price_int" : "1675318", - "tid" : "1358806019316362", - "trade_type" : "ask" - }, - { "amount" : "27.40141546", - "amount_int" : "2740141546", - "date" : 1358806019, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806019363592", - "trade_type" : "ask" - }, - { "amount" : "28.6323385", - "amount_int" : "2863233850", - "date" : 1358806025, - "item" : "BTC", - "price" : "16.75317", - "price_currency" : "USD", - "price_int" : "1675317", - "tid" : "1358806025565248", - "trade_type" : "bid" - }, - { "amount" : "9.0587", - "amount_int" : "905870000", - "date" : 1358806062, - "item" : "BTC", - "price" : "16.75115", - "price_currency" : "USD", - "price_int" : "1675115", - "tid" : "1358806062321619", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806065, - "item" : "BTC", - "price" : "16.75014", - "price_currency" : "USD", - "price_int" : "1675014", - "tid" : "1358806065122142", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806069, - "item" : "BTC", - "price" : "16.75014", - "price_currency" : "USD", - "price_int" : "1675014", - "tid" : "1358806069208044", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806073, - "item" : "BTC", - "price" : "16.75014", - "price_currency" : "USD", - "price_int" : "1675014", - "tid" : "1358806073419357", - "trade_type" : "bid" - }, - { "amount" : "9.1645279", - "amount_int" : "916452790", - "date" : 1358806092, - "item" : "BTC", - "price" : "16.74812", - "price_currency" : "USD", - "price_int" : "1674812", - "tid" : "1358806092099378", - "trade_type" : "bid" - }, - { "amount" : "2.2943766", - "amount_int" : "229437660", - "date" : 1358806103, - "item" : "BTC", - "price" : "16.74711", - "price_currency" : "USD", - "price_int" : "1674711", - "tid" : "1358806103655268", - "trade_type" : "bid" - }, - { "amount" : "13.7467868", - "amount_int" : "1374678680", - "date" : 1358806137, - "item" : "BTC", - "price" : "16.74307", - "price_currency" : "USD", - "price_int" : "1674307", - "tid" : "1358806137820297", - "trade_type" : "bid" - }, - { "amount" : "12.0606524", - "amount_int" : "1206065240", - "date" : 1358806156, - "item" : "BTC", - "price" : "16.74105", - "price_currency" : "USD", - "price_int" : "1674105", - "tid" : "1358806156026280", - "trade_type" : "bid" - }, - { "amount" : "12.6012246", - "amount_int" : "1260122460", - "date" : 1358806258, - "item" : "BTC", - "price" : "16.73499", - "price_currency" : "USD", - "price_int" : "1673499", - "tid" : "1358806258433908", - "trade_type" : "bid" - }, - { "amount" : "1.9474618", - "amount_int" : "194746180", - "date" : 1358806292, - "item" : "BTC", - "price" : "16.73499", - "price_currency" : "USD", - "price_int" : "1673499", - "tid" : "1358806292871837", - "trade_type" : "bid" - }, - { "amount" : "1.78571429", - "amount_int" : "178571429", - "date" : 1358806314, - "item" : "BTC", - "price" : "16.73499", - "price_currency" : "USD", - "price_int" : "1673499", - "tid" : "1358806314883322", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806347, - "item" : "BTC", - "price" : "16.73499", - "price_currency" : "USD", - "price_int" : "1673499", - "tid" : "1358806347786075", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806352, - "item" : "BTC", - "price" : "16.73499", - "price_currency" : "USD", - "price_int" : "1673499", - "tid" : "1358806352231891", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806356, - "item" : "BTC", - "price" : "16.73499", - "price_currency" : "USD", - "price_int" : "1673499", - "tid" : "1358806356569583", - "trade_type" : "bid" - }, - { "amount" : "6.8717572", - "amount_int" : "687175720", - "date" : 1358806363, - "item" : "BTC", - "price" : "16.73499", - "price_currency" : "USD", - "price_int" : "1673499", - "tid" : "1358806363233739", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806368, - "item" : "BTC", - "price" : "16.67645", - "price_currency" : "USD", - "price_int" : "1667645", - "tid" : "1358806368728455", - "trade_type" : "ask" - }, - { "amount" : "5.5", - "amount_int" : "550000000", - "date" : 1358806371, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806371705068", - "trade_type" : "bid" - }, - { "amount" : "13.7467868", - "amount_int" : "1374678680", - "date" : 1358806376, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806376192103", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806387, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806387852340", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806392, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806392480571", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806397, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806397100454", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806405, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806405702780", - "trade_type" : "bid" - }, - { "amount" : "20", - "amount_int" : "2000000000", - "date" : 1358806409, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806409600492", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806410, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806410104624", - "trade_type" : "bid" - }, - { "amount" : "40", - "amount_int" : "4000000000", - "date" : 1358806416, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806416845479", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806418, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806418571412", - "trade_type" : "bid" - }, - { "amount" : "40", - "amount_int" : "4000000000", - "date" : 1358806423, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806423681111", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806424, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806424026137", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806428, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806428719187", - "trade_type" : "bid" - }, - { "amount" : "5.06561757", - "amount_int" : "506561757", - "date" : 1358806430, - "item" : "BTC", - "price" : "16.67643", - "price_currency" : "USD", - "price_int" : "1667643", - "tid" : "1358806430308807", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806433, - "item" : "BTC", - "price" : "16.67644", - "price_currency" : "USD", - "price_int" : "1667644", - "tid" : "1358806433360588", - "trade_type" : "bid" - }, - { "amount" : "36.8719636", - "amount_int" : "3687196360", - "date" : 1358806450, - "item" : "BTC", - "price" : "16.67644", - "price_currency" : "USD", - "price_int" : "1667644", - "tid" : "1358806450006625", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806453, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806453948409", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806459, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806459885211", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806464, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806464144478", - "trade_type" : "bid" - }, - { "amount" : "0.20488009", - "amount_int" : "20488009", - "date" : 1358806464, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806464859963", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806468, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806468539908", - "trade_type" : "bid" - }, - { "amount" : "28.7167038", - "amount_int" : "2871670380", - "date" : 1358806500, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806500048856", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806536, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806536428586", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806541, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806541016021", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806545, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806545478212", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806563, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806563188531", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806567, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806567599276", - "trade_type" : "bid" - }, - { "amount" : "1.148673", - "amount_int" : "114867300", - "date" : 1358806591, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806591896908", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358806636, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806636453834", - "trade_type" : "bid" - }, - { "amount" : "62.64041127", - "amount_int" : "6264041127", - "date" : 1358806653, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806653341944", - "trade_type" : "bid" - }, - { "amount" : "6.15433184", - "amount_int" : "615433184", - "date" : 1358806670, - "item" : "BTC", - "price" : "16.68", - "price_currency" : "USD", - "price_int" : "1668000", - "tid" : "1358806670582363", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806713, - "item" : "BTC", - "price" : "16.70251", - "price_currency" : "USD", - "price_int" : "1670251", - "tid" : "1358806713392460", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806713, - "item" : "BTC", - "price" : "16.70342", - "price_currency" : "USD", - "price_int" : "1670342", - "tid" : "1358806713512637", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806713, - "item" : "BTC", - "price" : "16.70397", - "price_currency" : "USD", - "price_int" : "1670397", - "tid" : "1358806713611970", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806713, - "item" : "BTC", - "price" : "16.70415", - "price_currency" : "USD", - "price_int" : "1670415", - "tid" : "1358806713714363", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806713, - "item" : "BTC", - "price" : "16.70601", - "price_currency" : "USD", - "price_int" : "1670601", - "tid" : "1358806713814197", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806713, - "item" : "BTC", - "price" : "16.70601", - "price_currency" : "USD", - "price_int" : "1670601", - "tid" : "1358806713915935", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806714, - "item" : "BTC", - "price" : "16.70855", - "price_currency" : "USD", - "price_int" : "1670855", - "tid" : "1358806714040423", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806714, - "item" : "BTC", - "price" : "16.70855", - "price_currency" : "USD", - "price_int" : "1670855", - "tid" : "1358806714144487", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806714, - "item" : "BTC", - "price" : "16.70901", - "price_currency" : "USD", - "price_int" : "1670901", - "tid" : "1358806714240981", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806714, - "item" : "BTC", - "price" : "16.71001", - "price_currency" : "USD", - "price_int" : "1671001", - "tid" : "1358806714337969", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806714, - "item" : "BTC", - "price" : "16.71265", - "price_currency" : "USD", - "price_int" : "1671265", - "tid" : "1358806714438486", - "trade_type" : "bid" - }, - { "amount" : "11.2872587", - "amount_int" : "1128725870", - "date" : 1358806714, - "item" : "BTC", - "price" : "16.7864", - "price_currency" : "USD", - "price_int" : "1678640", - "tid" : "1358806714574857", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358806717, - "item" : "BTC", - "price" : "16.68002", - "price_currency" : "USD", - "price_int" : "1668002", - "tid" : "1358806717971588", - "trade_type" : "ask" - }, - { "amount" : "0.72", - "amount_int" : "72000000", - "date" : 1358806739, - "item" : "BTC", - "price" : "16.68002", - "price_currency" : "USD", - "price_int" : "1668002", - "tid" : "1358806739901786", - "trade_type" : "ask" - }, - { "amount" : "1.7550985", - "amount_int" : "175509850", - "date" : 1358806855, - "item" : "BTC", - "price" : "16.77999", - "price_currency" : "USD", - "price_int" : "1677999", - "tid" : "1358806855179873", - "trade_type" : "bid" - }, - { "amount" : "3.9710359", - "amount_int" : "397103590", - "date" : 1358806855, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358806855252011", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358806856, - "item" : "BTC", - "price" : "16.68002", - "price_currency" : "USD", - "price_int" : "1668002", - "tid" : "1358806856833920", - "trade_type" : "ask" - }, - { "amount" : "6.0289641", - "amount_int" : "602896410", - "date" : 1358806871, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358806871644560", - "trade_type" : "bid" - }, - { "amount" : "0.19", - "amount_int" : "19000000", - "date" : 1358806886, - "item" : "BTC", - "price" : "16.78001", - "price_currency" : "USD", - "price_int" : "1678001", - "tid" : "1358806886341426", - "trade_type" : "ask" - }, - { "amount" : "4.22", - "amount_int" : "422000000", - "date" : 1358806907, - "item" : "BTC", - "price" : "16.78001", - "price_currency" : "USD", - "price_int" : "1678001", - "tid" : "1358806907288284", - "trade_type" : "ask" - }, - { "amount" : "7.6677359", - "amount_int" : "766773590", - "date" : 1358806911, - "item" : "BTC", - "price" : "16.78001", - "price_currency" : "USD", - "price_int" : "1678001", - "tid" : "1358806911825829", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358806913, - "item" : "BTC", - "price" : "16.68102", - "price_currency" : "USD", - "price_int" : "1668102", - "tid" : "1358806913869044", - "trade_type" : "ask" - }, - { "amount" : "4.22", - "amount_int" : "422000000", - "date" : 1358806916, - "item" : "BTC", - "price" : "16.77991", - "price_currency" : "USD", - "price_int" : "1677991", - "tid" : "1358806916969083", - "trade_type" : "bid" - }, - { "amount" : "2.8911477", - "amount_int" : "289114770", - "date" : 1358806917, - "item" : "BTC", - "price" : "16.7864", - "price_currency" : "USD", - "price_int" : "1678640", - "tid" : "1358806917029543", - "trade_type" : "bid" - }, - { "amount" : "1", - "amount_int" : "100000000", - "date" : 1358806917, - "item" : "BTC", - "price" : "16.78999", - "price_currency" : "USD", - "price_int" : "1678999", - "tid" : "1358806917078616", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806917, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358806917162687", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806917, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358806917266453", - "trade_type" : "bid" - }, - { "amount" : "0.015", - "amount_int" : "1500000", - "date" : 1358806917, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358806917366773", - "trade_type" : "bid" - }, - { "amount" : "6.1591782", - "amount_int" : "615917820", - "date" : 1358806917, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358806917491378", - "trade_type" : "bid" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358806921, - "item" : "BTC", - "price" : "16.68202", - "price_currency" : "USD", - "price_int" : "1668202", - "tid" : "1358806921577205", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358806926, - "item" : "BTC", - "price" : "16.68002", - "price_currency" : "USD", - "price_int" : "1668002", - "tid" : "1358806926188961", - "trade_type" : "ask" - }, - { "amount" : "6", - "amount_int" : "600000000", - "date" : 1358806935, - "item" : "BTC", - "price" : "16.78", - "price_currency" : "USD", - "price_int" : "1678000", - "tid" : "1358806935601247", - "trade_type" : "bid" - }, - { "amount" : "0.8408218", - "amount_int" : "84082180", - "date" : 1358806946, - "item" : "BTC", - "price" : "16.79", - "price_currency" : "USD", - "price_int" : "1679000", - "tid" : "1358806946607598", - "trade_type" : "bid" - }, - { "amount" : "20", - "amount_int" : "2000000000", - "date" : 1358806975, - "item" : "BTC", - "price" : "16.79001", - "price_currency" : "USD", - "price_int" : "1679001", - "tid" : "1358806975717306", - "trade_type" : "ask" - }, - { "amount" : "1.7542086", - "amount_int" : "175420860", - "date" : 1358806986, - "item" : "BTC", - "price" : "16.79001", - "price_currency" : "USD", - "price_int" : "1679001", - "tid" : "1358806986917719", - "trade_type" : "ask" - }, - { "amount" : "0.01", - "amount_int" : "1000000", - "date" : 1358806988, - "item" : "BTC", - "price" : "16.68002", - "price_currency" : "USD", - "price_int" : "1668002", - "tid" : "1358806988377605", - "trade_type" : "ask" - }, - { "amount" : "0.0614662", - "amount_int" : "6146620", - "date" : 1358807162, - "item" : "BTC", - "price" : "16.79035", - "price_currency" : "USD", - "price_int" : "1679035", - "tid" : "1358807162350757", - "trade_type" : "bid" - } -] \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v0/trade/example-cancel-order-response.json b/xchange-mtgox/src/test/resources/v0/trade/example-cancel-order-response.json deleted file mode 100644 index 259983492..000000000 --- a/xchange-mtgox/src/test/resources/v0/trade/example-cancel-order-response.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "usds":"0", - "btcs":"0.07099989", - "new_usds":{ - "value":"0.00000", - "value_int":"0", - "display":"$0.00000", - "display_short":"$0.00", - "currency":"USD" - }, - "new_btcs":{ - "value":"0.07099989", - "value_int":"7099989", - "display":"0.07099989\u00a0BTC", - "display_short":"0.07\u00a0BTC", - "currency":"BTC" - }, - "orders":[ - { - "oid":"39b5cd7e-8452-4ace-890e-84ba236fe5cb", - "currency":"USD", - "item":"BTC", - "type":2, - "amount":"0.92907324", - "amount_int":"92907324", - "price":"1.25000", - "price_int":"125000", - "status":0, - "real_status":"invalid", - "dark":0, - "date":1357946434, - "priority":"1357946434084386" - } - ] -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/account/example-accountinfo-data.json b/xchange-mtgox/src/test/resources/v1/account/example-accountinfo-data.json deleted file mode 100644 index 20ad39161..000000000 --- a/xchange-mtgox/src/test/resources/v1/account/example-accountinfo-data.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "Login":"xchange", - "Index":"130034", - "Id":"b88a7a3f-dc3d-4bd4-9b6b-13b0cdb6f703", - "Rights":["get_info","trade"], - "Language":"en_US", - "Created":"2012-03-03 18:53:47", - "Last_Login":"2012-03-04 16:54:40", - "Wallets":{ - "BTC":{ - "Balance":{ - "value":"0.00000000", - "value_int":"0", - "display":"0.00000000\u00a0BTC", - "display_short":"0.00\u00a0BTC", - "currency":"BTC" - }, - "Operations":0, - "Daily_Withdraw_Limit":{ - "value":"400.00000000", - "value_int":"40000000000", - "display":"400.00000000\u00a0BTC", - "display_short":"400.00\u00a0BTC", - "currency":"BTC" - }, - "Monthly_Withdraw_Limit":null, - "Max_Withdraw":{ - "value":"400.00000000", - "value_int":"40000000000", - "display":"400.00000000\u00a0BTC", - "display_short":"400.00\u00a0BTC", - "currency":"BTC" - } - }, - "USD":{ - "Balance":{ - "value":"0.00000", - "value_int":"0", - "display":"$0.00000", - "display_short":"$0.00", - "currency":"USD" - }, - "Operations":0, - "Daily_Withdraw_Limit":{ - "value":"1000.00000", - "value_int":"100000000", - "display":"$1,000.00000", - "display_short":"$1,000.00", - "currency":"USD" - }, - "Monthly_Withdraw_Limit":{ - "value":"10000.00000", - "value_int":"1000000000", - "display":"$10,000.00000", - "display_short":"$10,000.00", - "currency":"USD" - }, - "Max_Withdraw":{ - "value":"1000.00000", - "value_int":"100000000", - "display":"$1,000.00000", - "display_short":"$1,000.00", - "currency":"USD" - } - } - }, - "Monthly_Volume":{ - "value":"0.00000000", - "value_int":"0", - "display":"0.00000000\u00a0BTC", - "display_short":"0.00\u00a0BTC", - "currency":"BTC"}, - "Trade_Fee":0.6 -} diff --git a/xchange-mtgox/src/test/resources/v1/account/example-deposit-response.json b/xchange-mtgox/src/test/resources/v1/account/example-deposit-response.json deleted file mode 100644 index 6223197cf..000000000 --- a/xchange-mtgox/src/test/resources/v1/account/example-deposit-response.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "addr":"15xmfK1f1BnUWVaoZpjPWJmUHaexp8FHVs" -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/account/example-withdrawal-response.json b/xchange-mtgox/src/test/resources/v1/account/example-withdrawal-response.json deleted file mode 100644 index f96519d6f..000000000 --- a/xchange-mtgox/src/test/resources/v1/account/example-withdrawal-response.json +++ /dev/null @@ -1 +0,0 @@ -{"trx":"9921d2c5abecfd3604e921888b32e48256c914156cc76c4c8eca1ad2709b48e6"} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-depth-data.json b/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-depth-data.json deleted file mode 100644 index d9268688d..000000000 --- a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-depth-data.json +++ /dev/null @@ -1,6544 +0,0 @@ -{ - "asks":[ - { - "price":182.99999, - "amount":2.46297453, - "price_int":"18299999", - "amount_int":"246297453", - "stamp":"1365444563657991" - }, - { - "price":183, - "amount":28.86625432, - "price_int":"18300000", - "amount_int":"2886625432", - "stamp":"1365444532984695" - }, - { - "price":183.54, - "amount":0.52, - "price_int":"18354000", - "amount_int":"52000000", - "stamp":"1365444439543115" - }, - { - "price":183.7, - "amount":24.63506836, - "price_int":"18370000", - "amount_int":"2463506836", - "stamp":"1365444041064282" - }, - { - "price":183.70829, - "amount":1.391374, - "price_int":"18370829", - "amount_int":"139137400", - "stamp":"1365444317142897" - }, - { - "price":183.9, - "amount":1, - "price_int":"18390000", - "amount_int":"100000000", - "stamp":"1365442391487199" - }, - { - "price":183.99852, - "amount":0.4, - "price_int":"18399852", - "amount_int":"40000000", - "stamp":"1365442416994867" - }, - { - "price":184, - "amount":40.77917808, - "price_int":"18400000", - "amount_int":"4077917808", - "stamp":"1365444445352581" - }, - { - "price":184.07391, - "amount":0.18812433, - "price_int":"18407391", - "amount_int":"18812433", - "stamp":"1365442460889587" - }, - { - "price":184.09999, - "amount":0.02, - "price_int":"18409999", - "amount_int":"2000000", - "stamp":"1365442415527880" - }, - { - "price":184.1, - "amount":23, - "price_int":"18410000", - "amount_int":"2300000000", - "stamp":"1365442316014121" - }, - { - "price":184.24312, - "amount":0.008, - "price_int":"18424312", - "amount_int":"800000", - "stamp":"1365444463446381" - }, - { - "price":184.4, - "amount":25, - "price_int":"18440000", - "amount_int":"2500000000", - "stamp":"1365442329633748" - }, - { - "price":184.5, - "amount":0.3, - "price_int":"18450000", - "amount_int":"30000000", - "stamp":"1365442445932170" - }, - { - "price":184.66774, - "amount":25.88836624, - "price_int":"18466774", - "amount_int":"2588836624", - "stamp":"1365444169053978" - }, - { - "price":184.69999, - "amount":1.42118916, - "price_int":"18469999", - "amount_int":"142118916", - "stamp":"1365442489159413" - }, - { - "price":184.73451, - "amount":0.4, - "price_int":"18473451", - "amount_int":"40000000", - "stamp":"1365442417214891" - }, - { - "price":184.8, - "amount":5, - "price_int":"18480000", - "amount_int":"500000000", - "stamp":"1365442562796420" - }, - { - "price":184.87, - "amount":1, - "price_int":"18487000", - "amount_int":"100000000", - "stamp":"1365442999562819" - }, - { - "price":184.89, - "amount":0.4, - "price_int":"18489000", - "amount_int":"40000000", - "stamp":"1365443668856623" - }, - { - "price":184.9, - "amount":2, - "price_int":"18490000", - "amount_int":"200000000", - "stamp":"1365442211188117" - }, - { - "price":184.9078, - "amount":0.3928, - "price_int":"18490780", - "amount_int":"39280000", - "stamp":"1365443183387734" - }, - { - "price":184.99, - "amount":0.5, - "price_int":"18499000", - "amount_int":"50000000", - "stamp":"1365444482341553" - }, - { - "price":184.99994, - "amount":0.03853203, - "price_int":"18499994", - "amount_int":"3853203", - "stamp":"1365444527463712" - }, - { - "price":185, - "amount":134.64291852, - "price_int":"18500000", - "amount_int":"13464291852", - "stamp":"1365444542817845" - }, - { - "price":185.1, - "amount":1, - "price_int":"18510000", - "amount_int":"100000000", - "stamp":"1365441997958654" - }, - { - "price":185.25, - "amount":2.8992968, - "price_int":"18525000", - "amount_int":"289929680", - "stamp":"1365442412050387" - }, - { - "price":185.3, - "amount":25.8946, - "price_int":"18530000", - "amount_int":"2589460000", - "stamp":"1365442928448744" - }, - { - "price":185.41584, - "amount":0.37503, - "price_int":"18541584", - "amount_int":"37503000", - "stamp":"1365444452518041" - }, - { - "price":185.47345, - "amount":0.4, - "price_int":"18547345", - "amount_int":"40000000", - "stamp":"1365442185925087" - }, - { - "price":185.5, - "amount":3, - "price_int":"18550000", - "amount_int":"300000000", - "stamp":"1365443243740330" - }, - { - "price":185.8, - "amount":2.0874, - "price_int":"18580000", - "amount_int":"208740000", - "stamp":"1365444317204474" - }, - { - "price":185.85, - "amount":0.35, - "price_int":"18585000", - "amount_int":"35000000", - "stamp":"1365442306015970" - }, - { - "price":185.8699, - "amount":0.161, - "price_int":"18586990", - "amount_int":"16100000", - "stamp":"1365442073356105" - }, - { - "price":185.8799, - "amount":20.04763743, - "price_int":"18587990", - "amount_int":"2004763743", - "stamp":"1365442155117745" - }, - { - "price":185.88, - "amount":27.8551139, - "price_int":"18588000", - "amount_int":"2785511390", - "stamp":"1365441983585476" - }, - { - "price":185.89998, - "amount":2.36708833, - "price_int":"18589998", - "amount_int":"236708833", - "stamp":"1365442097998609" - }, - { - "price":185.9, - "amount":0.7640682, - "price_int":"18590000", - "amount_int":"76406820", - "stamp":"1365442423136308" - }, - { - "price":185.92, - "amount":1.989, - "price_int":"18592000", - "amount_int":"198900000", - "stamp":"1365441680738951" - }, - { - "price":185.999, - "amount":15, - "price_int":"18599900", - "amount_int":"1500000000", - "stamp":"1365441840289993" - }, - { - "price":185.99999, - "amount":0.12753553, - "price_int":"18599999", - "amount_int":"12753553", - "stamp":"1365442086341432" - }, - { - "price":186, - "amount":24.3205, - "price_int":"18600000", - "amount_int":"2432050000", - "stamp":"1365443135443691" - }, - { - "price":186.21534, - "amount":0.4, - "price_int":"18621534", - "amount_int":"40000000", - "stamp":"1365442186158394" - }, - { - "price":186.3, - "amount":1, - "price_int":"18630000", - "amount_int":"100000000", - "stamp":"1365441649296505" - }, - { - "price":186.4, - "amount":52.1334, - "price_int":"18640000", - "amount_int":"5213340000", - "stamp":"1365443215824048" - }, - { - "price":186.45, - "amount":2.5, - "price_int":"18645000", - "amount_int":"250000000", - "stamp":"1365441913251638" - }, - { - "price":186.48, - "amount":1, - "price_int":"18648000", - "amount_int":"100000000", - "stamp":"1365441481576223" - }, - { - "price":186.49, - "amount":47.3, - "price_int":"18649000", - "amount_int":"4730000000", - "stamp":"1365442074853088" - }, - { - "price":186.49999, - "amount":10.01001, - "price_int":"18649999", - "amount_int":"1001001000", - "stamp":"1365441262014055" - }, - { - "price":186.5, - "amount":11.1611, - "price_int":"18650000", - "amount_int":"1116110000", - "stamp":"1365443305054990" - }, - { - "price":186.52, - "amount":1, - "price_int":"18652000", - "amount_int":"100000000", - "stamp":"1365442927759864" - }, - { - "price":186.6, - "amount":4.2, - "price_int":"18660000", - "amount_int":"420000000", - "stamp":"1365441486044076" - }, - { - "price":186.69, - "amount":0.2, - "price_int":"18669000", - "amount_int":"20000000", - "stamp":"1365441416816568" - }, - { - "price":186.7, - "amount":29.56438778, - "price_int":"18670000", - "amount_int":"2956438778", - "stamp":"1365444390754252" - }, - { - "price":186.72, - "amount":50, - "price_int":"18672000", - "amount_int":"5000000000", - "stamp":"1365444135184423" - }, - { - "price":186.75, - "amount":5.01694999, - "price_int":"18675000", - "amount_int":"501694999", - "stamp":"1365443178375083" - }, - { - "price":186.788, - "amount":4.5409746, - "price_int":"18678800", - "amount_int":"454097460", - "stamp":"1365441221222850" - }, - { - "price":186.79, - "amount":56.9876176, - "price_int":"18679000", - "amount_int":"5698761760", - "stamp":"1365441083927715" - }, - { - "price":186.79999, - "amount":0.04, - "price_int":"18679999", - "amount_int":"4000000", - "stamp":"1365441013030135" - }, - { - "price":186.88495, - "amount":13.05188335, - "price_int":"18688495", - "amount_int":"1305188335", - "stamp":"1365444550125548" - }, - { - "price":186.9, - "amount":62.73456957, - "price_int":"18690000", - "amount_int":"6273456957", - "stamp":"1365441433614844" - }, - { - "price":186.96001, - "amount":5.3487, - "price_int":"18696001", - "amount_int":"534870000", - "stamp":"1365441547351342" - }, - { - "price":186.9602, - "amount":0.4, - "price_int":"18696020", - "amount_int":"40000000", - "stamp":"1365440461808652" - }, - { - "price":186.97, - "amount":2, - "price_int":"18697000", - "amount_int":"200000000", - "stamp":"1365444116180065" - }, - { - "price":186.998, - "amount":0.1, - "price_int":"18699800", - "amount_int":"10000000", - "stamp":"1365440597114737" - }, - { - "price":186.99898, - "amount":0.01385105, - "price_int":"18699898", - "amount_int":"1385105", - "stamp":"1365441077791958" - }, - { - "price":186.99989, - "amount":256.97045869, - "price_int":"18699989", - "amount_int":"25697045869", - "stamp":"1365443354934527" - }, - { - "price":186.99999, - "amount":0.4, - "price_int":"18699999", - "amount_int":"40000000", - "stamp":"1365441115886811" - }, - { - "price":187, - "amount":276.06201728, - "price_int":"18700000", - "amount_int":"27606201728", - "stamp":"1365444470002155" - }, - { - "price":187.01, - "amount":1.7118668, - "price_int":"18701000", - "amount_int":"171186680", - "stamp":"1365442454560160" - }, - { - "price":187.0625, - "amount":0.1, - "price_int":"18706250", - "amount_int":"10000000", - "stamp":"1365442981278944" - }, - { - "price":187.5, - "amount":75, - "price_int":"18750000", - "amount_int":"7500000000", - "stamp":"1365442444435217" - }, - { - "price":187.70804, - "amount":0.4, - "price_int":"18770804", - "amount_int":"40000000", - "stamp":"1365440832849809" - }, - { - "price":187.8, - "amount":0.1, - "price_int":"18780000", - "amount_int":"10000000", - "stamp":"1365440494047235" - }, - { - "price":187.82, - "amount":1.25635185, - "price_int":"18782000", - "amount_int":"125635185", - "stamp":"1365441235668715" - }, - { - "price":187.896, - "amount":0.1, - "price_int":"18789600", - "amount_int":"10000000", - "stamp":"1365440452508780" - }, - { - "price":187.9, - "amount":50, - "price_int":"18790000", - "amount_int":"5000000000", - "stamp":"1365440501647643" - }, - { - "price":187.95, - "amount":5, - "price_int":"18795000", - "amount_int":"500000000", - "stamp":"1365441391723607" - }, - { - "price":187.981, - "amount":0.04, - "price_int":"18798100", - "amount_int":"4000000", - "stamp":"1365443051136924" - }, - { - "price":187.987, - "amount":3, - "price_int":"18798700", - "amount_int":"300000000", - "stamp":"1365441216383547" - }, - { - "price":187.98999, - "amount":51.44, - "price_int":"18798999", - "amount_int":"5144000000", - "stamp":"1365440885861960" - }, - { - "price":187.999, - "amount":103.27, - "price_int":"18799900", - "amount_int":"10327000000", - "stamp":"1365440515671728" - }, - { - "price":188, - "amount":34.00122292, - "price_int":"18800000", - "amount_int":"3400122292", - "stamp":"1365442348417742" - }, - { - "price":188.2, - "amount":176.2, - "price_int":"18820000", - "amount_int":"17620000000", - "stamp":"1365441210740509" - }, - { - "price":188.29, - "amount":3.5, - "price_int":"18829000", - "amount_int":"350000000", - "stamp":"1365441474342362" - }, - { - "price":188.31, - "amount":0.65, - "price_int":"18831000", - "amount_int":"65000000", - "stamp":"1365440432145979" - }, - { - "price":188.3478, - "amount":10, - "price_int":"18834780", - "amount_int":"1000000000", - "stamp":"1365439370362149" - }, - { - "price":188.4, - "amount":0.2, - "price_int":"18840000", - "amount_int":"20000000", - "stamp":"1365441231768532" - }, - { - "price":188.45887, - "amount":0.4, - "price_int":"18845887", - "amount_int":"40000000", - "stamp":"1365437429515510" - }, - { - "price":188.62793, - "amount":0.53014418, - "price_int":"18862793", - "amount_int":"53014418", - "stamp":"1365437396956552" - }, - { - "price":188.7, - "amount":0.01, - "price_int":"18870000", - "amount_int":"1000000", - "stamp":"1365442804851313" - }, - { - "price":188.8, - "amount":42, - "price_int":"18880000", - "amount_int":"4200000000", - "stamp":"1365437519289182" - }, - { - "price":188.9, - "amount":6.5, - "price_int":"18890000", - "amount_int":"650000000", - "stamp":"1365442572792016" - }, - { - "price":188.94, - "amount":0.23, - "price_int":"18894000", - "amount_int":"23000000", - "stamp":"1365440963474578" - }, - { - "price":189, - "amount":34.39878373, - "price_int":"18900000", - "amount_int":"3439878373", - "stamp":"1365442723894131" - }, - { - "price":189.00001, - "amount":3, - "price_int":"18900001", - "amount_int":"300000000", - "stamp":"1365444490025013" - }, - { - "price":189.2, - "amount":34.8495, - "price_int":"18920000", - "amount_int":"3484950000", - "stamp":"1365440971022579" - }, - { - "price":189.21271, - "amount":0.4, - "price_int":"18921271", - "amount_int":"40000000", - "stamp":"1365437429068800" - }, - { - "price":189.29999, - "amount":1.63371481, - "price_int":"18929999", - "amount_int":"163371481", - "stamp":"1365440186103618" - }, - { - "price":189.3975, - "amount":0.04, - "price_int":"18939750", - "amount_int":"4000000", - "stamp":"1365443126129565" - }, - { - "price":189.4, - "amount":410.5585, - "price_int":"18940000", - "amount_int":"41055850000", - "stamp":"1365440596038566" - }, - { - "price":189.5, - "amount":69.77754, - "price_int":"18950000", - "amount_int":"6977754000", - "stamp":"1365443328820788" - }, - { - "price":189.89, - "amount":0.04, - "price_int":"18989000", - "amount_int":"4000000", - "stamp":"1365443272395571" - }, - { - "price":189.9, - "amount":307.55, - "price_int":"18990000", - "amount_int":"30755000000", - "stamp":"1365444245396427" - }, - { - "price":189.96956, - "amount":0.4, - "price_int":"18996956", - "amount_int":"40000000", - "stamp":"1365437428243410" - }, - { - "price":189.9731, - "amount":5, - "price_int":"18997310", - "amount_int":"500000000", - "stamp":"1365437622277820" - }, - { - "price":189.999, - "amount":1, - "price_int":"18999900", - "amount_int":"100000000", - "stamp":"1365439782334682" - }, - { - "price":189.9999, - "amount":7.4, - "price_int":"18999990", - "amount_int":"740000000", - "stamp":"1365440504970422" - }, - { - "price":190, - "amount":377.44342928, - "price_int":"19000000", - "amount_int":"37744342928", - "stamp":"1365444021541042" - }, - { - "price":190.09116, - "amount":0.44671718, - "price_int":"19009116", - "amount_int":"44671718", - "stamp":"1365443037843222" - }, - { - "price":190.1, - "amount":4, - "price_int":"19010000", - "amount_int":"400000000", - "stamp":"1365439696748926" - }, - { - "price":190.19, - "amount":0.03653395, - "price_int":"19019000", - "amount_int":"3653395", - "stamp":"1365434432286611" - }, - { - "price":190.48999, - "amount":0.08117496, - "price_int":"19048999", - "amount_int":"8117496", - "stamp":"1365430394132088" - }, - { - "price":190.49999, - "amount":0.07108826, - "price_int":"19049999", - "amount_int":"7108826", - "stamp":"1365430329765737" - }, - { - "price":190.51421, - "amount":0.52489523, - "price_int":"19051421", - "amount_int":"52489523", - "stamp":"1365434888330578" - }, - { - "price":190.53999, - "amount":0.10892222, - "price_int":"19053999", - "amount_int":"10892222", - "stamp":"1365427858519151" - }, - { - "price":190.54999, - "amount":0.21876592, - "price_int":"19054999", - "amount_int":"21876592", - "stamp":"1365426903813506" - }, - { - "price":190.57679, - "amount":0.22066968, - "price_int":"19057679", - "amount_int":"22066968", - "stamp":"1365444524973049" - }, - { - "price":190.59999, - "amount":0.27899101, - "price_int":"19059999", - "amount_int":"27899101", - "stamp":"1365426925949745" - }, - { - "price":190.645, - "amount":0.03653395, - "price_int":"19064500", - "amount_int":"3653395", - "stamp":"1365434432815453" - }, - { - "price":190.72944, - "amount":0.4, - "price_int":"19072944", - "amount_int":"40000000", - "stamp":"1365434912520925" - }, - { - "price":190.73, - "amount":7, - "price_int":"19073000", - "amount_int":"700000000", - "stamp":"1365434375873185" - }, - { - "price":190.79999, - "amount":0.16312563, - "price_int":"19079999", - "amount_int":"16312563", - "stamp":"1365428791941925" - }, - { - "price":190.8, - "amount":1.4238, - "price_int":"19080000", - "amount_int":"142380000", - "stamp":"1365434245775430" - }, - { - "price":190.89, - "amount":0.1, - "price_int":"19089000", - "amount_int":"10000000", - "stamp":"1365435674372786" - }, - { - "price":191, - "amount":244.12128738, - "price_int":"19100000", - "amount_int":"24412128738", - "stamp":"1365444087595904" - }, - { - "price":191.05344, - "amount":0.5609086, - "price_int":"19105344", - "amount_int":"56090860", - "stamp":"1365443945249078" - }, - { - "price":191.1, - "amount":0.03653395, - "price_int":"19110000", - "amount_int":"3653395", - "stamp":"1365434433122075" - }, - { - "price":191.11, - "amount":23.6277, - "price_int":"19111000", - "amount_int":"2362770000", - "stamp":"1365441923672948" - }, - { - "price":191.2, - "amount":100, - "price_int":"19120000", - "amount_int":"10000000000", - "stamp":"1365440908907206" - }, - { - "price":191.21001, - "amount":0.3501862, - "price_int":"19121001", - "amount_int":"35018620", - "stamp":"1365441185452785" - }, - { - "price":191.25, - "amount":0.05, - "price_int":"19125000", - "amount_int":"5000000", - "stamp":"1365443733691821" - }, - { - "price":191.38, - "amount":0.497, - "price_int":"19138000", - "amount_int":"49700000", - "stamp":"1365442902712670" - }, - { - "price":191.39128, - "amount":1.95001576, - "price_int":"19139128", - "amount_int":"195001576", - "stamp":"1365444345941490" - }, - { - "price":191.41223, - "amount":0.05388291, - "price_int":"19141223", - "amount_int":"5388291", - "stamp":"1365444433800673" - }, - { - "price":191.49236, - "amount":0.4, - "price_int":"19149236", - "amount_int":"40000000", - "stamp":"1365434906262098" - }, - { - "price":191.51781, - "amount":1.25302337, - "price_int":"19151781", - "amount_int":"125302337", - "stamp":"1365444557800109" - }, - { - "price":191.555, - "amount":0.03653395, - "price_int":"19155500", - "amount_int":"3653395", - "stamp":"1365434435009176" - }, - { - "price":191.56846, - "amount":15.22274521, - "price_int":"19156846", - "amount_int":"1522274521", - "stamp":"1365440379749918" - }, - { - "price":191.58414, - "amount":10, - "price_int":"19158414", - "amount_int":"1000000000", - "stamp":"1365444018692212" - }, - { - "price":191.64994, - "amount":0.54489974, - "price_int":"19164994", - "amount_int":"54489974", - "stamp":"1365434792411129" - }, - { - "price":191.7, - "amount":0.01, - "price_int":"19170000", - "amount_int":"1000000", - "stamp":"1365442812860723" - }, - { - "price":191.71682, - "amount":6.9708, - "price_int":"19171682", - "amount_int":"697080000", - "stamp":"1365443930075112" - }, - { - "price":191.73906, - "amount":0.135, - "price_int":"19173906", - "amount_int":"13500000", - "stamp":"1365442981550245" - }, - { - "price":191.77971, - "amount":1.8530946, - "price_int":"19177971", - "amount_int":"185309460", - "stamp":"1365439909424880" - }, - { - "price":191.9, - "amount":313.16541343, - "price_int":"19190000", - "amount_int":"31316541343", - "stamp":"1365440736086043" - }, - { - "price":191.98217, - "amount":10, - "price_int":"19198217", - "amount_int":"1000000000", - "stamp":"1365444501076674" - }, - { - "price":191.99, - "amount":0.64242806, - "price_int":"19199000", - "amount_int":"64242806", - "stamp":"1365434036355773" - }, - { - "price":192, - "amount":137.33023605, - "price_int":"19200000", - "amount_int":"13733023605", - "stamp":"1365441187603203" - }, - { - "price":192.01, - "amount":0.03653395, - "price_int":"19201000", - "amount_int":"3653395", - "stamp":"1365434435295971" - }, - { - "price":192.03722, - "amount":0.1, - "price_int":"19203722", - "amount_int":"10000000", - "stamp":"1365440138678586" - }, - { - "price":192.07685, - "amount":0.61044, - "price_int":"19207685", - "amount_int":"61044000", - "stamp":"1365444451723183" - }, - { - "price":192.1, - "amount":4.97, - "price_int":"19210000", - "amount_int":"497000000", - "stamp":"1365438266414623" - }, - { - "price":192.20001, - "amount":25, - "price_int":"19220001", - "amount_int":"2500000000", - "stamp":"1365435704185371" - }, - { - "price":192.20668, - "amount":1, - "price_int":"19220668", - "amount_int":"100000000", - "stamp":"1365444110792386" - }, - { - "price":192.20772, - "amount":0.4268236, - "price_int":"19220772", - "amount_int":"42682360", - "stamp":"1365443748033296" - }, - { - "price":192.24035, - "amount":75, - "price_int":"19224035", - "amount_int":"7500000000", - "stamp":"1365443217237312" - }, - { - "price":192.24214, - "amount":0.32457, - "price_int":"19224214", - "amount_int":"32457000", - "stamp":"1365444490000563" - }, - { - "price":192.24752, - "amount":1, - "price_int":"19224752", - "amount_int":"100000000", - "stamp":"1365437466168005" - }, - { - "price":192.252, - "amount":0.06, - "price_int":"19225200", - "amount_int":"6000000", - "stamp":"1365441343261953" - }, - { - "price":192.25833, - "amount":0.4, - "price_int":"19225833", - "amount_int":"40000000", - "stamp":"1365433795319394" - }, - { - "price":192.3802, - "amount":67.90545464, - "price_int":"19238020", - "amount_int":"6790545464", - "stamp":"1365443331732767" - }, - { - "price":192.41935, - "amount":0.51969825, - "price_int":"19241935", - "amount_int":"51969825", - "stamp":"1365433906965828" - }, - { - "price":192.42424, - "amount":0.07, - "price_int":"19242424", - "amount_int":"7000000", - "stamp":"1365435820826923" - }, - { - "price":192.465, - "amount":0.03653395, - "price_int":"19246500", - "amount_int":"3653395", - "stamp":"1365434435579600" - }, - { - "price":192.4999, - "amount":1, - "price_int":"19249990", - "amount_int":"100000000", - "stamp":"1365436235486710" - }, - { - "price":192.5, - "amount":25, - "price_int":"19250000", - "amount_int":"2500000000", - "stamp":"1365440692080266" - }, - { - "price":192.8, - "amount":0.31378349, - "price_int":"19280000", - "amount_int":"31378349", - "stamp":"1365441802573891" - }, - { - "price":192.806, - "amount":12.70708267, - "price_int":"19280600", - "amount_int":"1270708267", - "stamp":"1365443588840842" - }, - { - "price":192.91, - "amount":5, - "price_int":"19291000", - "amount_int":"500000000", - "stamp":"1365442685222678" - }, - { - "price":192.92, - "amount":0.03653395, - "price_int":"19292000", - "amount_int":"3653395", - "stamp":"1365434436796460" - }, - { - "price":192.95, - "amount":25, - "price_int":"19295000", - "amount_int":"2500000000", - "stamp":"1365440025965971" - }, - { - "price":192.987, - "amount":3, - "price_int":"19298700", - "amount_int":"300000000", - "stamp":"1365441225627235" - }, - { - "price":192.98999, - "amount":265.05446706, - "price_int":"19298999", - "amount_int":"26505446706", - "stamp":"1365439767489370" - }, - { - "price":193, - "amount":16.44848045, - "price_int":"19300000", - "amount_int":"1644848045", - "stamp":"1365441572444099" - }, - { - "price":193.02736, - "amount":0.4, - "price_int":"19302736", - "amount_int":"40000000", - "stamp":"1365433793760039" - }, - { - "price":193.05, - "amount":0.087, - "price_int":"19305000", - "amount_int":"8700000", - "stamp":"1365434183993005" - }, - { - "price":193.2, - "amount":0.94496586, - "price_int":"19320000", - "amount_int":"94496586", - "stamp":"1365440445524488" - }, - { - "price":193.20001, - "amount":2, - "price_int":"19320001", - "amount_int":"200000000", - "stamp":"1365435549037905" - }, - { - "price":193.375, - "amount":0.03653395, - "price_int":"19337500", - "amount_int":"3653395", - "stamp":"1365434437055548" - }, - { - "price":193.4, - "amount":2.21117823, - "price_int":"19340000", - "amount_int":"221117823", - "stamp":"1365443597954763" - }, - { - "price":193.48514, - "amount":0.54489974, - "price_int":"19348514", - "amount_int":"54489974", - "stamp":"1365434810568133" - }, - { - "price":193.7, - "amount":5.1626, - "price_int":"19370000", - "amount_int":"516260000", - "stamp":"1365439975755486" - }, - { - "price":193.70563, - "amount":9.941, - "price_int":"19370563", - "amount_int":"994100000", - "stamp":"1365444559712258" - }, - { - "price":193.70696, - "amount":0.185, - "price_int":"19370696", - "amount_int":"18500000", - "stamp":"1365439077897763" - }, - { - "price":193.76999, - "amount":2.9643068, - "price_int":"19376999", - "amount_int":"296430680", - "stamp":"1365437948252172" - }, - { - "price":193.79947, - "amount":0.4, - "price_int":"19379947", - "amount_int":"40000000", - "stamp":"1365433793954039" - }, - { - "price":193.83, - "amount":0.03653395, - "price_int":"19383000", - "amount_int":"3653395", - "stamp":"1365434437321517" - }, - { - "price":193.88, - "amount":14.1, - "price_int":"19388000", - "amount_int":"1410000000", - "stamp":"1365439989529497" - }, - { - "price":193.89616, - "amount":0.2048739, - "price_int":"19389616", - "amount_int":"20487390", - "stamp":"1365441243359187" - }, - { - "price":193.9, - "amount":50, - "price_int":"19390000", - "amount_int":"5000000000", - "stamp":"1365436591110007" - }, - { - "price":193.9057, - "amount":11.2, - "price_int":"19390570", - "amount_int":"1120000000", - "stamp":"1365443825913463" - }, - { - "price":193.9201, - "amount":200.05925147, - "price_int":"19392010", - "amount_int":"20005925147", - "stamp":"1365434528959967" - }, - { - "price":193.9888, - "amount":10.06519133, - "price_int":"19398880", - "amount_int":"1006519133", - "stamp":"1365443947133337" - }, - { - "price":193.989, - "amount":3.12431389, - "price_int":"19398900", - "amount_int":"312431389", - "stamp":"1365433783662565" - }, - { - "price":194, - "amount":268.4630905, - "price_int":"19400000", - "amount_int":"26846309050", - "stamp":"1365442738341041" - }, - { - "price":194.09999, - "amount":0.35, - "price_int":"19409999", - "amount_int":"35000000", - "stamp":"1365436327084744" - }, - { - "price":194.12, - "amount":0.14925, - "price_int":"19412000", - "amount_int":"14925000", - "stamp":"1365438829534362" - }, - { - "price":194.17001, - "amount":16.19303528, - "price_int":"19417001", - "amount_int":"1619303528", - "stamp":"1365435804140350" - }, - { - "price":194.185, - "amount":0.9, - "price_int":"19418500", - "amount_int":"90000000", - "stamp":"1365434615347185" - }, - { - "price":194.19, - "amount":25, - "price_int":"19419000", - "amount_int":"2500000000", - "stamp":"1365434184770832" - }, - { - "price":194.19179, - "amount":0.4901, - "price_int":"19419179", - "amount_int":"49010000", - "stamp":"1365434591815195" - }, - { - "price":194.2, - "amount":13.87133253, - "price_int":"19420000", - "amount_int":"1387133253", - "stamp":"1365435574738655" - }, - { - "price":194.20001, - "amount":184.90101258, - "price_int":"19420001", - "amount_int":"18490101258", - "stamp":"1365435863059270" - }, - { - "price":194.25, - "amount":3.5, - "price_int":"19425000", - "amount_int":"350000000", - "stamp":"1365437130326893" - }, - { - "price":194.285, - "amount":0.03653395, - "price_int":"19428500", - "amount_int":"3653395", - "stamp":"1365434437656745" - }, - { - "price":194.30001, - "amount":20.36898116, - "price_int":"19430001", - "amount_int":"2036898116", - "stamp":"1365434407157293" - }, - { - "price":194.32, - "amount":0.1988, - "price_int":"19432000", - "amount_int":"19880000", - "stamp":"1365434044754368" - }, - { - "price":194.32974, - "amount":0.52631579, - "price_int":"19432974", - "amount_int":"52631579", - "stamp":"1365439614924259" - }, - { - "price":194.34354, - "amount":0.51455273, - "price_int":"19434354", - "amount_int":"51455273", - "stamp":"1365433628202861" - }, - { - "price":194.37034, - "amount":0.2147, - "price_int":"19437034", - "amount_int":"21470000", - "stamp":"1365443532111447" - }, - { - "price":194.444, - "amount":1.81668129, - "price_int":"19444400", - "amount_int":"181668129", - "stamp":"1365439292288516" - }, - { - "price":194.489, - "amount":0.12, - "price_int":"19448900", - "amount_int":"12000000", - "stamp":"1365442919623225" - }, - { - "price":194.49, - "amount":0.25, - "price_int":"19449000", - "amount_int":"25000000", - "stamp":"1365433622169883" - }, - { - "price":194.4999, - "amount":9.77806825, - "price_int":"19449990", - "amount_int":"977806825", - "stamp":"1365439030827964" - }, - { - "price":194.5, - "amount":1529.768222, - "price_int":"19450000", - "amount_int":"152976822200", - "stamp":"1365438420605441" - }, - { - "price":194.50001, - "amount":30.11481936, - "price_int":"19450001", - "amount_int":"3011481936", - "stamp":"1365434258697706" - }, - { - "price":194.51, - "amount":4.5553568, - "price_int":"19451000", - "amount_int":"455535680", - "stamp":"1365436032469170" - }, - { - "price":194.5373, - "amount":0.5, - "price_int":"19453730", - "amount_int":"50000000", - "stamp":"1365439680427272" - }, - { - "price":194.55, - "amount":19, - "price_int":"19455000", - "amount_int":"1900000000", - "stamp":"1365438601575113" - }, - { - "price":194.57467, - "amount":0.4, - "price_int":"19457467", - "amount_int":"40000000", - "stamp":"1365433724321057" - }, - { - "price":194.6, - "amount":2.80822935, - "price_int":"19460000", - "amount_int":"280822935", - "stamp":"1365437589134537" - }, - { - "price":194.617, - "amount":0.52631579, - "price_int":"19461700", - "amount_int":"52631579", - "stamp":"1365439605205450" - }, - { - "price":194.62, - "amount":1.05, - "price_int":"19462000", - "amount_int":"105000000", - "stamp":"1365434567586008" - }, - { - "price":194.64001, - "amount":0.5, - "price_int":"19464001", - "amount_int":"50000000", - "stamp":"1365435832067789" - }, - { - "price":194.69355, - "amount":0.06379327, - "price_int":"19469355", - "amount_int":"6379327", - "stamp":"1365439837254437" - }, - { - "price":194.7, - "amount":0.265, - "price_int":"19470000", - "amount_int":"26500000", - "stamp":"1365433929061950" - }, - { - "price":194.71309, - "amount":18.85660055, - "price_int":"19471309", - "amount_int":"1885660055", - "stamp":"1365439742319084" - }, - { - "price":194.7131, - "amount":5, - "price_int":"19471310", - "amount_int":"500000000", - "stamp":"1365433316408303" - }, - { - "price":194.72862, - "amount":0.34190699, - "price_int":"19472862", - "amount_int":"34190699", - "stamp":"1365433776931089" - }, - { - "price":194.74, - "amount":0.03653395, - "price_int":"19474000", - "amount_int":"3653395", - "stamp":"1365434437924181" - }, - { - "price":194.76837, - "amount":0.02, - "price_int":"19476837", - "amount_int":"2000000", - "stamp":"1365441981058531" - }, - { - "price":194.7777, - "amount":2, - "price_int":"19477770", - "amount_int":"200000000", - "stamp":"1365433220054166" - }, - { - "price":194.8, - "amount":37.87386793, - "price_int":"19480000", - "amount_int":"3787386793", - "stamp":"1365444302271577" - }, - { - "price":194.85, - "amount":5.22225984, - "price_int":"19485000", - "amount_int":"522225984", - "stamp":"1365434715384008" - }, - { - "price":194.86999, - "amount":12.16112525, - "price_int":"19486999", - "amount_int":"1216112525", - "stamp":"1365434638500942" - }, - { - "price":194.89, - "amount":0.19626041, - "price_int":"19489000", - "amount_int":"19626041", - "stamp":"1365433513508196" - }, - { - "price":194.9, - "amount":21.28103292, - "price_int":"19490000", - "amount_int":"2128103292", - "stamp":"1365437634327240" - }, - { - "price":194.95, - "amount":0.05, - "price_int":"19495000", - "amount_int":"5000000", - "stamp":"1365434540082952" - }, - { - "price":194.987, - "amount":3, - "price_int":"19498700", - "amount_int":"300000000", - "stamp":"1365441232695467" - }, - { - "price":194.9877, - "amount":0.105, - "price_int":"19498770", - "amount_int":"10500000", - "stamp":"1365247347489683" - }, - { - "price":194.99, - "amount":4, - "price_int":"19499000", - "amount_int":"400000000", - "stamp":"1365435890988514" - }, - { - "price":194.999, - "amount":514.5087199, - "price_int":"19499900", - "amount_int":"51450871990", - "stamp":"1365441938305400" - }, - { - "price":194.99999, - "amount":5, - "price_int":"19499999", - "amount_int":"500000000", - "stamp":"1365366852605694" - }, - { - "price":195, - "amount":1304.91894068, - "price_int":"19500000", - "amount_int":"130491894068", - "stamp":"1365444224652159" - }, - { - "price":195.03372, - "amount":3.1353068, - "price_int":"19503372", - "amount_int":"313530680", - "stamp":"1365444483213995" - }, - { - "price":195.1, - "amount":0.05, - "price_int":"19510000", - "amount_int":"5000000", - "stamp":"1365408798025226" - }, - { - "price":195.10002, - "amount":0.6, - "price_int":"19510002", - "amount_int":"60000000", - "stamp":"1365425746133761" - }, - { - "price":195.111, - "amount":10, - "price_int":"19511100", - "amount_int":"1000000000", - "stamp":"1365383449242908" - }, - { - "price":195.12, - "amount":0.5, - "price_int":"19512000", - "amount_int":"50000000", - "stamp":"1365438783992976" - }, - { - "price":195.1256, - "amount":0.05416156, - "price_int":"19512560", - "amount_int":"5416156", - "stamp":"1365440112920408" - }, - { - "price":195.1877, - "amount":0.104, - "price_int":"19518770", - "amount_int":"10400000", - "stamp":"1365247346530195" - }, - { - "price":195.2, - "amount":0.05, - "price_int":"19520000", - "amount_int":"5000000", - "stamp":"1365408798622010" - }, - { - "price":195.20001, - "amount":0.5, - "price_int":"19520001", - "amount_int":"50000000", - "stamp":"1365435169190626" - }, - { - "price":195.25, - "amount":0.2520904, - "price_int":"19525000", - "amount_int":"25209040", - "stamp":"1365435933586076" - }, - { - "price":195.3, - "amount":0.05, - "price_int":"19530000", - "amount_int":"5000000", - "stamp":"1365408800243595" - }, - { - "price":195.31857, - "amount":12.21010709, - "price_int":"19531857", - "amount_int":"1221010709", - "stamp":"1365443951577999" - }, - { - "price":195.34424, - "amount":1.72377249, - "price_int":"19534424", - "amount_int":"172377249", - "stamp":"1365431823593183" - }, - { - "price":195.35297, - "amount":0.4, - "price_int":"19535297", - "amount_int":"40000000", - "stamp":"1365404370194703" - }, - { - "price":195.3877, - "amount":0.104, - "price_int":"19538770", - "amount_int":"10400000", - "stamp":"1365247344869286" - }, - { - "price":195.4, - "amount":0.05, - "price_int":"19540000", - "amount_int":"5000000", - "stamp":"1365408800774922" - }, - { - "price":195.40001, - "amount":0.011, - "price_int":"19540001", - "amount_int":"1100000", - "stamp":"1365426685006013" - }, - { - "price":195.40002, - "amount":0.6, - "price_int":"19540002", - "amount_int":"60000000", - "stamp":"1365425746500411" - }, - { - "price":195.41014, - "amount":0.08475469, - "price_int":"19541014", - "amount_int":"8475469", - "stamp":"1365434388447266" - }, - { - "price":195.5, - "amount":14.25, - "price_int":"19550000", - "amount_int":"1425000000", - "stamp":"1365443259029884" - }, - { - "price":195.50001, - "amount":1.25, - "price_int":"19550001", - "amount_int":"125000000", - "stamp":"1365435210433502" - }, - { - "price":195.5877, - "amount":0.104, - "price_int":"19558770", - "amount_int":"10400000", - "stamp":"1365247344374279" - }, - { - "price":195.6, - "amount":0.05, - "price_int":"19560000", - "amount_int":"5000000", - "stamp":"1365408802948187" - }, - { - "price":195.68383, - "amount":5, - "price_int":"19568383", - "amount_int":"500000000", - "stamp":"1365435094421668" - }, - { - "price":195.7, - "amount":0.06, - "price_int":"19570000", - "amount_int":"6000000", - "stamp":"1365442818507657" - }, - { - "price":195.70002, - "amount":0.6, - "price_int":"19570002", - "amount_int":"60000000", - "stamp":"1365425746950479" - }, - { - "price":195.75, - "amount":0.05, - "price_int":"19575000", - "amount_int":"5000000", - "stamp":"1365434570737313" - }, - { - "price":195.77527, - "amount":0.28999999, - "price_int":"19577527", - "amount_int":"28999999", - "stamp":"1365429250019876" - }, - { - "price":195.7777, - "amount":5, - "price_int":"19577770", - "amount_int":"500000000", - "stamp":"1365408506288200" - }, - { - "price":195.7877, - "amount":0.104, - "price_int":"19578770", - "amount_int":"10400000", - "stamp":"1365247343749549" - }, - { - "price":195.8, - "amount":0.05, - "price_int":"19580000", - "amount_int":"5000000", - "stamp":"1365408805687225" - }, - { - "price":195.85, - "amount":0.05, - "price_int":"19585000", - "amount_int":"5000000", - "stamp":"1365434741379722" - }, - { - "price":195.89, - "amount":0.1, - "price_int":"19589000", - "amount_int":"10000000", - "stamp":"1365430927523555" - }, - { - "price":195.9, - "amount":0.45, - "price_int":"19590000", - "amount_int":"45000000", - "stamp":"1365435019695951" - }, - { - "price":195.9877, - "amount":0.104, - "price_int":"19598770", - "amount_int":"10400000", - "stamp":"1365247343108447" - }, - { - "price":195.998, - "amount":8.76598546, - "price_int":"19599800", - "amount_int":"876598546", - "stamp":"1365401545484693" - }, - { - "price":195.99804, - "amount":90.7, - "price_int":"19599804", - "amount_int":"9070000000", - "stamp":"1365444470855611" - }, - { - "price":196, - "amount":227.56623613, - "price_int":"19600000", - "amount_int":"22756623613", - "stamp":"1365444056013436" - }, - { - "price":196.00002, - "amount":0.6, - "price_int":"19600002", - "amount_int":"60000000", - "stamp":"1365425747352628" - }, - { - "price":196.07, - "amount":5, - "price_int":"19607000", - "amount_int":"500000000", - "stamp":"1364989379497109" - }, - { - "price":196.1, - "amount":5.1494, - "price_int":"19610000", - "amount_int":"514940000", - "stamp":"1365424675412704" - }, - { - "price":196.111, - "amount":10, - "price_int":"19611100", - "amount_int":"1000000000", - "stamp":"1365424368991912" - }, - { - "price":196.13084, - "amount":1, - "price_int":"19613084", - "amount_int":"100000000", - "stamp":"1365434366732653" - }, - { - "price":196.13438, - "amount":0.4, - "price_int":"19613438", - "amount_int":"40000000", - "stamp":"1365404369064329" - }, - { - "price":196.1877, - "amount":0.103, - "price_int":"19618770", - "amount_int":"10300000", - "stamp":"1365247342606353" - }, - { - "price":196.2, - "amount":0.05, - "price_int":"19620000", - "amount_int":"5000000", - "stamp":"1365408874735572" - }, - { - "price":196.20001, - "amount":1.5647124, - "price_int":"19620001", - "amount_int":"156471240", - "stamp":"1365435162553457" - }, - { - "price":196.2278, - "amount":3, - "price_int":"19622780", - "amount_int":"300000000", - "stamp":"1365440627474526" - }, - { - "price":196.28698, - "amount":0.50945814, - "price_int":"19628698", - "amount_int":"50945814", - "stamp":"1365388614795479" - }, - { - "price":196.3, - "amount":5.05, - "price_int":"19630000", - "amount_int":"505000000", - "stamp":"1365438608256405" - }, - { - "price":196.30002, - "amount":0.6, - "price_int":"19630002", - "amount_int":"60000000", - "stamp":"1365425748620426" - }, - { - "price":196.34, - "amount":6, - "price_int":"19634000", - "amount_int":"600000000", - "stamp":"1365434251049561" - }, - { - "price":196.34721, - "amount":17.3079255, - "price_int":"19634721", - "amount_int":"1730792550", - "stamp":"1365436840667141" - }, - { - "price":196.36048, - "amount":4.224, - "price_int":"19636048", - "amount_int":"422400000", - "stamp":"1365442050080307" - }, - { - "price":196.3877, - "amount":0.103, - "price_int":"19638770", - "amount_int":"10300000", - "stamp":"1365247342095903" - }, - { - "price":196.4, - "amount":0.05, - "price_int":"19640000", - "amount_int":"5000000", - "stamp":"1365408877038607" - }, - { - "price":196.4277, - "amount":0.56217647, - "price_int":"19642770", - "amount_int":"56217647", - "stamp":"1365444399864527" - }, - { - "price":196.44872, - "amount":0.06721168, - "price_int":"19644872", - "amount_int":"6721168", - "stamp":"1365436070337854" - }, - { - "price":196.45, - "amount":0.5, - "price_int":"19645000", - "amount_int":"50000000", - "stamp":"1365336568351179" - }, - { - "price":196.5, - "amount":41.05, - "price_int":"19650000", - "amount_int":"4105000000", - "stamp":"1365439980105176" - }, - { - "price":196.50001, - "amount":0.61142543, - "price_int":"19650001", - "amount_int":"61142543", - "stamp":"1365435227974736" - }, - { - "price":196.517, - "amount":0.53019459, - "price_int":"19651700", - "amount_int":"53019459", - "stamp":"1365439590830221" - }, - { - "price":196.53253, - "amount":0.18225, - "price_int":"19653253", - "amount_int":"18225000", - "stamp":"1365442981973407" - }, - { - "price":196.55, - "amount":0.05, - "price_int":"19655000", - "amount_int":"5000000", - "stamp":"1365434753000689" - }, - { - "price":196.5877, - "amount":0.103, - "price_int":"19658770", - "amount_int":"10300000", - "stamp":"1365247341594902" - }, - { - "price":196.6, - "amount":0.05, - "price_int":"19660000", - "amount_int":"5000000", - "stamp":"1365408880574976" - }, - { - "price":196.60002, - "amount":0.6, - "price_int":"19660002", - "amount_int":"60000000", - "stamp":"1365425748984058" - }, - { - "price":196.67, - "amount":17.77172911, - "price_int":"19667000", - "amount_int":"1777172911", - "stamp":"1365438285568560" - }, - { - "price":196.7, - "amount":0.05, - "price_int":"19670000", - "amount_int":"5000000", - "stamp":"1365408882634282" - }, - { - "price":196.70001, - "amount":0.01757968, - "price_int":"19670001", - "amount_int":"1757968", - "stamp":"1365432710556770" - }, - { - "price":196.74576, - "amount":54.747, - "price_int":"19674576", - "amount_int":"5474700000", - "stamp":"1365443910724450" - }, - { - "price":196.75851, - "amount":0.3, - "price_int":"19675851", - "amount_int":"30000000", - "stamp":"1365443845550979" - }, - { - "price":196.777, - "amount":10, - "price_int":"19677700", - "amount_int":"1000000000", - "stamp":"1365424382452268" - }, - { - "price":196.7877, - "amount":0.103, - "price_int":"19678770", - "amount_int":"10300000", - "stamp":"1365247341001277" - }, - { - "price":196.8, - "amount":13.98118478, - "price_int":"19680000", - "amount_int":"1398118478", - "stamp":"1365434174724053" - }, - { - "price":196.88112, - "amount":3, - "price_int":"19688112", - "amount_int":"300000000", - "stamp":"1365441443314117" - }, - { - "price":196.9, - "amount":0.05, - "price_int":"19690000", - "amount_int":"5000000", - "stamp":"1365408885613781" - }, - { - "price":196.91892, - "amount":0.4, - "price_int":"19691892", - "amount_int":"40000000", - "stamp":"1365404369264021" - }, - { - "price":196.96, - "amount":0.2, - "price_int":"19696000", - "amount_int":"20000000", - "stamp":"1365433225950652" - }, - { - "price":196.96543, - "amount":0.52631579, - "price_int":"19696543", - "amount_int":"52631579", - "stamp":"1365439567472557" - }, - { - "price":196.98, - "amount":1.0437, - "price_int":"19698000", - "amount_int":"104370000", - "stamp":"1365437787287496" - }, - { - "price":196.9877, - "amount":0.103, - "price_int":"19698770", - "amount_int":"10300000", - "stamp":"1365247338444564" - }, - { - "price":196.988, - "amount":31.765, - "price_int":"19698800", - "amount_int":"3176500000", - "stamp":"1365334068923430" - }, - { - "price":196.99, - "amount":144.25756829, - "price_int":"19699000", - "amount_int":"14425756829", - "stamp":"1365433833134791" - }, - { - "price":196.99999, - "amount":0.15, - "price_int":"19699999", - "amount_int":"15000000", - "stamp":"1365440092295160" - }, - { - "price":197, - "amount":169.67, - "price_int":"19700000", - "amount_int":"16967000000", - "stamp":"1365441170069285" - }, - { - "price":197.01, - "amount":0.45, - "price_int":"19701000", - "amount_int":"45000000", - "stamp":"1365427846724991" - }, - { - "price":197.02386, - "amount":14.27776637, - "price_int":"19702386", - "amount_int":"1427776637", - "stamp":"1365443635065826" - }, - { - "price":197.08448, - "amount":1.54489584, - "price_int":"19708448", - "amount_int":"154489584", - "stamp":"1365443189008911" - }, - { - "price":197.1, - "amount":50.05, - "price_int":"19710000", - "amount_int":"5005000000", - "stamp":"1365423152494257" - }, - { - "price":197.111, - "amount":10, - "price_int":"19711100", - "amount_int":"1000000000", - "stamp":"1365424394272964" - }, - { - "price":197.1541, - "amount":0.53593441, - "price_int":"19715410", - "amount_int":"53593441", - "stamp":"1365439556004840" - }, - { - "price":197.15654, - "amount":3.28759133, - "price_int":"19715654", - "amount_int":"328759133", - "stamp":"1365443850422535" - }, - { - "price":197.1877, - "amount":0.102, - "price_int":"19718770", - "amount_int":"10200000", - "stamp":"1365247337588474" - }, - { - "price":197.2, - "amount":0.05, - "price_int":"19720000", - "amount_int":"5000000", - "stamp":"1365408888159766" - }, - { - "price":197.22287, - "amount":1.9175, - "price_int":"19722287", - "amount_int":"191750000", - "stamp":"1365440507527447" - }, - { - "price":197.2399, - "amount":1.2115914, - "price_int":"19723990", - "amount_int":"121159140", - "stamp":"1365432048919574" - }, - { - "price":197.24342, - "amount":2.638573, - "price_int":"19724342", - "amount_int":"263857300", - "stamp":"1365443523385895" - }, - { - "price":197.25371, - "amount":0.76796422, - "price_int":"19725371", - "amount_int":"76796422", - "stamp":"1365432048835804" - }, - { - "price":197.3, - "amount":0.05, - "price_int":"19730000", - "amount_int":"5000000", - "stamp":"1365408890668804" - }, - { - "price":197.37057, - "amount":0.1, - "price_int":"19737057", - "amount_int":"10000000", - "stamp":"1365444430518443" - }, - { - "price":197.3877, - "amount":0.102, - "price_int":"19738770", - "amount_int":"10200000", - "stamp":"1365247336361889" - }, - { - "price":197.4, - "amount":5.05, - "price_int":"19740000", - "amount_int":"505000000", - "stamp":"1365444428052065" - }, - { - "price":197.48, - "amount":275, - "price_int":"19748000", - "amount_int":"27500000000", - "stamp":"1365442068626173" - }, - { - "price":197.5, - "amount":27.05, - "price_int":"19750000", - "amount_int":"2705000000", - "stamp":"1365440715855688" - }, - { - "price":197.54575, - "amount":1, - "price_int":"19754575", - "amount_int":"100000000", - "stamp":"1365441903811245" - }, - { - "price":197.55456, - "amount":0.3, - "price_int":"19755456", - "amount_int":"30000000", - "stamp":"1365443859085719" - }, - { - "price":197.5877, - "amount":0.102, - "price_int":"19758770", - "amount_int":"10200000", - "stamp":"1365247335007192" - }, - { - "price":197.6, - "amount":0.05, - "price_int":"19760000", - "amount_int":"5000000", - "stamp":"1365416661756862" - }, - { - "price":197.65, - "amount":0.15, - "price_int":"19765000", - "amount_int":"15000000", - "stamp":"1365444527625798" - }, - { - "price":197.66, - "amount":4, - "price_int":"19766000", - "amount_int":"400000000", - "stamp":"1365407175065172" - }, - { - "price":197.6624, - "amount":19.02136469, - "price_int":"19766240", - "amount_int":"1902136469", - "stamp":"1365435118612104" - }, - { - "price":197.67397, - "amount":0.3683764, - "price_int":"19767397", - "amount_int":"36837640", - "stamp":"1365434962565746" - }, - { - "price":197.68723, - "amount":14.82555625, - "price_int":"19768723", - "amount_int":"1482555625", - "stamp":"1365435270375896" - }, - { - "price":197.68724, - "amount":316.07980658, - "price_int":"19768724", - "amount_int":"31607980658", - "stamp":"1365443437237574" - }, - { - "price":197.7, - "amount":1.05, - "price_int":"19770000", - "amount_int":"105000000", - "stamp":"1365416662322079" - }, - { - "price":197.7066, - "amount":0.4, - "price_int":"19770660", - "amount_int":"40000000", - "stamp":"1365404377838233" - }, - { - "price":197.7877, - "amount":0.102, - "price_int":"19778770", - "amount_int":"10200000", - "stamp":"1365247334343116" - }, - { - "price":197.8, - "amount":0.05, - "price_int":"19780000", - "amount_int":"5000000", - "stamp":"1365416662911818" - }, - { - "price":197.87, - "amount":50, - "price_int":"19787000", - "amount_int":"5000000000", - "stamp":"1365337533072316" - }, - { - "price":197.88, - "amount":3, - "price_int":"19788000", - "amount_int":"300000000", - "stamp":"1365432802001527" - }, - { - "price":197.88537, - "amount":0.5, - "price_int":"19788537", - "amount_int":"50000000", - "stamp":"1365084312447510" - }, - { - "price":197.9, - "amount":70.75, - "price_int":"19790000", - "amount_int":"7075000000", - "stamp":"1365439905397700" - }, - { - "price":197.94868, - "amount":2.6, - "price_int":"19794868", - "amount_int":"260000000", - "stamp":"1365406108944078" - }, - { - "price":197.95259, - "amount":0.3, - "price_int":"19795259", - "amount_int":"30000000", - "stamp":"1365443885680554" - }, - { - "price":197.987, - "amount":3, - "price_int":"19798700", - "amount_int":"300000000", - "stamp":"1365441245906954" - }, - { - "price":197.9877, - "amount":0.102, - "price_int":"19798770", - "amount_int":"10200000", - "stamp":"1365247333833565" - }, - { - "price":197.99173, - "amount":71.11, - "price_int":"19799173", - "amount_int":"7111000000", - "stamp":"1365440492210158" - }, - { - "price":197.99701, - "amount":0.97, - "price_int":"19799701", - "amount_int":"97000000", - "stamp":"1365354256318852" - }, - { - "price":197.99999, - "amount":0.1, - "price_int":"19799999", - "amount_int":"10000000", - "stamp":"1365440074493006" - }, - { - "price":198, - "amount":290.28679274, - "price_int":"19800000", - "amount_int":"29028679274", - "stamp":"1365444026245490" - }, - { - "price":198.00001, - "amount":0.45, - "price_int":"19800001", - "amount_int":"45000000", - "stamp":"1365427751536331" - }, - { - "price":198.1, - "amount":4.371, - "price_int":"19810000", - "amount_int":"437100000", - "stamp":"1365431905490110" - }, - { - "price":198.12571, - "amount":0.45343, - "price_int":"19812571", - "amount_int":"45343000", - "stamp":"1365444433374294" - }, - { - "price":198.13116, - "amount":1.1, - "price_int":"19813116", - "amount_int":"110000000", - "stamp":"1365435382574840" - }, - { - "price":198.1877, - "amount":0.101, - "price_int":"19818770", - "amount_int":"10100000", - "stamp":"1365247330523140" - }, - { - "price":198.2, - "amount":0.75, - "price_int":"19820000", - "amount_int":"75000000", - "stamp":"1365416667805551" - }, - { - "price":198.23, - "amount":4, - "price_int":"19823000", - "amount_int":"400000000", - "stamp":"1365407187251927" - }, - { - "price":198.24985, - "amount":0.504414, - "price_int":"19824985", - "amount_int":"50441400", - "stamp":"1365388615123423" - }, - { - "price":198.28741, - "amount":0.2, - "price_int":"19828741", - "amount_int":"20000000", - "stamp":"1365433737966752" - }, - { - "price":198.3, - "amount":0.05, - "price_int":"19830000", - "amount_int":"5000000", - "stamp":"1365416669499649" - }, - { - "price":198.33735, - "amount":10, - "price_int":"19833735", - "amount_int":"1000000000", - "stamp":"1365434136751674" - }, - { - "price":198.35062, - "amount":266.893, - "price_int":"19835062", - "amount_int":"26689300000", - "stamp":"1365443893148547" - }, - { - "price":198.3877, - "amount":0.101, - "price_int":"19838770", - "amount_int":"10100000", - "stamp":"1365247329733985" - }, - { - "price":198.4, - "amount":50.05, - "price_int":"19840000", - "amount_int":"5005000000", - "stamp":"1365423167349356" - }, - { - "price":198.44367, - "amount":10, - "price_int":"19844367", - "amount_int":"1000000000", - "stamp":"1365441763152594" - }, - { - "price":198.469, - "amount":0.22515932, - "price_int":"19846900", - "amount_int":"22515932", - "stamp":"1365395224218099" - }, - { - "price":198.4833, - "amount":0.3505664, - "price_int":"19848330", - "amount_int":"35056640", - "stamp":"1365438877194209" - }, - { - "price":198.49743, - "amount":0.4, - "price_int":"19849743", - "amount_int":"40000000", - "stamp":"1365404378013523" - }, - { - "price":198.5, - "amount":1.35, - "price_int":"19850000", - "amount_int":"135000000", - "stamp":"1365435552236204" - }, - { - "price":198.5877, - "amount":0.101, - "price_int":"19858770", - "amount_int":"10100000", - "stamp":"1365247328759010" - }, - { - "price":198.6, - "amount":0.05, - "price_int":"19860000", - "amount_int":"5000000", - "stamp":"1365416671924531" - }, - { - "price":198.65, - "amount":0.05, - "price_int":"19865000", - "amount_int":"5000000", - "stamp":"1365436423903690" - }, - { - "price":198.6599, - "amount":0.05, - "price_int":"19865990", - "amount_int":"5000000", - "stamp":"1365442248465296" - }, - { - "price":198.67387, - "amount":0.40679618, - "price_int":"19867387", - "amount_int":"40679618", - "stamp":"1365431358031308" - }, - { - "price":198.7, - "amount":0.16, - "price_int":"19870000", - "amount_int":"16000000", - "stamp":"1365442823867268" - }, - { - "price":198.72, - "amount":0.994, - "price_int":"19872000", - "amount_int":"99400000", - "stamp":"1365351988401640" - }, - { - "price":198.74865, - "amount":0.257, - "price_int":"19874865", - "amount_int":"25700000", - "stamp":"1365438554601991" - }, - { - "price":198.76192, - "amount":0.1402, - "price_int":"19876192", - "amount_int":"14020000", - "stamp":"1365443579173155" - }, - { - "price":198.773, - "amount":0.01, - "price_int":"19877300", - "amount_int":"1000000", - "stamp":"1365398259720323" - }, - { - "price":198.78, - "amount":37.82092454, - "price_int":"19878000", - "amount_int":"3782092454", - "stamp":"1365419338388684" - }, - { - "price":198.7877, - "amount":0.101, - "price_int":"19878770", - "amount_int":"10100000", - "stamp":"1365247328236654" - }, - { - "price":198.8, - "amount":10.05, - "price_int":"19880000", - "amount_int":"1005000000", - "stamp":"1365426424272626" - }, - { - "price":198.823, - "amount":0.12, - "price_int":"19882300", - "amount_int":"12000000", - "stamp":"1365442840189733" - }, - { - "price":198.82456, - "amount":1, - "price_int":"19882456", - "amount_int":"100000000", - "stamp":"1365425125957597" - }, - { - "price":198.88132, - "amount":752.55139895, - "price_int":"19888132", - "amount_int":"75255139895", - "stamp":"1365443914115526" - }, - { - "price":198.8824, - "amount":1, - "price_int":"19888240", - "amount_int":"100000000", - "stamp":"1365429635814078" - }, - { - "price":198.8881, - "amount":0.28999999, - "price_int":"19888810", - "amount_int":"28999999", - "stamp":"1365429250639968" - }, - { - "price":198.8888, - "amount":1.001, - "price_int":"19888880", - "amount_int":"100100000", - "stamp":"1364860692163471" - }, - { - "price":198.89394, - "amount":0.02, - "price_int":"19889394", - "amount_int":"2000000", - "stamp":"1365444126964437" - }, - { - "price":198.9, - "amount":7.55, - "price_int":"19890000", - "amount_int":"755000000", - "stamp":"1365417145338832" - }, - { - "price":198.90487, - "amount":0.95144313, - "price_int":"19890487", - "amount_int":"95144313", - "stamp":"1365415518662925" - }, - { - "price":198.92, - "amount":0.25, - "price_int":"19892000", - "amount_int":"25000000", - "stamp":"1365397509547597" - }, - { - "price":198.94868, - "amount":2.6, - "price_int":"19894868", - "amount_int":"260000000", - "stamp":"1365406095438365" - }, - { - "price":198.95, - "amount":0.05, - "price_int":"19895000", - "amount_int":"5000000", - "stamp":"1365436428560389" - }, - { - "price":198.9599, - "amount":0.05, - "price_int":"19895990", - "amount_int":"5000000", - "stamp":"1365442223077231" - }, - { - "price":198.96, - "amount":28.9, - "price_int":"19896000", - "amount_int":"2890000000", - "stamp":"1365431931031541" - }, - { - "price":198.98745, - "amount":0.09, - "price_int":"19898745", - "amount_int":"9000000", - "stamp":"1365426277752240" - }, - { - "price":198.98746, - "amount":10, - "price_int":"19898746", - "amount_int":"1000000000", - "stamp":"1365434483368394" - }, - { - "price":198.9877, - "amount":0.101, - "price_int":"19898770", - "amount_int":"10100000", - "stamp":"1365247327642752" - }, - { - "price":198.988, - "amount":1.73593273, - "price_int":"19898800", - "amount_int":"173593273", - "stamp":"1365334060159179" - }, - { - "price":198.99, - "amount":22.89, - "price_int":"19899000", - "amount_int":"2289000000", - "stamp":"1365439889557798" - }, - { - "price":198.99175, - "amount":44.74989286, - "price_int":"19899175", - "amount_int":"4474989286", - "stamp":"1365436241569328" - }, - { - "price":198.999, - "amount":0.5, - "price_int":"19899900", - "amount_int":"50000000", - "stamp":"1365430439155706" - }, - { - "price":198.99941, - "amount":6.8493, - "price_int":"19899941", - "amount_int":"684930000", - "stamp":"1365426327731694" - }, - { - "price":198.99999, - "amount":7.29999999, - "price_int":"19899999", - "amount_int":"729999999", - "stamp":"1365438248630447" - }, - { - "price":199, - "amount":186.94541674, - "price_int":"19900000", - "amount_int":"18694541674", - "stamp":"1365442151724967" - }, - { - "price":199.00073, - "amount":10.5, - "price_int":"19900073", - "amount_int":"1050000000", - "stamp":"1365431690535151" - }, - { - "price":199.014, - "amount":177.17977076, - "price_int":"19901400", - "amount_int":"17717977076", - "stamp":"1365442851501188" - }, - { - "price":199.03, - "amount":3.49319498, - "price_int":"19903000", - "amount_int":"349319498", - "stamp":"1365358190112527" - }, - { - "price":199.05, - "amount":0.35, - "price_int":"19905000", - "amount_int":"35000000", - "stamp":"1365439685249121" - }, - { - "price":199.1, - "amount":0.05, - "price_int":"19910000", - "amount_int":"5000000", - "stamp":"1365416678885934" - }, - { - "price":199.11, - "amount":18.39, - "price_int":"19911000", - "amount_int":"1839000000", - "stamp":"1365427240868921" - }, - { - "price":199.14668, - "amount":0.1, - "price_int":"19914668", - "amount_int":"10000000", - "stamp":"1365430395299982" - }, - { - "price":199.17, - "amount":0.494852, - "price_int":"19917000", - "amount_int":"49485200", - "stamp":"1365393635060429" - }, - { - "price":199.1877, - "amount":0.1, - "price_int":"19918770", - "amount_int":"10000000", - "stamp":"1365247326850366" - }, - { - "price":199.2, - "amount":1.55, - "price_int":"19920000", - "amount_int":"155000000", - "stamp":"1365435410971390" - }, - { - "price":199.20001, - "amount":10.01, - "price_int":"19920001", - "amount_int":"1001000000", - "stamp":"1365433429995609" - }, - { - "price":199.23, - "amount":10, - "price_int":"19923000", - "amount_int":"1000000000", - "stamp":"1365420533547667" - }, - { - "price":199.25, - "amount":2, - "price_int":"19925000", - "amount_int":"200000000", - "stamp":"1365392589752531" - }, - { - "price":199.29142, - "amount":0.4, - "price_int":"19929142", - "amount_int":"40000000", - "stamp":"1365404379099605" - }, - { - "price":199.3, - "amount":0.05, - "price_int":"19930000", - "amount_int":"5000000", - "stamp":"1365416681023522" - }, - { - "price":199.33906, - "amount":1.2301295, - "price_int":"19933906", - "amount_int":"123012950", - "stamp":"1364976059838964" - }, - { - "price":199.3877, - "amount":0.1, - "price_int":"19938770", - "amount_int":"10000000", - "stamp":"1365247326308512" - }, - { - "price":199.4, - "amount":65.05, - "price_int":"19940000", - "amount_int":"6505000000", - "stamp":"1365436682475807" - }, - { - "price":199.41203, - "amount":0.28845, - "price_int":"19941203", - "amount_int":"28845000", - "stamp":"1365443923241147" - }, - { - "price":199.44, - "amount":24.86, - "price_int":"19944000", - "amount_int":"2486000000", - "stamp":"1365424594413815" - }, - { - "price":199.45, - "amount":0.0574, - "price_int":"19945000", - "amount_int":"5740000", - "stamp":"1365432217414276" - }, - { - "price":199.499, - "amount":0.5, - "price_int":"19949900", - "amount_int":"50000000", - "stamp":"1365134279907100" - }, - { - "price":199.5, - "amount":5.0625, - "price_int":"19950000", - "amount_int":"506250000", - "stamp":"1365434589779354" - }, - { - "price":199.58699, - "amount":0.00028, - "price_int":"19958699", - "amount_int":"28000", - "stamp":"1365431463849995" - }, - { - "price":199.5877, - "amount":0.1, - "price_int":"19958770", - "amount_int":"10000000", - "stamp":"1365247325659176" - }, - { - "price":199.59, - "amount":1, - "price_int":"19959000", - "amount_int":"100000000", - "stamp":"1365408750476872" - }, - { - "price":199.6, - "amount":0.05, - "price_int":"19960000", - "amount_int":"5000000", - "stamp":"1365416683530769" - }, - { - "price":199.6275, - "amount":10, - "price_int":"19962750", - "amount_int":"1000000000", - "stamp":"1365410977175575" - }, - { - "price":199.65, - "amount":8.1, - "price_int":"19965000", - "amount_int":"810000000", - "stamp":"1365439975245997" - }, - { - "price":199.6599, - "amount":0.15, - "price_int":"19965990", - "amount_int":"15000000", - "stamp":"1365442157798222" - }, - { - "price":199.68, - "amount":59.40554317, - "price_int":"19968000", - "amount_int":"5940554317", - "stamp":"1365345842029327" - }, - { - "price":199.7, - "amount":2.0871036, - "price_int":"19970000", - "amount_int":"208710360", - "stamp":"1365428776133633" - }, - { - "price":199.71111, - "amount":5, - "price_int":"19971111", - "amount_int":"500000000", - "stamp":"1365408433711897" - }, - { - "price":199.77, - "amount":10, - "price_int":"19977000", - "amount_int":"1000000000", - "stamp":"1365432766567717" - }, - { - "price":199.77777, - "amount":11.45657663, - "price_int":"19977777", - "amount_int":"1145657663", - "stamp":"1365408442433245" - }, - { - "price":199.782, - "amount":195.83317802, - "price_int":"19978200", - "amount_int":"19583317802", - "stamp":"1365403950333555" - }, - { - "price":199.7877, - "amount":0.1, - "price_int":"19978770", - "amount_int":"10000000", - "stamp":"1365247325137863" - }, - { - "price":199.789, - "amount":1, - "price_int":"19978900", - "amount_int":"100000000", - "stamp":"1365441256238736" - }, - { - "price":199.7921, - "amount":31.84, - "price_int":"19979210", - "amount_int":"3184000000", - "stamp":"1365424012712470" - }, - { - "price":199.8, - "amount":100.9788354, - "price_int":"19980000", - "amount_int":"10097883540", - "stamp":"1365442408269736" - }, - { - "price":199.82, - "amount":25.0244642, - "price_int":"19982000", - "amount_int":"2502446420", - "stamp":"1365429051946191" - }, - { - "price":199.86591, - "amount":0.5, - "price_int":"19986591", - "amount_int":"50000000", - "stamp":"1365409028094643" - }, - { - "price":199.867, - "amount":5, - "price_int":"19986700", - "amount_int":"500000000", - "stamp":"1365421562696184" - }, - { - "price":199.88, - "amount":5, - "price_int":"19988000", - "amount_int":"500000000", - "stamp":"1365438338788434" - }, - { - "price":199.89, - "amount":5, - "price_int":"19989000", - "amount_int":"500000000", - "stamp":"1365444309135060" - }, - { - "price":199.9, - "amount":23.42075357, - "price_int":"19990000", - "amount_int":"2342075357", - "stamp":"1365435803688985" - }, - { - "price":199.9331, - "amount":2, - "price_int":"19993310", - "amount_int":"200000000", - "stamp":"1365426380302264" - }, - { - "price":199.94868, - "amount":2.6, - "price_int":"19994868", - "amount_int":"260000000", - "stamp":"1365406087435332" - }, - { - "price":199.95, - "amount":0.43036044, - "price_int":"19995000", - "amount_int":"43036044", - "stamp":"1365440126113499" - }, - { - "price":199.97, - "amount":29.54633379, - "price_int":"19997000", - "amount_int":"2954633379", - "stamp":"1365435905421755" - }, - { - "price":199.97998, - "amount":0.32802, - "price_int":"19997998", - "amount_int":"32802000", - "stamp":"1365429113714054" - }, - { - "price":199.9877, - "amount":0.1, - "price_int":"19998770", - "amount_int":"10000000", - "stamp":"1365247324029484" - }, - { - "price":199.98999, - "amount":0.1, - "price_int":"19998999", - "amount_int":"10000000", - "stamp":"1365426341661605" - }, - { - "price":199.99, - "amount":110.18579134, - "price_int":"19999000", - "amount_int":"11018579134", - "stamp":"1365442773860401" - }, - { - "price":199.9905, - "amount":0.90454, - "price_int":"19999050", - "amount_int":"90454000", - "stamp":"1365436554273434" - }, - { - "price":199.995, - "amount":0.85351506, - "price_int":"19999500", - "amount_int":"85351506", - "stamp":"1365427055175960" - }, - { - "price":199.99578, - "amount":1, - "price_int":"19999578", - "amount_int":"100000000", - "stamp":"1365415994341327" - }, - { - "price":199.998, - "amount":20.90418, - "price_int":"19999800", - "amount_int":"2090418000", - "stamp":"1365443719749702" - }, - { - "price":199.999, - "amount":20.25, - "price_int":"19999900", - "amount_int":"2025000000", - "stamp":"1365442131704448" - }, - { - "price":199.9991, - "amount":5.0994, - "price_int":"19999910", - "amount_int":"509940000", - "stamp":"1365424941372402" - }, - { - "price":199.99989, - "amount":1, - "price_int":"19999989", - "amount_int":"100000000", - "stamp":"1365439800674396" - }, - { - "price":199.99995, - "amount":100, - "price_int":"19999995", - "amount_int":"10000000000", - "stamp":"1365432150674675" - }, - { - "price":199.99999, - "amount":7.0235, - "price_int":"19999999", - "amount_int":"702350000", - "stamp":"1365439991785646" - }, - { - "price":200, - "amount":1839.30133413, - "price_int":"20000000", - "amount_int":"183930133413", - "stamp":"1365444359976597" - }, - { - "price":200.00622, - "amount":0.25, - "price_int":"20000622", - "amount_int":"25000000", - "stamp":"1365434230496538" - }, - { - "price":200.02, - "amount":33.75509816, - "price_int":"20002000", - "amount_int":"3375509816", - "stamp":"1365433710921877" - }, - { - "price":200.08859, - "amount":0.4, - "price_int":"20008859", - "amount_int":"40000000", - "stamp":"1365404369773926" - }, - { - "price":200.1, - "amount":0.05, - "price_int":"20010000", - "amount_int":"5000000", - "stamp":"1365416692733280" - }, - { - "price":200.1679, - "amount":0.1654723, - "price_int":"20016790", - "amount_int":"16547230", - "stamp":"1365438094628418" - }, - { - "price":200.1953, - "amount":20, - "price_int":"20019530", - "amount_int":"2000000000", - "stamp":"1365435996892719" - }, - { - "price":200.2, - "amount":0.05, - "price_int":"20020000", - "amount_int":"5000000", - "stamp":"1365416695392171" - } - ], - "bids":[ - { - "price":163.84431, - "amount":0.505, - "price_int":"16384431", - "amount_int":"50500000", - "stamp":"1365382089113524" - }, - { - "price":163.91557, - "amount":2.59214, - "price_int":"16391557", - "amount_int":"259214000", - "stamp":"1365444486046955" - }, - { - "price":163.9621, - "amount":0.14615186, - "price_int":"16396210", - "amount_int":"14615186", - "stamp":"1365438647022420" - }, - { - "price":163.9801, - "amount":1, - "price_int":"16398010", - "amount_int":"100000000", - "stamp":"1365393841660021" - }, - { - "price":164, - "amount":198.50056414, - "price_int":"16400000", - "amount_int":"19850056414", - "stamp":"1365440660424161" - }, - { - "price":164.00001, - "amount":5, - "price_int":"16400001", - "amount_int":"500000000", - "stamp":"1365385251305223" - }, - { - "price":164.011, - "amount":0.25, - "price_int":"16401100", - "amount_int":"25000000", - "stamp":"1365389697031665" - }, - { - "price":164.02, - "amount":5, - "price_int":"16402000", - "amount_int":"500000000", - "stamp":"1365393846926536" - }, - { - "price":164.0265, - "amount":1, - "price_int":"16402650", - "amount_int":"100000000", - "stamp":"1365393748200196" - }, - { - "price":164.03, - "amount":4, - "price_int":"16403000", - "amount_int":"400000000", - "stamp":"1365392495882572" - }, - { - "price":164.1, - "amount":8, - "price_int":"16410000", - "amount_int":"800000000", - "stamp":"1365419503672945" - }, - { - "price":164.101, - "amount":5, - "price_int":"16410100", - "amount_int":"500000000", - "stamp":"1365394324854826" - }, - { - "price":164.1678, - "amount":39.52395384, - "price_int":"16416780", - "amount_int":"3952395384", - "stamp":"1365443326912257" - }, - { - "price":164.17033, - "amount":0.68314334, - "price_int":"16417033", - "amount_int":"68314334", - "stamp":"1365415467731593" - }, - { - "price":164.18043, - "amount":5, - "price_int":"16418043", - "amount_int":"500000000", - "stamp":"1365439425291736" - }, - { - "price":164.19432, - "amount":1, - "price_int":"16419432", - "amount_int":"100000000", - "stamp":"1365438827112193" - }, - { - "price":164.2, - "amount":0.0974, - "price_int":"16420000", - "amount_int":"9740000", - "stamp":"1365381220367447" - }, - { - "price":164.21, - "amount":100, - "price_int":"16421000", - "amount_int":"10000000000", - "stamp":"1365441956715900" - }, - { - "price":164.23, - "amount":100, - "price_int":"16423000", - "amount_int":"10000000000", - "stamp":"1365421849130775" - }, - { - "price":164.3, - "amount":4, - "price_int":"16430000", - "amount_int":"400000000", - "stamp":"1365429104695540" - }, - { - "price":164.44, - "amount":10, - "price_int":"16444000", - "amount_int":"1000000000", - "stamp":"1365439841855969" - }, - { - "price":164.49969, - "amount":0.505, - "price_int":"16449969", - "amount_int":"50500000", - "stamp":"1365382090130113" - }, - { - "price":164.5, - "amount":1, - "price_int":"16450000", - "amount_int":"100000000", - "stamp":"1365397836949952" - }, - { - "price":164.54665, - "amount":0.2, - "price_int":"16454665", - "amount_int":"20000000", - "stamp":"1365415484794040" - }, - { - "price":164.5561, - "amount":0.14615186, - "price_int":"16455610", - "amount_int":"14615186", - "stamp":"1365438646926362" - }, - { - "price":164.65058, - "amount":1.95, - "price_int":"16465058", - "amount_int":"195000000", - "stamp":"1365416612856256" - }, - { - "price":164.7, - "amount":0.5, - "price_int":"16470000", - "amount_int":"50000000", - "stamp":"1365444519043700" - }, - { - "price":164.74587, - "amount":0.60699549, - "price_int":"16474587", - "amount_int":"60699549", - "stamp":"1365382259679846" - }, - { - "price":164.79001, - "amount":1.13, - "price_int":"16479001", - "amount_int":"113000000", - "stamp":"1365420142974075" - }, - { - "price":164.8, - "amount":0.501, - "price_int":"16480000", - "amount_int":"50100000", - "stamp":"1365398892139636" - }, - { - "price":164.82574, - "amount":1, - "price_int":"16482574", - "amount_int":"100000000", - "stamp":"1365438847608753" - }, - { - "price":164.84468, - "amount":0.404, - "price_int":"16484468", - "amount_int":"40400000", - "stamp":"1365415659819271" - }, - { - "price":164.88999, - "amount":0.12, - "price_int":"16488999", - "amount_int":"12000000", - "stamp":"1365382140220630" - }, - { - "price":164.89577, - "amount":1, - "price_int":"16489577", - "amount_int":"100000000", - "stamp":"1365408456759423" - }, - { - "price":164.9255, - "amount":0.2, - "price_int":"16492550", - "amount_int":"20000000", - "stamp":"1365415490548306" - }, - { - "price":164.931, - "amount":1, - "price_int":"16493100", - "amount_int":"100000000", - "stamp":"1365395977361005" - }, - { - "price":164.99999, - "amount":0.11, - "price_int":"16499999", - "amount_int":"11000000", - "stamp":"1365444040745054" - }, - { - "price":165, - "amount":469.18838367, - "price_int":"16500000", - "amount_int":"46918838367", - "stamp":"1365444017604032" - }, - { - "price":165.0001, - "amount":4.21864126, - "price_int":"16500010", - "amount_int":"421864126", - "stamp":"1365439460306825" - }, - { - "price":165.00011, - "amount":1, - "price_int":"16500011", - "amount_int":"100000000", - "stamp":"1365438217027859" - }, - { - "price":165.01, - "amount":100, - "price_int":"16501000", - "amount_int":"10000000000", - "stamp":"1365394694524742" - }, - { - "price":165.011, - "amount":0.45, - "price_int":"16501100", - "amount_int":"45000000", - "stamp":"1365426940910708" - }, - { - "price":165.0111, - "amount":1, - "price_int":"16501110", - "amount_int":"100000000", - "stamp":"1365393741195463" - }, - { - "price":165.015, - "amount":3, - "price_int":"16501500", - "amount_int":"300000000", - "stamp":"1365438698390030" - }, - { - "price":165.09, - "amount":1, - "price_int":"16509000", - "amount_int":"100000000", - "stamp":"1365439837239505" - }, - { - "price":165.1, - "amount":163.00855578, - "price_int":"16510000", - "amount_int":"16300855578", - "stamp":"1365443026010489" - }, - { - "price":165.11517, - "amount":0.60563787, - "price_int":"16511517", - "amount_int":"60563787", - "stamp":"1365438073883675" - }, - { - "price":165.12, - "amount":0.1, - "price_int":"16512000", - "amount_int":"10000000", - "stamp":"1365399110992392" - }, - { - "price":165.13815, - "amount":0.01023195, - "price_int":"16513815", - "amount_int":"1023195", - "stamp":"1365395231334295" - }, - { - "price":165.1501, - "amount":0.14615186, - "price_int":"16515010", - "amount_int":"14615186", - "stamp":"1365438646836943" - }, - { - "price":165.15101, - "amount":3.8, - "price_int":"16515101", - "amount_int":"380000000", - "stamp":"1365438722347995" - }, - { - "price":165.15768, - "amount":0.505, - "price_int":"16515768", - "amount_int":"50500000", - "stamp":"1365382113999093" - }, - { - "price":165.2, - "amount":4, - "price_int":"16520000", - "amount_int":"400000000", - "stamp":"1365419540539538" - }, - { - "price":165.21, - "amount":100, - "price_int":"16521000", - "amount_int":"10000000000", - "stamp":"1365442529031367" - }, - { - "price":165.211, - "amount":10, - "price_int":"16521100", - "amount_int":"1000000000", - "stamp":"1365400817028098" - }, - { - "price":165.26299, - "amount":0.04080277, - "price_int":"16526299", - "amount_int":"4080277", - "stamp":"1365421796706557" - }, - { - "price":165.28149, - "amount":1, - "price_int":"16528149", - "amount_int":"100000000", - "stamp":"1365390157998750" - }, - { - "price":165.30435, - "amount":0.2, - "price_int":"16530435", - "amount_int":"20000000", - "stamp":"1365415496773337" - }, - { - "price":165.4, - "amount":0.00406426, - "price_int":"16540000", - "amount_int":"406426", - "stamp":"1365382477717221" - }, - { - "price":165.402, - "amount":2, - "price_int":"16540200", - "amount_int":"200000000", - "stamp":"1365420691432351" - }, - { - "price":165.41422, - "amount":0.7634, - "price_int":"16541422", - "amount_int":"76340000", - "stamp":"1365429964567369" - }, - { - "price":165.42, - "amount":40.00002273, - "price_int":"16542000", - "amount_int":"4000002273", - "stamp":"1365438627500800" - }, - { - "price":165.47, - "amount":11, - "price_int":"16547000", - "amount_int":"1100000000", - "stamp":"1365412785585191" - }, - { - "price":165.5, - "amount":0.341, - "price_int":"16550000", - "amount_int":"34100000", - "stamp":"1365391050035232" - }, - { - "price":165.50002, - "amount":0.4181, - "price_int":"16550002", - "amount_int":"41810000", - "stamp":"1365442035465235" - }, - { - "price":165.501, - "amount":4.58197098, - "price_int":"16550100", - "amount_int":"458197098", - "stamp":"1365382540046114" - }, - { - "price":165.51, - "amount":8.0419, - "price_int":"16551000", - "amount_int":"804190000", - "stamp":"1365439218922641" - }, - { - "price":165.66582, - "amount":0.03909872, - "price_int":"16566582", - "amount_int":"3909872", - "stamp":"1365387433231520" - }, - { - "price":165.66694, - "amount":0.8635, - "price_int":"16566694", - "amount_int":"86350000", - "stamp":"1365416670451453" - }, - { - "price":165.6832, - "amount":0.2, - "price_int":"16568320", - "amount_int":"20000000", - "stamp":"1365415502998976" - }, - { - "price":165.69025, - "amount":0.6035358, - "price_int":"16569025", - "amount_int":"60353580", - "stamp":"1365395302002781" - }, - { - "price":165.7, - "amount":0.5, - "price_int":"16570000", - "amount_int":"50000000", - "stamp":"1365400357071282" - }, - { - "price":165.72373, - "amount":0.60341388, - "price_int":"16572373", - "amount_int":"60341388", - "stamp":"1365382453048949" - }, - { - "price":165.7441, - "amount":0.14615186, - "price_int":"16574410", - "amount_int":"14615186", - "stamp":"1365438646751314" - }, - { - "price":165.75, - "amount":0.06219487, - "price_int":"16575000", - "amount_int":"6219487", - "stamp":"1365391519405129" - }, - { - "price":165.81832, - "amount":0.505, - "price_int":"16581832", - "amount_int":"50500000", - "stamp":"1365382881668984" - }, - { - "price":165.88889, - "amount":0.00036976, - "price_int":"16588889", - "amount_int":"36976", - "stamp":"1365383964470659" - }, - { - "price":166, - "amount":66.97185655, - "price_int":"16600000", - "amount_int":"6697185655", - "stamp":"1365442212931982" - }, - { - "price":166.011, - "amount":0.25, - "price_int":"16601100", - "amount_int":"25000000", - "stamp":"1365394187899416" - }, - { - "price":166.0165, - "amount":1, - "price_int":"16601650", - "amount_int":"100000000", - "stamp":"1365393732456969" - }, - { - "price":166.06205, - "amount":2.2, - "price_int":"16606205", - "amount_int":"220000000", - "stamp":"1365438519173965" - }, - { - "price":166.11, - "amount":10, - "price_int":"16611000", - "amount_int":"1000000000", - "stamp":"1365437561139007" - }, - { - "price":166.14139, - "amount":0.42743926, - "price_int":"16614139", - "amount_int":"42743926", - "stamp":"1365409456550435" - }, - { - "price":166.18833, - "amount":0.6, - "price_int":"16618833", - "amount_int":"60000000", - "stamp":"1365399594187691" - }, - { - "price":166.18908, - "amount":0.00296968, - "price_int":"16618908", - "amount_int":"296968", - "stamp":"1365409345045580" - }, - { - "price":166.1994, - "amount":0.07905, - "price_int":"16619940", - "amount_int":"7905000", - "stamp":"1365386705217676" - }, - { - "price":166.2, - "amount":10, - "price_int":"16620000", - "amount_int":"1000000000", - "stamp":"1365385038032752" - }, - { - "price":166.31461, - "amount":0.2, - "price_int":"16631461", - "amount_int":"20000000", - "stamp":"1365415511908485" - }, - { - "price":166.3381, - "amount":0.14615186, - "price_int":"16633810", - "amount_int":"14615186", - "stamp":"1365438646671418" - }, - { - "price":166.40857, - "amount":3.48, - "price_int":"16640857", - "amount_int":"348000000", - "stamp":"1365429798506453" - }, - { - "price":166.42891, - "amount":0.0279, - "price_int":"16642891", - "amount_int":"2790000", - "stamp":"1365389230414292" - }, - { - "price":166.48159, - "amount":0.505, - "price_int":"16648159", - "amount_int":"50500000", - "stamp":"1365383542171169" - }, - { - "price":166.50002, - "amount":1.2012, - "price_int":"16650002", - "amount_int":"120120000", - "stamp":"1365442028328631" - }, - { - "price":166.55783, - "amount":0.5, - "price_int":"16655783", - "amount_int":"50000000", - "stamp":"1365409463457928" - }, - { - "price":166.5727, - "amount":6.79539946, - "price_int":"16657270", - "amount_int":"679539946", - "stamp":"1365441695627572" - }, - { - "price":166.6, - "amount":60.024, - "price_int":"16660000", - "amount_int":"6002400000", - "stamp":"1365438814120820" - }, - { - "price":166.63171, - "amount":4.236e-5, - "price_int":"16663171", - "amount_int":"4236", - "stamp":"1365392003458874" - }, - { - "price":166.65697, - "amount":14.6016, - "price_int":"16665697", - "amount_int":"1460160000", - "stamp":"1365402078334734" - }, - { - "price":166.66667, - "amount":48.5143, - "price_int":"16666667", - "amount_int":"4851430000", - "stamp":"1365440539259526" - }, - { - "price":166.6833, - "amount":0.25, - "price_int":"16668330", - "amount_int":"25000000", - "stamp":"1365416660459771" - }, - { - "price":166.69346, - "amount":1.2000753, - "price_int":"16669346", - "amount_int":"120007530", - "stamp":"1365441659312352" - }, - { - "price":166.7, - "amount":1, - "price_int":"16670000", - "amount_int":"100000000", - "stamp":"1365393201994409" - }, - { - "price":166.76632, - "amount":0.59964146, - "price_int":"16676632", - "amount_int":"59964146", - "stamp":"1365439514911279" - }, - { - "price":166.897, - "amount":25, - "price_int":"16689700", - "amount_int":"2500000000", - "stamp":"1365397825929318" - }, - { - "price":166.9, - "amount":0.25, - "price_int":"16690000", - "amount_int":"25000000", - "stamp":"1365400236234113" - }, - { - "price":166.931, - "amount":2, - "price_int":"16693100", - "amount_int":"200000000", - "stamp":"1365395834242562" - }, - { - "price":166.9321, - "amount":0.14615186, - "price_int":"16693210", - "amount_int":"14615186", - "stamp":"1365438646584864" - }, - { - "price":167, - "amount":127.21219005, - "price_int":"16700000", - "amount_int":"12721219005", - "stamp":"1365443284799427" - }, - { - "price":167.0011, - "amount":0.1292394, - "price_int":"16700110", - "amount_int":"12923940", - "stamp":"1365436481179241" - }, - { - "price":167.0165, - "amount":2, - "price_int":"16701650", - "amount_int":"200000000", - "stamp":"1365442212933281" - }, - { - "price":167.02, - "amount":20, - "price_int":"16702000", - "amount_int":"2000000000", - "stamp":"1365403950359737" - }, - { - "price":167.07231, - "amount":0.2, - "price_int":"16707231", - "amount_int":"20000000", - "stamp":"1365415522045038" - }, - { - "price":167.1, - "amount":0.11438797, - "price_int":"16710000", - "amount_int":"11438797", - "stamp":"1365441780218255" - }, - { - "price":167.14751, - "amount":0.505, - "price_int":"16714751", - "amount_int":"50500000", - "stamp":"1365397104846033" - }, - { - "price":167.15, - "amount":2.5247, - "price_int":"16715000", - "amount_int":"252470000", - "stamp":"1365439655366478" - }, - { - "price":167.19315, - "amount":1.80338, - "price_int":"16719315", - "amount_int":"180338000", - "stamp":"1365444494420959" - }, - { - "price":167.22, - "amount":7, - "price_int":"16722000", - "amount_int":"700000000", - "stamp":"1365402851085066" - }, - { - "price":167.31634, - "amount":6.09306185, - "price_int":"16731634", - "amount_int":"609306185", - "stamp":"1365443847461222" - }, - { - "price":167.33, - "amount":3, - "price_int":"16733000", - "amount_int":"300000000", - "stamp":"1365411987016774" - }, - { - "price":167.37636, - "amount":87.60606, - "price_int":"16737636", - "amount_int":"8760606000", - "stamp":"1365441924680378" - }, - { - "price":167.39069, - "amount":0.5, - "price_int":"16739069", - "amount_int":"50000000", - "stamp":"1365409545061020" - }, - { - "price":167.45116, - "amount":0.2, - "price_int":"16745116", - "amount_int":"20000000", - "stamp":"1365415528775952" - }, - { - "price":167.5, - "amount":26.35900029, - "price_int":"16750000", - "amount_int":"2635900029", - "stamp":"1365444204540080" - }, - { - "price":167.5101, - "amount":1.8, - "price_int":"16751010", - "amount_int":"180000000", - "stamp":"1365399805765389" - }, - { - "price":167.5261, - "amount":0.14615186, - "price_int":"16752610", - "amount_int":"14615186", - "stamp":"1365438646468225" - }, - { - "price":167.69966, - "amount":7.56065, - "price_int":"16769966", - "amount_int":"756065000", - "stamp":"1365427924892588" - }, - { - "price":167.8, - "amount":0.501, - "price_int":"16780000", - "amount_int":"50100000", - "stamp":"1365398950842484" - }, - { - "price":167.80035, - "amount":1, - "price_int":"16780035", - "amount_int":"100000000", - "stamp":"1365439563968111" - }, - { - "price":167.81611, - "amount":0.505, - "price_int":"16781611", - "amount_int":"50500000", - "stamp":"1365397105687568" - }, - { - "price":167.83001, - "amount":5.2, - "price_int":"16783001", - "amount_int":"520000000", - "stamp":"1365439822524808" - }, - { - "price":167.84264, - "amount":0.02673493, - "price_int":"16784264", - "amount_int":"2673493", - "stamp":"1365419452450885" - }, - { - "price":167.96892, - "amount":0.02, - "price_int":"16796892", - "amount_int":"2000000", - "stamp":"1365438669223148" - }, - { - "price":168, - "amount":75.11835315, - "price_int":"16800000", - "amount_int":"7511835315", - "stamp":"1365443003146790" - }, - { - "price":168.0001, - "amount":40, - "price_int":"16800010", - "amount_int":"4000000000", - "stamp":"1365439436373985" - }, - { - "price":168.0165, - "amount":1, - "price_int":"16801650", - "amount_int":"100000000", - "stamp":"1365442208250013" - }, - { - "price":168.02912, - "amount":1.62481, - "price_int":"16802912", - "amount_int":"162481000", - "stamp":"1365444494935340" - }, - { - "price":168.08568, - "amount":1.76501, - "price_int":"16808568", - "amount_int":"176501000", - "stamp":"1365444486705463" - }, - { - "price":168.1, - "amount":0.15, - "price_int":"16810000", - "amount_int":"15000000", - "stamp":"1365441794178227" - }, - { - "price":168.1201, - "amount":0.14615186, - "price_int":"16812010", - "amount_int":"14615186", - "stamp":"1365438646366244" - }, - { - "price":168.2, - "amount":5, - "price_int":"16820000", - "amount_int":"500000000", - "stamp":"1365406791069694" - }, - { - "price":168.20886, - "amount":0.2, - "price_int":"16820886", - "amount_int":"20000000", - "stamp":"1365415544941142" - }, - { - "price":168.22, - "amount":0.0092118, - "price_int":"16822000", - "amount_int":"921180", - "stamp":"1365403106775804" - }, - { - "price":168.26186, - "amount":1, - "price_int":"16826186", - "amount_int":"100000000", - "stamp":"1365439822474581" - }, - { - "price":168.29999, - "amount":5, - "price_int":"16829999", - "amount_int":"500000000", - "stamp":"1365414816037468" - }, - { - "price":168.39076, - "amount":20.40247084, - "price_int":"16839076", - "amount_int":"2040247084", - "stamp":"1365438646657622" - }, - { - "price":168.43399, - "amount":0.5937044, - "price_int":"16843399", - "amount_int":"59370440", - "stamp":"1365439823091511" - }, - { - "price":168.48737, - "amount":0.404, - "price_int":"16848737", - "amount_int":"40400000", - "stamp":"1365403655053861" - }, - { - "price":168.52315, - "amount":0.0940546, - "price_int":"16852315", - "amount_int":"9405460", - "stamp":"1365436339101735" - }, - { - "price":168.58771, - "amount":0.2, - "price_int":"16858771", - "amount_int":"20000000", - "stamp":"1365415549569266" - }, - { - "price":168.7141, - "amount":0.14615186, - "price_int":"16871410", - "amount_int":"14615186", - "stamp":"1365438646286810" - }, - { - "price":168.71602, - "amount":0.25, - "price_int":"16871602", - "amount_int":"25000000", - "stamp":"1365416651535081" - }, - { - "price":168.84027, - "amount":0.2, - "price_int":"16884027", - "amount_int":"20000000", - "stamp":"1365415555104449" - }, - { - "price":168.86927, - "amount":1.44712, - "price_int":"16886927", - "amount_int":"144712000", - "stamp":"1365444495411810" - }, - { - "price":168.87795, - "amount":0.5, - "price_int":"16887795", - "amount_int":"50000000", - "stamp":"1365409533201757" - }, - { - "price":168.89, - "amount":0.102, - "price_int":"16889000", - "amount_int":"10200000", - "stamp":"1365404346497395" - }, - { - "price":168.92612, - "amount":1.60326, - "price_int":"16892612", - "amount_int":"160326000", - "stamp":"1365444487242367" - }, - { - "price":169, - "amount":103.05312194, - "price_int":"16900000", - "amount_int":"10305312194", - "stamp":"1365441273815561" - }, - { - "price":169.0165, - "amount":1, - "price_int":"16901650", - "amount_int":"100000000", - "stamp":"1365442225712576" - }, - { - "price":169.15181, - "amount":0.03986471, - "price_int":"16915181", - "amount_int":"3986471", - "stamp":"1365431406330924" - }, - { - "price":169.16131, - "amount":0.404, - "price_int":"16916131", - "amount_int":"40400000", - "stamp":"1365403661427345" - }, - { - "price":169.21912, - "amount":5.75866231, - "price_int":"16921912", - "amount_int":"575866231", - "stamp":"1365442064438414" - }, - { - "price":169.26547, - "amount":0.04, - "price_int":"16926547", - "amount_int":"4000000", - "stamp":"1365401245490016" - }, - { - "price":169.3081, - "amount":0.14615186, - "price_int":"16930810", - "amount_int":"14615186", - "stamp":"1365438646195580" - }, - { - "price":169.31, - "amount":1.1813, - "price_int":"16931000", - "amount_int":"118130000", - "stamp":"1365439797572787" - }, - { - "price":169.4, - "amount":3, - "price_int":"16940000", - "amount_int":"300000000", - "stamp":"1365439155540976" - }, - { - "price":169.43418, - "amount":0.2, - "price_int":"16943418", - "amount_int":"20000000", - "stamp":"1365430942573841" - }, - { - "price":169.47169, - "amount":1, - "price_int":"16947169", - "amount_int":"100000000", - "stamp":"1365441518268310" - }, - { - "price":169.5, - "amount":0.15, - "price_int":"16950000", - "amount_int":"15000000", - "stamp":"1365441869779839" - }, - { - "price":169.54721, - "amount":11.0155, - "price_int":"16954721", - "amount_int":"1101550000", - "stamp":"1365438189238634" - }, - { - "price":169.7, - "amount":2.5, - "price_int":"16970000", - "amount_int":"250000000", - "stamp":"1365409550689462" - }, - { - "price":169.73238, - "amount":0.25, - "price_int":"16973238", - "amount_int":"25000000", - "stamp":"1365416604817476" - }, - { - "price":169.73784, - "amount":0.58914384, - "price_int":"16973784", - "amount_int":"58914384", - "stamp":"1365397103562421" - }, - { - "price":169.77075, - "amount":1.44231, - "price_int":"16977075", - "amount_int":"144231000", - "stamp":"1365444487700245" - }, - { - "price":169.77304, - "amount":1, - "price_int":"16977304", - "amount_int":"100000000", - "stamp":"1365407230317993" - }, - { - "price":169.82528, - "amount":1, - "price_int":"16982528", - "amount_int":"100000000", - "stamp":"1365419443838118" - }, - { - "price":169.83795, - "amount":0.404, - "price_int":"16983795", - "amount_int":"40400000", - "stamp":"1365403661633656" - }, - { - "price":169.89, - "amount":0.042, - "price_int":"16989000", - "amount_int":"4200000", - "stamp":"1365402947553094" - }, - { - "price":169.9, - "amount":21, - "price_int":"16990000", - "amount_int":"2100000000", - "stamp":"1365397996037853" - }, - { - "price":169.9021, - "amount":0.14615186, - "price_int":"16990210", - "amount_int":"14615186", - "stamp":"1365438646103817" - }, - { - "price":169.91236, - "amount":20, - "price_int":"16991236", - "amount_int":"2000000000", - "stamp":"1365441937953702" - }, - { - "price":169.95, - "amount":4, - "price_int":"16995000", - "amount_int":"400000000", - "stamp":"1365402988416623" - }, - { - "price":170, - "amount":395.14544009, - "price_int":"17000000", - "amount_int":"39514544009", - "stamp":"1365444007591079" - }, - { - "price":170.01, - "amount":71.25940438, - "price_int":"17001000", - "amount_int":"7125940438", - "stamp":"1365439460113849" - }, - { - "price":170.0165, - "amount":1, - "price_int":"17001650", - "amount_int":"100000000", - "stamp":"1365442232837669" - }, - { - "price":170.02, - "amount":0.7240564, - "price_int":"17002000", - "amount_int":"72405640", - "stamp":"1365435364161564" - }, - { - "price":170.03, - "amount":20, - "price_int":"17003000", - "amount_int":"2000000000", - "stamp":"1365439429688478" - }, - { - "price":170.09, - "amount":1, - "price_int":"17009000", - "amount_int":"100000000", - "stamp":"1365439816189902" - }, - { - "price":170.1, - "amount":15.71457688, - "price_int":"17010000", - "amount_int":"1571457688", - "stamp":"1365443508747667" - }, - { - "price":170.108, - "amount":0.1651, - "price_int":"17010800", - "amount_int":"16510000", - "stamp":"1365412690793603" - }, - { - "price":170.11, - "amount":2.8, - "price_int":"17011000", - "amount_int":"280000000", - "stamp":"1365427399985945" - }, - { - "price":170.11832, - "amount":0.58782616, - "price_int":"17011832", - "amount_int":"58782616", - "stamp":"1365439887453878" - }, - { - "price":170.12, - "amount":1.07122078, - "price_int":"17012000", - "amount_int":"107122078", - "stamp":"1365408675811900" - }, - { - "price":170.2, - "amount":5.3114, - "price_int":"17020000", - "amount_int":"531140000", - "stamp":"1365397151093075" - }, - { - "price":170.2002, - "amount":10, - "price_int":"17020020", - "amount_int":"1000000000", - "stamp":"1365425888102206" - }, - { - "price":170.2123, - "amount":5.875, - "price_int":"17021230", - "amount_int":"587500000", - "stamp":"1365437372262667" - }, - { - "price":170.29084, - "amount":21.62248037, - "price_int":"17029084", - "amount_int":"2162248037", - "stamp":"1365436416507516" - }, - { - "price":170.41957, - "amount":2, - "price_int":"17041957", - "amount_int":"200000000", - "stamp":"1365438351283115" - }, - { - "price":170.44407, - "amount":148.18107727, - "price_int":"17044407", - "amount_int":"14818107727", - "stamp":"1365440567660821" - }, - { - "price":170.45001, - "amount":0.11, - "price_int":"17045001", - "amount_int":"11000000", - "stamp":"1365426359328317" - }, - { - "price":170.48195, - "amount":47.27313661, - "price_int":"17048195", - "amount_int":"4727313661", - "stamp":"1365444214482847" - }, - { - "price":170.49458, - "amount":5, - "price_int":"17049458", - "amount_int":"500000000", - "stamp":"1365440342440145" - }, - { - "price":170.4961, - "amount":0.14615186, - "price_int":"17049610", - "amount_int":"14615186", - "stamp":"1365438646018661" - }, - { - "price":170.5, - "amount":2.1456, - "price_int":"17050000", - "amount_int":"214560000", - "stamp":"1365439476516114" - }, - { - "price":170.51, - "amount":1, - "price_int":"17051000", - "amount_int":"100000000", - "stamp":"1365432280793736" - }, - { - "price":170.5173, - "amount":0.404, - "price_int":"17051730", - "amount_int":"40400000", - "stamp":"1365403686254066" - }, - { - "price":170.51984, - "amount":0.077, - "price_int":"17051984", - "amount_int":"7700000", - "stamp":"1365439227247779" - }, - { - "price":170.55, - "amount":1, - "price_int":"17055000", - "amount_int":"100000000", - "stamp":"1365400452662820" - }, - { - "price":170.625, - "amount":0.01019487, - "price_int":"17062500", - "amount_int":"1019487", - "stamp":"1365405817795614" - }, - { - "price":170.63785, - "amount":20, - "price_int":"17063785", - "amount_int":"2000000000", - "stamp":"1365440316605893" - }, - { - "price":170.74875, - "amount":0.25, - "price_int":"17074875", - "amount_int":"25000000", - "stamp":"1365416601498401" - }, - { - "price":170.8, - "amount":0.5609, - "price_int":"17080000", - "amount_int":"56090000", - "stamp":"1365420305265594" - }, - { - "price":170.81167, - "amount":1.77206, - "price_int":"17081167", - "amount_int":"177206000", - "stamp":"1365444512546996" - }, - { - "price":170.84977, - "amount":0.504, - "price_int":"17084977", - "amount_int":"50400000", - "stamp":"1365419612247009" - }, - { - "price":170.8608, - "amount":3, - "price_int":"17086080", - "amount_int":"300000000", - "stamp":"1365439428087173" - }, - { - "price":170.89, - "amount":0.102, - "price_int":"17089000", - "amount_int":"10200000", - "stamp":"1365406266035813" - }, - { - "price":170.94699, - "amount":0.46367975, - "price_int":"17094699", - "amount_int":"46367975", - "stamp":"1365410985982650" - }, - { - "price":170.99, - "amount":0.61424276, - "price_int":"17099000", - "amount_int":"61424276", - "stamp":"1365438344461743" - }, - { - "price":171, - "amount":131.41746408, - "price_int":"17100000", - "amount_int":"13141746408", - "stamp":"1365444154306566" - }, - { - "price":171.01, - "amount":5, - "price_int":"17101000", - "amount_int":"500000000", - "stamp":"1365443546768186" - }, - { - "price":171.03, - "amount":3.17905069, - "price_int":"17103000", - "amount_int":"317905069", - "stamp":"1365404230747731" - }, - { - "price":171.0901, - "amount":0.14615186, - "price_int":"17109010", - "amount_int":"14615186", - "stamp":"1365438645923869" - }, - { - "price":171.1, - "amount":100, - "price_int":"17110000", - "amount_int":"10000000000", - "stamp":"1365419260171477" - }, - { - "price":171.1011, - "amount":0.10339152, - "price_int":"17110110", - "amount_int":"10339152", - "stamp":"1365436480927934" - }, - { - "price":171.11337, - "amount":1.75, - "price_int":"17111337", - "amount_int":"175000000", - "stamp":"1365444253961317" - }, - { - "price":171.19937, - "amount":0.404, - "price_int":"17119937", - "amount_int":"40400000", - "stamp":"1365403687972313" - }, - { - "price":171.2, - "amount":2.83619876, - "price_int":"17120000", - "amount_int":"283619876", - "stamp":"1365438764705812" - }, - { - "price":171.25, - "amount":10, - "price_int":"17125000", - "amount_int":"1000000000", - "stamp":"1365406463531435" - }, - { - "price":171.26, - "amount":3, - "price_int":"17126000", - "amount_int":"300000000", - "stamp":"1365399396251633" - }, - { - "price":171.43521, - "amount":0.58331074, - "price_int":"17143521", - "amount_int":"58331074", - "stamp":"1365397931443533" - }, - { - "price":171.49999, - "amount":5, - "price_int":"17149999", - "amount_int":"500000000", - "stamp":"1365414789484233" - }, - { - "price":171.5, - "amount":1.10100448, - "price_int":"17150000", - "amount_int":"110100448", - "stamp":"1365438727050498" - }, - { - "price":171.61, - "amount":0.15, - "price_int":"17161000", - "amount_int":"15000000", - "stamp":"1365441903120574" - }, - { - "price":171.66573, - "amount":1.61595, - "price_int":"17166573", - "amount_int":"161595000", - "stamp":"1365444513274599" - }, - { - "price":171.6841, - "amount":0.14615186, - "price_int":"17168410", - "amount_int":"14615186", - "stamp":"1365438645841299" - }, - { - "price":171.74478, - "amount":1.02, - "price_int":"17174478", - "amount_int":"102000000", - "stamp":"1365444203050527" - }, - { - "price":171.8, - "amount":0.77, - "price_int":"17180000", - "amount_int":"77000000", - "stamp":"1365408033631786" - }, - { - "price":171.8195, - "amount":0.58200611, - "price_int":"17181950", - "amount_int":"58200611", - "stamp":"1365439973084081" - }, - { - "price":171.87106, - "amount":1, - "price_int":"17187106", - "amount_int":"100000000", - "stamp":"1365439503046498" - }, - { - "price":171.88417, - "amount":0.404, - "price_int":"17188417", - "amount_int":"40400000", - "stamp":"1365403704766722" - }, - { - "price":171.92, - "amount":0.0101, - "price_int":"17192000", - "amount_int":"1010000", - "stamp":"1365424009208548" - }, - { - "price":171.97, - "amount":5, - "price_int":"17197000", - "amount_int":"500000000", - "stamp":"1365410553241916" - }, - { - "price":172, - "amount":611.69626593, - "price_int":"17200000", - "amount_int":"61169626593", - "stamp":"1365443045806284" - }, - { - "price":172.00001, - "amount":2.00001552, - "price_int":"17200001", - "amount_int":"200001552", - "stamp":"1365438645662949" - }, - { - "price":172.001, - "amount":1.9186, - "price_int":"17200100", - "amount_int":"191860000", - "stamp":"1365438781788956" - }, - { - "price":172.02, - "amount":0.25, - "price_int":"17202000", - "amount_int":"25000000", - "stamp":"1365444565179003" - }, - { - "price":172.06, - "amount":5.78283691, - "price_int":"17206000", - "amount_int":"578283691", - "stamp":"1365432672818405" - }, - { - "price":172.07, - "amount":5.096e-5, - "price_int":"17207000", - "amount_int":"5096", - "stamp":"1365439433192298" - }, - { - "price":172.1, - "amount":0.2104, - "price_int":"17210000", - "amount_int":"21040000", - "stamp":"1365443048744604" - }, - { - "price":172.13, - "amount":3.57684643, - "price_int":"17213000", - "amount_int":"357684643", - "stamp":"1365401578377129" - }, - { - "price":172.14, - "amount":10.0186, - "price_int":"17214000", - "amount_int":"1001860000", - "stamp":"1365438902488483" - }, - { - "price":172.15101, - "amount":2.8, - "price_int":"17215101", - "amount_int":"280000000", - "stamp":"1365439723641214" - }, - { - "price":172.162, - "amount":0.1, - "price_int":"17216200", - "amount_int":"10000000", - "stamp":"1365438730711331" - }, - { - "price":172.2, - "amount":1.4518, - "price_int":"17220000", - "amount_int":"145180000", - "stamp":"1365438654168567" - }, - { - "price":172.2781, - "amount":0.14615186, - "price_int":"17227810", - "amount_int":"14615186", - "stamp":"1365438645174699" - }, - { - "price":172.28792, - "amount":20, - "price_int":"17228792", - "amount_int":"2000000000", - "stamp":"1365441952611877" - }, - { - "price":172.31, - "amount":0.15, - "price_int":"17231000", - "amount_int":"15000000", - "stamp":"1365441967215616" - }, - { - "price":172.3762, - "amount":3.6629, - "price_int":"17237620", - "amount_int":"366290000", - "stamp":"1365441251115108" - }, - { - "price":172.44837, - "amount":1, - "price_int":"17244837", - "amount_int":"100000000", - "stamp":"1365443551180888" - }, - { - "price":172.45979, - "amount":5, - "price_int":"17245979", - "amount_int":"500000000", - "stamp":"1365439791140075" - }, - { - "price":172.5, - "amount":29.09951107, - "price_int":"17250000", - "amount_int":"2909951107", - "stamp":"1365444110541827" - }, - { - "price":172.52172, - "amount":10.5, - "price_int":"17252172", - "amount_int":"1050000000", - "stamp":"1365439917391633" - }, - { - "price":172.52406, - "amount":1.46063, - "price_int":"17252406", - "amount_int":"146063000", - "stamp":"1365444513723525" - }, - { - "price":172.57171, - "amount":0.404, - "price_int":"17257171", - "amount_int":"40400000", - "stamp":"1365439358931885" - }, - { - "price":172.7, - "amount":1.32741905, - "price_int":"17270000", - "amount_int":"132741905", - "stamp":"1365439294663443" - }, - { - "price":172.8, - "amount":6, - "price_int":"17280000", - "amount_int":"600000000", - "stamp":"1365439753168970" - }, - { - "price":172.8722, - "amount":0.11260962, - "price_int":"17287220", - "amount_int":"11260962", - "stamp":"1365439195530331" - }, - { - "price":172.91, - "amount":0.15, - "price_int":"17291000", - "amount_int":"15000000", - "stamp":"1365441923678500" - }, - { - "price":173, - "amount":130.24930108, - "price_int":"17300000", - "amount_int":"13024930108", - "stamp":"1365441544180038" - }, - { - "price":173.0001, - "amount":30, - "price_int":"17300010", - "amount_int":"3000000000", - "stamp":"1365439229534330" - }, - { - "price":173.00173, - "amount":0.752, - "price_int":"17300173", - "amount_int":"75200000", - "stamp":"1365444468358421" - }, - { - "price":173.00761, - "amount":30.8, - "price_int":"17300761", - "amount_int":"3080000000", - "stamp":"1365444095176625" - }, - { - "price":173.02024, - "amount":129.12137997, - "price_int":"17302024", - "amount_int":"12912137997", - "stamp":"1365444167920768" - }, - { - "price":173.1, - "amount":101.3196, - "price_int":"17310000", - "amount_int":"10131960000", - "stamp":"1365439773733452" - }, - { - "price":173.17856, - "amount":0.45365546, - "price_int":"17317856", - "amount_int":"45365546", - "stamp":"1365444390927095" - }, - { - "price":173.23027, - "amount":15, - "price_int":"17323027", - "amount_int":"1500000000", - "stamp":"1365444546903594" - }, - { - "price":173.26018, - "amount":0.5743, - "price_int":"17326018", - "amount_int":"57430000", - "stamp":"1365439504013384" - }, - { - "price":173.262, - "amount":0.404, - "price_int":"17326200", - "amount_int":"40400000", - "stamp":"1365439359539223" - }, - { - "price":173.341, - "amount":20, - "price_int":"17334100", - "amount_int":"2000000000", - "stamp":"1365439738763662" - }, - { - "price":173.4, - "amount":1, - "price_int":"17340000", - "amount_int":"100000000", - "stamp":"1365439346894981" - }, - { - "price":173.4662, - "amount":0.11260962, - "price_int":"17346620", - "amount_int":"11260962", - "stamp":"1365439196198290" - }, - { - "price":173.5, - "amount":1.00014904, - "price_int":"17350000", - "amount_int":"100014904", - "stamp":"1365439925652887" - }, - { - "price":173.531, - "amount":0.15, - "price_int":"17353100", - "amount_int":"15000000", - "stamp":"1365441988813966" - }, - { - "price":173.59, - "amount":0.5, - "price_int":"17359000", - "amount_int":"50000000", - "stamp":"1365440740942731" - }, - { - "price":173.7531, - "amount":0.15, - "price_int":"17375310", - "amount_int":"15000000", - "stamp":"1365442001309338" - }, - { - "price":173.85522, - "amount":1, - "price_int":"17385522", - "amount_int":"100000000", - "stamp":"1365444487298418" - }, - { - "price":173.95, - "amount":1, - "price_int":"17395000", - "amount_int":"100000000", - "stamp":"1365439522935702" - }, - { - "price":173.95504, - "amount":0.404, - "price_int":"17395504", - "amount_int":"40400000", - "stamp":"1365439360435180" - }, - { - "price":173.9726, - "amount":24.4569, - "price_int":"17397260", - "amount_int":"2445690000", - "stamp":"1365442459685376" - }, - { - "price":174, - "amount":41.04240821, - "price_int":"17400000", - "amount_int":"4104240821", - "stamp":"1365443784330954" - }, - { - "price":174.001, - "amount":0.546, - "price_int":"17400100", - "amount_int":"54600000", - "stamp":"1365439175555587" - }, - { - "price":174.00898, - "amount":2.5, - "price_int":"17400898", - "amount_int":"250000000", - "stamp":"1365442671396780" - }, - { - "price":174.02, - "amount":0.0387495, - "price_int":"17402000", - "amount_int":"3874950", - "stamp":"1365441011429368" - }, - { - "price":174.0602, - "amount":0.11260962, - "price_int":"17406020", - "amount_int":"11260962", - "stamp":"1365439196610962" - }, - { - "price":174.1, - "amount":10.15, - "price_int":"17410000", - "amount_int":"1015000000", - "stamp":"1365442846281719" - }, - { - "price":174.27044, - "amount":5.28273927, - "price_int":"17427044", - "amount_int":"528273927", - "stamp":"1365444100415321" - }, - { - "price":174.3, - "amount":1, - "price_int":"17430000", - "amount_int":"100000000", - "stamp":"1365439604657445" - }, - { - "price":174.52, - "amount":172.37501862, - "price_int":"17452000", - "amount_int":"17237501862", - "stamp":"1365438473582130" - }, - { - "price":174.57516, - "amount":0.5, - "price_int":"17457516", - "amount_int":"50000000", - "stamp":"1365444387175909" - }, - { - "price":174.58615, - "amount":0.2, - "price_int":"17458615", - "amount_int":"20000000", - "stamp":"1365439886952530" - }, - { - "price":174.65086, - "amount":0.404, - "price_int":"17465086", - "amount_int":"40400000", - "stamp":"1365439361006940" - }, - { - "price":174.6542, - "amount":0.11260962, - "price_int":"17465420", - "amount_int":"11260962", - "stamp":"1365439196707054" - }, - { - "price":174.75261, - "amount":0.5, - "price_int":"17475261", - "amount_int":"50000000", - "stamp":"1365442728994519" - }, - { - "price":174.80001, - "amount":1.13487565, - "price_int":"17480001", - "amount_int":"113487565", - "stamp":"1365439173331428" - }, - { - "price":174.89997, - "amount":5.4579, - "price_int":"17489997", - "amount_int":"545790000", - "stamp":"1365441018314118" - }, - { - "price":174.90185, - "amount":14.01999901, - "price_int":"17490185", - "amount_int":"1401999901", - "stamp":"1365443483746136" - }, - { - "price":174.931, - "amount":0.15, - "price_int":"17493100", - "amount_int":"15000000", - "stamp":"1365442061630964" - }, - { - "price":174.96001, - "amount":0.07684936, - "price_int":"17496001", - "amount_int":"7684936", - "stamp":"1365439197031666" - }, - { - "price":174.9601, - "amount":0.60020424, - "price_int":"17496010", - "amount_int":"60020424", - "stamp":"1365439173220322" - }, - { - "price":175, - "amount":413.65661977, - "price_int":"17500000", - "amount_int":"41365661977", - "stamp":"1365444431794460" - }, - { - "price":175.0001, - "amount":0.9685, - "price_int":"17500010", - "amount_int":"96850000", - "stamp":"1365439255366667" - }, - { - "price":175.1, - "amount":0.15, - "price_int":"17510000", - "amount_int":"15000000", - "stamp":"1365442090377767" - }, - { - "price":175.151, - "amount":6.18009597, - "price_int":"17515100", - "amount_int":"618009597", - "stamp":"1365442975375740" - }, - { - "price":175.18284, - "amount":0.1, - "price_int":"17518284", - "amount_int":"10000000", - "stamp":"1365440873034467" - }, - { - "price":175.2, - "amount":17.15912819, - "price_int":"17520000", - "amount_int":"1715912819", - "stamp":"1365443965529083" - }, - { - "price":175.2483, - "amount":0.11111111, - "price_int":"17524830", - "amount_int":"11111111", - "stamp":"1365439431598676" - }, - { - "price":175.34946, - "amount":0.404, - "price_int":"17534946", - "amount_int":"40400000", - "stamp":"1365439431938150" - }, - { - "price":175.4854, - "amount":5, - "price_int":"17548540", - "amount_int":"500000000", - "stamp":"1365439779647856" - }, - { - "price":175.48843, - "amount":30.41, - "price_int":"17548843", - "amount_int":"3041000000", - "stamp":"1365440248747713" - }, - { - "price":175.48901, - "amount":1.21934327, - "price_int":"17548901", - "amount_int":"121934327", - "stamp":"1365439364084043" - }, - { - "price":175.4891, - "amount":1.39336026, - "price_int":"17548910", - "amount_int":"139336026", - "stamp":"1365439335224866" - }, - { - "price":175.49624, - "amount":22.52890593, - "price_int":"17549624", - "amount_int":"2252890593", - "stamp":"1365440418061765" - }, - { - "price":175.5, - "amount":0.01019487, - "price_int":"17550000", - "amount_int":"1019487", - "stamp":"1365439562572957" - }, - { - "price":175.50001, - "amount":0.0438, - "price_int":"17550001", - "amount_int":"4380000", - "stamp":"1365440500479911" - }, - { - "price":175.52, - "amount":56.0546753, - "price_int":"17552000", - "amount_int":"5605467530", - "stamp":"1365440624282100" - }, - { - "price":175.52301, - "amount":13.88032198, - "price_int":"17552301", - "amount_int":"1388032198", - "stamp":"1365443341397128" - }, - { - "price":175.52302, - "amount":1, - "price_int":"17552302", - "amount_int":"100000000", - "stamp":"1365444418245110" - }, - { - "price":175.52304, - "amount":30.0802, - "price_int":"17552304", - "amount_int":"3008020000", - "stamp":"1365444510637250" - }, - { - "price":175.53327, - "amount":8.2059846, - "price_int":"17553327", - "amount_int":"820598460", - "stamp":"1365444118002172" - }, - { - "price":175.60974, - "amount":2, - "price_int":"17560974", - "amount_int":"200000000", - "stamp":"1365444533303937" - }, - { - "price":175.60975, - "amount":1, - "price_int":"17560975", - "amount_int":"100000000", - "stamp":"1365444449425468" - }, - { - "price":175.6554, - "amount":0.13, - "price_int":"17565540", - "amount_int":"13000000", - "stamp":"1365443069881758" - }, - { - "price":175.7, - "amount":0.15, - "price_int":"17570000", - "amount_int":"15000000", - "stamp":"1365442124035895" - }, - { - "price":175.71908, - "amount":0.11, - "price_int":"17571908", - "amount_int":"11000000", - "stamp":"1365443458393131" - }, - { - "price":175.75, - "amount":6.08, - "price_int":"17575000", - "amount_int":"608000000", - "stamp":"1365444142848496" - }, - { - "price":175.78797, - "amount":1, - "price_int":"17578797", - "amount_int":"100000000", - "stamp":"1365440410763685" - }, - { - "price":175.8424, - "amount":0.17175161, - "price_int":"17584240", - "amount_int":"17175161", - "stamp":"1365439673827081" - }, - { - "price":175.99, - "amount":0.25, - "price_int":"17599000", - "amount_int":"25000000", - "stamp":"1365443949149135" - }, - { - "price":176, - "amount":1292.17395345, - "price_int":"17600000", - "amount_int":"129217395345", - "stamp":"1365444439604413" - }, - { - "price":176.001, - "amount":20, - "price_int":"17600100", - "amount_int":"2000000000", - "stamp":"1365443703129375" - }, - { - "price":176.01, - "amount":20.1344623, - "price_int":"17601000", - "amount_int":"2013446230", - "stamp":"1365442545989875" - }, - { - "price":176.02, - "amount":9, - "price_int":"17602000", - "amount_int":"900000000", - "stamp":"1365443509038439" - }, - { - "price":176.05086, - "amount":0.404, - "price_int":"17605086", - "amount_int":"40400000", - "stamp":"1365439501476381" - }, - { - "price":176.08562, - "amount":0.78850453, - "price_int":"17608562", - "amount_int":"78850453", - "stamp":"1365442161187426" - }, - { - "price":176.1, - "amount":0.15, - "price_int":"17610000", - "amount_int":"15000000", - "stamp":"1365442152842899" - }, - { - "price":176.11, - "amount":5.6896, - "price_int":"17611000", - "amount_int":"568960000", - "stamp":"1365444263181811" - }, - { - "price":176.11111, - "amount":3.87114844, - "price_int":"17611111", - "amount_int":"387114844", - "stamp":"1365440398147085" - }, - { - "price":176.151, - "amount":25, - "price_int":"17615100", - "amount_int":"2500000000", - "stamp":"1365442933988366" - }, - { - "price":176.22, - "amount":7.6, - "price_int":"17622000", - "amount_int":"760000000", - "stamp":"1365444125099594" - }, - { - "price":176.23986, - "amount":2.06954639, - "price_int":"17623986", - "amount_int":"206954639", - "stamp":"1365444036556539" - }, - { - "price":176.3, - "amount":0.15, - "price_int":"17630000", - "amount_int":"15000000", - "stamp":"1365442161445268" - }, - { - "price":176.39309, - "amount":0.16586847, - "price_int":"17639309", - "amount_int":"16586847", - "stamp":"1365441560546017" - }, - { - "price":176.4364, - "amount":0.17175161, - "price_int":"17643640", - "amount_int":"17175161", - "stamp":"1365439674119092" - }, - { - "price":176.5, - "amount":0.3454, - "price_int":"17650000", - "amount_int":"34540000", - "stamp":"1365442935365895" - }, - { - "price":176.54353, - "amount":7, - "price_int":"17654353", - "amount_int":"700000000", - "stamp":"1365443821082502" - }, - { - "price":176.61, - "amount":7.208, - "price_int":"17661000", - "amount_int":"720800000", - "stamp":"1365443000473619" - }, - { - "price":176.62319, - "amount":0.23667442, - "price_int":"17662319", - "amount_int":"23667442", - "stamp":"1365444525657988" - }, - { - "price":176.75, - "amount":2.54515648, - "price_int":"17675000", - "amount_int":"254515648", - "stamp":"1365439345583062" - }, - { - "price":176.75506, - "amount":0.404, - "price_int":"17675506", - "amount_int":"40400000", - "stamp":"1365439501150811" - }, - { - "price":176.7961, - "amount":7.08692066, - "price_int":"17679610", - "amount_int":"708692066", - "stamp":"1365443028458581" - }, - { - "price":176.99821, - "amount":5, - "price_int":"17699821", - "amount_int":"500000000", - "stamp":"1365439799676972" - }, - { - "price":177, - "amount":270.4121, - "price_int":"17700000", - "amount_int":"27041210000", - "stamp":"1365443864715869" - }, - { - "price":177.00001, - "amount":0.03, - "price_int":"17700001", - "amount_int":"3000000", - "stamp":"1365443379819866" - }, - { - "price":177.029, - "amount":0.25, - "price_int":"17702900", - "amount_int":"25000000", - "stamp":"1365442037665187" - }, - { - "price":177.0304, - "amount":0.17175161, - "price_int":"17703040", - "amount_int":"17175161", - "stamp":"1365439674543499" - }, - { - "price":177.1, - "amount":0.11, - "price_int":"17710000", - "amount_int":"11000000", - "stamp":"1365442468042643" - }, - { - "price":177.11111, - "amount":10, - "price_int":"17711111", - "amount_int":"1000000000", - "stamp":"1365440413632607" - }, - { - "price":177.17495, - "amount":2, - "price_int":"17717495", - "amount_int":"200000000", - "stamp":"1365440805509358" - }, - { - "price":177.2, - "amount":28.2167, - "price_int":"17720000", - "amount_int":"2821670000", - "stamp":"1365441197334570" - }, - { - "price":177.3, - "amount":4.93808336, - "price_int":"17730000", - "amount_int":"493808336", - "stamp":"1365440600687183" - }, - { - "price":177.30077, - "amount":34.41101892, - "price_int":"17730077", - "amount_int":"3441101892", - "stamp":"1365439944870076" - }, - { - "price":177.4, - "amount":1, - "price_int":"17740000", - "amount_int":"100000000", - "stamp":"1365441025916353" - }, - { - "price":177.46207, - "amount":0.404, - "price_int":"17746207", - "amount_int":"40400000", - "stamp":"1365439506997694" - }, - { - "price":177.5, - "amount":54.0526623, - "price_int":"17750000", - "amount_int":"5405266230", - "stamp":"1365444102677610" - }, - { - "price":177.6244, - "amount":0.17175161, - "price_int":"17762440", - "amount_int":"17175161", - "stamp":"1365439674693214" - }, - { - "price":177.71965, - "amount":0.0723, - "price_int":"17771965", - "amount_int":"7230000", - "stamp":"1365443120857923" - }, - { - "price":177.83162, - "amount":20, - "price_int":"17783162", - "amount_int":"2000000000", - "stamp":"1365443739221635" - }, - { - "price":177.88213, - "amount":20, - "price_int":"17788213", - "amount_int":"2000000000", - "stamp":"1365444087519657" - }, - { - "price":177.9, - "amount":0.11, - "price_int":"17790000", - "amount_int":"11000000", - "stamp":"1365442482345629" - }, - { - "price":178, - "amount":251.96909331, - "price_int":"17800000", - "amount_int":"25196909331", - "stamp":"1365444210086873" - }, - { - "price":178.001, - "amount":526.85402469, - "price_int":"17800100", - "amount_int":"52685402469", - "stamp":"1365443292254734" - }, - { - "price":178.002, - "amount":0.5843, - "price_int":"17800200", - "amount_int":"58430000", - "stamp":"1365443468981625" - }, - { - "price":178.003, - "amount":8.1, - "price_int":"17800300", - "amount_int":"810000000", - "stamp":"1365443504273928" - }, - { - "price":178.05893, - "amount":10.96159106, - "price_int":"17805893", - "amount_int":"1096159106", - "stamp":"1365444430982835" - }, - { - "price":178.06019, - "amount":9.9809, - "price_int":"17806019", - "amount_int":"998090000", - "stamp":"1365444518480853" - }, - { - "price":178.12, - "amount":2, - "price_int":"17812000", - "amount_int":"200000000", - "stamp":"1365443674693985" - }, - { - "price":178.17192, - "amount":0.404, - "price_int":"17817192", - "amount_int":"40400000", - "stamp":"1365443685008212" - }, - { - "price":178.2, - "amount":0.02545476, - "price_int":"17820000", - "amount_int":"2545476", - "stamp":"1365443802730211" - }, - { - "price":178.22477, - "amount":0.1766722, - "price_int":"17822477", - "amount_int":"17667220", - "stamp":"1365443790433414" - }, - { - "price":178.27, - "amount":48.0171, - "price_int":"17827000", - "amount_int":"4801710000", - "stamp":"1365443990114890" - }, - { - "price":178.4, - "amount":100, - "price_int":"17840000", - "amount_int":"10000000000", - "stamp":"1365444251124408" - }, - { - "price":178.71472, - "amount":1.85972384, - "price_int":"17871472", - "amount_int":"185972384", - "stamp":"1365444311969674" - }, - { - "price":178.82877, - "amount":0.1773958, - "price_int":"17882877", - "amount_int":"17739580", - "stamp":"1365444031058831" - }, - { - "price":178.86714, - "amount":0.23725, - "price_int":"17886714", - "amount_int":"23725000", - "stamp":"1365444533851285" - }, - { - "price":178.88462, - "amount":0.404, - "price_int":"17888462", - "amount_int":"40400000", - "stamp":"1365443760807090" - }, - { - "price":178.92175, - "amount":0.9, - "price_int":"17892175", - "amount_int":"90000000", - "stamp":"1365444299012207" - }, - { - "price":179, - "amount":43.73893915, - "price_int":"17900000", - "amount_int":"4373893915", - "stamp":"1365444424501576" - }, - { - "price":179.00001, - "amount":0.18020356, - "price_int":"17900001", - "amount_int":"18020356", - "stamp":"1365443211772052" - }, - { - "price":179.11001, - "amount":0.02, - "price_int":"17911001", - "amount_int":"2000000", - "stamp":"1365443370130042" - }, - { - "price":179.42, - "amount":1.825, - "price_int":"17942000", - "amount_int":"182500000", - "stamp":"1365443984574698" - }, - { - "price":179.43267, - "amount":0.1773958, - "price_int":"17943267", - "amount_int":"17739580", - "stamp":"1365444031159012" - }, - { - "price":179.60015, - "amount":0.404, - "price_int":"17960015", - "amount_int":"40400000", - "stamp":"1365443983490891" - }, - { - "price":179.70203, - "amount":0.5, - "price_int":"17970203", - "amount_int":"50000000", - "stamp":"1365443400173041" - }, - { - "price":179.93556, - "amount":1, - "price_int":"17993556", - "amount_int":"100000000", - "stamp":"1365444380922720" - }, - { - "price":179.99, - "amount":10, - "price_int":"17999000", - "amount_int":"1000000000", - "stamp":"1365444342476636" - }, - { - "price":179.9999, - "amount":0.14, - "price_int":"17999990", - "amount_int":"14000000", - "stamp":"1365443563484941" - }, - { - "price":180, - "amount":255.13956783, - "price_int":"18000000", - "amount_int":"25513956783", - "stamp":"1365444492237757" - }, - { - "price":180.01, - "amount":393.89882863, - "price_int":"18001000", - "amount_int":"39389882863", - "stamp":"1365443382489493" - }, - { - "price":180.1, - "amount":202.13436218, - "price_int":"18010000", - "amount_int":"20213436218", - "stamp":"1365443761755440" - }, - { - "price":180.10467, - "amount":0.985082, - "price_int":"18010467", - "amount_int":"98508200", - "stamp":"1365444462086636" - }, - { - "price":180.2, - "amount":138.90965033, - "price_int":"18020000", - "amount_int":"13890965033", - "stamp":"1365443874300124" - }, - { - "price":180.24, - "amount":8.5, - "price_int":"18024000", - "amount_int":"850000000", - "stamp":"1365443955372552" - }, - { - "price":180.3, - "amount":7.43026178, - "price_int":"18030000", - "amount_int":"743026178", - "stamp":"1365444169973269" - }, - { - "price":180.42056, - "amount":0.985082, - "price_int":"18042056", - "amount_int":"98508200", - "stamp":"1365444461249191" - }, - { - "price":180.45, - "amount":16.53, - "price_int":"18045000", - "amount_int":"1653000000", - "stamp":"1365444046394704" - }, - { - "price":180.71908, - "amount":1.5558805, - "price_int":"18071908", - "amount_int":"155588050", - "stamp":"1365443738372244" - }, - { - "price":180.73645, - "amount":1.2313525, - "price_int":"18073645", - "amount_int":"123135250", - "stamp":"1365444460426761" - }, - { - "price":180.94771, - "amount":0.54492638, - "price_int":"18094771", - "amount_int":"54492638", - "stamp":"1365444399997627" - }, - { - "price":181, - "amount":175.07129065, - "price_int":"18100000", - "amount_int":"17507129065", - "stamp":"1365444377561220" - }, - { - "price":181.05234, - "amount":0.7388115, - "price_int":"18105234", - "amount_int":"73881150", - "stamp":"1365444451861771" - }, - { - "price":181.1, - "amount":28.3, - "price_int":"18110000", - "amount_int":"2830000000", - "stamp":"1365443861716729" - }, - { - "price":181.111, - "amount":7.528, - "price_int":"18111100", - "amount_int":"752800000", - "stamp":"1365444030853741" - }, - { - "price":181.2, - "amount":50, - "price_int":"18120000", - "amount_int":"5000000000", - "stamp":"1365443963768882" - }, - { - "price":181.21, - "amount":8, - "price_int":"18121000", - "amount_int":"800000000", - "stamp":"1365444147273226" - }, - { - "price":181.31, - "amount":10.5896416, - "price_int":"18131000", - "amount_int":"1058964160", - "stamp":"1365444033545263" - }, - { - "price":181.90001, - "amount":2, - "price_int":"18190001", - "amount_int":"200000000", - "stamp":"1365443878663496" - }, - { - "price":181.9009, - "amount":1.1, - "price_int":"18190090", - "amount_int":"110000000", - "stamp":"1365444567293727" - }, - { - "price":182, - "amount":42.61432003, - "price_int":"18200000", - "amount_int":"4261432003", - "stamp":"1365444544813023" - }, - { - "price":182.0012, - "amount":134, - "price_int":"18200120", - "amount_int":"13400000000", - "stamp":"1365444545838974" - }, - { - "price":182.01001, - "amount":1.31671895, - "price_int":"18201001", - "amount_int":"131671895", - "stamp":"1365444562578618" - } - ], - "filter_min_price":{ - "value":"163.80900", - "value_int":"16380900", - "display":"$163.81", - "display_short":"$163.81", - "currency":"USD" - }, - "filter_max_price":{ - "value":"200.21100", - "value_int":"20021100", - "display":"$200.21", - "display_short":"$200.21", - "currency":"USD" - } -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-fulldepth-data.json b/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-fulldepth-data.json deleted file mode 100644 index fd77c2ecb..000000000 --- a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-fulldepth-data.json +++ /dev/null @@ -1,56643 +0,0 @@ -{ - "asks":[ - { - "price":5.68089, - "amount":7.2761, - "price_int":"568089", - "amount_int":"727610000", - "stamp":"1328644616188590" - }, - { - "price":5.69, - "amount":99.99004445, - "price_int":"569000", - "amount_int":"9999004445", - "stamp":"1328644558052385" - }, - { - "price":5.6919, - "amount":2.7100375, - "price_int":"569190", - "amount_int":"271003750", - "stamp":"1328644396758642" - }, - { - "price":5.70123, - "amount":9.788, - "price_int":"570123", - "amount_int":"978800000", - "stamp":"1328644441750046" - }, - { - "price":5.714, - "amount":0.07726651, - "price_int":"571400", - "amount_int":"7726651", - "stamp":"1328556222388193" - }, - { - "price":5.7184, - "amount":0.1171, - "price_int":"571840", - "amount_int":"11710000", - "stamp":"1328643275582093" - }, - { - "price":5.72, - "amount":14.2203, - "price_int":"572000", - "amount_int":"1422030000", - "stamp":"1328643332617593" - }, - { - "price":5.72325, - "amount":0.02459, - "price_int":"572325", - "amount_int":"2459000", - "stamp":"1328644720536722" - }, - { - "price":5.72901, - "amount":0.15, - "price_int":"572901", - "amount_int":"15000000", - "stamp":"1328517250324655" - }, - { - "price":5.73737, - "amount":300, - "price_int":"573737", - "amount_int":"30000000000", - "stamp":"1328644619027326" - }, - { - "price":5.7388, - "amount":0.40436648, - "price_int":"573880", - "amount_int":"40436648", - "stamp":"1328643562664374" - }, - { - "price":5.74, - "amount":509.29, - "price_int":"574000", - "amount_int":"50929000000", - "stamp":"1328644519248974" - }, - { - "price":5.74197, - "amount":133, - "price_int":"574197", - "amount_int":"13300000000", - "stamp":"1328644297337858" - }, - { - "price":5.74325, - "amount":0.01, - "price_int":"574325", - "amount_int":"1000000", - "stamp":"1328644189453103" - }, - { - "price":5.74888, - "amount":1, - "price_int":"574888", - "amount_int":"100000000", - "stamp":"1328644427924075" - }, - { - "price":5.749, - "amount":1, - "price_int":"574900", - "amount_int":"100000000", - "stamp":"1328644413101566" - }, - { - "price":5.7499, - "amount":1, - "price_int":"574990", - "amount_int":"100000000", - "stamp":"1328644418403721" - }, - { - "price":5.751, - "amount":5, - "price_int":"575100", - "amount_int":"500000000", - "stamp":"1328643692556305" - }, - { - "price":5.758, - "amount":10, - "price_int":"575800", - "amount_int":"1000000000", - "stamp":"1328643340722632" - }, - { - "price":5.75888, - "amount":1, - "price_int":"575888", - "amount_int":"100000000", - "stamp":"1328644433469332" - }, - { - "price":5.759, - "amount":1, - "price_int":"575900", - "amount_int":"100000000", - "stamp":"1328644436385954" - }, - { - "price":5.7599, - "amount":1, - "price_int":"575990", - "amount_int":"100000000", - "stamp":"1328644438729594" - }, - { - "price":5.75999, - "amount":1, - "price_int":"575999", - "amount_int":"100000000", - "stamp":"1328644440843377" - }, - { - "price":5.76, - "amount":44.09416089, - "price_int":"576000", - "amount_int":"4409416089", - "stamp":"1328643121584798" - }, - { - "price":5.76666, - "amount":1, - "price_int":"576666", - "amount_int":"100000000", - "stamp":"1328644448728635" - }, - { - "price":5.76777, - "amount":1, - "price_int":"576777", - "amount_int":"100000000", - "stamp":"1328644452871102" - }, - { - "price":5.76888, - "amount":1, - "price_int":"576888", - "amount_int":"100000000", - "stamp":"1328644455427751" - }, - { - "price":5.76999, - "amount":1, - "price_int":"576999", - "amount_int":"100000000", - "stamp":"1328644457927709" - }, - { - "price":5.77, - "amount":105.43, - "price_int":"577000", - "amount_int":"10543000000", - "stamp":"1328643669064153" - }, - { - "price":5.77111, - "amount":1, - "price_int":"577111", - "amount_int":"100000000", - "stamp":"1328644463304195" - }, - { - "price":5.77222, - "amount":1, - "price_int":"577222", - "amount_int":"100000000", - "stamp":"1328644465736585" - }, - { - "price":5.77333, - "amount":1, - "price_int":"577333", - "amount_int":"100000000", - "stamp":"1328644468548417" - }, - { - "price":5.77444, - "amount":1, - "price_int":"577444", - "amount_int":"100000000", - "stamp":"1328644470933847" - }, - { - "price":5.775, - "amount":111, - "price_int":"577500", - "amount_int":"11100000000", - "stamp":"1328643692735713" - }, - { - "price":5.77555, - "amount":1, - "price_int":"577555", - "amount_int":"100000000", - "stamp":"1328644473306075" - }, - { - "price":5.77666, - "amount":1, - "price_int":"577666", - "amount_int":"100000000", - "stamp":"1328644475945994" - }, - { - "price":5.777, - "amount":90, - "price_int":"577700", - "amount_int":"9000000000", - "stamp":"1328644569858499" - }, - { - "price":5.77777, - "amount":11, - "price_int":"577777", - "amount_int":"1100000000", - "stamp":"1328644478371413" - }, - { - "price":5.77888, - "amount":1, - "price_int":"577888", - "amount_int":"100000000", - "stamp":"1328644483585579" - }, - { - "price":5.779, - "amount":1, - "price_int":"577900", - "amount_int":"100000000", - "stamp":"1328644495758019" - }, - { - "price":5.7799, - "amount":1, - "price_int":"577990", - "amount_int":"100000000", - "stamp":"1328644494035068" - }, - { - "price":5.77999, - "amount":1, - "price_int":"577999", - "amount_int":"100000000", - "stamp":"1328644486008243" - }, - { - "price":5.78, - "amount":1204.31577336, - "price_int":"578000", - "amount_int":"120431577336", - "stamp":"1328644406539437" - }, - { - "price":5.78106, - "amount":0.13992, - "price_int":"578106", - "amount_int":"13992000", - "stamp":"1328487601943230" - }, - { - "price":5.78309, - "amount":0.04341, - "price_int":"578309", - "amount_int":"4341000", - "stamp":"1328487651386055" - }, - { - "price":5.78377, - "amount":0.04409, - "price_int":"578377", - "amount_int":"4409000", - "stamp":"1328487674915254" - }, - { - "price":5.78443, - "amount":2.11, - "price_int":"578443", - "amount_int":"211000000", - "stamp":"1328559777171646" - }, - { - "price":5.78496, - "amount":1.08, - "price_int":"578496", - "amount_int":"108000000", - "stamp":"1328523349035439" - }, - { - "price":5.785, - "amount":0.01, - "price_int":"578500", - "amount_int":"1000000", - "stamp":"1328490782441065" - }, - { - "price":5.786, - "amount":0.2535, - "price_int":"578600", - "amount_int":"25350000", - "stamp":"1328595112529197" - }, - { - "price":5.78731, - "amount":2.081, - "price_int":"578731", - "amount_int":"208100000", - "stamp":"1328555632481728" - }, - { - "price":5.78757, - "amount":0.10472148, - "price_int":"578757", - "amount_int":"10472148", - "stamp":"1328486776728595" - }, - { - "price":5.78771, - "amount":0.01351, - "price_int":"578771", - "amount_int":"1351000", - "stamp":"1328482961579856" - }, - { - "price":5.78899, - "amount":1.83998617, - "price_int":"578899", - "amount_int":"183998617", - "stamp":"1328642127783170" - }, - { - "price":5.789, - "amount":42.1469, - "price_int":"578900", - "amount_int":"4214690000", - "stamp":"1328519418826580" - }, - { - "price":5.78932, - "amount":0.06115317, - "price_int":"578932", - "amount_int":"6115317", - "stamp":"1328487097562212" - }, - { - "price":5.78989, - "amount":2, - "price_int":"578989", - "amount_int":"200000000", - "stamp":"1328611220556507" - }, - { - "price":5.78999, - "amount":0.3117408, - "price_int":"578999", - "amount_int":"31174080", - "stamp":"1328545909969663" - }, - { - "price":5.79, - "amount":550.91673711, - "price_int":"579000", - "amount_int":"55091673711", - "stamp":"1328642732507080" - }, - { - "price":5.79015, - "amount":1.10961, - "price_int":"579015", - "amount_int":"110961000", - "stamp":"1328569693522946" - }, - { - "price":5.7902, - "amount":0.53625054, - "price_int":"579020", - "amount_int":"53625054", - "stamp":"1328463298159427" - }, - { - "price":5.79064, - "amount":0.05643443, - "price_int":"579064", - "amount_int":"5643443", - "stamp":"1328497141204027" - }, - { - "price":5.79073, - "amount":0.16842, - "price_int":"579073", - "amount_int":"16842000", - "stamp":"1328487743322499" - }, - { - "price":5.79087, - "amount":4.02597, - "price_int":"579087", - "amount_int":"402597000", - "stamp":"1328631585904590" - }, - { - "price":5.79122, - "amount":1, - "price_int":"579122", - "amount_int":"100000000", - "stamp":"1328525090968823" - }, - { - "price":5.79123, - "amount":228.09352606, - "price_int":"579123", - "amount_int":"22809352606", - "stamp":"1328518921275394" - }, - { - "price":5.79271, - "amount":25, - "price_int":"579271", - "amount_int":"2500000000", - "stamp":"1328644679851091" - }, - { - "price":5.79359, - "amount":2.35745989, - "price_int":"579359", - "amount_int":"235745989", - "stamp":"1328528434601738" - }, - { - "price":5.7936, - "amount":43.01525108, - "price_int":"579360", - "amount_int":"4301525108", - "stamp":"1328644777008162" - }, - { - "price":5.794, - "amount":68.94161201, - "price_int":"579400", - "amount_int":"6894161201", - "stamp":"1328549530858634" - }, - { - "price":5.79454, - "amount":0.19117, - "price_int":"579454", - "amount_int":"19117000", - "stamp":"1328642673900434" - }, - { - "price":5.79456, - "amount":0.02249856, - "price_int":"579456", - "amount_int":"2249856", - "stamp":"1328502285129379" - }, - { - "price":5.79468, - "amount":13.79311, - "price_int":"579468", - "amount_int":"1379311000", - "stamp":"1328487686994464" - }, - { - "price":5.79484, - "amount":1.18333059, - "price_int":"579484", - "amount_int":"118333059", - "stamp":"1328487700483266" - }, - { - "price":5.79487, - "amount":0.36703, - "price_int":"579487", - "amount_int":"36703000", - "stamp":"1328487667769626" - }, - { - "price":5.79488, - "amount":0.12538, - "price_int":"579488", - "amount_int":"12538000", - "stamp":"1328579420179944" - }, - { - "price":5.7949, - "amount":0.99891244, - "price_int":"579490", - "amount_int":"99891244", - "stamp":"1328464254743036" - }, - { - "price":5.79495, - "amount":0.16246, - "price_int":"579495", - "amount_int":"16246000", - "stamp":"1328488242697971" - }, - { - "price":5.79499, - "amount":1, - "price_int":"579499", - "amount_int":"100000000", - "stamp":"1328525095179899" - }, - { - "price":5.795, - "amount":216.313, - "price_int":"579500", - "amount_int":"21631300000", - "stamp":"1328516219703607" - }, - { - "price":5.796, - "amount":0.2469, - "price_int":"579600", - "amount_int":"24690000", - "stamp":"1328519423308541" - }, - { - "price":5.79675, - "amount":0.99705, - "price_int":"579675", - "amount_int":"99705000", - "stamp":"1328487693425275" - }, - { - "price":5.79678, - "amount":0.01, - "price_int":"579678", - "amount_int":"1000000", - "stamp":"1328642380718894" - }, - { - "price":5.797, - "amount":40, - "price_int":"579700", - "amount_int":"4000000000", - "stamp":"1328528038392378" - }, - { - "price":5.79787, - "amount":0.10233256, - "price_int":"579787", - "amount_int":"10233256", - "stamp":"1328463262945360" - }, - { - "price":5.79799, - "amount":1, - "price_int":"579799", - "amount_int":"100000000", - "stamp":"1328528054785204" - }, - { - "price":5.798, - "amount":10, - "price_int":"579800", - "amount_int":"1000000000", - "stamp":"1328481013001724" - }, - { - "price":5.79889, - "amount":2, - "price_int":"579889", - "amount_int":"200000000", - "stamp":"1328611228258729" - }, - { - "price":5.79899, - "amount":4, - "price_int":"579899", - "amount_int":"400000000", - "stamp":"1328462866355163" - }, - { - "price":5.799, - "amount":318.25082329, - "price_int":"579900", - "amount_int":"31825082329", - "stamp":"1328522767023505" - }, - { - "price":5.79978, - "amount":1.3827, - "price_int":"579978", - "amount_int":"138270000", - "stamp":"1328487925247337" - }, - { - "price":5.7998, - "amount":25, - "price_int":"579980", - "amount_int":"2500000000", - "stamp":"1328632207245741" - }, - { - "price":5.79989, - "amount":1, - "price_int":"579989", - "amount_int":"100000000", - "stamp":"1328611217528354" - }, - { - "price":5.7999, - "amount":885.61688878, - "price_int":"579990", - "amount_int":"88561688878", - "stamp":"1328635429538748" - }, - { - "price":5.79999, - "amount":0.3114869, - "price_int":"579999", - "amount_int":"31148690", - "stamp":"1328432118175046" - }, - { - "price":5.8, - "amount":383.01143022, - "price_int":"580000", - "amount_int":"38301143022", - "stamp":"1328643307739225" - }, - { - "price":5.80008, - "amount":0.08622, - "price_int":"580008", - "amount_int":"8622000", - "stamp":"1328459092404049" - }, - { - "price":5.80073, - "amount":3.36477, - "price_int":"580073", - "amount_int":"336477000", - "stamp":"1328571984712471" - }, - { - "price":5.80163, - "amount":10, - "price_int":"580163", - "amount_int":"1000000000", - "stamp":"1328573392207330" - }, - { - "price":5.80444, - "amount":0.13634, - "price_int":"580444", - "amount_int":"13634000", - "stamp":"1328620001268361" - }, - { - "price":5.805, - "amount":0.01, - "price_int":"580500", - "amount_int":"1000000", - "stamp":"1328490773931958" - }, - { - "price":5.80507, - "amount":0.0362, - "price_int":"580507", - "amount_int":"3620000", - "stamp":"1328568856642551" - }, - { - "price":5.80525, - "amount":0.15, - "price_int":"580525", - "amount_int":"15000000", - "stamp":"1328446277854959" - }, - { - "price":5.8059, - "amount":0.53479749, - "price_int":"580590", - "amount_int":"53479749", - "stamp":"1328456912822244" - }, - { - "price":5.80627, - "amount":0.27635685, - "price_int":"580627", - "amount_int":"27635685", - "stamp":"1328435218824239" - }, - { - "price":5.80692, - "amount":0.01, - "price_int":"580692", - "amount_int":"1000000", - "stamp":"1328438222770594" - }, - { - "price":5.808, - "amount":10, - "price_int":"580800", - "amount_int":"1000000000", - "stamp":"1328527484142480" - }, - { - "price":5.80817, - "amount":0.1, - "price_int":"580817", - "amount_int":"10000000", - "stamp":"1328456847694168" - }, - { - "price":5.80835, - "amount":0.05462, - "price_int":"580835", - "amount_int":"5462000", - "stamp":"1328487552476708" - }, - { - "price":5.80846, - "amount":0.21441, - "price_int":"580846", - "amount_int":"21441000", - "stamp":"1328581696198744" - }, - { - "price":5.80872, - "amount":20, - "price_int":"580872", - "amount_int":"2000000000", - "stamp":"1328632692130035" - }, - { - "price":5.80999, - "amount":1.311649, - "price_int":"580999", - "amount_int":"131164900", - "stamp":"1328519523094604" - }, - { - "price":5.81, - "amount":102.9949381, - "price_int":"581000", - "amount_int":"10299493810", - "stamp":"1328642847988498" - }, - { - "price":5.81034, - "amount":4.5297354, - "price_int":"581034", - "amount_int":"452973540", - "stamp":"1328572967766150" - }, - { - "price":5.81061, - "amount":0.05748, - "price_int":"581061", - "amount_int":"5748000", - "stamp":"1328460448593616" - }, - { - "price":5.81192, - "amount":28.41997158, - "price_int":"581192", - "amount_int":"2841997158", - "stamp":"1328629182350350" - }, - { - "price":5.8125, - "amount":0.1, - "price_int":"581250", - "amount_int":"10000000", - "stamp":"1328565938653187" - }, - { - "price":5.81462, - "amount":0.12571, - "price_int":"581462", - "amount_int":"12571000", - "stamp":"1328643811233973" - }, - { - "price":5.81499, - "amount":2, - "price_int":"581499", - "amount_int":"200000000", - "stamp":"1328541433919599" - }, - { - "price":5.815, - "amount":20.01, - "price_int":"581500", - "amount_int":"2001000000", - "stamp":"1328490770111382" - }, - { - "price":5.81643, - "amount":1, - "price_int":"581643", - "amount_int":"100000000", - "stamp":"1328527456162606" - }, - { - "price":5.81644, - "amount":1.61118, - "price_int":"581644", - "amount_int":"161118000", - "stamp":"1328488262299748" - }, - { - "price":5.81759, - "amount":1, - "price_int":"581759", - "amount_int":"100000000", - "stamp":"1328526334110856" - }, - { - "price":5.81847, - "amount":0.1, - "price_int":"581847", - "amount_int":"10000000", - "stamp":"1328448925778950" - }, - { - "price":5.81999, - "amount":4.05072875, - "price_int":"581999", - "amount_int":"405072875", - "stamp":"1328560086426052" - }, - { - "price":5.82, - "amount":497.33733951, - "price_int":"582000", - "amount_int":"49733733951", - "stamp":"1328642810049359" - }, - { - "price":5.8204, - "amount":0.53346611, - "price_int":"582040", - "amount_int":"53346611", - "stamp":"1328456875696565" - }, - { - "price":5.82152, - "amount":13.60192135, - "price_int":"582152", - "amount_int":"1360192135", - "stamp":"1328631788416777" - }, - { - "price":5.82344, - "amount":0.67678, - "price_int":"582344", - "amount_int":"67678000", - "stamp":"1328571608149289" - }, - { - "price":5.824, - "amount":2.4691, - "price_int":"582400", - "amount_int":"246910000", - "stamp":"1328457119042566" - }, - { - "price":5.82472, - "amount":12.41570257, - "price_int":"582472", - "amount_int":"1241570257", - "stamp":"1328632308340765" - }, - { - "price":5.825, - "amount":0.11, - "price_int":"582500", - "amount_int":"11000000", - "stamp":"1328490765852213" - }, - { - "price":5.82532, - "amount":0.07327, - "price_int":"582532", - "amount_int":"7327000", - "stamp":"1328459063060349" - }, - { - "price":5.8257, - "amount":1.5, - "price_int":"582570", - "amount_int":"150000000", - "stamp":"1328630260990666" - }, - { - "price":5.82699, - "amount":1, - "price_int":"582699", - "amount_int":"100000000", - "stamp":"1328519540400758" - }, - { - "price":5.827, - "amount":49.8, - "price_int":"582700", - "amount_int":"4980000000", - "stamp":"1328486490973922" - }, - { - "price":5.82809, - "amount":2, - "price_int":"582809", - "amount_int":"200000000", - "stamp":"1328564413244359" - }, - { - "price":5.8281, - "amount":300, - "price_int":"582810", - "amount_int":"30000000000", - "stamp":"1328426016210056" - }, - { - "price":5.82877, - "amount":0.1, - "price_int":"582877", - "amount_int":"10000000", - "stamp":"1328429041526554" - }, - { - "price":5.82899, - "amount":1, - "price_int":"582899", - "amount_int":"100000000", - "stamp":"1328525533274109" - }, - { - "price":5.829, - "amount":20, - "price_int":"582900", - "amount_int":"2000000000", - "stamp":"1328427385618888" - }, - { - "price":5.82999, - "amount":1.3117485, - "price_int":"582999", - "amount_int":"131174850", - "stamp":"1328519549224506" - }, - { - "price":5.83, - "amount":2.10887504, - "price_int":"583000", - "amount_int":"210887504", - "stamp":"1328643092764564" - }, - { - "price":5.83039, - "amount":0.15, - "price_int":"583039", - "amount_int":"15000000", - "stamp":"1328423597803263" - }, - { - "price":5.8308, - "amount":3.5852, - "price_int":"583080", - "amount_int":"358520000", - "stamp":"1328487903234402" - }, - { - "price":5.83219, - "amount":0.29933, - "price_int":"583219", - "amount_int":"29933000", - "stamp":"1328571545830593" - }, - { - "price":5.8324, - "amount":0.75738, - "price_int":"583240", - "amount_int":"75738000", - "stamp":"1328643940651844" - }, - { - "price":5.83299, - "amount":1.10751229, - "price_int":"583299", - "amount_int":"110751229", - "stamp":"1328481187917556" - }, - { - "price":5.83302, - "amount":300, - "price_int":"583302", - "amount_int":"30000000000", - "stamp":"1328429631094456" - }, - { - "price":5.834, - "amount":10, - "price_int":"583400", - "amount_int":"1000000000", - "stamp":"1328456493660202" - }, - { - "price":5.8349, - "amount":0.53214134, - "price_int":"583490", - "amount_int":"53214134", - "stamp":"1328456850472388" - }, - { - "price":5.83499, - "amount":1, - "price_int":"583499", - "amount_int":"100000000", - "stamp":"1328525545521371" - }, - { - "price":5.835, - "amount":23.5398774, - "price_int":"583500", - "amount_int":"2353987740", - "stamp":"1328490761749267" - }, - { - "price":5.8375, - "amount":0.2, - "price_int":"583750", - "amount_int":"20000000", - "stamp":"1328566300728768" - }, - { - "price":5.83907, - "amount":0.1, - "price_int":"583907", - "amount_int":"10000000", - "stamp":"1328428901545653" - }, - { - "price":5.83945, - "amount":0.16171, - "price_int":"583945", - "amount_int":"16171000", - "stamp":"1328487910283932" - }, - { - "price":5.8398, - "amount":50, - "price_int":"583980", - "amount_int":"5000000000", - "stamp":"1328642142834186" - }, - { - "price":5.83999, - "amount":1.3149922, - "price_int":"583999", - "amount_int":"131499220", - "stamp":"1328519554120473" - }, - { - "price":5.84, - "amount":239.44656003, - "price_int":"584000", - "amount_int":"23944656003", - "stamp":"1328644591177380" - }, - { - "price":5.841, - "amount":2, - "price_int":"584100", - "amount_int":"200000000", - "stamp":"1328644596138423" - }, - { - "price":5.84151, - "amount":0.04672, - "price_int":"584151", - "amount_int":"4672000", - "stamp":"1328459248411573" - }, - { - "price":5.842, - "amount":3, - "price_int":"584200", - "amount_int":"300000000", - "stamp":"1328644600802551" - }, - { - "price":5.84219, - "amount":0.04463, - "price_int":"584219", - "amount_int":"4463000", - "stamp":"1328458727521455" - }, - { - "price":5.84237, - "amount":0.01, - "price_int":"584237", - "amount_int":"1000000", - "stamp":"1328424973672717" - }, - { - "price":5.843, - "amount":4, - "price_int":"584300", - "amount_int":"400000000", - "stamp":"1328644606334056" - }, - { - "price":5.84315, - "amount":4, - "price_int":"584315", - "amount_int":"400000000", - "stamp":"1328466383944701" - }, - { - "price":5.844, - "amount":5, - "price_int":"584400", - "amount_int":"500000000", - "stamp":"1328644613176391" - }, - { - "price":5.845, - "amount":160.6123148, - "price_int":"584500", - "amount_int":"16061231480", - "stamp":"1328644619912345" - }, - { - "price":5.846, - "amount":6, - "price_int":"584600", - "amount_int":"600000000", - "stamp":"1328644624366808" - }, - { - "price":5.84617, - "amount":0.02219, - "price_int":"584617", - "amount_int":"2219000", - "stamp":"1328458693401394" - }, - { - "price":5.847, - "amount":7, - "price_int":"584700", - "amount_int":"700000000", - "stamp":"1328644629063586" - }, - { - "price":5.84709, - "amount":1.10711229, - "price_int":"584709", - "amount_int":"110711229", - "stamp":"1328481188406885" - }, - { - "price":5.84777, - "amount":7, - "price_int":"584777", - "amount_int":"700000000", - "stamp":"1328644663627073" - }, - { - "price":5.848, - "amount":18, - "price_int":"584800", - "amount_int":"1800000000", - "stamp":"1328644632850952" - }, - { - "price":5.84854, - "amount":300, - "price_int":"584854", - "amount_int":"30000000000", - "stamp":"1328416898445333" - }, - { - "price":5.84888, - "amount":9, - "price_int":"584888", - "amount_int":"900000000", - "stamp":"1328644657352355" - }, - { - "price":5.849, - "amount":9, - "price_int":"584900", - "amount_int":"900000000", - "stamp":"1328644636477469" - }, - { - "price":5.84922, - "amount":0.18861, - "price_int":"584922", - "amount_int":"18861000", - "stamp":"1328487743822234" - }, - { - "price":5.84937, - "amount":0.1, - "price_int":"584937", - "amount_int":"10000000", - "stamp":"1328428913631285" - }, - { - "price":5.8495, - "amount":50.53081374, - "price_int":"584950", - "amount_int":"5053081374", - "stamp":"1328551019169991" - }, - { - "price":5.8498, - "amount":25, - "price_int":"584980", - "amount_int":"2500000000", - "stamp":"1328632218409628" - }, - { - "price":5.84986, - "amount":1.9425452, - "price_int":"584986", - "amount_int":"194254520", - "stamp":"1328484548684906" - }, - { - "price":5.8499, - "amount":19.9, - "price_int":"584990", - "amount_int":"1990000000", - "stamp":"1328644641087593" - }, - { - "price":5.84997, - "amount":1.76797478, - "price_int":"584997", - "amount_int":"176797478", - "stamp":"1328481188927889" - }, - { - "price":5.84999, - "amount":1034.34957599, - "price_int":"584999", - "amount_int":"103434957599", - "stamp":"1328644644868121" - }, - { - "price":5.85, - "amount":3780.70687634, - "price_int":"585000", - "amount_int":"378070687634", - "stamp":"1328643113554464" - }, - { - "price":5.85054, - "amount":1, - "price_int":"585054", - "amount_int":"100000000", - "stamp":"1328525121799048" - }, - { - "price":5.85055, - "amount":300, - "price_int":"585055", - "amount_int":"30000000000", - "stamp":"1328406340903561" - }, - { - "price":5.851, - "amount":13, - "price_int":"585100", - "amount_int":"1300000000", - "stamp":"1328530813635887" - }, - { - "price":5.85105, - "amount":0.15, - "price_int":"585105", - "amount_int":"15000000", - "stamp":"1328406073384935" - }, - { - "price":5.85299, - "amount":1, - "price_int":"585299", - "amount_int":"100000000", - "stamp":"1328525559226809" - }, - { - "price":5.853, - "amount":40, - "price_int":"585300", - "amount_int":"4000000000", - "stamp":"1328547513200123" - }, - { - "price":5.85307, - "amount":0.79703, - "price_int":"585307", - "amount_int":"79703000", - "stamp":"1328642674348889" - }, - { - "price":5.8534, - "amount":0.35853, - "price_int":"585340", - "amount_int":"35853000", - "stamp":"1328459637372553" - }, - { - "price":5.85341, - "amount":0.12236, - "price_int":"585341", - "amount_int":"12236000", - "stamp":"1328577484941732" - }, - { - "price":5.85343, - "amount":0.15, - "price_int":"585343", - "amount_int":"15000000", - "stamp":"1328417298630811" - }, - { - "price":5.85349, - "amount":0.1829, - "price_int":"585349", - "amount_int":"18290000", - "stamp":"1328488243205633" - }, - { - "price":5.85423, - "amount":0.02038, - "price_int":"585423", - "amount_int":"2038000", - "stamp":"1328487604479800" - }, - { - "price":5.855, - "amount":0.01, - "price_int":"585500", - "amount_int":"1000000", - "stamp":"1328490751424861" - }, - { - "price":5.8553, - "amount":1.30596, - "price_int":"585530", - "amount_int":"130596000", - "stamp":"1328570939985617" - }, - { - "price":5.85533, - "amount":1.01, - "price_int":"585533", - "amount_int":"101000000", - "stamp":"1328486452444344" - }, - { - "price":5.85672, - "amount":1.16561208, - "price_int":"585672", - "amount_int":"116561208", - "stamp":"1328623565692134" - }, - { - "price":5.8571, - "amount":0.15, - "price_int":"585710", - "amount_int":"15000000", - "stamp":"1328410679557959" - }, - { - "price":5.85836, - "amount":1.58798, - "price_int":"585836", - "amount_int":"158798000", - "stamp":"1328572181932400" - }, - { - "price":5.85867, - "amount":0.09837, - "price_int":"585867", - "amount_int":"9837000", - "stamp":"1328459092992579" - }, - { - "price":5.85925, - "amount":1.33, - "price_int":"585925", - "amount_int":"133000000", - "stamp":"1328641182900804" - }, - { - "price":5.85932, - "amount":3.84168, - "price_int":"585932", - "amount_int":"384168000", - "stamp":"1328459396085597" - }, - { - "price":5.85967, - "amount":0.1, - "price_int":"585967", - "amount_int":"10000000", - "stamp":"1328428905639274" - }, - { - "price":5.85999, - "amount":1.314854, - "price_int":"585999", - "amount_int":"131485400", - "stamp":"1328524577032041" - }, - { - "price":5.86, - "amount":7.6020162, - "price_int":"586000", - "amount_int":"760201620", - "stamp":"1328512488267137" - }, - { - "price":5.862, - "amount":0.2335, - "price_int":"586200", - "amount_int":"23350000", - "stamp":"1328483236560060" - }, - { - "price":5.8625, - "amount":0.1, - "price_int":"586250", - "amount_int":"10000000", - "stamp":"1328566176820529" - }, - { - "price":5.863, - "amount":0.2084, - "price_int":"586300", - "amount_int":"20840000", - "stamp":"1328442115786911" - }, - { - "price":5.86307, - "amount":0.17248, - "price_int":"586307", - "amount_int":"17248000", - "stamp":"1328620001704110" - }, - { - "price":5.86319, - "amount":1.10041229, - "price_int":"586319", - "amount_int":"110041229", - "stamp":"1328481190427205" - }, - { - "price":5.8632, - "amount":300, - "price_int":"586320", - "amount_int":"30000000000", - "stamp":"1328426088727955" - }, - { - "price":5.86371, - "amount":0.04159, - "price_int":"586371", - "amount_int":"4159000", - "stamp":"1328568857111636" - }, - { - "price":5.8641, - "amount":0.52949275, - "price_int":"586410", - "amount_int":"52949275", - "stamp":"1328450456709500" - }, - { - "price":5.865, - "amount":0.01, - "price_int":"586500", - "amount_int":"1000000", - "stamp":"1328490748002110" - }, - { - "price":5.86714, - "amount":0.2418, - "price_int":"586714", - "amount_int":"24180000", - "stamp":"1328581696789646" - }, - { - "price":5.8677, - "amount":0.01, - "price_int":"586770", - "amount_int":"1000000", - "stamp":"1328406293357985" - }, - { - "price":5.86799, - "amount":1, - "price_int":"586799", - "amount_int":"100000000", - "stamp":"1328525566544234" - }, - { - "price":5.869, - "amount":1.08, - "price_int":"586900", - "amount_int":"108000000", - "stamp":"1328644370541526" - }, - { - "price":5.8693, - "amount":0.06748, - "price_int":"586930", - "amount_int":"6748000", - "stamp":"1328460449024270" - }, - { - "price":5.86997, - "amount":0.1, - "price_int":"586997", - "amount_int":"10000000", - "stamp":"1328428909610259" - }, - { - "price":5.86999, - "amount":1.3148719, - "price_int":"586999", - "amount_int":"131487190", - "stamp":"1328525137400469" - }, - { - "price":5.87, - "amount":10.0453129, - "price_int":"587000", - "amount_int":"1004531290", - "stamp":"1328615434235920" - }, - { - "price":5.87193, - "amount":0.13798, - "price_int":"587193", - "amount_int":"13798000", - "stamp":"1328643811692761" - }, - { - "price":5.87399, - "amount":2, - "price_int":"587399", - "amount_int":"200000000", - "stamp":"1328541128560727" - }, - { - "price":5.874, - "amount":5.39328183, - "price_int":"587400", - "amount_int":"539328183", - "stamp":"1328406422409195" - }, - { - "price":5.875, - "amount":0.11, - "price_int":"587500", - "amount_int":"11000000", - "stamp":"1328490744024467" - }, - { - "price":5.87519, - "amount":1.85344, - "price_int":"587519", - "amount_int":"185344000", - "stamp":"1328579664675473" - }, - { - "price":5.8788, - "amount":0.52816901, - "price_int":"587880", - "amount_int":"52816901", - "stamp":"1328450455320754" - }, - { - "price":5.87999, - "amount":0.3148471, - "price_int":"587999", - "amount_int":"31484710", - "stamp":"1328405994117551" - }, - { - "price":5.88, - "amount":30.4184454, - "price_int":"588000", - "amount_int":"3041844540", - "stamp":"1328623457326269" - }, - { - "price":5.8802, - "amount":1, - "price_int":"588020", - "amount_int":"100000000", - "stamp":"1328525142184073" - }, - { - "price":5.88021, - "amount":38.28498499, - "price_int":"588021", - "amount_int":"3828498499", - "stamp":"1328386625135706" - }, - { - "price":5.88027, - "amount":0.10233315, - "price_int":"588027", - "amount_int":"10233315", - "stamp":"1328423720202528" - }, - { - "price":5.88194, - "amount":137.26654107, - "price_int":"588194", - "amount_int":"13726654107", - "stamp":"1328635898427381" - }, - { - "price":5.88226, - "amount":0.75817, - "price_int":"588226", - "amount_int":"75817000", - "stamp":"1328571608647411" - }, - { - "price":5.88403, - "amount":1, - "price_int":"588403", - "amount_int":"100000000", - "stamp":"1328470961973348" - }, - { - "price":5.885, - "amount":0.01, - "price_int":"588500", - "amount_int":"1000000", - "stamp":"1328490739792103" - }, - { - "price":5.88598, - "amount":0.995, - "price_int":"588598", - "amount_int":"99500000", - "stamp":"1328400479416883" - }, - { - "price":5.8875, - "amount":0.1, - "price_int":"588750", - "amount_int":"10000000", - "stamp":"1328566478381994" - }, - { - "price":5.8877, - "amount":5, - "price_int":"588770", - "amount_int":"500000000", - "stamp":"1328434511969937" - }, - { - "price":5.8878, - "amount":1.02159007, - "price_int":"588780", - "amount_int":"102159007", - "stamp":"1328429056714494" - }, - { - "price":5.88899, - "amount":2, - "price_int":"588899", - "amount_int":"200000000", - "stamp":"1328553907396229" - }, - { - "price":5.889, - "amount":100, - "price_int":"588900", - "amount_int":"10000000000", - "stamp":"1328458448324994" - }, - { - "price":5.8897, - "amount":3.6218, - "price_int":"588970", - "amount_int":"362180000", - "stamp":"1328458793162381" - }, - { - "price":5.88999, - "amount":0.3144474, - "price_int":"588999", - "amount_int":"31444740", - "stamp":"1328400426129199" - }, - { - "price":5.89, - "amount":13.146552, - "price_int":"589000", - "amount_int":"1314655200", - "stamp":"1328531744665835" - }, - { - "price":5.89057, - "amount":0.10233257, - "price_int":"589057", - "amount_int":"10233257", - "stamp":"1328400413270781" - }, - { - "price":5.8911, - "amount":0.33393, - "price_int":"589110", - "amount_int":"33393000", - "stamp":"1328571546439550" - }, - { - "price":5.89132, - "amount":0.77347, - "price_int":"589132", - "amount_int":"77347000", - "stamp":"1328642285544481" - }, - { - "price":5.89246, - "amount":0.14658683, - "price_int":"589246", - "amount_int":"14658683", - "stamp":"1328403253085882" - }, - { - "price":5.8934, - "amount":0.52685188, - "price_int":"589340", - "amount_int":"52685188", - "stamp":"1328450456252286" - }, - { - "price":5.89463, - "amount":1, - "price_int":"589463", - "amount_int":"100000000", - "stamp":"1328556220595346" - }, - { - "price":5.89484, - "amount":4.5219486, - "price_int":"589484", - "amount_int":"452194860", - "stamp":"1328643181219542" - }, - { - "price":5.895, - "amount":0.2569, - "price_int":"589500", - "amount_int":"25690000", - "stamp":"1328519428394414" - }, - { - "price":5.89531, - "amount":1.021621, - "price_int":"589531", - "amount_int":"102162100", - "stamp":"1328607582379540" - }, - { - "price":5.8968, - "amount":2.449031, - "price_int":"589680", - "amount_int":"244903100", - "stamp":"1328448776308182" - }, - { - "price":5.89689, - "amount":0.70902, - "price_int":"589689", - "amount_int":"70902000", - "stamp":"1328644487432916" - }, - { - "price":5.89843, - "amount":0.18299, - "price_int":"589843", - "amount_int":"18299000", - "stamp":"1328571145395965" - }, - { - "price":5.8989, - "amount":1, - "price_int":"589890", - "amount_int":"100000000", - "stamp":"1328436324085143" - }, - { - "price":5.899, - "amount":5, - "price_int":"589900", - "amount_int":"500000000", - "stamp":"1328547162424153" - }, - { - "price":5.8999, - "amount":9.9, - "price_int":"589990", - "amount_int":"990000000", - "stamp":"1328413300368624" - }, - { - "price":5.89997, - "amount":4.59491062, - "price_int":"589997", - "amount_int":"459491062", - "stamp":"1328481250445943" - }, - { - "price":5.89999, - "amount":2.77252784, - "price_int":"589999", - "amount_int":"277252784", - "stamp":"1328544499975659" - }, - { - "price":5.9, - "amount":776.65242796, - "price_int":"590000", - "amount_int":"77665242796", - "stamp":"1328643083229968" - }, - { - "price":5.90052, - "amount":0.05208, - "price_int":"590052", - "amount_int":"5208000", - "stamp":"1328459249000409" - }, - { - "price":5.90087, - "amount":0.10233199, - "price_int":"590087", - "amount_int":"10233199", - "stamp":"1328400463831423" - }, - { - "price":5.9012, - "amount":0.05207, - "price_int":"590120", - "amount_int":"5207000", - "stamp":"1328458727983348" - }, - { - "price":5.90297, - "amount":0.1, - "price_int":"590297", - "amount_int":"10000000", - "stamp":"1328567365013829" - }, - { - "price":5.90328, - "amount":0.995, - "price_int":"590328", - "amount_int":"99500000", - "stamp":"1328400478821576" - }, - { - "price":5.905, - "amount":0.01, - "price_int":"590500", - "amount_int":"1000000", - "stamp":"1328467778416596" - }, - { - "price":5.90517, - "amount":1.07705936, - "price_int":"590517", - "amount_int":"107705936", - "stamp":"1328644771945827" - }, - { - "price":5.90522, - "amount":0.02501, - "price_int":"590522", - "amount_int":"2501000", - "stamp":"1328458693836527" - }, - { - "price":5.906, - "amount":0.2084, - "price_int":"590600", - "amount_int":"20840000", - "stamp":"1328442122200723" - }, - { - "price":5.907, - "amount":0.2335, - "price_int":"590700", - "amount_int":"23350000", - "stamp":"1328483316697496" - }, - { - "price":5.9072, - "amount":43.01525108, - "price_int":"590720", - "amount_int":"4301525108", - "stamp":"1328644777337825" - }, - { - "price":5.90745, - "amount":0.2777204, - "price_int":"590745", - "amount_int":"27772040", - "stamp":"1328401521803517" - }, - { - "price":5.9083, - "amount":0.23329, - "price_int":"590830", - "amount_int":"23329000", - "stamp":"1328571594358474" - }, - { - "price":5.90868, - "amount":0.0215406, - "price_int":"590868", - "amount_int":"2154060", - "stamp":"1328458050807460" - }, - { - "price":5.90905, - "amount":1.10531229, - "price_int":"590905", - "amount_int":"110531229", - "stamp":"1328481191969158" - }, - { - "price":5.90909, - "amount":300, - "price_int":"590909", - "amount_int":"30000000000", - "stamp":"1328412000686519" - }, - { - "price":5.90999, - "amount":0.3146251, - "price_int":"590999", - "amount_int":"31462510", - "stamp":"1328400418659695" - }, - { - "price":5.91, - "amount":11.0455236, - "price_int":"591000", - "amount_int":"1104552360", - "stamp":"1328578624197113" - }, - { - "price":5.91117, - "amount":0.10233315, - "price_int":"591117", - "amount_int":"10233315", - "stamp":"1328400417189992" - }, - { - "price":5.91219, - "amount":1.39683, - "price_int":"591219", - "amount_int":"139683000", - "stamp":"1328642345982082" - }, - { - "price":5.9125, - "amount":0.1, - "price_int":"591250", - "amount_int":"10000000", - "stamp":"1328566612744604" - }, - { - "price":5.91253, - "amount":0.4056, - "price_int":"591253", - "amount_int":"40560000", - "stamp":"1328459637812176" - }, - { - "price":5.91254, - "amount":0.13729, - "price_int":"591254", - "amount_int":"13729000", - "stamp":"1328577485624129" - }, - { - "price":5.9126, - "amount":1.5, - "price_int":"591260", - "amount_int":"150000000", - "stamp":"1328630270811081" - }, - { - "price":5.91261, - "amount":0.20314, - "price_int":"591261", - "amount_int":"20314000", - "stamp":"1328488243711740" - }, - { - "price":5.91336, - "amount":0.02063, - "price_int":"591336", - "amount_int":"2063000", - "stamp":"1328458507406179" - }, - { - "price":5.91444, - "amount":1.22805, - "price_int":"591444", - "amount_int":"122805000", - "stamp":"1328571994190632" - }, - { - "price":5.91499, - "amount":1, - "price_int":"591499", - "amount_int":"100000000", - "stamp":"1328526375938525" - }, - { - "price":5.915, - "amount":0.01, - "price_int":"591500", - "amount_int":"1000000", - "stamp":"1328467774116537" - }, - { - "price":5.917, - "amount":0.1, - "price_int":"591700", - "amount_int":"10000000", - "stamp":"1328402861283387" - }, - { - "price":5.91754, - "amount":1.47689, - "price_int":"591754", - "amount_int":"147689000", - "stamp":"1328459263716446" - }, - { - "price":5.9178, - "amount":1.02159007, - "price_int":"591780", - "amount_int":"102159007", - "stamp":"1328429056956362" - }, - { - "price":5.91785, - "amount":0.1104, - "price_int":"591785", - "amount_int":"11040000", - "stamp":"1328459093577010" - }, - { - "price":5.9185, - "amount":3.55016, - "price_int":"591850", - "amount_int":"355016000", - "stamp":"1328571026913394" - }, - { - "price":5.91999, - "amount":1.3149791, - "price_int":"591999", - "amount_int":"131497910", - "stamp":"1328519592554515" - }, - { - "price":5.92, - "amount":17.90334899, - "price_int":"592000", - "amount_int":"1790334899", - "stamp":"1328467609769141" - }, - { - "price":5.9202, - "amount":0.52447552, - "price_int":"592020", - "amount_int":"52447552", - "stamp":"1328449682837235" - }, - { - "price":5.92073, - "amount":31.24, - "price_int":"592073", - "amount_int":"3124000000", - "stamp":"1328566449425018" - }, - { - "price":5.921, - "amount":12, - "price_int":"592100", - "amount_int":"1200000000", - "stamp":"1328567842333317" - }, - { - "price":5.92147, - "amount":0.10233257, - "price_int":"592147", - "amount_int":"10233257", - "stamp":"1328400455792898" - }, - { - "price":5.92205, - "amount":0.0215453, - "price_int":"592205", - "amount_int":"2154530", - "stamp":"1328456936394083" - }, - { - "price":5.92229, - "amount":0.20825, - "price_int":"592229", - "amount_int":"20825000", - "stamp":"1328620002132455" - }, - { - "price":5.92294, - "amount":0.04692, - "price_int":"592294", - "amount_int":"4692000", - "stamp":"1328568857554101" - }, - { - "price":5.923, - "amount":1.2935, - "price_int":"592300", - "amount_int":"129350000", - "stamp":"1328644400821171" - }, - { - "price":5.9245, - "amount":91.3154005, - "price_int":"592450", - "amount_int":"9131540050", - "stamp":"1328643621085178" - }, - { - "price":5.925, - "amount":0.11, - "price_int":"592500", - "amount_int":"11000000", - "stamp":"1328479366585855" - }, - { - "price":5.9264, - "amount":0.2323, - "price_int":"592640", - "amount_int":"23230000", - "stamp":"1328580054706228" - }, - { - "price":5.92859, - "amount":0.07737, - "price_int":"592859", - "amount_int":"7737000", - "stamp":"1328460449443766" - }, - { - "price":5.92999, - "amount":2.47871206, - "price_int":"592999", - "amount_int":"247871206", - "stamp":"1328481192438812" - }, - { - "price":5.93, - "amount":775.00569393, - "price_int":"593000", - "amount_int":"77500569393", - "stamp":"1328467612397285" - }, - { - "price":5.93176, - "amount":2.88497004, - "price_int":"593176", - "amount_int":"288497004", - "stamp":"1328425138847523" - }, - { - "price":5.93177, - "amount":0.102332, - "price_int":"593177", - "amount_int":"10233200", - "stamp":"1328400459848000" - }, - { - "price":5.932, - "amount":1.01, - "price_int":"593200", - "amount_int":"101000000", - "stamp":"1328412632567698" - }, - { - "price":5.93454, - "amount":1.81977, - "price_int":"593454", - "amount_int":"181977000", - "stamp":"1328458878731197" - }, - { - "price":5.93499, - "amount":1, - "price_int":"593499", - "amount_int":"100000000", - "stamp":"1328525157607212" - }, - { - "price":5.935, - "amount":10.2435, - "price_int":"593500", - "amount_int":"1024350000", - "stamp":"1328483250012144" - }, - { - "price":5.9354, - "amount":5, - "price_int":"593540", - "amount_int":"500000000", - "stamp":"1328470823841871" - }, - { - "price":5.93541, - "amount":0.0215538, - "price_int":"593541", - "amount_int":"2155380", - "stamp":"1328445773041879" - }, - { - "price":5.9375, - "amount":0.1, - "price_int":"593750", - "amount_int":"10000000", - "stamp":"1328566631231238" - }, - { - "price":5.93753, - "amount":0.05, - "price_int":"593753", - "amount_int":"5000000", - "stamp":"1328644739163297" - }, - { - "price":5.93998, - "amount":1, - "price_int":"593998", - "amount_int":"100000000", - "stamp":"1328525160963881" - }, - { - "price":5.93999, - "amount":11.39913847, - "price_int":"593999", - "amount_int":"1139913847", - "stamp":"1328447309059398" - }, - { - "price":5.94, - "amount":21.045042, - "price_int":"594000", - "amount_int":"2104504200", - "stamp":"1328614065166488" - }, - { - "price":5.94064, - "amount":0.0201986, - "price_int":"594064", - "amount_int":"2019860", - "stamp":"1328620452104428" - }, - { - "price":5.94168, - "amount":0.83875, - "price_int":"594168", - "amount_int":"83875000", - "stamp":"1328571609167803" - }, - { - "price":5.94207, - "amount":0.10233315, - "price_int":"594207", - "amount_int":"10233315", - "stamp":"1328400430666268" - }, - { - "price":5.94256, - "amount":1.42963, - "price_int":"594256", - "amount_int":"142963000", - "stamp":"1328530341986560" - }, - { - "price":5.943, - "amount":0.9108, - "price_int":"594300", - "amount_int":"91080000", - "stamp":"1328401034047509" - }, - { - "price":5.94315, - "amount":4, - "price_int":"594315", - "amount_int":"400000000", - "stamp":"1328466388038993" - }, - { - "price":5.944, - "amount":175.15493629, - "price_int":"594400", - "amount_int":"17515493629", - "stamp":"1328621534368274" - }, - { - "price":5.94444, - "amount":1.10841229, - "price_int":"594444", - "amount_int":"110841229", - "stamp":"1328481192953807" - }, - { - "price":5.94447, - "amount":300, - "price_int":"594447", - "amount_int":"30000000000", - "stamp":"1328389642234833" - }, - { - "price":5.945, - "amount":0.01, - "price_int":"594500", - "amount_int":"1000000", - "stamp":"1328467754056806" - }, - { - "price":5.9472, - "amount":0.83, - "price_int":"594720", - "amount_int":"83000000", - "stamp":"1328443284505249" - }, - { - "price":5.94799, - "amount":1, - "price_int":"594799", - "amount_int":"100000000", - "stamp":"1328525165592263" - }, - { - "price":5.94875, - "amount":0.01, - "price_int":"594875", - "amount_int":"1000000", - "stamp":"1328400870152082" - }, - { - "price":5.94878, - "amount":50.0215635, - "price_int":"594878", - "amount_int":"5002156350", - "stamp":"1328524006418097" - }, - { - "price":5.94919, - "amount":4.04352, - "price_int":"594919", - "amount_int":"404352000", - "stamp":"1328458793648233" - }, - { - "price":5.94999, - "amount":2.95568094, - "price_int":"594999", - "amount_int":"295568094", - "stamp":"1328481193455472" - }, - { - "price":5.95, - "amount":828.58546821, - "price_int":"595000", - "amount_int":"82858546821", - "stamp":"1328613346466934" - }, - { - "price":5.95061, - "amount":0.36819, - "price_int":"595061", - "amount_int":"36819000", - "stamp":"1328571547173746" - }, - { - "price":5.95082, - "amount":0.94105, - "price_int":"595082", - "amount_int":"94105000", - "stamp":"1328642285989533" - }, - { - "price":5.951, - "amount":5, - "price_int":"595100", - "amount_int":"500000000", - "stamp":"1328643546762645" - }, - { - "price":5.95121, - "amount":1, - "price_int":"595121", - "amount_int":"100000000", - "stamp":"1328525596868841" - }, - { - "price":5.95237, - "amount":0.10233258, - "price_int":"595237", - "amount_int":"10233258", - "stamp":"1328400442692096" - }, - { - "price":5.95273, - "amount":5.5, - "price_int":"595273", - "amount_int":"550000000", - "stamp":"1328439780820079" - }, - { - "price":5.95499, - "amount":1, - "price_int":"595499", - "amount_int":"100000000", - "stamp":"1328525171234410" - }, - { - "price":5.955, - "amount":0.01, - "price_int":"595500", - "amount_int":"1000000", - "stamp":"1328467747938124" - }, - { - "price":5.9555, - "amount":1, - "price_int":"595550", - "amount_int":"100000000", - "stamp":"1328485626932601" - }, - { - "price":5.95589, - "amount":1, - "price_int":"595589", - "amount_int":"100000000", - "stamp":"1328526395270719" - }, - { - "price":5.9559, - "amount":71.95204356, - "price_int":"595590", - "amount_int":"7195204356", - "stamp":"1328390331528887" - }, - { - "price":5.956, - "amount":151.63576357, - "price_int":"595600", - "amount_int":"15163576357", - "stamp":"1328397254975862" - }, - { - "price":5.9567, - "amount":20, - "price_int":"595670", - "amount_int":"2000000000", - "stamp":"1328404209026322" - }, - { - "price":5.95678, - "amount":0.0201049, - "price_int":"595678", - "amount_int":"2010490", - "stamp":"1328456957329082" - }, - { - "price":5.95756, - "amount":0.81741, - "price_int":"595756", - "amount_int":"81741000", - "stamp":"1328644487898452" - }, - { - "price":5.95801, - "amount":0.21539, - "price_int":"595801", - "amount_int":"21539000", - "stamp":"1328573389636622" - }, - { - "price":5.95885, - "amount":1.33, - "price_int":"595885", - "amount_int":"133000000", - "stamp":"1328641183659796" - }, - { - "price":5.95989, - "amount":2, - "price_int":"595989", - "amount_int":"200000000", - "stamp":"1328611216559035" - }, - { - "price":5.95999, - "amount":26.0407207, - "price_int":"595999", - "amount_int":"2604072070", - "stamp":"1328470398549609" - }, - { - "price":5.96, - "amount":76.8066686, - "price_int":"596000", - "amount_int":"7680666860", - "stamp":"1328467620033821" - }, - { - "price":5.96012, - "amount":0.05907, - "price_int":"596012", - "amount_int":"5907000", - "stamp":"1328487651883698" - }, - { - "price":5.9602, - "amount":6, - "price_int":"596020", - "amount_int":"600000000", - "stamp":"1328463809677276" - }, - { - "price":5.96081, - "amount":0.05944, - "price_int":"596081", - "amount_int":"5944000", - "stamp":"1328458728430792" - }, - { - "price":5.96084, - "amount":0.05556413, - "price_int":"596084", - "amount_int":"5556413", - "stamp":"1328424142020495" - }, - { - "price":5.96215, - "amount":0.0215724, - "price_int":"596215", - "amount_int":"2157240", - "stamp":"1328445767161350" - }, - { - "price":5.9625, - "amount":0.1, - "price_int":"596250", - "amount_int":"10000000", - "stamp":"1328566673407265" - }, - { - "price":5.96267, - "amount":0.102332, - "price_int":"596267", - "amount_int":"10233200", - "stamp":"1328400438703598" - }, - { - "price":5.96377, - "amount":0.1651264, - "price_int":"596377", - "amount_int":"16512640", - "stamp":"1328615072277553" - }, - { - "price":5.96487, - "amount":0.02531, - "price_int":"596487", - "amount_int":"2531000", - "stamp":"1328457321177364" - }, - { - "price":5.96499, - "amount":1, - "price_int":"596499", - "amount_int":"100000000", - "stamp":"1328525605668401" - }, - { - "price":5.965, - "amount":0.01, - "price_int":"596500", - "amount_int":"1000000", - "stamp":"1328467741166406" - }, - { - "price":5.96798, - "amount":0.25595, - "price_int":"596798", - "amount_int":"25595000", - "stamp":"1328571594955311" - }, - { - "price":5.96855, - "amount":0.18508, - "price_int":"596855", - "amount_int":"18508000", - "stamp":"1328464899772354" - }, - { - "price":5.9696, - "amount":2.498885, - "price_int":"596960", - "amount_int":"249888500", - "stamp":"1328400724080827" - }, - { - "price":5.96999, - "amount":1.3158143, - "price_int":"596999", - "amount_int":"131581430", - "stamp":"1328524635418052" - }, - { - "price":5.97, - "amount":21.5446488, - "price_int":"597000", - "amount_int":"2154464880", - "stamp":"1328467624061930" - }, - { - "price":5.97097, - "amount":0.77, - "price_int":"597097", - "amount_int":"77000000", - "stamp":"1328411743587872" - }, - { - "price":5.97225, - "amount":0.45219, - "price_int":"597225", - "amount_int":"45219000", - "stamp":"1328459638252464" - }, - { - "price":5.97226, - "amount":0.17354, - "price_int":"597226", - "amount_int":"17354000", - "stamp":"1328579420658336" - }, - { - "price":5.97234, - "amount":0.22318, - "price_int":"597234", - "amount_int":"22318000", - "stamp":"1328488244236618" - }, - { - "price":5.97292, - "amount":20.0201057, - "price_int":"597292", - "amount_int":"2002010570", - "stamp":"1328640871947902" - }, - { - "price":5.97297, - "amount":0.10233316, - "price_int":"597297", - "amount_int":"10233316", - "stamp":"1328400421634388" - }, - { - "price":5.97309, - "amount":0.02106, - "price_int":"597309", - "amount_int":"2106000", - "stamp":"1328458149447035" - }, - { - "price":5.974, - "amount":5.55, - "price_int":"597400", - "amount_int":"555000000", - "stamp":"1328418946503383" - }, - { - "price":5.97409, - "amount":1.06, - "price_int":"597409", - "amount_int":"106000000", - "stamp":"1328418953799002" - }, - { - "price":5.97418, - "amount":1.51655, - "price_int":"597418", - "amount_int":"151655000", - "stamp":"1328570940483560" - }, - { - "price":5.975, - "amount":1.23, - "price_int":"597500", - "amount_int":"123000000", - "stamp":"1328644425216947" - }, - { - "price":5.97552, - "amount":0.02158, - "price_int":"597552", - "amount_int":"2158000", - "stamp":"1328445763648861" - }, - { - "price":5.97731, - "amount":1.83081, - "price_int":"597731", - "amount_int":"183081000", - "stamp":"1328487925747820" - }, - { - "price":5.97762, - "amount":0.12232, - "price_int":"597762", - "amount_int":"12232000", - "stamp":"1328459094917056" - }, - { - "price":5.97776, - "amount":1, - "price_int":"597776", - "amount_int":"100000000", - "stamp":"1328525187205070" - }, - { - "price":5.978, - "amount":0.3335, - "price_int":"597800", - "amount_int":"33350000", - "stamp":"1328483256275070" - }, - { - "price":5.97828, - "amount":4.347, - "price_int":"597828", - "amount_int":"434700000", - "stamp":"1328572964267896" - }, - { - "price":5.97885, - "amount":1.05450435, - "price_int":"597885", - "amount_int":"105450435", - "stamp":"1328594213233494" - }, - { - "price":5.97989, - "amount":1, - "price_int":"597989", - "amount_int":"100000000", - "stamp":"1328611232392616" - }, - { - "price":5.97999, - "amount":3.3158681, - "price_int":"597999", - "amount_int":"331586810", - "stamp":"1328404629195820" - }, - { - "price":5.98, - "amount":312.13261575, - "price_int":"598000", - "amount_int":"31213261575", - "stamp":"1328634022369235" - }, - { - "price":5.98199, - "amount":3.57419538, - "price_int":"598199", - "amount_int":"357419538", - "stamp":"1328411860689069" - }, - { - "price":5.98211, - "amount":0.24367, - "price_int":"598211", - "amount_int":"24367000", - "stamp":"1328620002581566" - }, - { - "price":5.98222, - "amount":4, - "price_int":"598222", - "amount_int":"400000000", - "stamp":"1328361622742741" - }, - { - "price":5.98277, - "amount":0.0522, - "price_int":"598277", - "amount_int":"5220000", - "stamp":"1328568858008437" - }, - { - "price":5.983, - "amount":7.99, - "price_int":"598300", - "amount_int":"799000000", - "stamp":"1328435702115626" - }, - { - "price":5.98301, - "amount":1.26, - "price_int":"598301", - "amount_int":"126000000", - "stamp":"1328394463533252" - }, - { - "price":5.98327, - "amount":0.10233258, - "price_int":"598327", - "amount_int":"10233258", - "stamp":"1328400426134146" - }, - { - "price":5.98411, - "amount":1, - "price_int":"598411", - "amount_int":"100000000", - "stamp":"1328394861696872" - }, - { - "price":5.98419, - "amount":7.4, - "price_int":"598419", - "amount_int":"740000000", - "stamp":"1328435318040596" - }, - { - "price":5.985, - "amount":65.54, - "price_int":"598500", - "amount_int":"6554000000", - "stamp":"1328644202788646" - }, - { - "price":5.98689, - "amount":1, - "price_int":"598689", - "amount_int":"100000000", - "stamp":"1328519621949632" - }, - { - "price":5.9869, - "amount":125, - "price_int":"598690", - "amount_int":"12500000000", - "stamp":"1328427790028353" - }, - { - "price":5.9875, - "amount":0.1, - "price_int":"598750", - "amount_int":"10000000", - "stamp":"1328566710420257" - }, - { - "price":5.98799, - "amount":1, - "price_int":"598799", - "amount_int":"100000000", - "stamp":"1328525615494751" - }, - { - "price":5.988, - "amount":13.3297388, - "price_int":"598800", - "amount_int":"1332973880", - "stamp":"1328402614813451" - }, - { - "price":5.98847, - "amount":0.08717, - "price_int":"598847", - "amount_int":"8717000", - "stamp":"1328460450094771" - }, - { - "price":5.98887, - "amount":1, - "price_int":"598887", - "amount_int":"100000000", - "stamp":"1328525193586141" - }, - { - "price":5.98889, - "amount":0.0215818, - "price_int":"598889", - "amount_int":"2158180", - "stamp":"1328436850376545" - }, - { - "price":5.989, - "amount":116, - "price_int":"598900", - "amount_int":"11600000000", - "stamp":"1328628884553163" - }, - { - "price":5.98907, - "amount":0.0201057, - "price_int":"598907", - "amount_int":"2010570", - "stamp":"1328456943361563" - }, - { - "price":5.98927, - "amount":0.01, - "price_int":"598927", - "amount_int":"1000000", - "stamp":"1328308487143165" - }, - { - "price":5.98989, - "amount":2, - "price_int":"598989", - "amount_int":"200000000", - "stamp":"1328611202017275" - }, - { - "price":5.9899, - "amount":22.45482, - "price_int":"598990", - "amount_int":"2245482000", - "stamp":"1328374456276881" - }, - { - "price":5.98991, - "amount":6.96, - "price_int":"598991", - "amount_int":"696000000", - "stamp":"1328470590298814" - }, - { - "price":5.98999, - "amount":4.56811671, - "price_int":"598999", - "amount_int":"456811671", - "stamp":"1328512899563264" - }, - { - "price":5.99, - "amount":367.2785943, - "price_int":"599000", - "amount_int":"36727859430", - "stamp":"1328643575194688" - }, - { - "price":5.99357, - "amount":0.10233201, - "price_int":"599357", - "amount_int":"10233201", - "stamp":"1328400434791837" - }, - { - "price":5.99448, - "amount":2.16971, - "price_int":"599448", - "amount_int":"216971000", - "stamp":"1328488263907989" - }, - { - "price":5.99498, - "amount":1.08914349, - "price_int":"599498", - "amount_int":"108914349", - "stamp":"1328481193940029" - }, - { - "price":5.995, - "amount":274.22104652, - "price_int":"599500", - "amount_int":"27422104652", - "stamp":"1328558188482374" - }, - { - "price":5.99511, - "amount":0.3, - "price_int":"599511", - "amount_int":"30000000", - "stamp":"1328359389567008" - }, - { - "price":5.99566, - "amount":1, - "price_int":"599566", - "amount_int":"100000000", - "stamp":"1328525200748330" - }, - { - "price":5.99567, - "amount":774.80313252, - "price_int":"599567", - "amount_int":"77480313252", - "stamp":"1328515429704403" - }, - { - "price":5.99588, - "amount":5, - "price_int":"599588", - "amount_int":"500000000", - "stamp":"1328643130571362" - }, - { - "price":5.998, - "amount":10, - "price_int":"599800", - "amount_int":"1000000000", - "stamp":"1328481022062915" - }, - { - "price":5.99867, - "amount":0.995, - "price_int":"599867", - "amount_int":"99500000", - "stamp":"1328318069134691" - }, - { - "price":5.9988, - "amount":1.0569, - "price_int":"599880", - "amount_int":"105690000", - "stamp":"1328280751951509" - }, - { - "price":5.99899, - "amount":1, - "price_int":"599899", - "amount_int":"100000000", - "stamp":"1328525625716562" - }, - { - "price":5.999, - "amount":10.83, - "price_int":"599900", - "amount_int":"1083000000", - "stamp":"1328462267267355" - }, - { - "price":5.9991, - "amount":7.5, - "price_int":"599910", - "amount_int":"750000000", - "stamp":"1328578524707824" - }, - { - "price":5.9994, - "amount":0.00555441, - "price_int":"599940", - "amount_int":"555441", - "stamp":"1328260892640335" - }, - { - "price":5.99989, - "amount":1, - "price_int":"599989", - "amount_int":"100000000", - "stamp":"1328611236370748" - }, - { - "price":5.9999, - "amount":19.9, - "price_int":"599990", - "amount_int":"1990000000", - "stamp":"1328451563669150" - }, - { - "price":5.99995, - "amount":12.4995, - "price_int":"599995", - "amount_int":"1249950000", - "stamp":"1328290845266240" - }, - { - "price":5.99999, - "amount":15.3161115, - "price_int":"599999", - "amount_int":"1531611150", - "stamp":"1328430716953276" - }, - { - "price":6, - "amount":2593.0093048, - "price_int":"600000", - "amount_int":"259300930480", - "stamp":"1328644614309055" - }, - { - "price":6.00052, - "amount":16.44478, - "price_int":"600052", - "amount_int":"1644478000", - "stamp":"1328487687430370" - }, - { - "price":6.00092, - "amount":199.14, - "price_int":"600092", - "amount_int":"19914000000", - "stamp":"1328642700573101" - }, - { - "price":6.001, - "amount":0.31, - "price_int":"600100", - "amount_int":"31000000", - "stamp":"1328519586743551" - }, - { - "price":6.0017, - "amount":0.84133, - "price_int":"600170", - "amount_int":"84133000", - "stamp":"1328571304489627" - }, - { - "price":6.00225, - "amount":0.0215862, - "price_int":"600225", - "amount_int":"2158620", - "stamp":"1328435485706200" - }, - { - "price":6.0026, - "amount":1, - "price_int":"600260", - "amount_int":"100000000", - "stamp":"1328525215055221" - }, - { - "price":6.00387, - "amount":0.10472122, - "price_int":"600387", - "amount_int":"10472122", - "stamp":"1328400409255344" - }, - { - "price":6.005, - "amount":0.01, - "price_int":"600500", - "amount_int":"1000000", - "stamp":"1328296486432455" - }, - { - "price":6.00521, - "amount":0.0201065, - "price_int":"600521", - "amount_int":"2010650", - "stamp":"1328456910835047" - }, - { - "price":6.006, - "amount":0.2084, - "price_int":"600600", - "amount_int":"20840000", - "stamp":"1328442134152710" - }, - { - "price":6.00699, - "amount":0.0123256, - "price_int":"600699", - "amount_int":"1232560", - "stamp":"1328284857002280" - }, - { - "price":6.00863, - "amount":0.28324218, - "price_int":"600863", - "amount_int":"28324218", - "stamp":"1328262286467708" - }, - { - "price":6.00928, - "amount":4.8842, - "price_int":"600928", - "amount_int":"488420000", - "stamp":"1328570521642976" - }, - { - "price":6.00999, - "amount":1.3163944, - "price_int":"600999", - "amount_int":"131639440", - "stamp":"1328525218971631" - }, - { - "price":6.01, - "amount":15.1046234, - "price_int":"601000", - "amount_int":"1510462340", - "stamp":"1328507248088923" - }, - { - "price":6.01001, - "amount":2.22656, - "price_int":"601001", - "amount_int":"222656000", - "stamp":"1328465153906036" - }, - { - "price":6.01072, - "amount":0.40211, - "price_int":"601072", - "amount_int":"40211000", - "stamp":"1328571547686463" - }, - { - "price":6.01093, - "amount":1.10695, - "price_int":"601093", - "amount_int":"110695000", - "stamp":"1328642286436570" - }, - { - "price":6.0125, - "amount":24.9625, - "price_int":"601250", - "amount_int":"2496250000", - "stamp":"1328567621273235" - }, - { - "price":6.01298, - "amount":1.28978412, - "price_int":"601298", - "amount_int":"128978412", - "stamp":"1328481194947726" - }, - { - "price":6.013, - "amount":34.656, - "price_int":"601300", - "amount_int":"3465600000", - "stamp":"1328462954178542" - }, - { - "price":6.01349, - "amount":1, - "price_int":"601349", - "amount_int":"100000000", - "stamp":"1328525642792336" - }, - { - "price":6.0135, - "amount":37, - "price_int":"601350", - "amount_int":"3700000000", - "stamp":"1328462971032434" - }, - { - "price":6.01372, - "amount":0.995, - "price_int":"601372", - "amount_int":"99500000", - "stamp":"1328287229223824" - }, - { - "price":6.01377, - "amount":2, - "price_int":"601377", - "amount_int":"200000000", - "stamp":"1328526893643423" - }, - { - "price":6.0138, - "amount":23, - "price_int":"601380", - "amount_int":"2300000000", - "stamp":"1328462983976742" - }, - { - "price":6.014, - "amount":40.1767, - "price_int":"601400", - "amount_int":"4017670000", - "stamp":"1328462993430044" - }, - { - "price":6.01405, - "amount":2, - "price_int":"601405", - "amount_int":"200000000", - "stamp":"1328526901739799" - }, - { - "price":6.01417, - "amount":0.10471998, - "price_int":"601417", - "amount_int":"10471998", - "stamp":"1328400451474816" - }, - { - "price":6.0142, - "amount":33, - "price_int":"601420", - "amount_int":"3300000000", - "stamp":"1328463012221338" - }, - { - "price":6.0144, - "amount":37, - "price_int":"601440", - "amount_int":"3700000000", - "stamp":"1328463031480216" - }, - { - "price":6.0146, - "amount":30, - "price_int":"601460", - "amount_int":"3000000000", - "stamp":"1328463047249896" - }, - { - "price":6.0148, - "amount":25, - "price_int":"601480", - "amount_int":"2500000000", - "stamp":"1328463062827645" - }, - { - "price":6.0149, - "amount":45, - "price_int":"601490", - "amount_int":"4500000000", - "stamp":"1328463079450579" - }, - { - "price":6.01498, - "amount":30, - "price_int":"601498", - "amount_int":"3000000000", - "stamp":"1328463096032446" - }, - { - "price":6.015, - "amount":0.01, - "price_int":"601500", - "amount_int":"1000000", - "stamp":"1328296481163551" - }, - { - "price":6.01531, - "amount":5, - "price_int":"601531", - "amount_int":"500000000", - "stamp":"1328547919784414" - }, - { - "price":6.01562, - "amount":8.8215913, - "price_int":"601562", - "amount_int":"882159130", - "stamp":"1328637295009051" - }, - { - "price":6.016, - "amount":1.1, - "price_int":"601600", - "amount_int":"110000000", - "stamp":"1328644459170785" - }, - { - "price":6.01819, - "amount":0.23981, - "price_int":"601819", - "amount_int":"23981000", - "stamp":"1328578337644238" - }, - { - "price":6.01997, - "amount":37.653312, - "price_int":"601997", - "amount_int":"3765331200", - "stamp":"1328256903584598" - }, - { - "price":6.01999, - "amount":3.3167418, - "price_int":"601999", - "amount_int":"331674180", - "stamp":"1328605840951216" - }, - { - "price":6.02, - "amount":0.0647295, - "price_int":"602000", - "amount_int":"6472950", - "stamp":"1328265035766706" - }, - { - "price":6.02032, - "amount":0.05761, - "price_int":"602032", - "amount_int":"5761000", - "stamp":"1328458595111341" - }, - { - "price":6.021, - "amount":0.5, - "price_int":"602100", - "amount_int":"50000000", - "stamp":"1328567748977375" - }, - { - "price":6.02102, - "amount":0.07232, - "price_int":"602102", - "amount_int":"7232000", - "stamp":"1328459044407116" - }, - { - "price":6.0211, - "amount":1, - "price_int":"602110", - "amount_int":"100000000", - "stamp":"1328525649372116" - }, - { - "price":6.02135, - "amount":0.0201601, - "price_int":"602135", - "amount_int":"2016010", - "stamp":"1328456870293259" - }, - { - "price":6.02376, - "amount":0.995, - "price_int":"602376", - "amount_int":"99500000", - "stamp":"1328257244524810" - }, - { - "price":6.02447, - "amount":0.10471875, - "price_int":"602447", - "amount_int":"10471875", - "stamp":"1328338533110890" - }, - { - "price":6.025, - "amount":0.11, - "price_int":"602500", - "amount_int":"11000000", - "stamp":"1328566966631580" - }, - { - "price":6.02512, - "amount":0.02291, - "price_int":"602512", - "amount_int":"2291000", - "stamp":"1328427941606810" - }, - { - "price":6.02826, - "amount":0.27838, - "price_int":"602826", - "amount_int":"27838000", - "stamp":"1328571595458293" - }, - { - "price":6.02889, - "amount":1, - "price_int":"602889", - "amount_int":"100000000", - "stamp":"1328611225194507" - }, - { - "price":6.02899, - "amount":0.0215994, - "price_int":"602899", - "amount_int":"2159940", - "stamp":"1328428908895413" - }, - { - "price":6.02999, - "amount":0.3171964, - "price_int":"602999", - "amount_int":"31719640", - "stamp":"1328256879677507" - }, - { - "price":6.03, - "amount":0.0646642, - "price_int":"603000", - "amount_int":"6466420", - "stamp":"1328265044683424" - }, - { - "price":6.031, - "amount":0.9945, - "price_int":"603100", - "amount_int":"99450000", - "stamp":"1328258635494282" - }, - { - "price":6.03242, - "amount":2.58972864, - "price_int":"603242", - "amount_int":"258972864", - "stamp":"1328525861748346" - }, - { - "price":6.03258, - "amount":0.49832, - "price_int":"603258", - "amount_int":"49832000", - "stamp":"1328459638699038" - }, - { - "price":6.03259, - "amount":0.18928, - "price_int":"603259", - "amount_int":"18928000", - "stamp":"1328579421159584" - }, - { - "price":6.03266, - "amount":0.24301, - "price_int":"603266", - "amount_int":"24301000", - "stamp":"1328488244856153" - }, - { - "price":6.03342, - "amount":0.02041, - "price_int":"603342", - "amount_int":"2041000", - "stamp":"1328451277464931" - }, - { - "price":6.03453, - "amount":1.56129, - "price_int":"603453", - "amount_int":"156129000", - "stamp":"1328570606636626" - }, - { - "price":6.03477, - "amount":0.10472094, - "price_int":"603477", - "amount_int":"10472094", - "stamp":"1328338528747812" - }, - { - "price":6.035, - "amount":0.2569, - "price_int":"603500", - "amount_int":"25690000", - "stamp":"1328519433872888" - }, - { - "price":6.03636, - "amount":2, - "price_int":"603636", - "amount_int":"200000000", - "stamp":"1328278798756365" - }, - { - "price":6.0375, - "amount":0.1201592, - "price_int":"603750", - "amount_int":"12015920", - "stamp":"1328566778036555" - }, - { - "price":6.03769, - "amount":1.83378, - "price_int":"603769", - "amount_int":"183378000", - "stamp":"1328571160926195" - }, - { - "price":6.038, - "amount":0.13411, - "price_int":"603800", - "amount_int":"13411000", - "stamp":"1328459095497726" - }, - { - "price":6.03848, - "amount":1.233, - "price_int":"603848", - "amount_int":"123300000", - "stamp":"1328414384280832" - }, - { - "price":6.03867, - "amount":4.4334, - "price_int":"603867", - "amount_int":"443340000", - "stamp":"1328572004158791" - }, - { - "price":6.03999, - "amount":1.3176061, - "price_int":"603999", - "amount_int":"131760610", - "stamp":"1328519682921419" - }, - { - "price":6.04, - "amount":202.49098014, - "price_int":"604000", - "amount_int":"20249098014", - "stamp":"1328462864893024" - }, - { - "price":6.04123, - "amount":20, - "price_int":"604123", - "amount_int":"2000000000", - "stamp":"1328644707131857" - }, - { - "price":6.04236, - "amount":0.0216004, - "price_int":"604236", - "amount_int":"2160040", - "stamp":"1328428905426771" - }, - { - "price":6.0424, - "amount":2.4775, - "price_int":"604240", - "amount_int":"247750000", - "stamp":"1328400739089630" - }, - { - "price":6.04254, - "amount":0.27874, - "price_int":"604254", - "amount_int":"27874000", - "stamp":"1328620003016844" - }, - { - "price":6.0432, - "amount":0.05743, - "price_int":"604320", - "amount_int":"5743000", - "stamp":"1328568858452501" - }, - { - "price":6.04377, - "amount":2, - "price_int":"604377", - "amount_int":"200000000", - "stamp":"1328361402845669" - }, - { - "price":6.044, - "amount":0.1767, - "price_int":"604400", - "amount_int":"17670000", - "stamp":"1328258480409658" - }, - { - "price":6.045, - "amount":4.01, - "price_int":"604500", - "amount_int":"401000000", - "stamp":"1328345526707658" - }, - { - "price":6.04503, - "amount":0.0212, - "price_int":"604503", - "amount_int":"2120000", - "stamp":"1328438902046049" - }, - { - "price":6.04507, - "amount":0.10471971, - "price_int":"604507", - "amount_int":"10471971", - "stamp":"1328315898615695" - }, - { - "price":6.04555, - "amount":10, - "price_int":"604555", - "amount_int":"1000000000", - "stamp":"1328474123805265" - }, - { - "price":6.04887, - "amount":5, - "price_int":"604887", - "amount_int":"500000000", - "stamp":"1328611392636987" - }, - { - "price":6.04896, - "amount":0.09686, - "price_int":"604896", - "amount_int":"9686000", - "stamp":"1328460450502396" - }, - { - "price":6.0495, - "amount":1.04451434, - "price_int":"604950", - "amount_int":"104451434", - "stamp":"1328630295842109" - }, - { - "price":6.04999, - "amount":1.3179053, - "price_int":"604999", - "amount_int":"131790530", - "stamp":"1328519688564321" - }, - { - "price":6.05, - "amount":822.55599835, - "price_int":"605000", - "amount_int":"82255599835", - "stamp":"1328578037900496" - }, - { - "price":6.0534, - "amount":10.31356, - "price_int":"605340", - "amount_int":"1031356000", - "stamp":"1328237940940343" - }, - { - "price":6.05364, - "amount":0.4201072, - "price_int":"605364", - "amount_int":"42010720", - "stamp":"1328446850910136" - }, - { - "price":6.055, - "amount":6.70692385, - "price_int":"605500", - "amount_int":"670692385", - "stamp":"1328536822551914" - }, - { - "price":6.05503, - "amount":2.08302, - "price_int":"605503", - "amount_int":"208302000", - "stamp":"1328458559856300" - }, - { - "price":6.05537, - "amount":0.10233202, - "price_int":"605537", - "amount_int":"10233202", - "stamp":"1328233348476260" - }, - { - "price":6.05573, - "amount":0.0215981, - "price_int":"605573", - "amount_int":"2159810", - "stamp":"1328428901868589" - }, - { - "price":6.05615, - "amount":4, - "price_int":"605615", - "amount_int":"400000000", - "stamp":"1328526876411335" - }, - { - "price":6.05655, - "amount":1, - "price_int":"605655", - "amount_int":"100000000", - "stamp":"1328519698428975" - }, - { - "price":6.05663, - "amount":1.34, - "price_int":"605663", - "amount_int":"134000000", - "stamp":"1328348765213806" - }, - { - "price":6.05678, - "amount":50, - "price_int":"605678", - "amount_int":"5000000000", - "stamp":"1328380338173278" - }, - { - "price":6.057, - "amount":125, - "price_int":"605700", - "amount_int":"12500000000", - "stamp":"1328483729900066" - }, - { - "price":6.05777, - "amount":19.9999, - "price_int":"605777", - "amount_int":"1999990000", - "stamp":"1328548744500468" - }, - { - "price":6.05887, - "amount":1, - "price_int":"605887", - "amount_int":"100000000", - "stamp":"1328525675029143" - }, - { - "price":6.059, - "amount":30, - "price_int":"605900", - "amount_int":"3000000000", - "stamp":"1328534406207268" - }, - { - "price":6.05917, - "amount":1.27164036, - "price_int":"605917", - "amount_int":"127164036", - "stamp":"1328402662307832" - }, - { - "price":6.05998, - "amount":19.9999, - "price_int":"605998", - "amount_int":"1999990000", - "stamp":"1328548731107345" - }, - { - "price":6.05999, - "amount":20.3179776, - "price_int":"605999", - "amount_int":"2031797760", - "stamp":"1328539328335645" - }, - { - "price":6.06, - "amount":1428.39205835, - "price_int":"606000", - "amount_int":"142839205835", - "stamp":"1328622483161493" - }, - { - "price":6.06015, - "amount":0.12961773, - "price_int":"606015", - "amount_int":"12961773", - "stamp":"1328642722127721" - }, - { - "price":6.0608, - "amount":0.50243355, - "price_int":"606080", - "amount_int":"50243355", - "stamp":"1328254910432766" - }, - { - "price":6.061, - "amount":0.4364, - "price_int":"606100", - "amount_int":"43640000", - "stamp":"1328595122737480" - }, - { - "price":6.06107, - "amount":0.011928, - "price_int":"606107", - "amount_int":"1192800", - "stamp":"1328320859398198" - }, - { - "price":6.0611, - "amount":1, - "price_int":"606110", - "amount_int":"100000000", - "stamp":"1328526466652973" - }, - { - "price":6.06232, - "amount":0.92522, - "price_int":"606232", - "amount_int":"92522000", - "stamp":"1328571305120268" - }, - { - "price":6.0625, - "amount":0.1, - "price_int":"606250", - "amount_int":"10000000", - "stamp":"1328566790846640" - }, - { - "price":6.0626, - "amount":0.02, - "price_int":"606260", - "amount_int":"2000000", - "stamp":"1328337913299041" - }, - { - "price":6.06443, - "amount":1, - "price_int":"606443", - "amount_int":"100000000", - "stamp":"1328525259097986" - }, - { - "price":6.065, - "amount":5.61, - "price_int":"606500", - "amount_int":"561000000", - "stamp":"1328432719299005" - }, - { - "price":6.06554, - "amount":1, - "price_int":"606554", - "amount_int":"100000000", - "stamp":"1328525682232996" - }, - { - "price":6.06567, - "amount":0.10233316, - "price_int":"606567", - "amount_int":"10233316", - "stamp":"1328233352785341" - }, - { - "price":6.06598, - "amount":1.020377, - "price_int":"606598", - "amount_int":"102037700", - "stamp":"1328525684333169" - }, - { - "price":6.06599, - "amount":25.79196582, - "price_int":"606599", - "amount_int":"2579196582", - "stamp":"1328313553791849" - }, - { - "price":6.06779, - "amount":2.51823306, - "price_int":"606779", - "amount_int":"251823306", - "stamp":"1328613156688577" - }, - { - "price":6.06854, - "amount":5.48, - "price_int":"606854", - "amount_int":"548000000", - "stamp":"1328355939624344" - }, - { - "price":6.06877, - "amount":0.73, - "price_int":"606877", - "amount_int":"73000000", - "stamp":"1328371253639933" - }, - { - "price":6.06887, - "amount":1, - "price_int":"606887", - "amount_int":"100000000", - "stamp":"1328525271148354" - }, - { - "price":6.069, - "amount":77, - "price_int":"606900", - "amount_int":"7700000000", - "stamp":"1328550966043901" - }, - { - "price":6.06909, - "amount":0.0215923, - "price_int":"606909", - "amount_int":"2159230", - "stamp":"1328400528094196" - }, - { - "price":6.06996, - "amount":2, - "price_int":"606996", - "amount_int":"200000000", - "stamp":"1328611391100994" - }, - { - "price":6.06998, - "amount":5.71411, - "price_int":"606998", - "amount_int":"571411000", - "stamp":"1328579654490782" - }, - { - "price":6.06999, - "amount":0.3182531, - "price_int":"606999", - "amount_int":"31825310", - "stamp":"1328230069250551" - }, - { - "price":6.07, - "amount":948.898156, - "price_int":"607000", - "amount_int":"94889815600", - "stamp":"1328411998287032" - }, - { - "price":6.0701, - "amount":0.12267502, - "price_int":"607010", - "amount_int":"12267502", - "stamp":"1328644625189908" - }, - { - "price":6.07137, - "amount":1, - "price_int":"607137", - "amount_int":"100000000", - "stamp":"1328519879120377" - }, - { - "price":6.07138, - "amount":2074.76199066, - "price_int":"607138", - "amount_int":"207476199066", - "stamp":"1328357530014495" - }, - { - "price":6.07143, - "amount":0.43568, - "price_int":"607143", - "amount_int":"43568000", - "stamp":"1328571548197696" - }, - { - "price":6.07165, - "amount":1.2712, - "price_int":"607165", - "amount_int":"127120000", - "stamp":"1328642286876454" - }, - { - "price":6.07172, - "amount":0.35, - "price_int":"607172", - "amount_int":"35000000", - "stamp":"1328324128972944" - }, - { - "price":6.07249, - "amount":0.50706476, - "price_int":"607249", - "amount_int":"50706476", - "stamp":"1328321958820828" - }, - { - "price":6.073, - "amount":1.988, - "price_int":"607300", - "amount_int":"198800000", - "stamp":"1328281518992715" - }, - { - "price":6.07305, - "amount":4, - "price_int":"607305", - "amount_int":"400000000", - "stamp":"1328526890651205" - }, - { - "price":6.07345, - "amount":680.85599422, - "price_int":"607345", - "amount_int":"68085599422", - "stamp":"1328342789033607" - }, - { - "price":6.07348, - "amount":1021.04566728, - "price_int":"607348", - "amount_int":"102104566728", - "stamp":"1328340399721662" - }, - { - "price":6.07349, - "amount":12932.48758964, - "price_int":"607349", - "amount_int":"1293248758964", - "stamp":"1328338311290415" - }, - { - "price":6.07444, - "amount":0.0424, - "price_int":"607444", - "amount_int":"4240000", - "stamp":"1328438883878006" - }, - { - "price":6.075, - "amount":0.11, - "price_int":"607500", - "amount_int":"11000000", - "stamp":"1328478600120340" - }, - { - "price":6.07589, - "amount":0.14352818, - "price_int":"607589", - "amount_int":"14352818", - "stamp":"1328644625485411" - }, - { - "price":6.07597, - "amount":0.1, - "price_int":"607597", - "amount_int":"10000000", - "stamp":"1328229993200836" - }, - { - "price":6.0763, - "amount":5.04, - "price_int":"607630", - "amount_int":"504000000", - "stamp":"1328395538100595" - }, - { - "price":6.077, - "amount":9.89, - "price_int":"607700", - "amount_int":"989000000", - "stamp":"1328354527578309" - }, - { - "price":6.07755, - "amount":2.10719892, - "price_int":"607755", - "amount_int":"210719892", - "stamp":"1328549825950896" - }, - { - "price":6.07799, - "amount":1, - "price_int":"607799", - "amount_int":"100000000", - "stamp":"1328526489574957" - }, - { - "price":6.078, - "amount":45, - "price_int":"607800", - "amount_int":"4500000000", - "stamp":"1328256924718051" - }, - { - "price":6.07803, - "amount":0.32, - "price_int":"607803", - "amount_int":"32000000", - "stamp":"1328345159231760" - }, - { - "price":6.07831, - "amount":1, - "price_int":"607831", - "amount_int":"100000000", - "stamp":"1328525286094023" - }, - { - "price":6.07898, - "amount":0.24853, - "price_int":"607898", - "amount_int":"24853000", - "stamp":"1328579330716310" - }, - { - "price":6.07947, - "amount":6, - "price_int":"607947", - "amount_int":"600000000", - "stamp":"1328611213532932" - }, - { - "price":6.07991, - "amount":4.61306169, - "price_int":"607991", - "amount_int":"461306169", - "stamp":"1328519749729362" - }, - { - "price":6.07992, - "amount":1922.57561394, - "price_int":"607992", - "amount_int":"192257561394", - "stamp":"1328253006583415" - }, - { - "price":6.07999, - "amount":0.3185759, - "price_int":"607999", - "amount_int":"31857590", - "stamp":"1328230066081993" - }, - { - "price":6.08, - "amount":1757.94556655, - "price_int":"608000", - "amount_int":"175794556655", - "stamp":"1328483264269259" - }, - { - "price":6.08075, - "amount":57.2208668, - "price_int":"608075", - "amount_int":"5722086680", - "stamp":"1328602991145219" - }, - { - "price":6.08113, - "amount":0.06601, - "price_int":"608113", - "amount_int":"6601000", - "stamp":"1328458919372873" - }, - { - "price":6.08184, - "amount":0.06824, - "price_int":"608184", - "amount_int":"6824000", - "stamp":"1328457355168454" - }, - { - "price":6.08246, - "amount":32.44364261, - "price_int":"608246", - "amount_int":"3244364261", - "stamp":"1328437321059441" - }, - { - "price":6.085, - "amount":0.01, - "price_int":"608500", - "amount_int":"1000000", - "stamp":"1328293956945699" - }, - { - "price":6.08593, - "amount":0.0201441, - "price_int":"608593", - "amount_int":"2014410", - "stamp":"1328428924090600" - }, - { - "price":6.08598, - "amount":0.02602, - "price_int":"608598", - "amount_int":"2602000", - "stamp":"1328427942090152" - }, - { - "price":6.08627, - "amount":0.10233203, - "price_int":"608627", - "amount_int":"10233203", - "stamp":"1328232774625943" - }, - { - "price":6.08638, - "amount":0.34, - "price_int":"608638", - "amount_int":"34000000", - "stamp":"1328367928196358" - }, - { - "price":6.0875, - "amount":0.1, - "price_int":"608750", - "amount_int":"10000000", - "stamp":"1328566808755115" - }, - { - "price":6.08899, - "amount":1, - "price_int":"608899", - "amount_int":"100000000", - "stamp":"1328519893345213" - }, - { - "price":6.089, - "amount":100, - "price_int":"608900", - "amount_int":"10000000000", - "stamp":"1328403353922918" - }, - { - "price":6.08915, - "amount":0.30058, - "price_int":"608915", - "amount_int":"30058000", - "stamp":"1328571595969697" - }, - { - "price":6.08933, - "amount":1.125, - "price_int":"608933", - "amount_int":"112500000", - "stamp":"1328273363704134" - }, - { - "price":6.0899, - "amount":9.9, - "price_int":"608990", - "amount_int":"990000000", - "stamp":"1328451505442844" - }, - { - "price":6.08999, - "amount":1.3188849, - "price_int":"608999", - "amount_int":"131888490", - "stamp":"1328525325201325" - }, - { - "price":6.09, - "amount":137.00348699, - "price_int":"609000", - "amount_int":"13700348699", - "stamp":"1328526397803847" - }, - { - "price":6.09099, - "amount":1, - "price_int":"609099", - "amount_int":"100000000", - "stamp":"1328525707025541" - }, - { - "price":6.091, - "amount":20, - "price_int":"609100", - "amount_int":"2000000000", - "stamp":"1328507262356935" - }, - { - "price":6.09199, - "amount":1, - "price_int":"609199", - "amount_int":"100000000", - "stamp":"1328524700167478" - }, - { - "price":6.09235, - "amount":0.74, - "price_int":"609235", - "amount_int":"74000000", - "stamp":"1328256948425634" - }, - { - "price":6.09351, - "amount":0.54398, - "price_int":"609351", - "amount_int":"54398000", - "stamp":"1328459639137665" - }, - { - "price":6.09353, - "amount":0.20486, - "price_int":"609353", - "amount_int":"20486000", - "stamp":"1328579421673702" - }, - { - "price":6.0936, - "amount":0.26265, - "price_int":"609360", - "amount_int":"26265000", - "stamp":"1328488245378295" - }, - { - "price":6.09436, - "amount":0.02018, - "price_int":"609436", - "amount_int":"2018000", - "stamp":"1328407746981301" - }, - { - "price":6.09453, - "amount":0.020108, - "price_int":"609453", - "amount_int":"2010800", - "stamp":"1328428928058243" - }, - { - "price":6.0948, - "amount":5, - "price_int":"609480", - "amount_int":"500000000", - "stamp":"1328584484695160" - }, - { - "price":6.095, - "amount":0.76, - "price_int":"609500", - "amount_int":"76000000", - "stamp":"1328319893742629" - }, - { - "price":6.09548, - "amount":1.75618, - "price_int":"609548", - "amount_int":"175618000", - "stamp":"1328571359341732" - }, - { - "price":6.09554, - "amount":0.29, - "price_int":"609554", - "amount_int":"29000000", - "stamp":"1328375460635816" - }, - { - "price":6.09576, - "amount":1, - "price_int":"609576", - "amount_int":"100000000", - "stamp":"1328519743291857" - }, - { - "price":6.09577, - "amount":0.61313094, - "price_int":"609577", - "amount_int":"61313094", - "stamp":"1328230237434567" - }, - { - "price":6.09583, - "amount":0.0215024, - "price_int":"609583", - "amount_int":"2150240", - "stamp":"1328400520884122" - }, - { - "price":6.09588, - "amount":5.8, - "price_int":"609588", - "amount_int":"580000000", - "stamp":"1328372177056623" - }, - { - "price":6.09647, - "amount":0.02, - "price_int":"609647", - "amount_int":"2000000", - "stamp":"1328233506633607" - }, - { - "price":6.09657, - "amount":0.10233316, - "price_int":"609657", - "amount_int":"10233316", - "stamp":"1328232770209833" - }, - { - "price":6.09774, - "amount":0.34, - "price_int":"609774", - "amount_int":"34000000", - "stamp":"1328365864832589" - }, - { - "price":6.09799, - "amount":1, - "price_int":"609799", - "amount_int":"100000000", - "stamp":"1328524711138700" - }, - { - "price":6.098, - "amount":510.8376999, - "price_int":"609800", - "amount_int":"51083769990", - "stamp":"1328481787477764" - }, - { - "price":6.09868, - "amount":1.9879, - "price_int":"609868", - "amount_int":"198790000", - "stamp":"1328487729812581" - }, - { - "price":6.09899, - "amount":1.14578, - "price_int":"609899", - "amount_int":"114578000", - "stamp":"1328525723500526" - }, - { - "price":6.09967, - "amount":4.84545, - "price_int":"609967", - "amount_int":"484545000", - "stamp":"1328572004597599" - }, - { - "price":6.09989, - "amount":1, - "price_int":"609989", - "amount_int":"100000000", - "stamp":"1328611226205194" - }, - { - "price":6.0999, - "amount":20, - "price_int":"609990", - "amount_int":"2000000000", - "stamp":"1328490282028121" - }, - { - "price":6.09999, - "amount":5.28074268, - "price_int":"609999", - "amount_int":"528074268", - "stamp":"1328347675177660" - }, - { - "price":6.1, - "amount":876.46981781, - "price_int":"610000", - "amount_int":"87646981781", - "stamp":"1328643318270481" - }, - { - "price":6.10102, - "amount":2, - "price_int":"610102", - "amount_int":"200000000", - "stamp":"1328594257066129" - }, - { - "price":6.10207, - "amount":0.0201514, - "price_int":"610207", - "amount_int":"2015140", - "stamp":"1328423737882229" - }, - { - "price":6.10358, - "amount":0.31345, - "price_int":"610358", - "amount_int":"31345000", - "stamp":"1328620003458045" - }, - { - "price":6.10385, - "amount":0.06372, - "price_int":"610385", - "amount_int":"6372000", - "stamp":"1328438854888685" - }, - { - "price":6.10403, - "amount":0.66, - "price_int":"610403", - "amount_int":"66000000", - "stamp":"1328289304939392" - }, - { - "price":6.10424, - "amount":0.0626, - "price_int":"610424", - "amount_int":"6260000", - "stamp":"1328568858910621" - }, - { - "price":6.10472, - "amount":2.22, - "price_int":"610472", - "amount_int":"222000000", - "stamp":"1328526898672834" - }, - { - "price":6.10498, - "amount":1, - "price_int":"610498", - "amount_int":"100000000", - "stamp":"1328525331843122" - }, - { - "price":6.105, - "amount":0.01, - "price_int":"610500", - "amount_int":"1000000", - "stamp":"1328293971335309" - }, - { - "price":6.10515, - "amount":50, - "price_int":"610515", - "amount_int":"5000000000", - "stamp":"1328466626079638" - }, - { - "price":6.106, - "amount":0.1829, - "price_int":"610600", - "amount_int":"18290000", - "stamp":"1328367207780986" - }, - { - "price":6.10656, - "amount":9.97, - "price_int":"610656", - "amount_int":"997000000", - "stamp":"1328239038849565" - }, - { - "price":6.10687, - "amount":0.1023326, - "price_int":"610687", - "amount_int":"10233260", - "stamp":"1328232754974264" - }, - { - "price":6.1092, - "amount":0.0215433, - "price_int":"610920", - "amount_int":"2154330", - "stamp":"1328400517658876" - }, - { - "price":6.10957, - "amount":2, - "price_int":"610957", - "amount_int":"200000000", - "stamp":"1328526907715224" - }, - { - "price":6.10981, - "amount":0.27026887, - "price_int":"610981", - "amount_int":"27026887", - "stamp":"1328231182536796" - }, - { - "price":6.10988, - "amount":10, - "price_int":"610988", - "amount_int":"1000000000", - "stamp":"1328643130854700" - }, - { - "price":6.10989, - "amount":1, - "price_int":"610989", - "amount_int":"100000000", - "stamp":"1328519897770041" - }, - { - "price":6.1099, - "amount":596.98109338, - "price_int":"610990", - "amount_int":"59698109338", - "stamp":"1328232225579150" - }, - { - "price":6.10999, - "amount":1.0061661, - "price_int":"610999", - "amount_int":"100616610", - "stamp":"1328230023075401" - }, - { - "price":6.11, - "amount":192.58410637, - "price_int":"611000", - "amount_int":"19258410637", - "stamp":"1328497279272298" - }, - { - "price":6.11006, - "amount":0.10646, - "price_int":"611006", - "amount_int":"10646000", - "stamp":"1328460450934129" - }, - { - "price":6.11069, - "amount":0.22, - "price_int":"611069", - "amount_int":"22000000", - "stamp":"1328318205468162" - }, - { - "price":6.11099, - "amount":1, - "price_int":"611099", - "amount_int":"100000000", - "stamp":"1328525349185153" - }, - { - "price":6.111, - "amount":10, - "price_int":"611100", - "amount_int":"1000000000", - "stamp":"1328238762524761" - }, - { - "price":6.11173, - "amount":2.25, - "price_int":"611173", - "amount_int":"225000000", - "stamp":"1328315405348742" - }, - { - "price":6.1125, - "amount":0.1, - "price_int":"611250", - "amount_int":"10000000", - "stamp":"1328567086588460" - }, - { - "price":6.11387, - "amount":1, - "price_int":"611387", - "amount_int":"100000000", - "stamp":"1328525733550345" - }, - { - "price":6.115, - "amount":0.01, - "price_int":"611500", - "amount_int":"1000000", - "stamp":"1328293975980177" - }, - { - "price":6.1152, - "amount":2.6344, - "price_int":"611520", - "amount_int":"263440000", - "stamp":"1328230343422237" - }, - { - "price":6.11558, - "amount":6.69166978, - "price_int":"611558", - "amount_int":"669166978", - "stamp":"1328171386315324" - }, - { - "price":6.116, - "amount":0.27, - "price_int":"611600", - "amount_int":"27000000", - "stamp":"1328310938016607" - }, - { - "price":6.11608, - "amount":1.164, - "price_int":"611608", - "amount_int":"116400000", - "stamp":"1328273374626656" - }, - { - "price":6.11619, - "amount":2.2808, - "price_int":"611619", - "amount_int":"228080000", - "stamp":"1328458560351479" - }, - { - "price":6.11717, - "amount":0.10233204, - "price_int":"611717", - "amount_int":"10233204", - "stamp":"1328231261063792" - }, - { - "price":6.11821, - "amount":0.0201504, - "price_int":"611821", - "amount_int":"2015040", - "stamp":"1328409114473186" - }, - { - "price":6.11879, - "amount":0.03, - "price_int":"611879", - "amount_int":"3000000", - "stamp":"1328306647272665" - }, - { - "price":6.11989, - "amount":1, - "price_int":"611989", - "amount_int":"100000000", - "stamp":"1328611211517821" - }, - { - "price":6.11999, - "amount":1.006244, - "price_int":"611999", - "amount_int":"100624400", - "stamp":"1328230014649313" - }, - { - "price":6.12, - "amount":422.1832083, - "price_int":"612000", - "amount_int":"42218320830", - "stamp":"1328498790471146" - }, - { - "price":6.12092, - "amount":0.3045108, - "price_int":"612092", - "amount_int":"30451080", - "stamp":"1328644625803914" - }, - { - "price":6.12242, - "amount":1, - "price_int":"612242", - "amount_int":"100000000", - "stamp":"1328321709303539" - }, - { - "price":6.12257, - "amount":0.0215407, - "price_int":"612257", - "amount_int":"2154070", - "stamp":"1328400513814354" - }, - { - "price":6.12318, - "amount":0.33, - "price_int":"612318", - "amount_int":"33000000", - "stamp":"1328301049635074" - }, - { - "price":6.12356, - "amount":1.00827, - "price_int":"612356", - "amount_int":"100827000", - "stamp":"1328571305731556" - }, - { - "price":6.125, - "amount":0.11, - "price_int":"612500", - "amount_int":"11000000", - "stamp":"1328478294325759" - }, - { - "price":6.12747, - "amount":0.1, - "price_int":"612747", - "amount_int":"10000000", - "stamp":"1328229978155605" - }, - { - "price":6.12999, - "amount":3.0533289, - "price_int":"612999", - "amount_int":"305332890", - "stamp":"1328525415457476" - }, - { - "price":6.13, - "amount":120.12774555, - "price_int":"613000", - "amount_int":"12012774555", - "stamp":"1328457824360952" - }, - { - "price":6.1313, - "amount":5.66262, - "price_int":"613130", - "amount_int":"566262000", - "stamp":"1328570214091090" - }, - { - "price":6.13276, - "amount":0.46891, - "price_int":"613276", - "amount_int":"46891000", - "stamp":"1328571548699391" - }, - { - "price":6.13298, - "amount":1.43381, - "price_int":"613298", - "amount_int":"143381000", - "stamp":"1328642287316727" - }, - { - "price":6.13326, - "amount":0.0849, - "price_int":"613326", - "amount_int":"8490000", - "stamp":"1328438840667377" - }, - { - "price":6.13435, - "amount":0.4201511, - "price_int":"613435", - "amount_int":"42015110", - "stamp":"1328460016140465" - }, - { - "price":6.135, - "amount":0.01, - "price_int":"613500", - "amount_int":"1000000", - "stamp":"1328293984544994" - }, - { - "price":6.13593, - "amount":0.0215369, - "price_int":"613593", - "amount_int":"2153690", - "stamp":"1328400510271437" - }, - { - "price":6.13749, - "amount":3, - "price_int":"613749", - "amount_int":"300000000", - "stamp":"1328573652466030" - }, - { - "price":6.1375, - "amount":0.1, - "price_int":"613750", - "amount_int":"10000000", - "stamp":"1328567104569283" - }, - { - "price":6.13777, - "amount":0.1023326, - "price_int":"613777", - "amount_int":"10233260", - "stamp":"1328230365193249" - }, - { - "price":6.13938, - "amount":0.01006, - "price_int":"613938", - "amount_int":"1006000", - "stamp":"1328459104501773" - }, - { - "price":6.13989, - "amount":1, - "price_int":"613989", - "amount_int":"100000000", - "stamp":"1328611237971507" - }, - { - "price":6.13999, - "amount":4.006415, - "price_int":"613999", - "amount_int":"400641500", - "stamp":"1328231289046457" - }, - { - "price":6.14, - "amount":139.21127616, - "price_int":"614000", - "amount_int":"13921127616", - "stamp":"1328614075826136" - }, - { - "price":6.14039, - "amount":0.23472, - "price_int":"614039", - "amount_int":"23472000", - "stamp":"1328487910781225" - }, - { - "price":6.14256, - "amount":0.05984, - "price_int":"614256", - "amount_int":"5984000", - "stamp":"1328432902701844" - }, - { - "price":6.14327, - "amount":0.06991, - "price_int":"614327", - "amount_int":"6991000", - "stamp":"1328429257715335" - }, - { - "price":6.145, - "amount":1.26, - "price_int":"614500", - "amount_int":"126000000", - "stamp":"1328319912534346" - }, - { - "price":6.1459, - "amount":1, - "price_int":"614590", - "amount_int":"100000000", - "stamp":"1328525366953422" - }, - { - "price":6.14591, - "amount":21.74, - "price_int":"614591", - "amount_int":"2174000000", - "stamp":"1328282937996054" - }, - { - "price":6.146, - "amount":40, - "price_int":"614600", - "amount_int":"4000000000", - "stamp":"1328547513461991" - }, - { - "price":6.14745, - "amount":0.03041, - "price_int":"614745", - "amount_int":"3041000", - "stamp":"1328429225684901" - }, - { - "price":6.14807, - "amount":0.1, - "price_int":"614807", - "amount_int":"10000000", - "stamp":"1328229890112961" - }, - { - "price":6.14899, - "amount":1, - "price_int":"614899", - "amount_int":"100000000", - "stamp":"1328525369104952" - }, - { - "price":6.149, - "amount":0.2084, - "price_int":"614900", - "amount_int":"20840000", - "stamp":"1328442138879504" - }, - { - "price":6.1493, - "amount":3.0219317, - "price_int":"614930", - "amount_int":"302193170", - "stamp":"1328438989861796" - }, - { - "price":6.14989, - "amount":2, - "price_int":"614989", - "amount_int":"200000000", - "stamp":"1328611235237658" - }, - { - "price":6.1499, - "amount":20.0004, - "price_int":"614990", - "amount_int":"2000040000", - "stamp":"1328289371877885" - }, - { - "price":6.14999, - "amount":1.006167, - "price_int":"614999", - "amount_int":"100616700", - "stamp":"1328203880455067" - }, - { - "price":6.15, - "amount":455.51571037, - "price_int":"615000", - "amount_int":"45551571037", - "stamp":"1328578025326579" - }, - { - "price":6.1505, - "amount":0.0201446, - "price_int":"615050", - "amount_int":"2014460", - "stamp":"1328400432829797" - }, - { - "price":6.15066, - "amount":0.32257, - "price_int":"615066", - "amount_int":"32257000", - "stamp":"1328571596701582" - }, - { - "price":6.151, - "amount":0.1829, - "price_int":"615100", - "amount_int":"18290000", - "stamp":"1328367211960922" - }, - { - "price":6.15144, - "amount":1, - "price_int":"615144", - "amount_int":"100000000", - "stamp":"1328524751643770" - }, - { - "price":6.15145, - "amount":29.871, - "price_int":"615145", - "amount_int":"2987100000", - "stamp":"1328219313472687" - }, - { - "price":6.15151, - "amount":1, - "price_int":"615151", - "amount_int":"100000000", - "stamp":"1328526524056722" - }, - { - "price":6.15152, - "amount":300, - "price_int":"615152", - "amount_int":"30000000000", - "stamp":"1328217428609752" - }, - { - "price":6.15345, - "amount":0.995, - "price_int":"615345", - "amount_int":"99500000", - "stamp":"1328222714469837" - }, - { - "price":6.15362, - "amount":3.35, - "price_int":"615362", - "amount_int":"335000000", - "stamp":"1328211972918137" - }, - { - "price":6.15428, - "amount":0.995, - "price_int":"615428", - "amount_int":"99500000", - "stamp":"1328210339522400" - }, - { - "price":6.15459, - "amount":1.75748767, - "price_int":"615459", - "amount_int":"175748767", - "stamp":"1328209621526991" - }, - { - "price":6.155, - "amount":0.01, - "price_int":"615500", - "amount_int":"1000000", - "stamp":"1328293994541486" - }, - { - "price":6.15506, - "amount":0.58919, - "price_int":"615506", - "amount_int":"58919000", - "stamp":"1328459639570449" - }, - { - "price":6.15508, - "amount":0.20547, - "price_int":"615508", - "amount_int":"20547000", - "stamp":"1328578412141336" - }, - { - "price":6.15515, - "amount":0.28209, - "price_int":"615515", - "amount_int":"28209000", - "stamp":"1328488245886180" - }, - { - "price":6.15574, - "amount":0.11882, - "price_int":"615574", - "amount_int":"11882000", - "stamp":"1328457373992240" - }, - { - "price":6.15592, - "amount":0.02076, - "price_int":"615592", - "amount_int":"2076000", - "stamp":"1328401402318550" - }, - { - "price":6.15606, - "amount":1, - "price_int":"615606", - "amount_int":"100000000", - "stamp":"1328525377236740" - }, - { - "price":6.15607, - "amount":26, - "price_int":"615607", - "amount_int":"2600000000", - "stamp":"1328212244325818" - }, - { - "price":6.15661, - "amount":0.0225638, - "price_int":"615661", - "amount_int":"2256380", - "stamp":"1328323560765549" - }, - { - "price":6.15705, - "amount":1.7639, - "price_int":"615705", - "amount_int":"176390000", - "stamp":"1328571359778425" - }, - { - "price":6.15837, - "amount":0.1, - "price_int":"615837", - "amount_int":"10000000", - "stamp":"1328229966047487" - }, - { - "price":6.15999, - "amount":3.0812158, - "price_int":"615999", - "amount_int":"308121580", - "stamp":"1328573546958455" - }, - { - "price":6.16, - "amount":133.9407851, - "price_int":"616000", - "amount_int":"13394078510", - "stamp":"1328357594389548" - }, - { - "price":6.16028, - "amount":2.21771, - "price_int":"616028", - "amount_int":"221771000", - "stamp":"1328458933903422" - }, - { - "price":6.1606, - "amount":0.15734, - "price_int":"616060", - "amount_int":"15734000", - "stamp":"1328459096456011" - }, - { - "price":6.16076, - "amount":1.80135117, - "price_int":"616076", - "amount_int":"180135117", - "stamp":"1328476963032968" - }, - { - "price":6.16086, - "amount":10.5, - "price_int":"616086", - "amount_int":"1050000000", - "stamp":"1328466480994333" - }, - { - "price":6.16093, - "amount":19.54, - "price_int":"616093", - "amount_int":"1954000000", - "stamp":"1328398030424122" - }, - { - "price":6.16127, - "amount":1, - "price_int":"616127", - "amount_int":"100000000", - "stamp":"1328525766062102" - }, - { - "price":6.16128, - "amount":5.86846, - "price_int":"616128", - "amount_int":"586846000", - "stamp":"1328571985164207" - }, - { - "price":6.16181, - "amount":0.09417, - "price_int":"616181", - "amount_int":"9417000", - "stamp":"1328457778534366" - }, - { - "price":6.1625, - "amount":0.1, - "price_int":"616250", - "amount_int":"10000000", - "stamp":"1328567139379478" - }, - { - "price":6.16348, - "amount":0.995, - "price_int":"616348", - "amount_int":"99500000", - "stamp":"1328203679531756" - }, - { - "price":6.165, - "amount":0.01, - "price_int":"616500", - "amount_int":"1000000", - "stamp":"1328294039519622" - }, - { - "price":6.16523, - "amount":0.34782, - "price_int":"616523", - "amount_int":"34782000", - "stamp":"1328620003881877" - }, - { - "price":6.1659, - "amount":0.06773, - "price_int":"616590", - "amount_int":"6773000", - "stamp":"1328568859361427" - }, - { - "price":6.16664, - "amount":0.0201453, - "price_int":"616664", - "amount_int":"2014530", - "stamp":"1328400429461045" - }, - { - "price":6.168, - "amount":1, - "price_int":"616800", - "amount_int":"100000000", - "stamp":"1328453569517759" - }, - { - "price":6.16867, - "amount":0.1, - "price_int":"616867", - "amount_int":"10000000", - "stamp":"1328229943341081" - }, - { - "price":6.16898, - "amount":0.0227626, - "price_int":"616898", - "amount_int":"2276260", - "stamp":"1328296812051515" - }, - { - "price":6.1695, - "amount":0.33986, - "price_int":"616950", - "amount_int":"33986000", - "stamp":"1328580709339865" - }, - { - "price":6.16989, - "amount":1, - "price_int":"616989", - "amount_int":"100000000", - "stamp":"1328611238969943" - }, - { - "price":6.16999, - "amount":1.0120877, - "price_int":"616999", - "amount_int":"101208770", - "stamp":"1328203510412708" - }, - { - "price":6.17, - "amount":123.38561483, - "price_int":"617000", - "amount_int":"12338561483", - "stamp":"1328464573291630" - }, - { - "price":6.17178, - "amount":0.11596, - "price_int":"617178", - "amount_int":"11596000", - "stamp":"1328460451366030" - }, - { - "price":6.17199, - "amount":1, - "price_int":"617199", - "amount_int":"100000000", - "stamp":"1328525385504270" - }, - { - "price":6.172, - "amount":60, - "price_int":"617200", - "amount_int":"6000000000", - "stamp":"1328293870232680" - }, - { - "price":6.17436, - "amount":0.995, - "price_int":"617436", - "amount_int":"99500000", - "stamp":"1328203499552916" - }, - { - "price":6.17499, - "amount":1, - "price_int":"617499", - "amount_int":"100000000", - "stamp":"1328525770275837" - }, - { - "price":6.175, - "amount":10.1369, - "price_int":"617500", - "amount_int":"1013690000", - "stamp":"1328644480944968" - }, - { - "price":6.17516, - "amount":2.39254766, - "price_int":"617516", - "amount_int":"239254766", - "stamp":"1328343619222819" - }, - { - "price":6.17604, - "amount":0.0215267, - "price_int":"617604", - "amount_int":"2152670", - "stamp":"1328369166868970" - }, - { - "price":6.17676, - "amount":10, - "price_int":"617676", - "amount_int":"1000000000", - "stamp":"1328560620834757" - }, - { - "price":6.17797, - "amount":2.63809, - "price_int":"617797", - "amount_int":"263809000", - "stamp":"1328459192659091" - }, - { - "price":6.17897, - "amount":0.1, - "price_int":"617897", - "amount_int":"10000000", - "stamp":"1328229927460861" - }, - { - "price":6.179, - "amount":7.952, - "price_int":"617900", - "amount_int":"795200000", - "stamp":"1328328875651619" - }, - { - "price":6.17989, - "amount":2, - "price_int":"617989", - "amount_int":"200000000", - "stamp":"1328611206482252" - }, - { - "price":6.1799, - "amount":43.98031005, - "price_int":"617990", - "amount_int":"4398031005", - "stamp":"1328255560023190" - }, - { - "price":6.17999, - "amount":1.0126099, - "price_int":"617999", - "amount_int":"101260990", - "stamp":"1328202966657546" - }, - { - "price":6.18, - "amount":18.68046703, - "price_int":"618000", - "amount_int":"1868046703", - "stamp":"1328274850333833" - }, - { - "price":6.181, - "amount":1, - "price_int":"618100", - "amount_int":"100000000", - "stamp":"1328207486899706" - }, - { - "price":6.182, - "amount":1.44941771, - "price_int":"618200", - "amount_int":"144941771", - "stamp":"1328219929344501" - }, - { - "price":6.18253, - "amount":5.32, - "price_int":"618253", - "amount_int":"532000000", - "stamp":"1328217481039358" - }, - { - "price":6.18278, - "amount":0.0201452, - "price_int":"618278", - "amount_int":"2014520", - "stamp":"1328400425587354" - }, - { - "price":6.18499, - "amount":1, - "price_int":"618499", - "amount_int":"100000000", - "stamp":"1328525774770182" - }, - { - "price":6.185, - "amount":10.01, - "price_int":"618500", - "amount_int":"1001000000", - "stamp":"1328294047380086" - }, - { - "price":6.18541, - "amount":1.09048, - "price_int":"618541", - "amount_int":"109048000", - "stamp":"1328571306333541" - }, - { - "price":6.18578, - "amount":1, - "price_int":"618578", - "amount_int":"100000000", - "stamp":"1328526543486713" - }, - { - "price":6.18579, - "amount":18.68056, - "price_int":"618579", - "amount_int":"1868056000", - "stamp":"1328487687850509" - }, - { - "price":6.18631, - "amount":1.055, - "price_int":"618631", - "amount_int":"105500000", - "stamp":"1328273409509796" - }, - { - "price":6.18633, - "amount":2.12805, - "price_int":"618633", - "amount_int":"212805000", - "stamp":"1328528099741404" - }, - { - "price":6.187, - "amount":0.05418, - "price_int":"618700", - "amount_int":"5418000", - "stamp":"1328254705370811" - }, - { - "price":6.1875, - "amount":0.1, - "price_int":"618750", - "amount_int":"10000000", - "stamp":"1328567156508903" - }, - { - "price":6.18799, - "amount":1, - "price_int":"618799", - "amount_int":"100000000", - "stamp":"1328525405698393" - }, - { - "price":6.188, - "amount":22.77135707, - "price_int":"618800", - "amount_int":"2277135707", - "stamp":"1328244251150666" - }, - { - "price":6.1889, - "amount":6, - "price_int":"618890", - "amount_int":"600000000", - "stamp":"1328611389588355" - }, - { - "price":6.189, - "amount":105.1758, - "price_int":"618900", - "amount_int":"10517580000", - "stamp":"1328264425055557" - }, - { - "price":6.18915, - "amount":4, - "price_int":"618915", - "amount_int":"400000000", - "stamp":"1328526887635355" - }, - { - "price":6.18927, - "amount":0.1, - "price_int":"618927", - "amount_int":"10000000", - "stamp":"1328229913891177" - }, - { - "price":6.18941, - "amount":0.0215201, - "price_int":"618941", - "amount_int":"2152010", - "stamp":"1328368184382572" - }, - { - "price":6.18959, - "amount":0.54548792, - "price_int":"618959", - "amount_int":"54548792", - "stamp":"1328644626106891" - }, - { - "price":6.1899, - "amount":9.9, - "price_int":"618990", - "amount_int":"990000000", - "stamp":"1328207744895933" - }, - { - "price":6.18998, - "amount":1, - "price_int":"618998", - "amount_int":"100000000", - "stamp":"1328526548363236" - }, - { - "price":6.18999, - "amount":1.0130602, - "price_int":"618999", - "amount_int":"101306020", - "stamp":"1328202963470514" - }, - { - "price":6.19, - "amount":512.99864187, - "price_int":"619000", - "amount_int":"51299864187", - "stamp":"1328603575427374" - }, - { - "price":6.19181, - "amount":1, - "price_int":"619181", - "amount_int":"100000000", - "stamp":"1328524791811244" - }, - { - "price":6.19208, - "amount":0.1274, - "price_int":"619208", - "amount_int":"12740000", - "stamp":"1328438780541703" - }, - { - "price":6.19289, - "amount":1, - "price_int":"619289", - "amount_int":"100000000", - "stamp":"1328611233223621" - }, - { - "price":6.19299, - "amount":2, - "price_int":"619299", - "amount_int":"200000000", - "stamp":"1328207295556211" - }, - { - "price":6.19323, - "amount":6.24549, - "price_int":"619323", - "amount_int":"624549000", - "stamp":"1328570522156541" - }, - { - "price":6.19467, - "amount":2.95335877, - "price_int":"619467", - "amount_int":"295335877", - "stamp":"1328239601265679" - }, - { - "price":6.1947, - "amount":0.50182, - "price_int":"619470", - "amount_int":"50182000", - "stamp":"1328571549315033" - }, - { - "price":6.19493, - "amount":1.59478, - "price_int":"619493", - "amount_int":"159478000", - "stamp":"1328642287764100" - }, - { - "price":6.195, - "amount":17.86436761, - "price_int":"619500", - "amount_int":"1786436761", - "stamp":"1328319918813321" - }, - { - "price":6.19553, - "amount":0.33059945, - "price_int":"619553", - "amount_int":"33059945", - "stamp":"1328254809567263" - }, - { - "price":6.19599, - "amount":1, - "price_int":"619599", - "amount_int":"100000000", - "stamp":"1328525795505512" - }, - { - "price":6.196, - "amount":30, - "price_int":"619600", - "amount_int":"3000000000", - "stamp":"1328243722312053" - }, - { - "price":6.197, - "amount":4, - "price_int":"619700", - "amount_int":"400000000", - "stamp":"1328286975658761" - }, - { - "price":6.19799, - "amount":1, - "price_int":"619799", - "amount_int":"100000000", - "stamp":"1328519978841453" - }, - { - "price":6.198, - "amount":312.2, - "price_int":"619800", - "amount_int":"31220000000", - "stamp":"1328271443827139" - }, - { - "price":6.19875, - "amount":1, - "price_int":"619875", - "amount_int":"100000000", - "stamp":"1328524796642837" - }, - { - "price":6.19893, - "amount":0.0201459, - "price_int":"619893", - "amount_int":"2014590", - "stamp":"1328400421198445" - }, - { - "price":6.199, - "amount":415.92794709, - "price_int":"619900", - "amount_int":"41592794709", - "stamp":"1328220542307924" - }, - { - "price":6.19957, - "amount":5.1, - "price_int":"619957", - "amount_int":"510000000", - "stamp":"1328611388303949" - }, - { - "price":6.19982, - "amount":0.0105364, - "price_int":"619982", - "amount_int":"1053640", - "stamp":"1328199676354169" - }, - { - "price":6.19989, - "amount":2, - "price_int":"619989", - "amount_int":"200000000", - "stamp":"1328525860166374" - }, - { - "price":6.1999, - "amount":150, - "price_int":"619990", - "amount_int":"15000000000", - "stamp":"1328462360991028" - }, - { - "price":6.19994, - "amount":38.5, - "price_int":"619994", - "amount_int":"3850000000", - "stamp":"1328644772329143" - }, - { - "price":6.19999, - "amount":6.8165928, - "price_int":"619999", - "amount_int":"681659280", - "stamp":"1328214892853705" - }, - { - "price":6.2, - "amount":1304.2629779, - "price_int":"620000", - "amount_int":"130426297790", - "stamp":"1328635548763423" - }, - { - "price":6.2001, - "amount":9.2, - "price_int":"620010", - "amount_int":"920000000", - "stamp":"1328340252201517" - }, - { - "price":6.201, - "amount":146.95867792, - "price_int":"620100", - "amount_int":"14695867792", - "stamp":"1328493830213789" - }, - { - "price":6.20128, - "amount":0.07, - "price_int":"620128", - "amount_int":"7000000", - "stamp":"1328223877859047" - }, - { - "price":6.20139, - "amount":0.01014, - "price_int":"620139", - "amount_int":"1014000", - "stamp":"1328458141907555" - }, - { - "price":6.202, - "amount":10, - "price_int":"620200", - "amount_int":"1000000000", - "stamp":"1328298253716714" - }, - { - "price":6.20241, - "amount":0.26329, - "price_int":"620241", - "amount_int":"26329000", - "stamp":"1328571147077640" - }, - { - "price":6.20278, - "amount":0.0215158, - "price_int":"620278", - "amount_int":"2151580", - "stamp":"1328347257123051" - }, - { - "price":6.20399, - "amount":1, - "price_int":"620399", - "amount_int":"100000000", - "stamp":"1328525814029172" - }, - { - "price":6.204, - "amount":10, - "price_int":"620400", - "amount_int":"1000000000", - "stamp":"1328298258613844" - }, - { - "price":6.20461, - "amount":0.0642, - "price_int":"620461", - "amount_int":"6420000", - "stamp":"1328408124699515" - }, - { - "price":6.205, - "amount":0.01, - "price_int":"620500", - "amount_int":"1000000", - "stamp":"1328345042407916" - }, - { - "price":6.20532, - "amount":0.09169, - "price_int":"620532", - "amount_int":"9169000", - "stamp":"1328050787379955" - }, - { - "price":6.20699, - "amount":1, - "price_int":"620699", - "amount_int":"100000000", - "stamp":"1328526569459590" - }, - { - "price":6.207, - "amount":10, - "price_int":"620700", - "amount_int":"1000000000", - "stamp":"1328298263915677" - }, - { - "price":6.20746, - "amount":1.211, - "price_int":"620746", - "amount_int":"121100000", - "stamp":"1328273419040774" - }, - { - "price":6.20955, - "amount":0.03339, - "price_int":"620955", - "amount_int":"3339000", - "stamp":"1328429226153933" - }, - { - "price":6.20967, - "amount":0.995, - "price_int":"620967", - "amount_int":"99500000", - "stamp":"1327510187962042" - }, - { - "price":6.20987, - "amount":0.1, - "price_int":"620987", - "amount_int":"10000000", - "stamp":"1328229768703003" - }, - { - "price":6.20989, - "amount":1, - "price_int":"620989", - "amount_int":"100000000", - "stamp":"1328611222149615" - }, - { - "price":6.20999, - "amount":1.0115303, - "price_int":"620999", - "amount_int":"101153030", - "stamp":"1327510162483386" - }, - { - "price":6.21, - "amount":33.0067854, - "price_int":"621000", - "amount_int":"3300678540", - "stamp":"1328298268879214" - }, - { - "price":6.211, - "amount":0.6, - "price_int":"621100", - "amount_int":"60000000", - "stamp":"1327512054805793" - }, - { - "price":6.21211, - "amount":1, - "price_int":"621211", - "amount_int":"100000000", - "stamp":"1328526571892839" - }, - { - "price":6.21212, - "amount":10, - "price_int":"621212", - "amount_int":"1000000000", - "stamp":"1328202017758114" - }, - { - "price":6.2125, - "amount":0.1, - "price_int":"621250", - "amount_int":"10000000", - "stamp":"1328567171775968" - }, - { - "price":6.21279, - "amount":0.34433, - "price_int":"621279", - "amount_int":"34433000", - "stamp":"1328571597329431" - }, - { - "price":6.215, - "amount":0.01, - "price_int":"621500", - "amount_int":"1000000", - "stamp":"1328345047019952" - }, - { - "price":6.21507, - "amount":0.0201451, - "price_int":"621507", - "amount_int":"2014510", - "stamp":"1328400417386371" - }, - { - "price":6.21614, - "amount":145.23132125, - "price_int":"621614", - "amount_int":"14523132125", - "stamp":"1328584162164587" - }, - { - "price":6.21667, - "amount":1, - "price_int":"621667", - "amount_int":"100000000", - "stamp":"1328526043888825" - }, - { - "price":6.21724, - "amount":0.63395, - "price_int":"621724", - "amount_int":"63395000", - "stamp":"1328459640295238" - }, - { - "price":6.21725, - "amount":0.23939, - "price_int":"621725", - "amount_int":"23939000", - "stamp":"1328580387044106" - }, - { - "price":6.21732, - "amount":0.30134, - "price_int":"621732", - "amount_int":"30134000", - "stamp":"1328488246492539" - }, - { - "price":6.2181, - "amount":0.03343, - "price_int":"621810", - "amount_int":"3343000", - "stamp":"1327854842389531" - }, - { - "price":6.21843, - "amount":0.12783, - "price_int":"621843", - "amount_int":"12783000", - "stamp":"1328438819063568" - }, - { - "price":6.219, - "amount":0.5, - "price_int":"621900", - "amount_int":"50000000", - "stamp":"1328209767096362" - }, - { - "price":6.21906, - "amount":1.18698979, - "price_int":"621906", - "amount_int":"118698979", - "stamp":"1328436940179355" - }, - { - "price":6.21924, - "amount":2.2956, - "price_int":"621924", - "amount_int":"229560000", - "stamp":"1327871365443234" - }, - { - "price":6.21988, - "amount":20, - "price_int":"621988", - "amount_int":"2000000000", - "stamp":"1328643067092178" - }, - { - "price":6.21999, - "amount":2.69347774, - "price_int":"621999", - "amount_int":"269347774", - "stamp":"1328168836689801" - }, - { - "price":6.22, - "amount":3.84683795, - "price_int":"622000", - "amount_int":"384683795", - "stamp":"1328268036885944" - }, - { - "price":6.22017, - "amount":0.1, - "price_int":"622017", - "amount_int":"10000000", - "stamp":"1328229714322527" - }, - { - "price":6.22149, - "amount":0.1486, - "price_int":"622149", - "amount_int":"14860000", - "stamp":"1328438758968971" - }, - { - "price":6.22198, - "amount":0.03124854, - "price_int":"622198", - "amount_int":"3124854", - "stamp":"1327512328942819" - }, - { - "price":6.2222, - "amount":1, - "price_int":"622220", - "amount_int":"100000000", - "stamp":"1328524826425739" - }, - { - "price":6.22221, - "amount":14.9205, - "price_int":"622221", - "amount_int":"1492050000", - "stamp":"1327520543856230" - }, - { - "price":6.22251, - "amount":2.44547, - "price_int":"622251", - "amount_int":"244547000", - "stamp":"1327843388349012" - }, - { - "price":6.22283, - "amount":0.16879, - "price_int":"622283", - "amount_int":"16879000", - "stamp":"1328459096944712" - }, - { - "price":6.22352, - "amount":6.44792, - "price_int":"622352", - "amount_int":"644792000", - "stamp":"1328459154047971" - }, - { - "price":6.22399, - "amount":1, - "price_int":"622399", - "amount_int":"100000000", - "stamp":"1328253393041331" - }, - { - "price":6.224, - "amount":0.2335, - "price_int":"622400", - "amount_int":"23350000", - "stamp":"1328483269799932" - }, - { - "price":6.225, - "amount":0.11, - "price_int":"622500", - "amount_int":"11000000", - "stamp":"1328345050119935" - }, - { - "price":6.2251, - "amount":0.02, - "price_int":"622510", - "amount_int":"2000000", - "stamp":"1327498882631373" - }, - { - "price":6.2275, - "amount":0.38184, - "price_int":"622750", - "amount_int":"38184000", - "stamp":"1328620004302997" - }, - { - "price":6.22818, - "amount":0.0728, - "price_int":"622818", - "amount_int":"7280000", - "stamp":"1328568859811227" - }, - { - "price":6.22951, - "amount":0.02151, - "price_int":"622951", - "amount_int":"2151000", - "stamp":"1328299801026767" - }, - { - "price":6.22999, - "amount":1.0127471, - "price_int":"622999", - "amount_int":"101274710", - "stamp":"1327510156127994" - }, - { - "price":6.23, - "amount":1.07369906, - "price_int":"623000", - "amount_int":"107369906", - "stamp":"1328644236526564" - }, - { - "price":6.23047, - "amount":0.1, - "price_int":"623047", - "amount_int":"10000000", - "stamp":"1328229697690054" - }, - { - "price":6.23121, - "amount":0.0201475, - "price_int":"623121", - "amount_int":"2014750", - "stamp":"1328400413503305" - }, - { - "price":6.23412, - "amount":0.12537, - "price_int":"623412", - "amount_int":"12537000", - "stamp":"1328460451805730" - }, - { - "price":6.235, - "amount":0.01, - "price_int":"623500", - "amount_int":"1000000", - "stamp":"1328345053055780" - }, - { - "price":6.23739, - "amount":2.255, - "price_int":"623739", - "amount_int":"225500000", - "stamp":"1328484253990259" - }, - { - "price":6.2375, - "amount":0.1, - "price_int":"623750", - "amount_int":"10000000", - "stamp":"1328567216807203" - }, - { - "price":6.23989, - "amount":1, - "price_int":"623989", - "amount_int":"100000000", - "stamp":"1328611223185882" - }, - { - "price":6.2399, - "amount":9.9, - "price_int":"623990", - "amount_int":"990000000", - "stamp":"1328204042042518" - }, - { - "price":6.23999, - "amount":1.0199382, - "price_int":"623999", - "amount_int":"101993820", - "stamp":"1327509746581396" - }, - { - "price":6.24, - "amount":386.9144276, - "price_int":"624000", - "amount_int":"38691442760", - "stamp":"1328365286442921" - }, - { - "price":6.24037, - "amount":2.60187, - "price_int":"624037", - "amount_int":"260187000", - "stamp":"1327963647117432" - }, - { - "price":6.24077, - "amount":38.05326614, - "price_int":"624077", - "amount_int":"3805326614", - "stamp":"1328598572184915" - }, - { - "price":6.24099, - "amount":1, - "price_int":"624099", - "amount_int":"100000000", - "stamp":"1328524841162522" - }, - { - "price":6.2417, - "amount":0.6, - "price_int":"624170", - "amount_int":"60000000", - "stamp":"1327512196990450" - }, - { - "price":6.24288, - "amount":0.0215081, - "price_int":"624288", - "amount_int":"2150810", - "stamp":"1328295934049997" - }, - { - "price":6.24322, - "amount":1, - "price_int":"624322", - "amount_int":"100000000", - "stamp":"1328253291072588" - }, - { - "price":6.24416, - "amount":1.08411741, - "price_int":"624416", - "amount_int":"108411741", - "stamp":"1327510159000067" - }, - { - "price":6.24464, - "amount":0.995, - "price_int":"624464", - "amount_int":"99500000", - "stamp":"1327507157937045" - }, - { - "price":6.245, - "amount":1.51, - "price_int":"624500", - "amount_int":"151000000", - "stamp":"1328345056288812" - }, - { - "price":6.24646, - "amount":1.187, - "price_int":"624646", - "amount_int":"118700000", - "stamp":"1328273439042277" - }, - { - "price":6.24736, - "amount":0.0201419, - "price_int":"624736", - "amount_int":"2014190", - "stamp":"1328316087728931" - }, - { - "price":6.24789, - "amount":1.17188, - "price_int":"624789", - "amount_int":"117188000", - "stamp":"1328571306835043" - }, - { - "price":6.24865, - "amount":0.995, - "price_int":"624865", - "amount_int":"99500000", - "stamp":"1327495683235340" - }, - { - "price":6.249, - "amount":1.98000026, - "price_int":"624900", - "amount_int":"198000026", - "stamp":"1327522018310687" - }, - { - "price":6.2495, - "amount":0.17483658, - "price_int":"624950", - "amount_int":"17483658", - "stamp":"1328163818826632" - }, - { - "price":6.24979, - "amount":7.49287822, - "price_int":"624979", - "amount_int":"749287822", - "stamp":"1328231743216396" - }, - { - "price":6.24989, - "amount":1, - "price_int":"624989", - "amount_int":"100000000", - "stamp":"1328611228193962" - }, - { - "price":6.24999, - "amount":1.0204201, - "price_int":"624999", - "amount_int":"102042010", - "stamp":"1327495615829426" - }, - { - "price":6.25, - "amount":639.334911, - "price_int":"625000", - "amount_int":"63933491100", - "stamp":"1328642612755420" - }, - { - "price":6.25001, - "amount":16, - "price_int":"625001", - "amount_int":"1600000000", - "stamp":"1328136017393105" - }, - { - "price":6.2509, - "amount":0.1699, - "price_int":"625090", - "amount_int":"16990000", - "stamp":"1328438739371374" - }, - { - "price":6.251, - "amount":0.01, - "price_int":"625100", - "amount_int":"1000000", - "stamp":"1327498017382852" - }, - { - "price":6.2526, - "amount":1.5, - "price_int":"625260", - "amount_int":"150000000", - "stamp":"1328146715139491" - }, - { - "price":6.255, - "amount":0.01, - "price_int":"625500", - "amount_int":"1000000", - "stamp":"1328345059175718" - }, - { - "price":6.25579, - "amount":6.94319, - "price_int":"625579", - "amount_int":"694319000", - "stamp":"1328571448630906" - }, - { - "price":6.256, - "amount":0.2809, - "price_int":"625600", - "amount_int":"28090000", - "stamp":"1327875360351090" - }, - { - "price":6.25625, - "amount":0.0214867, - "price_int":"625625", - "amount_int":"2148670", - "stamp":"1328230118235665" - }, - { - "price":6.25659, - "amount":1.127, - "price_int":"625659", - "amount_int":"112700000", - "stamp":"1328273444033568" - }, - { - "price":6.25678, - "amount":15, - "price_int":"625678", - "amount_int":"1500000000", - "stamp":"1328490996247805" - }, - { - "price":6.25689, - "amount":1, - "price_int":"625689", - "amount_int":"100000000", - "stamp":"1328525834107998" - }, - { - "price":6.2569, - "amount":30.8, - "price_int":"625690", - "amount_int":"3080000000", - "stamp":"1328336555643978" - }, - { - "price":6.25699, - "amount":0.02162, - "price_int":"625699", - "amount_int":"2162000", - "stamp":"1328000795758361" - }, - { - "price":6.25728, - "amount":0.5344, - "price_int":"625728", - "amount_int":"53440000", - "stamp":"1328571549833131" - }, - { - "price":6.2575, - "amount":1.75415, - "price_int":"625750", - "amount_int":"175415000", - "stamp":"1328642288216774" - }, - { - "price":6.25989, - "amount":1.9356872, - "price_int":"625989", - "amount_int":"193568720", - "stamp":"1328611207486887" - }, - { - "price":6.25999, - "amount":21.0210463, - "price_int":"625999", - "amount_int":"2102104630", - "stamp":"1328539336861134" - }, - { - "price":6.26, - "amount":1.4437994, - "price_int":"626000", - "amount_int":"144379940", - "stamp":"1328267410939343" - }, - { - "price":6.2608, - "amount":2.737753, - "price_int":"626080", - "amount_int":"273775300", - "stamp":"1327517558362994" - }, - { - "price":6.26083, - "amount":0.34878, - "price_int":"626083", - "amount_int":"34878000", - "stamp":"1327632705353977" - }, - { - "price":6.2625, - "amount":0.1, - "price_int":"626250", - "amount_int":"10000000", - "stamp":"1328567247309871" - }, - { - "price":6.2635, - "amount":0.0201314, - "price_int":"626350", - "amount_int":"2013140", - "stamp":"1328233380021377" - }, - { - "price":6.26403, - "amount":0.01008, - "price_int":"626403", - "amount_int":"1008000", - "stamp":"1328451248992140" - }, - { - "price":6.26475, - "amount":1, - "price_int":"626475", - "amount_int":"100000000", - "stamp":"1328526590113935" - }, - { - "price":6.26476, - "amount":7.01075111, - "price_int":"626476", - "amount_int":"701075111", - "stamp":"1328149953262144" - }, - { - "price":6.265, - "amount":0.01, - "price_int":"626500", - "amount_int":"1000000", - "stamp":"1328345061980816" - }, - { - "price":6.26506, - "amount":0.28178, - "price_int":"626506", - "amount_int":"28178000", - "stamp":"1328571147559493" - }, - { - "price":6.26685, - "amount":2.20303943, - "price_int":"626685", - "amount_int":"220303943", - "stamp":"1328273466151133" - }, - { - "price":6.26708, - "amount":11.6928, - "price_int":"626708", - "amount_int":"1169280000", - "stamp":"1328266509653690" - }, - { - "price":6.26728, - "amount":0.07486, - "price_int":"626728", - "amount_int":"7486000", - "stamp":"1328435199620129" - }, - { - "price":6.268, - "amount":0.09845, - "price_int":"626800", - "amount_int":"9845000", - "stamp":"1328050787840805" - }, - { - "price":6.269, - "amount":0.1715, - "price_int":"626900", - "amount_int":"17150000", - "stamp":"1328162242804597" - }, - { - "price":6.26962, - "amount":0.0214844, - "price_int":"626962", - "amount_int":"2148440", - "stamp":"1328230114720398" - }, - { - "price":6.26999, - "amount":1.0216344, - "price_int":"626999", - "amount_int":"102163440", - "stamp":"1327495592847957" - }, - { - "price":6.27, - "amount":100.0437862, - "price_int":"627000", - "amount_int":"10004378620", - "stamp":"1327541937824105" - }, - { - "price":6.27226, - "amount":1, - "price_int":"627226", - "amount_int":"100000000", - "stamp":"1328526054001362" - }, - { - "price":6.27227, - "amount":0.03636, - "price_int":"627227", - "amount_int":"3636000", - "stamp":"1328435141689634" - }, - { - "price":6.2723, - "amount":0.6, - "price_int":"627230", - "amount_int":"60000000", - "stamp":"1327512235577983" - }, - { - "price":6.275, - "amount":0.11, - "price_int":"627500", - "amount_int":"11000000", - "stamp":"1328345064935231" - }, - { - "price":6.27524, - "amount":0.838623, - "price_int":"627524", - "amount_int":"83862300", - "stamp":"1328644626408755" - }, - { - "price":6.27554, - "amount":0.37036, - "price_int":"627554", - "amount_int":"37036000", - "stamp":"1328576066652581" - }, - { - "price":6.2765, - "amount":0.61921019, - "price_int":"627650", - "amount_int":"61921019", - "stamp":"1327511173251106" - }, - { - "price":6.27964, - "amount":0.0201201, - "price_int":"627964", - "amount_int":"2012010", - "stamp":"1328229774814414" - }, - { - "price":6.27999, - "amount":3.14471424, - "price_int":"627999", - "amount_int":"314471424", - "stamp":"1328573265280915" - }, - { - "price":6.28, - "amount":85.26766969, - "price_int":"628000", - "amount_int":"8526766969", - "stamp":"1328507247061382" - }, - { - "price":6.28004, - "amount":0.67826, - "price_int":"628004", - "amount_int":"67826000", - "stamp":"1328459640858771" - }, - { - "price":6.28005, - "amount":0.25596, - "price_int":"628005", - "amount_int":"25596000", - "stamp":"1328580387673828" - }, - { - "price":6.28013, - "amount":0.32039, - "price_int":"628013", - "amount_int":"32039000", - "stamp":"1328488247001712" - }, - { - "price":6.28031, - "amount":0.1911, - "price_int":"628031", - "amount_int":"19110000", - "stamp":"1328438721075427" - }, - { - "price":6.28091, - "amount":0.03554, - "price_int":"628091", - "amount_int":"3554000", - "stamp":"1327854842891089" - }, - { - "price":6.28206, - "amount":2.42962, - "price_int":"628206", - "amount_int":"242962000", - "stamp":"1327871365898620" - }, - { - "price":6.28298, - "amount":22.4014825, - "price_int":"628298", - "amount_int":"2240148250", - "stamp":"1328600399320126" - }, - { - "price":6.2842, - "amount":1.77973933, - "price_int":"628420", - "amount_int":"177973933", - "stamp":"1328556138493852" - }, - { - "price":6.28428, - "amount":3.1802, - "price_int":"628428", - "amount_int":"318020000", - "stamp":"1327593670206767" - }, - { - "price":6.285, - "amount":0.01, - "price_int":"628500", - "amount_int":"1000000", - "stamp":"1328345067788313" - }, - { - "price":6.28537, - "amount":2.61268, - "price_int":"628537", - "amount_int":"261268000", - "stamp":"1327843720658571" - }, - { - "price":6.28568, - "amount":0.18011, - "price_int":"628568", - "amount_int":"18011000", - "stamp":"1328459097400814" - }, - { - "price":6.28638, - "amount":6.96456, - "price_int":"628638", - "amount_int":"696456000", - "stamp":"1328458441737568" - }, - { - "price":6.2875, - "amount":0.1, - "price_int":"628750", - "amount_int":"10000000", - "stamp":"1328567264665089" - }, - { - "price":6.28827, - "amount":1.046, - "price_int":"628827", - "amount_int":"104600000", - "stamp":"1328273459036618" - }, - { - "price":6.289, - "amount":50, - "price_int":"628900", - "amount_int":"5000000000", - "stamp":"1327520143985108" - }, - { - "price":6.28947, - "amount":4, - "price_int":"628947", - "amount_int":"400000000", - "stamp":"1328611212512596" - }, - { - "price":6.28957, - "amount":2, - "price_int":"628957", - "amount_int":"200000000", - "stamp":"1328526879436422" - }, - { - "price":6.2898, - "amount":323.1811975, - "price_int":"628980", - "amount_int":"32318119750", - "stamp":"1328456491760881" - }, - { - "price":6.28999, - "amount":1.0227915, - "price_int":"628999", - "amount_int":"102279150", - "stamp":"1327495518217582" - }, - { - "price":6.29, - "amount":483.1760458, - "price_int":"629000", - "amount_int":"48317604580", - "stamp":"1328423136434428" - }, - { - "price":6.29041, - "amount":0.41552, - "price_int":"629041", - "amount_int":"41552000", - "stamp":"1328620004756052" - }, - { - "price":6.29109, - "amount":0.07782, - "price_int":"629109", - "amount_int":"7782000", - "stamp":"1328568860268749" - }, - { - "price":6.292, - "amount":0.2084, - "price_int":"629200", - "amount_int":"20840000", - "stamp":"1328442142997916" - }, - { - "price":6.295, - "amount":1.76, - "price_int":"629500", - "amount_int":"176000000", - "stamp":"1328345070913608" - }, - { - "price":6.29578, - "amount":0.0201208, - "price_int":"629578", - "amount_int":"2012080", - "stamp":"1328229768896384" - }, - { - "price":6.29709, - "amount":0.13468, - "price_int":"629709", - "amount_int":"13468000", - "stamp":"1328460452253491" - }, - { - "price":6.298, - "amount":1.00814673, - "price_int":"629800", - "amount_int":"100814673", - "stamp":"1327973118274072" - }, - { - "price":6.29881, - "amount":1.58552362, - "price_int":"629881", - "amount_int":"158552362", - "stamp":"1328273671836023" - }, - { - "price":6.299, - "amount":15.0008, - "price_int":"629900", - "amount_int":"1500080000", - "stamp":"1328093936836280" - }, - { - "price":6.29989, - "amount":1, - "price_int":"629989", - "amount_int":"100000000", - "stamp":"1328611231220218" - }, - { - "price":6.29999, - "amount":3.5223443, - "price_int":"629999", - "amount_int":"352234430", - "stamp":"1327510796059584" - }, - { - "price":6.3, - "amount":691.00124186, - "price_int":"630000", - "amount_int":"69100124186", - "stamp":"1328578147725548" - }, - { - "price":6.30001, - "amount":15.873, - "price_int":"630001", - "amount_int":"1587300000", - "stamp":"1328136030011045" - }, - { - "price":6.30142, - "amount":0.05639658, - "price_int":"630142", - "amount_int":"5639658", - "stamp":"1328203945739699" - }, - { - "price":6.303, - "amount":1.035, - "price_int":"630300", - "amount_int":"103500000", - "stamp":"1327511710603228" - }, - { - "price":6.3034, - "amount":2.78365, - "price_int":"630340", - "amount_int":"278365000", - "stamp":"1327963647620421" - }, - { - "price":6.305, - "amount":0.01, - "price_int":"630500", - "amount_int":"1000000", - "stamp":"1328572862829340" - }, - { - "price":6.30972, - "amount":0.2338792, - "price_int":"630972", - "amount_int":"23387920", - "stamp":"1328438688792637" - }, - { - "price":6.30998, - "amount":1, - "price_int":"630998", - "amount_int":"100000000", - "stamp":"1328524870082387" - }, - { - "price":6.30999, - "amount":11.0135271, - "price_int":"630999", - "amount_int":"1101352710", - "stamp":"1327495634062611" - }, - { - "price":6.31, - "amount":0.0437156, - "price_int":"631000", - "amount_int":"4371560", - "stamp":"1327495898391418" - }, - { - "price":6.31099, - "amount":1, - "price_int":"631099", - "amount_int":"100000000", - "stamp":"1328525855021110" - }, - { - "price":6.311, - "amount":16.25246, - "price_int":"631100", - "amount_int":"1625246000", - "stamp":"1328571307434068" - }, - { - "price":6.31119, - "amount":0.27164, - "price_int":"631119", - "amount_int":"27164000", - "stamp":"1327694602254427" - }, - { - "price":6.31193, - "amount":0.0201216, - "price_int":"631193", - "amount_int":"2012160", - "stamp":"1328229760667961" - }, - { - "price":6.3125, - "amount":0.1, - "price_int":"631250", - "amount_int":"10000000", - "stamp":"1328567312832040" - }, - { - "price":6.31489, - "amount":1, - "price_int":"631489", - "amount_int":"100000000", - "stamp":"1328204313290703" - }, - { - "price":6.315, - "amount":0.01, - "price_int":"631500", - "amount_int":"1000000", - "stamp":"1328572866564459" - }, - { - "price":6.3173, - "amount":1.0327005, - "price_int":"631730", - "amount_int":"103270050", - "stamp":"1327471531961394" - }, - { - "price":6.31831, - "amount":1.40739271, - "price_int":"631831", - "amount_int":"140739271", - "stamp":"1328414476465506" - }, - { - "price":6.3188, - "amount":4, - "price_int":"631880", - "amount_int":"400000000", - "stamp":"1327513720642722" - }, - { - "price":6.31889, - "amount":1, - "price_int":"631889", - "amount_int":"100000000", - "stamp":"1328611199986054" - }, - { - "price":6.31898, - "amount":7.39133, - "price_int":"631898", - "amount_int":"739133000", - "stamp":"1328572090170897" - }, - { - "price":6.319, - "amount":215.199, - "price_int":"631900", - "amount_int":"21519900000", - "stamp":"1327498700522933" - }, - { - "price":6.31989, - "amount":1, - "price_int":"631989", - "amount_int":"100000000", - "stamp":"1328611204986935" - }, - { - "price":6.31999, - "amount":1.0141201, - "price_int":"631999", - "amount_int":"101412010", - "stamp":"1327457193299562" - }, - { - "price":6.32, - "amount":31.86106796, - "price_int":"632000", - "amount_int":"3186106796", - "stamp":"1328365321733126" - }, - { - "price":6.32019, - "amount":0.02296, - "price_int":"632019", - "amount_int":"2296000", - "stamp":"1328000796202178" - }, - { - "price":6.32026, - "amount":1, - "price_int":"632026", - "amount_int":"100000000", - "stamp":"1328525867104026" - }, - { - "price":6.32048, - "amount":0.56664, - "price_int":"632048", - "amount_int":"56664000", - "stamp":"1328571550432684" - }, - { - "price":6.32071, - "amount":1.91193, - "price_int":"632071", - "amount_int":"191193000", - "stamp":"1328642288659563" - }, - { - "price":6.32099, - "amount":1, - "price_int":"632099", - "amount_int":"100000000", - "stamp":"1328520027366723" - }, - { - "price":6.321, - "amount":100, - "price_int":"632100", - "amount_int":"10000000000", - "stamp":"1327497914165657" - }, - { - "price":6.32309, - "amount":0.0214761, - "price_int":"632309", - "amount_int":"2147610", - "stamp":"1328230087468634" - }, - { - "price":6.32377, - "amount":1, - "price_int":"632377", - "amount_int":"100000000", - "stamp":"1328525868562773" - }, - { - "price":6.325, - "amount":0.11, - "price_int":"632500", - "amount_int":"11000000", - "stamp":"1328572869898122" - }, - { - "price":6.32515, - "amount":6.5, - "price_int":"632515", - "amount_int":"650000000", - "stamp":"1328582779963269" - }, - { - "price":6.3265, - "amount":0.01, - "price_int":"632650", - "amount_int":"1000000", - "stamp":"1327501187938116" - }, - { - "price":6.32651, - "amount":1.26939698, - "price_int":"632651", - "amount_int":"126939698", - "stamp":"1328221825910308" - }, - { - "price":6.32699, - "amount":3.8625, - "price_int":"632699", - "amount_int":"386250000", - "stamp":"1327438963876521" - }, - { - "price":6.3273, - "amount":0.01017, - "price_int":"632730", - "amount_int":"1017000", - "stamp":"1328432307655193" - }, - { - "price":6.32745, - "amount":0.02152345, - "price_int":"632745", - "amount_int":"2152345", - "stamp":"1328134586203551" - }, - { - "price":6.32807, - "amount":0.0201224, - "price_int":"632807", - "amount_int":"2012240", - "stamp":"1328229754016849" - }, - { - "price":6.32834, - "amount":0.30398, - "price_int":"632834", - "amount_int":"30398000", - "stamp":"1328571454503577" - }, - { - "price":6.32999, - "amount":4.39136517, - "price_int":"632999", - "amount_int":"439136517", - "stamp":"1328525978696036" - }, - { - "price":6.33, - "amount":85.96371, - "price_int":"633000", - "amount_int":"8596371000", - "stamp":"1328564198015838" - }, - { - "price":6.33059, - "amount":0.08528, - "price_int":"633059", - "amount_int":"8528000", - "stamp":"1328458596073983" - }, - { - "price":6.33131, - "amount":0.10513, - "price_int":"633131", - "amount_int":"10513000", - "stamp":"1328050788295924" - }, - { - "price":6.33261, - "amount":1.76985726, - "price_int":"633261", - "amount_int":"176985726", - "stamp":"1328219359535847" - }, - { - "price":6.3336, - "amount":2.667815, - "price_int":"633360", - "amount_int":"266781500", - "stamp":"1327517481355844" - }, - { - "price":6.33416, - "amount":1.08411741, - "price_int":"633416", - "amount_int":"108411741", - "stamp":"1327510159741057" - }, - { - "price":6.335, - "amount":0.01, - "price_int":"633500", - "amount_int":"1000000", - "stamp":"1328572872773348" - }, - { - "price":6.33563, - "amount":0.04023, - "price_int":"633563", - "amount_int":"4023000", - "stamp":"1328451139890736" - }, - { - "price":6.33646, - "amount":0.021472, - "price_int":"633646", - "amount_int":"2147200", - "stamp":"1328230076734581" - }, - { - "price":6.337, - "amount":0.2535, - "price_int":"633700", - "amount_int":"25350000", - "stamp":"1328595128428349" - }, - { - "price":6.3375, - "amount":0.1, - "price_int":"633750", - "amount_int":"10000000", - "stamp":"1328567492084976" - }, - { - "price":6.33893, - "amount":0.39471, - "price_int":"633893", - "amount_int":"39471000", - "stamp":"1328576686478956" - }, - { - "price":6.33982, - "amount":1, - "price_int":"633982", - "amount_int":"100000000", - "stamp":"1328525874622071" - }, - { - "price":6.33999, - "amount":1.0155302, - "price_int":"633999", - "amount_int":"101553020", - "stamp":"1327439282053947" - }, - { - "price":6.34, - "amount":42.18586844, - "price_int":"634000", - "amount_int":"4218586844", - "stamp":"1328614083117904" - }, - { - "price":6.34189, - "amount":1, - "price_int":"634189", - "amount_int":"100000000", - "stamp":"1328526617950458" - }, - { - "price":6.34347, - "amount":0.72212, - "price_int":"634347", - "amount_int":"72212000", - "stamp":"1328459641359876" - }, - { - "price":6.34348, - "amount":0.27236, - "price_int":"634348", - "amount_int":"27236000", - "stamp":"1328580388293191" - }, - { - "price":6.34356, - "amount":0.33926, - "price_int":"634356", - "amount_int":"33926000", - "stamp":"1328488247520740" - }, - { - "price":6.34421, - "amount":25.0201232, - "price_int":"634421", - "amount_int":"2502012320", - "stamp":"1328427312835848" - }, - { - "price":6.34435, - "amount":0.03763, - "price_int":"634435", - "amount_int":"3763000", - "stamp":"1327854843502333" - }, - { - "price":6.34482, - "amount":1, - "price_int":"634482", - "amount_int":"100000000", - "stamp":"1327520838428152" - }, - { - "price":6.345, - "amount":2.2863, - "price_int":"634500", - "amount_int":"228630000", - "stamp":"1328572876620534" - }, - { - "price":6.34529, - "amount":1.138, - "price_int":"634529", - "amount_int":"113800000", - "stamp":"1328273489016397" - }, - { - "price":6.34552, - "amount":2.56231, - "price_int":"634552", - "amount_int":"256231000", - "stamp":"1327871366348418" - }, - { - "price":6.34651, - "amount":3.1491, - "price_int":"634651", - "amount_int":"314910000", - "stamp":"1327593622654143" - }, - { - "price":6.348, - "amount":0.2762, - "price_int":"634800", - "amount_int":"27620000", - "stamp":"1327903943753987" - }, - { - "price":6.34845, - "amount":0.045724, - "price_int":"634845", - "amount_int":"4572400", - "stamp":"1327603743721489" - }, - { - "price":6.34886, - "amount":2.8681, - "price_int":"634886", - "amount_int":"286810000", - "stamp":"1328571161422964" - }, - { - "price":6.349, - "amount":5, - "price_int":"634900", - "amount_int":"500000000", - "stamp":"1328212918725571" - }, - { - "price":6.34917, - "amount":0.19133, - "price_int":"634917", - "amount_int":"19133000", - "stamp":"1328459097853669" - }, - { - "price":6.34982, - "amount":0.0214663, - "price_int":"634982", - "amount_int":"2146630", - "stamp":"1328230068031584" - }, - { - "price":6.34988, - "amount":6.20519, - "price_int":"634988", - "amount_int":"620519000", - "stamp":"1328572005033427" - }, - { - "price":6.34997, - "amount":1.70299286, - "price_int":"634997", - "amount_int":"170299286", - "stamp":"1328216228870622" - }, - { - "price":6.34999, - "amount":168.0161526, - "price_int":"634999", - "amount_int":"16801615260", - "stamp":"1327736417929604" - }, - { - "price":6.35, - "amount":233.9436937, - "price_int":"635000", - "amount_int":"23394369370", - "stamp":"1328578154504452" - }, - { - "price":6.35001, - "amount":15.748, - "price_int":"635001", - "amount_int":"1574800000", - "stamp":"1328136043644689" - }, - { - "price":6.35332, - "amount":0.0214786, - "price_int":"635332", - "amount_int":"2147860", - "stamp":"1328230104556466" - }, - { - "price":6.35395, - "amount":0.44887, - "price_int":"635395", - "amount_int":"44887000", - "stamp":"1328620005191306" - }, - { - "price":6.35464, - "amount":0.08279, - "price_int":"635464", - "amount_int":"8279000", - "stamp":"1328568860714424" - }, - { - "price":6.355, - "amount":0.2088, - "price_int":"635500", - "amount_int":"20880000", - "stamp":"1328572885442331" - }, - { - "price":6.35987, - "amount":3.051, - "price_int":"635987", - "amount_int":"305100000", - "stamp":"1328560188205488" - }, - { - "price":6.35988, - "amount":303.9994, - "price_int":"635988", - "amount_int":"30399940000", - "stamp":"1328177474582193" - }, - { - "price":6.35999, - "amount":1.0168866, - "price_int":"635999", - "amount_int":"101688660", - "stamp":"1327439274360928" - }, - { - "price":6.36, - "amount":11.04402577, - "price_int":"636000", - "amount_int":"1104402577", - "stamp":"1327801580048137" - }, - { - "price":6.36036, - "amount":25.0201248, - "price_int":"636036", - "amount_int":"2502012480", - "stamp":"1328427328380773" - }, - { - "price":6.3607, - "amount":0.1439, - "price_int":"636070", - "amount_int":"14390000", - "stamp":"1328460452677142" - }, - { - "price":6.3625, - "amount":0.1, - "price_int":"636250", - "amount_int":"10000000", - "stamp":"1328567507257759" - }, - { - "price":6.36316, - "amount":1, - "price_int":"636316", - "amount_int":"100000000", - "stamp":"1328525887559511" - }, - { - "price":6.36317, - "amount":11.66651745, - "price_int":"636317", - "amount_int":"1166651745", - "stamp":"1327373465173911" - }, - { - "price":6.36319, - "amount":0.0214442, - "price_int":"636319", - "amount_int":"2144420", - "stamp":"1328202955305018" - }, - { - "price":6.3647, - "amount":0.1988, - "price_int":"636470", - "amount_int":"19880000", - "stamp":"1327443003944844" - }, - { - "price":6.365, - "amount":0.01, - "price_int":"636500", - "amount_int":"1000000", - "stamp":"1328572891084363" - }, - { - "price":6.36623, - "amount":1, - "price_int":"636623", - "amount_int":"100000000", - "stamp":"1327958519426428" - }, - { - "price":6.36707, - "amount":2.9636, - "price_int":"636707", - "amount_int":"296360000", - "stamp":"1327963648116957" - }, - { - "price":6.369, - "amount":0.2335, - "price_int":"636900", - "amount_int":"23350000", - "stamp":"1328483275805765" - }, - { - "price":6.36989, - "amount":1, - "price_int":"636989", - "amount_int":"100000000", - "stamp":"1328611219660642" - }, - { - "price":6.36999, - "amount":1.0173027, - "price_int":"636999", - "amount_int":"101730270", - "stamp":"1327439271205220" - }, - { - "price":6.37, - "amount":1.08242029, - "price_int":"637000", - "amount_int":"108242029", - "stamp":"1327498747915786" - }, - { - "price":6.37414, - "amount":1.16730102, - "price_int":"637414", - "amount_int":"116730102", - "stamp":"1328644626706431" - }, - { - "price":6.37475, - "amount":1.33224, - "price_int":"637475", - "amount_int":"133224000", - "stamp":"1328571307920295" - }, - { - "price":6.375, - "amount":12.51, - "price_int":"637500", - "amount_int":"1251000000", - "stamp":"1328572894222155" - }, - { - "price":6.37519, - "amount":0.50530437, - "price_int":"637519", - "amount_int":"50530437", - "stamp":"1328210264911145" - }, - { - "price":6.37533, - "amount":36.22971244, - "price_int":"637533", - "amount_int":"3622971244", - "stamp":"1327498503929037" - }, - { - "price":6.376, - "amount":0.803, - "price_int":"637600", - "amount_int":"80300000", - "stamp":"1327517447988232" - }, - { - "price":6.3765, - "amount":0.0301256, - "price_int":"637650", - "amount_int":"3012560", - "stamp":"1328229713551251" - }, - { - "price":6.37656, - "amount":0.0214401, - "price_int":"637656", - "amount_int":"2144010", - "stamp":"1328202782138958" - }, - { - "price":6.379, - "amount":11, - "price_int":"637900", - "amount_int":"1100000000", - "stamp":"1327395136074950" - }, - { - "price":6.37947, - "amount":4.03957649, - "price_int":"637947", - "amount_int":"403957649", - "stamp":"1328611218563326" - }, - { - "price":6.37957, - "amount":2, - "price_int":"637957", - "amount_int":"200000000", - "stamp":"1328526892149068" - }, - { - "price":6.37998, - "amount":1.11845135, - "price_int":"637998", - "amount_int":"111845135", - "stamp":"1327437645081692" - }, - { - "price":6.37999, - "amount":1.0174288, - "price_int":"637999", - "amount_int":"101742880", - "stamp":"1327367148846620" - }, - { - "price":6.38, - "amount":317.4520138, - "price_int":"638000", - "amount_int":"31745201380", - "stamp":"1328204512376696" - }, - { - "price":6.382, - "amount":0.2477, - "price_int":"638200", - "amount_int":"24770000", - "stamp":"1327383910734140" - }, - { - "price":6.38215, - "amount":0.285636, - "price_int":"638215", - "amount_int":"28563600", - "stamp":"1328211864351417" - }, - { - "price":6.3828, - "amount":6.26363, - "price_int":"638280", - "amount_int":"626363000", - "stamp":"1328054842550449" - }, - { - "price":6.3838, - "amount":3, - "price_int":"638380", - "amount_int":"300000000", - "stamp":"1328526711194510" - }, - { - "price":6.38381, - "amount":300, - "price_int":"638381", - "amount_int":"30000000000", - "stamp":"1327425509522408" - }, - { - "price":6.38385, - "amount":300, - "price_int":"638385", - "amount_int":"30000000000", - "stamp":"1327369205629358" - }, - { - "price":6.38403, - "amount":0.0243, - "price_int":"638403", - "amount_int":"2430000", - "stamp":"1328000796628857" - }, - { - "price":6.38433, - "amount":0.59857, - "price_int":"638433", - "amount_int":"59857000", - "stamp":"1328571551651770" - }, - { - "price":6.38456, - "amount":2.06813, - "price_int":"638456", - "amount_int":"206813000", - "stamp":"1328642289108822" - }, - { - "price":6.385, - "amount":10.01, - "price_int":"638500", - "amount_int":"1001000000", - "stamp":"1328572897322508" - }, - { - "price":6.38627, - "amount":1, - "price_int":"638627", - "amount_int":"100000000", - "stamp":"1328525911427144" - }, - { - "price":6.3875, - "amount":0.1, - "price_int":"638750", - "amount_int":"10000000", - "stamp":"1328567516931005" - }, - { - "price":6.38888, - "amount":4, - "price_int":"638888", - "amount_int":"400000000", - "stamp":"1328526881019337" - }, - { - "price":6.389, - "amount":51.1, - "price_int":"638900", - "amount_int":"5110000000", - "stamp":"1327510300888487" - }, - { - "price":6.38931, - "amount":300, - "price_int":"638931", - "amount_int":"30000000000", - "stamp":"1327339595326061" - }, - { - "price":6.38988, - "amount":40, - "price_int":"638988", - "amount_int":"4000000000", - "stamp":"1328642901418180" - }, - { - "price":6.38999, - "amount":1.0174719, - "price_int":"638999", - "amount_int":"101747190", - "stamp":"1327271053164436" - }, - { - "price":6.39, - "amount":15.0434294, - "price_int":"639000", - "amount_int":"1504342940", - "stamp":"1327494747627366" - }, - { - "price":6.39121, - "amount":0.01059, - "price_int":"639121", - "amount_int":"1059000", - "stamp":"1328430344316020" - }, - { - "price":6.39227, - "amount":0.32208, - "price_int":"639227", - "amount_int":"32208000", - "stamp":"1328571769777828" - }, - { - "price":6.39264, - "amount":0.0201264, - "price_int":"639264", - "amount_int":"2012640", - "stamp":"1328229705738119" - }, - { - "price":6.39276, - "amount":1, - "price_int":"639276", - "amount_int":"100000000", - "stamp":"1328525914373218" - }, - { - "price":6.39277, - "amount":57.21, - "price_int":"639277", - "amount_int":"5721000000", - "stamp":"1327520572723217" - }, - { - "price":6.39453, - "amount":0.08121, - "price_int":"639453", - "amount_int":"8121000", - "stamp":"1328401779658205" - }, - { - "price":6.395, - "amount":2.26, - "price_int":"639500", - "amount_int":"226000000", - "stamp":"1328572902804583" - }, - { - "price":6.39527, - "amount":0.11175, - "price_int":"639527", - "amount_int":"11175000", - "stamp":"1328050788757674" - }, - { - "price":6.39599, - "amount":1, - "price_int":"639599", - "amount_int":"100000000", - "stamp":"1328525917120914" - }, - { - "price":6.396, - "amount":0.3, - "price_int":"639600", - "amount_int":"30000000", - "stamp":"1327416640267044" - }, - { - "price":6.397, - "amount":25, - "price_int":"639700", - "amount_int":"2500000000", - "stamp":"1327328775911126" - }, - { - "price":6.39748, - "amount":0.995, - "price_int":"639748", - "amount_int":"99500000", - "stamp":"1327340343667156" - }, - { - "price":6.39789, - "amount":1, - "price_int":"639789", - "amount_int":"100000000", - "stamp":"1328524917583873" - }, - { - "price":6.3979, - "amount":20, - "price_int":"639790", - "amount_int":"2000000000", - "stamp":"1328175030095887" - }, - { - "price":6.399, - "amount":9.9, - "price_int":"639900", - "amount_int":"990000000", - "stamp":"1328160636265484" - }, - { - "price":6.39962, - "amount":0.04489, - "price_int":"639962", - "amount_int":"4489000", - "stamp":"1328457321622347" - }, - { - "price":6.39982, - "amount":5, - "price_int":"639982", - "amount_int":"500000000", - "stamp":"1328556558494792" - }, - { - "price":6.39983, - "amount":141.94461787, - "price_int":"639983", - "amount_int":"14194461787", - "stamp":"1327291607613950" - }, - { - "price":6.39984, - "amount":425.80386816, - "price_int":"639984", - "amount_int":"42580386816", - "stamp":"1327287063382344" - }, - { - "price":6.39999, - "amount":2.0266515, - "price_int":"639999", - "amount_int":"202665150", - "stamp":"1328220749376563" - }, - { - "price":6.4, - "amount":380.2897205, - "price_int":"640000", - "amount_int":"38028972050", - "stamp":"1328578171299657" - }, - { - "price":6.40079, - "amount":40.74618343, - "price_int":"640079", - "amount_int":"4074618343", - "stamp":"1328529537335158" - }, - { - "price":6.40296, - "amount":0.44037, - "price_int":"640296", - "amount_int":"44037000", - "stamp":"1328577653782676" - }, - { - "price":6.4033, - "amount":0.0210254, - "price_int":"640330", - "amount_int":"2102540", - "stamp":"1327512375614678" - }, - { - "price":6.40353, - "amount":0.0110334, - "price_int":"640353", - "amount_int":"1103340", - "stamp":"1327338070855616" - }, - { - "price":6.404, - "amount":0.1829, - "price_int":"640400", - "amount_int":"18290000", - "stamp":"1328367222486631" - }, - { - "price":6.405, - "amount":0.01, - "price_int":"640500", - "amount_int":"1000000", - "stamp":"1328612950321264" - }, - { - "price":6.40624, - "amount":1, - "price_int":"640624", - "amount_int":"100000000", - "stamp":"1328525934029803" - }, - { - "price":6.40625, - "amount":18.5553, - "price_int":"640625", - "amount_int":"1855530000", - "stamp":"1327490527866221" - }, - { - "price":6.4064, - "amount":3.932636, - "price_int":"640640", - "amount_int":"393263600", - "stamp":"1327517354326591" - }, - { - "price":6.40755, - "amount":0.76555, - "price_int":"640755", - "amount_int":"76555000", - "stamp":"1328459641792186" - }, - { - "price":6.40756, - "amount":0.28044, - "price_int":"640756", - "amount_int":"28044000", - "stamp":"1328579422171405" - }, - { - "price":6.40764, - "amount":0.35793, - "price_int":"640764", - "amount_int":"35793000", - "stamp":"1328488248033141" - }, - { - "price":6.40837, - "amount":1.199, - "price_int":"640837", - "amount_int":"119900000", - "stamp":"1328273519022506" - }, - { - "price":6.40843, - "amount":0.03969, - "price_int":"640843", - "amount_int":"3969000", - "stamp":"1327854844114957" - }, - { - "price":6.40873, - "amount":3.1185, - "price_int":"640873", - "amount_int":"311850000", - "stamp":"1327593574751732" - }, - { - "price":6.40879, - "amount":0.02, - "price_int":"640879", - "amount_int":"2000000", - "stamp":"1327572083464758" - }, - { - "price":6.40961, - "amount":2.69366, - "price_int":"640961", - "amount_int":"269366000", - "stamp":"1327871366802130" - }, - { - "price":6.40968, - "amount":1.02144896, - "price_int":"640968", - "amount_int":"102144896", - "stamp":"1328136733791822" - }, - { - "price":6.40999, - "amount":1.0184202, - "price_int":"640999", - "amount_int":"101842020", - "stamp":"1327271046536282" - }, - { - "price":6.41, - "amount":100.0434084, - "price_int":"641000", - "amount_int":"10004340840", - "stamp":"1328140216001888" - }, - { - "price":6.4105, - "amount":0.0972, - "price_int":"641050", - "amount_int":"9720000", - "stamp":"1327268521451737" - }, - { - "price":6.41099, - "amount":1.3002815, - "price_int":"641099", - "amount_int":"130028150", - "stamp":"1328525974694639" - }, - { - "price":6.411, - "amount":67.03, - "price_int":"641100", - "amount_int":"6703000000", - "stamp":"1327269536382799" - }, - { - "price":6.41234, - "amount":1, - "price_int":"641234", - "amount_int":"100000000", - "stamp":"1328526644428621" - }, - { - "price":6.41235, - "amount":12.830055, - "price_int":"641235", - "amount_int":"1283005500", - "stamp":"1327508709506981" - }, - { - "price":6.41299, - "amount":2.97966, - "price_int":"641299", - "amount_int":"297966000", - "stamp":"1328571161919134" - }, - { - "price":6.41331, - "amount":0.20243, - "price_int":"641331", - "amount_int":"20243000", - "stamp":"1328459098308159" - }, - { - "price":6.41402, - "amount":6.50811, - "price_int":"641402", - "amount_int":"650811000", - "stamp":"1328572005487442" - }, - { - "price":6.41409, - "amount":1, - "price_int":"641409", - "amount_int":"100000000", - "stamp":"1328525940660779" - }, - { - "price":6.4141, - "amount":10, - "price_int":"641410", - "amount_int":"1000000000", - "stamp":"1327502114081757" - }, - { - "price":6.415, - "amount":0.01, - "price_int":"641500", - "amount_int":"1000000", - "stamp":"1328612954328565" - }, - { - "price":6.4153, - "amount":0.995, - "price_int":"641530", - "amount_int":"99500000", - "stamp":"1327271104393297" - }, - { - "price":6.41666, - "amount":220.80268115, - "price_int":"641666", - "amount_int":"22080268115", - "stamp":"1328546755058638" - }, - { - "price":6.41757, - "amount":1, - "price_int":"641757", - "amount_int":"100000000", - "stamp":"1328204317890389" - }, - { - "price":6.41813, - "amount":0.48188, - "price_int":"641813", - "amount_int":"48188000", - "stamp":"1328620005617936" - }, - { - "price":6.41883, - "amount":0.08771, - "price_int":"641883", - "amount_int":"8771000", - "stamp":"1328568861168405" - }, - { - "price":6.41925, - "amount":1.48925032, - "price_int":"641925", - "amount_int":"148925032", - "stamp":"1328136962750705" - }, - { - "price":6.41929, - "amount":1, - "price_int":"641929", - "amount_int":"100000000", - "stamp":"1327354632324962" - }, - { - "price":6.41989, - "amount":1, - "price_int":"641989", - "amount_int":"100000000", - "stamp":"1328611224298786" - }, - { - "price":6.41999, - "amount":1.0189658, - "price_int":"641999", - "amount_int":"101896580", - "stamp":"1327271043148031" - }, - { - "price":6.42, - "amount":109.13259186, - "price_int":"642000", - "amount_int":"10913259186", - "stamp":"1328204469356656" - }, - { - "price":6.42399, - "amount":1, - "price_int":"642399", - "amount_int":"100000000", - "stamp":"1328525942892247" - }, - { - "price":6.424, - "amount":13.47, - "price_int":"642400", - "amount_int":"1347000000", - "stamp":"1327414504767604" - }, - { - "price":6.42493, - "amount":0.02, - "price_int":"642493", - "amount_int":"2000000", - "stamp":"1327572080156558" - }, - { - "price":6.42495, - "amount":0.15303, - "price_int":"642495", - "amount_int":"15303000", - "stamp":"1328460453408242" - }, - { - "price":6.425, - "amount":0.11, - "price_int":"642500", - "amount_int":"11000000", - "stamp":"1328612957401391" - }, - { - "price":6.42535, - "amount":0.995, - "price_int":"642535", - "amount_int":"99500000", - "stamp":"1327271104935210" - }, - { - "price":6.42599, - "amount":1, - "price_int":"642599", - "amount_int":"100000000", - "stamp":"1328520118651076" - }, - { - "price":6.426, - "amount":85.91048834, - "price_int":"642600", - "amount_int":"8591048834", - "stamp":"1327511582118761" - }, - { - "price":6.42924, - "amount":0.26238, - "price_int":"642924", - "amount_int":"26238000", - "stamp":"1328464900608729" - }, - { - "price":6.42989, - "amount":2, - "price_int":"642989", - "amount_int":"200000000", - "stamp":"1328611204083980" - }, - { - "price":6.42999, - "amount":12.8045944, - "price_int":"642999", - "amount_int":"1280459440", - "stamp":"1327510517219229" - }, - { - "price":6.43, - "amount":3.0433793, - "price_int":"643000", - "amount_int":"304337930", - "stamp":"1328638656983452" - }, - { - "price":6.43002, - "amount":12, - "price_int":"643002", - "amount_int":"1200000000", - "stamp":"1327599764215175" - }, - { - "price":6.43003, - "amount":0.0211138, - "price_int":"643003", - "amount_int":"2111380", - "stamp":"1327512004186223" - }, - { - "price":6.43138, - "amount":3.14176, - "price_int":"643138", - "amount_int":"314176000", - "stamp":"1327963648721670" - }, - { - "price":6.4342, - "amount":2, - "price_int":"643420", - "amount_int":"200000000", - "stamp":"1328573545456492" - }, - { - "price":6.435, - "amount":0.01, - "price_int":"643500", - "amount_int":"1000000", - "stamp":"1328612961110818" - }, - { - "price":6.43539, - "amount":0.995, - "price_int":"643539", - "amount_int":"99500000", - "stamp":"1327271103834687" - }, - { - "price":6.43914, - "amount":1.41122, - "price_int":"643914", - "amount_int":"141122000", - "stamp":"1328571308406921" - }, - { - "price":6.43999, - "amount":1.0210411, - "price_int":"643999", - "amount_int":"102104110", - "stamp":"1327271037060451" - }, - { - "price":6.44, - "amount":2.0433654, - "price_int":"644000", - "amount_int":"204336540", - "stamp":"1327863718617111" - }, - { - "price":6.44107, - "amount":5.02, - "price_int":"644107", - "amount_int":"502000000", - "stamp":"1327572076760099" - }, - { - "price":6.4434, - "amount":0.0211084, - "price_int":"644340", - "amount_int":"2110840", - "stamp":"1327512001314403" - }, - { - "price":6.445, - "amount":0.03766448, - "price_int":"644500", - "amount_int":"3766448", - "stamp":"1328612988937360" - }, - { - "price":6.44727, - "amount":1, - "price_int":"644727", - "amount_int":"100000000", - "stamp":"1328526659140652" - }, - { - "price":6.44728, - "amount":6.61301, - "price_int":"644728", - "amount_int":"661301000", - "stamp":"1328054843060442" - }, - { - "price":6.44774, - "amount":0.0210316, - "price_int":"644774", - "amount_int":"2103160", - "stamp":"1327512402562215" - }, - { - "price":6.44852, - "amount":0.02562, - "price_int":"644852", - "amount_int":"2562000", - "stamp":"1328000797059626" - }, - { - "price":6.44881, - "amount":0.63018, - "price_int":"644881", - "amount_int":"63018000", - "stamp":"1328571553927821" - }, - { - "price":6.449, - "amount":8.2, - "price_int":"644900", - "amount_int":"820000000", - "stamp":"1327518080706430" - }, - { - "price":6.44905, - "amount":2.22276, - "price_int":"644905", - "amount_int":"222276000", - "stamp":"1328642289560623" - }, - { - "price":6.44998, - "amount":1, - "price_int":"644998", - "amount_int":"100000000", - "stamp":"1328520124081746" - }, - { - "price":6.44999, - "amount":2.0213609, - "price_int":"644999", - "amount_int":"202136090", - "stamp":"1327495572565272" - }, - { - "price":6.45, - "amount":550.95617675, - "price_int":"645000", - "amount_int":"55095617675", - "stamp":"1328578177186427" - }, - { - "price":6.45146, - "amount":1, - "price_int":"645146", - "amount_int":"100000000", - "stamp":"1328525956449317" - }, - { - "price":6.45147, - "amount":39.77, - "price_int":"645147", - "amount_int":"3977000000", - "stamp":"1327708417735286" - }, - { - "price":6.45299, - "amount":1, - "price_int":"645299", - "amount_int":"100000000", - "stamp":"1328525957447178" - }, - { - "price":6.453, - "amount":6.88544098, - "price_int":"645300", - "amount_int":"688544098", - "stamp":"1328547513705647" - }, - { - "price":6.455, - "amount":0.01, - "price_int":"645500", - "amount_int":"1000000", - "stamp":"1328612992335314" - }, - { - "price":6.4552, - "amount":0.01694318, - "price_int":"645520", - "amount_int":"1694318", - "stamp":"1327163818471967" - }, - { - "price":6.45577, - "amount":0.01142, - "price_int":"645577", - "amount_int":"1142000", - "stamp":"1328430344796532" - }, - { - "price":6.456, - "amount":0.2469, - "price_int":"645600", - "amount_int":"24690000", - "stamp":"1328519443160199" - }, - { - "price":6.45669, - "amount":1, - "price_int":"645669", - "amount_int":"100000000", - "stamp":"1328524957638623" - }, - { - "price":6.4567, - "amount":50, - "price_int":"645670", - "amount_int":"5000000000", - "stamp":"1328231337195601" - }, - { - "price":6.45677, - "amount":0.0209999, - "price_int":"645677", - "amount_int":"2099990", - "stamp":"1327510194176474" - }, - { - "price":6.45683, - "amount":0.34538, - "price_int":"645683", - "amount_int":"34538000", - "stamp":"1328572727905861" - }, - { - "price":6.45722, - "amount":50.931686, - "price_int":"645722", - "amount_int":"5093168600", - "stamp":"1328461364436633" - }, - { - "price":6.45912, - "amount":0.09289, - "price_int":"645912", - "amount_int":"9289000", - "stamp":"1328435200977397" - }, - { - "price":6.45987, - "amount":0.11831, - "price_int":"645987", - "amount_int":"11831000", - "stamp":"1328050789214804" - }, - { - "price":6.4599, - "amount":0.5, - "price_int":"645990", - "amount_int":"50000000", - "stamp":"1327512489980482" - }, - { - "price":6.45999, - "amount":1.0162453, - "price_int":"645999", - "amount_int":"101624530", - "stamp":"1327133868620871" - }, - { - "price":6.46, - "amount":0.0433176, - "price_int":"646000", - "amount_int":"4331760", - "stamp":"1327863724770887" - }, - { - "price":6.46367, - "amount":1, - "price_int":"646367", - "amount_int":"100000000", - "stamp":"1328525959637346" - }, - { - "price":6.46368, - "amount":20.42448, - "price_int":"646368", - "amount_int":"2042448000", - "stamp":"1328464634062647" - }, - { - "price":6.46427, - "amount":0.04757, - "price_int":"646427", - "amount_int":"4757000", - "stamp":"1328457322067367" - }, - { - "price":6.4644, - "amount":0.0115304, - "price_int":"646440", - "amount_int":"1153040", - "stamp":"1327259057440603" - }, - { - "price":6.465, - "amount":0.01, - "price_int":"646500", - "amount_int":"1000000", - "stamp":"1328612995935488" - }, - { - "price":6.46764, - "amount":0.464, - "price_int":"646764", - "amount_int":"46400000", - "stamp":"1328577654282290" - }, - { - "price":6.46891, - "amount":1, - "price_int":"646891", - "amount_int":"100000000", - "stamp":"1327958524097293" - }, - { - "price":6.4699, - "amount":28, - "price_int":"646990", - "amount_int":"2800000000", - "stamp":"1328477304730888" - }, - { - "price":6.46999, - "amount":1.0165254, - "price_int":"646999", - "amount_int":"101652540", - "stamp":"1327133865361754" - }, - { - "price":6.47, - "amount":106.9097013, - "price_int":"647000", - "amount_int":"10690970130", - "stamp":"1328389256530461" - }, - { - "price":6.47014, - "amount":0.0209942, - "price_int":"647014", - "amount_int":"2099420", - "stamp":"1327510191432770" - }, - { - "price":6.47095, - "amount":3.0885, - "price_int":"647095", - "amount_int":"308850000", - "stamp":"1327593529434028" - }, - { - "price":6.47113, - "amount":0.011431, - "price_int":"647113", - "amount_int":"1143100", - "stamp":"1327320801870543" - }, - { - "price":6.472, - "amount":10, - "price_int":"647200", - "amount_int":"1000000000", - "stamp":"1328293885938090" - }, - { - "price":6.47227, - "amount":0.80854, - "price_int":"647227", - "amount_int":"80854000", - "stamp":"1328459642270353" - }, - { - "price":6.47228, - "amount":0.29511, - "price_int":"647228", - "amount_int":"29511000", - "stamp":"1328579422672968" - }, - { - "price":6.47236, - "amount":0.37642, - "price_int":"647236", - "amount_int":"37642000", - "stamp":"1328488248533869" - }, - { - "price":6.47316, - "amount":0.04174, - "price_int":"647316", - "amount_int":"4174000", - "stamp":"1327854844615027" - }, - { - "price":6.47336, - "amount":0.02, - "price_int":"647336", - "amount_int":"2000000", - "stamp":"1327572069218475" - }, - { - "price":6.47436, - "amount":2.82371, - "price_int":"647436", - "amount_int":"282371000", - "stamp":"1327871367258104" - }, - { - "price":6.475, - "amount":0.11, - "price_int":"647500", - "amount_int":"11000000", - "stamp":"1328613000646705" - }, - { - "price":6.4753, - "amount":1, - "price_int":"647530", - "amount_int":"100000000", - "stamp":"1328195734940409" - }, - { - "price":6.47755, - "amount":0.995, - "price_int":"647755", - "amount_int":"99500000", - "stamp":"1327133935311336" - }, - { - "price":6.47776, - "amount":3.20322, - "price_int":"647776", - "amount_int":"320322000", - "stamp":"1328571462072337" - }, - { - "price":6.47809, - "amount":0.21343, - "price_int":"647809", - "amount_int":"21343000", - "stamp":"1328459098885184" - }, - { - "price":6.47881, - "amount":7.10341, - "price_int":"647881", - "amount_int":"710341000", - "stamp":"1328571985617492" - }, - { - "price":6.4792, - "amount":2.22, - "price_int":"647920", - "amount_int":"222000000", - "stamp":"1328055551119990" - }, - { - "price":6.47999, - "amount":1.0167922, - "price_int":"647999", - "amount_int":"101679220", - "stamp":"1327133679968143" - }, - { - "price":6.48, - "amount":222.56889237, - "price_int":"648000", - "amount_int":"22256889237", - "stamp":"1328641984595159" - }, - { - "price":6.4829, - "amount":1, - "price_int":"648290", - "amount_int":"100000000", - "stamp":"1327150609043590" - }, - { - "price":6.48296, - "amount":0.51456, - "price_int":"648296", - "amount_int":"51456000", - "stamp":"1328620006049210" - }, - { - "price":6.4835, - "amount":0.0209917, - "price_int":"648350", - "amount_int":"2099170", - "stamp":"1327510188362991" - }, - { - "price":6.48366, - "amount":0.09258, - "price_int":"648366", - "amount_int":"9258000", - "stamp":"1328568861627000" - }, - { - "price":6.48391, - "amount":1.52035994, - "price_int":"648391", - "amount_int":"152035994", - "stamp":"1328644627031770" - }, - { - "price":6.485, - "amount":4.21, - "price_int":"648500", - "amount_int":"421000000", - "stamp":"1328613004272666" - }, - { - "price":6.487, - "amount":16.6509969, - "price_int":"648700", - "amount_int":"1665099690", - "stamp":"1328133845769239" - }, - { - "price":6.48889, - "amount":10, - "price_int":"648889", - "amount_int":"1000000000", - "stamp":"1327218806945532" - }, - { - "price":6.489, - "amount":107.23, - "price_int":"648900", - "amount_int":"10723000000", - "stamp":"1328431319099080" - }, - { - "price":6.48985, - "amount":0.16207, - "price_int":"648985", - "amount_int":"16207000", - "stamp":"1328460454128966" - }, - { - "price":6.48999, - "amount":26.0171217, - "price_int":"648999", - "amount_int":"2601712170", - "stamp":"1327184297516748" - }, - { - "price":6.49, - "amount":263.27242553, - "price_int":"649000", - "amount_int":"26327242553", - "stamp":"1328616898677102" - }, - { - "price":6.492, - "amount":86, - "price_int":"649200", - "amount_int":"8600000000", - "stamp":"1327773589983726" - }, - { - "price":6.495, - "amount":20.57679912, - "price_int":"649500", - "amount_int":"2057679912", - "stamp":"1328613008532140" - }, - { - "price":6.49626, - "amount":0.02747277, - "price_int":"649626", - "amount_int":"2747277", - "stamp":"1327291863526713" - }, - { - "price":6.49635, - "amount":3.31814, - "price_int":"649635", - "amount_int":"331814000", - "stamp":"1327963649271581" - }, - { - "price":6.49687, - "amount":0.0210372, - "price_int":"649687", - "amount_int":"2103720", - "stamp":"1327510184934877" - }, - { - "price":6.498, - "amount":1.00414987, - "price_int":"649800", - "amount_int":"100414987", - "stamp":"1327566445152923" - }, - { - "price":6.49877, - "amount":20, - "price_int":"649877", - "amount_int":"2000000000", - "stamp":"1328137111939753" - }, - { - "price":6.4989, - "amount":14.21116416, - "price_int":"649890", - "amount_int":"1421116416", - "stamp":"1327265781086341" - }, - { - "price":6.499, - "amount":516.48665825, - "price_int":"649900", - "amount_int":"51648665825", - "stamp":"1328165891670480" - }, - { - "price":6.4998, - "amount":0.62622, - "price_int":"649980", - "amount_int":"62622000", - "stamp":"1327181226264300" - }, - { - "price":6.49989, - "amount":3.004, - "price_int":"649989", - "amount_int":"300400000", - "stamp":"1327576579068082" - }, - { - "price":6.4999, - "amount":5, - "price_int":"649990", - "amount_int":"500000000", - "stamp":"1327451158394337" - }, - { - "price":6.49999, - "amount":1007.61741496, - "price_int":"649999", - "amount_int":"100761741496", - "stamp":"1328582393301637" - }, - { - "price":6.5, - "amount":2324.8748514, - "price_int":"650000", - "amount_int":"232487485140", - "stamp":"1328629390227380" - }, - { - "price":6.50402, - "amount":0.01693637, - "price_int":"650402", - "amount_int":"1693637", - "stamp":"1327304835913732" - }, - { - "price":6.50418, - "amount":1.4894, - "price_int":"650418", - "amount_int":"148940000", - "stamp":"1328571309028924" - }, - { - "price":6.505, - "amount":0.01, - "price_int":"650500", - "amount_int":"1000000", - "stamp":"1328613015471769" - }, - { - "price":6.50564, - "amount":0.02, - "price_int":"650564", - "amount_int":"2000000", - "stamp":"1327572063338267" - }, - { - "price":6.50999, - "amount":1.0169724, - "price_int":"650999", - "amount_int":"101697240", - "stamp":"1327133213520673" - }, - { - "price":6.51, - "amount":490.56153296, - "price_int":"651000", - "amount_int":"49056153296", - "stamp":"1328296901229986" - }, - { - "price":6.51024, - "amount":0.0210629, - "price_int":"651024", - "amount_int":"2106290", - "stamp":"1327510181787667" - }, - { - "price":6.51082, - "amount":0.995, - "price_int":"651082", - "amount_int":"99500000", - "stamp":"1327133290206585" - }, - { - "price":6.511, - "amount":25, - "price_int":"651100", - "amount_int":"2500000000", - "stamp":"1327543011485269" - }, - { - "price":6.5124, - "amount":6.9589, - "price_int":"651240", - "amount_int":"695890000", - "stamp":"1328054843569862" - }, - { - "price":6.51365, - "amount":0.02693, - "price_int":"651365", - "amount_int":"2693000", - "stamp":"1328000797494918" - }, - { - "price":6.51395, - "amount":0.66147, - "price_int":"651395", - "amount_int":"66147000", - "stamp":"1328571554438284" - }, - { - "price":6.51419, - "amount":2.37585, - "price_int":"651419", - "amount_int":"237585000", - "stamp":"1328642290035914" - }, - { - "price":6.515, - "amount":0.01, - "price_int":"651500", - "amount_int":"1000000", - "stamp":"1328613018605202" - }, - { - "price":6.51596, - "amount":0.02, - "price_int":"651596", - "amount_int":"2000000", - "stamp":"1327572065807531" - }, - { - "price":6.516, - "amount":6.9572556, - "price_int":"651600", - "amount_int":"695725560", - "stamp":"1327583472342482" - }, - { - "price":6.51778, - "amount":4.4, - "price_int":"651778", - "amount_int":"440000000", - "stamp":"1328068040191882" - }, - { - "price":6.51999, - "amount":1.0170559, - "price_int":"651999", - "amount_int":"101705590", - "stamp":"1327131725668947" - }, - { - "price":6.52, - "amount":20.0432639, - "price_int":"652000", - "amount_int":"2004326390", - "stamp":"1328169375820293" - }, - { - "price":6.52025, - "amount":1, - "price_int":"652025", - "amount_int":"100000000", - "stamp":"1328204322305729" - }, - { - "price":6.52098, - "amount":0.01224, - "price_int":"652098", - "amount_int":"1224000", - "stamp":"1328430345290896" - }, - { - "price":6.52179, - "amount":0.02, - "price_int":"652179", - "amount_int":"2000000", - "stamp":"1327572060462505" - }, - { - "price":6.52206, - "amount":0.36968, - "price_int":"652206", - "amount_int":"36968000", - "stamp":"1328573390205059" - }, - { - "price":6.52361, - "amount":0.0210602, - "price_int":"652361", - "amount_int":"2106020", - "stamp":"1327510178346777" - }, - { - "price":6.52437, - "amount":0.08345, - "price_int":"652437", - "amount_int":"8345000", - "stamp":"1328131923434311" - }, - { - "price":6.525, - "amount":0.1, - "price_int":"652500", - "amount_int":"10000000", - "stamp":"1327280575858894" - }, - { - "price":6.52512, - "amount":0.1248, - "price_int":"652512", - "amount_int":"12480000", - "stamp":"1328050789675048" - }, - { - "price":6.52772, - "amount":300, - "price_int":"652772", - "amount_int":"30000000000", - "stamp":"1327131783591579" - }, - { - "price":6.528, - "amount":12.45292014, - "price_int":"652800", - "amount_int":"1245292014", - "stamp":"1327138509259034" - }, - { - "price":6.52864, - "amount":0.0890624, - "price_int":"652864", - "amount_int":"8906240", - "stamp":"1327337845392825" - }, - { - "price":6.52956, - "amount":0.05023, - "price_int":"652956", - "amount_int":"5023000", - "stamp":"1328457322514105" - }, - { - "price":6.52999, - "amount":1.0170747, - "price_int":"652999", - "amount_int":"101707470", - "stamp":"1327131696357105" - }, - { - "price":6.53, - "amount":138.03309951, - "price_int":"653000", - "amount_int":"13803309951", - "stamp":"1328455450235414" - }, - { - "price":6.53297, - "amount":0.4874, - "price_int":"653297", - "amount_int":"48740000", - "stamp":"1328577654731893" - }, - { - "price":6.53317, - "amount":3.0591, - "price_int":"653317", - "amount_int":"305910000", - "stamp":"1327593475459839" - }, - { - "price":6.53698, - "amount":0.0210573, - "price_int":"653698", - "amount_int":"2105730", - "stamp":"1327510175148157" - }, - { - "price":6.537, - "amount":0.2633, - "price_int":"653700", - "amount_int":"26330000", - "stamp":"1327187702390943" - }, - { - "price":6.53765, - "amount":0.85111, - "price_int":"653765", - "amount_int":"85111000", - "stamp":"1328459642736159" - }, - { - "price":6.53774, - "amount":0.39472, - "price_int":"653774", - "amount_int":"39472000", - "stamp":"1328488249043801" - }, - { - "price":6.53855, - "amount":0.04376, - "price_int":"653855", - "amount_int":"4376000", - "stamp":"1327854845123216" - }, - { - "price":6.5388, - "amount":0.9724, - "price_int":"653880", - "amount_int":"97240000", - "stamp":"1327141713578196" - }, - { - "price":6.53889, - "amount":39.7563309, - "price_int":"653889", - "amount_int":"3975633090", - "stamp":"1327214803450915" - }, - { - "price":6.53975, - "amount":2.95245, - "price_int":"653975", - "amount_int":"295245000", - "stamp":"1327871367937977" - }, - { - "price":6.53999, - "amount":4.2672473, - "price_int":"653999", - "amount_int":"426724730", - "stamp":"1327969881303794" - }, - { - "price":6.54, - "amount":998.39387377, - "price_int":"654000", - "amount_int":"99839387377", - "stamp":"1327863739138806" - }, - { - "price":6.543, - "amount":25, - "price_int":"654300", - "amount_int":"2500000000", - "stamp":"1327593649163296" - }, - { - "price":6.54319, - "amount":2.75979, - "price_int":"654319", - "amount_int":"275979000", - "stamp":"1327803555975889" - }, - { - "price":6.54352, - "amount":0.22431, - "price_int":"654352", - "amount_int":"22431000", - "stamp":"1328459099374610" - }, - { - "price":6.54425, - "amount":7.38694, - "price_int":"654425", - "amount_int":"738694000", - "stamp":"1328571986054129" - }, - { - "price":6.545, - "amount":14.91, - "price_int":"654500", - "amount_int":"1491000000", - "stamp":"1327133759317546" - }, - { - "price":6.54583, - "amount":0.995, - "price_int":"654583", - "amount_int":"99500000", - "stamp":"1327131717019050" - }, - { - "price":6.54844, - "amount":0.54692, - "price_int":"654844", - "amount_int":"54692000", - "stamp":"1328620006488763" - }, - { - "price":6.54899, - "amount":2, - "price_int":"654899", - "amount_int":"200000000", - "stamp":"1327205813129681" - }, - { - "price":6.54916, - "amount":0.09741, - "price_int":"654916", - "amount_int":"9741000", - "stamp":"1328568862100660" - }, - { - "price":6.5499, - "amount":5.59, - "price_int":"654990", - "amount_int":"559000000", - "stamp":"1327391972621651" - }, - { - "price":6.54999, - "amount":1.0174382, - "price_int":"654999", - "amount_int":"101743820", - "stamp":"1327131663658078" - }, - { - "price":6.55, - "amount":341.84077041, - "price_int":"655000", - "amount_int":"34184077041", - "stamp":"1328578201171715" - }, - { - "price":6.55008, - "amount":0.02667757, - "price_int":"655008", - "amount_int":"2667757", - "stamp":"1327324091941523" - }, - { - "price":6.55009, - "amount":30, - "price_int":"655009", - "amount_int":"3000000000", - "stamp":"1328126794714714" - }, - { - "price":6.55034, - "amount":60.82059591, - "price_int":"655034", - "amount_int":"6082059591", - "stamp":"1328469962116490" - }, - { - "price":6.55093, - "amount":0.00560477, - "price_int":"655093", - "amount_int":"560477", - "stamp":"1327259351804651" - }, - { - "price":6.55109, - "amount":0.995, - "price_int":"655109", - "amount_int":"99500000", - "stamp":"1327055095616563" - }, - { - "price":6.55167, - "amount":0.02064889, - "price_int":"655167", - "amount_int":"2064889", - "stamp":"1327146408712320" - }, - { - "price":6.552, - "amount":2.580987, - "price_int":"655200", - "amount_int":"258098700", - "stamp":"1327154576957613" - }, - { - "price":6.553, - "amount":0.1829, - "price_int":"655300", - "amount_int":"18290000", - "stamp":"1328367227856131" - }, - { - "price":6.55407, - "amount":0.02, - "price_int":"655407", - "amount_int":"2000000", - "stamp":"1327572054510563" - }, - { - "price":6.5554, - "amount":0.17102, - "price_int":"655540", - "amount_int":"17102000", - "stamp":"1328460454546390" - }, - { - "price":6.5556, - "amount":5, - "price_int":"655560", - "amount_int":"500000000", - "stamp":"1327762337430678" - }, - { - "price":6.55723, - "amount":0.04814797, - "price_int":"655723", - "amount_int":"4814797", - "stamp":"1327319358551443" - }, - { - "price":6.55747, - "amount":0.02826839, - "price_int":"655747", - "amount_int":"2826839", - "stamp":"1327098096886238" - }, - { - "price":6.55788, - "amount":0.995, - "price_int":"655788", - "amount_int":"99500000", - "stamp":"1327092866709868" - }, - { - "price":6.55838, - "amount":300, - "price_int":"655838", - "amount_int":"30000000000", - "stamp":"1327097789679442" - }, - { - "price":6.55999, - "amount":1.0168964, - "price_int":"655999", - "amount_int":"101689640", - "stamp":"1327055036330533" - }, - { - "price":6.56, - "amount":11.0432024, - "price_int":"656000", - "amount_int":"1104320240", - "stamp":"1327863742031417" - }, - { - "price":6.56081, - "amount":15.9355, - "price_int":"656081", - "amount_int":"1593550000", - "stamp":"1328140592343413" - }, - { - "price":6.56088, - "amount":0.995, - "price_int":"656088", - "amount_int":"99500000", - "stamp":"1327131716433259" - }, - { - "price":6.56197, - "amount":3.49275, - "price_int":"656197", - "amount_int":"349275000", - "stamp":"1327963649891812" - }, - { - "price":6.56371, - "amount":0.021053, - "price_int":"656371", - "amount_int":"2105300", - "stamp":"1327510168648698" - }, - { - "price":6.56458, - "amount":0.02, - "price_int":"656458", - "amount_int":"2000000", - "stamp":"1327572057359975" - }, - { - "price":6.56594, - "amount":0.05474674, - "price_int":"656594", - "amount_int":"5474674", - "stamp":"1327326139422945" - }, - { - "price":6.56601, - "amount":0.0457108, - "price_int":"656601", - "amount_int":"4571080", - "stamp":"1327072095903598" - }, - { - "price":6.5662, - "amount":0.03781037, - "price_int":"656620", - "amount_int":"3781037", - "stamp":"1327321097396617" - }, - { - "price":6.56655, - "amount":0.02937976, - "price_int":"656655", - "amount_int":"2937976", - "stamp":"1327070831285932" - }, - { - "price":6.567, - "amount":1.2589, - "price_int":"656700", - "amount_int":"125890000", - "stamp":"1327262223570857" - }, - { - "price":6.56786, - "amount":0.05197342, - "price_int":"656786", - "amount_int":"5197342", - "stamp":"1327064468705574" - }, - { - "price":6.56838, - "amount":0.08686638, - "price_int":"656838", - "amount_int":"8686638", - "stamp":"1327055464195507" - }, - { - "price":6.5692, - "amount":0.0704556, - "price_int":"656920", - "amount_int":"7045560", - "stamp":"1327058094031368" - }, - { - "price":6.56988, - "amount":1.56681, - "price_int":"656988", - "amount_int":"156681000", - "stamp":"1328571309539696" - }, - { - "price":6.56999, - "amount":1.0168192, - "price_int":"656999", - "amount_int":"101681920", - "stamp":"1327055033162240" - }, - { - "price":6.57, - "amount":11.0431878, - "price_int":"657000", - "amount_int":"1104318780", - "stamp":"1327494595734423" - }, - { - "price":6.57022, - "amount":0.02, - "price_int":"657022", - "amount_int":"2000000", - "stamp":"1327572052032180" - }, - { - "price":6.57159, - "amount":1, - "price_int":"657159", - "amount_int":"100000000", - "stamp":"1327958529176491" - }, - { - "price":6.57371, - "amount":0.31863982, - "price_int":"657371", - "amount_int":"31863982", - "stamp":"1327096646687912" - }, - { - "price":6.57494, - "amount":0.995, - "price_int":"657494", - "amount_int":"99500000", - "stamp":"1327071250288990" - }, - { - "price":6.57496, - "amount":0.04783485, - "price_int":"657496", - "amount_int":"4783485", - "stamp":"1327064486166514" - }, - { - "price":6.575, - "amount":0.1, - "price_int":"657500", - "amount_int":"10000000", - "stamp":"1327280210906204" - }, - { - "price":6.57594, - "amount":0.995, - "price_int":"657594", - "amount_int":"99500000", - "stamp":"1327104955145708" - }, - { - "price":6.57612, - "amount":0.0296746, - "price_int":"657612", - "amount_int":"2967460", - "stamp":"1327098119860232" - }, - { - "price":6.57708, - "amount":0.0210487, - "price_int":"657708", - "amount_int":"2104870", - "stamp":"1327510164360325" - }, - { - "price":6.57757, - "amount":0.02311598, - "price_int":"657757", - "amount_int":"2311598", - "stamp":"1327146457052775" - }, - { - "price":6.57796, - "amount":0.02191389, - "price_int":"657796", - "amount_int":"2191389", - "stamp":"1327146431615979" - }, - { - "price":6.578, - "amount":0.2084, - "price_int":"657800", - "amount_int":"20840000", - "stamp":"1328442147569927" - }, - { - "price":6.57818, - "amount":7.30133, - "price_int":"657818", - "amount_int":"730133000", - "stamp":"1328054844240061" - }, - { - "price":6.57945, - "amount":0.02822, - "price_int":"657945", - "amount_int":"2822000", - "stamp":"1328000797926839" - }, - { - "price":6.57975, - "amount":0.69245, - "price_int":"657975", - "amount_int":"69245000", - "stamp":"1328571554951308" - }, - { - "price":6.57999, - "amount":3.5439815, - "price_int":"657999", - "amount_int":"354398150", - "stamp":"1328642290507468" - }, - { - "price":6.58, - "amount":62.81398481, - "price_int":"658000", - "amount_int":"6281398481", - "stamp":"1327863746795186" - }, - { - "price":6.58074, - "amount":0.02068936, - "price_int":"658074", - "amount_int":"2068936", - "stamp":"1327146483141569" - }, - { - "price":6.583, - "amount":3, - "price_int":"658300", - "amount_int":"300000000", - "stamp":"1326883920482403" - }, - { - "price":6.58636, - "amount":0.02, - "price_int":"658636", - "amount_int":"2000000", - "stamp":"1327572049035200" - }, - { - "price":6.58685, - "amount":0.01306, - "price_int":"658685", - "amount_int":"1306000", - "stamp":"1328430345778061" - }, - { - "price":6.58793, - "amount":0.38747, - "price_int":"658793", - "amount_int":"38747000", - "stamp":"1328573391652948" - }, - { - "price":6.58857, - "amount":100, - "price_int":"658857", - "amount_int":"10000000000", - "stamp":"1327807766854627" - }, - { - "price":6.589, - "amount":50, - "price_int":"658900", - "amount_int":"5000000000", - "stamp":"1327854238111479" - }, - { - "price":6.58999, - "amount":1.0135751, - "price_int":"658999", - "amount_int":"101357510", - "stamp":"1326850443413626" - }, - { - "price":6.59, - "amount":11.0430246, - "price_int":"659000", - "amount_int":"1104302460", - "stamp":"1327494590205960" - }, - { - "price":6.59027, - "amount":0.09318, - "price_int":"659027", - "amount_int":"9318000", - "stamp":"1328131927917134" - }, - { - "price":6.59045, - "amount":0.0210424, - "price_int":"659045", - "amount_int":"2104240", - "stamp":"1327510161155412" - }, - { - "price":6.5908, - "amount":5, - "price_int":"659080", - "amount_int":"500000000", - "stamp":"1328051902819562" - }, - { - "price":6.59103, - "amount":0.13122, - "price_int":"659103", - "amount_int":"13122000", - "stamp":"1328050790107797" - }, - { - "price":6.592, - "amount":0.66768, - "price_int":"659200", - "amount_int":"66768000", - "stamp":"1328644488340337" - }, - { - "price":6.59231, - "amount":300, - "price_int":"659231", - "amount_int":"30000000000", - "stamp":"1327054035002548" - }, - { - "price":6.59375, - "amount":0.0212716, - "price_int":"659375", - "amount_int":"2127160", - "stamp":"1327360936550807" - }, - { - "price":6.59394, - "amount":6, - "price_int":"659394", - "amount_int":"600000000", - "stamp":"1327597356311029" - }, - { - "price":6.595, - "amount":9.46270036, - "price_int":"659500", - "amount_int":"946270036", - "stamp":"1327073393273683" - }, - { - "price":6.59539, - "amount":3.0302, - "price_int":"659539", - "amount_int":"303020000", - "stamp":"1327593439879631" - }, - { - "price":6.59552, - "amount":0.05553, - "price_int":"659552", - "amount_int":"5553000", - "stamp":"1328459312619938" - }, - { - "price":6.59789, - "amount":0.053676, - "price_int":"659789", - "amount_int":"5367600", - "stamp":"1327366633532455" - }, - { - "price":6.59824, - "amount":0.0347889, - "price_int":"659824", - "amount_int":"3478890", - "stamp":"1327092605942754" - }, - { - "price":6.59896, - "amount":0.51056, - "price_int":"659896", - "amount_int":"51056000", - "stamp":"1328577655184317" - }, - { - "price":6.59949, - "amount":0.107352, - "price_int":"659949", - "amount_int":"10735200", - "stamp":"1327367066760813" - }, - { - "price":6.5997, - "amount":50, - "price_int":"659970", - "amount_int":"5000000000", - "stamp":"1327071898638932" - }, - { - "price":6.59999, - "amount":111.0137175, - "price_int":"659999", - "amount_int":"11101371750", - "stamp":"1327094992091254" - }, - { - "price":6.6, - "amount":355.60473954, - "price_int":"660000", - "amount_int":"35560473954", - "stamp":"1328487419713361" - }, - { - "price":6.6025, - "amount":0.02, - "price_int":"660250", - "amount_int":"2000000", - "stamp":"1327572045899345" - }, - { - "price":6.60284, - "amount":0.05097478, - "price_int":"660284", - "amount_int":"5097478", - "stamp":"1326985265341280" - }, - { - "price":6.60288, - "amount":1.88980032, - "price_int":"660288", - "amount_int":"188980032", - "stamp":"1328644627328613" - }, - { - "price":6.60368, - "amount":0.89324, - "price_int":"660368", - "amount_int":"89324000", - "stamp":"1328459643249600" - }, - { - "price":6.60369, - "amount":0.324, - "price_int":"660369", - "amount_int":"32400000", - "stamp":"1328579423240645" - }, - { - "price":6.60378, - "amount":0.41284, - "price_int":"660378", - "amount_int":"41284000", - "stamp":"1328488249560278" - }, - { - "price":6.60382, - "amount":0.02103, - "price_int":"660382", - "amount_int":"2103000", - "stamp":"1327501756031497" - }, - { - "price":6.6046, - "amount":0.04577, - "price_int":"660460", - "amount_int":"4577000", - "stamp":"1327854845610812" - }, - { - "price":6.60581, - "amount":3.07991, - "price_int":"660581", - "amount_int":"307991000", - "stamp":"1327871368393575" - }, - { - "price":6.60882, - "amount":5.17, - "price_int":"660882", - "amount_int":"517000000", - "stamp":"1328534959879836" - }, - { - "price":6.60929, - "amount":2.93086, - "price_int":"660929", - "amount_int":"293086000", - "stamp":"1327803556469608" - }, - { - "price":6.60962, - "amount":0.23508, - "price_int":"660962", - "amount_int":"23508000", - "stamp":"1328459099857333" - }, - { - "price":6.60999, - "amount":1.0139002, - "price_int":"660999", - "amount_int":"101390020", - "stamp":"1326850417782883" - }, - { - "price":6.61, - "amount":12.75042422, - "price_int":"661000", - "amount_int":"1275042422", - "stamp":"1327494585108514" - }, - { - "price":6.61035, - "amount":8.0053, - "price_int":"661035", - "amount_int":"800530000", - "stamp":"1328571986502635" - }, - { - "price":6.612, - "amount":0.2535, - "price_int":"661200", - "amount_int":"25350000", - "stamp":"1328595133195937" - }, - { - "price":6.61201, - "amount":0.0117292, - "price_int":"661201", - "amount_int":"1172920", - "stamp":"1327168271015830" - }, - { - "price":6.61257, - "amount":0.15838356, - "price_int":"661257", - "amount_int":"15838356", - "stamp":"1327103759539014" - }, - { - "price":6.6126, - "amount":0.5, - "price_int":"661260", - "amount_int":"50000000", - "stamp":"1327081552898388" - }, - { - "price":6.61459, - "amount":0.57895, - "price_int":"661459", - "amount_int":"57895000", - "stamp":"1328620006917706" - }, - { - "price":6.61518, - "amount":0.0106358, - "price_int":"661518", - "amount_int":"1063580", - "stamp":"1327167429125007" - }, - { - "price":6.61531, - "amount":0.10218, - "price_int":"661531", - "amount_int":"10218000", - "stamp":"1328568862552491" - }, - { - "price":6.61533, - "amount":0.0791587, - "price_int":"661533", - "amount_int":"7915870", - "stamp":"1327128787347233" - }, - { - "price":6.61645, - "amount":0.02566732, - "price_int":"661645", - "amount_int":"2566732", - "stamp":"1327146444241805" - }, - { - "price":6.61656, - "amount":1.74504545, - "price_int":"661656", - "amount_int":"174504545", - "stamp":"1327046797593699" - }, - { - "price":6.61718, - "amount":0.0210263, - "price_int":"661718", - "amount_int":"2102630", - "stamp":"1327454477237154" - }, - { - "price":6.61719, - "amount":0.0106358, - "price_int":"661719", - "amount_int":"1063580", - "stamp":"1327187470259909" - }, - { - "price":6.61829, - "amount":0.19892, - "price_int":"661829", - "amount_int":"19892000", - "stamp":"1327922751941726" - }, - { - "price":6.61846, - "amount":0.07823185, - "price_int":"661846", - "amount_int":"7823185", - "stamp":"1327055476842025" - }, - { - "price":6.61865, - "amount":0.7517, - "price_int":"661865", - "amount_int":"75170000", - "stamp":"1327978959632100" - }, - { - "price":6.61999, - "amount":1.0140544, - "price_int":"661999", - "amount_int":"101405440", - "stamp":"1326850414704825" - }, - { - "price":6.62, - "amount":115.0430023, - "price_int":"662000", - "amount_int":"11504300230", - "stamp":"1327863788307277" - }, - { - "price":6.62069, - "amount":0.0212716, - "price_int":"662069", - "amount_int":"2127160", - "stamp":"1327170328312574" - }, - { - "price":6.62093, - "amount":0.0106358, - "price_int":"662093", - "amount_int":"1063580", - "stamp":"1327175064892139" - }, - { - "price":6.62162, - "amount":0.17987, - "price_int":"662162", - "amount_int":"17987000", - "stamp":"1328460454992566" - }, - { - "price":6.62293, - "amount":1, - "price_int":"662293", - "amount_int":"100000000", - "stamp":"1328204326448100" - }, - { - "price":6.62471, - "amount":0.63108649, - "price_int":"662471", - "amount_int":"63108649", - "stamp":"1327096280775359" - }, - { - "price":6.6248, - "amount":2.18, - "price_int":"662480", - "amount_int":"218000000", - "stamp":"1327247471177760" - }, - { - "price":6.625, - "amount":0.408, - "price_int":"662500", - "amount_int":"40800000", - "stamp":"1327643631158564" - }, - { - "price":6.62608, - "amount":0.0817068, - "price_int":"662608", - "amount_int":"8170680", - "stamp":"1327178302396662" - }, - { - "price":6.6265, - "amount":50, - "price_int":"662650", - "amount_int":"5000000000", - "stamp":"1327072027151006" - }, - { - "price":6.62728, - "amount":0.0445312, - "price_int":"662728", - "amount_int":"4453120", - "stamp":"1327178425779000" - }, - { - "price":6.62757, - "amount":0.05075593, - "price_int":"662757", - "amount_int":"5075593", - "stamp":"1327072083519302" - }, - { - "price":6.62825, - "amount":3.66562, - "price_int":"662825", - "amount_int":"366562000", - "stamp":"1327963650408289" - }, - { - "price":6.6286, - "amount":0.02297287, - "price_int":"662860", - "amount_int":"2297287", - "stamp":"1327146470410519" - }, - { - "price":6.62999, - "amount":2.0141485, - "price_int":"662999", - "amount_int":"201414850", - "stamp":"1326850401986298" - }, - { - "price":6.63, - "amount":22.14783785, - "price_int":"663000", - "amount_int":"2214783785", - "stamp":"1327494579298831" - }, - { - "price":6.63055, - "amount":0.0210253, - "price_int":"663055", - "amount_int":"2102530", - "stamp":"1327447754250176" - }, - { - "price":6.6336, - "amount":10, - "price_int":"663360", - "amount_int":"1000000000", - "stamp":"1326850273048048" - }, - { - "price":6.63479, - "amount":0.02, - "price_int":"663479", - "amount_int":"2000000", - "stamp":"1327572039084907" - }, - { - "price":6.636, - "amount":0.2624, - "price_int":"663600", - "amount_int":"26240000", - "stamp":"1328075354718120" - }, - { - "price":6.63624, - "amount":1.64344, - "price_int":"663624", - "amount_int":"164344000", - "stamp":"1328571310153788" - }, - { - "price":6.63817, - "amount":9.78627599, - "price_int":"663817", - "amount_int":"978627599", - "stamp":"1327534323853199" - }, - { - "price":6.63999, - "amount":1.0100328, - "price_int":"663999", - "amount_int":"101003280", - "stamp":"1326850398898908" - }, - { - "price":6.64, - "amount":2.06233143, - "price_int":"664000", - "amount_int":"206233143", - "stamp":"1328494087288095" - }, - { - "price":6.64392, - "amount":0.0210048, - "price_int":"664392", - "amount_int":"2100480", - "stamp":"1327319653580106" - }, - { - "price":6.64463, - "amount":7.64034, - "price_int":"664463", - "amount_int":"764034000", - "stamp":"1328054844770392" - }, - { - "price":6.64591, - "amount":0.0295, - "price_int":"664591", - "amount_int":"2950000", - "stamp":"1328000798364488" - }, - { - "price":6.64621, - "amount":0.72312, - "price_int":"664621", - "amount_int":"72312000", - "stamp":"1328571555508654" - }, - { - "price":6.64645, - "amount":2.67745, - "price_int":"664645", - "amount_int":"267745000", - "stamp":"1328642290962071" - }, - { - "price":6.6478, - "amount":0.2083, - "price_int":"664780", - "amount_int":"20830000", - "stamp":"1326850242452802" - }, - { - "price":6.648, - "amount":0.01749818, - "price_int":"664800", - "amount_int":"1749818", - "stamp":"1326940066063214" - }, - { - "price":6.6485, - "amount":15, - "price_int":"664850", - "amount_int":"1500000000", - "stamp":"1326872477219393" - }, - { - "price":6.6488, - "amount":4, - "price_int":"664880", - "amount_int":"400000000", - "stamp":"1327030100989015" - }, - { - "price":6.6499, - "amount":5, - "price_int":"664990", - "amount_int":"500000000", - "stamp":"1326982562642986" - }, - { - "price":6.64999, - "amount":101.0096258, - "price_int":"664999", - "amount_int":"10100962580", - "stamp":"1327049514872895" - }, - { - "price":6.65, - "amount":120.84543513, - "price_int":"665000", - "amount_int":"12084543513", - "stamp":"1328348914797207" - }, - { - "price":6.65093, - "amount":0.02, - "price_int":"665093", - "amount_int":"2000000", - "stamp":"1327572036121510" - }, - { - "price":6.65338, - "amount":0.01386, - "price_int":"665338", - "amount_int":"1386000", - "stamp":"1328430346385139" - }, - { - "price":6.6538, - "amount":33, - "price_int":"665380", - "amount_int":"3300000000", - "stamp":"1327778929563750" - }, - { - "price":6.65448, - "amount":0.41458, - "price_int":"665448", - "amount_int":"41458000", - "stamp":"1328574301824031" - }, - { - "price":6.65684, - "amount":0.1028, - "price_int":"665684", - "amount_int":"10280000", - "stamp":"1328131928529395" - }, - { - "price":6.65729, - "amount":0.45137109, - "price_int":"665729", - "amount_int":"45137109", - "stamp":"1327758647967052" - }, - { - "price":6.6576, - "amount":0.13758, - "price_int":"665760", - "amount_int":"13758000", - "stamp":"1328050790586215" - }, - { - "price":6.65761, - "amount":3.0019, - "price_int":"665761", - "amount_int":"300190000", - "stamp":"1327593387554333" - }, - { - "price":6.659, - "amount":0.2335, - "price_int":"665900", - "amount_int":"23350000", - "stamp":"1328483282175400" - }, - { - "price":6.65999, - "amount":1.0094796, - "price_int":"665999", - "amount_int":"100947960", - "stamp":"1326850373187757" - }, - { - "price":6.66, - "amount":105.5429399, - "price_int":"666000", - "amount_int":"10554293990", - "stamp":"1328195138606325" - }, - { - "price":6.66214, - "amount":0.04678, - "price_int":"666214", - "amount_int":"4678000", - "stamp":"1328234842020501" - }, - { - "price":6.6636, - "amount":0.3, - "price_int":"666360", - "amount_int":"30000000", - "stamp":"1327042984349106" - }, - { - "price":6.66562, - "amount":0.53349, - "price_int":"666562", - "amount_int":"53349000", - "stamp":"1328577655635885" - }, - { - "price":6.66707, - "amount":0.02, - "price_int":"666707", - "amount_int":"2000000", - "stamp":"1327572033013080" - }, - { - "price":6.66999, - "amount":1.0096709, - "price_int":"666999", - "amount_int":"100967090", - "stamp":"1326850370191272" - }, - { - "price":6.67, - "amount":347.01520246, - "price_int":"667000", - "amount_int":"34701520246", - "stamp":"1328488409376586" - }, - { - "price":6.67039, - "amount":0.93496, - "price_int":"667039", - "amount_int":"93496000", - "stamp":"1328459646924387" - }, - { - "price":6.67048, - "amount":0.43078, - "price_int":"667048", - "amount_int":"43078000", - "stamp":"1328488250077709" - }, - { - "price":6.67066, - "amount":0.0210027, - "price_int":"667066", - "amount_int":"2100270", - "stamp":"1327319648153650" - }, - { - "price":6.67131, - "amount":0.04775, - "price_int":"667131", - "amount_int":"4775000", - "stamp":"1327854846103238" - }, - { - "price":6.67254, - "amount":3.20609, - "price_int":"667254", - "amount_int":"320609000", - "stamp":"1327871368848070" - }, - { - "price":6.67427, - "amount":1, - "price_int":"667427", - "amount_int":"100000000", - "stamp":"1327958537945422" - }, - { - "price":6.675, - "amount":0.1, - "price_int":"667500", - "amount_int":"10000000", - "stamp":"1326958269548936" - }, - { - "price":6.676, - "amount":1, - "price_int":"667600", - "amount_int":"100000000", - "stamp":"1327137968740750" - }, - { - "price":6.67605, - "amount":3.10024, - "price_int":"667605", - "amount_int":"310024000", - "stamp":"1327803557679375" - }, - { - "price":6.67634, - "amount":0.995, - "price_int":"667634", - "amount_int":"99500000", - "stamp":"1326850376338336" - }, - { - "price":6.67638, - "amount":0.24575, - "price_int":"667638", - "amount_int":"24575000", - "stamp":"1328459100328949" - }, - { - "price":6.67713, - "amount":8.2567, - "price_int":"667713", - "amount_int":"825670000", - "stamp":"1328571986936650" - }, - { - "price":6.6777, - "amount":0.15534, - "price_int":"667770", - "amount_int":"15534000", - "stamp":"1328457785949485" - }, - { - "price":6.678, - "amount":50, - "price_int":"667800", - "amount_int":"5000000000", - "stamp":"1326870799835769" - }, - { - "price":6.679, - "amount":25, - "price_int":"667900", - "amount_int":"2500000000", - "stamp":"1327536683361685" - }, - { - "price":6.67999, - "amount":1.0095409, - "price_int":"667999", - "amount_int":"100954090", - "stamp":"1326850367099659" - }, - { - "price":6.68, - "amount":41.0429114, - "price_int":"668000", - "amount_int":"4104291140", - "stamp":"1328513463608855" - }, - { - "price":6.6814, - "amount":0.61066, - "price_int":"668140", - "amount_int":"61066000", - "stamp":"1328620007502838" - }, - { - "price":6.68213, - "amount":0.10691, - "price_int":"668213", - "amount_int":"10691000", - "stamp":"1328568862988746" - }, - { - "price":6.68322, - "amount":0.02, - "price_int":"668322", - "amount_int":"2000000", - "stamp":"1327572029706074" - }, - { - "price":6.68403, - "amount":46.52584059, - "price_int":"668403", - "amount_int":"4652584059", - "stamp":"1328554296497249" - }, - { - "price":6.68545, - "amount":2.5, - "price_int":"668545", - "amount_int":"250000000", - "stamp":"1327028551363995" - }, - { - "price":6.687, - "amount":5, - "price_int":"668700", - "amount_int":"500000000", - "stamp":"1327018080781797" - }, - { - "price":6.6885, - "amount":0.18864, - "price_int":"668850", - "amount_int":"18864000", - "stamp":"1328460455445156" - }, - { - "price":6.68883, - "amount":10, - "price_int":"668883", - "amount_int":"1000000000", - "stamp":"1328216428816587" - }, - { - "price":6.689, - "amount":50, - "price_int":"668900", - "amount_int":"5000000000", - "stamp":"1327854235086108" - }, - { - "price":6.6898, - "amount":15, - "price_int":"668980", - "amount_int":"1500000000", - "stamp":"1326900297698301" - }, - { - "price":6.68999, - "amount":1.0096551, - "price_int":"668999", - "amount_int":"100965510", - "stamp":"1326850364031935" - }, - { - "price":6.69, - "amount":113.84608515, - "price_int":"669000", - "amount_int":"11384608515", - "stamp":"1327869963955825" - }, - { - "price":6.6952, - "amount":3.83676, - "price_int":"669520", - "amount_int":"383676000", - "stamp":"1327963650913855" - }, - { - "price":6.69739, - "amount":0.57050161, - "price_int":"669739", - "amount_int":"57050161", - "stamp":"1327915439493727" - }, - { - "price":6.6976, - "amount":2.168446, - "price_int":"669760", - "amount_int":"216844600", - "stamp":"1327056831137122" - }, - { - "price":6.698, - "amount":5.00828516, - "price_int":"669800", - "amount_int":"500828516", - "stamp":"1327221131106452" - }, - { - "price":6.6983, - "amount":108.64, - "price_int":"669830", - "amount_int":"10864000000", - "stamp":"1328620434211130" - }, - { - "price":6.69936, - "amount":0.02, - "price_int":"669936", - "amount_int":"2000000", - "stamp":"1327572025239530" - }, - { - "price":6.69953, - "amount":0.30987217, - "price_int":"669953", - "amount_int":"30987217", - "stamp":"1327044154617985" - }, - { - "price":6.69977, - "amount":0.43935289, - "price_int":"669977", - "amount_int":"43935289", - "stamp":"1327044455588914" - }, - { - "price":6.6999, - "amount":1, - "price_int":"669990", - "amount_int":"100000000", - "stamp":"1327632575968495" - }, - { - "price":6.69999, - "amount":101.0094805, - "price_int":"669999", - "amount_int":"10100948050", - "stamp":"1327049523889085" - }, - { - "price":6.7, - "amount":1545.05596146, - "price_int":"670000", - "amount_int":"154505596146", - "stamp":"1328614142550504" - }, - { - "price":6.70327, - "amount":1.7193, - "price_int":"670327", - "amount_int":"171930000", - "stamp":"1328571310755783" - }, - { - "price":6.705, - "amount":0.01, - "price_int":"670500", - "amount_int":"1000000", - "stamp":"1328614137066090" - }, - { - "price":6.70933, - "amount":0.0224644, - "price_int":"670933", - "amount_int":"2246440", - "stamp":"1327175593227721" - }, - { - "price":6.70999, - "amount":1.0092914, - "price_int":"670999", - "amount_int":"100929140", - "stamp":"1326850236387861" - }, - { - "price":6.71, - "amount":14.8628864, - "price_int":"671000", - "amount_int":"1486288640", - "stamp":"1328225709266180" - }, - { - "price":6.71076, - "amount":0.0209836, - "price_int":"671076", - "amount_int":"2098360", - "stamp":"1327300421869243" - }, - { - "price":6.71175, - "amount":7.97596, - "price_int":"671175", - "amount_int":"797596000", - "stamp":"1328054845280239" - }, - { - "price":6.71304, - "amount":0.03077, - "price_int":"671304", - "amount_int":"3077000", - "stamp":"1328000798812839" - }, - { - "price":6.71335, - "amount":0.75349, - "price_int":"671335", - "amount_int":"75349000", - "stamp":"1328571556036989" - }, - { - "price":6.71359, - "amount":2.82599, - "price_int":"671359", - "amount_int":"282599000", - "stamp":"1328642291408994" - }, - { - "price":6.71431, - "amount":0.995, - "price_int":"671431", - "amount_int":"99500000", - "stamp":"1326850376870621" - }, - { - "price":6.7155, - "amount":0.02, - "price_int":"671550", - "amount_int":"2000000", - "stamp":"1327571999030868" - }, - { - "price":6.719, - "amount":0.02461035, - "price_int":"671900", - "amount_int":"2461035", - "stamp":"1327184245705619" - }, - { - "price":6.71983, - "amount":2.9741, - "price_int":"671983", - "amount_int":"297410000", - "stamp":"1327593345022005" - }, - { - "price":6.71999, - "amount":1.0092551, - "price_int":"671999", - "amount_int":"100925510", - "stamp":"1326850233444937" - }, - { - "price":6.72, - "amount":7.0328787, - "price_int":"672000", - "amount_int":"703287870", - "stamp":"1327611299441764" - }, - { - "price":6.72059, - "amount":0.01466, - "price_int":"672059", - "amount_int":"1466000", - "stamp":"1328430346905379" - }, - { - "price":6.72083, - "amount":48.4958862, - "price_int":"672083", - "amount_int":"4849588620", - "stamp":"1328135812413398" - }, - { - "price":6.7217, - "amount":0.43304, - "price_int":"672170", - "amount_int":"43304000", - "stamp":"1328574302580550" - }, - { - "price":6.72408, - "amount":0.11233, - "price_int":"672408", - "amount_int":"11233000", - "stamp":"1328131929125616" - }, - { - "price":6.72413, - "amount":0.0209793, - "price_int":"672413", - "amount_int":"2097930", - "stamp":"1327300275673853" - }, - { - "price":6.72485, - "amount":0.14388, - "price_int":"672485", - "amount_int":"14388000", - "stamp":"1328050791044531" - }, - { - "price":6.725, - "amount":0.1, - "price_int":"672500", - "amount_int":"10000000", - "stamp":"1326958298514299" - }, - { - "price":6.72541, - "amount":0.995, - "price_int":"672541", - "amount_int":"99500000", - "stamp":"1326850106879490" - }, - { - "price":6.7256, - "amount":23.31317597, - "price_int":"672560", - "amount_int":"2331317597", - "stamp":"1327184240341869" - }, - { - "price":6.72644, - "amount":6.08430702, - "price_int":"672644", - "amount_int":"608430702", - "stamp":"1326849597179368" - }, - { - "price":6.72943, - "amount":0.05007, - "price_int":"672943", - "amount_int":"5007000", - "stamp":"1328234842467806" - }, - { - "price":6.72986, - "amount":2.26966699, - "price_int":"672986", - "amount_int":"226966699", - "stamp":"1328644627619606" - }, - { - "price":6.72999, - "amount":1.008961, - "price_int":"672999", - "amount_int":"100896100", - "stamp":"1326850230381755" - }, - { - "price":6.73, - "amount":10.0428719, - "price_int":"673000", - "amount_int":"1004287190", - "stamp":"1327494409699260" - }, - { - "price":6.73165, - "amount":0.02, - "price_int":"673165", - "amount_int":"2000000", - "stamp":"1327571995968900" - }, - { - "price":6.73295, - "amount":0.55619, - "price_int":"673295", - "amount_int":"55619000", - "stamp":"1328577656070936" - }, - { - "price":6.737, - "amount":0.2469, - "price_int":"673700", - "amount_int":"24690000", - "stamp":"1328519447858081" - }, - { - "price":6.7375, - "amount":0.0209355, - "price_int":"673750", - "amount_int":"2093550", - "stamp":"1327147055941785" - }, - { - "price":6.73776, - "amount":0.97626, - "price_int":"673776", - "amount_int":"97626000", - "stamp":"1328459647363485" - }, - { - "price":6.73777, - "amount":0.35232, - "price_int":"673777", - "amount_int":"35232000", - "stamp":"1328579423752156" - }, - { - "price":6.73786, - "amount":0.44854, - "price_int":"673786", - "amount_int":"44854000", - "stamp":"1328488250576928" - }, - { - "price":6.7387, - "amount":0.04972, - "price_int":"673870", - "amount_int":"4972000", - "stamp":"1327854846763877" - }, - { - "price":6.73994, - "amount":3.33101, - "price_int":"673994", - "amount_int":"333101000", - "stamp":"1327871369312931" - }, - { - "price":6.73999, - "amount":1.0089109, - "price_int":"673999", - "amount_int":"100891090", - "stamp":"1326850227402595" - }, - { - "price":6.74, - "amount":267.66375, - "price_int":"674000", - "amount_int":"26766375000", - "stamp":"1328613741308367" - }, - { - "price":6.7419, - "amount":50, - "price_int":"674190", - "amount_int":"5000000000", - "stamp":"1328225421044812" - }, - { - "price":6.743, - "amount":25, - "price_int":"674300", - "amount_int":"2500000000", - "stamp":"1327593644806638" - }, - { - "price":6.74348, - "amount":3.26792, - "price_int":"674348", - "amount_int":"326792000", - "stamp":"1327803558169576" - }, - { - "price":6.74382, - "amount":0.25631, - "price_int":"674382", - "amount_int":"25631000", - "stamp":"1328459100787357" - }, - { - "price":6.74457, - "amount":8.70348, - "price_int":"674457", - "amount_int":"870348000", - "stamp":"1328572964711525" - }, - { - "price":6.745, - "amount":0.2, - "price_int":"674500", - "amount_int":"20000000", - "stamp":"1327201846779638" - }, - { - "price":6.7467, - "amount":49, - "price_int":"674670", - "amount_int":"4900000000", - "stamp":"1326872941454050" - }, - { - "price":6.74779, - "amount":0.02, - "price_int":"674779", - "amount_int":"2000000", - "stamp":"1327571993036565" - }, - { - "price":6.74889, - "amount":0.64206, - "price_int":"674889", - "amount_int":"64206000", - "stamp":"1328620007939501" - }, - { - "price":6.74963, - "amount":0.11159, - "price_int":"674963", - "amount_int":"11159000", - "stamp":"1328568863441027" - }, - { - "price":6.74999, - "amount":104.0082543, - "price_int":"674999", - "amount_int":"10400825430", - "stamp":"1327139932752934" - }, - { - "price":6.75, - "amount":594.89908537, - "price_int":"675000", - "amount_int":"59489908537", - "stamp":"1328280665309782" - }, - { - "price":6.75087, - "amount":0.0209305, - "price_int":"675087", - "amount_int":"2093050", - "stamp":"1327147024887552" - }, - { - "price":6.75101, - "amount":0.403, - "price_int":"675101", - "amount_int":"40300000", - "stamp":"1328582529964913" - }, - { - "price":6.752, - "amount":0.00812937, - "price_int":"675200", - "amount_int":"812937", - "stamp":"1326873097156164" - }, - { - "price":6.756, - "amount":2.26575452, - "price_int":"675600", - "amount_int":"226575452", - "stamp":"1326849583175633" - }, - { - "price":6.75606, - "amount":0.19732, - "price_int":"675606", - "amount_int":"19732000", - "stamp":"1328460455897720" - }, - { - "price":6.75989, - "amount":65, - "price_int":"675989", - "amount_int":"6500000000", - "stamp":"1328595936440425" - }, - { - "price":6.7599, - "amount":434.72774498, - "price_int":"675990", - "amount_int":"43472774498", - "stamp":"1326849697036966" - }, - { - "price":6.75999, - "amount":1.0335697, - "price_int":"675999", - "amount_int":"103356970", - "stamp":"1326850202939839" - }, - { - "price":6.76, - "amount":116.90224591, - "price_int":"676000", - "amount_int":"11690224591", - "stamp":"1327494399781434" - }, - { - "price":6.76283, - "amount":4.00619, - "price_int":"676283", - "amount_int":"400619000", - "stamp":"1327963651428096" - }, - { - "price":6.76393, - "amount":5.02, - "price_int":"676393", - "amount_int":"502000000", - "stamp":"1327571990570825" - }, - { - "price":6.76423, - "amount":0.0209252, - "price_int":"676423", - "amount_int":"2092520", - "stamp":"1327146992887411" - }, - { - "price":6.765, - "amount":0.3816, - "price_int":"676500", - "amount_int":"38160000", - "stamp":"1326860867604154" - }, - { - "price":6.76667, - "amount":9.9, - "price_int":"676667", - "amount_int":"990000000", - "stamp":"1328051803564273" - }, - { - "price":6.7687, - "amount":1, - "price_int":"676870", - "amount_int":"100000000", - "stamp":"1327798177956226" - }, - { - "price":6.76999, - "amount":1.03319, - "price_int":"676999", - "amount_int":"103319000", - "stamp":"1326850198514618" - }, - { - "price":6.77, - "amount":0.042832, - "price_int":"677000", - "amount_int":"4283200", - "stamp":"1327494397090535" - }, - { - "price":6.7704, - "amount":2.14, - "price_int":"677040", - "amount_int":"214000000", - "stamp":"1327315340079242" - }, - { - "price":6.77068, - "amount":0.06050127, - "price_int":"677068", - "amount_int":"6050127", - "stamp":"1328229739195925" - }, - { - "price":6.77098, - "amount":1.79441, - "price_int":"677098", - "amount_int":"179441000", - "stamp":"1328571311353738" - }, - { - "price":6.775, - "amount":0.1, - "price_int":"677500", - "amount_int":"10000000", - "stamp":"1326958313989680" - }, - { - "price":6.77501, - "amount":0.50179282, - "price_int":"677501", - "amount_int":"50179282", - "stamp":"1326854363985992" - }, - { - "price":6.7763, - "amount":58.12709784, - "price_int":"677630", - "amount_int":"5812709784", - "stamp":"1328172017558128" - }, - { - "price":6.77695, - "amount":1, - "price_int":"677695", - "amount_int":"100000000", - "stamp":"1328200089747624" - }, - { - "price":6.777, - "amount":30, - "price_int":"677700", - "amount_int":"3000000000", - "stamp":"1326850542620385" - }, - { - "price":6.7776, - "amount":0.0209201, - "price_int":"677760", - "amount_int":"2092010", - "stamp":"1327146961883672" - }, - { - "price":6.7789, - "amount":14.6425, - "price_int":"677890", - "amount_int":"1464250000", - "stamp":"1326890659350140" - }, - { - "price":6.77954, - "amount":8.30822, - "price_int":"677954", - "amount_int":"830822000", - "stamp":"1328054845774308" - }, - { - "price":6.77999, - "amount":1.0327354, - "price_int":"677999", - "amount_int":"103273540", - "stamp":"1326850195488262" - }, - { - "price":6.78, - "amount":274.47912279, - "price_int":"678000", - "amount_int":"27447912279", - "stamp":"1327494394344149" - }, - { - "price":6.78008, - "amount":10.2581, - "price_int":"678008", - "amount_int":"1025810000", - "stamp":"1327979002467481" - }, - { - "price":6.78085, - "amount":0.03202, - "price_int":"678085", - "amount_int":"3202000", - "stamp":"1328000799962731" - }, - { - "price":6.78116, - "amount":0.78354, - "price_int":"678116", - "amount_int":"78354000", - "stamp":"1328571556643334" - }, - { - "price":6.7814, - "amount":2.97305, - "price_int":"678140", - "amount_int":"297305000", - "stamp":"1328642291849084" - }, - { - "price":6.78205, - "amount":2.9468, - "price_int":"678205", - "amount_int":"294680000", - "stamp":"1327593283787356" - }, - { - "price":6.783, - "amount":20, - "price_int":"678300", - "amount_int":"2000000000", - "stamp":"1326872498099249" - }, - { - "price":6.78477, - "amount":50, - "price_int":"678477", - "amount_int":"5000000000", - "stamp":"1326874431052346" - }, - { - "price":6.78484, - "amount":1, - "price_int":"678484", - "amount_int":"100000000", - "stamp":"1327422590052471" - }, - { - "price":6.786, - "amount":0.6, - "price_int":"678600", - "amount_int":"60000000", - "stamp":"1327043039129582" - }, - { - "price":6.78677, - "amount":0.995, - "price_int":"678677", - "amount_int":"99500000", - "stamp":"1326850016365167" - }, - { - "price":6.78798, - "amount":5.5, - "price_int":"678798", - "amount_int":"550000000", - "stamp":"1327028443823904" - }, - { - "price":6.78847, - "amount":0.01545, - "price_int":"678847", - "amount_int":"1545000", - "stamp":"1328430347400603" - }, - { - "price":6.789, - "amount":50, - "price_int":"678900", - "amount_int":"5000000000", - "stamp":"1327854214192840" - }, - { - "price":6.78959, - "amount":0.45132, - "price_int":"678959", - "amount_int":"45132000", - "stamp":"1328574303226708" - }, - { - "price":6.78999, - "amount":1.0319406, - "price_int":"678999", - "amount_int":"103194060", - "stamp":"1326850173417301" - }, - { - "price":6.79, - "amount":249.35625132, - "price_int":"679000", - "amount_int":"24935625132", - "stamp":"1327528653413424" - }, - { - "price":6.79074, - "amount":0.48463, - "price_int":"679074", - "amount_int":"48463000", - "stamp":"1327632401396570" - }, - { - "price":6.79097, - "amount":0.0209282, - "price_int":"679097", - "amount_int":"2092820", - "stamp":"1327146928996759" - }, - { - "price":6.791, - "amount":1000, - "price_int":"679100", - "amount_int":"100000000000", - "stamp":"1326877982270012" - }, - { - "price":6.792, - "amount":0.12176, - "price_int":"679200", - "amount_int":"12176000", - "stamp":"1327516658749511" - }, - { - "price":6.79278, - "amount":0.15011, - "price_int":"679278", - "amount_int":"15011000", - "stamp":"1328050791511020" - }, - { - "price":6.794, - "amount":21.41, - "price_int":"679400", - "amount_int":"2141000000", - "stamp":"1327077685894341" - }, - { - "price":6.79622, - "amount":0.02, - "price_int":"679622", - "amount_int":"2000000", - "stamp":"1327571984860290" - }, - { - "price":6.79741, - "amount":0.05333, - "price_int":"679741", - "amount_int":"5333000", - "stamp":"1328234842908684" - }, - { - "price":6.798, - "amount":10, - "price_int":"679800", - "amount_int":"1000000000", - "stamp":"1327018863441881" - }, - { - "price":6.7991, - "amount":400, - "price_int":"679910", - "amount_int":"40000000000", - "stamp":"1326859504295708" - }, - { - "price":6.79998, - "amount":50, - "price_int":"679998", - "amount_int":"5000000000", - "stamp":"1328167999894480" - }, - { - "price":6.79999, - "amount":1.0316232, - "price_int":"679999", - "amount_int":"103162320", - "stamp":"1326850142852801" - }, - { - "price":6.8, - "amount":1459.61466634, - "price_int":"680000", - "amount_int":"145961466634", - "stamp":"1328623915300701" - }, - { - "price":6.80095, - "amount":0.57866, - "price_int":"680095", - "amount_int":"57866000", - "stamp":"1328577656522767" - }, - { - "price":6.80434, - "amount":0.020898, - "price_int":"680434", - "amount_int":"2089800", - "stamp":"1327074455116506" - }, - { - "price":6.80563, - "amount":39.7196764, - "price_int":"680563", - "amount_int":"3971967640", - "stamp":"1328503801259612" - }, - { - "price":6.80582, - "amount":1.01714, - "price_int":"680582", - "amount_int":"101714000", - "stamp":"1328459647811508" - }, - { - "price":6.80592, - "amount":0.46612, - "price_int":"680592", - "amount_int":"46612000", - "stamp":"1328488251185315" - }, - { - "price":6.80676, - "amount":0.05166, - "price_int":"680676", - "amount_int":"5166000", - "stamp":"1327854847649183" - }, - { - "price":6.80802, - "amount":3.45468, - "price_int":"680802", - "amount_int":"345468000", - "stamp":"1327871369993502" - }, - { - "price":6.80999, - "amount":1.031279, - "price_int":"680999", - "amount_int":"103127900", - "stamp":"1326850139275515" - }, - { - "price":6.81, - "amount":4.6752122, - "price_int":"681000", - "amount_int":"467521220", - "stamp":"1328129167473304" - }, - { - "price":6.811, - "amount":25, - "price_int":"681100", - "amount_int":"2500000000", - "stamp":"1327398888840461" - }, - { - "price":6.8116, - "amount":3.4339, - "price_int":"681160", - "amount_int":"343390000", - "stamp":"1327803558776520" - }, - { - "price":6.81194, - "amount":0.26676, - "price_int":"681194", - "amount_int":"26676000", - "stamp":"1328459101263821" - }, - { - "price":6.81236, - "amount":10.02, - "price_int":"681236", - "amount_int":"1002000000", - "stamp":"1327571982435827" - }, - { - "price":6.8127, - "amount":9.12608, - "price_int":"681270", - "amount_int":"912608000", - "stamp":"1328572965158612" - }, - { - "price":6.81706, - "amount":0.67314, - "price_int":"681706", - "amount_int":"67314000", - "stamp":"1328620008369155" - }, - { - "price":6.81771, - "amount":61.0795053, - "price_int":"681771", - "amount_int":"6107950530", - "stamp":"1327963023713854" - }, - { - "price":6.8178, - "amount":0.11622, - "price_int":"681780", - "amount_int":"11622000", - "stamp":"1328568863913220" - }, - { - "price":6.81957, - "amount":0.0319074, - "price_int":"681957", - "amount_int":"3190740", - "stamp":"1327179317360775" - }, - { - "price":6.81999, - "amount":1.0307377, - "price_int":"681999", - "amount_int":"103073770", - "stamp":"1326850136197958" - }, - { - "price":6.82, - "amount":7.6665084, - "price_int":"682000", - "amount_int":"766650840", - "stamp":"1327494382683491" - }, - { - "price":6.82049, - "amount":10, - "price_int":"682049", - "amount_int":"1000000000", - "stamp":"1328288949841418" - }, - { - "price":6.8243, - "amount":0.20591, - "price_int":"682430", - "amount_int":"20591000", - "stamp":"1328460456351894" - }, - { - "price":6.825, - "amount":0.1, - "price_int":"682500", - "amount_int":"10000000", - "stamp":"1326958343966651" - }, - { - "price":6.82851, - "amount":0.02, - "price_int":"682851", - "amount_int":"2000000", - "stamp":"1327571979663207" - }, - { - "price":6.8299, - "amount":100, - "price_int":"682990", - "amount_int":"10000000000", - "stamp":"1326939871676254" - }, - { - "price":6.82999, - "amount":1.0297268, - "price_int":"682999", - "amount_int":"102972680", - "stamp":"1326850133260825" - }, - { - "price":6.83, - "amount":7.68586877, - "price_int":"683000", - "amount_int":"768586877", - "stamp":"1327651549130616" - }, - { - "price":6.83107, - "amount":0.0208819, - "price_int":"683107", - "amount_int":"2088190", - "stamp":"1327074327770415" - }, - { - "price":6.83114, - "amount":4.17392, - "price_int":"683114", - "amount_int":"417392000", - "stamp":"1327963651909041" - }, - { - "price":6.83476, - "amount":0.37785, - "price_int":"683476", - "amount_int":"37785000", - "stamp":"1327694523780730" - }, - { - "price":6.83938, - "amount":1.86877, - "price_int":"683938", - "amount_int":"186877000", - "stamp":"1328571311968090" - }, - { - "price":6.83995, - "amount":93.16116471, - "price_int":"683995", - "amount_int":"9316116471", - "stamp":"1326851493517061" - }, - { - "price":6.83999, - "amount":1.0292458, - "price_int":"683999", - "amount_int":"102924580", - "stamp":"1326850120049972" - }, - { - "price":6.84, - "amount":0.0328025, - "price_int":"684000", - "amount_int":"3280250", - "stamp":"1327494376208299" - }, - { - "price":6.8432, - "amount":2.12, - "price_int":"684320", - "amount_int":"212000000", - "stamp":"1328223136410383" - }, - { - "price":6.84427, - "amount":2.92, - "price_int":"684427", - "amount_int":"292000000", - "stamp":"1327593218286955" - }, - { - "price":6.84444, - "amount":0.0208816, - "price_int":"684444", - "amount_int":"2088160", - "stamp":"1327072467424575" - }, - { - "price":6.84465, - "amount":0.02, - "price_int":"684465", - "amount_int":"2000000", - "stamp":"1327571976636519" - }, - { - "price":6.84802, - "amount":8.63716, - "price_int":"684802", - "amount_int":"863716000", - "stamp":"1328054846280526" - }, - { - "price":6.84885, - "amount":4.7642, - "price_int":"684885", - "amount_int":"476420000", - "stamp":"1327415191519908" - }, - { - "price":6.849, - "amount":0.2953, - "price_int":"684900", - "amount_int":"29530000", - "stamp":"1327613781441330" - }, - { - "price":6.84934, - "amount":0.03327, - "price_int":"684934", - "amount_int":"3327000", - "stamp":"1328000800421123" - }, - { - "price":6.84965, - "amount":0.8133, - "price_int":"684965", - "amount_int":"81330000", - "stamp":"1328571557128825" - }, - { - "price":6.8499, - "amount":3.11864, - "price_int":"684990", - "amount_int":"311864000", - "stamp":"1328642292281644" - }, - { - "price":6.84999, - "amount":1.0285875, - "price_int":"684999", - "amount_int":"102858750", - "stamp":"1326850117002023" - }, - { - "price":6.85, - "amount":184.65399363, - "price_int":"685000", - "amount_int":"18465399363", - "stamp":"1328290107892633" - }, - { - "price":6.851, - "amount":0.1829, - "price_int":"685100", - "amount_int":"18290000", - "stamp":"1328367234035592" - }, - { - "price":6.85288, - "amount":100, - "price_int":"685288", - "amount_int":"10000000000", - "stamp":"1328255090077067" - }, - { - "price":6.85704, - "amount":0.01623, - "price_int":"685704", - "amount_int":"1623000", - "stamp":"1328430347885789" - }, - { - "price":6.85781, - "amount":0.0208757, - "price_int":"685781", - "amount_int":"2087570", - "stamp":"1327070691488205" - }, - { - "price":6.85817, - "amount":0.46941, - "price_int":"685817", - "amount_int":"46941000", - "stamp":"1328574303825371" - }, - { - "price":6.85999, - "amount":1.0278143, - "price_int":"685999", - "amount_int":"102781430", - "stamp":"1326850113966481" - }, - { - "price":6.86, - "amount":0.0327853, - "price_int":"686000", - "amount_int":"3278530", - "stamp":"1327494370711201" - }, - { - "price":6.86079, - "amount":10, - "price_int":"686079", - "amount_int":"1000000000", - "stamp":"1327513482179620" - }, - { - "price":6.86139, - "amount":0.15628, - "price_int":"686139", - "amount_int":"15628000", - "stamp":"1328050791981814" - }, - { - "price":6.86391, - "amount":2.65542333, - "price_int":"686391", - "amount_int":"265542333", - "stamp":"1328644627914571" - }, - { - "price":6.866, - "amount":0.1715, - "price_int":"686600", - "amount_int":"17150000", - "stamp":"1328162255227403" - }, - { - "price":6.86607, - "amount":0.05655, - "price_int":"686607", - "amount_int":"5655000", - "stamp":"1328234843364156" - }, - { - "price":6.86965, - "amount":0.60092, - "price_int":"686965", - "amount_int":"60092000", - "stamp":"1328577657000990" - }, - { - "price":6.86998, - "amount":5, - "price_int":"686998", - "amount_int":"500000000", - "stamp":"1326920079719901" - }, - { - "price":6.86999, - "amount":1.027048, - "price_int":"686999", - "amount_int":"102704800", - "stamp":"1326850111052896" - }, - { - "price":6.87, - "amount":5.0427703, - "price_int":"687000", - "amount_int":"504277030", - "stamp":"1328213222886761" - }, - { - "price":6.87118, - "amount":26.0208709, - "price_int":"687118", - "amount_int":"2602087090", - "stamp":"1327155270900335" - }, - { - "price":6.87457, - "amount":1.05762, - "price_int":"687457", - "amount_int":"105762000", - "stamp":"1328459648245864" - }, - { - "price":6.87458, - "amount":0.38008, - "price_int":"687458", - "amount_int":"38008000", - "stamp":"1328579424417057" - }, - { - "price":6.87467, - "amount":0.48353, - "price_int":"687467", - "amount_int":"48353000", - "stamp":"1328488251710048" - }, - { - "price":6.875, - "amount":50.1, - "price_int":"687500", - "amount_int":"5010000000", - "stamp":"1327070977838339" - }, - { - "price":6.87552, - "amount":0.05359, - "price_int":"687552", - "amount_int":"5359000", - "stamp":"1327854849354992" - }, - { - "price":6.87678, - "amount":3.57711, - "price_int":"687678", - "amount_int":"357711000", - "stamp":"1327871370518004" - }, - { - "price":6.87693, - "amount":0.02, - "price_int":"687693", - "amount_int":"2000000", - "stamp":"1327571971428036" - }, - { - "price":6.879, - "amount":25, - "price_int":"687900", - "amount_int":"2500000000", - "stamp":"1327046457840463" - }, - { - "price":6.8795, - "amount":4.956, - "price_int":"687950", - "amount_int":"495600000", - "stamp":"1326893326457560" - }, - { - "price":6.87963, - "amount":1, - "price_int":"687963", - "amount_int":"100000000", - "stamp":"1328200096433507" - }, - { - "price":6.87999, - "amount":1.0259128, - "price_int":"687999", - "amount_int":"102591280", - "stamp":"1326850106914731" - }, - { - "price":6.88, - "amount":341.69766671, - "price_int":"688000", - "amount_int":"34169766671", - "stamp":"1328218686105376" - }, - { - "price":6.8804, - "amount":3.45935, - "price_int":"688040", - "amount_int":"345935000", - "stamp":"1327803559278676" - }, - { - "price":6.88075, - "amount":0.27711, - "price_int":"688075", - "amount_int":"27711000", - "stamp":"1328459101823510" - }, - { - "price":6.88085, - "amount":20, - "price_int":"688085", - "amount_int":"2000000000", - "stamp":"1327594074714333" - }, - { - "price":6.881, - "amount":3.59, - "price_int":"688100", - "amount_int":"359000000", - "stamp":"1328613708381421" - }, - { - "price":6.88151, - "amount":9.57038, - "price_int":"688151", - "amount_int":"957038000", - "stamp":"1328572965604225" - }, - { - "price":6.883, - "amount":1, - "price_int":"688300", - "amount_int":"100000000", - "stamp":"1327061315564949" - }, - { - "price":6.88455, - "amount":0.0208661, - "price_int":"688455", - "amount_int":"2086610", - "stamp":"1327070684329597" - }, - { - "price":6.88592, - "amount":0.70391, - "price_int":"688592", - "amount_int":"70391000", - "stamp":"1328620008803971" - }, - { - "price":6.88667, - "amount":0.12081, - "price_int":"688667", - "amount_int":"12081000", - "stamp":"1328568864365367" - }, - { - "price":6.88789, - "amount":11.90122168, - "price_int":"688789", - "amount_int":"1190122168", - "stamp":"1327028471779953" - }, - { - "price":6.888, - "amount":0.2535, - "price_int":"688800", - "amount_int":"25350000", - "stamp":"1328595138876485" - }, - { - "price":6.88876, - "amount":0.02, - "price_int":"688876", - "amount_int":"2000000", - "stamp":"1327571974089512" - }, - { - "price":6.889, - "amount":75.70021779, - "price_int":"688900", - "amount_int":"7570021779", - "stamp":"1327666518863475" - }, - { - "price":6.88999, - "amount":1.0252974, - "price_int":"688999", - "amount_int":"102529740", - "stamp":"1326850093815719" - }, - { - "price":6.89, - "amount":77.4781444, - "price_int":"689000", - "amount_int":"7747814440", - "stamp":"1328218722558061" - }, - { - "price":6.891, - "amount":1000, - "price_int":"689100", - "amount_int":"100000000000", - "stamp":"1326878008415790" - }, - { - "price":6.892, - "amount":9.51333624, - "price_int":"689200", - "amount_int":"951333624", - "stamp":"1326870159891576" - }, - { - "price":6.89308, - "amount":0.02, - "price_int":"689308", - "amount_int":"2000000", - "stamp":"1327571967630550" - }, - { - "price":6.89324, - "amount":0.21442, - "price_int":"689324", - "amount_int":"21442000", - "stamp":"1328460456794753" - }, - { - "price":6.89453, - "amount":20.311396, - "price_int":"689453", - "amount_int":"2031139600", - "stamp":"1328551769145772" - }, - { - "price":6.896, - "amount":1.4763, - "price_int":"689600", - "amount_int":"147630000", - "stamp":"1327841096873307" - }, - { - "price":6.89791, - "amount":0.0208545, - "price_int":"689791", - "amount_int":"2085450", - "stamp":"1327057621509431" - }, - { - "price":6.898, - "amount":1.00674489, - "price_int":"689800", - "amount_int":"100674489", - "stamp":"1326951666174973" - }, - { - "price":6.89998, - "amount":10, - "price_int":"689998", - "amount_int":"1000000000", - "stamp":"1326850582594082" - }, - { - "price":6.89999, - "amount":0.5247495, - "price_int":"689999", - "amount_int":"52474950", - "stamp":"1326850090742400" - }, - { - "price":6.9, - "amount":1815.64189917, - "price_int":"690000", - "amount_int":"181564189917", - "stamp":"1328511369554101" - }, - { - "price":6.90014, - "amount":4.33998, - "price_int":"690014", - "amount_int":"433998000", - "stamp":"1327963652458408" - }, - { - "price":6.904, - "amount":15.4, - "price_int":"690400", - "amount_int":"1540000000", - "stamp":"1326848864801351" - }, - { - "price":6.90846, - "amount":1.94238, - "price_int":"690846", - "amount_int":"194238000", - "stamp":"1328571312465261" - }, - { - "price":6.90999, - "amount":0.5236347, - "price_int":"690999", - "amount_int":"52363470", - "stamp":"1326849255322927" - }, - { - "price":6.91, - "amount":0.41356963, - "price_int":"691000", - "amount_int":"41356963", - "stamp":"1327494233523639" - }, - { - "price":6.911, - "amount":50, - "price_int":"691100", - "amount_int":"5000000000", - "stamp":"1327398935065701" - }, - { - "price":6.91128, - "amount":0.0208521, - "price_int":"691128", - "amount_int":"2085210", - "stamp":"1327057618093424" - }, - { - "price":6.91666, - "amount":10, - "price_int":"691666", - "amount_int":"1000000000", - "stamp":"1328319701930259" - }, - { - "price":6.91719, - "amount":11.21946, - "price_int":"691719", - "amount_int":"1121946000", - "stamp":"1328643050333798" - }, - { - "price":6.91853, - "amount":0.0345, - "price_int":"691853", - "amount_int":"3450000", - "stamp":"1328000800864952" - }, - { - "price":6.91884, - "amount":0.83742, - "price_int":"691884", - "amount_int":"83742000", - "stamp":"1328571209074119" - }, - { - "price":6.91909, - "amount":3.26277, - "price_int":"691909", - "amount_int":"326277000", - "stamp":"1328642292719608" - }, - { - "price":6.91999, - "amount":0.5230644, - "price_int":"691999", - "amount_int":"52306440", - "stamp":"1326849242705493" - }, - { - "price":6.92, - "amount":0.0327009, - "price_int":"692000", - "amount_int":"3270090", - "stamp":"1327494228719735" - }, - { - "price":6.924, - "amount":100, - "price_int":"692400", - "amount_int":"10000000000", - "stamp":"1326897790264860" - }, - { - "price":6.92465, - "amount":0.0208433, - "price_int":"692465", - "amount_int":"2084330", - "stamp":"1327055276067466" - }, - { - "price":6.925, - "amount":0.3654, - "price_int":"692500", - "amount_int":"36540000", - "stamp":"1328049631442680" - }, - { - "price":6.92536, - "amount":0.02, - "price_int":"692536", - "amount_int":"2000000", - "stamp":"1327571961919736" - }, - { - "price":6.92554, - "amount":100, - "price_int":"692554", - "amount_int":"10000000000", - "stamp":"1328349629858594" - }, - { - "price":6.92631, - "amount":0.01701, - "price_int":"692631", - "amount_int":"1701000", - "stamp":"1328430348481081" - }, - { - "price":6.92699, - "amount":10.934, - "price_int":"692699", - "amount_int":"1093400000", - "stamp":"1326851726423286" - }, - { - "price":6.92732, - "amount":0.995, - "price_int":"692732", - "amount_int":"99500000", - "stamp":"1326849911363450" - }, - { - "price":6.92745, - "amount":0.48732, - "price_int":"692745", - "amount_int":"48732000", - "stamp":"1328574304336927" - }, - { - "price":6.92999, - "amount":0.5228892, - "price_int":"692999", - "amount_int":"52288920", - "stamp":"1326849239574931" - }, - { - "price":6.93, - "amount":34.76070243, - "price_int":"693000", - "amount_int":"3476070243", - "stamp":"1327494225029961" - }, - { - "price":6.9301, - "amount":18.4, - "price_int":"693010", - "amount_int":"1840000000", - "stamp":"1327047266811697" - }, - { - "price":6.9307, - "amount":0.16239, - "price_int":"693070", - "amount_int":"16239000", - "stamp":"1328050792438176" - }, - { - "price":6.93501, - "amount":1038, - "price_int":"693501", - "amount_int":"103800000000", - "stamp":"1328303280729388" - }, - { - "price":6.93542, - "amount":0.05974, - "price_int":"693542", - "amount_int":"5974000", - "stamp":"1328234843831143" - }, - { - "price":6.93739, - "amount":0.02, - "price_int":"693739", - "amount_int":"2000000", - "stamp":"1327571964240900" - }, - { - "price":6.93802, - "amount":0.0208374, - "price_int":"693802", - "amount_int":"2083740", - "stamp":"1327055214530879" - }, - { - "price":6.939, - "amount":10.87, - "price_int":"693900", - "amount_int":"1087000000", - "stamp":"1326855859162905" - }, - { - "price":6.93904, - "amount":0.62294, - "price_int":"693904", - "amount_int":"62294000", - "stamp":"1328577657474432" - }, - { - "price":6.93999, - "amount":2000.5222854, - "price_int":"693999", - "amount_int":"200052228540", - "stamp":"1328201117884315" - }, - { - "price":6.94, - "amount":1216.09800246, - "price_int":"694000", - "amount_int":"121609800246", - "stamp":"1328147552742504" - }, - { - "price":6.94148, - "amount":50, - "price_int":"694148", - "amount_int":"5000000000", - "stamp":"1326923433519818" - }, - { - "price":6.94151, - "amount":10.02, - "price_int":"694151", - "amount_int":"1002000000", - "stamp":"1327571958681055" - }, - { - "price":6.94401, - "amount":1.09769, - "price_int":"694401", - "amount_int":"109769000", - "stamp":"1328459648673225" - }, - { - "price":6.94411, - "amount":0.50076, - "price_int":"694411", - "amount_int":"50076000", - "stamp":"1328488252326691" - }, - { - "price":6.94497, - "amount":0.05549, - "price_int":"694497", - "amount_int":"5549000", - "stamp":"1327854850771685" - }, - { - "price":6.945, - "amount":268.4077817, - "price_int":"694500", - "amount_int":"26840778170", - "stamp":"1327072427966945" - }, - { - "price":6.9457, - "amount":25, - "price_int":"694570", - "amount_int":"2500000000", - "stamp":"1328433840723652" - }, - { - "price":6.94625, - "amount":3.69832, - "price_int":"694625", - "amount_int":"369832000", - "stamp":"1327871370999048" - }, - { - "price":6.94662, - "amount":0.12, - "price_int":"694662", - "amount_int":"12000000", - "stamp":"1327358419576349" - }, - { - "price":6.948, - "amount":0.2335, - "price_int":"694800", - "amount_int":"23350000", - "stamp":"1328483288596461" - }, - { - "price":6.94845, - "amount":1, - "price_int":"694845", - "amount_int":"100000000", - "stamp":"1326870937424834" - }, - { - "price":6.9499, - "amount":3.81094, - "price_int":"694990", - "amount_int":"381094000", - "stamp":"1327803559773757" - }, - { - "price":6.94999, - "amount":0.55443273, - "price_int":"694999", - "amount_int":"55443273", - "stamp":"1326859911475675" - }, - { - "price":6.95, - "amount":396.57155878, - "price_int":"695000", - "amount_int":"39657155878", - "stamp":"1328577311515715" - }, - { - "price":6.9502, - "amount":0.01185153, - "price_int":"695020", - "amount_int":"1185153", - "stamp":"1326824256226526" - }, - { - "price":6.95025, - "amount":0.28735, - "price_int":"695025", - "amount_int":"28735000", - "stamp":"1328459102301458" - }, - { - "price":6.95102, - "amount":10.01397, - "price_int":"695102", - "amount_int":"1001397000", - "stamp":"1328572966058251" - }, - { - "price":6.95139, - "amount":40.5703332, - "price_int":"695139", - "amount_int":"4057033320", - "stamp":"1327058315153295" - }, - { - "price":6.95547, - "amount":0.73437, - "price_int":"695547", - "amount_int":"73437000", - "stamp":"1328620009239754" - }, - { - "price":6.9555, - "amount":16.4679956, - "price_int":"695550", - "amount_int":"1646799560", - "stamp":"1328443594416890" - }, - { - "price":6.95623, - "amount":0.12535, - "price_int":"695623", - "amount_int":"12535000", - "stamp":"1328568864814406" - }, - { - "price":6.95701, - "amount":0.1768, - "price_int":"695701", - "amount_int":"17680000", - "stamp":"1326744387122536" - }, - { - "price":6.95765, - "amount":0.02, - "price_int":"695765", - "amount_int":"2000000", - "stamp":"1327571955424867" - }, - { - "price":6.9581, - "amount":10, - "price_int":"695810", - "amount_int":"1000000000", - "stamp":"1327590846266905" - }, - { - "price":6.95999, - "amount":0.5189026, - "price_int":"695999", - "amount_int":"51890260", - "stamp":"1326752542966763" - }, - { - "price":6.96, - "amount":0.0325427, - "price_int":"696000", - "amount_int":"3254270", - "stamp":"1327494213620203" - }, - { - "price":6.96287, - "amount":0.23303, - "price_int":"696287", - "amount_int":"23303000", - "stamp":"1328460467454099" - }, - { - "price":6.96475, - "amount":0.0206387, - "price_int":"696475", - "amount_int":"2063870", - "stamp":"1326850676718373" - }, - { - "price":6.96499, - "amount":17.9, - "price_int":"696499", - "amount_int":"1790000000", - "stamp":"1326933501659831" - }, - { - "price":6.96949, - "amount":0.032305, - "price_int":"696949", - "amount_int":"3230500", - "stamp":"1326846990423481" - }, - { - "price":6.96984, - "amount":4.50437, - "price_int":"696984", - "amount_int":"450437000", - "stamp":"1327963652968668" - }, - { - "price":6.96999, - "amount":3.5184267, - "price_int":"696999", - "amount_int":"351842670", - "stamp":"1327050767736806" - }, - { - "price":6.97, - "amount":439.53017858, - "price_int":"697000", - "amount_int":"43953017858", - "stamp":"1328166824542495" - }, - { - "price":6.972, - "amount":10, - "price_int":"697200", - "amount_int":"1000000000", - "stamp":"1328293904846759" - }, - { - "price":6.973, - "amount":1.5, - "price_int":"697300", - "amount_int":"150000000", - "stamp":"1326777668278361" - }, - { - "price":6.97379, - "amount":0.02, - "price_int":"697379", - "amount_int":"2000000", - "stamp":"1327571953154933" - }, - { - "price":6.975, - "amount":0.15, - "price_int":"697500", - "amount_int":"15000000", - "stamp":"1326958417609410" - }, - { - "price":6.9755, - "amount":5, - "price_int":"697550", - "amount_int":"500000000", - "stamp":"1327102572514002" - }, - { - "price":6.97812, - "amount":0.9206329, - "price_int":"697812", - "amount_int":"92063290", - "stamp":"1327344007878047" - }, - { - "price":6.97824, - "amount":2.01525, - "price_int":"697824", - "amount_int":"201525000", - "stamp":"1328571312957087" - }, - { - "price":6.97898, - "amount":15, - "price_int":"697898", - "amount_int":"1500000000", - "stamp":"1326900359058670" - }, - { - "price":6.979, - "amount":21.7, - "price_int":"697900", - "amount_int":"2170000000", - "stamp":"1326853967102969" - }, - { - "price":6.97926, - "amount":3.182, - "price_int":"697926", - "amount_int":"318200000", - "stamp":"1326853137194083" - }, - { - "price":6.97999, - "amount":0.5180309, - "price_int":"697999", - "amount_int":"51803090", - "stamp":"1326752536751238" - }, - { - "price":6.98, - "amount":347.09875676, - "price_int":"698000", - "amount_int":"34709875676", - "stamp":"1328202322723375" - }, - { - "price":6.98231, - "amount":3.15, - "price_int":"698231", - "amount_int":"315000000", - "stamp":"1328200100045289" - }, - { - "price":6.983, - "amount":1, - "price_int":"698300", - "amount_int":"100000000", - "stamp":"1326745416328193" - }, - { - "price":6.9832, - "amount":100, - "price_int":"698320", - "amount_int":"10000000000", - "stamp":"1327325899465564" - }, - { - "price":6.9841, - "amount":0.021371, - "price_int":"698410", - "amount_int":"2137100", - "stamp":"1326846379582202" - }, - { - "price":6.98469, - "amount":10, - "price_int":"698469", - "amount_int":"1000000000", - "stamp":"1326758491617421" - }, - { - "price":6.987, - "amount":54.438, - "price_int":"698700", - "amount_int":"5443800000", - "stamp":"1328232311121359" - }, - { - "price":6.98706, - "amount":11.67389, - "price_int":"698706", - "amount_int":"1167389000", - "stamp":"1328642725220391" - }, - { - "price":6.9875, - "amount":20, - "price_int":"698750", - "amount_int":"2000000000", - "stamp":"1328137145322617" - }, - { - "price":6.98841, - "amount":0.03571, - "price_int":"698841", - "amount_int":"3571000", - "stamp":"1328000801310903" - }, - { - "price":6.98873, - "amount":0.86784, - "price_int":"698873", - "amount_int":"86784000", - "stamp":"1328570894578198" - }, - { - "price":6.9888, - "amount":6, - "price_int":"698880", - "amount_int":"600000000", - "stamp":"1327855918262564" - }, - { - "price":6.98898, - "amount":3.40546, - "price_int":"698898", - "amount_int":"340546000", - "stamp":"1328642293156530" - }, - { - "price":6.989, - "amount":99.82944238, - "price_int":"698900", - "amount_int":"9982944238", - "stamp":"1327666515547410" - }, - { - "price":6.98967, - "amount":5.13287842, - "price_int":"698967", - "amount_int":"513287842", - "stamp":"1327444506505335" - }, - { - "price":6.9899, - "amount":1.4, - "price_int":"698990", - "amount_int":"140000000", - "stamp":"1326862421131254" - }, - { - "price":6.98994, - "amount":1.17440905, - "price_int":"698994", - "amount_int":"117440905", - "stamp":"1327632318154494" - }, - { - "price":6.98999, - "amount":0.5176965, - "price_int":"698999", - "amount_int":"51769650", - "stamp":"1326752533585272" - }, - { - "price":6.99, - "amount":600.48897219, - "price_int":"699000", - "amount_int":"60048897219", - "stamp":"1328639422303475" - }, - { - "price":6.991, - "amount":1000, - "price_int":"699100", - "amount_int":"100000000000", - "stamp":"1326878014062465" - }, - { - "price":6.99149, - "amount":0.0206249, - "price_int":"699149", - "amount_int":"2062490", - "stamp":"1326850632612753" - }, - { - "price":6.99366, - "amount":3.92537548, - "price_int":"699366", - "amount_int":"392537548", - "stamp":"1327276781122215" - }, - { - "price":6.995, - "amount":5, - "price_int":"699500", - "amount_int":"500000000", - "stamp":"1328134340635079" - }, - { - "price":6.99569, - "amount":106, - "price_int":"699569", - "amount_int":"10600000000", - "stamp":"1326743389336065" - }, - { - "price":6.99627, - "amount":0.01778, - "price_int":"699627", - "amount_int":"1778000", - "stamp":"1328430348964607" - }, - { - "price":6.99742, - "amount":0.50718, - "price_int":"699742", - "amount_int":"50718000", - "stamp":"1328579331218523" - }, - { - "price":6.9976, - "amount":200, - "price_int":"699760", - "amount_int":"20000000000", - "stamp":"1327110393256346" - }, - { - "price":6.9986, - "amount":1, - "price_int":"699860", - "amount_int":"100000000", - "stamp":"1326745570489061" - }, - { - "price":6.999, - "amount":159.05, - "price_int":"699900", - "amount_int":"15905000000", - "stamp":"1328149550850503" - }, - { - "price":6.9998, - "amount":1, - "price_int":"699980", - "amount_int":"100000000", - "stamp":"1326814621417204" - }, - { - "price":6.9999, - "amount":48.54405428, - "price_int":"699990", - "amount_int":"4854405428", - "stamp":"1328156286508813" - }, - { - "price":6.99991, - "amount":19.84164138, - "price_int":"699991", - "amount_int":"1984164138", - "stamp":"1326741225609196" - }, - { - "price":6.99999, - "amount":136.22560822, - "price_int":"699999", - "amount_int":"13622560822", - "stamp":"1326996365740945" - }, - { - "price":7, - "amount":5217.27441313, - "price_int":"700000", - "amount_int":"521727441313", - "stamp":"1328632628593181" - }, - { - "price":7.00071, - "amount":0.16844, - "price_int":"700071", - "amount_int":"16844000", - "stamp":"1328050792923431" - }, - { - "price":7.00428, - "amount":3.04356577, - "price_int":"700428", - "amount_int":"304356577", - "stamp":"1328644628214476" - }, - { - "price":7.00486, - "amount":0.0206177, - "price_int":"700486", - "amount_int":"2061770", - "stamp":"1326850599835972" - }, - { - "price":7.00548, - "amount":0.0629, - "price_int":"700548", - "amount_int":"6290000", - "stamp":"1328234844290236" - }, - { - "price":7.00608, - "amount":0.02, - "price_int":"700608", - "amount_int":"2000000", - "stamp":"1327571946541665" - }, - { - "price":7.00887, - "amount":53.2, - "price_int":"700887", - "amount_int":"5320000000", - "stamp":"1327594568663939" - }, - { - "price":7.00913, - "amount":0.64475, - "price_int":"700913", - "amount_int":"64475000", - "stamp":"1328577657933852" - }, - { - "price":7.00997, - "amount":3, - "price_int":"700997", - "amount_int":"300000000", - "stamp":"1326957743369751" - }, - { - "price":7.00999, - "amount":0.5187773, - "price_int":"700999", - "amount_int":"51877730", - "stamp":"1326996360236265" - }, - { - "price":7.01, - "amount":277.0405739, - "price_int":"701000", - "amount_int":"27704057390", - "stamp":"1328494087323763" - }, - { - "price":7.01124, - "amount":50, - "price_int":"701124", - "amount_int":"5000000000", - "stamp":"1328155472488105" - }, - { - "price":7.01234, - "amount":27.77, - "price_int":"701234", - "amount_int":"2777000000", - "stamp":"1326745358786610" - }, - { - "price":7.01415, - "amount":1.13737, - "price_int":"701415", - "amount_int":"113737000", - "stamp":"1328459649109715" - }, - { - "price":7.01416, - "amount":0.42764, - "price_int":"701416", - "amount_int":"42764000", - "stamp":"1328580060086110" - }, - { - "price":7.01425, - "amount":0.51782, - "price_int":"701425", - "amount_int":"51782000", - "stamp":"1328488252851483" - }, - { - "price":7.01512, - "amount":0.05738, - "price_int":"701512", - "amount_int":"5738000", - "stamp":"1327854851285860" - }, - { - "price":7.01641, - "amount":4.02763, - "price_int":"701641", - "amount_int":"402763000", - "stamp":"1328571263558376" - }, - { - "price":7.018, - "amount":0.2469, - "price_int":"701800", - "amount_int":"24690000", - "stamp":"1328519453683684" - }, - { - "price":7.01823, - "amount":461.9106117, - "price_int":"701823", - "amount_int":"46191061170", - "stamp":"1328213558036921" - }, - { - "price":7.01999, - "amount":0.5182144, - "price_int":"701999", - "amount_int":"51821440", - "stamp":"1326996354283250" - }, - { - "price":7.02, - "amount":18.54726952, - "price_int":"702000", - "amount_int":"1854726952", - "stamp":"1327638459952589" - }, - { - "price":7.0201, - "amount":3.77056, - "price_int":"702010", - "amount_int":"377056000", - "stamp":"1327803560271960" - }, - { - "price":7.02046, - "amount":0.2975, - "price_int":"702046", - "amount_int":"29750000", - "stamp":"1328459102906627" - }, - { - "price":7.02124, - "amount":10.29634, - "price_int":"702124", - "amount_int":"1029634000", - "stamp":"1328219283424811" - }, - { - "price":7.02222, - "amount":0.02, - "price_int":"702222", - "amount_int":"2000000", - "stamp":"1327571944283309" - }, - { - "price":7.025, - "amount":0.1, - "price_int":"702500", - "amount_int":"10000000", - "stamp":"1326958470899373" - }, - { - "price":7.02573, - "amount":0.76453, - "price_int":"702573", - "amount_int":"76453000", - "stamp":"1328620009675446" - }, - { - "price":7.0265, - "amount":0.12984, - "price_int":"702650", - "amount_int":"12984000", - "stamp":"1328568865264273" - }, - { - "price":7.0296, - "amount":0.1, - "price_int":"702960", - "amount_int":"10000000", - "stamp":"1326744400487183" - }, - { - "price":7.02999, - "amount":0.5176943, - "price_int":"702999", - "amount_int":"51769430", - "stamp":"1326996349658629" - }, - { - "price":7.03, - "amount":96.03673057, - "price_int":"703000", - "amount_int":"9603673057", - "stamp":"1328317798801535" - }, - { - "price":7.03159, - "amount":0.0206084, - "price_int":"703159", - "amount_int":"2060840", - "stamp":"1326850593576292" - }, - { - "price":7.0332, - "amount":0.24175, - "price_int":"703320", - "amount_int":"24175000", - "stamp":"1328460467890308" - }, - { - "price":7.037, - "amount":0.3, - "price_int":"703700", - "amount_int":"30000000", - "stamp":"1326737835624171" - }, - { - "price":7.038, - "amount":0.02132904, - "price_int":"703800", - "amount_int":"2132904", - "stamp":"1326849595346615" - }, - { - "price":7.03836, - "amount":0.02, - "price_int":"703836", - "amount_int":"2000000", - "stamp":"1327571940962486" - }, - { - "price":7.03999, - "amount":0.5173069, - "price_int":"703999", - "amount_int":"51730690", - "stamp":"1326996346381608" - }, - { - "price":7.04, - "amount":16.4425057, - "price_int":"704000", - "amount_int":"1644250570", - "stamp":"1328290149748255" - }, - { - "price":7.04024, - "amount":4.66712, - "price_int":"704024", - "amount_int":"466712000", - "stamp":"1327963653485215" - }, - { - "price":7.04087, - "amount":96.92366, - "price_int":"704087", - "amount_int":"9692366000", - "stamp":"1328324260529395" - }, - { - "price":7.04496, - "amount":0.0206031, - "price_int":"704496", - "amount_int":"2060310", - "stamp":"1326850537216345" - }, - { - "price":7.04873, - "amount":2.0874, - "price_int":"704873", - "amount_int":"208740000", - "stamp":"1328571313439595" - }, - { - "price":7.0499, - "amount":0.05, - "price_int":"704990", - "amount_int":"5000000", - "stamp":"1327116962322999" - }, - { - "price":7.04999, - "amount":0.5169516, - "price_int":"704999", - "amount_int":"51695160", - "stamp":"1326996341830824" - }, - { - "price":7.05, - "amount":1559.78600106, - "price_int":"705000", - "amount_int":"155978600106", - "stamp":"1328168950405425" - }, - { - "price":7.05111, - "amount":0.01032, - "price_int":"705111", - "amount_int":"1032000", - "stamp":"1328621491336938" - }, - { - "price":7.05451, - "amount":0.02, - "price_int":"705451", - "amount_int":"2000000", - "stamp":"1327571937851930" - }, - { - "price":7.05764, - "amount":12.18277, - "price_int":"705764", - "amount_int":"1218277000", - "stamp":"1328642725726617" - }, - { - "price":7.05833, - "amount":0.0206001, - "price_int":"705833", - "amount_int":"2060010", - "stamp":"1326850533526586" - }, - { - "price":7.059, - "amount":0.03692, - "price_int":"705900", - "amount_int":"3692000", - "stamp":"1328000461749785" - }, - { - "price":7.05932, - "amount":0.89877, - "price_int":"705932", - "amount_int":"89877000", - "stamp":"1328570895095398" - }, - { - "price":7.05958, - "amount":3.54672, - "price_int":"705958", - "amount_int":"354672000", - "stamp":"1328642293606601" - }, - { - "price":7.05999, - "amount":0.5164856, - "price_int":"705999", - "amount_int":"51648560", - "stamp":"1326996338502435" - }, - { - "price":7.06, - "amount":15.65600597, - "price_int":"706000", - "amount_int":"1565600597", - "stamp":"1327638489072105" - }, - { - "price":7.06694, - "amount":0.01853, - "price_int":"706694", - "amount_int":"1853000", - "stamp":"1328430349464443" - }, - { - "price":7.0681, - "amount":0.4542, - "price_int":"706810", - "amount_int":"45420000", - "stamp":"1328451915580448" - }, - { - "price":7.06999, - "amount":0.4148989, - "price_int":"706999", - "amount_int":"41489890", - "stamp":"1326729087019303" - }, - { - "price":7.07, - "amount":26.3324932, - "price_int":"707000", - "amount_int":"2633249320", - "stamp":"1327638481678353" - }, - { - "price":7.07011, - "amount":59.69, - "price_int":"707011", - "amount_int":"5969000000", - "stamp":"1326814212157892" - }, - { - "price":7.07065, - "amount":0.02, - "price_int":"707065", - "amount_int":"2000000", - "stamp":"1327571934769555" - }, - { - "price":7.071, - "amount":20, - "price_int":"707100", - "amount_int":"2000000000", - "stamp":"1326888594297811" - }, - { - "price":7.07142, - "amount":0.17442, - "price_int":"707142", - "amount_int":"17442000", - "stamp":"1328050793387228" - }, - { - "price":7.0717, - "amount":5.71221173, - "price_int":"707170", - "amount_int":"571221173", - "stamp":"1327872853782749" - }, - { - "price":7.07287, - "amount":20, - "price_int":"707287", - "amount_int":"2000000000", - "stamp":"1327174975112065" - }, - { - "price":7.074, - "amount":0.2927, - "price_int":"707400", - "amount_int":"29270000", - "stamp":"1327526466053111" - }, - { - "price":7.075, - "amount":0.1, - "price_int":"707500", - "amount_int":"10000000", - "stamp":"1326958478673055" - }, - { - "price":7.07624, - "amount":0.06603, - "price_int":"707624", - "amount_int":"6603000", - "stamp":"1328234844750414" - }, - { - "price":7.07712, - "amount":2.2727, - "price_int":"707712", - "amount_int":"227270000", - "stamp":"1328181851548742" - }, - { - "price":7.0797, - "amount":3, - "price_int":"707970", - "amount_int":"300000000", - "stamp":"1326791242477852" - }, - { - "price":7.07993, - "amount":0.66634, - "price_int":"707993", - "amount_int":"66634000", - "stamp":"1328577658382486" - }, - { - "price":7.07999, - "amount":0.4144514, - "price_int":"707999", - "amount_int":"41445140", - "stamp":"1326729083538866" - }, - { - "price":7.08, - "amount":226.70908939, - "price_int":"708000", - "amount_int":"22670908939", - "stamp":"1327638493805790" - }, - { - "price":7.08499, - "amount":1, - "price_int":"708499", - "amount_int":"100000000", - "stamp":"1328204279227125" - }, - { - "price":7.085, - "amount":1.35157, - "price_int":"708500", - "amount_int":"135157000", - "stamp":"1328613309149872" - }, - { - "price":7.08507, - "amount":35.9305925, - "price_int":"708507", - "amount_int":"3593059250", - "stamp":"1327684480072914" - }, - { - "price":7.0851, - "amount":0.63756, - "price_int":"708510", - "amount_int":"63756000", - "stamp":"1328613357159464" - }, - { - "price":7.08539, - "amount":0.0200788, - "price_int":"708539", - "amount_int":"2007880", - "stamp":"1327104074811165" - }, - { - "price":7.08598, - "amount":0.05925, - "price_int":"708598", - "amount_int":"5925000", - "stamp":"1327854511075612" - }, - { - "price":7.08679, - "amount":0.02, - "price_int":"708679", - "amount_int":"2000000", - "stamp":"1327571931453591" - }, - { - "price":7.088, - "amount":7, - "price_int":"708800", - "amount_int":"700000000", - "stamp":"1326797419980015" - }, - { - "price":7.089, - "amount":50, - "price_int":"708900", - "amount_int":"5000000000", - "stamp":"1326729094758249" - }, - { - "price":7.08999, - "amount":0.4140862, - "price_int":"708999", - "amount_int":"41408620", - "stamp":"1326729080069419" - }, - { - "price":7.09, - "amount":261.03716827, - "price_int":"709000", - "amount_int":"26103716827", - "stamp":"1328152476498923" - }, - { - "price":7.09101, - "amount":4.08146, - "price_int":"709101", - "amount_int":"408146000", - "stamp":"1327803560865245" - }, - { - "price":7.09137, - "amount":0.30754, - "price_int":"709137", - "amount_int":"30754000", - "stamp":"1328459103405220" - }, - { - "price":7.09216, - "amount":10.70422, - "price_int":"709216", - "amount_int":"1070422000", - "stamp":"1328217630951445" - }, - { - "price":7.0931, - "amount":0.079018, - "price_int":"709310", - "amount_int":"7901800", - "stamp":"1326742514431562" - }, - { - "price":7.0967, - "amount":0.79438, - "price_int":"709670", - "amount_int":"79438000", - "stamp":"1328620010116560" - }, - { - "price":7.09747, - "amount":0.13429, - "price_int":"709747", - "amount_int":"13429000", - "stamp":"1328568866049240" - }, - { - "price":7.09843, - "amount":0.0204102, - "price_int":"709843", - "amount_int":"2041020", - "stamp":"1326820574871333" - }, - { - "price":7.0997, - "amount":3, - "price_int":"709970", - "amount_int":"300000000", - "stamp":"1326957735774952" - }, - { - "price":7.0998, - "amount":1.01681184, - "price_int":"709980", - "amount_int":"101681184", - "stamp":"1326731316752725" - }, - { - "price":7.0999, - "amount":0.1, - "price_int":"709990", - "amount_int":"10000000", - "stamp":"1327117022905239" - }, - { - "price":7.09999, - "amount":5.4121021, - "price_int":"709999", - "amount_int":"541210210", - "stamp":"1326841896633460" - }, - { - "price":7.1, - "amount":1931.93082247, - "price_int":"710000", - "amount_int":"193193082247", - "stamp":"1328156176373946" - }, - { - "price":7.101, - "amount":10, - "price_int":"710100", - "amount_int":"1000000000", - "stamp":"1326752254582733" - }, - { - "price":7.10294, - "amount":1.23531649, - "price_int":"710294", - "amount_int":"123531649", - "stamp":"1327978922235266" - }, - { - "price":7.10424, - "amount":0.25039, - "price_int":"710424", - "amount_int":"25039000", - "stamp":"1328460468324905" - }, - { - "price":7.10778, - "amount":0.03976, - "price_int":"710778", - "amount_int":"3976000", - "stamp":"1327104549368927" - }, - { - "price":7.10999, - "amount":0.41122, - "price_int":"710999", - "amount_int":"41122000", - "stamp":"1326704717104911" - }, - { - "price":7.11, - "amount":105.5255738, - "price_int":"711000", - "amount_int":"10552557380", - "stamp":"1327638509229643" - }, - { - "price":7.111, - "amount":35, - "price_int":"711100", - "amount_int":"3500000000", - "stamp":"1326816630731153" - }, - { - "price":7.11136, - "amount":4.82825, - "price_int":"711136", - "amount_int":"482825000", - "stamp":"1327963654099668" - }, - { - "price":7.1118, - "amount":0.0205866, - "price_int":"711180", - "amount_int":"2058660", - "stamp":"1326850028851491" - }, - { - "price":7.11908, - "amount":0.02, - "price_int":"711908", - "amount_int":"2000000", - "stamp":"1327571925933259" - }, - { - "price":7.11993, - "amount":2.15883, - "price_int":"711993", - "amount_int":"215883000", - "stamp":"1328570958686434" - }, - { - "price":7.11999, - "amount":0.410903, - "price_int":"711999", - "amount_int":"41090300", - "stamp":"1326704713664048" - }, - { - "price":7.12, - "amount":228.03070449, - "price_int":"712000", - "amount_int":"22803070449", - "stamp":"1328644030438586" - }, - { - "price":7.12051, - "amount":26.776, - "price_int":"712051", - "amount_int":"2677600000", - "stamp":"1327773571394365" - }, - { - "price":7.121, - "amount":10, - "price_int":"712100", - "amount_int":"1000000000", - "stamp":"1326752264744005" - }, - { - "price":7.12234, - "amount":0.01068, - "price_int":"712234", - "amount_int":"1068000", - "stamp":"1328621491809727" - }, - { - "price":7.123, - "amount":4.51, - "price_int":"712300", - "amount_int":"451000000", - "stamp":"1328390305805057" - }, - { - "price":7.1245, - "amount":3, - "price_int":"712450", - "amount_int":"300000000", - "stamp":"1326788479919000" - }, - { - "price":7.125, - "amount":5.65646, - "price_int":"712500", - "amount_int":"565646000", - "stamp":"1326958496984907" - }, - { - "price":7.12517, - "amount":0.020423, - "price_int":"712517", - "amount_int":"2042300", - "stamp":"1326820565129285" - }, - { - "price":7.12893, - "amount":12.68654, - "price_int":"712893", - "amount_int":"1268654000", - "stamp":"1328642400708765" - }, - { - "price":7.1296, - "amount":0.1, - "price_int":"712960", - "amount_int":"10000000", - "stamp":"1326744420669894" - }, - { - "price":7.12999, - "amount":0.4105638, - "price_int":"712999", - "amount_int":"41056380", - "stamp":"1326704684607212" - }, - { - "price":7.13, - "amount":70.2813175, - "price_int":"713000", - "amount_int":"7028131750", - "stamp":"1327638540195845" - }, - { - "price":7.13063, - "amount":0.92939, - "price_int":"713063", - "amount_int":"92939000", - "stamp":"1328570589858965" - }, - { - "price":7.13089, - "amount":3.68657, - "price_int":"713089", - "amount_int":"368657000", - "stamp":"1328642294045392" - }, - { - "price":7.13522, - "amount":0.02, - "price_int":"713522", - "amount_int":"2000000", - "stamp":"1327571922705748" - }, - { - "price":7.13832, - "amount":0.01929, - "price_int":"713832", - "amount_int":"1929000", - "stamp":"1328430349957275" - }, - { - "price":7.13854, - "amount":0.0204219, - "price_int":"713854", - "amount_int":"2042190", - "stamp":"1326820561029958" - }, - { - "price":7.1395, - "amount":0.47083, - "price_int":"713950", - "amount_int":"47083000", - "stamp":"1328451916084618" - }, - { - "price":7.13999, - "amount":0.410321, - "price_int":"713999", - "amount_int":"41032100", - "stamp":"1326704353888743" - }, - { - "price":7.14, - "amount":193.04374425, - "price_int":"714000", - "amount_int":"19304374425", - "stamp":"1327638543597496" - }, - { - "price":7.141, - "amount":100, - "price_int":"714100", - "amount_int":"10000000000", - "stamp":"1328225301356392" - }, - { - "price":7.1417, - "amount":17.37207313, - "price_int":"714170", - "amount_int":"1737207313", - "stamp":"1319318455929164" - }, - { - "price":7.14285, - "amount":0.18035, - "price_int":"714285", - "amount_int":"18035000", - "stamp":"1328050793849112" - }, - { - "price":7.143, - "amount":420, - "price_int":"714300", - "amount_int":"42000000000", - "stamp":"1328357675482626" - }, - { - "price":7.14656, - "amount":13.76998737, - "price_int":"714656", - "amount_int":"1376998737", - "stamp":"1326732751720179" - }, - { - "price":7.1468, - "amount":15, - "price_int":"714680", - "amount_int":"1500000000", - "stamp":"1326734744657559" - }, - { - "price":7.14772, - "amount":0.06913, - "price_int":"714772", - "amount_int":"6913000", - "stamp":"1328234845211027" - }, - { - "price":7.148, - "amount":0.1829, - "price_int":"714800", - "amount_int":"18290000", - "stamp":"1328367243365647" - }, - { - "price":7.14876, - "amount":142.738, - "price_int":"714876", - "amount_int":"14273800000", - "stamp":"1327165848910841" - }, - { - "price":7.1499, - "amount":2.074, - "price_int":"714990", - "amount_int":"207400000", - "stamp":"1326721842958890" - }, - { - "price":7.14999, - "amount":11.8600788, - "price_int":"714999", - "amount_int":"1186007880", - "stamp":"1326750523511147" - }, - { - "price":7.15, - "amount":345.98749362, - "price_int":"715000", - "amount_int":"34598749362", - "stamp":"1328425970247663" - }, - { - "price":7.15038, - "amount":3.43136856, - "price_int":"715038", - "amount_int":"343136856", - "stamp":"1328644628507846" - }, - { - "price":7.15137, - "amount":0.02, - "price_int":"715137", - "amount_int":"2000000", - "stamp":"1327571919571403" - }, - { - "price":7.15145, - "amount":0.68771, - "price_int":"715145", - "amount_int":"68771000", - "stamp":"1328577345060775" - }, - { - "price":7.15191, - "amount":3.4204066, - "price_int":"715191", - "amount_int":"342040660", - "stamp":"1326863701950886" - }, - { - "price":7.1543, - "amount":14.12952937, - "price_int":"715430", - "amount_int":"1412952937", - "stamp":"1328539234820244" - }, - { - "price":7.155, - "amount":50, - "price_int":"715500", - "amount_int":"5000000000", - "stamp":"1328514769055518" - }, - { - "price":7.159, - "amount":0.1758, - "price_int":"715900", - "amount_int":"17580000", - "stamp":"1328248487482558" - }, - { - "price":7.15999, - "amount":0.3598396, - "price_int":"715999", - "amount_int":"35983960", - "stamp":"1326704217577156" - }, - { - "price":7.16, - "amount":120.0224049, - "price_int":"716000", - "amount_int":"12002240490", - "stamp":"1327638550062419" - }, - { - "price":7.16004, - "amount":3.98674044, - "price_int":"716004", - "amount_int":"398674044", - "stamp":"1326960548164536" - }, - { - "price":7.16264, - "amount":4.07556, - "price_int":"716264", - "amount_int":"407556000", - "stamp":"1327803561405189" - }, - { - "price":7.163, - "amount":1.13646, - "price_int":"716300", - "amount_int":"113646000", - "stamp":"1328644488826410" - }, - { - "price":7.1634, - "amount":5, - "price_int":"716340", - "amount_int":"500000000", - "stamp":"1326824854173406" - }, - { - "price":7.1638, - "amount":11.1151, - "price_int":"716380", - "amount_int":"1111510000", - "stamp":"1328216705302377" - }, - { - "price":7.164, - "amount":0.1715, - "price_int":"716400", - "amount_int":"17150000", - "stamp":"1328162262704000" - }, - { - "price":7.16527, - "amount":0.02041, - "price_int":"716527", - "amount_int":"2041000", - "stamp":"1326813819795979" - }, - { - "price":7.16751, - "amount":0.02, - "price_int":"716751", - "amount_int":"2000000", - "stamp":"1327571917260035" - }, - { - "price":7.16798, - "amount":10, - "price_int":"716798", - "amount_int":"1000000000", - "stamp":"1326705003943565" - }, - { - "price":7.16838, - "amount":0.82394, - "price_int":"716838", - "amount_int":"82394000", - "stamp":"1328620010546131" - }, - { - "price":7.16916, - "amount":0.1387, - "price_int":"716916", - "amount_int":"13870000", - "stamp":"1328568866493212" - }, - { - "price":7.16999, - "amount":0.3596219, - "price_int":"716999", - "amount_int":"35962190", - "stamp":"1326704111704453" - }, - { - "price":7.17, - "amount":14.532392, - "price_int":"717000", - "amount_int":"1453239200", - "stamp":"1327638555253464" - }, - { - "price":7.1745, - "amount":0.00351602, - "price_int":"717450", - "amount_int":"351602", - "stamp":"1326606904144139" - }, - { - "price":7.175, - "amount":10.1, - "price_int":"717500", - "amount_int":"1010000000", - "stamp":"1326958507240853" - }, - { - "price":7.176, - "amount":0.25893, - "price_int":"717600", - "amount_int":"25893000", - "stamp":"1328460123313701" - }, - { - "price":7.1777, - "amount":54.33553335, - "price_int":"717770", - "amount_int":"5433553335", - "stamp":"1326759096450105" - }, - { - "price":7.17797, - "amount":0.3, - "price_int":"717797", - "amount_int":"30000000", - "stamp":"1326707773414920" - }, - { - "price":7.17859, - "amount":9.9, - "price_int":"717859", - "amount_int":"990000000", - "stamp":"1328051748129227" - }, - { - "price":7.17864, - "amount":0.0204102, - "price_int":"717864", - "amount_int":"2041020", - "stamp":"1326813816328770" - }, - { - "price":7.1799, - "amount":100, - "price_int":"717990", - "amount_int":"10000000000", - "stamp":"1326939802940905" - }, - { - "price":7.17999, - "amount":2.3593752, - "price_int":"717999", - "amount_int":"235937520", - "stamp":"1326717878095008" - }, - { - "price":7.18, - "amount":286.52514421, - "price_int":"718000", - "amount_int":"28652514421", - "stamp":"1327638559933099" - }, - { - "price":7.181, - "amount":25, - "price_int":"718100", - "amount_int":"2500000000", - "stamp":"1326728030545535" - }, - { - "price":7.18319, - "amount":5.34495, - "price_int":"718319", - "amount_int":"534495000", - "stamp":"1328569306106345" - }, - { - "price":7.18344, - "amount":10, - "price_int":"718344", - "amount_int":"1000000000", - "stamp":"1326727881145709" - }, - { - "price":7.18365, - "amount":0.02, - "price_int":"718365", - "amount_int":"2000000", - "stamp":"1327571914044478" - }, - { - "price":7.18768, - "amount":10.4995, - "price_int":"718768", - "amount_int":"1049950000", - "stamp":"1326924764892858" - }, - { - "price":7.188, - "amount":10.43119256, - "price_int":"718800", - "amount_int":"1043119256", - "stamp":"1327299763763545" - }, - { - "price":7.1888, - "amount":1, - "price_int":"718880", - "amount_int":"100000000", - "stamp":"1326713624388378" - }, - { - "price":7.18895, - "amount":0.1, - "price_int":"718895", - "amount_int":"10000000", - "stamp":"1326294517394720" - }, - { - "price":7.189, - "amount":50, - "price_int":"718900", - "amount_int":"5000000000", - "stamp":"1326107789657086" - }, - { - "price":7.1899, - "amount":25, - "price_int":"718990", - "amount_int":"2500000000", - "stamp":"1326582222521820" - }, - { - "price":7.19, - "amount":339.4357849, - "price_int":"719000", - "amount_int":"33943578490", - "stamp":"1327916467515514" - }, - { - "price":7.19201, - "amount":0.0204107, - "price_int":"719201", - "amount_int":"2041070", - "stamp":"1326813811835980" - }, - { - "price":7.19428, - "amount":0.01104, - "price_int":"719428", - "amount_int":"1104000", - "stamp":"1328621492267790" - }, - { - "price":7.19434, - "amount":1, - "price_int":"719434", - "amount_int":"100000000", - "stamp":"1326732752299517" - }, - { - "price":7.195, - "amount":2000, - "price_int":"719500", - "amount_int":"200000000000", - "stamp":"1326063258021929" - }, - { - "price":7.1979, - "amount":0.17669802, - "price_int":"719790", - "amount_int":"17669802", - "stamp":"1326041481117056" - }, - { - "price":7.198, - "amount":10, - "price_int":"719800", - "amount_int":"1000000000", - "stamp":"1326731813177093" - }, - { - "price":7.1987, - "amount":5, - "price_int":"719870", - "amount_int":"500000000", - "stamp":"1327450207644488" - }, - { - "price":7.19876, - "amount":1.83935, - "price_int":"719876", - "amount_int":"183935000", - "stamp":"1327208941425590" - }, - { - "price":7.1989, - "amount":25, - "price_int":"719890", - "amount_int":"2500000000", - "stamp":"1327046570622702" - }, - { - "price":7.199, - "amount":11, - "price_int":"719900", - "amount_int":"1100000000", - "stamp":"1326687169698676" - }, - { - "price":7.1995, - "amount":4.5, - "price_int":"719950", - "amount_int":"450000000", - "stamp":"1327527004196281" - }, - { - "price":7.1999, - "amount":7.42665723, - "price_int":"719990", - "amount_int":"742665723", - "stamp":"1328136689057378" - }, - { - "price":7.19999, - "amount":16.22437425, - "price_int":"719999", - "amount_int":"1622437425", - "stamp":"1326705011902942" - }, - { - "price":7.2, - "amount":2073.280812, - "price_int":"720000", - "amount_int":"207328081200", - "stamp":"1328462773347164" - }, - { - "price":7.20089, - "amount":23.5, - "price_int":"720089", - "amount_int":"2350000000", - "stamp":"1327335187683121" - }, - { - "price":7.202, - "amount":0.2654, - "price_int":"720200", - "amount_int":"26540000", - "stamp":"1328049641380538" - }, - { - "price":7.20217, - "amount":300, - "price_int":"720217", - "amount_int":"30000000000", - "stamp":"1326050054639282" - }, - { - "price":7.20288, - "amount":0.2076722, - "price_int":"720288", - "amount_int":"20767220", - "stamp":"1326167344962469" - }, - { - "price":7.20292, - "amount":3.82502, - "price_int":"720292", - "amount_int":"382502000", - "stamp":"1328642294484467" - }, - { - "price":7.20389, - "amount":100, - "price_int":"720389", - "amount_int":"10000000000", - "stamp":"1326068875153952" - }, - { - "price":7.20538, - "amount":0.92688197, - "price_int":"720538", - "amount_int":"92688197", - "stamp":"1326860760646348" - }, - { - "price":7.2072, - "amount":100, - "price_int":"720720", - "amount_int":"10000000000", - "stamp":"1326035434080086" - }, - { - "price":7.20721, - "amount":100, - "price_int":"720721", - "amount_int":"10000000000", - "stamp":"1326042119948429" - }, - { - "price":7.20829, - "amount":1, - "price_int":"720829", - "amount_int":"100000000", - "stamp":"1326684838036395" - }, - { - "price":7.20909, - "amount":0.1197032, - "price_int":"720909", - "amount_int":"11970320", - "stamp":"1326186550271044" - }, - { - "price":7.21, - "amount":26.62591371, - "price_int":"721000", - "amount_int":"2662591371", - "stamp":"1327660351042928" - }, - { - "price":7.21038, - "amount":0.27593, - "price_int":"721038", - "amount_int":"27593000", - "stamp":"1327922401369062" - }, - { - "price":7.21043, - "amount":0.02003, - "price_int":"721043", - "amount_int":"2003000", - "stamp":"1328430350553133" - }, - { - "price":7.21045, - "amount":0.96537443, - "price_int":"721045", - "amount_int":"96537443", - "stamp":"1325989655838318" - }, - { - "price":7.21087, - "amount":80, - "price_int":"721087", - "amount_int":"8000000000", - "stamp":"1326057017056269" - }, - { - "price":7.211, - "amount":0.0018886, - "price_int":"721100", - "amount_int":"188860", - "stamp":"1326096489815692" - }, - { - "price":7.21162, - "amount":0.48729, - "price_int":"721162", - "amount_int":"48729000", - "stamp":"1328451916975210" - }, - { - "price":7.215, - "amount":0.18622, - "price_int":"721500", - "amount_int":"18622000", - "stamp":"1328050730013243" - }, - { - "price":7.21594, - "amount":0.02, - "price_int":"721594", - "amount_int":"2000000", - "stamp":"1327571908971790" - }, - { - "price":7.217, - "amount":0.7, - "price_int":"721700", - "amount_int":"70000000", - "stamp":"1326300344838807" - }, - { - "price":7.21702, - "amount":4, - "price_int":"721702", - "amount_int":"400000000", - "stamp":"1326218944850694" - }, - { - "price":7.2187, - "amount":0.223153, - "price_int":"721870", - "amount_int":"22315300", - "stamp":"1326393733584936" - }, - { - "price":7.21875, - "amount":0.0204055, - "price_int":"721875", - "amount_int":"2040550", - "stamp":"1326813553172769" - }, - { - "price":7.2188, - "amount":1, - "price_int":"721880", - "amount_int":"100000000", - "stamp":"1326867678248123" - }, - { - "price":7.2193, - "amount":1, - "price_int":"721930", - "amount_int":"100000000", - "stamp":"1326687403089525" - }, - { - "price":7.21992, - "amount":0.07219, - "price_int":"721992", - "amount_int":"7219000", - "stamp":"1328234845675844" - }, - { - "price":7.22, - "amount":16.3891774, - "price_int":"722000", - "amount_int":"1638917740", - "stamp":"1327660355019886" - }, - { - "price":7.22091, - "amount":1.988, - "price_int":"722091", - "amount_int":"198800000", - "stamp":"1326977610327143" - }, - { - "price":7.22441, - "amount":0.1586424, - "price_int":"722441", - "amount_int":"15864240", - "stamp":"1325884868782847" - }, - { - "price":7.225, - "amount":0.1, - "price_int":"722500", - "amount_int":"10000000", - "stamp":"1327832209344457" - }, - { - "price":7.22914, - "amount":0.02, - "price_int":"722914", - "amount_int":"2000000", - "stamp":"1327571911160723" - }, - { - "price":7.22968, - "amount":3.02303949, - "price_int":"722968", - "amount_int":"302303949", - "stamp":"1328051700895894" - }, - { - "price":7.22971, - "amount":0.995, - "price_int":"722971", - "amount_int":"99500000", - "stamp":"1325816366099652" - }, - { - "price":7.22991, - "amount":0.995, - "price_int":"722991", - "amount_int":"99500000", - "stamp":"1325816366651775" - }, - { - "price":7.23, - "amount":40.5777875, - "price_int":"723000", - "amount_int":"4057778750", - "stamp":"1327660358717310" - }, - { - "price":7.23208, - "amount":0.02, - "price_int":"723208", - "amount_int":"2000000", - "stamp":"1327571904031619" - }, - { - "price":7.23212, - "amount":0.0204037, - "price_int":"723212", - "amount_int":"2040370", - "stamp":"1326813549497414" - }, - { - "price":7.23499, - "amount":4.39561, - "price_int":"723499", - "amount_int":"439561000", - "stamp":"1327803562017689" - }, - { - "price":7.23616, - "amount":11.76046, - "price_int":"723616", - "amount_int":"1176046000", - "stamp":"1328217631409980" - }, - { - "price":7.23664, - "amount":3.2, - "price_int":"723664", - "amount_int":"320000000", - "stamp":"1327467876699608" - }, - { - "price":7.238, - "amount":5.2335, - "price_int":"723800", - "amount_int":"523350000", - "stamp":"1328483296839262" - }, - { - "price":7.2383, - "amount":0.5802, - "price_int":"723830", - "amount_int":"58020000", - "stamp":"1315759116668389" - }, - { - "price":7.23847, - "amount":1.69347269, - "price_int":"723847", - "amount_int":"169347269", - "stamp":"1326701830829060" - }, - { - "price":7.23855, - "amount":0.995, - "price_int":"723855", - "amount_int":"99500000", - "stamp":"1325819470611499" - }, - { - "price":7.239, - "amount":10, - "price_int":"723900", - "amount_int":"1000000000", - "stamp":"1325733320090385" - }, - { - "price":7.24, - "amount":118.3886008, - "price_int":"724000", - "amount_int":"11838860080", - "stamp":"1328320836013212" - }, - { - "price":7.24079, - "amount":0.8532, - "price_int":"724079", - "amount_int":"85320000", - "stamp":"1328620010976771" - }, - { - "price":7.24158, - "amount":0.14306, - "price_int":"724158", - "amount_int":"14306000", - "stamp":"1328568254466053" - }, - { - "price":7.24548, - "amount":0.0204013, - "price_int":"724548", - "amount_int":"2040130", - "stamp":"1326813545776611" - }, - { - "price":7.2475, - "amount":100, - "price_int":"724750", - "amount_int":"10000000000", - "stamp":"1326032408224279" - }, - { - "price":7.24822, - "amount":0.02, - "price_int":"724822", - "amount_int":"2000000", - "stamp":"1327571900910795" - }, - { - "price":7.249, - "amount":2.79763945, - "price_int":"724900", - "amount_int":"279763945", - "stamp":"1328149561176880" - }, - { - "price":7.24907, - "amount":0.160034, - "price_int":"724907", - "amount_int":"16003400", - "stamp":"1326202090536624" - }, - { - "price":7.2499, - "amount":21, - "price_int":"724990", - "amount_int":"2100000000", - "stamp":"1326808430598291" - }, - { - "price":7.24995, - "amount":0.995, - "price_int":"724995", - "amount_int":"99500000", - "stamp":"1325816365540847" - }, - { - "price":7.24999, - "amount":3.295, - "price_int":"724999", - "amount_int":"329500000", - "stamp":"1326719740923025" - }, - { - "price":7.25, - "amount":538.99877856, - "price_int":"725000", - "amount_int":"53899877856", - "stamp":"1328486345142775" - }, - { - "price":7.25004, - "amount":0.995, - "price_int":"725004", - "amount_int":"99500000", - "stamp":"1325815399100786" - }, - { - "price":7.2501, - "amount":2.485, - "price_int":"725010", - "amount_int":"248500000", - "stamp":"1325850423303797" - }, - { - "price":7.25549, - "amount":4.868, - "price_int":"725549", - "amount_int":"486800000", - "stamp":"1326791123776642" - }, - { - "price":7.25885, - "amount":1, - "price_int":"725885", - "amount_int":"100000000", - "stamp":"1326835985883200" - }, - { - "price":7.26, - "amount":11.3879276, - "price_int":"726000", - "amount_int":"1138792760", - "stamp":"1327660369008118" - }, - { - "price":7.26437, - "amount":0.02, - "price_int":"726437", - "amount_int":"2000000", - "stamp":"1327571898400116" - }, - { - "price":7.26695, - "amount":0.01139, - "price_int":"726695", - "amount_int":"1139000", - "stamp":"1328621164209521" - }, - { - "price":7.26999, - "amount":0.11, - "price_int":"726999", - "amount_int":"11000000", - "stamp":"1326294580762958" - }, - { - "price":7.27, - "amount":38.2861134, - "price_int":"727000", - "amount_int":"3828611340", - "stamp":"1327660373147220" - }, - { - "price":7.27057, - "amount":0.0204056, - "price_int":"727057", - "amount_int":"2040560", - "stamp":"1326813555606107" - }, - { - "price":7.27222, - "amount":0.0203998, - "price_int":"727222", - "amount_int":"2039980", - "stamp":"1326813136679849" - }, - { - "price":7.275, - "amount":0.1, - "price_int":"727500", - "amount_int":"10000000", - "stamp":"1327832222102822" - }, - { - "price":7.27567, - "amount":3.96209, - "price_int":"727567", - "amount_int":"396209000", - "stamp":"1328642294922725" - }, - { - "price":7.28, - "amount":58.387308, - "price_int":"728000", - "amount_int":"5838730800", - "stamp":"1327660376771987" - }, - { - "price":7.28051, - "amount":0.02, - "price_int":"728051", - "amount_int":"2000000", - "stamp":"1327571895951053" - }, - { - "price":7.28326, - "amount":0.02077, - "price_int":"728326", - "amount_int":"2077000", - "stamp":"1328430351149504" - }, - { - "price":7.28446, - "amount":0.50359, - "price_int":"728446", - "amount_int":"50359000", - "stamp":"1328451919089978" - }, - { - "price":7.28559, - "amount":0.0204008, - "price_int":"728559", - "amount_int":"2040080", - "stamp":"1326813133930263" - }, - { - "price":7.28747, - "amount":0.97908108, - "price_int":"728747", - "amount_int":"97908108", - "stamp":"1326089191387066" - }, - { - "price":7.288, - "amount":54, - "price_int":"728800", - "amount_int":"5400000000", - "stamp":"1327086421090566" - }, - { - "price":7.289, - "amount":50, - "price_int":"728900", - "amount_int":"5000000000", - "stamp":"1325831515460326" - }, - { - "price":7.29, - "amount":60.46488303, - "price_int":"729000", - "amount_int":"6046488303", - "stamp":"1327660380209410" - }, - { - "price":7.2905, - "amount":0.0434021, - "price_int":"729050", - "amount_int":"4340210", - "stamp":"1326328413480607" - }, - { - "price":7.29284, - "amount":0.07523, - "price_int":"729284", - "amount_int":"7523000", - "stamp":"1328234846162280" - }, - { - "price":7.29665, - "amount":0.23731, - "price_int":"729665", - "amount_int":"23731000", - "stamp":"1328457439781968" - }, - { - "price":7.298, - "amount":0.2469, - "price_int":"729800", - "amount_int":"24690000", - "stamp":"1328519458288090" - }, - { - "price":7.29896, - "amount":0.0204031, - "price_int":"729896", - "amount_int":"2040310", - "stamp":"1326813129926989" - }, - { - "price":7.3, - "amount":644.58828996, - "price_int":"730000", - "amount_int":"64458828996", - "stamp":"1328641487213612" - }, - { - "price":7.30172, - "amount":3.81670574, - "price_int":"730172", - "amount_int":"381670574", - "stamp":"1328644628813708" - }, - { - "price":7.30807, - "amount":4.78679, - "price_int":"730807", - "amount_int":"478679000", - "stamp":"1328570836804267" - }, - { - "price":7.30925, - "amount":2.28652, - "price_int":"730925", - "amount_int":"228652000", - "stamp":"1328572619251026" - }, - { - "price":7.31, - "amount":0.3866867, - "price_int":"731000", - "amount_int":"38668670", - "stamp":"1327493836465668" - }, - { - "price":7.31232, - "amount":0.0204056, - "price_int":"731232", - "amount_int":"2040560", - "stamp":"1326813126430612" - }, - { - "price":7.31337, - "amount":36.2403126, - "price_int":"731337", - "amount_int":"3624031260", - "stamp":"1328291384557482" - }, - { - "price":7.31393, - "amount":0.88217, - "price_int":"731393", - "amount_int":"88217000", - "stamp":"1328619692074683" - }, - { - "price":7.31702, - "amount":5, - "price_int":"731702", - "amount_int":"500000000", - "stamp":"1326218960003045" - }, - { - "price":7.3185, - "amount":0.155109, - "price_int":"731850", - "amount_int":"15510900", - "stamp":"1325846309837922" - }, - { - "price":7.319, - "amount":1.24372, - "price_int":"731900", - "amount_int":"124372000", - "stamp":"1328642884209534" - }, - { - "price":7.32, - "amount":10.3867542, - "price_int":"732000", - "amount_int":"1038675420", - "stamp":"1327611316682086" - }, - { - "price":7.32453, - "amount":0.0203987, - "price_int":"732453", - "amount_int":"2039870", - "stamp":"1326813139959050" - }, - { - "price":7.325, - "amount":0.1, - "price_int":"732500", - "amount_int":"10000000", - "stamp":"1327832251778313" - }, - { - "price":7.32569, - "amount":2, - "price_int":"732569", - "amount_int":"200000000", - "stamp":"1326933565751923" - }, - { - "price":7.32749, - "amount":3.96447057, - "price_int":"732749", - "amount_int":"396447057", - "stamp":"1326901655244006" - }, - { - "price":7.32894, - "amount":0.02, - "price_int":"732894", - "amount_int":"2000000", - "stamp":"1327571887637586" - }, - { - "price":7.33, - "amount":20.07812978, - "price_int":"733000", - "amount_int":"2007812978", - "stamp":"1327493823041384" - }, - { - "price":7.33021, - "amount":1.80125917, - "price_int":"733021", - "amount_int":"180125917", - "stamp":"1325820948646498" - }, - { - "price":7.33097, - "amount":3, - "price_int":"733097", - "amount_int":"300000000", - "stamp":"1326957752426714" - }, - { - "price":7.33194, - "amount":30.00027, - "price_int":"733194", - "amount_int":"3000027000", - "stamp":"1328464304015798" - }, - { - "price":7.33905, - "amount":10.20049659, - "price_int":"733905", - "amount_int":"1020049659", - "stamp":"1326841558669027" - }, - { - "price":7.33906, - "amount":0.0204074, - "price_int":"733906", - "amount_int":"2040740", - "stamp":"1326813119561963" - }, - { - "price":7.34, - "amount":34.69939941, - "price_int":"734000", - "amount_int":"3469939941", - "stamp":"1327493819851237" - }, - { - "price":7.341, - "amount":1, - "price_int":"734100", - "amount_int":"100000000", - "stamp":"1326050770008548" - }, - { - "price":7.34261, - "amount":0.02, - "price_int":"734261", - "amount_int":"2000000", - "stamp":"1327571890360200" - }, - { - "price":7.345, - "amount":6.05774223, - "price_int":"734500", - "amount_int":"605774223", - "stamp":"1326046948565341" - }, - { - "price":7.34508, - "amount":0.02, - "price_int":"734508", - "amount_int":"2000000", - "stamp":"1327571884320247" - }, - { - "price":7.34569, - "amount":14, - "price_int":"734569", - "amount_int":"1400000000", - "stamp":"1326305095547589" - }, - { - "price":7.34574, - "amount":3.79931119, - "price_int":"734574", - "amount_int":"379931119", - "stamp":"1326830738101817" - }, - { - "price":7.3489, - "amount":25, - "price_int":"734890", - "amount_int":"2500000000", - "stamp":"1327046616658798" - }, - { - "price":7.34917, - "amount":4.09778, - "price_int":"734917", - "amount_int":"409778000", - "stamp":"1328642295378825" - }, - { - "price":7.35, - "amount":91.67751158, - "price_int":"735000", - "amount_int":"9167751158", - "stamp":"1327493817287680" - }, - { - "price":7.35001, - "amount":4.86564922, - "price_int":"735001", - "amount_int":"486564922", - "stamp":"1325550840701834" - }, - { - "price":7.3509, - "amount":1, - "price_int":"735090", - "amount_int":"100000000", - "stamp":"1325813306603594" - }, - { - "price":7.35109, - "amount":24.42038638, - "price_int":"735109", - "amount_int":"2442038638", - "stamp":"1326834403163172" - }, - { - "price":7.35229, - "amount":1, - "price_int":"735229", - "amount_int":"100000000", - "stamp":"1326876930875031" - }, - { - "price":7.35243, - "amount":156.75057756, - "price_int":"735243", - "amount_int":"15675057756", - "stamp":"1328549272705387" - }, - { - "price":7.35683, - "amount":0.02149, - "price_int":"735683", - "amount_int":"2149000", - "stamp":"1328430351631842" - }, - { - "price":7.357, - "amount":0.2927, - "price_int":"735700", - "amount_int":"29270000", - "stamp":"1327526470248561" - }, - { - "price":7.35804, - "amount":0.59109, - "price_int":"735804", - "amount_int":"59109000", - "stamp":"1328573997101880" - }, - { - "price":7.36, - "amount":5.486465, - "price_int":"736000", - "amount_int":"548646500", - "stamp":"1327493814542468" - }, - { - "price":7.36091, - "amount":33.040278, - "price_int":"736091", - "amount_int":"3304027800", - "stamp":"1328307874395870" - }, - { - "price":7.36123, - "amount":0.02, - "price_int":"736123", - "amount_int":"2000000", - "stamp":"1327571882047257" - }, - { - "price":7.3658, - "amount":0.0203785, - "price_int":"736580", - "amount_int":"2037850", - "stamp":"1326728947812619" - }, - { - "price":7.36651, - "amount":0.07823, - "price_int":"736651", - "amount_int":"7823000", - "stamp":"1328234846647406" - }, - { - "price":7.37, - "amount":7.3443811, - "price_int":"737000", - "amount_int":"734438110", - "stamp":"1327493811612333" - }, - { - "price":7.37123, - "amount":2.18812, - "price_int":"737123", - "amount_int":"218812000", - "stamp":"1327063184457696" - }, - { - "price":7.375, - "amount":0.1, - "price_int":"737500", - "amount_int":"10000000", - "stamp":"1327832262823085" - }, - { - "price":7.37737, - "amount":0.02, - "price_int":"737737", - "amount_int":"2000000", - "stamp":"1327571878914085" - }, - { - "price":7.37916, - "amount":0.0203809, - "price_int":"737916", - "amount_int":"2038090", - "stamp":"1326728943377014" - }, - { - "price":7.3799, - "amount":100, - "price_int":"737990", - "amount_int":"10000000000", - "stamp":"1315783520297975" - }, - { - "price":7.38, - "amount":2.3862941, - "price_int":"738000", - "amount_int":"238629410", - "stamp":"1327493809098653" - }, - { - "price":7.3831, - "amount":0.5689, - "price_int":"738310", - "amount_int":"56890000", - "stamp":"1315759111694138" - }, - { - "price":7.387, - "amount":10, - "price_int":"738700", - "amount_int":"1000000000", - "stamp":"1326229326668659" - }, - { - "price":7.389, - "amount":50, - "price_int":"738900", - "amount_int":"5000000000", - "stamp":"1325825340437852" - }, - { - "price":7.39, - "amount":0.3861896, - "price_int":"739000", - "amount_int":"38618960", - "stamp":"1327493806137431" - }, - { - "price":7.39197, - "amount":0.0204067, - "price_int":"739197", - "amount_int":"2040670", - "stamp":"1326813122869614" - }, - { - "price":7.39253, - "amount":0.0203823, - "price_int":"739253", - "amount_int":"2038230", - "stamp":"1326728936603869" - }, - { - "price":7.39351, - "amount":0.02, - "price_int":"739351", - "amount_int":"2000000", - "stamp":"1327571874728796" - }, - { - "price":7.3987, - "amount":5, - "price_int":"739870", - "amount_int":"500000000", - "stamp":"1327450213161805" - }, - { - "price":7.39881, - "amount":27.61277522, - "price_int":"739881", - "amount_int":"2761277522", - "stamp":"1327529030993139" - }, - { - "price":7.39999, - "amount":0.21, - "price_int":"739999", - "amount_int":"21000000", - "stamp":"1325813812034453" - }, - { - "price":7.4, - "amount":132.54788928, - "price_int":"740000", - "amount_int":"13254788928", - "stamp":"1328304993484778" - }, - { - "price":7.40312, - "amount":4.87620414, - "price_int":"740312", - "amount_int":"487620414", - "stamp":"1328132259082151" - }, - { - "price":7.4059, - "amount":0.020383, - "price_int":"740590", - "amount_int":"2038300", - "stamp":"1326728930447300" - }, - { - "price":7.40965, - "amount":3.28823424, - "price_int":"740965", - "amount_int":"328823424", - "stamp":"1327571870357729" - }, - { - "price":7.41, - "amount":0.3859565, - "price_int":"741000", - "amount_int":"38595650", - "stamp":"1327493749670658" - }, - { - "price":7.41702, - "amount":7, - "price_int":"741702", - "amount_int":"700000000", - "stamp":"1326218963725290" - }, - { - "price":7.41927, - "amount":0.0203838, - "price_int":"741927", - "amount_int":"2038380", - "stamp":"1326728924887326" - }, - { - "price":7.42, - "amount":23.3858386, - "price_int":"742000", - "amount_int":"2338583860", - "stamp":"1327493746320186" - }, - { - "price":7.4234, - "amount":4.44373, - "price_int":"742340", - "amount_int":"444373000", - "stamp":"1328643292807272" - }, - { - "price":7.42491, - "amount":2, - "price_int":"742491", - "amount_int":"200000000", - "stamp":"1326836998615774" - }, - { - "price":7.425, - "amount":0.1, - "price_int":"742500", - "amount_int":"10000000", - "stamp":"1327832276122388" - }, - { - "price":7.4258, - "amount":7.42274, - "price_int":"742580", - "amount_int":"742274000", - "stamp":"1327571867347360" - }, - { - "price":7.42721, - "amount":5, - "price_int":"742721", - "amount_int":"500000000", - "stamp":"1327844219918056" - }, - { - "price":7.43, - "amount":69.4920293, - "price_int":"743000", - "amount_int":"6949202930", - "stamp":"1327615854847855" - }, - { - "price":7.43114, - "amount":0.02222, - "price_int":"743114", - "amount_int":"2222000", - "stamp":"1328430352252192" - }, - { - "price":7.43264, - "amount":0.020387, - "price_int":"743264", - "amount_int":"2038700", - "stamp":"1326728920760521" - }, - { - "price":7.436, - "amount":0.2084, - "price_int":"743600", - "amount_int":"20840000", - "stamp":"1328442166125258" - }, - { - "price":7.4388, - "amount":1.1, - "price_int":"743880", - "amount_int":"110000000", - "stamp":"1327196788162953" - }, - { - "price":7.44, - "amount":25.3856305, - "price_int":"744000", - "amount_int":"2538563050", - "stamp":"1327493740599215" - }, - { - "price":7.44092, - "amount":0.08121, - "price_int":"744092", - "amount_int":"8121000", - "stamp":"1328234847104760" - }, - { - "price":7.44194, - "amount":22.82, - "price_int":"744194", - "amount_int":"2282000000", - "stamp":"1327571865082708" - }, - { - "price":7.442, - "amount":5, - "price_int":"744200", - "amount_int":"500000000", - "stamp":"1326032777977145" - }, - { - "price":7.4425, - "amount":26.72479331, - "price_int":"744250", - "amount_int":"2672479331", - "stamp":"1326312344840424" - }, - { - "price":7.443, - "amount":2, - "price_int":"744300", - "amount_int":"200000000", - "stamp":"1326667103045963" - }, - { - "price":7.446, - "amount":0.2032877, - "price_int":"744600", - "amount_int":"20328770", - "stamp":"1328367248257158" - }, - { - "price":7.44999, - "amount":0.8493, - "price_int":"744999", - "amount_int":"84930000", - "stamp":"1326349139914037" - }, - { - "price":7.45, - "amount":85.5087594, - "price_int":"745000", - "amount_int":"8550875940", - "stamp":"1328304987670875" - }, - { - "price":7.4518, - "amount":19.88, - "price_int":"745180", - "amount_int":"1988000000", - "stamp":"1326909620445241" - }, - { - "price":7.45343, - "amount":0.1, - "price_int":"745343", - "amount_int":"10000000", - "stamp":"1315378028990425" - }, - { - "price":7.45789, - "amount":4.19792157, - "price_int":"745789", - "amount_int":"419792157", - "stamp":"1328644629109301" - }, - { - "price":7.458, - "amount":0.1758, - "price_int":"745800", - "amount_int":"17580000", - "stamp":"1328248492016160" - }, - { - "price":7.45808, - "amount":0.02, - "price_int":"745808", - "amount_int":"2000000", - "stamp":"1327571861806620" - }, - { - "price":7.45937, - "amount":105.0203885, - "price_int":"745937", - "amount_int":"10502038850", - "stamp":"1326797716861778" - }, - { - "price":7.46, - "amount":45.3854575, - "price_int":"746000", - "amount_int":"4538545750", - "stamp":"1327493734844792" - }, - { - "price":7.468, - "amount":1, - "price_int":"746800", - "amount_int":"100000000", - "stamp":"1326722000789810" - }, - { - "price":7.469, - "amount":25, - "price_int":"746900", - "amount_int":"2500000000", - "stamp":"1326728042642991" - }, - { - "price":7.4699, - "amount":35, - "price_int":"746990", - "amount_int":"3500000000", - "stamp":"1328477339628276" - }, - { - "price":7.47, - "amount":19.3853962, - "price_int":"747000", - "amount_int":"1938539620", - "stamp":"1327493731416604" - }, - { - "price":7.47274, - "amount":0.0203897, - "price_int":"747274", - "amount_int":"2038970", - "stamp":"1326728909783496" - }, - { - "price":7.47423, - "amount":0.02, - "price_int":"747423", - "amount_int":"2000000", - "stamp":"1327571858591769" - }, - { - "price":7.475, - "amount":0.1, - "price_int":"747500", - "amount_int":"10000000", - "stamp":"1327832280971388" - }, - { - "price":7.47999, - "amount":201, - "price_int":"747999", - "amount_int":"20100000000", - "stamp":"1326697971790859" - }, - { - "price":7.48, - "amount":148.38797753, - "price_int":"748000", - "amount_int":"14838797753", - "stamp":"1328139676378681" - }, - { - "price":7.48569, - "amount":10, - "price_int":"748569", - "amount_int":"1000000000", - "stamp":"1326674250434374" - }, - { - "price":7.48611, - "amount":11.65078361, - "price_int":"748611", - "amount_int":"1165078361", - "stamp":"1326742276671656" - }, - { - "price":7.489, - "amount":50, - "price_int":"748900", - "amount_int":"5000000000", - "stamp":"1325831554837454" - }, - { - "price":7.49, - "amount":433.2881748, - "price_int":"749000", - "amount_int":"43328817480", - "stamp":"1328217867138949" - }, - { - "price":7.49037, - "amount":0.02, - "price_int":"749037", - "amount_int":"2000000", - "stamp":"1327571856323426" - }, - { - "price":7.4919, - "amount":100, - "price_int":"749190", - "amount_int":"10000000000", - "stamp":"1328225348524338" - }, - { - "price":7.499, - "amount":1, - "price_int":"749900", - "amount_int":"100000000", - "stamp":"1328149567928007" - }, - { - "price":7.49948, - "amount":0.0202524, - "price_int":"749948", - "amount_int":"2025240", - "stamp":"1326369148707380" - }, - { - "price":7.4999, - "amount":3.04397716, - "price_int":"749990", - "amount_int":"304397716", - "stamp":"1326117676823044" - }, - { - "price":7.49999, - "amount":2, - "price_int":"749999", - "amount_int":"200000000", - "stamp":"1326616726819262" - }, - { - "price":7.5, - "amount":1853.5811074, - "price_int":"750000", - "amount_int":"185358110740", - "stamp":"1328632644109082" - }, - { - "price":7.5062, - "amount":0.02293, - "price_int":"750620", - "amount_int":"2293000", - "stamp":"1328430017318365" - }, - { - "price":7.50651, - "amount":0.02, - "price_int":"750651", - "amount_int":"2000000", - "stamp":"1327571853050381" - }, - { - "price":7.509, - "amount":2, - "price_int":"750900", - "amount_int":"200000000", - "stamp":"1325813281170762" - }, - { - "price":7.51, - "amount":20.3854246, - "price_int":"751000", - "amount_int":"2038542460", - "stamp":"1327493710025756" - }, - { - "price":7.51284, - "amount":0.0202589, - "price_int":"751284", - "amount_int":"2025890", - "stamp":"1326369145994063" - }, - { - "price":7.51608, - "amount":0.08415, - "price_int":"751608", - "amount_int":"8415000", - "stamp":"1328234847564685" - }, - { - "price":7.51702, - "amount":9, - "price_int":"751702", - "amount_int":"900000000", - "stamp":"1326218969534220" - }, - { - "price":7.52, - "amount":6.3853912, - "price_int":"752000", - "amount_int":"638539120", - "stamp":"1327493706617247" - }, - { - "price":7.52266, - "amount":0.02, - "price_int":"752266", - "amount_int":"2000000", - "stamp":"1327571850281792" - }, - { - "price":7.525, - "amount":53.1, - "price_int":"752500", - "amount_int":"5310000000", - "stamp":"1327832294310308" - }, - { - "price":7.52621, - "amount":0.0202536, - "price_int":"752621", - "amount_int":"2025360", - "stamp":"1326369142620646" - }, - { - "price":7.527, - "amount":0.2335, - "price_int":"752700", - "amount_int":"23350000", - "stamp":"1328483302899682" - }, - { - "price":7.53, - "amount":0.3853562, - "price_int":"753000", - "amount_int":"38535620", - "stamp":"1327493703209178" - }, - { - "price":7.5307, - "amount":0.5577, - "price_int":"753070", - "amount_int":"55770000", - "stamp":"1315383484562480" - }, - { - "price":7.5325, - "amount":0.46605, - "price_int":"753250", - "amount_int":"46605000", - "stamp":"1326241703417059" - }, - { - "price":7.5388, - "amount":0.02, - "price_int":"753880", - "amount_int":"2000000", - "stamp":"1327571847957376" - }, - { - "price":7.53958, - "amount":0.020254, - "price_int":"753958", - "amount_int":"2025400", - "stamp":"1326369139436618" - }, - { - "price":7.54, - "amount":0.385319, - "price_int":"754000", - "amount_int":"38531900", - "stamp":"1327493700821933" - }, - { - "price":7.545, - "amount":0.66791264, - "price_int":"754500", - "amount_int":"66791264", - "stamp":"1326280663814229" - }, - { - "price":7.55, - "amount":10.4852797, - "price_int":"755000", - "amount_int":"1048527970", - "stamp":"1327493697509259" - }, - { - "price":7.55295, - "amount":0.0202544, - "price_int":"755295", - "amount_int":"2025440", - "stamp":"1326369136820311" - }, - { - "price":7.55494, - "amount":0.02, - "price_int":"755494", - "amount_int":"2000000", - "stamp":"1327571844714741" - }, - { - "price":7.56, - "amount":200.3852381, - "price_int":"756000", - "amount_int":"20038523810", - "stamp":"1328105860364730" - }, - { - "price":7.56036, - "amount":0.0232846, - "price_int":"756036", - "amount_int":"2328460", - "stamp":"1326842204125425" - }, - { - "price":7.56632, - "amount":0.0202548, - "price_int":"756632", - "amount_int":"2025480", - "stamp":"1326369134264409" - }, - { - "price":7.57, - "amount":0.3851946, - "price_int":"757000", - "amount_int":"38519460", - "stamp":"1327493691669005" - }, - { - "price":7.57108, - "amount":0.02, - "price_int":"757108", - "amount_int":"2000000", - "stamp":"1327571841493603" - }, - { - "price":7.575, - "amount":0.1, - "price_int":"757500", - "amount_int":"10000000", - "stamp":"1327832299754973" - }, - { - "price":7.57968, - "amount":0.4202552, - "price_int":"757968", - "amount_int":"42025520", - "stamp":"1326369131262478" - }, - { - "price":7.58, - "amount":0.3851502, - "price_int":"758000", - "amount_int":"38515020", - "stamp":"1327493688858940" - }, - { - "price":7.58171, - "amount":16, - "price_int":"758171", - "amount_int":"1600000000", - "stamp":"1326778687914007" - }, - { - "price":7.582, - "amount":5, - "price_int":"758200", - "amount_int":"500000000", - "stamp":"1326032799842005" - }, - { - "price":7.58723, - "amount":420.02, - "price_int":"758723", - "amount_int":"42002000000", - "stamp":"1328318199455660" - }, - { - "price":7.589, - "amount":50, - "price_int":"758900", - "amount_int":"5000000000", - "stamp":"1325825346269355" - }, - { - "price":7.59, - "amount":0.3851012, - "price_int":"759000", - "amount_int":"38510120", - "stamp":"1327493685495531" - }, - { - "price":7.592, - "amount":0.08707, - "price_int":"759200", - "amount_int":"8707000", - "stamp":"1328234518041438" - }, - { - "price":7.59305, - "amount":5.0202556, - "price_int":"759305", - "amount_int":"502025560", - "stamp":"1326698580088634" - }, - { - "price":7.598, - "amount":23, - "price_int":"759800", - "amount_int":"2300000000", - "stamp":"1326795158945776" - }, - { - "price":7.59999, - "amount":2000, - "price_int":"759999", - "amount_int":"200000000000", - "stamp":"1328363637976463" - }, - { - "price":7.6, - "amount":150.4530558, - "price_int":"760000", - "amount_int":"15045305580", - "stamp":"1327493683075433" - }, - { - "price":7.60337, - "amount":0.02, - "price_int":"760337", - "amount_int":"2000000", - "stamp":"1327571836040363" - }, - { - "price":7.60642, - "amount":0.020256, - "price_int":"760642", - "amount_int":"2025600", - "stamp":"1326369125601092" - }, - { - "price":7.61, - "amount":0.3850155, - "price_int":"761000", - "amount_int":"38501550", - "stamp":"1327493680214420" - }, - { - "price":7.6147, - "amount":0.01, - "price_int":"761470", - "amount_int":"1000000", - "stamp":"1326136796822476" - }, - { - "price":7.61694, - "amount":13.9, - "price_int":"761694", - "amount_int":"1390000000", - "stamp":"1326905780998167" - }, - { - "price":7.61702, - "amount":11, - "price_int":"761702", - "amount_int":"1100000000", - "stamp":"1326218974666582" - }, - { - "price":7.61851, - "amount":4.57373346, - "price_int":"761851", - "amount_int":"457373346", - "stamp":"1328644629463729" - }, - { - "price":7.61951, - "amount":0.02, - "price_int":"761951", - "amount_int":"2000000", - "stamp":"1327571833260165" - }, - { - "price":7.61979, - "amount":0.020248, - "price_int":"761979", - "amount_int":"2024800", - "stamp":"1326369122763673" - }, - { - "price":7.62, - "amount":5.3849753, - "price_int":"762000", - "amount_int":"538497530", - "stamp":"1327493676677767" - }, - { - "price":7.625, - "amount":0.1, - "price_int":"762500", - "amount_int":"10000000", - "stamp":"1327832350690268" - }, - { - "price":7.63, - "amount":0.3849342, - "price_int":"763000", - "amount_int":"38493420", - "stamp":"1327493674251267" - }, - { - "price":7.631, - "amount":1, - "price_int":"763100", - "amount_int":"100000000", - "stamp":"1326050781294617" - }, - { - "price":7.63316, - "amount":0.0202484, - "price_int":"763316", - "amount_int":"2024840", - "stamp":"1326369118498385" - }, - { - "price":7.63566, - "amount":0.02, - "price_int":"763566", - "amount_int":"2000000", - "stamp":"1327571831021962" - }, - { - "price":7.63622, - "amount":17, - "price_int":"763622", - "amount_int":"1700000000", - "stamp":"1325825760289554" - }, - { - "price":7.64, - "amount":5.3848866, - "price_int":"764000", - "amount_int":"538488660", - "stamp":"1327493671491323" - }, - { - "price":7.64652, - "amount":0.0202488, - "price_int":"764652", - "amount_int":"2024880", - "stamp":"1326369115090308" - }, - { - "price":7.65, - "amount":170.7447857, - "price_int":"765000", - "amount_int":"17074478570", - "stamp":"1328081366626260" - }, - { - "price":7.6518, - "amount":0.10017743, - "price_int":"765180", - "amount_int":"10017743", - "stamp":"1326717194711476" - }, - { - "price":7.65949, - "amount":10, - "price_int":"765949", - "amount_int":"1000000000", - "stamp":"1326021392367304" - }, - { - "price":7.65989, - "amount":0.0205724, - "price_int":"765989", - "amount_int":"2057240", - "stamp":"1326922499209597" - }, - { - "price":7.66, - "amount":3.0685878, - "price_int":"766000", - "amount_int":"306858780", - "stamp":"1327493665373799" - }, - { - "price":7.66794, - "amount":0.02, - "price_int":"766794", - "amount_int":"2000000", - "stamp":"1327571825929027" - }, - { - "price":7.67, - "amount":450.1807454, - "price_int":"767000", - "amount_int":"45018074540", - "stamp":"1327493662729218" - }, - { - "price":7.67326, - "amount":0.0205688, - "price_int":"767326", - "amount_int":"2056880", - "stamp":"1326922495564870" - }, - { - "price":7.675, - "amount":0.1, - "price_int":"767500", - "amount_int":"10000000", - "stamp":"1327832356248700" - }, - { - "price":7.68, - "amount":5.3847082, - "price_int":"768000", - "amount_int":"538470820", - "stamp":"1327493659969736" - }, - { - "price":7.68095, - "amount":104.93552738, - "price_int":"768095", - "amount_int":"10493552738", - "stamp":"1327529037331489" - }, - { - "price":7.6813, - "amount":0.5468, - "price_int":"768130", - "amount_int":"54680000", - "stamp":"1315243988192955" - }, - { - "price":7.68299, - "amount":0.02, - "price_int":"768299", - "amount_int":"2000000", - "stamp":"1327571828250998" - }, - { - "price":7.68409, - "amount":0.02, - "price_int":"768409", - "amount_int":"2000000", - "stamp":"1327571823047258" - }, - { - "price":7.68415, - "amount":1, - "price_int":"768415", - "amount_int":"100000000", - "stamp":"1326811238998539" - }, - { - "price":7.68663, - "amount":20.0205652, - "price_int":"768663", - "amount_int":"2002056520", - "stamp":"1326922493247929" - }, - { - "price":7.68873, - "amount":2, - "price_int":"768873", - "amount_int":"200000000", - "stamp":"1326023975704398" - }, - { - "price":7.689, - "amount":50, - "price_int":"768900", - "amount_int":"5000000000", - "stamp":"1325837250189312" - }, - { - "price":7.6899, - "amount":10, - "price_int":"768990", - "amount_int":"1000000000", - "stamp":"1315750637986666" - }, - { - "price":7.69, - "amount":0.384668, - "price_int":"769000", - "amount_int":"38466800", - "stamp":"1327493657258569" - }, - { - "price":7.6987, - "amount":5, - "price_int":"769870", - "amount_int":"500000000", - "stamp":"1327450218234770" - }, - { - "price":7.7, - "amount":68.61921615, - "price_int":"770000", - "amount_int":"6861921615", - "stamp":"1328201061366963" - }, - { - "price":7.70206, - "amount":25, - "price_int":"770206", - "amount_int":"2500000000", - "stamp":"1325960070440059" - }, - { - "price":7.71, - "amount":0.384604, - "price_int":"771000", - "amount_int":"38460400", - "stamp":"1327493651755245" - }, - { - "price":7.71336, - "amount":0.4, - "price_int":"771336", - "amount_int":"40000000", - "stamp":"1325886345518303" - }, - { - "price":7.71637, - "amount":0.02, - "price_int":"771637", - "amount_int":"2000000", - "stamp":"1327571818114195" - }, - { - "price":7.71702, - "amount":11, - "price_int":"771702", - "amount_int":"1100000000", - "stamp":"1326218978785863" - }, - { - "price":7.72, - "amount":12.3845717, - "price_int":"772000", - "amount_int":"1238457170", - "stamp":"1327493649190413" - }, - { - "price":7.725, - "amount":0.1, - "price_int":"772500", - "amount_int":"10000000", - "stamp":"1327832374089779" - }, - { - "price":7.72673, - "amount":0.0205512, - "price_int":"772673", - "amount_int":"2055120", - "stamp":"1326922483995136" - }, - { - "price":7.73, - "amount":0.83955614, - "price_int":"773000", - "amount_int":"83955614", - "stamp":"1327493646598115" - }, - { - "price":7.73162, - "amount":0.02, - "price_int":"773162", - "amount_int":"2000000", - "stamp":"1327571820288565" - }, - { - "price":7.73209, - "amount":1, - "price_int":"773209", - "amount_int":"100000000", - "stamp":"1326569162058948" - }, - { - "price":7.73252, - "amount":0.02, - "price_int":"773252", - "amount_int":"2000000", - "stamp":"1327571815360051" - }, - { - "price":7.734, - "amount":0.086, - "price_int":"773400", - "amount_int":"8600000", - "stamp":"1325774127387567" - }, - { - "price":7.7352, - "amount":2, - "price_int":"773520", - "amount_int":"200000000", - "stamp":"1327175319078123" - }, - { - "price":7.74, - "amount":20.3185091, - "price_int":"774000", - "amount_int":"2031850910", - "stamp":"1328222300057337" - }, - { - "price":7.744, - "amount":0.1829, - "price_int":"774400", - "amount_int":"18290000", - "stamp":"1328367254222401" - }, - { - "price":7.74496, - "amount":0.519365, - "price_int":"774496", - "amount_int":"51936500", - "stamp":"1326838985542878" - }, - { - "price":7.74866, - "amount":0.02, - "price_int":"774866", - "amount_int":"2000000", - "stamp":"1327571812168893" - }, - { - "price":7.749, - "amount":1, - "price_int":"774900", - "amount_int":"100000000", - "stamp":"1328149573055622" - }, - { - "price":7.75, - "amount":164.92274151, - "price_int":"775000", - "amount_int":"16492274151", - "stamp":"1327682368103347" - }, - { - "price":7.75347, - "amount":0.45617545, - "price_int":"775347", - "amount_int":"45617545", - "stamp":"1326922477590725" - }, - { - "price":7.76, - "amount":0.3844545, - "price_int":"776000", - "amount_int":"38445450", - "stamp":"1327493637709617" - }, - { - "price":7.7648, - "amount":0.02, - "price_int":"776480", - "amount_int":"2000000", - "stamp":"1327571809230788" - }, - { - "price":7.76684, - "amount":0.0205368, - "price_int":"776684", - "amount_int":"2053680", - "stamp":"1326922474085588" - }, - { - "price":7.77, - "amount":21.0534188, - "price_int":"777000", - "amount_int":"2105341880", - "stamp":"1327493634956086" - }, - { - "price":7.771, - "amount":27.02128477, - "price_int":"777100", - "amount_int":"2702128477", - "stamp":"1327964551169300" - }, - { - "price":7.775, - "amount":0.1, - "price_int":"777500", - "amount_int":"10000000", - "stamp":"1327832379749057" - }, - { - "price":7.7777, - "amount":10, - "price_int":"777770", - "amount_int":"1000000000", - "stamp":"1325824138350039" - }, - { - "price":7.78, - "amount":0.3843925, - "price_int":"778000", - "amount_int":"38439250", - "stamp":"1327493632076588" - }, - { - "price":7.78094, - "amount":0.02, - "price_int":"778094", - "amount_int":"2000000", - "stamp":"1327571806931386" - }, - { - "price":7.78315, - "amount":0.0205556, - "price_int":"778315", - "amount_int":"2055560", - "stamp":"1326922486545233" - }, - { - "price":7.78329, - "amount":4.94315753, - "price_int":"778329", - "amount_int":"494315753", - "stamp":"1328644629754141" - }, - { - "price":7.78475, - "amount":30.5531878, - "price_int":"778475", - "amount_int":"3055318780", - "stamp":"1326685652652901" - }, - { - "price":7.789, - "amount":50, - "price_int":"778900", - "amount_int":"5000000000", - "stamp":"1326010302642156" - }, - { - "price":7.79, - "amount":230.3843663, - "price_int":"779000", - "amount_int":"23038436630", - "stamp":"1327493629758323" - }, - { - "price":7.79499, - "amount":0.08270691, - "price_int":"779499", - "amount_int":"8270691", - "stamp":"1315424883513232" - }, - { - "price":7.79709, - "amount":0.02, - "price_int":"779709", - "amount_int":"2000000", - "stamp":"1327571804346760" - }, - { - "price":7.7999, - "amount":25, - "price_int":"779990", - "amount_int":"2500000000", - "stamp":"1315751421836774" - }, - { - "price":7.8, - "amount":232.91307126, - "price_int":"780000", - "amount_int":"23291307126", - "stamp":"1328327166930308" - }, - { - "price":7.80499, - "amount":40, - "price_int":"780499", - "amount_int":"4000000000", - "stamp":"1326614753579171" - }, - { - "price":7.80694, - "amount":0.0205192, - "price_int":"780694", - "amount_int":"2051920", - "stamp":"1326922465194359" - }, - { - "price":7.81, - "amount":45.3283201, - "price_int":"781000", - "amount_int":"4532832010", - "stamp":"1327493623950682" - }, - { - "price":7.81013, - "amount":0.0205464, - "price_int":"781013", - "amount_int":"2054640", - "stamp":"1326922481436483" - }, - { - "price":7.81323, - "amount":0.02, - "price_int":"781323", - "amount_int":"2000000", - "stamp":"1327571802077758" - }, - { - "price":7.81702, - "amount":11, - "price_int":"781702", - "amount_int":"1100000000", - "stamp":"1326218981264661" - }, - { - "price":7.82, - "amount":0.3842997, - "price_int":"782000", - "amount_int":"38429970", - "stamp":"1327493621622597" - }, - { - "price":7.82031, - "amount":0.0205136, - "price_int":"782031", - "amount_int":"2051360", - "stamp":"1326922461590012" - }, - { - "price":7.823, - "amount":1, - "price_int":"782300", - "amount_int":"100000000", - "stamp":"1327242015304385" - }, - { - "price":7.8279, - "amount":1.20274, - "price_int":"782790", - "amount_int":"120274000", - "stamp":"1315304868443455" - }, - { - "price":7.82937, - "amount":0.02, - "price_int":"782937", - "amount_int":"2000000", - "stamp":"1327571798861979" - }, - { - "price":7.83, - "amount":0.3842819, - "price_int":"783000", - "amount_int":"38428190", - "stamp":"1327493618690992" - }, - { - "price":7.8349, - "amount":0.5361, - "price_int":"783490", - "amount_int":"53610000", - "stamp":"1315243785389498" - }, - { - "price":7.84, - "amount":0.3842663, - "price_int":"784000", - "amount_int":"38426630", - "stamp":"1327493615875815" - }, - { - "price":7.84094, - "amount":0.47, - "price_int":"784094", - "amount_int":"47000000", - "stamp":"1326431557295100" - }, - { - "price":7.84097, - "amount":5.03916, - "price_int":"784097", - "amount_int":"503916000", - "stamp":"1326796685220459" - }, - { - "price":7.842, - "amount":10, - "price_int":"784200", - "amount_int":"1000000000", - "stamp":"1325733442429831" - }, - { - "price":7.843, - "amount":1.89663598, - "price_int":"784300", - "amount_int":"189663598", - "stamp":"1326667248444560" - }, - { - "price":7.84552, - "amount":0.02, - "price_int":"784552", - "amount_int":"2000000", - "stamp":"1327571796589216" - }, - { - "price":7.84705, - "amount":0.4205024, - "price_int":"784705", - "amount_int":"42050240", - "stamp":"1326922456267272" - }, - { - "price":7.85, - "amount":10.9542491, - "price_int":"785000", - "amount_int":"1095424910", - "stamp":"1327832400537807" - }, - { - "price":7.8506, - "amount":0.0205312, - "price_int":"785060", - "amount_int":"2053120", - "stamp":"1326922470887372" - }, - { - "price":7.8557, - "amount":1693.5573511, - "price_int":"785570", - "amount_int":"169355735110", - "stamp":"1328473905381801" - }, - { - "price":7.85589, - "amount":10.00007123, - "price_int":"785589", - "amount_int":"1000007123", - "stamp":"1316075053927722" - }, - { - "price":7.85999, - "amount":1, - "price_int":"785999", - "amount_int":"100000000", - "stamp":"1315325189235440" - }, - { - "price":7.86, - "amount":0.3842329, - "price_int":"786000", - "amount_int":"38423290", - "stamp":"1327493610785362" - }, - { - "price":7.86041, - "amount":0.0204968, - "price_int":"786041", - "amount_int":"2049680", - "stamp":"1326922452587736" - }, - { - "price":7.86166, - "amount":0.02, - "price_int":"786166", - "amount_int":"2000000", - "stamp":"1327571793981929" - }, - { - "price":7.86301, - "amount":20, - "price_int":"786301", - "amount_int":"2000000000", - "stamp":"1325851960900669" - }, - { - "price":7.86409, - "amount":0.0205256, - "price_int":"786409", - "amount_int":"2052560", - "stamp":"1326922468600400" - }, - { - "price":7.87, - "amount":0.37461567, - "price_int":"787000", - "amount_int":"37461567", - "stamp":"1327493608492548" - }, - { - "price":7.8777, - "amount":5, - "price_int":"787770", - "amount_int":"500000000", - "stamp":"1326032072817040" - }, - { - "price":7.8778, - "amount":0.02, - "price_int":"787780", - "amount_int":"2000000", - "stamp":"1327571790761475" - }, - { - "price":7.88, - "amount":0.3735407, - "price_int":"788000", - "amount_int":"37354070", - "stamp":"1327493605265028" - }, - { - "price":7.88715, - "amount":4.4854856, - "price_int":"788715", - "amount_int":"448548560", - "stamp":"1326922447342587" - }, - { - "price":7.889, - "amount":50, - "price_int":"788900", - "amount_int":"5000000000", - "stamp":"1325837254816401" - }, - { - "price":7.88999, - "amount":0.3533333, - "price_int":"788999", - "amount_int":"35333330", - "stamp":"1326841948354949" - }, - { - "price":7.89, - "amount":52.0201904, - "price_int":"789000", - "amount_int":"5202019040", - "stamp":"1327493601537941" - }, - { - "price":7.9, - "amount":252.69001178, - "price_int":"790000", - "amount_int":"25269001178", - "stamp":"1328054085548594" - }, - { - "price":7.90052, - "amount":0.0204792, - "price_int":"790052", - "amount_int":"2047920", - "stamp":"1326922443873124" - }, - { - "price":7.90455, - "amount":0.020508, - "price_int":"790455", - "amount_int":"2050800", - "stamp":"1326922459252497" - }, - { - "price":7.91, - "amount":5.3734997, - "price_int":"791000", - "amount_int":"537349970", - "stamp":"1327493315615038" - }, - { - "price":7.91009, - "amount":0.02, - "price_int":"791009", - "amount_int":"2000000", - "stamp":"1327571785715303" - }, - { - "price":7.91389, - "amount":0.020472, - "price_int":"791389", - "amount_int":"2047200", - "stamp":"1326922440608695" - }, - { - "price":7.91494, - "amount":0.1, - "price_int":"791494", - "amount_int":"10000000", - "stamp":"1315236146415448" - }, - { - "price":7.92, - "amount":12.3734901, - "price_int":"792000", - "amount_int":"1237349010", - "stamp":"1327493311644679" - }, - { - "price":7.92612, - "amount":0.02, - "price_int":"792612", - "amount_int":"2000000", - "stamp":"1327571788684649" - }, - { - "price":7.92623, - "amount":0.02, - "price_int":"792623", - "amount_int":"2000000", - "stamp":"1327571782450669" - }, - { - "price":7.92725, - "amount":0.020464, - "price_int":"792725", - "amount_int":"2046400", - "stamp":"1326922437505493" - }, - { - "price":7.93, - "amount":80.3734805, - "price_int":"793000", - "amount_int":"8037348050", - "stamp":"1327493308449167" - }, - { - "price":7.93058, - "amount":0.8878, - "price_int":"793058", - "amount_int":"88780000", - "stamp":"1326372033810085" - }, - { - "price":7.94, - "amount":7.3349673, - "price_int":"794000", - "amount_int":"733496730", - "stamp":"1327493305594394" - }, - { - "price":7.94062, - "amount":1.0204556, - "price_int":"794062", - "amount_int":"102045560", - "stamp":"1326922435208196" - }, - { - "price":7.94237, - "amount":0.02, - "price_int":"794237", - "amount_int":"2000000", - "stamp":"1327571777606740" - }, - { - "price":7.94502, - "amount":0.020492, - "price_int":"794502", - "amount_int":"2049200", - "stamp":"1326922450021704" - }, - { - "price":7.94992, - "amount":0.505, - "price_int":"794992", - "amount_int":"50500000", - "stamp":"1328644773246843" - }, - { - "price":7.95, - "amount":178.73306887, - "price_int":"795000", - "amount_int":"17873306887", - "stamp":"1327832411375648" - }, - { - "price":7.95197, - "amount":5.30545034, - "price_int":"795197", - "amount_int":"530545034", - "stamp":"1328644630044235" - }, - { - "price":7.95399, - "amount":0.0204488, - "price_int":"795399", - "amount_int":"2044880", - "stamp":"1326922429648243" - }, - { - "price":7.95852, - "amount":0.02, - "price_int":"795852", - "amount_int":"2000000", - "stamp":"1327571775323112" - }, - { - "price":7.96, - "amount":5.2734449, - "price_int":"796000", - "amount_int":"527344490", - "stamp":"1327493299858220" - }, - { - "price":7.96736, - "amount":0.020442, - "price_int":"796736", - "amount_int":"2044200", - "stamp":"1326922425126068" - }, - { - "price":7.969, - "amount":25, - "price_int":"796900", - "amount_int":"2500000000", - "stamp":"1326728058304543" - }, - { - "price":7.97, - "amount":12.3734357, - "price_int":"797000", - "amount_int":"1237343570", - "stamp":"1327493288295610" - }, - { - "price":7.97016, - "amount":0.14663368, - "price_int":"797016", - "amount_int":"14663368", - "stamp":"1315213837550685" - }, - { - "price":7.97216, - "amount":170, - "price_int":"797216", - "amount_int":"17000000000", - "stamp":"1325845530073365" - }, - { - "price":7.9777, - "amount":5, - "price_int":"797770", - "amount_int":"500000000", - "stamp":"1326032084815494" - }, - { - "price":7.98, - "amount":32.55370391, - "price_int":"798000", - "amount_int":"3255370391", - "stamp":"1327493285975774" - }, - { - "price":7.98073, - "amount":0.4204352, - "price_int":"798073", - "amount_int":"42043520", - "stamp":"1326922421369835" - }, - { - "price":7.986, - "amount":1, - "price_int":"798600", - "amount_int":"100000000", - "stamp":"1326721941701167" - }, - { - "price":7.989, - "amount":50, - "price_int":"798900", - "amount_int":"5000000000", - "stamp":"1326528452734540" - }, - { - "price":7.98998, - "amount":0.521, - "price_int":"798998", - "amount_int":"52100000", - "stamp":"1325813838939550" - }, - { - "price":7.99, - "amount":164.83502353, - "price_int":"799000", - "amount_int":"16483502353", - "stamp":"1327493282487253" - }, - { - "price":7.9908, - "amount":0.02, - "price_int":"799080", - "amount_int":"2000000", - "stamp":"1327571770258774" - }, - { - "price":7.9916, - "amount":0.5256, - "price_int":"799160", - "amount_int":"52560000", - "stamp":"1315241843459518" - }, - { - "price":7.99178, - "amount":4, - "price_int":"799178", - "amount_int":"400000000", - "stamp":"1327275240916143" - }, - { - "price":7.99409, - "amount":0.0204292, - "price_int":"799409", - "amount_int":"2042920", - "stamp":"1326922417944051" - }, - { - "price":7.999, - "amount":14.7, - "price_int":"799900", - "amount_int":"1470000000", - "stamp":"1328149578353626" - }, - { - "price":7.9991, - "amount":10, - "price_int":"799910", - "amount_int":"1000000000", - "stamp":"1326681754309063" - }, - { - "price":7.99999, - "amount":14.74680024, - "price_int":"799999", - "amount_int":"1474680024", - "stamp":"1326664120362386" - }, - { - "price":8, - "amount":2264.67955457, - "price_int":"800000", - "amount_int":"226467955457", - "stamp":"1328632654991642" - }, - { - "price":8.00099, - "amount":151.4765692, - "price_int":"800099", - "amount_int":"15147656920", - "stamp":"1328324222453137" - }, - { - "price":8.00695, - "amount":0.02, - "price_int":"800695", - "amount_int":"2000000", - "stamp":"1327571768062881" - }, - { - "price":8.00717, - "amount":0.02, - "price_int":"800717", - "amount_int":"2000000", - "stamp":"1327571772830734" - }, - { - "price":8.00746, - "amount":7.85835682, - "price_int":"800746", - "amount_int":"785835682", - "stamp":"1327303077890203" - }, - { - "price":8.01, - "amount":1.1700409, - "price_int":"801000", - "amount_int":"117004090", - "stamp":"1326147389726461" - }, - { - "price":8.02, - "amount":12.64268875, - "price_int":"802000", - "amount_int":"1264268875", - "stamp":"1326147386478899" - }, - { - "price":8.02083, - "amount":94.6094784, - "price_int":"802083", - "amount_int":"9460947840", - "stamp":"1328641819448219" - }, - { - "price":8.02309, - "amount":0.02, - "price_int":"802309", - "amount_int":"2000000", - "stamp":"1327571764833795" - }, - { - "price":8.03, - "amount":0.1700353, - "price_int":"803000", - "amount_int":"17003530", - "stamp":"1326147383297298" - }, - { - "price":8.0342, - "amount":0.0203436, - "price_int":"803420", - "amount_int":"2034360", - "stamp":"1326814930975214" - }, - { - "price":8.03832, - "amount":50, - "price_int":"803832", - "amount_int":"5000000000", - "stamp":"1328155539329636" - }, - { - "price":8.03923, - "amount":0.02, - "price_int":"803923", - "amount_int":"2000000", - "stamp":"1327571762683045" - }, - { - "price":8.04, - "amount":0.1700325, - "price_int":"804000", - "amount_int":"17003250", - "stamp":"1326147379684982" - }, - { - "price":8.04219, - "amount":19.3744302, - "price_int":"804219", - "amount_int":"1937443020", - "stamp":"1328435547740880" - }, - { - "price":8.043, - "amount":10, - "price_int":"804300", - "amount_int":"1000000000", - "stamp":"1325733506371313" - }, - { - "price":8.04757, - "amount":0.0203388, - "price_int":"804757", - "amount_int":"2033880", - "stamp":"1326814928255013" - }, - { - "price":8.05, - "amount":15.2700301, - "price_int":"805000", - "amount_int":"1527003010", - "stamp":"1328222887820367" - }, - { - "price":8.05538, - "amount":0.02, - "price_int":"805538", - "amount_int":"2000000", - "stamp":"1327571759815309" - }, - { - "price":8.06, - "amount":0.1700277, - "price_int":"806000", - "amount_int":"17002770", - "stamp":"1326147374528371" - }, - { - "price":8.06093, - "amount":0.020334, - "price_int":"806093", - "amount_int":"2033400", - "stamp":"1326814924643845" - }, - { - "price":8.06616, - "amount":0.1, - "price_int":"806616", - "amount_int":"10000000", - "stamp":"1315228026967271" - }, - { - "price":8.07, - "amount":0.1700253, - "price_int":"807000", - "amount_int":"17002530", - "stamp":"1326147371385059" - }, - { - "price":8.07152, - "amount":61.10164211, - "price_int":"807152", - "amount_int":"6110164211", - "stamp":"1327571492111138" - }, - { - "price":8.08, - "amount":0.1700229, - "price_int":"808000", - "amount_int":"17002290", - "stamp":"1326147368441429" - }, - { - "price":8.08767, - "amount":3.0203236, - "price_int":"808767", - "amount_int":"302032360", - "stamp":"1326814919007502" - }, - { - "price":8.089, - "amount":50, - "price_int":"808900", - "amount_int":"5000000000", - "stamp":"1325837259280382" - }, - { - "price":8.09, - "amount":0.1700209, - "price_int":"809000", - "amount_int":"17002090", - "stamp":"1326147366288094" - }, - { - "price":8.0911, - "amount":50, - "price_int":"809110", - "amount_int":"5000000000", - "stamp":"1325807464921998" - }, - { - "price":8.0934, - "amount":19, - "price_int":"809340", - "amount_int":"1900000000", - "stamp":"1327265914903876" - }, - { - "price":8.097, - "amount":7.91, - "price_int":"809700", - "amount_int":"791000000", - "stamp":"1327262113674334" - }, - { - "price":8.099, - "amount":1, - "price_int":"809900", - "amount_int":"100000000", - "stamp":"1315278918027654" - }, - { - "price":8.1, - "amount":66.24578963, - "price_int":"810000", - "amount_int":"6624578963", - "stamp":"1326956987874059" - }, - { - "price":8.1004, - "amount":0.09, - "price_int":"810040", - "amount_int":"9000000", - "stamp":"1326865976913397" - }, - { - "price":8.10104, - "amount":0.0203188, - "price_int":"810104", - "amount_int":"2031880", - "stamp":"1326814915403610" - }, - { - "price":8.11, - "amount":3.1700156, - "price_int":"811000", - "amount_int":"317001560", - "stamp":"1326569910349342" - }, - { - "price":8.114, - "amount":0.04101533, - "price_int":"811400", - "amount_int":"4101533", - "stamp":"1315621740552033" - }, - { - "price":8.11441, - "amount":0.4203144, - "price_int":"811441", - "amount_int":"42031440", - "stamp":"1326814912202461" - }, - { - "price":8.12, - "amount":0.1700136, - "price_int":"812000", - "amount_int":"17001360", - "stamp":"1326147355782336" - }, - { - "price":8.1226, - "amount":0.8668, - "price_int":"812260", - "amount_int":"86680000", - "stamp":"1326372050595221" - }, - { - "price":8.123, - "amount":1, - "price_int":"812300", - "amount_int":"100000000", - "stamp":"1327242034647534" - }, - { - "price":8.1231, - "amount":25, - "price_int":"812310", - "amount_int":"2500000000", - "stamp":"1326723972130493" - }, - { - "price":8.12431, - "amount":5.66006278, - "price_int":"812431", - "amount_int":"566006278", - "stamp":"1328644630431145" - }, - { - "price":8.12777, - "amount":0.0203104, - "price_int":"812777", - "amount_int":"2031040", - "stamp":"1326814909906582" - }, - { - "price":8.13, - "amount":0.1700116, - "price_int":"813000", - "amount_int":"17001160", - "stamp":"1326147353485456" - }, - { - "price":8.1334, - "amount":5, - "price_int":"813340", - "amount_int":"500000000", - "stamp":"1326824868852965" - }, - { - "price":8.13451, - "amount":5, - "price_int":"813451", - "amount_int":"500000000", - "stamp":"1326045484388391" - }, - { - "price":8.14, - "amount":0.03848527, - "price_int":"814000", - "amount_int":"3848527", - "stamp":"1326147351060832" - }, - { - "price":8.14114, - "amount":0.0203064, - "price_int":"814114", - "amount_int":"2030640", - "stamp":"1326814903370708" - }, - { - "price":8.14736, - "amount":0.0203288, - "price_int":"814736", - "amount_int":"2032880", - "stamp":"1326814921460604" - }, - { - "price":8.15, - "amount":12.1200072, - "price_int":"815000", - "amount_int":"1212000720", - "stamp":"1328222920308907" - }, - { - "price":8.1514, - "amount":0.5153, - "price_int":"815140", - "amount_int":"51530000", - "stamp":"1315235786315288" - }, - { - "price":8.15451, - "amount":0.0203012, - "price_int":"815451", - "amount_int":"2030120", - "stamp":"1326814899469770" - }, - { - "price":8.16, - "amount":0.0200052, - "price_int":"816000", - "amount_int":"2000520", - "stamp":"1326147345442418" - }, - { - "price":8.16101, - "amount":11, - "price_int":"816101", - "amount_int":"1100000000", - "stamp":"1328218307315620" - }, - { - "price":8.16788, - "amount":0.0203548, - "price_int":"816788", - "amount_int":"2035480", - "stamp":"1327400175694981" - }, - { - "price":8.17, - "amount":1.020004, - "price_int":"817000", - "amount_int":"102000400", - "stamp":"1326147343234941" - }, - { - "price":8.18, - "amount":0.0200024, - "price_int":"818000", - "amount_int":"2000240", - "stamp":"1326147340341364" - }, - { - "price":8.18125, - "amount":0.0203452, - "price_int":"818125", - "amount_int":"2034520", - "stamp":"1327400170475584" - }, - { - "price":8.19, - "amount":1.0200008, - "price_int":"819000", - "amount_int":"102000080", - "stamp":"1326147337847673" - }, - { - "price":8.19461, - "amount":0.0203344, - "price_int":"819461", - "amount_int":"2033440", - "stamp":"1327400166964953" - }, - { - "price":8.19999, - "amount":0.041251, - "price_int":"819999", - "amount_int":"4125100", - "stamp":"1315197950154876" - }, - { - "price":8.2, - "amount":195.53988287, - "price_int":"820000", - "amount_int":"19553988287", - "stamp":"1327490295718303" - }, - { - "price":8.20323, - "amount":2, - "price_int":"820323", - "amount_int":"200000000", - "stamp":"1325771447210433" - }, - { - "price":8.20798, - "amount":0.0203236, - "price_int":"820798", - "amount_int":"2032360", - "stamp":"1327400164331642" - }, - { - "price":8.21, - "amount":122.517, - "price_int":"821000", - "amount_int":"12251700000", - "stamp":"1326223062430530" - }, - { - "price":8.21443, - "amount":1.13, - "price_int":"821443", - "amount_int":"113000000", - "stamp":"1326840374311560" - }, - { - "price":8.21861, - "amount":0.4283, - "price_int":"821861", - "amount_int":"42830000", - "stamp":"1325845613132085" - }, - { - "price":8.22, - "amount":0.02, - "price_int":"822000", - "amount_int":"2000000", - "stamp":"1326223059153219" - }, - { - "price":8.22135, - "amount":0.0203128, - "price_int":"822135", - "amount_int":"2031280", - "stamp":"1327400160917069" - }, - { - "price":8.23, - "amount":1.02, - "price_int":"823000", - "amount_int":"102000000", - "stamp":"1326223056984208" - }, - { - "price":8.23472, - "amount":0.020302, - "price_int":"823472", - "amount_int":"2030200", - "stamp":"1327400157268158" - }, - { - "price":8.237, - "amount":25, - "price_int":"823700", - "amount_int":"2500000000", - "stamp":"1326728067065240" - }, - { - "price":8.24, - "amount":10.02, - "price_int":"824000", - "amount_int":"1002000000", - "stamp":"1326227345712001" - }, - { - "price":8.244, - "amount":10, - "price_int":"824400", - "amount_int":"1000000000", - "stamp":"1325733534564515" - }, - { - "price":8.24809, - "amount":0.4202928, - "price_int":"824809", - "amount_int":"42029280", - "stamp":"1327400154533670" - }, - { - "price":8.249, - "amount":2.5, - "price_int":"824900", - "amount_int":"250000000", - "stamp":"1315201511468302" - }, - { - "price":8.24999, - "amount":0.05604376, - "price_int":"824999", - "amount_int":"5604376", - "stamp":"1315143468968938" - }, - { - "price":8.25, - "amount":93.77412, - "price_int":"825000", - "amount_int":"9377412000", - "stamp":"1328222976404594" - }, - { - "price":8.26, - "amount":0.02, - "price_int":"826000", - "amount_int":"2000000", - "stamp":"1326227496036690" - }, - { - "price":8.26145, - "amount":0.0202836, - "price_int":"826145", - "amount_int":"2028360", - "stamp":"1327400151619506" - }, - { - "price":8.2697, - "amount":1, - "price_int":"826970", - "amount_int":"100000000", - "stamp":"1328133970020798" - }, - { - "price":8.27, - "amount":10.02, - "price_int":"827000", - "amount_int":"1002000000", - "stamp":"1326227492619376" - }, - { - "price":8.27482, - "amount":0.020274, - "price_int":"827482", - "amount_int":"2027400", - "stamp":"1327400148481676" - }, - { - "price":8.28, - "amount":135.45308457, - "price_int":"828000", - "amount_int":"13545308457", - "stamp":"1326227490234020" - }, - { - "price":8.28754, - "amount":0.5, - "price_int":"828754", - "amount_int":"50000000", - "stamp":"1325773664998715" - }, - { - "price":8.28819, - "amount":0.020266, - "price_int":"828819", - "amount_int":"2026600", - "stamp":"1327400143415673" - }, - { - "price":8.289, - "amount":50, - "price_int":"828900", - "amount_int":"5000000000", - "stamp":"1325837263053176" - }, - { - "price":8.29, - "amount":0.02, - "price_int":"829000", - "amount_int":"2000000", - "stamp":"1326227486740155" - }, - { - "price":8.2974, - "amount":2, - "price_int":"829740", - "amount_int":"200000000", - "stamp":"1315202776402241" - }, - { - "price":8.3, - "amount":122.01443319, - "price_int":"830000", - "amount_int":"12201443319", - "stamp":"1327832440313505" - }, - { - "price":8.30009, - "amount":6.0066032, - "price_int":"830009", - "amount_int":"600660320", - "stamp":"1328644630721608" - }, - { - "price":8.30156, - "amount":0.020258, - "price_int":"830156", - "amount_int":"2025800", - "stamp":"1327400139355274" - }, - { - "price":8.31, - "amount":200.02, - "price_int":"831000", - "amount_int":"20002000000", - "stamp":"1328081419855752" - }, - { - "price":8.3144, - "amount":0.5051, - "price_int":"831440", - "amount_int":"50510000", - "stamp":"1315185831573253" - }, - { - "price":8.31493, - "amount":0.0202488, - "price_int":"831493", - "amount_int":"2024880", - "stamp":"1327400135724052" - }, - { - "price":8.32, - "amount":0.02, - "price_int":"832000", - "amount_int":"2000000", - "stamp":"1326227477280911" - }, - { - "price":8.32103, - "amount":84.5897398, - "price_int":"832103", - "amount_int":"8458973980", - "stamp":"1328017744160431" - }, - { - "price":8.3283, - "amount":0.020238, - "price_int":"832830", - "amount_int":"2023800", - "stamp":"1327400132363345" - }, - { - "price":8.33, - "amount":0.02, - "price_int":"833000", - "amount_int":"2000000", - "stamp":"1326227474809731" - }, - { - "price":8.33171, - "amount":41.13733499, - "price_int":"833171", - "amount_int":"4113733499", - "stamp":"1327622741255296" - }, - { - "price":8.333, - "amount":12, - "price_int":"833300", - "amount_int":"1200000000", - "stamp":"1325977511392215" - }, - { - "price":8.3331, - "amount":0.05, - "price_int":"833310", - "amount_int":"5000000", - "stamp":"1326715245591977" - }, - { - "price":8.34, - "amount":9.310032, - "price_int":"834000", - "amount_int":"931003200", - "stamp":"1326227471093304" - }, - { - "price":8.34166, - "amount":0.0202256, - "price_int":"834166", - "amount_int":"2022560", - "stamp":"1327400129755689" - }, - { - "price":8.35, - "amount":21.42, - "price_int":"835000", - "amount_int":"2142000000", - "stamp":"1328222996528716" - }, - { - "price":8.35503, - "amount":0.020212, - "price_int":"835503", - "amount_int":"2021200", - "stamp":"1327400126029360" - }, - { - "price":8.36, - "amount":0.02, - "price_int":"836000", - "amount_int":"2000000", - "stamp":"1326229881816803" - }, - { - "price":8.3684, - "amount":0.0201996, - "price_int":"836840", - "amount_int":"2019960", - "stamp":"1327400122511825" - }, - { - "price":8.37, - "amount":0.02, - "price_int":"837000", - "amount_int":"2000000", - "stamp":"1326229879018389" - }, - { - "price":8.38, - "amount":2.52, - "price_int":"838000", - "amount_int":"252000000", - "stamp":"1326229876350708" - }, - { - "price":8.38177, - "amount":0.4201888, - "price_int":"838177", - "amount_int":"42018880", - "stamp":"1327400119677289" - }, - { - "price":8.3863, - "amount":0.01387, - "price_int":"838630", - "amount_int":"1387000", - "stamp":"1325863047501969" - }, - { - "price":8.39, - "amount":0.02, - "price_int":"839000", - "amount_int":"2000000", - "stamp":"1326229873741828" - }, - { - "price":8.39324, - "amount":4.25, - "price_int":"839324", - "amount_int":"425000000", - "stamp":"1315205826628846" - }, - { - "price":8.39514, - "amount":0.0201788, - "price_int":"839514", - "amount_int":"2017880", - "stamp":"1327400116382637" - }, - { - "price":8.398, - "amount":0.5, - "price_int":"839800", - "amount_int":"50000000", - "stamp":"1315183952163847" - }, - { - "price":8.4, - "amount":15.20794992, - "price_int":"840000", - "amount_int":"1520794992", - "stamp":"1327832462619041" - }, - { - "price":8.4085, - "amount":0.02017, - "price_int":"840850", - "amount_int":"2017000", - "stamp":"1327400111032181" - }, - { - "price":8.41, - "amount":0.02, - "price_int":"841000", - "amount_int":"2000000", - "stamp":"1326229867347663" - }, - { - "price":8.42, - "amount":22.07, - "price_int":"842000", - "amount_int":"2207000000", - "stamp":"1326868980658505" - }, - { - "price":8.42122, - "amount":0.5, - "price_int":"842122", - "amount_int":"50000000", - "stamp":"1325773667701288" - }, - { - "price":8.42187, - "amount":0.0201612, - "price_int":"842187", - "amount_int":"2016120", - "stamp":"1327400107603497" - }, - { - "price":8.43, - "amount":0.02, - "price_int":"843000", - "amount_int":"2000000", - "stamp":"1326368720193475" - }, - { - "price":8.43524, - "amount":0.0201544, - "price_int":"843524", - "amount_int":"2015440", - "stamp":"1327400099850761" - }, - { - "price":8.43777, - "amount":0.15, - "price_int":"843777", - "amount_int":"15000000", - "stamp":"1315316874838566" - }, - { - "price":8.443, - "amount":4.5189, - "price_int":"844300", - "amount_int":"451890000", - "stamp":"1316538586911501" - }, - { - "price":8.445, - "amount":10, - "price_int":"844500", - "amount_int":"1000000000", - "stamp":"1325733650084741" - }, - { - "price":8.44861, - "amount":0.0201476, - "price_int":"844861", - "amount_int":"2014760", - "stamp":"1327400096525149" - }, - { - "price":8.44904, - "amount":0.5, - "price_int":"844904", - "amount_int":"50000000", - "stamp":"1325866909372392" - }, - { - "price":8.45, - "amount":250.3, - "price_int":"845000", - "amount_int":"25030000000", - "stamp":"1328223021473781" - }, - { - "price":8.45123, - "amount":4, - "price_int":"845123", - "amount_int":"400000000", - "stamp":"1315201566372586" - }, - { - "price":8.458, - "amount":600, - "price_int":"845800", - "amount_int":"60000000000", - "stamp":"1328188965291763" - }, - { - "price":8.46198, - "amount":0.0201408, - "price_int":"846198", - "amount_int":"2014080", - "stamp":"1327400093970079" - }, - { - "price":8.46666, - "amount":1.5, - "price_int":"846666", - "amount_int":"150000000", - "stamp":"1315240137833183" - }, - { - "price":8.47, - "amount":20, - "price_int":"847000", - "amount_int":"2000000000", - "stamp":"1326699218323646" - }, - { - "price":8.47534, - "amount":0.0201332, - "price_int":"847534", - "amount_int":"2013320", - "stamp":"1327400090352464" - }, - { - "price":8.47914, - "amount":6.34480753, - "price_int":"847914", - "amount_int":"634480753", - "stamp":"1328644631023267" - }, - { - "price":8.48, - "amount":2, - "price_int":"848000", - "amount_int":"200000000", - "stamp":"1315159087857230" - }, - { - "price":8.4807, - "amount":0.4952, - "price_int":"848070", - "amount_int":"49520000", - "stamp":"1315157544264577" - }, - { - "price":8.481, - "amount":0.17219882, - "price_int":"848100", - "amount_int":"17219882", - "stamp":"1326745661188350" - }, - { - "price":8.48643, - "amount":1.2, - "price_int":"848643", - "amount_int":"120000000", - "stamp":"1315205680083606" - }, - { - "price":8.48871, - "amount":3.0201272, - "price_int":"848871", - "amount_int":"302012720", - "stamp":"1327400086700574" - }, - { - "price":8.489, - "amount":50, - "price_int":"848900", - "amount_int":"5000000000", - "stamp":"1325837266228017" - }, - { - "price":8.49, - "amount":41, - "price_int":"849000", - "amount_int":"4100000000", - "stamp":"1326587455710892" - }, - { - "price":8.5, - "amount":611.58775, - "price_int":"850000", - "amount_int":"61158775000", - "stamp":"1328629720955530" - }, - { - "price":8.50208, - "amount":0.020122, - "price_int":"850208", - "amount_int":"2012200", - "stamp":"1327400083388486" - }, - { - "price":8.51, - "amount":20, - "price_int":"851000", - "amount_int":"2000000000", - "stamp":"1326026439316285" - }, - { - "price":8.51545, - "amount":0.4201172, - "price_int":"851545", - "amount_int":"42011720", - "stamp":"1327400079272362" - }, - { - "price":8.52882, - "amount":0.0201132, - "price_int":"852882", - "amount_int":"2011320", - "stamp":"1327400076432154" - }, - { - "price":8.537, - "amount":25, - "price_int":"853700", - "amount_int":"2500000000", - "stamp":"1326728071273486" - }, - { - "price":8.54218, - "amount":0.0201092, - "price_int":"854218", - "amount_int":"2010920", - "stamp":"1327400073360967" - }, - { - "price":8.55, - "amount":10.1, - "price_int":"855000", - "amount_int":"1010000000", - "stamp":"1328223038189081" - }, - { - "price":8.5549, - "amount":0.5, - "price_int":"855490", - "amount_int":"50000000", - "stamp":"1325773670431583" - }, - { - "price":8.55555, - "amount":7.79236978, - "price_int":"855555", - "amount_int":"779236978", - "stamp":"1327400069582134" - }, - { - "price":8.56, - "amount":3, - "price_int":"856000", - "amount_int":"300000000", - "stamp":"1315203155127125" - }, - { - "price":8.56892, - "amount":0.0200996, - "price_int":"856892", - "amount_int":"2009960", - "stamp":"1327400066389641" - }, - { - "price":8.59, - "amount":3, - "price_int":"859000", - "amount_int":"300000000", - "stamp":"1315134199514544" - }, - { - "price":8.59566, - "amount":0.0200828, - "price_int":"859566", - "amount_int":"2008280", - "stamp":"1327400060929053" - }, - { - "price":8.599, - "amount":3, - "price_int":"859900", - "amount_int":"300000000", - "stamp":"1318363803313318" - }, - { - "price":8.6, - "amount":259.29511125, - "price_int":"860000", - "amount_int":"25929511125", - "stamp":"1327832498974749" - }, - { - "price":8.60902, - "amount":0.0200744, - "price_int":"860902", - "amount_int":"2007440", - "stamp":"1327400057534763" - }, - { - "price":8.61, - "amount":40.6504, - "price_int":"861000", - "amount_int":"4065040000", - "stamp":"1325578502350283" - }, - { - "price":8.62239, - "amount":5.020066, - "price_int":"862239", - "amount_int":"502006600", - "stamp":"1327400054675759" - }, - { - "price":8.63, - "amount":20, - "price_int":"863000", - "amount_int":"2000000000", - "stamp":"1326300172734330" - }, - { - "price":8.63105, - "amount":28.9652, - "price_int":"863105", - "amount_int":"2896520000", - "stamp":"1328582942426285" - }, - { - "price":8.63576, - "amount":0.0200588, - "price_int":"863576", - "amount_int":"2005880", - "stamp":"1327400052088428" - }, - { - "price":8.64, - "amount":0.00535399, - "price_int":"864000", - "amount_int":"535399", - "stamp":"1326899873156691" - }, - { - "price":8.64107, - "amount":13, - "price_int":"864107", - "amount_int":"1300000000", - "stamp":"1326427684001747" - }, - { - "price":8.64113, - "amount":11.844, - "price_int":"864113", - "amount_int":"1184400000", - "stamp":"1325810060035204" - }, - { - "price":8.646, - "amount":10, - "price_int":"864600", - "amount_int":"1000000000", - "stamp":"1325733712858487" - }, - { - "price":8.64913, - "amount":0.4200532, - "price_int":"864913", - "amount_int":"42005320", - "stamp":"1327400047401079" - }, - { - "price":8.65, - "amount":4510.1, - "price_int":"865000", - "amount_int":"451010000000", - "stamp":"1328223060043116" - }, - { - "price":8.6503, - "amount":0.4855, - "price_int":"865030", - "amount_int":"48550000", - "stamp":"1315130791222710" - }, - { - "price":8.6543, - "amount":25, - "price_int":"865430", - "amount_int":"2500000000", - "stamp":"1326723998626223" - }, - { - "price":8.65994, - "amount":0.0200912, - "price_int":"865994", - "amount_int":"2009120", - "stamp":"1327400063657782" - }, - { - "price":8.66, - "amount":20, - "price_int":"866000", - "amount_int":"2000000000", - "stamp":"1325580716603952" - }, - { - "price":8.66129, - "amount":6.6745151, - "price_int":"866129", - "amount_int":"667451510", - "stamp":"1328644631341929" - }, - { - "price":8.6625, - "amount":0.0200476, - "price_int":"866250", - "amount_int":"2004760", - "stamp":"1327400043558682" - }, - { - "price":8.67586, - "amount":0.0200416, - "price_int":"867586", - "amount_int":"2004160", - "stamp":"1327400040360975" - }, - { - "price":8.68858, - "amount":0.5, - "price_int":"868858", - "amount_int":"50000000", - "stamp":"1325773673012742" - }, - { - "price":8.689, - "amount":50, - "price_int":"868900", - "amount_int":"5000000000", - "stamp":"1325837269998480" - }, - { - "price":8.68923, - "amount":10, - "price_int":"868923", - "amount_int":"1000000000", - "stamp":"1326805357035130" - }, - { - "price":8.69, - "amount":13.81487423, - "price_int":"869000", - "amount_int":"1381487423", - "stamp":"1315487839627740" - }, - { - "price":8.7, - "amount":71.88188388, - "price_int":"870000", - "amount_int":"7188188388", - "stamp":"1327832511325437" - }, - { - "price":8.70167, - "amount":170, - "price_int":"870167", - "amount_int":"17000000000", - "stamp":"1326387282875223" - }, - { - "price":8.70976, - "amount":1, - "price_int":"870976", - "amount_int":"100000000", - "stamp":"1328134014002101" - }, - { - "price":8.71, - "amount":7, - "price_int":"871000", - "amount_int":"700000000", - "stamp":"1327045409107483" - }, - { - "price":8.74, - "amount":26, - "price_int":"874000", - "amount_int":"2600000000", - "stamp":"1328236620036894" - }, - { - "price":8.74976, - "amount":10, - "price_int":"874976", - "amount_int":"1000000000", - "stamp":"1326686665848318" - }, - { - "price":8.75, - "amount":312.1, - "price_int":"875000", - "amount_int":"31210000000", - "stamp":"1328223081528134" - }, - { - "price":8.76785, - "amount":0.020036, - "price_int":"876785", - "amount_int":"2003600", - "stamp":"1327400037577555" - }, - { - "price":8.77, - "amount":10, - "price_int":"877000", - "amount_int":"1000000000", - "stamp":"1325809966395269" - }, - { - "price":8.78, - "amount":125, - "price_int":"878000", - "amount_int":"12500000000", - "stamp":"1328081430230578" - }, - { - "price":8.78281, - "amount":0.4, - "price_int":"878281", - "amount_int":"40000000", - "stamp":"1325886377651652" - }, - { - "price":8.79597, - "amount":5, - "price_int":"879597", - "amount_int":"500000000", - "stamp":"1319489439736660" - }, - { - "price":8.799, - "amount":36, - "price_int":"879900", - "amount_int":"3600000000", - "stamp":"1315045587033675" - }, - { - "price":8.8, - "amount":53.21185181, - "price_int":"880000", - "amount_int":"5321185181", - "stamp":"1328222609024603" - }, - { - "price":8.81194, - "amount":0.00019, - "price_int":"881194", - "amount_int":"19000", - "stamp":"1314748826520815" - }, - { - "price":8.82226, - "amount":0.5, - "price_int":"882226", - "amount_int":"50000000", - "stamp":"1325773676198697" - }, - { - "price":8.82291, - "amount":38, - "price_int":"882291", - "amount_int":"3800000000", - "stamp":"1327556086851947" - }, - { - "price":8.8234, - "amount":0.476, - "price_int":"882340", - "amount_int":"47600000", - "stamp":"1314814848896017" - }, - { - "price":8.84639, - "amount":6.99564888, - "price_int":"884639", - "amount_int":"699564888", - "stamp":"1328644631635513" - }, - { - "price":8.847, - "amount":10, - "price_int":"884700", - "amount_int":"1000000000", - "stamp":"1325733754788551" - }, - { - "price":8.85, - "amount":211.1, - "price_int":"885000", - "amount_int":"21110000000", - "stamp":"1328223178280835" - }, - { - "price":8.87867, - "amount":20, - "price_int":"887867", - "amount_int":"2000000000", - "stamp":"1325755389857595" - }, - { - "price":8.88, - "amount":1.13, - "price_int":"888000", - "amount_int":"113000000", - "stamp":"1315222772729951" - }, - { - "price":8.88441, - "amount":25, - "price_int":"888441", - "amount_int":"2500000000", - "stamp":"1326004032377547" - }, - { - "price":8.889, - "amount":140, - "price_int":"888900", - "amount_int":"14000000000", - "stamp":"1328477598434942" - }, - { - "price":8.89, - "amount":10, - "price_int":"889000", - "amount_int":"1000000000", - "stamp":"1315166393215801" - }, - { - "price":8.89777, - "amount":0.15, - "price_int":"889777", - "amount_int":"15000000", - "stamp":"1315316874790589" - }, - { - "price":8.89969, - "amount":1.55, - "price_int":"889969", - "amount_int":"155000000", - "stamp":"1328280743880094" - }, - { - "price":8.8999, - "amount":25.35, - "price_int":"889990", - "amount_int":"2535000000", - "stamp":"1315094015088867" - }, - { - "price":8.9, - "amount":35.80172041, - "price_int":"890000", - "amount_int":"3580172041", - "stamp":"1328222627220373" - }, - { - "price":8.9078, - "amount":0.00040128, - "price_int":"890780", - "amount_int":"40128", - "stamp":"1315575359368559" - }, - { - "price":8.90825, - "amount":0.14, - "price_int":"890825", - "amount_int":"14000000", - "stamp":"1315043122588242" - }, - { - "price":8.937, - "amount":25, - "price_int":"893700", - "amount_int":"2500000000", - "stamp":"1326728075312771" - }, - { - "price":8.95, - "amount":22.9157608, - "price_int":"895000", - "amount_int":"2291576080", - "stamp":"1328223195679842" - }, - { - "price":8.95778, - "amount":4.86303041, - "price_int":"895778", - "amount_int":"486303041", - "stamp":"1328132259875018" - }, - { - "price":8.96, - "amount":35.15, - "price_int":"896000", - "amount_int":"3515000000", - "stamp":"1325637463361326" - }, - { - "price":8.96111, - "amount":12.1, - "price_int":"896111", - "amount_int":"1210000000", - "stamp":"1327315726988988" - }, - { - "price":8.97, - "amount":13, - "price_int":"897000", - "amount_int":"1300000000", - "stamp":"1327556762810569" - }, - { - "price":8.9799, - "amount":15, - "price_int":"897990", - "amount_int":"1500000000", - "stamp":"1325847913924635" - }, - { - "price":8.98, - "amount":74.68451635, - "price_int":"898000", - "amount_int":"7468451635", - "stamp":"1326701692015180" - }, - { - "price":8.99, - "amount":206.5999979, - "price_int":"899000", - "amount_int":"20659999790", - "stamp":"1327292736583755" - }, - { - "price":8.999, - "amount":10, - "price_int":"899900", - "amount_int":"1000000000", - "stamp":"1316500182838629" - }, - { - "price":8.9999, - "amount":0.4667, - "price_int":"899990", - "amount_int":"46670000", - "stamp":"1314777754023329" - }, - { - "price":9, - "amount":933.90683533, - "price_int":"900000", - "amount_int":"93390683533", - "stamp":"1327096444539085" - }, - { - "price":9.001, - "amount":72.37224705, - "price_int":"900100", - "amount_int":"7237224705", - "stamp":"1314648387529673" - }, - { - "price":9.01, - "amount":16.30483951, - "price_int":"901000", - "amount_int":"1630483951", - "stamp":"1327771083683447" - }, - { - "price":9.02, - "amount":7.2779344, - "price_int":"902000", - "amount_int":"727793440", - "stamp":"1326838194536154" - }, - { - "price":9.03429, - "amount":7.30819923, - "price_int":"903429", - "amount_int":"730819923", - "stamp":"1328644631941146" - }, - { - "price":9.03697, - "amount":0.5, - "price_int":"903697", - "amount_int":"50000000", - "stamp":"1325773680071967" - }, - { - "price":9.04, - "amount":38.7168, - "price_int":"904000", - "amount_int":"3871680000", - "stamp":"1325578515265616" - }, - { - "price":9.05, - "amount":6, - "price_int":"905000", - "amount_int":"600000000", - "stamp":"1314712299322641" - }, - { - "price":9.074, - "amount":0.24171595, - "price_int":"907400", - "amount_int":"24171595", - "stamp":"1315183995967173" - }, - { - "price":9.08, - "amount":8.0906, - "price_int":"908000", - "amount_int":"809060000", - "stamp":"1327498790462312" - }, - { - "price":9.089, - "amount":50, - "price_int":"908900", - "amount_int":"5000000000", - "stamp":"1326005693982823" - }, - { - "price":9.08962, - "amount":0.5, - "price_int":"908962", - "amount_int":"50000000", - "stamp":"1325773683004706" - }, - { - "price":9.09, - "amount":5.5, - "price_int":"909000", - "amount_int":"550000000", - "stamp":"1326065324046842" - }, - { - "price":9.0911, - "amount":50, - "price_int":"909110", - "amount_int":"5000000000", - "stamp":"1325807472876618" - }, - { - "price":9.1, - "amount":11.931, - "price_int":"910000", - "amount_int":"1193100000", - "stamp":"1324384940993659" - }, - { - "price":9.13451, - "amount":5, - "price_int":"913451", - "amount_int":"500000000", - "stamp":"1326045491928990" - }, - { - "price":9.138, - "amount":1.28, - "price_int":"913800", - "amount_int":"128000000", - "stamp":"1314748543106272" - }, - { - "price":9.148, - "amount":1, - "price_int":"914800", - "amount_int":"100000000", - "stamp":"1325807254882214" - }, - { - "price":9.15, - "amount":6, - "price_int":"915000", - "amount_int":"600000000", - "stamp":"1314649603325682" - }, - { - "price":9.16, - "amount":7.231, - "price_int":"916000", - "amount_int":"723100000", - "stamp":"1314757174640627" - }, - { - "price":9.1798, - "amount":0.4575, - "price_int":"917980", - "amount_int":"45750000", - "stamp":"1314696223062923" - }, - { - "price":9.18, - "amount":0.2, - "price_int":"918000", - "amount_int":"20000000", - "stamp":"1314731947016975" - }, - { - "price":9.198, - "amount":0.497, - "price_int":"919800", - "amount_int":"49700000", - "stamp":"1314595867103821" - }, - { - "price":9.2, - "amount":43.87018864, - "price_int":"920000", - "amount_int":"4387018864", - "stamp":"1326918926412109" - }, - { - "price":9.215, - "amount":40, - "price_int":"921500", - "amount_int":"4000000000", - "stamp":"1328547402492179" - }, - { - "price":9.2233, - "amount":0.5, - "price_int":"922330", - "amount_int":"50000000", - "stamp":"1325773686587178" - }, - { - "price":9.22488, - "amount":7.61221063, - "price_int":"922488", - "amount_int":"761221063", - "stamp":"1328644632243772" - }, - { - "price":9.23, - "amount":0.14718406, - "price_int":"923000", - "amount_int":"14718406", - "stamp":"1314889034061251" - }, - { - "price":9.237, - "amount":25, - "price_int":"923700", - "amount_int":"2500000000", - "stamp":"1326728097219044" - }, - { - "price":9.2399, - "amount":0.2, - "price_int":"923990", - "amount_int":"20000000", - "stamp":"1315183996000137" - }, - { - "price":9.24, - "amount":5, - "price_int":"924000", - "amount_int":"500000000", - "stamp":"1326227771494336" - }, - { - "price":9.24398, - "amount":2, - "price_int":"924398", - "amount_int":"200000000", - "stamp":"1325771481240809" - }, - { - "price":9.25, - "amount":7.25, - "price_int":"925000", - "amount_int":"725000000", - "stamp":"1314665716578648" - }, - { - "price":9.252, - "amount":120, - "price_int":"925200", - "amount_int":"12000000000", - "stamp":"1314722886922031" - }, - { - "price":9.26514, - "amount":1.4, - "price_int":"926514", - "amount_int":"140000000", - "stamp":"1325970639462475" - }, - { - "price":9.27, - "amount":10, - "price_int":"927000", - "amount_int":"1000000000", - "stamp":"1325810339550354" - }, - { - "price":9.279, - "amount":10.44011863, - "price_int":"927900", - "amount_int":"1044011863", - "stamp":"1328093971849432" - }, - { - "price":9.28115, - "amount":3, - "price_int":"928115", - "amount_int":"300000000", - "stamp":"1325969095458481" - }, - { - "price":9.2849, - "amount":0.2, - "price_int":"928490", - "amount_int":"20000000", - "stamp":"1315183996328779" - }, - { - "price":9.289, - "amount":50, - "price_int":"928900", - "amount_int":"5000000000", - "stamp":"1326624252888660" - }, - { - "price":9.29, - "amount":2.5, - "price_int":"929000", - "amount_int":"250000000", - "stamp":"1314642363856270" - }, - { - "price":9.29677, - "amount":5, - "price_int":"929677", - "amount_int":"500000000", - "stamp":"1327622753618585" - }, - { - "price":9.3, - "amount":18, - "price_int":"930000", - "amount_int":"1800000000", - "stamp":"1326086644240334" - }, - { - "price":9.31992, - "amount":1, - "price_int":"931992", - "amount_int":"100000000", - "stamp":"1314961015768918" - }, - { - "price":9.32143, - "amount":0.24, - "price_int":"932143", - "amount_int":"24000000", - "stamp":"1314594248683012" - }, - { - "price":9.35, - "amount":100, - "price_int":"935000", - "amount_int":"10000000000", - "stamp":"1328081873075657" - }, - { - "price":9.3563, - "amount":0.5, - "price_int":"935630", - "amount_int":"50000000", - "stamp":"1325773693558845" - }, - { - "price":9.35764, - "amount":210.25, - "price_int":"935764", - "amount_int":"21025000000", - "stamp":"1328195893304695" - }, - { - "price":9.3635, - "amount":0.4486, - "price_int":"936350", - "amount_int":"44860000", - "stamp":"1314687766571458" - }, - { - "price":9.368, - "amount":1000, - "price_int":"936800", - "amount_int":"100000000000", - "stamp":"1328211535496475" - }, - { - "price":9.397, - "amount":10, - "price_int":"939700", - "amount_int":"1000000000", - "stamp":"1314663335806180" - }, - { - "price":9.4, - "amount":19.5, - "price_int":"940000", - "amount_int":"1950000000", - "stamp":"1324599992606108" - }, - { - "price":9.41805, - "amount":7.9077707, - "price_int":"941805", - "amount_int":"790777070", - "stamp":"1328644632554295" - }, - { - "price":9.43, - "amount":798.47335725, - "price_int":"943000", - "amount_int":"79847335725", - "stamp":"1327499873544213" - }, - { - "price":9.45099, - "amount":11.5897418, - "price_int":"945099", - "amount_int":"1158974180", - "stamp":"1314814998544831" - }, - { - "price":9.45644, - "amount":1, - "price_int":"945644", - "amount_int":"100000000", - "stamp":"1314817953860871" - }, - { - "price":9.46, - "amount":20, - "price_int":"946000", - "amount_int":"2000000000", - "stamp":"1314587502746987" - }, - { - "price":9.468, - "amount":1000, - "price_int":"946800", - "amount_int":"100000000000", - "stamp":"1328188894237609" - }, - { - "price":9.47, - "amount":10, - "price_int":"947000", - "amount_int":"1000000000", - "stamp":"1325793721533885" - }, - { - "price":9.48, - "amount":151.97366754, - "price_int":"948000", - "amount_int":"15197366754", - "stamp":"1326258185934054" - }, - { - "price":9.489, - "amount":50, - "price_int":"948900", - "amount_int":"5000000000", - "stamp":"1326826077661129" - }, - { - "price":9.49, - "amount":41.8509, - "price_int":"949000", - "amount_int":"4185090000", - "stamp":"1325823298453626" - }, - { - "price":9.49999, - "amount":5, - "price_int":"949999", - "amount_int":"500000000", - "stamp":"1319611064774225" - }, - { - "price":9.5, - "amount":309.70071311, - "price_int":"950000", - "amount_int":"30970071311", - "stamp":"1328054100823641" - }, - { - "price":9.50517, - "amount":2.6, - "price_int":"950517", - "amount_int":"260000000", - "stamp":"1326739562552582" - }, - { - "price":9.537, - "amount":25, - "price_int":"953700", - "amount_int":"2500000000", - "stamp":"1326728100844146" - }, - { - "price":9.5508, - "amount":0.4398, - "price_int":"955080", - "amount_int":"43980000", - "stamp":"1314365177985244" - }, - { - "price":9.6, - "amount":87.9, - "price_int":"960000", - "amount_int":"8790000000", - "stamp":"1324724926405869" - }, - { - "price":9.60119, - "amount":112, - "price_int":"960119", - "amount_int":"11200000000", - "stamp":"1328539717608897" - }, - { - "price":9.61367, - "amount":8.19500115, - "price_int":"961367", - "amount_int":"819500115", - "stamp":"1328644632852562" - }, - { - "price":9.62, - "amount":3, - "price_int":"962000", - "amount_int":"300000000", - "stamp":"1314588086958695" - }, - { - "price":9.63999, - "amount":2, - "price_int":"963999", - "amount_int":"200000000", - "stamp":"1326467753621561" - }, - { - "price":9.65, - "amount":7.1, - "price_int":"965000", - "amount_int":"710000000", - "stamp":"1315582278780682" - }, - { - "price":9.65062, - "amount":1, - "price_int":"965062", - "amount_int":"100000000", - "stamp":"1326128478930683" - }, - { - "price":9.66304, - "amount":0.447525, - "price_int":"966304", - "amount_int":"44752500", - "stamp":"1314363283233800" - }, - { - "price":9.668, - "amount":1000, - "price_int":"966800", - "amount_int":"100000000000", - "stamp":"1328188912383939" - }, - { - "price":9.689, - "amount":50, - "price_int":"968900", - "amount_int":"5000000000", - "stamp":"1326839861450466" - }, - { - "price":9.6999, - "amount":10.456, - "price_int":"969990", - "amount_int":"1045600000", - "stamp":"1326344043405976" - }, - { - "price":9.7, - "amount":26.45251876, - "price_int":"970000", - "amount_int":"2645251876", - "stamp":"1324779423430409" - }, - { - "price":9.73759, - "amount":10, - "price_int":"973759", - "amount_int":"1000000000", - "stamp":"1325810070295503" - }, - { - "price":9.74, - "amount":10, - "price_int":"974000", - "amount_int":"1000000000", - "stamp":"1326009579742818" - }, - { - "price":9.74099, - "amount":15, - "price_int":"974099", - "amount_int":"1500000000", - "stamp":"1328176308293023" - }, - { - "price":9.7418, - "amount":0.4311, - "price_int":"974180", - "amount_int":"43110000", - "stamp":"1314364689892008" - }, - { - "price":9.76, - "amount":50, - "price_int":"976000", - "amount_int":"5000000000", - "stamp":"1315526665853595" - }, - { - "price":9.77, - "amount":310, - "price_int":"977000", - "amount_int":"31000000000", - "stamp":"1325823480717545" - }, - { - "price":9.777, - "amount":6, - "price_int":"977700", - "amount_int":"600000000", - "stamp":"1314663381860031" - }, - { - "price":9.78989, - "amount":50, - "price_int":"978989", - "amount_int":"5000000000", - "stamp":"1325853538905035" - }, - { - "price":9.79, - "amount":20, - "price_int":"979000", - "amount_int":"2000000000", - "stamp":"1327387096286429" - }, - { - "price":9.8, - "amount":51.344, - "price_int":"980000", - "amount_int":"5134400000", - "stamp":"1328180326309603" - }, - { - "price":9.81167, - "amount":8.47405032, - "price_int":"981167", - "amount_int":"847405032", - "stamp":"1328644633156638" - }, - { - "price":9.81626, - "amount":200, - "price_int":"981626", - "amount_int":"20000000000", - "stamp":"1314425391725547" - }, - { - "price":9.82552, - "amount":3, - "price_int":"982552", - "amount_int":"300000000", - "stamp":"1321300393298803" - }, - { - "price":9.844, - "amount":165.00510333, - "price_int":"984400", - "amount_int":"16500510333", - "stamp":"1325854366965935" - }, - { - "price":9.85, - "amount":3.94, - "price_int":"985000", - "amount_int":"394000000", - "stamp":"1314362697117031" - }, - { - "price":9.87112, - "amount":0.29603007, - "price_int":"987112", - "amount_int":"29603007", - "stamp":"1315854927703172" - }, - { - "price":9.878, - "amount":0.24, - "price_int":"987800", - "amount_int":"24000000", - "stamp":"1314594325007222" - }, - { - "price":9.88, - "amount":8.5, - "price_int":"988000", - "amount_int":"850000000", - "stamp":"1325882580824449" - }, - { - "price":9.889, - "amount":9.5985059, - "price_int":"988900", - "amount_int":"959850590", - "stamp":"1326843188831630" - }, - { - "price":9.89, - "amount":6, - "price_int":"989000", - "amount_int":"600000000", - "stamp":"1315759514739381" - }, - { - "price":9.899, - "amount":10, - "price_int":"989900", - "amount_int":"1000000000", - "stamp":"1315783713594019" - }, - { - "price":9.9, - "amount":251.02264401, - "price_int":"990000", - "amount_int":"25102264401", - "stamp":"1328163829849229" - }, - { - "price":9.90909, - "amount":300.55555686, - "price_int":"990909", - "amount_int":"30055555686", - "stamp":"1326610275844123" - }, - { - "price":9.91, - "amount":3.22, - "price_int":"991000", - "amount_int":"322000000", - "stamp":"1327435971088088" - }, - { - "price":9.91183, - "amount":1.629, - "price_int":"991183", - "amount_int":"162900000", - "stamp":"1317660702939961" - }, - { - "price":9.92122, - "amount":2, - "price_int":"992122", - "amount_int":"200000000", - "stamp":"1315308131279006" - }, - { - "price":9.93, - "amount":15.29, - "price_int":"993000", - "amount_int":"1529000000", - "stamp":"1326699227114134" - }, - { - "price":9.9367, - "amount":0.4227, - "price_int":"993670", - "amount_int":"42270000", - "stamp":"1314352614160799" - }, - { - "price":9.937, - "amount":25, - "price_int":"993700", - "amount_int":"2500000000", - "stamp":"1326728079152084" - }, - { - "price":9.94, - "amount":332.5154242, - "price_int":"994000", - "amount_int":"33251542420", - "stamp":"1325982936549685" - }, - { - "price":9.945, - "amount":50, - "price_int":"994500", - "amount_int":"5000000000", - "stamp":"1315786034225709" - }, - { - "price":9.95, - "amount":116, - "price_int":"995000", - "amount_int":"11600000000", - "stamp":"1325826088831096" - }, - { - "price":9.9515, - "amount":0.20166818, - "price_int":"995150", - "amount_int":"20166818", - "stamp":"1314967033150975" - }, - { - "price":9.955, - "amount":16.53, - "price_int":"995500", - "amount_int":"1653000000", - "stamp":"1325850332163790" - }, - { - "price":9.95644, - "amount":1, - "price_int":"995644", - "amount_int":"100000000", - "stamp":"1314817970431704" - }, - { - "price":9.96, - "amount":40.1406, - "price_int":"996000", - "amount_int":"4014060000", - "stamp":"1325637396998051" - }, - { - "price":9.97, - "amount":16.4, - "price_int":"997000", - "amount_int":"1640000000", - "stamp":"1316981991616517" - }, - { - "price":9.971, - "amount":36.312192, - "price_int":"997100", - "amount_int":"3631219200", - "stamp":"1325829746766872" - }, - { - "price":9.972, - "amount":5, - "price_int":"997200", - "amount_int":"500000000", - "stamp":"1316361061094283" - }, - { - "price":9.9799, - "amount":25, - "price_int":"997990", - "amount_int":"2500000000", - "stamp":"1325847893692952" - }, - { - "price":9.98, - "amount":43.38536523, - "price_int":"998000", - "amount_int":"4338536523", - "stamp":"1326300190934759" - }, - { - "price":9.9877, - "amount":100, - "price_int":"998770", - "amount_int":"10000000000", - "stamp":"1315857941611331" - }, - { - "price":9.9899, - "amount":8.36948, - "price_int":"998990", - "amount_int":"836948000", - "stamp":"1325172469047026" - }, - { - "price":9.99, - "amount":348.87940224, - "price_int":"999000", - "amount_int":"34887940224", - "stamp":"1327941120430815" - }, - { - "price":9.99649, - "amount":98.32555421, - "price_int":"999649", - "amount_int":"9832555421", - "stamp":"1326129013706832" - }, - { - "price":9.9991, - "amount":106.76298796, - "price_int":"999910", - "amount_int":"10676298796", - "stamp":"1315856567245009" - }, - { - "price":9.9999, - "amount":21, - "price_int":"999990", - "amount_int":"2100000000", - "stamp":"1315551259235445" - }, - { - "price":9.99999, - "amount":10.3, - "price_int":"999999", - "amount_int":"1030000000", - "stamp":"1326157871355526" - }, - { - "price":10, - "amount":2769.93339512, - "price_int":"1000000", - "amount_int":"276993339512", - "stamp":"1328599106050311" - }, - { - "price":10.01196, - "amount":8.74508707, - "price_int":"1001196", - "amount_int":"874508707", - "stamp":"1328644633571201" - }, - { - "price":10.06, - "amount":13.34, - "price_int":"1006000", - "amount_int":"1334000000", - "stamp":"1315920742442181" - }, - { - "price":10.0911, - "amount":50, - "price_int":"1009110", - "amount_int":"5000000000", - "stamp":"1325807480555770" - }, - { - "price":10.1, - "amount":498.51394651, - "price_int":"1010000", - "amount_int":"49851394651", - "stamp":"1326847586820165" - }, - { - "price":10.10101, - "amount":11.599862, - "price_int":"1010101", - "amount_int":"1159986200", - "stamp":"1328614200789031" - }, - { - "price":10.10458, - "amount":9.95624012, - "price_int":"1010458", - "amount_int":"995624012", - "stamp":"1326321866918969" - }, - { - "price":10.1354, - "amount":0.4144, - "price_int":"1013540", - "amount_int":"41440000", - "stamp":"1314307235825106" - }, - { - "price":10.14, - "amount":0.48197582, - "price_int":"1014000", - "amount_int":"48197582", - "stamp":"1325830321438308" - }, - { - "price":10.197, - "amount":174.224, - "price_int":"1019700", - "amount_int":"17422400000", - "stamp":"1315289772966601" - }, - { - "price":10.1998, - "amount":147.85714379, - "price_int":"1019980", - "amount_int":"14785714379", - "stamp":"1314315993639791" - }, - { - "price":10.2, - "amount":195.82068048, - "price_int":"1020000", - "amount_int":"19582068048", - "stamp":"1328081907787347" - }, - { - "price":10.21445, - "amount":9.00829567, - "price_int":"1021445", - "amount_int":"900829567", - "stamp":"1328644633986044" - }, - { - "price":10.22, - "amount":5, - "price_int":"1022000", - "amount_int":"500000000", - "stamp":"1327022935295846" - }, - { - "price":10.2357, - "amount":28.7, - "price_int":"1023570", - "amount_int":"2870000000", - "stamp":"1325779391676596" - }, - { - "price":10.24126, - "amount":11, - "price_int":"1024126", - "amount_int":"1100000000", - "stamp":"1325839530576708" - }, - { - "price":10.2489, - "amount":1.5, - "price_int":"1024890", - "amount_int":"150000000", - "stamp":"1315924352757725" - }, - { - "price":10.25, - "amount":30, - "price_int":"1025000", - "amount_int":"3000000000", - "stamp":"1325768631618166" - }, - { - "price":10.27, - "amount":10, - "price_int":"1027000", - "amount_int":"1000000000", - "stamp":"1325810341833817" - }, - { - "price":10.3, - "amount":38.5, - "price_int":"1030000", - "amount_int":"3850000000", - "stamp":"1327168036315588" - }, - { - "price":10.3382, - "amount":0.4063, - "price_int":"1033820", - "amount_int":"40630000", - "stamp":"1314296729446250" - }, - { - "price":10.36, - "amount":10, - "price_int":"1036000", - "amount_int":"1000000000", - "stamp":"1314340504992188" - }, - { - "price":10.3867, - "amount":0.25, - "price_int":"1038670", - "amount_int":"25000000", - "stamp":"1314594281514769" - }, - { - "price":10.39999, - "amount":2000, - "price_int":"1039999", - "amount_int":"200000000000", - "stamp":"1325993932264506" - }, - { - "price":10.4, - "amount":36.2, - "price_int":"1040000", - "amount_int":"3620000000", - "stamp":"1327228806795724" - }, - { - "price":10.412, - "amount":0.00778888, - "price_int":"1041200", - "amount_int":"778888", - "stamp":"1320519901348950" - }, - { - "price":10.41904, - "amount":9.2638716, - "price_int":"1041904", - "amount_int":"926387160", - "stamp":"1328644634357592" - }, - { - "price":10.44999, - "amount":1, - "price_int":"1044999", - "amount_int":"100000000", - "stamp":"1314288784351589" - }, - { - "price":10.45644, - "amount":1, - "price_int":"1045644", - "amount_int":"100000000", - "stamp":"1314817976674233" - }, - { - "price":10.46, - "amount":33.4608, - "price_int":"1046000", - "amount_int":"3346080000", - "stamp":"1325578553512889" - }, - { - "price":10.468, - "amount":1, - "price_int":"1046800", - "amount_int":"100000000", - "stamp":"1325807428047682" - }, - { - "price":10.47, - "amount":10, - "price_int":"1047000", - "amount_int":"1000000000", - "stamp":"1325793731706280" - }, - { - "price":10.48, - "amount":15.37, - "price_int":"1048000", - "amount_int":"1537000000", - "stamp":"1315804598354593" - }, - { - "price":10.48999, - "amount":1.5, - "price_int":"1048999", - "amount_int":"150000000", - "stamp":"1315924227447711" - }, - { - "price":10.49, - "amount":200, - "price_int":"1049000", - "amount_int":"20000000000", - "stamp":"1321050248284691" - }, - { - "price":10.495, - "amount":1, - "price_int":"1049500", - "amount_int":"100000000", - "stamp":"1315264270990836" - }, - { - "price":10.4998, - "amount":0.4, - "price_int":"1049980", - "amount_int":"40000000", - "stamp":"1315183996034978" - }, - { - "price":10.5, - "amount":60.4298788, - "price_int":"1050000", - "amount_int":"6042987880", - "stamp":"1327228814052826" - }, - { - "price":10.537, - "amount":25, - "price_int":"1053700", - "amount_int":"2500000000", - "stamp":"1326728107109693" - }, - { - "price":10.539, - "amount":50, - "price_int":"1053900", - "amount_int":"5000000000", - "stamp":"1314279692489475" - }, - { - "price":10.5449, - "amount":0.3983, - "price_int":"1054490", - "amount_int":"39830000", - "stamp":"1314282963399640" - }, - { - "price":10.5613, - "amount":12, - "price_int":"1056130", - "amount_int":"1200000000", - "stamp":"1315815509820612" - }, - { - "price":10.6, - "amount":34, - "price_int":"1060000", - "amount_int":"3400000000", - "stamp":"1327228818143944" - }, - { - "price":10.616, - "amount":0.4, - "price_int":"1061600", - "amount_int":"40000000", - "stamp":"1315183996228449" - }, - { - "price":10.62571, - "amount":9.51201818, - "price_int":"1062571", - "amount_int":"951201818", - "stamp":"1328644634719543" - }, - { - "price":10.66, - "amount":20, - "price_int":"1066000", - "amount_int":"2000000000", - "stamp":"1327644571831422" - }, - { - "price":10.68738, - "amount":2, - "price_int":"1068738", - "amount_int":"200000000", - "stamp":"1325449657996638" - }, - { - "price":10.69989, - "amount":1.38, - "price_int":"1069989", - "amount_int":"138000000", - "stamp":"1321250081480441" - }, - { - "price":10.7, - "amount":60, - "price_int":"1070000", - "amount_int":"6000000000", - "stamp":"1327508218907694" - }, - { - "price":10.71, - "amount":1, - "price_int":"1071000", - "amount_int":"100000000", - "stamp":"1314339956641961" - }, - { - "price":10.74899, - "amount":1.5, - "price_int":"1074899", - "amount_int":"150000000", - "stamp":"1315440740206369" - }, - { - "price":10.7559, - "amount":0.3905, - "price_int":"1075590", - "amount_int":"39050000", - "stamp":"1314277247020677" - }, - { - "price":10.78, - "amount":2, - "price_int":"1078000", - "amount_int":"200000000", - "stamp":"1314388687577504" - }, - { - "price":10.78031, - "amount":2.2443, - "price_int":"1078031", - "amount_int":"224430000", - "stamp":"1315783695584170" - }, - { - "price":10.79, - "amount":5, - "price_int":"1079000", - "amount_int":"500000000", - "stamp":"1315369048298194" - }, - { - "price":10.799, - "amount":12.53384332, - "price_int":"1079900", - "amount_int":"1253384332", - "stamp":"1314650577477527" - }, - { - "price":10.8, - "amount":26.83434481, - "price_int":"1080000", - "amount_int":"2683434481", - "stamp":"1327497608552679" - }, - { - "price":10.812, - "amount":76.024921, - "price_int":"1081200", - "amount_int":"7602492100", - "stamp":"1314601477016159" - }, - { - "price":10.81347, - "amount":10, - "price_int":"1081347", - "amount_int":"1000000000", - "stamp":"1326649733784701" - }, - { - "price":10.83405, - "amount":10, - "price_int":"1083405", - "amount_int":"1000000000", - "stamp":"1325810074662231" - }, - { - "price":10.83435, - "amount":9.7529437, - "price_int":"1083435", - "amount_int":"975294370", - "stamp":"1328644635020518" - }, - { - "price":10.83891, - "amount":4.86303041, - "price_int":"1083891", - "amount_int":"486303041", - "stamp":"1328132260601775" - }, - { - "price":10.85, - "amount":1, - "price_int":"1085000", - "amount_int":"100000000", - "stamp":"1315232912069421" - }, - { - "price":10.88, - "amount":11.4914, - "price_int":"1088000", - "amount_int":"1149140000", - "stamp":"1314707005525378" - }, - { - "price":10.8867, - "amount":0.25, - "price_int":"1088670", - "amount_int":"25000000", - "stamp":"1314594293644005" - }, - { - "price":10.8884, - "amount":0.015, - "price_int":"1088840", - "amount_int":"1500000", - "stamp":"1314246744234815" - }, - { - "price":10.8888, - "amount":41.52257738, - "price_int":"1088880", - "amount_int":"4152257738", - "stamp":"1325878392760972" - }, - { - "price":10.89, - "amount":0.06187687, - "price_int":"1089000", - "amount_int":"6187687", - "stamp":"1315781588233161" - }, - { - "price":10.899, - "amount":15, - "price_int":"1089900", - "amount_int":"1500000000", - "stamp":"1314398569705923" - }, - { - "price":10.9, - "amount":31.994, - "price_int":"1090000", - "amount_int":"3199400000", - "stamp":"1327541456430500" - }, - { - "price":10.91, - "amount":0.70571144, - "price_int":"1091000", - "amount_int":"70571144", - "stamp":"1314354048999475" - }, - { - "price":10.92825, - "amount":0.72, - "price_int":"1092825", - "amount_int":"72000000", - "stamp":"1315242297404493" - }, - { - "price":10.94, - "amount":9, - "price_int":"1094000", - "amount_int":"900000000", - "stamp":"1319903288256577" - }, - { - "price":10.95, - "amount":538.768, - "price_int":"1095000", - "amount_int":"53876800000", - "stamp":"1315249768531994" - }, - { - "price":10.95644, - "amount":1, - "price_int":"1095644", - "amount_int":"100000000", - "stamp":"1314817985424962" - }, - { - "price":10.97, - "amount":17, - "price_int":"1097000", - "amount_int":"1700000000", - "stamp":"1325637323860015" - }, - { - "price":10.971, - "amount":0.3828, - "price_int":"1097100", - "amount_int":"38280000", - "stamp":"1314277101474060" - }, - { - "price":10.98, - "amount":41.82288374, - "price_int":"1098000", - "amount_int":"4182288374", - "stamp":"1325578566514326" - }, - { - "price":10.98777, - "amount":1.5, - "price_int":"1098777", - "amount_int":"150000000", - "stamp":"1314946247560730" - }, - { - "price":10.99, - "amount":65, - "price_int":"1099000", - "amount_int":"6500000000", - "stamp":"1315786261853977" - }, - { - "price":10.991, - "amount":40, - "price_int":"1099100", - "amount_int":"4000000000", - "stamp":"1327508231569970" - }, - { - "price":10.999, - "amount":11.5338, - "price_int":"1099900", - "amount_int":"1153380000", - "stamp":"1314849120912134" - }, - { - "price":10.9999, - "amount":15, - "price_int":"1099990", - "amount_int":"1500000000", - "stamp":"1314555714750382" - }, - { - "price":11, - "amount":1882.90321391, - "price_int":"1100000", - "amount_int":"188290321391", - "stamp":"1327737323462316" - }, - { - "price":11.04491, - "amount":9.98685913, - "price_int":"1104491", - "amount_int":"998685913", - "stamp":"1328644635397168" - }, - { - "price":11.05, - "amount":1.0437, - "price_int":"1105000", - "amount_int":"104370000", - "stamp":"1314603281304114" - }, - { - "price":11.05499, - "amount":0.0032, - "price_int":"1105499", - "amount_int":"320000", - "stamp":"1314283022691772" - }, - { - "price":11.06, - "amount":10, - "price_int":"1106000", - "amount_int":"1000000000", - "stamp":"1314581755082516" - }, - { - "price":11.1, - "amount":28.5, - "price_int":"1110000", - "amount_int":"2850000000", - "stamp":"1327814075330468" - }, - { - "price":11.11, - "amount":165.167, - "price_int":"1111000", - "amount_int":"16516700000", - "stamp":"1326868999168422" - }, - { - "price":11.128, - "amount":1, - "price_int":"1112800", - "amount_int":"100000000", - "stamp":"1325807514257615" - }, - { - "price":11.12999, - "amount":0.00282928, - "price_int":"1112999", - "amount_int":"282928", - "stamp":"1314301806351196" - }, - { - "price":11.13, - "amount":10.33825217, - "price_int":"1113000", - "amount_int":"1033825217", - "stamp":"1314449364885081" - }, - { - "price":11.14323, - "amount":24, - "price_int":"1114323", - "amount_int":"2400000000", - "stamp":"1314115910381021" - }, - { - "price":11.149, - "amount":0.1368, - "price_int":"1114900", - "amount_int":"13680000", - "stamp":"1314280926905941" - }, - { - "price":11.14999, - "amount":0.634372, - "price_int":"1114999", - "amount_int":"63437200", - "stamp":"1314371542576798" - }, - { - "price":11.15, - "amount":53.89716269, - "price_int":"1115000", - "amount_int":"5389716269", - "stamp":"1319611064809522" - }, - { - "price":11.16232, - "amount":2, - "price_int":"1116232", - "amount_int":"200000000", - "stamp":"1321300428126227" - }, - { - "price":11.16938, - "amount":30, - "price_int":"1116938", - "amount_int":"3000000000", - "stamp":"1325432787498353" - }, - { - "price":11.19, - "amount":100, - "price_int":"1119000", - "amount_int":"10000000000", - "stamp":"1328081952788874" - }, - { - "price":11.1905, - "amount":0.3753, - "price_int":"1119050", - "amount_int":"37530000", - "stamp":"1314287084337367" - }, - { - "price":11.199, - "amount":8.42912, - "price_int":"1119900", - "amount_int":"842912000", - "stamp":"1314178105685831" - }, - { - "price":11.2, - "amount":105.21, - "price_int":"1120000", - "amount_int":"10521000000", - "stamp":"1327892498195041" - }, - { - "price":11.20138, - "amount":15.29704801, - "price_int":"1120138", - "amount_int":"1529704801", - "stamp":"1326821746139547" - }, - { - "price":11.235, - "amount":20, - "price_int":"1123500", - "amount_int":"2000000000", - "stamp":"1314283987637682" - }, - { - "price":11.24059, - "amount":10, - "price_int":"1124059", - "amount_int":"1000000000", - "stamp":"1315146505219890" - }, - { - "price":11.2421, - "amount":2.02644451, - "price_int":"1124210", - "amount_int":"202644451", - "stamp":"1315822999743036" - }, - { - "price":11.24889, - "amount":40, - "price_int":"1124889", - "amount_int":"4000000000", - "stamp":"1327508254550605" - }, - { - "price":11.2489, - "amount":1.5, - "price_int":"1124890", - "amount_int":"150000000", - "stamp":"1314429808070856" - }, - { - "price":11.25, - "amount":1.4, - "price_int":"1125000", - "amount_int":"140000000", - "stamp":"1314302475401418" - }, - { - "price":11.25644, - "amount":0.4373, - "price_int":"1125644", - "amount_int":"43730000", - "stamp":"1314817991450966" - }, - { - "price":11.25734, - "amount":10.21397625, - "price_int":"1125734", - "amount_int":"1021397625", - "stamp":"1328644635758246" - }, - { - "price":11.26088, - "amount":5, - "price_int":"1126088", - "amount_int":"500000000", - "stamp":"1325770779721639" - }, - { - "price":11.27, - "amount":10, - "price_int":"1127000", - "amount_int":"1000000000", - "stamp":"1325810344170403" - }, - { - "price":11.2899, - "amount":40.0732712, - "price_int":"1128990", - "amount_int":"4007327120", - "stamp":"1314140080932633" - }, - { - "price":11.3, - "amount":14.878, - "price_int":"1130000", - "amount_int":"1487800000", - "stamp":"1327980520553951" - }, - { - "price":11.30013, - "amount":11.6318874, - "price_int":"1130013", - "amount_int":"1163188740", - "stamp":"1325807576816394" - }, - { - "price":11.3012, - "amount":59.58733906, - "price_int":"1130120", - "amount_int":"5958733906", - "stamp":"1314251703634208" - }, - { - "price":11.3134, - "amount":1.5, - "price_int":"1131340", - "amount_int":"150000000", - "stamp":"1325863907613422" - }, - { - "price":11.32, - "amount":64.805, - "price_int":"1132000", - "amount_int":"6480500000", - "stamp":"1315551555459837" - }, - { - "price":11.329, - "amount":2.1, - "price_int":"1132900", - "amount_int":"210000000", - "stamp":"1314864062649768" - }, - { - "price":11.3298, - "amount":0.73, - "price_int":"1132980", - "amount_int":"73000000", - "stamp":"1314960120852339" - }, - { - "price":11.33, - "amount":0.5, - "price_int":"1133000", - "amount_int":"50000000", - "stamp":"1314076428013308" - }, - { - "price":11.34, - "amount":2, - "price_int":"1134000", - "amount_int":"200000000", - "stamp":"1314260103306723" - }, - { - "price":11.389, - "amount":1.9, - "price_int":"1138900", - "amount_int":"190000000", - "stamp":"1314960120814550" - }, - { - "price":11.4, - "amount":57.5, - "price_int":"1140000", - "amount_int":"5750000000", - "stamp":"1328189131675783" - }, - { - "price":11.4143, - "amount":0.368, - "price_int":"1141430", - "amount_int":"36800000", - "stamp":"1314106198122917" - }, - { - "price":11.44, - "amount":393.1844629, - "price_int":"1144000", - "amount_int":"39318446290", - "stamp":"1314371542457301" - }, - { - "price":11.45, - "amount":12.16131439, - "price_int":"1145000", - "amount_int":"1216131439", - "stamp":"1315773799624806" - }, - { - "price":11.46, - "amount":26.35, - "price_int":"1146000", - "amount_int":"2635000000", - "stamp":"1319697817051254" - }, - { - "price":11.47, - "amount":14.53, - "price_int":"1147000", - "amount_int":"1453000000", - "stamp":"1314340644892165" - }, - { - "price":11.47156, - "amount":10.43450614, - "price_int":"1147156", - "amount_int":"1043450614", - "stamp":"1328644636135177" - }, - { - "price":11.48, - "amount":373.18067778, - "price_int":"1148000", - "amount_int":"37318067778", - "stamp":"1325637673694792" - }, - { - "price":11.4838, - "amount":2.944106, - "price_int":"1148380", - "amount_int":"294410600", - "stamp":"1314124353732252" - }, - { - "price":11.48777, - "amount":0.15, - "price_int":"1148777", - "amount_int":"15000000", - "stamp":"1315316874683313" - }, - { - "price":11.489, - "amount":4.97, - "price_int":"1148900", - "amount_int":"497000000", - "stamp":"1314037070528253" - }, - { - "price":11.48942, - "amount":10, - "price_int":"1148942", - "amount_int":"1000000000", - "stamp":"1327622760630755" - }, - { - "price":11.48999, - "amount":1.5, - "price_int":"1148999", - "amount_int":"150000000", - "stamp":"1313996027690852" - }, - { - "price":11.49, - "amount":22.5, - "price_int":"1149000", - "amount_int":"2250000000", - "stamp":"1317025393895419" - }, - { - "price":11.495, - "amount":1, - "price_int":"1149500", - "amount_int":"100000000", - "stamp":"1314277140095802" - }, - { - "price":11.499, - "amount":0.994, - "price_int":"1149900", - "amount_int":"99400000", - "stamp":"1314306392057171" - }, - { - "price":11.5, - "amount":279.20678482, - "price_int":"1150000", - "amount_int":"27920678482", - "stamp":"1328270596604968" - }, - { - "price":11.50002, - "amount":20, - "price_int":"1150002", - "amount_int":"2000000000", - "stamp":"1315647168888428" - }, - { - "price":11.50806, - "amount":18.93466977, - "price_int":"1150806", - "amount_int":"1893466977", - "stamp":"1328582985894600" - }, - { - "price":11.52, - "amount":5.97, - "price_int":"1152000", - "amount_int":"597000000", - "stamp":"1314139604769059" - }, - { - "price":11.52017, - "amount":2, - "price_int":"1152017", - "amount_int":"200000000", - "stamp":"1313931275715474" - }, - { - "price":11.53, - "amount":30.3556, - "price_int":"1153000", - "amount_int":"3035560000", - "stamp":"1325578580221700" - }, - { - "price":11.54, - "amount":40, - "price_int":"1154000", - "amount_int":"4000000000", - "stamp":"1313952581820483" - }, - { - "price":11.54777, - "amount":0.15, - "price_int":"1154777", - "amount_int":"15000000", - "stamp":"1315316874740011" - }, - { - "price":11.56, - "amount":5, - "price_int":"1156000", - "amount_int":"500000000", - "stamp":"1314124673881761" - }, - { - "price":11.57, - "amount":6.73646628, - "price_int":"1157000", - "amount_int":"673646628", - "stamp":"1314454705557130" - }, - { - "price":11.58, - "amount":1.17095, - "price_int":"1158000", - "amount_int":"117095000", - "stamp":"1313881220002079" - }, - { - "price":11.59, - "amount":8, - "price_int":"1159000", - "amount_int":"800000000", - "stamp":"1325637733071805" - }, - { - "price":11.59646, - "amount":0.00300274, - "price_int":"1159646", - "amount_int":"300274", - "stamp":"1313981056713040" - }, - { - "price":11.6, - "amount":20.41, - "price_int":"1160000", - "amount_int":"2041000000", - "stamp":"1328350232062663" - }, - { - "price":11.609, - "amount":19.88, - "price_int":"1160900", - "amount_int":"1988000000", - "stamp":"1313987211930104" - }, - { - "price":11.6426, - "amount":0.3607, - "price_int":"1164260", - "amount_int":"36070000", - "stamp":"1314106193970899" - }, - { - "price":11.65, - "amount":1, - "price_int":"1165000", - "amount_int":"100000000", - "stamp":"1314099045242992" - }, - { - "price":11.66, - "amount":26.57988262, - "price_int":"1166000", - "amount_int":"2657988262", - "stamp":"1315767817896189" - }, - { - "price":11.68, - "amount":1, - "price_int":"1168000", - "amount_int":"100000000", - "stamp":"1313875648572248" - }, - { - "price":11.68755, - "amount":10.64865792, - "price_int":"1168755", - "amount_int":"1064865792", - "stamp":"1328644636523579" - }, - { - "price":11.69, - "amount":10.4, - "price_int":"1169000", - "amount_int":"1040000000", - "stamp":"1314051383190368" - }, - { - "price":11.7, - "amount":199.33674653, - "price_int":"1170000", - "amount_int":"19933674653", - "stamp":"1328429592960254" - }, - { - "price":11.72204, - "amount":5, - "price_int":"1172204", - "amount_int":"500000000", - "stamp":"1315369095090421" - }, - { - "price":11.72999, - "amount":0.033, - "price_int":"1172999", - "amount_int":"3300000", - "stamp":"1326766933330425" - }, - { - "price":11.75, - "amount":1.5, - "price_int":"1175000", - "amount_int":"150000000", - "stamp":"1314290472828630" - }, - { - "price":11.77, - "amount":0.5, - "price_int":"1177000", - "amount_int":"50000000", - "stamp":"1314119731099894" - }, - { - "price":11.78888, - "amount":1.07, - "price_int":"1178888", - "amount_int":"107000000", - "stamp":"1313855117332452" - }, - { - "price":11.79, - "amount":5, - "price_int":"1179000", - "amount_int":"500000000", - "stamp":"1317025393944534" - }, - { - "price":11.796, - "amount":2, - "price_int":"1179600", - "amount_int":"200000000", - "stamp":"1313854682934217" - }, - { - "price":11.799, - "amount":7.118, - "price_int":"1179900", - "amount_int":"711800000", - "stamp":"1313852035408226" - }, - { - "price":11.8, - "amount":857.84967386, - "price_int":"1180000", - "amount_int":"85784967386", - "stamp":"1328499316058016" - }, - { - "price":11.80001, - "amount":80, - "price_int":"1180001", - "amount_int":"8000000000", - "stamp":"1314256280825189" - }, - { - "price":11.81017, - "amount":10, - "price_int":"1181017", - "amount_int":"1000000000", - "stamp":"1313782465345851" - }, - { - "price":11.82758, - "amount":0.00999324, - "price_int":"1182758", - "amount_int":"999324", - "stamp":"1314603855450824" - }, - { - "price":11.84, - "amount":4.985, - "price_int":"1184000", - "amount_int":"498500000", - "stamp":"1313447551143324" - }, - { - "price":11.85, - "amount":6, - "price_int":"1185000", - "amount_int":"600000000", - "stamp":"1328327416726964" - }, - { - "price":11.8755, - "amount":0.3537, - "price_int":"1187550", - "amount_int":"35370000", - "stamp":"1313426894202275" - }, - { - "price":11.87999, - "amount":10, - "price_int":"1187999", - "amount_int":"1000000000", - "stamp":"1315810910516970" - }, - { - "price":11.88, - "amount":0.99213296, - "price_int":"1188000", - "amount_int":"99213296", - "stamp":"1315819515921166" - }, - { - "price":11.89, - "amount":3.44, - "price_int":"1189000", - "amount_int":"344000000", - "stamp":"1313412443233665" - }, - { - "price":11.89299, - "amount":3, - "price_int":"1189299", - "amount_int":"300000000", - "stamp":"1313745841044821" - }, - { - "price":11.9, - "amount":188.66358633, - "price_int":"1190000", - "amount_int":"18866358633", - "stamp":"1325831060040840" - }, - { - "price":11.90525, - "amount":10.85663782, - "price_int":"1190525", - "amount_int":"1085663782", - "stamp":"1328644636891270" - }, - { - "price":11.92, - "amount":2.3, - "price_int":"1192000", - "amount_int":"230000000", - "stamp":"1314281664982181" - }, - { - "price":11.93051, - "amount":10, - "price_int":"1193051", - "amount_int":"1000000000", - "stamp":"1325810081954668" - }, - { - "price":11.95, - "amount":2, - "price_int":"1195000", - "amount_int":"200000000", - "stamp":"1314301897022719" - }, - { - "price":11.955, - "amount":0.08, - "price_int":"1195500", - "amount_int":"8000000", - "stamp":"1312921388465678" - }, - { - "price":11.96, - "amount":1.4316, - "price_int":"1196000", - "amount_int":"143160000", - "stamp":"1313970372589382" - }, - { - "price":11.969, - "amount":1, - "price_int":"1196900", - "amount_int":"100000000", - "stamp":"1315183996104087" - }, - { - "price":11.97, - "amount":60.66359623, - "price_int":"1197000", - "amount_int":"6066359623", - "stamp":"1316981997227479" - }, - { - "price":11.979, - "amount":22.04175891, - "price_int":"1197900", - "amount_int":"2204175891", - "stamp":"1326696713085618" - }, - { - "price":11.98, - "amount":27, - "price_int":"1198000", - "amount_int":"2700000000", - "stamp":"1325990404233350" - }, - { - "price":11.98001, - "amount":200, - "price_int":"1198001", - "amount_int":"20000000000", - "stamp":"1314093703501957" - }, - { - "price":11.9802, - "amount":2, - "price_int":"1198020", - "amount_int":"200000000", - "stamp":"1313396153697457" - }, - { - "price":11.987, - "amount":10, - "price_int":"1198700", - "amount_int":"1000000000", - "stamp":"1327516125403759" - }, - { - "price":11.989, - "amount":2.89, - "price_int":"1198900", - "amount_int":"289000000", - "stamp":"1313776980313851" - }, - { - "price":11.99, - "amount":666, - "price_int":"1199000", - "amount_int":"66600000000", - "stamp":"1326310150914486" - }, - { - "price":11.99001, - "amount":100, - "price_int":"1199001", - "amount_int":"10000000000", - "stamp":"1314093709872112" - }, - { - "price":11.9996, - "amount":6, - "price_int":"1199960", - "amount_int":"600000000", - "stamp":"1312900065250658" - }, - { - "price":11.9999, - "amount":17.99691, - "price_int":"1199990", - "amount_int":"1799691000", - "stamp":"1319365468065774" - }, - { - "price":11.99999, - "amount":209.2, - "price_int":"1199999", - "amount_int":"20920000000", - "stamp":"1314460723009325" - }, - { - "price":12, - "amount":2414.53938239, - "price_int":"1200000", - "amount_int":"241453938239", - "stamp":"1327552253434455" - }, - { - "price":12.01, - "amount":4, - "price_int":"1201000", - "amount_int":"400000000", - "stamp":"1321230208427986" - }, - { - "price":12.04, - "amount":2, - "price_int":"1204000", - "amount_int":"200000000", - "stamp":"1312900187826085" - }, - { - "price":12.04899, - "amount":3, - "price_int":"1204899", - "amount_int":"300000000", - "stamp":"1313745840914555" - }, - { - "price":12.05, - "amount":1, - "price_int":"1205000", - "amount_int":"100000000", - "stamp":"1312940430381147" - }, - { - "price":12.0611, - "amount":18.00168567, - "price_int":"1206110", - "amount_int":"1800168567", - "stamp":"1322762454851544" - }, - { - "price":12.07, - "amount":1.4, - "price_int":"1207000", - "amount_int":"140000000", - "stamp":"1313979073878824" - }, - { - "price":12.09995, - "amount":2, - "price_int":"1209995", - "amount_int":"200000000", - "stamp":"1312900227517841" - }, - { - "price":12.1, - "amount":188.620808, - "price_int":"1210000", - "amount_int":"18862080800", - "stamp":"1327421151278138" - }, - { - "price":12.10887, - "amount":6.44e-5, - "price_int":"1210887", - "amount_int":"6440", - "stamp":"1326133849229663" - }, - { - "price":12.11, - "amount":130.9517, - "price_int":"1211000", - "amount_int":"13095170000", - "stamp":"1325578591954803" - }, - { - "price":12.113, - "amount":0.3467, - "price_int":"1211300", - "amount_int":"34670000", - "stamp":"1312528764392239" - }, - { - "price":12.12, - "amount":0.5, - "price_int":"1212000", - "amount_int":"50000000", - "stamp":"1313377838427713" - }, - { - "price":12.12459, - "amount":11.0586484, - "price_int":"1212459", - "amount_int":"1105864840", - "stamp":"1328644637194497" - }, - { - "price":12.1615, - "amount":4, - "price_int":"1216150", - "amount_int":"400000000", - "stamp":"1315815535514404" - }, - { - "price":12.165, - "amount":50, - "price_int":"1216500", - "amount_int":"5000000000", - "stamp":"1314642752664275" - }, - { - "price":12.19, - "amount":5.964, - "price_int":"1219000", - "amount_int":"596400000", - "stamp":"1314574267874801" - }, - { - "price":12.1903, - "amount":20, - "price_int":"1219030", - "amount_int":"2000000000", - "stamp":"1318951258512161" - }, - { - "price":12.2, - "amount":18.961, - "price_int":"1220000", - "amount_int":"1896100000", - "stamp":"1313649644886737" - }, - { - "price":12.21212, - "amount":3.73355827, - "price_int":"1221212", - "amount_int":"373355827", - "stamp":"1312924919363794" - }, - { - "price":12.22, - "amount":0.5, - "price_int":"1222000", - "amount_int":"50000000", - "stamp":"1313377845290631" - }, - { - "price":12.2222, - "amount":45, - "price_int":"1222220", - "amount_int":"4500000000", - "stamp":"1314245883086890" - }, - { - "price":12.25, - "amount":11.96925948, - "price_int":"1225000", - "amount_int":"1196925948", - "stamp":"1325732845214722" - }, - { - "price":12.27, - "amount":10, - "price_int":"1227000", - "amount_int":"1000000000", - "stamp":"1325810346929846" - }, - { - "price":12.278, - "amount":20.56375699, - "price_int":"1227800", - "amount_int":"2056375699", - "stamp":"1313865258988149" - }, - { - "price":12.3, - "amount":32.8, - "price_int":"1230000", - "amount_int":"3280000000", - "stamp":"1313304870065933" - }, - { - "price":12.33, - "amount":1.5, - "price_int":"1233000", - "amount_int":"150000000", - "stamp":"1313377849519378" - }, - { - "price":12.34557, - "amount":11.25488793, - "price_int":"1234557", - "amount_int":"1125488793", - "stamp":"1328644637568203" - }, - { - "price":12.35352, - "amount":0.45, - "price_int":"1235352", - "amount_int":"45000000", - "stamp":"1325866934337000" - }, - { - "price":12.3552, - "amount":0.3399, - "price_int":"1235520", - "amount_int":"33990000", - "stamp":"1312528760742527" - }, - { - "price":12.39, - "amount":15, - "price_int":"1239000", - "amount_int":"1500000000", - "stamp":"1321658651295613" - }, - { - "price":12.4, - "amount":95.0056462, - "price_int":"1240000", - "amount_int":"9500564620", - "stamp":"1316531156447552" - }, - { - "price":12.41, - "amount":5.774, - "price_int":"1241000", - "amount_int":"577400000", - "stamp":"1315772985527804" - }, - { - "price":12.44, - "amount":0.5, - "price_int":"1244000", - "amount_int":"50000000", - "stamp":"1313377855564395" - }, - { - "price":12.445, - "amount":114.11, - "price_int":"1244500", - "amount_int":"11411000000", - "stamp":"1312890072027095" - }, - { - "price":12.45, - "amount":3, - "price_int":"1245000", - "amount_int":"300000000", - "stamp":"1314302451853896" - }, - { - "price":12.47, - "amount":4.17, - "price_int":"1247000", - "amount_int":"417000000", - "stamp":"1312392720886925" - }, - { - "price":12.48, - "amount":42, - "price_int":"1248000", - "amount_int":"4200000000", - "stamp":"1314411777561548" - }, - { - "price":12.48154, - "amount":2.459, - "price_int":"1248154", - "amount_int":"245900000", - "stamp":"1315698128213985" - }, - { - "price":12.49, - "amount":2, - "price_int":"1249000", - "amount_int":"200000000", - "stamp":"1313379910613087" - }, - { - "price":12.4999, - "amount":8.973, - "price_int":"1249990", - "amount_int":"897300000", - "stamp":"1312500511843059" - }, - { - "price":12.49999, - "amount":10, - "price_int":"1249999", - "amount_int":"1000000000", - "stamp":"1316361061008201" - }, - { - "price":12.5, - "amount":430.59721777, - "price_int":"1250000", - "amount_int":"43059721777", - "stamp":"1326303981820213" - }, - { - "price":12.50028, - "amount":5.3731113, - "price_int":"1250028", - "amount_int":"537311130", - "stamp":"1315771364343227" - }, - { - "price":12.54999, - "amount":125.3947295, - "price_int":"1254999", - "amount_int":"12539472950", - "stamp":"1316552701161795" - }, - { - "price":12.55, - "amount":0.5, - "price_int":"1255000", - "amount_int":"50000000", - "stamp":"1313377863793853" - }, - { - "price":12.5605, - "amount":1, - "price_int":"1256050", - "amount_int":"100000000", - "stamp":"1312896331640840" - }, - { - "price":12.56811, - "amount":11.44554998, - "price_int":"1256811", - "amount_int":"1144554998", - "stamp":"1328644637953575" - }, - { - "price":12.6, - "amount":173.76626375, - "price_int":"1260000", - "amount_int":"17376626375", - "stamp":"1326045365213608" - }, - { - "price":12.6023, - "amount":0.3333, - "price_int":"1260230", - "amount_int":"33330000", - "stamp":"1312528749967044" - }, - { - "price":12.61, - "amount":10, - "price_int":"1261000", - "amount_int":"1000000000", - "stamp":"1315986890442730" - }, - { - "price":12.61998, - "amount":0.994, - "price_int":"1261998", - "amount_int":"99400000", - "stamp":"1312359571330875" - }, - { - "price":12.62179, - "amount":1, - "price_int":"1262179", - "amount_int":"100000000", - "stamp":"1312896303622617" - }, - { - "price":12.65, - "amount":5.994, - "price_int":"1265000", - "amount_int":"599400000", - "stamp":"1312909506775389" - }, - { - "price":12.69965, - "amount":11, - "price_int":"1269965", - "amount_int":"1100000000", - "stamp":"1325804717184597" - }, - { - "price":12.7, - "amount":2417.46111609, - "price_int":"1270000", - "amount_int":"241746111609", - "stamp":"1324546649588609" - }, - { - "price":12.71, - "amount":30.6474, - "price_int":"1271000", - "amount_int":"3064740000", - "stamp":"1325578605506660" - }, - { - "price":12.75, - "amount":1.5, - "price_int":"1275000", - "amount_int":"150000000", - "stamp":"1325770951588376" - }, - { - "price":12.779, - "amount":1, - "price_int":"1277900", - "amount_int":"100000000", - "stamp":"1312359679045694" - }, - { - "price":12.79217, - "amount":11.63082304, - "price_int":"1279217", - "amount_int":"1163082304", - "stamp":"1328644639305240" - }, - { - "price":12.8, - "amount":0.2, - "price_int":"1280000", - "amount_int":"20000000", - "stamp":"1313940864366224" - }, - { - "price":12.80158, - "amount":106, - "price_int":"1280158", - "amount_int":"10600000000", - "stamp":"1325764634259279" - }, - { - "price":12.8545, - "amount":0.3267, - "price_int":"1285450", - "amount_int":"32670000", - "stamp":"1312526469756689" - }, - { - "price":12.8799, - "amount":0.8, - "price_int":"1287990", - "amount_int":"80000000", - "stamp":"1312578957265299" - }, - { - "price":12.88, - "amount":46.11, - "price_int":"1288000", - "amount_int":"4611000000", - "stamp":"1312896015435339" - }, - { - "price":12.8868, - "amount":10, - "price_int":"1288680", - "amount_int":"1000000000", - "stamp":"1324463523284980" - }, - { - "price":12.89888, - "amount":0.694, - "price_int":"1289888", - "amount_int":"69400000", - "stamp":"1312379725308266" - }, - { - "price":12.9, - "amount":56.094, - "price_int":"1290000", - "amount_int":"5609400000", - "stamp":"1325831065305225" - }, - { - "price":12.95, - "amount":14, - "price_int":"1295000", - "amount_int":"1400000000", - "stamp":"1325826094418900" - }, - { - "price":12.97, - "amount":13, - "price_int":"1297000", - "amount_int":"1300000000", - "stamp":"1316982009814615" - }, - { - "price":12.98, - "amount":25, - "price_int":"1298000", - "amount_int":"2500000000", - "stamp":"1314283024049093" - }, - { - "price":12.987, - "amount":9.00564, - "price_int":"1298700", - "amount_int":"900564000", - "stamp":"1319729618279164" - }, - { - "price":12.99, - "amount":209.88, - "price_int":"1299000", - "amount_int":"20988000000", - "stamp":"1326917855161105" - }, - { - "price":12.9999, - "amount":5, - "price_int":"1299990", - "amount_int":"500000000", - "stamp":"1313048076041381" - }, - { - "price":13, - "amount":2045.04726726, - "price_int":"1300000", - "amount_int":"204504726726", - "stamp":"1327076537690028" - }, - { - "price":13.01774, - "amount":11.81089031, - "price_int":"1301774", - "amount_int":"1181089031", - "stamp":"1328644640584173" - }, - { - "price":13.02697, - "amount":20, - "price_int":"1302697", - "amount_int":"2000000000", - "stamp":"1325810088493977" - }, - { - "price":13.03521, - "amount":11.03, - "price_int":"1303521", - "amount_int":"1103000000", - "stamp":"1315416828858690" - }, - { - "price":13.07395, - "amount":10, - "price_int":"1307395", - "amount_int":"1000000000", - "stamp":"1321192725857986" - }, - { - "price":13.08, - "amount":3.823, - "price_int":"1308000", - "amount_int":"382300000", - "stamp":"1314394028571398" - }, - { - "price":13.1, - "amount":71.18899712, - "price_int":"1310000", - "amount_int":"7118899712", - "stamp":"1318380215745307" - }, - { - "price":13.10271, - "amount":173.95, - "price_int":"1310271", - "amount_int":"17395000000", - "stamp":"1325992020273327" - }, - { - "price":13.1116, - "amount":0.3203, - "price_int":"1311160", - "amount_int":"32030000", - "stamp":"1312526466036265" - }, - { - "price":13.11508, - "amount":4.86303041, - "price_int":"1311508", - "amount_int":"486303041", - "stamp":"1328132261314211" - }, - { - "price":13.12802, - "amount":1.23, - "price_int":"1312802", - "amount_int":"123000000", - "stamp":"1315378331421539" - }, - { - "price":13.15, - "amount":5.5, - "price_int":"1315000", - "amount_int":"550000000", - "stamp":"1312260335110287" - }, - { - "price":13.165, - "amount":50, - "price_int":"1316500", - "amount_int":"5000000000", - "stamp":"1314642716785826" - }, - { - "price":13.18999, - "amount":0.42, - "price_int":"1318999", - "amount_int":"42000000", - "stamp":"1312231747521066" - }, - { - "price":13.2, - "amount":18.887, - "price_int":"1320000", - "amount_int":"1888700000", - "stamp":"1318653915607317" - }, - { - "price":13.23, - "amount":10, - "price_int":"1323000", - "amount_int":"1000000000", - "stamp":"1314438550894909" - }, - { - "price":13.23437, - "amount":38, - "price_int":"1323437", - "amount_int":"3800000000", - "stamp":"1327340619702016" - }, - { - "price":13.2428, - "amount":6.108, - "price_int":"1324280", - "amount_int":"610800000", - "stamp":"1313461836003928" - }, - { - "price":13.24476, - "amount":11.98592955, - "price_int":"1324476", - "amount_int":"1198592955", - "stamp":"1328644642065612" - }, - { - "price":13.25, - "amount":12.55, - "price_int":"1325000", - "amount_int":"1255000000", - "stamp":"1327243799314597" - }, - { - "price":13.27, - "amount":10, - "price_int":"1327000", - "amount_int":"1000000000", - "stamp":"1325810348972986" - }, - { - "price":13.2844, - "amount":12, - "price_int":"1328440", - "amount_int":"1200000000", - "stamp":"1313461855806745" - }, - { - "price":13.29999, - "amount":5, - "price_int":"1329999", - "amount_int":"500000000", - "stamp":"1312384676671772" - }, - { - "price":13.3, - "amount":160.0014, - "price_int":"1330000", - "amount_int":"16000140000", - "stamp":"1327421187074433" - }, - { - "price":13.33, - "amount":0.5, - "price_int":"1333000", - "amount_int":"50000000", - "stamp":"1313377879525190" - }, - { - "price":13.34131, - "amount":5, - "price_int":"1334131", - "amount_int":"500000000", - "stamp":"1326173138322951" - }, - { - "price":13.35, - "amount":26.21728478, - "price_int":"1335000", - "amount_int":"2621728478", - "stamp":"1325578620196579" - }, - { - "price":13.3583, - "amount":2.50768461, - "price_int":"1335830", - "amount_int":"250768461", - "stamp":"1313461882864077" - }, - { - "price":13.36805, - "amount":0.5, - "price_int":"1336805", - "amount_int":"50000000", - "stamp":"1325496641652053" - }, - { - "price":13.3737, - "amount":0.314, - "price_int":"1337370", - "amount_int":"31400000", - "stamp":"1312276041985500" - }, - { - "price":13.39, - "amount":10.4685, - "price_int":"1339000", - "amount_int":"1046850000", - "stamp":"1312252957612695" - }, - { - "price":13.3987, - "amount":1.04685, - "price_int":"1339870", - "amount_int":"104685000", - "stamp":"1312272430622480" - }, - { - "price":13.4, - "amount":22.8401322, - "price_int":"1340000", - "amount_int":"2284013220", - "stamp":"1318653915687111" - }, - { - "price":13.448, - "amount":157.79, - "price_int":"1344800", - "amount_int":"15779000000", - "stamp":"1315750574748251" - }, - { - "price":13.45, - "amount":0.501284, - "price_int":"1345000", - "amount_int":"50128400", - "stamp":"1314866050633315" - }, - { - "price":13.47, - "amount":3.86, - "price_int":"1347000", - "amount_int":"386000000", - "stamp":"1312303791477607" - }, - { - "price":13.4732, - "amount":12.15611296, - "price_int":"1347320", - "amount_int":"1215611296", - "stamp":"1328644642364403" - }, - { - "price":13.48, - "amount":1, - "price_int":"1348000", - "amount_int":"100000000", - "stamp":"1312956065448572" - }, - { - "price":13.4889, - "amount":40, - "price_int":"1348890", - "amount_int":"4000000000", - "stamp":"1327508359139264" - }, - { - "price":13.49, - "amount":6.11, - "price_int":"1349000", - "amount_int":"611000000", - "stamp":"1313556223370318" - }, - { - "price":13.499, - "amount":7.989, - "price_int":"1349900", - "amount_int":"798900000", - "stamp":"1312395175626214" - }, - { - "price":13.49999, - "amount":4, - "price_int":"1349999", - "amount_int":"400000000", - "stamp":"1316026917922191" - }, - { - "price":13.5, - "amount":582.54905855, - "price_int":"1350000", - "amount_int":"58254905855", - "stamp":"1325828386832134" - }, - { - "price":13.52, - "amount":1.293109, - "price_int":"1352000", - "amount_int":"129310900", - "stamp":"1312227285542374" - }, - { - "price":13.55, - "amount":0.7, - "price_int":"1355000", - "amount_int":"70000000", - "stamp":"1312237353283561" - }, - { - "price":13.572, - "amount":7.36783, - "price_int":"1357200", - "amount_int":"736783000", - "stamp":"1313716933742521" - }, - { - "price":13.59372, - "amount":2, - "price_int":"1359372", - "amount_int":"200000000", - "stamp":"1316725443470842" - }, - { - "price":13.6, - "amount":37.7, - "price_int":"1360000", - "amount_int":"3770000000", - "stamp":"1325713877547629" - }, - { - "price":13.60929, - "amount":4.2, - "price_int":"1360929", - "amount_int":"420000000", - "stamp":"1319032620914348" - }, - { - "price":13.6412, - "amount":0.3079, - "price_int":"1364120", - "amount_int":"30790000", - "stamp":"1312223606185201" - }, - { - "price":13.67119, - "amount":0.00044729, - "price_int":"1367119", - "amount_int":"44729", - "stamp":"1312408613731328" - }, - { - "price":13.69, - "amount":4, - "price_int":"1369000", - "amount_int":"400000000", - "stamp":"1312265726576617" - }, - { - "price":13.69019, - "amount":0.00129013, - "price_int":"1369019", - "amount_int":"129013", - "stamp":"1312489765681105" - }, - { - "price":13.69999, - "amount":0.992, - "price_int":"1369999", - "amount_int":"99200000", - "stamp":"1313718481221802" - }, - { - "price":13.7, - "amount":244.18333044, - "price_int":"1370000", - "amount_int":"24418333044", - "stamp":"1325823581465495" - }, - { - "price":13.70305, - "amount":12.32160717, - "price_int":"1370305", - "amount_int":"1232160717", - "stamp":"1328644642698034" - }, - { - "price":13.72, - "amount":1, - "price_int":"1372000", - "amount_int":"100000000", - "stamp":"1312942401740498" - }, - { - "price":13.72158, - "amount":12, - "price_int":"1372158", - "amount_int":"1200000000", - "stamp":"1327445369574259" - }, - { - "price":13.72213, - "amount":0.00043093, - "price_int":"1372213", - "amount_int":"43093", - "stamp":"1312674604434434" - }, - { - "price":13.73999, - "amount":3.3271, - "price_int":"1373999", - "amount_int":"332710000", - "stamp":"1312842483663239" - }, - { - "price":13.75, - "amount":7.77, - "price_int":"1375000", - "amount_int":"777000000", - "stamp":"1312384822275432" - }, - { - "price":13.76, - "amount":0.2, - "price_int":"1376000", - "amount_int":"20000000", - "stamp":"1312317695503257" - }, - { - "price":13.7789, - "amount":1.015, - "price_int":"1377890", - "amount_int":"101500000", - "stamp":"1327508130530561" - }, - { - "price":13.78, - "amount":1, - "price_int":"1378000", - "amount_int":"100000000", - "stamp":"1314737998061380" - }, - { - "price":13.79, - "amount":4, - "price_int":"1379000", - "amount_int":"400000000", - "stamp":"1312196593610556" - }, - { - "price":13.795, - "amount":1, - "price_int":"1379500", - "amount_int":"100000000", - "stamp":"1312264291814534" - }, - { - "price":13.79583, - "amount":10, - "price_int":"1379583", - "amount_int":"1000000000", - "stamp":"1321708919697405" - }, - { - "price":13.8, - "amount":32.4697388, - "price_int":"1380000", - "amount_int":"3246973880", - "stamp":"1318653915805754" - }, - { - "price":13.86, - "amount":0.0001, - "price_int":"1386000", - "amount_int":"10000", - "stamp":"1312139389754332" - }, - { - "price":13.8799, - "amount":0.08921349, - "price_int":"1387990", - "amount_int":"8921349", - "stamp":"1316031732594268" - }, - { - "price":13.89, - "amount":7.7949, - "price_int":"1389000", - "amount_int":"779490000", - "stamp":"1313554483825994" - }, - { - "price":13.899, - "amount":1, - "price_int":"1389900", - "amount_int":"100000000", - "stamp":"1312155239525790" - }, - { - "price":13.9, - "amount":49.0126439, - "price_int":"1390000", - "amount_int":"4901264390", - "stamp":"1325831069998301" - }, - { - "price":13.9067, - "amount":20, - "price_int":"1390670", - "amount_int":"2000000000", - "stamp":"1312895748140698" - }, - { - "price":13.909, - "amount":1, - "price_int":"1390900", - "amount_int":"100000000", - "stamp":"1312155222756229" - }, - { - "price":13.914, - "amount":0.3019, - "price_int":"1391400", - "amount_int":"30190000", - "stamp":"1312292679839408" - }, - { - "price":13.919, - "amount":1, - "price_int":"1391900", - "amount_int":"100000000", - "stamp":"1312155215930323" - }, - { - "price":13.92001, - "amount":0.0078, - "price_int":"1392001", - "amount_int":"780000", - "stamp":"1312311813894612" - }, - { - "price":13.929, - "amount":1, - "price_int":"1392900", - "amount_int":"100000000", - "stamp":"1312155213142646" - }, - { - "price":13.93425, - "amount":12.48257324, - "price_int":"1393425", - "amount_int":"1248257324", - "stamp":"1328644643073218" - }, - { - "price":13.939, - "amount":1, - "price_int":"1393900", - "amount_int":"100000000", - "stamp":"1312155210158302" - }, - { - "price":13.949, - "amount":1, - "price_int":"1394900", - "amount_int":"100000000", - "stamp":"1312155202460279" - }, - { - "price":13.95, - "amount":6, - "price_int":"1395000", - "amount_int":"600000000", - "stamp":"1312199532094733" - }, - { - "price":13.959, - "amount":1, - "price_int":"1395900", - "amount_int":"100000000", - "stamp":"1312155200387427" - }, - { - "price":13.96, - "amount":30, - "price_int":"1396000", - "amount_int":"3000000000", - "stamp":"1312315752242615" - }, - { - "price":13.96039, - "amount":9.99, - "price_int":"1396039", - "amount_int":"999000000", - "stamp":"1312130577127915" - }, - { - "price":13.969, - "amount":1, - "price_int":"1396900", - "amount_int":"100000000", - "stamp":"1312155193778761" - }, - { - "price":13.97, - "amount":23.34685265, - "price_int":"1397000", - "amount_int":"2334685265", - "stamp":"1316982009888291" - }, - { - "price":13.979, - "amount":1, - "price_int":"1397900", - "amount_int":"100000000", - "stamp":"1312155133944426" - }, - { - "price":13.98, - "amount":117.23474164, - "price_int":"1398000", - "amount_int":"11723474164", - "stamp":"1316139575606720" - }, - { - "price":13.9877, - "amount":2, - "price_int":"1398770", - "amount_int":"200000000", - "stamp":"1312124943315318" - }, - { - "price":13.99, - "amount":26.77088493, - "price_int":"1399000", - "amount_int":"2677088493", - "stamp":"1326917876384860" - }, - { - "price":13.9932, - "amount":10, - "price_int":"1399320", - "amount_int":"1000000000", - "stamp":"1314001711584562" - }, - { - "price":13.99635, - "amount":10, - "price_int":"1399635", - "amount_int":"1000000000", - "stamp":"1328093060218710" - }, - { - "price":13.99999, - "amount":203.21162741, - "price_int":"1399999", - "amount_int":"20321162741", - "stamp":"1325862412327318" - }, - { - "price":14, - "amount":1652.39922682, - "price_int":"1400000", - "amount_int":"165239922682", - "stamp":"1326729797503640" - }, - { - "price":14.001, - "amount":4, - "price_int":"1400100", - "amount_int":"400000000", - "stamp":"1312173202271114" - }, - { - "price":14.01, - "amount":2.5, - "price_int":"1401000", - "amount_int":"250000000", - "stamp":"1313377891362487" - }, - { - "price":14.01589, - "amount":0.28965451, - "price_int":"1401589", - "amount_int":"28965451", - "stamp":"1314017168092983" - }, - { - "price":14.045, - "amount":3.56, - "price_int":"1404500", - "amount_int":"356000000", - "stamp":"1312315328660734" - }, - { - "price":14.05, - "amount":75.57717993, - "price_int":"1405000", - "amount_int":"7557717993", - "stamp":"1315763144879493" - }, - { - "price":14.06279, - "amount":39.23817841, - "price_int":"1406279", - "amount_int":"3923817841", - "stamp":"1312310568675643" - }, - { - "price":14.0691, - "amount":2, - "price_int":"1406910", - "amount_int":"200000000", - "stamp":"1312155013088560" - }, - { - "price":14.07998, - "amount":1.44217, - "price_int":"1407998", - "amount_int":"144217000", - "stamp":"1314454426808633" - }, - { - "price":14.09, - "amount":8.81191127, - "price_int":"1409000", - "amount_int":"881191127", - "stamp":"1312867333993053" - }, - { - "price":14.1, - "amount":9.92061022, - "price_int":"1410000", - "amount_int":"992061022", - "stamp":"1318380208084095" - }, - { - "price":14.11, - "amount":2, - "price_int":"1411000", - "amount_int":"200000000", - "stamp":"1312123500310708" - }, - { - "price":14.12, - "amount":2.8, - "price_int":"1412000", - "amount_int":"280000000", - "stamp":"1313554484055906" - }, - { - "price":14.12109, - "amount":1, - "price_int":"1412109", - "amount_int":"100000000", - "stamp":"1312496773857580" - }, - { - "price":14.12343, - "amount":20, - "price_int":"1412343", - "amount_int":"2000000000", - "stamp":"1325810092768428" - }, - { - "price":14.13, - "amount":1, - "price_int":"1413000", - "amount_int":"100000000", - "stamp":"1312154937109455" - }, - { - "price":14.14, - "amount":2.600688, - "price_int":"1414000", - "amount_int":"260068800", - "stamp":"1313377894380684" - }, - { - "price":14.15, - "amount":1, - "price_int":"1415000", - "amount_int":"100000000", - "stamp":"1312154923776551" - }, - { - "price":14.16, - "amount":1, - "price_int":"1416000", - "amount_int":"100000000", - "stamp":"1312154901451354" - }, - { - "price":14.165, - "amount":50, - "price_int":"1416500", - "amount_int":"5000000000", - "stamp":"1313184275943205" - }, - { - "price":14.16679, - "amount":12.6391667, - "price_int":"1416679", - "amount_int":"1263916670", - "stamp":"1328644643372703" - }, - { - "price":14.17, - "amount":1, - "price_int":"1417000", - "amount_int":"100000000", - "stamp":"1312154899133974" - }, - { - "price":14.18, - "amount":1, - "price_int":"1418000", - "amount_int":"100000000", - "stamp":"1312154858610800" - }, - { - "price":14.1899, - "amount":1, - "price_int":"1418990", - "amount_int":"100000000", - "stamp":"1312154795236513" - }, - { - "price":14.1903, - "amount":20, - "price_int":"1419030", - "amount_int":"2000000000", - "stamp":"1318951264595567" - }, - { - "price":14.1922, - "amount":0.2959, - "price_int":"1419220", - "amount_int":"29590000", - "stamp":"1312292671814133" - }, - { - "price":14.1949, - "amount":39.115, - "price_int":"1419490", - "amount_int":"3911500000", - "stamp":"1315750574527584" - }, - { - "price":14.2, - "amount":84.874, - "price_int":"1420000", - "amount_int":"8487400000", - "stamp":"1316017983449384" - }, - { - "price":14.2095, - "amount":1, - "price_int":"1420950", - "amount_int":"100000000", - "stamp":"1312154734239606" - }, - { - "price":14.21386, - "amount":2, - "price_int":"1421386", - "amount_int":"200000000", - "stamp":"1312140872543419" - }, - { - "price":14.2299, - "amount":1, - "price_int":"1422990", - "amount_int":"100000000", - "stamp":"1312154640445046" - }, - { - "price":14.2388, - "amount":0.98703, - "price_int":"1423880", - "amount_int":"98703000", - "stamp":"1312122208892997" - }, - { - "price":14.24, - "amount":31.6, - "price_int":"1424000", - "amount_int":"3160000000", - "stamp":"1312217587849884" - }, - { - "price":14.2499, - "amount":0.96, - "price_int":"1424990", - "amount_int":"96000000", - "stamp":"1314305798182426" - }, - { - "price":14.24999, - "amount":0.00232, - "price_int":"1424999", - "amount_int":"232000", - "stamp":"1312122245839408" - }, - { - "price":14.25, - "amount":119.9255743, - "price_int":"1425000", - "amount_int":"11992557430", - "stamp":"1312179164254970" - }, - { - "price":14.26, - "amount":0.001, - "price_int":"1426000", - "amount_int":"100000", - "stamp":"1312122126690675" - }, - { - "price":14.27, - "amount":10, - "price_int":"1427000", - "amount_int":"1000000000", - "stamp":"1325810351078295" - }, - { - "price":14.29, - "amount":4, - "price_int":"1429000", - "amount_int":"400000000", - "stamp":"1312122210783550" - }, - { - "price":14.29999, - "amount":89.1117, - "price_int":"1429999", - "amount_int":"8911170000", - "stamp":"1312122230164764" - }, - { - "price":14.3, - "amount":16.92705568, - "price_int":"1430000", - "amount_int":"1692705568", - "stamp":"1312123573188818" - }, - { - "price":14.34999, - "amount":34.6, - "price_int":"1434999", - "amount_int":"3460000000", - "stamp":"1312397010767783" - }, - { - "price":14.35, - "amount":68.19195, - "price_int":"1435000", - "amount_int":"6819195000", - "stamp":"1312138328135983" - }, - { - "price":14.37, - "amount":1, - "price_int":"1437000", - "amount_int":"100000000", - "stamp":"1312395445703684" - }, - { - "price":14.39, - "amount":76.40905956, - "price_int":"1439000", - "amount_int":"7640905956", - "stamp":"1312163071860420" - }, - { - "price":14.399, - "amount":5.55329, - "price_int":"1439900", - "amount_int":"555329000", - "stamp":"1312122287666451" - }, - { - "price":14.3995, - "amount":6.36003236, - "price_int":"1439950", - "amount_int":"636003236", - "stamp":"1312122245632235" - }, - { - "price":14.4, - "amount":19.37061607, - "price_int":"1440000", - "amount_int":"1937061607", - "stamp":"1325825496286548" - }, - { - "price":14.40062, - "amount":12.79153763, - "price_int":"1440062", - "amount_int":"1279153763", - "stamp":"1328644643759886" - }, - { - "price":14.40178, - "amount":68.91, - "price_int":"1440178", - "amount_int":"6891000000", - "stamp":"1326476462932515" - }, - { - "price":14.422, - "amount":11.85733063, - "price_int":"1442200", - "amount_int":"1185733063", - "stamp":"1312122263845492" - }, - { - "price":14.449, - "amount":41.893, - "price_int":"1444900", - "amount_int":"4189300000", - "stamp":"1312680099810493" - }, - { - "price":14.45, - "amount":2, - "price_int":"1445000", - "amount_int":"200000000", - "stamp":"1312122112900828" - }, - { - "price":14.4687, - "amount":1.05, - "price_int":"1446870", - "amount_int":"105000000", - "stamp":"1312729365609590" - }, - { - "price":14.47, - "amount":53.59, - "price_int":"1447000", - "amount_int":"5359000000", - "stamp":"1316017983410666" - }, - { - "price":14.476, - "amount":0.2901, - "price_int":"1447600", - "amount_int":"29010000", - "stamp":"1312122155271208" - }, - { - "price":14.48, - "amount":16.3688, - "price_int":"1448000", - "amount_int":"1636880000", - "stamp":"1313817658378920" - }, - { - "price":14.4848, - "amount":1, - "price_int":"1448480", - "amount_int":"100000000", - "stamp":"1312122174989797" - }, - { - "price":14.4855, - "amount":15.5277765, - "price_int":"1448550", - "amount_int":"1552777650", - "stamp":"1312302137587800" - }, - { - "price":14.48888, - "amount":0.2, - "price_int":"1448888", - "amount_int":"20000000", - "stamp":"1312122192947653" - }, - { - "price":14.4889, - "amount":40, - "price_int":"1448890", - "amount_int":"4000000000", - "stamp":"1327508365340222" - }, - { - "price":14.48942, - "amount":5, - "price_int":"1448942", - "amount_int":"500000000", - "stamp":"1315285353833177" - }, - { - "price":14.49, - "amount":1025.01, - "price_int":"1449000", - "amount_int":"102501000000", - "stamp":"1313639288894359" - }, - { - "price":14.495, - "amount":1, - "price_int":"1449500", - "amount_int":"100000000", - "stamp":"1312122112674792" - }, - { - "price":14.5, - "amount":688.46753749, - "price_int":"1450000", - "amount_int":"68846753749", - "stamp":"1328388048944050" - }, - { - "price":14.52873, - "amount":31, - "price_int":"1452873", - "amount_int":"3100000000", - "stamp":"1326252805283028" - }, - { - "price":14.53, - "amount":3, - "price_int":"1453000", - "amount_int":"300000000", - "stamp":"1313861755717988" - }, - { - "price":14.57, - "amount":1.5, - "price_int":"1457000", - "amount_int":"150000000", - "stamp":"1312147656314282" - }, - { - "price":14.579, - "amount":8, - "price_int":"1457900", - "amount_int":"800000000", - "stamp":"1312127431623595" - }, - { - "price":14.58888, - "amount":0.2, - "price_int":"1458888", - "amount_int":"20000000", - "stamp":"1312122192885361" - }, - { - "price":14.59, - "amount":3, - "price_int":"1459000", - "amount_int":"300000000", - "stamp":"1312122271028488" - }, - { - "price":14.6, - "amount":34.49938, - "price_int":"1460000", - "amount_int":"3449938000", - "stamp":"1327421681047236" - }, - { - "price":14.62, - "amount":3, - "price_int":"1462000", - "amount_int":"300000000", - "stamp":"1314035521938945" - }, - { - "price":14.6244, - "amount":17.14573499, - "price_int":"1462440", - "amount_int":"1714573499", - "stamp":"1312128941611942" - }, - { - "price":14.63574, - "amount":12.93983075, - "price_int":"1463574", - "amount_int":"1293983075", - "stamp":"1328644644078133" - }, - { - "price":14.64, - "amount":50, - "price_int":"1464000", - "amount_int":"5000000000", - "stamp":"1312122183416714" - }, - { - "price":14.65, - "amount":0.09946, - "price_int":"1465000", - "amount_int":"9946000", - "stamp":"1314454426682367" - }, - { - "price":14.66, - "amount":2.16, - "price_int":"1466000", - "amount_int":"216000000", - "stamp":"1313513815356981" - }, - { - "price":14.67999, - "amount":30, - "price_int":"1467999", - "amount_int":"3000000000", - "stamp":"1312122209659578" - }, - { - "price":14.68981, - "amount":5, - "price_int":"1468981", - "amount_int":"500000000", - "stamp":"1327622765985882" - }, - { - "price":14.69, - "amount":17.7, - "price_int":"1469000", - "amount_int":"1770000000", - "stamp":"1318835521227814" - }, - { - "price":14.7, - "amount":47.75475758, - "price_int":"1470000", - "amount_int":"4775475758", - "stamp":"1325830512768409" - }, - { - "price":14.71822, - "amount":0.3988, - "price_int":"1471822", - "amount_int":"39880000", - "stamp":"1315773648700260" - }, - { - "price":14.71999, - "amount":5, - "price_int":"1471999", - "amount_int":"500000000", - "stamp":"1313745840668486" - }, - { - "price":14.74579, - "amount":0.96218586, - "price_int":"1474579", - "amount_int":"96218586", - "stamp":"1312123544380205" - }, - { - "price":14.75, - "amount":92.84171284, - "price_int":"1475000", - "amount_int":"9284171284", - "stamp":"1312260766176450" - }, - { - "price":14.7588, - "amount":0.0018389, - "price_int":"1475880", - "amount_int":"183890", - "stamp":"1315575359278390" - }, - { - "price":14.7655, - "amount":0.2844, - "price_int":"1476550", - "amount_int":"28440000", - "stamp":"1312123537514344" - }, - { - "price":14.77, - "amount":0.004, - "price_int":"1477000", - "amount_int":"400000", - "stamp":"1312123545235290" - }, - { - "price":14.78, - "amount":2, - "price_int":"1478000", - "amount_int":"200000000", - "stamp":"1312123538403777" - }, - { - "price":14.7979, - "amount":1.01, - "price_int":"1479790", - "amount_int":"101000000", - "stamp":"1312123536906883" - }, - { - "price":14.8, - "amount":57.698, - "price_int":"1480000", - "amount_int":"5769800000", - "stamp":"1318002054341820" - }, - { - "price":14.81, - "amount":50.15, - "price_int":"1481000", - "amount_int":"5015000000", - "stamp":"1312193348366648" - }, - { - "price":14.84, - "amount":4.75, - "price_int":"1484000", - "amount_int":"475000000", - "stamp":"1315815921492182" - }, - { - "price":14.84017, - "amount":18, - "price_int":"1484017", - "amount_int":"1800000000", - "stamp":"1313629123003735" - }, - { - "price":14.85, - "amount":130.0242, - "price_int":"1485000", - "amount_int":"13002420000", - "stamp":"1325814453225754" - }, - { - "price":14.86999, - "amount":5.1, - "price_int":"1486999", - "amount_int":"510000000", - "stamp":"1312122145905199" - }, - { - "price":14.8721, - "amount":13.08418553, - "price_int":"1487210", - "amount_int":"1308418553", - "stamp":"1328644644544713" - }, - { - "price":14.8798, - "amount":30, - "price_int":"1487980", - "amount_int":"3000000000", - "stamp":"1314556413596384" - }, - { - "price":14.88, - "amount":0.5, - "price_int":"1488000", - "amount_int":"50000000", - "stamp":"1313377899606220" - }, - { - "price":14.89, - "amount":22.2, - "price_int":"1489000", - "amount_int":"2220000000", - "stamp":"1313891838276601" - }, - { - "price":14.899, - "amount":10, - "price_int":"1489900", - "amount_int":"1000000000", - "stamp":"1312121912471354" - }, - { - "price":14.9, - "amount":986.924, - "price_int":"1490000", - "amount_int":"98692400000", - "stamp":"1327134111670580" - }, - { - "price":14.92999, - "amount":0.00033951, - "price_int":"1492999", - "amount_int":"33951", - "stamp":"1312432747317424" - }, - { - "price":14.937, - "amount":1, - "price_int":"1493700", - "amount_int":"100000000", - "stamp":"1312416967862543" - }, - { - "price":14.94, - "amount":4.985, - "price_int":"1494000", - "amount_int":"498500000", - "stamp":"1312121885789331" - }, - { - "price":14.94999, - "amount":5, - "price_int":"1494999", - "amount_int":"500000000", - "stamp":"1312122012325678" - }, - { - "price":14.95, - "amount":140.5027091, - "price_int":"1495000", - "amount_int":"14050270910", - "stamp":"1319484177059183" - }, - { - "price":14.96, - "amount":6, - "price_int":"1496000", - "amount_int":"600000000", - "stamp":"1312121977379526" - }, - { - "price":14.9644, - "amount":136.32351975, - "price_int":"1496440", - "amount_int":"13632351975", - "stamp":"1325719924251674" - }, - { - "price":14.97, - "amount":31.0338763, - "price_int":"1497000", - "amount_int":"3103387630", - "stamp":"1312121990522370" - }, - { - "price":14.9769, - "amount":0.82, - "price_int":"1497690", - "amount_int":"82000000", - "stamp":"1312122109523472" - }, - { - "price":14.98, - "amount":36.80453524, - "price_int":"1498000", - "amount_int":"3680453524", - "stamp":"1314365174667096" - }, - { - "price":14.985, - "amount":420, - "price_int":"1498500", - "amount_int":"42000000000", - "stamp":"1326499179933105" - }, - { - "price":14.9889, - "amount":1, - "price_int":"1498890", - "amount_int":"100000000", - "stamp":"1312121884959224" - }, - { - "price":14.9898, - "amount":25, - "price_int":"1498980", - "amount_int":"2500000000", - "stamp":"1325847977414961" - }, - { - "price":14.9899, - "amount":203.385, - "price_int":"1498990", - "amount_int":"20338500000", - "stamp":"1315761834227246" - }, - { - "price":14.99, - "amount":64.09469725, - "price_int":"1499000", - "amount_int":"6409469725", - "stamp":"1328241783130861" - }, - { - "price":14.995, - "amount":3.5, - "price_int":"1499500", - "amount_int":"350000000", - "stamp":"1313786243201593" - }, - { - "price":14.99606, - "amount":2, - "price_int":"1499606", - "amount_int":"200000000", - "stamp":"1315302809226699" - }, - { - "price":14.9978, - "amount":1, - "price_int":"1499780", - "amount_int":"100000000", - "stamp":"1312122195128587" - }, - { - "price":14.9979, - "amount":0.41, - "price_int":"1499790", - "amount_int":"41000000", - "stamp":"1312122109575906" - }, - { - "price":14.999, - "amount":2, - "price_int":"1499900", - "amount_int":"200000000", - "stamp":"1312121941181927" - }, - { - "price":14.9995, - "amount":2.13, - "price_int":"1499950", - "amount_int":"213000000", - "stamp":"1312121893132160" - }, - { - "price":14.9999, - "amount":21.75001262, - "price_int":"1499990", - "amount_int":"2175001262", - "stamp":"1315140654648670" - }, - { - "price":14.99999, - "amount":249.12499999, - "price_int":"1499999", - "amount_int":"24912499999", - "stamp":"1326656737230559" - }, - { - "price":15, - "amount":3423.66958968, - "price_int":"1500000", - "amount_int":"342366958968", - "stamp":"1328520428000658" - }, - { - "price":15.01, - "amount":19.01, - "price_int":"1501000", - "amount_int":"1901000000", - "stamp":"1316539991068605" - }, - { - "price":15.0101, - "amount":7, - "price_int":"1501010", - "amount_int":"700000000", - "stamp":"1323062777416034" - }, - { - "price":15.02, - "amount":1.01, - "price_int":"1502000", - "amount_int":"101000000", - "stamp":"1312121985125247" - }, - { - "price":15.03, - "amount":0.01, - "price_int":"1503000", - "amount_int":"1000000", - "stamp":"1312121876923352" - }, - { - "price":15.04, - "amount":0.01, - "price_int":"1504000", - "amount_int":"1000000", - "stamp":"1312121876998047" - }, - { - "price":15.045, - "amount":1.1759512, - "price_int":"1504500", - "amount_int":"117595120", - "stamp":"1317424201020532" - }, - { - "price":15.05, - "amount":10.01, - "price_int":"1505000", - "amount_int":"1001000000", - "stamp":"1312122029047879" - }, - { - "price":15.06, - "amount":0.01, - "price_int":"1506000", - "amount_int":"1000000", - "stamp":"1312121877154087" - }, - { - "price":15.0608, - "amount":0.2789, - "price_int":"1506080", - "amount_int":"27890000", - "stamp":"1312121928799769" - }, - { - "price":15.07, - "amount":0.01, - "price_int":"1507000", - "amount_int":"1000000", - "stamp":"1312121877221480" - }, - { - "price":15.08, - "amount":0.01, - "price_int":"1508000", - "amount_int":"1000000", - "stamp":"1312121877290985" - }, - { - "price":15.09, - "amount":0.01, - "price_int":"1509000", - "amount_int":"1000000", - "stamp":"1312121877364956" - }, - { - "price":15.0911, - "amount":18.22766, - "price_int":"1509110", - "amount_int":"1822766000", - "stamp":"1325807504436448" - }, - { - "price":15.1, - "amount":60.59026801, - "price_int":"1510000", - "amount_int":"6059026801", - "stamp":"1312586264196036" - }, - { - "price":15.10968, - "amount":13.22473635, - "price_int":"1510968", - "amount_int":"1322473635", - "stamp":"1328644644853879" - }, - { - "price":15.11, - "amount":0.01, - "price_int":"1511000", - "amount_int":"1000000", - "stamp":"1312121877528877" - }, - { - "price":15.1101, - "amount":7, - "price_int":"1511010", - "amount_int":"700000000", - "stamp":"1323062841096876" - }, - { - "price":15.12, - "amount":23.516, - "price_int":"1512000", - "amount_int":"2351600000", - "stamp":"1319762954107295" - }, - { - "price":15.13, - "amount":0.01, - "price_int":"1513000", - "amount_int":"1000000", - "stamp":"1312121877743605" - }, - { - "price":15.14, - "amount":10.01, - "price_int":"1514000", - "amount_int":"1001000000", - "stamp":"1312122020551872" - }, - { - "price":15.142, - "amount":0.0072, - "price_int":"1514200", - "amount_int":"720000", - "stamp":"1312573869710462" - }, - { - "price":15.15, - "amount":11.51, - "price_int":"1515000", - "amount_int":"1151000000", - "stamp":"1312573870258500" - }, - { - "price":15.16, - "amount":0.01, - "price_int":"1516000", - "amount_int":"1000000", - "stamp":"1312121877984287" - }, - { - "price":15.165, - "amount":30, - "price_int":"1516500", - "amount_int":"3000000000", - "stamp":"1312121940556163" - }, - { - "price":15.17, - "amount":0.01, - "price_int":"1517000", - "amount_int":"1000000", - "stamp":"1312121878054347" - }, - { - "price":15.175, - "amount":3.98, - "price_int":"1517500", - "amount_int":"398000000", - "stamp":"1313086823981643" - }, - { - "price":15.18, - "amount":0.01, - "price_int":"1518000", - "amount_int":"1000000", - "stamp":"1312121878154634" - }, - { - "price":15.185, - "amount":2.144565, - "price_int":"1518500", - "amount_int":"214456500", - "stamp":"1312121902038712" - }, - { - "price":15.18665, - "amount":14, - "price_int":"1518665", - "amount_int":"1400000000", - "stamp":"1315212663245737" - }, - { - "price":15.1898, - "amount":0.5, - "price_int":"1518980", - "amount_int":"50000000", - "stamp":"1312122195221919" - }, - { - "price":15.1899, - "amount":15, - "price_int":"1518990", - "amount_int":"1500000000", - "stamp":"1312121895653112" - }, - { - "price":15.19, - "amount":0.01, - "price_int":"1519000", - "amount_int":"1000000", - "stamp":"1312121878305318" - }, - { - "price":15.2, - "amount":152.48, - "price_int":"1520000", - "amount_int":"15248000000", - "stamp":"1315757971002128" - }, - { - "price":15.20099, - "amount":10, - "price_int":"1520099", - "amount_int":"1000000000", - "stamp":"1312122115319884" - }, - { - "price":15.21, - "amount":0.01, - "price_int":"1521000", - "amount_int":"1000000", - "stamp":"1312121878498700" - }, - { - "price":15.2101, - "amount":7, - "price_int":"1521010", - "amount_int":"700000000", - "stamp":"1323062846300749" - }, - { - "price":15.2199, - "amount":40, - "price_int":"1521990", - "amount_int":"4000000000", - "stamp":"1325810098990164" - }, - { - "price":15.22, - "amount":5.01, - "price_int":"1522000", - "amount_int":"501000000", - "stamp":"1313378002491416" - }, - { - "price":15.23, - "amount":5.01, - "price_int":"1523000", - "amount_int":"501000000", - "stamp":"1312121942675774" - }, - { - "price":15.24, - "amount":0.01, - "price_int":"1524000", - "amount_int":"1000000", - "stamp":"1312121878731220" - }, - { - "price":15.25, - "amount":135, - "price_int":"1525000", - "amount_int":"13500000000", - "stamp":"1312254777615816" - }, - { - "price":15.25509, - "amount":0.73894488, - "price_int":"1525509", - "amount_int":"73894488", - "stamp":"1315303074214910" - }, - { - "price":15.26, - "amount":0.01, - "price_int":"1526000", - "amount_int":"1000000", - "stamp":"1312121878800984" - }, - { - "price":15.27, - "amount":0.01, - "price_int":"1527000", - "amount_int":"1000000", - "stamp":"1312121878881450" - }, - { - "price":15.28, - "amount":20.01, - "price_int":"1528000", - "amount_int":"2001000000", - "stamp":"1313513827438793" - }, - { - "price":15.29, - "amount":0.01, - "price_int":"1529000", - "amount_int":"1000000", - "stamp":"1312121879053757" - }, - { - "price":15.2948, - "amount":1.135, - "price_int":"1529480", - "amount_int":"113500000", - "stamp":"1313855475138135" - }, - { - "price":15.3, - "amount":31.91170184, - "price_int":"1530000", - "amount_int":"3191170184", - "stamp":"1312123536538105" - }, - { - "price":15.31, - "amount":0.01, - "price_int":"1531000", - "amount_int":"1000000", - "stamp":"1312121879244596" - }, - { - "price":15.3101, - "amount":7, - "price_int":"1531010", - "amount_int":"700000000", - "stamp":"1323062860697429" - }, - { - "price":15.32, - "amount":0.01, - "price_int":"1532000", - "amount_int":"1000000", - "stamp":"1312121879324441" - }, - { - "price":15.33, - "amount":15.49867078, - "price_int":"1533000", - "amount_int":"1549867078", - "stamp":"1321492879925557" - }, - { - "price":15.34, - "amount":0.01, - "price_int":"1534000", - "amount_int":"1000000", - "stamp":"1312121879512439" - }, - { - "price":15.34847, - "amount":13.36161257, - "price_int":"1534847", - "amount_int":"1336161257", - "stamp":"1328644645251785" - }, - { - "price":15.34891, - "amount":0.70467485, - "price_int":"1534891", - "amount_int":"70467485", - "stamp":"1314892003141798" - }, - { - "price":15.3499, - "amount":7.58, - "price_int":"1534990", - "amount_int":"758000000", - "stamp":"1312121865317247" - }, - { - "price":15.35, - "amount":15.22700391, - "price_int":"1535000", - "amount_int":"1522700391", - "stamp":"1312122030158270" - }, - { - "price":15.36, - "amount":0.01, - "price_int":"1536000", - "amount_int":"1000000", - "stamp":"1312121879669797" - }, - { - "price":15.362, - "amount":0.2734, - "price_int":"1536200", - "amount_int":"27340000", - "stamp":"1312121928638629" - }, - { - "price":15.37, - "amount":0.01, - "price_int":"1537000", - "amount_int":"1000000", - "stamp":"1312121879773018" - }, - { - "price":15.38, - "amount":0.01, - "price_int":"1538000", - "amount_int":"1000000", - "stamp":"1312121879850969" - }, - { - "price":15.39, - "amount":3.98, - "price_int":"1539000", - "amount_int":"398000000", - "stamp":"1313132468240387" - }, - { - "price":15.4, - "amount":56.91, - "price_int":"1540000", - "amount_int":"5691000000", - "stamp":"1318079220014474" - }, - { - "price":15.41, - "amount":0.01, - "price_int":"1541000", - "amount_int":"1000000", - "stamp":"1312121880116920" - }, - { - "price":15.4101, - "amount":7, - "price_int":"1541010", - "amount_int":"700000000", - "stamp":"1323062895802445" - }, - { - "price":15.42, - "amount":0.01, - "price_int":"1542000", - "amount_int":"1000000", - "stamp":"1312121880224102" - }, - { - "price":15.4279, - "amount":1.05, - "price_int":"1542790", - "amount_int":"105000000", - "stamp":"1312729617738978" - }, - { - "price":15.42999, - "amount":6.51252865, - "price_int":"1542999", - "amount_int":"651252865", - "stamp":"1312122193203741" - }, - { - "price":15.43, - "amount":0.01, - "price_int":"1543000", - "amount_int":"1000000", - "stamp":"1312121880298640" - }, - { - "price":15.44, - "amount":28.88639, - "price_int":"1544000", - "amount_int":"2888639000", - "stamp":"1312121902572729" - }, - { - "price":15.44999, - "amount":5, - "price_int":"1544999", - "amount_int":"500000000", - "stamp":"1312122012353781" - }, - { - "price":15.45, - "amount":11.44211024, - "price_int":"1545000", - "amount_int":"1144211024", - "stamp":"1315303074266368" - }, - { - "price":15.458, - "amount":16, - "price_int":"1545800", - "amount_int":"1600000000", - "stamp":"1312122067413840" - }, - { - "price":15.46, - "amount":0.01, - "price_int":"1546000", - "amount_int":"1000000", - "stamp":"1312121883770041" - }, - { - "price":15.47, - "amount":5.37, - "price_int":"1547000", - "amount_int":"537000000", - "stamp":"1312121884077469" - }, - { - "price":15.48, - "amount":3.7, - "price_int":"1548000", - "amount_int":"370000000", - "stamp":"1312288276671104" - }, - { - "price":15.4889, - "amount":1, - "price_int":"1548890", - "amount_int":"100000000", - "stamp":"1312121993753396" - }, - { - "price":15.489, - "amount":0.26, - "price_int":"1548900", - "amount_int":"26000000", - "stamp":"1312121870543081" - }, - { - "price":15.49, - "amount":10008.77852473, - "price_int":"1549000", - "amount_int":"1000877852473", - "stamp":"1312351543473724" - }, - { - "price":15.495, - "amount":1, - "price_int":"1549500", - "amount_int":"100000000", - "stamp":"1312122112746481" - }, - { - "price":15.499, - "amount":15.7706, - "price_int":"1549900", - "amount_int":"1577060000", - "stamp":"1312325280548765" - }, - { - "price":15.5, - "amount":252.2093579, - "price_int":"1550000", - "amount_int":"25220935790", - "stamp":"1325454004742294" - }, - { - "price":15.51, - "amount":4.01, - "price_int":"1551000", - "amount_int":"401000000", - "stamp":"1320338461313550" - }, - { - "price":15.5101, - "amount":7, - "price_int":"1551010", - "amount_int":"700000000", - "stamp":"1323062900289200" - }, - { - "price":15.52, - "amount":0.01, - "price_int":"1552000", - "amount_int":"1000000", - "stamp":"1312121934574997" - }, - { - "price":15.53, - "amount":0.01, - "price_int":"1553000", - "amount_int":"1000000", - "stamp":"1312121934657848" - }, - { - "price":15.54, - "amount":0.01, - "price_int":"1554000", - "amount_int":"1000000", - "stamp":"1312121934717304" - }, - { - "price":15.55, - "amount":0.01, - "price_int":"1555000", - "amount_int":"1000000", - "stamp":"1312121934790851" - }, - { - "price":15.56, - "amount":2.01, - "price_int":"1556000", - "amount_int":"201000000", - "stamp":"1312121934850782" - }, - { - "price":15.57, - "amount":0.01, - "price_int":"1557000", - "amount_int":"1000000", - "stamp":"1312121934917861" - }, - { - "price":15.58, - "amount":0.01, - "price_int":"1558000", - "amount_int":"1000000", - "stamp":"1312121934995151" - }, - { - "price":15.58843, - "amount":13.49493873, - "price_int":"1558843", - "amount_int":"1349493873", - "stamp":"1328644645644068" - }, - { - "price":15.59, - "amount":0.01, - "price_int":"1559000", - "amount_int":"1000000", - "stamp":"1312121935051215" - }, - { - "price":15.59999, - "amount":7, - "price_int":"1559999", - "amount_int":"700000000", - "stamp":"1312122209278621" - }, - { - "price":15.6, - "amount":68.29, - "price_int":"1560000", - "amount_int":"6829000000", - "stamp":"1325713889469984" - }, - { - "price":15.61, - "amount":0.01, - "price_int":"1561000", - "amount_int":"1000000", - "stamp":"1312121946671684" - }, - { - "price":15.6101, - "amount":7, - "price_int":"1561010", - "amount_int":"700000000", - "stamp":"1323062904080363" - }, - { - "price":15.62, - "amount":3.6989, - "price_int":"1562000", - "amount_int":"369890000", - "stamp":"1312122119745783" - }, - { - "price":15.621, - "amount":18, - "price_int":"1562100", - "amount_int":"1800000000", - "stamp":"1312121892186254" - }, - { - "price":15.63, - "amount":0.01, - "price_int":"1563000", - "amount_int":"1000000", - "stamp":"1312121946822339" - }, - { - "price":15.64, - "amount":0.01, - "price_int":"1564000", - "amount_int":"1000000", - "stamp":"1312121946885553" - }, - { - "price":15.645, - "amount":5, - "price_int":"1564500", - "amount_int":"500000000", - "stamp":"1312121933436095" - }, - { - "price":15.65, - "amount":0.01, - "price_int":"1565000", - "amount_int":"1000000", - "stamp":"1312121946982222" - }, - { - "price":15.66, - "amount":0.01, - "price_int":"1566000", - "amount_int":"1000000", - "stamp":"1312121947054322" - }, - { - "price":15.6693, - "amount":0.268, - "price_int":"1566930", - "amount_int":"26800000", - "stamp":"1312121928545184" - }, - { - "price":15.67, - "amount":0.01, - "price_int":"1567000", - "amount_int":"1000000", - "stamp":"1312121947127134" - }, - { - "price":15.68, - "amount":1.01, - "price_int":"1568000", - "amount_int":"101000000", - "stamp":"1312529399395176" - }, - { - "price":15.68194, - "amount":2.5, - "price_int":"1568194", - "amount_int":"250000000", - "stamp":"1325956162440378" - }, - { - "price":15.68888, - "amount":38.27314237, - "price_int":"1568888", - "amount_int":"3827314237", - "stamp":"1312121848216496" - }, - { - "price":15.69, - "amount":0.01, - "price_int":"1569000", - "amount_int":"1000000", - "stamp":"1312121947290301" - }, - { - "price":15.69148, - "amount":85.19308044, - "price_int":"1569148", - "amount_int":"8519308044", - "stamp":"1328217081095296" - }, - { - "price":15.693, - "amount":0.4985, - "price_int":"1569300", - "amount_int":"49850000", - "stamp":"1312121795954182" - }, - { - "price":15.7, - "amount":4.6031, - "price_int":"1570000", - "amount_int":"460310000", - "stamp":"1316927501073310" - }, - { - "price":15.71, - "amount":0.01, - "price_int":"1571000", - "amount_int":"1000000", - "stamp":"1312121948089074" - }, - { - "price":15.7101, - "amount":7, - "price_int":"1571010", - "amount_int":"700000000", - "stamp":"1323062907239309" - }, - { - "price":15.71999, - "amount":5, - "price_int":"1571999", - "amount_int":"500000000", - "stamp":"1314368767349833" - }, - { - "price":15.72, - "amount":0.01, - "price_int":"1572000", - "amount_int":"1000000", - "stamp":"1312121948182681" - }, - { - "price":15.73, - "amount":0.01, - "price_int":"1573000", - "amount_int":"1000000", - "stamp":"1312121948260100" - }, - { - "price":15.74, - "amount":70.26893353, - "price_int":"1574000", - "amount_int":"7026893353", - "stamp":"1312121948331234" - }, - { - "price":15.75, - "amount":6.01, - "price_int":"1575000", - "amount_int":"601000000", - "stamp":"1328241777444041" - }, - { - "price":15.76, - "amount":0.01, - "price_int":"1576000", - "amount_int":"1000000", - "stamp":"1312121948501150" - }, - { - "price":15.77, - "amount":3.01, - "price_int":"1577000", - "amount_int":"301000000", - "stamp":"1312121948589087" - }, - { - "price":15.78, - "amount":0.01, - "price_int":"1578000", - "amount_int":"1000000", - "stamp":"1312121948657819" - }, - { - "price":15.7877, - "amount":2, - "price_int":"1578770", - "amount_int":"200000000", - "stamp":"1312124975037485" - }, - { - "price":15.79, - "amount":0.01, - "price_int":"1579000", - "amount_int":"1000000", - "stamp":"1312121948732412" - }, - { - "price":15.79977, - "amount":60, - "price_int":"1579977", - "amount_int":"6000000000", - "stamp":"1312121873576681" - }, - { - "price":15.8, - "amount":32.35572813, - "price_int":"1580000", - "amount_int":"3235572813", - "stamp":"1318002054306408" - }, - { - "price":15.81, - "amount":0.01, - "price_int":"1581000", - "amount_int":"1000000", - "stamp":"1312121951981527" - }, - { - "price":15.8101, - "amount":7, - "price_int":"1581010", - "amount_int":"700000000", - "stamp":"1323062910649098" - }, - { - "price":15.82, - "amount":0.01, - "price_int":"1582000", - "amount_int":"1000000", - "stamp":"1312121952037674" - }, - { - "price":15.822, - "amount":1, - "price_int":"1582200", - "amount_int":"100000000", - "stamp":"1312121828777332" - }, - { - "price":15.82955, - "amount":13.6248347, - "price_int":"1582955", - "amount_int":"1362483470", - "stamp":"1328644646018898" - }, - { - "price":15.83, - "amount":0.01, - "price_int":"1583000", - "amount_int":"1000000", - "stamp":"1312121952102861" - }, - { - "price":15.84, - "amount":0.01, - "price_int":"1584000", - "amount_int":"1000000", - "stamp":"1312121952158985" - }, - { - "price":15.84008, - "amount":26.4285, - "price_int":"1584008", - "amount_int":"2642850000", - "stamp":"1314814998581975" - }, - { - "price":15.85, - "amount":0.01, - "price_int":"1585000", - "amount_int":"1000000", - "stamp":"1312121952254919" - }, - { - "price":15.86, - "amount":0.01, - "price_int":"1586000", - "amount_int":"1000000", - "stamp":"1312121952323967" - }, - { - "price":15.86609, - "amount":5, - "price_int":"1586609", - "amount_int":"500000000", - "stamp":"1315783733115616" - }, - { - "price":15.87, - "amount":0.01, - "price_int":"1587000", - "amount_int":"1000000", - "stamp":"1312121952391311" - }, - { - "price":15.879, - "amount":8, - "price_int":"1587900", - "amount_int":"800000000", - "stamp":"1312121828500274" - }, - { - "price":15.88, - "amount":0.01, - "price_int":"1588000", - "amount_int":"1000000", - "stamp":"1312121952455905" - }, - { - "price":15.8899, - "amount":26.28340196, - "price_int":"1588990", - "amount_int":"2628340196", - "stamp":"1312121906370651" - }, - { - "price":15.89, - "amount":1.01, - "price_int":"1589000", - "amount_int":"101000000", - "stamp":"1312121952530016" - }, - { - "price":15.89301, - "amount":0.00037165, - "price_int":"1589301", - "amount_int":"37165", - "stamp":"1312307270974091" - }, - { - "price":15.89889, - "amount":0.04458772, - "price_int":"1589889", - "amount_int":"4458772", - "stamp":"1312121956080419" - }, - { - "price":15.9, - "amount":29.01, - "price_int":"1590000", - "amount_int":"2901000000", - "stamp":"1325831078238689" - }, - { - "price":15.91, - "amount":0.01, - "price_int":"1591000", - "amount_int":"1000000", - "stamp":"1312121955203777" - }, - { - "price":15.9101, - "amount":7, - "price_int":"1591010", - "amount_int":"700000000", - "stamp":"1323062914637040" - }, - { - "price":15.92, - "amount":0.01, - "price_int":"1592000", - "amount_int":"1000000", - "stamp":"1312121955283248" - }, - { - "price":15.93, - "amount":100.01, - "price_int":"1593000", - "amount_int":"10001000000", - "stamp":"1313397809073698" - }, - { - "price":15.94, - "amount":0.01, - "price_int":"1594000", - "amount_int":"1000000", - "stamp":"1312121955399650" - }, - { - "price":15.94099, - "amount":10, - "price_int":"1594099", - "amount_int":"1000000000", - "stamp":"1328176296221718" - }, - { - "price":15.94999, - "amount":5, - "price_int":"1594999", - "amount_int":"500000000", - "stamp":"1312122012415098" - }, - { - "price":15.95, - "amount":0.01, - "price_int":"1595000", - "amount_int":"1000000", - "stamp":"1312121955462378" - }, - { - "price":15.95301, - "amount":5, - "price_int":"1595301", - "amount_int":"500000000", - "stamp":"1312121866928939" - }, - { - "price":15.96, - "amount":0.01, - "price_int":"1596000", - "amount_int":"1000000", - "stamp":"1312121955526313" - }, - { - "price":15.97, - "amount":0.01, - "price_int":"1597000", - "amount_int":"1000000", - "stamp":"1312121955592824" - }, - { - "price":15.98, - "amount":26.68524822, - "price_int":"1598000", - "amount_int":"2668524822", - "stamp":"1314383987987913" - }, - { - "price":15.9827, - "amount":0.2628, - "price_int":"1598270", - "amount_int":"26280000", - "stamp":"1312121928455900" - }, - { - "price":15.9877, - "amount":25, - "price_int":"1598770", - "amount_int":"2500000000", - "stamp":"1312121794673984" - }, - { - "price":15.99, - "amount":13.107, - "price_int":"1599000", - "amount_int":"1310700000", - "stamp":"1326917891255764" - }, - { - "price":15.99999, - "amount":260, - "price_int":"1599999", - "amount_int":"26000000000", - "stamp":"1326311065529128" - }, - { - "price":16, - "amount":2465.87485301, - "price_int":"1600000", - "amount_int":"246587485301", - "stamp":"1327228436218422" - }, - { - "price":16.00198, - "amount":425.73, - "price_int":"1600198", - "amount_int":"42573000000", - "stamp":"1326050961818643" - }, - { - "price":16.01, - "amount":18.5, - "price_int":"1601000", - "amount_int":"1850000000", - "stamp":"1315750228386765" - }, - { - "price":16.0101, - "amount":7, - "price_int":"1601010", - "amount_int":"700000000", - "stamp":"1323062923594678" - }, - { - "price":16.07179, - "amount":13.75141578, - "price_int":"1607179", - "amount_int":"1375141578", - "stamp":"1328644646405126" - }, - { - "price":16.09, - "amount":1, - "price_int":"1609000", - "amount_int":"100000000", - "stamp":"1312122221262653" - }, - { - "price":16.1, - "amount":11.5455, - "price_int":"1610000", - "amount_int":"1154550000", - "stamp":"1327421700235861" - }, - { - "price":16.1101, - "amount":7, - "price_int":"1611010", - "amount_int":"700000000", - "stamp":"1323062927217786" - }, - { - "price":16.15, - "amount":24.985, - "price_int":"1615000", - "amount_int":"2498500000", - "stamp":"1312121864495614" - }, - { - "price":16.18, - "amount":0.3, - "price_int":"1618000", - "amount_int":"30000000", - "stamp":"1312121838559051" - }, - { - "price":16.19, - "amount":1, - "price_int":"1619000", - "amount_int":"100000000", - "stamp":"1312122221512187" - }, - { - "price":16.2101, - "amount":7, - "price_int":"1621010", - "amount_int":"700000000", - "stamp":"1323062930570359" - }, - { - "price":16.22, - "amount":2, - "price_int":"1622000", - "amount_int":"200000000", - "stamp":"1312121792072305" - }, - { - "price":16.25, - "amount":5, - "price_int":"1625000", - "amount_int":"500000000", - "stamp":"1312121982882215" - }, - { - "price":16.27, - "amount":10, - "price_int":"1627000", - "amount_int":"1000000000", - "stamp":"1312121893049338" - }, - { - "price":16.29, - "amount":1, - "price_int":"1629000", - "amount_int":"100000000", - "stamp":"1312121788033434" - }, - { - "price":16.3, - "amount":28.2413, - "price_int":"1630000", - "amount_int":"2824130000", - "stamp":"1318002054259001" - }, - { - "price":16.3023, - "amount":0.2576, - "price_int":"1630230", - "amount_int":"25760000", - "stamp":"1312121928363822" - }, - { - "price":16.3101, - "amount":7, - "price_int":"1631010", - "amount_int":"700000000", - "stamp":"1323062934285388" - }, - { - "price":16.31514, - "amount":13.87479293, - "price_int":"1631514", - "amount_int":"1387479293", - "stamp":"1328644646776158" - }, - { - "price":16.31636, - "amount":50, - "price_int":"1631636", - "amount_int":"5000000000", - "stamp":"1325810105682130" - }, - { - "price":16.33, - "amount":3.57983, - "price_int":"1633000", - "amount_int":"357983000", - "stamp":"1312121814603246" - }, - { - "price":16.3399, - "amount":10.43242643, - "price_int":"1633990", - "amount_int":"1043242643", - "stamp":"1319762954065392" - }, - { - "price":16.39, - "amount":1, - "price_int":"1639000", - "amount_int":"100000000", - "stamp":"1312121788134435" - }, - { - "price":16.399, - "amount":1, - "price_int":"1639900", - "amount_int":"100000000", - "stamp":"1312121779938275" - }, - { - "price":16.4, - "amount":1.1, - "price_int":"1640000", - "amount_int":"110000000", - "stamp":"1318007821531622" - }, - { - "price":16.4101, - "amount":7, - "price_int":"1641010", - "amount_int":"700000000", - "stamp":"1323062938079572" - }, - { - "price":16.44712, - "amount":6.08, - "price_int":"1644712", - "amount_int":"608000000", - "stamp":"1312121950668074" - }, - { - "price":16.45, - "amount":36.67384, - "price_int":"1645000", - "amount_int":"3667384000", - "stamp":"1312121864595430" - }, - { - "price":16.46199, - "amount":10, - "price_int":"1646199", - "amount_int":"1000000000", - "stamp":"1312121790002097" - }, - { - "price":16.47, - "amount":3.16, - "price_int":"1647000", - "amount_int":"316000000", - "stamp":"1312121781110697" - }, - { - "price":16.48, - "amount":3.74089313, - "price_int":"1648000", - "amount_int":"374089313", - "stamp":"1310321479876949" - }, - { - "price":16.484, - "amount":1, - "price_int":"1648400", - "amount_int":"100000000", - "stamp":"1312122222899377" - }, - { - "price":16.49, - "amount":4359.62448837, - "price_int":"1649000", - "amount_int":"435962448837", - "stamp":"1312243944225866" - }, - { - "price":16.495, - "amount":1, - "price_int":"1649500", - "amount_int":"100000000", - "stamp":"1312122112784956" - }, - { - "price":16.498, - "amount":4, - "price_int":"1649800", - "amount_int":"400000000", - "stamp":"1312121780051018" - }, - { - "price":16.499, - "amount":20, - "price_int":"1649900", - "amount_int":"2000000000", - "stamp":"1312121786657820" - }, - { - "price":16.49999, - "amount":0.6776, - "price_int":"1649999", - "amount_int":"67760000", - "stamp":"1312121811146777" - }, - { - "price":16.5, - "amount":344.366, - "price_int":"1650000", - "amount_int":"34436600000", - "stamp":"1328241774102441" - }, - { - "price":16.505, - "amount":1, - "price_int":"1650500", - "amount_int":"100000000", - "stamp":"1312121656317983" - }, - { - "price":16.50954, - "amount":1.5, - "price_int":"1650954", - "amount_int":"150000000", - "stamp":"1319281659784030" - }, - { - "price":16.5101, - "amount":7, - "price_int":"1651010", - "amount_int":"700000000", - "stamp":"1323062943386983" - }, - { - "price":16.55961, - "amount":13.99507285, - "price_int":"1655961", - "amount_int":"1399507285", - "stamp":"1328644647073673" - }, - { - "price":16.58, - "amount":8.62835821, - "price_int":"1658000", - "amount_int":"862835821", - "stamp":"1312121791713345" - }, - { - "price":16.6, - "amount":0.6, - "price_int":"1660000", - "amount_int":"60000000", - "stamp":"1312121865455054" - }, - { - "price":16.6101, - "amount":7, - "price_int":"1661010", - "amount_int":"700000000", - "stamp":"1323062948348242" - }, - { - "price":16.6283, - "amount":0.2526, - "price_int":"1662830", - "amount_int":"25260000", - "stamp":"1312121928272709" - }, - { - "price":16.64, - "amount":1.26202531, - "price_int":"1664000", - "amount_int":"126202531", - "stamp":"1312121656230175" - }, - { - "price":16.65, - "amount":5.907, - "price_int":"1665000", - "amount_int":"590700000", - "stamp":"1312121742186644" - }, - { - "price":16.67, - "amount":2, - "price_int":"1667000", - "amount_int":"200000000", - "stamp":"1312121935679647" - }, - { - "price":16.6979, - "amount":2, - "price_int":"1669790", - "amount_int":"200000000", - "stamp":"1312121946339053" - }, - { - "price":16.699, - "amount":1, - "price_int":"1669900", - "amount_int":"100000000", - "stamp":"1312121660869300" - }, - { - "price":16.69999, - "amount":15, - "price_int":"1669999", - "amount_int":"1500000000", - "stamp":"1312121863378365" - }, - { - "price":16.7, - "amount":27, - "price_int":"1670000", - "amount_int":"2700000000", - "stamp":"1312121794496183" - }, - { - "price":16.7101, - "amount":6, - "price_int":"1671010", - "amount_int":"600000000", - "stamp":"1323062959586159" - }, - { - "price":16.71999, - "amount":5, - "price_int":"1671999", - "amount_int":"500000000", - "stamp":"1314368767229877" - }, - { - "price":16.75, - "amount":13.54975069, - "price_int":"1675000", - "amount_int":"1354975069", - "stamp":"1312121982958757" - }, - { - "price":16.76, - "amount":15, - "price_int":"1676000", - "amount_int":"1500000000", - "stamp":"1325963978634266" - }, - { - "price":16.77, - "amount":2, - "price_int":"1677000", - "amount_int":"200000000", - "stamp":"1312122196228208" - }, - { - "price":16.78, - "amount":2.997, - "price_int":"1678000", - "amount_int":"299700000", - "stamp":"1312243767273185" - }, - { - "price":16.789, - "amount":5, - "price_int":"1678900", - "amount_int":"500000000", - "stamp":"1312121778861936" - }, - { - "price":16.79, - "amount":311.67598654, - "price_int":"1679000", - "amount_int":"31167598654", - "stamp":"1315592388892933" - }, - { - "price":16.7999, - "amount":3.17, - "price_int":"1679990", - "amount_int":"317000000", - "stamp":"1312111585723460" - }, - { - "price":16.79999, - "amount":0.4985, - "price_int":"1679999", - "amount_int":"49850000", - "stamp":"1312121812920847" - }, - { - "price":16.8, - "amount":45.2, - "price_int":"1680000", - "amount_int":"4520000000", - "stamp":"1314073751109135" - }, - { - "price":16.80512, - "amount":14.11235817, - "price_int":"1680512", - "amount_int":"1411235817", - "stamp":"1328644647409008" - }, - { - "price":16.8101, - "amount":6, - "price_int":"1681010", - "amount_int":"600000000", - "stamp":"1323062964465703" - }, - { - "price":16.811, - "amount":5, - "price_int":"1681100", - "amount_int":"500000000", - "stamp":"1312121628385003" - }, - { - "price":16.818, - "amount":1, - "price_int":"1681800", - "amount_int":"100000000", - "stamp":"1315530690076553" - }, - { - "price":16.819, - "amount":23.30685599, - "price_int":"1681900", - "amount_int":"2330685599", - "stamp":"1312121795779339" - }, - { - "price":16.824, - "amount":25, - "price_int":"1682400", - "amount_int":"2500000000", - "stamp":"1312121796192846" - }, - { - "price":16.85, - "amount":3, - "price_int":"1685000", - "amount_int":"300000000", - "stamp":"1312121779218030" - }, - { - "price":16.87, - "amount":3, - "price_int":"1687000", - "amount_int":"300000000", - "stamp":"1312121779108329" - }, - { - "price":16.88, - "amount":5.4, - "price_int":"1688000", - "amount_int":"540000000", - "stamp":"1313864951571442" - }, - { - "price":16.89, - "amount":50.76229, - "price_int":"1689000", - "amount_int":"5076229000", - "stamp":"1315821245428177" - }, - { - "price":16.9, - "amount":39.80759007, - "price_int":"1690000", - "amount_int":"3980759007", - "stamp":"1318659301028852" - }, - { - "price":16.908, - "amount":0.94, - "price_int":"1690800", - "amount_int":"94000000", - "stamp":"1312121652913231" - }, - { - "price":16.91, - "amount":9.9, - "price_int":"1691000", - "amount_int":"990000000", - "stamp":"1312121623279518" - }, - { - "price":16.9101, - "amount":6, - "price_int":"1691010", - "amount_int":"600000000", - "stamp":"1323062967812342" - }, - { - "price":16.94, - "amount":3.7993, - "price_int":"1694000", - "amount_int":"379930000", - "stamp":"1312121668285607" - }, - { - "price":16.95, - "amount":2.9744265, - "price_int":"1695000", - "amount_int":"297442650", - "stamp":"1312125001505907" - }, - { - "price":16.9609, - "amount":0.2476, - "price_int":"1696090", - "amount_int":"24760000", - "stamp":"1312121928202261" - }, - { - "price":16.97, - "amount":20, - "price_int":"1697000", - "amount_int":"2000000000", - "stamp":"1312121575389044" - }, - { - "price":16.9743, - "amount":3.4, - "price_int":"1697430", - "amount_int":"340000000", - "stamp":"1312121787345042" - }, - { - "price":16.98, - "amount":9.12625548, - "price_int":"1698000", - "amount_int":"912625548", - "stamp":"1312121828882759" - }, - { - "price":16.9868, - "amount":1, - "price_int":"1698680", - "amount_int":"100000000", - "stamp":"1312121851642168" - }, - { - "price":16.99, - "amount":26.1, - "price_int":"1699000", - "amount_int":"2610000000", - "stamp":"1326917897287248" - }, - { - "price":16.999, - "amount":1, - "price_int":"1699900", - "amount_int":"100000000", - "stamp":"1315530690109899" - }, - { - "price":16.99999, - "amount":200, - "price_int":"1699999", - "amount_int":"20000000000", - "stamp":"1325862468171538" - }, - { - "price":17, - "amount":1990.78951795, - "price_int":"1700000", - "amount_int":"199078951795", - "stamp":"1328241766684676" - }, - { - "price":17.00999, - "amount":4.49, - "price_int":"1700999", - "amount_int":"449000000", - "stamp":"1312121543964084" - }, - { - "price":17.01, - "amount":1, - "price_int":"1701000", - "amount_int":"100000000", - "stamp":"1312121574985126" - }, - { - "price":17.0101, - "amount":7, - "price_int":"1701010", - "amount_int":"700000000", - "stamp":"1323062975244591" - }, - { - "price":17.02, - "amount":5.89, - "price_int":"1702000", - "amount_int":"589000000", - "stamp":"1312121663471293" - }, - { - "price":17.0517, - "amount":14.22674761, - "price_int":"1705170", - "amount_int":"1422674761", - "stamp":"1328644647829209" - }, - { - "price":17.08, - "amount":5, - "price_int":"1708000", - "amount_int":"500000000", - "stamp":"1312121663547694" - }, - { - "price":17.09, - "amount":59.73, - "price_int":"1709000", - "amount_int":"5973000000", - "stamp":"1312121656280410" - }, - { - "price":17.1, - "amount":25.68, - "price_int":"1710000", - "amount_int":"2568000000", - "stamp":"1312121788915879" - }, - { - "price":17.1091, - "amount":0.99961, - "price_int":"1710910", - "amount_int":"99961000", - "stamp":"1312121668136077" - }, - { - "price":17.1101, - "amount":6, - "price_int":"1711010", - "amount_int":"600000000", - "stamp":"1323062978633644" - }, - { - "price":17.14999, - "amount":0.3988, - "price_int":"1714999", - "amount_int":"39880000", - "stamp":"1309377871095700" - }, - { - "price":17.1632, - "amount":9, - "price_int":"1716320", - "amount_int":"900000000", - "stamp":"1319319106834559" - }, - { - "price":17.16431, - "amount":1, - "price_int":"1716431", - "amount_int":"100000000", - "stamp":"1312121830390270" - }, - { - "price":17.19, - "amount":15, - "price_int":"1719000", - "amount_int":"1500000000", - "stamp":"1312121572711692" - }, - { - "price":17.2, - "amount":83.43734609, - "price_int":"1720000", - "amount_int":"8343734609", - "stamp":"1312122196362009" - }, - { - "price":17.2101, - "amount":6, - "price_int":"1721010", - "amount_int":"600000000", - "stamp":"1323062982029115" - }, - { - "price":17.22, - "amount":2, - "price_int":"1722000", - "amount_int":"200000000", - "stamp":"1312121945889931" - }, - { - "price":17.2222, - "amount":1.4281, - "price_int":"1722220", - "amount_int":"142810000", - "stamp":"1312121522459857" - }, - { - "price":17.22903, - "amount":27, - "price_int":"1722903", - "amount_int":"2700000000", - "stamp":"1319322833874787" - }, - { - "price":17.23, - "amount":10, - "price_int":"1723000", - "amount_int":"1000000000", - "stamp":"1314438924384092" - }, - { - "price":17.25, - "amount":28.78765907, - "price_int":"1725000", - "amount_int":"2878765907", - "stamp":"1312121656687916" - }, - { - "price":17.2531, - "amount":6.73132289, - "price_int":"1725310", - "amount_int":"673132289", - "stamp":"1319326669183215" - }, - { - "price":17.28, - "amount":1, - "price_int":"1728000", - "amount_int":"100000000", - "stamp":"1312121642133965" - }, - { - "price":17.28213, - "amount":10, - "price_int":"1728213", - "amount_int":"1000000000", - "stamp":"1325754879927725" - }, - { - "price":17.29, - "amount":2.2, - "price_int":"1729000", - "amount_int":"220000000", - "stamp":"1312121660222801" - }, - { - "price":17.299, - "amount":10, - "price_int":"1729900", - "amount_int":"1000000000", - "stamp":"1312121543581578" - }, - { - "price":17.29931, - "amount":14.33833611, - "price_int":"1729931", - "amount_int":"1433833611", - "stamp":"1328644648208586" - }, - { - "price":17.3, - "amount":13, - "price_int":"1730000", - "amount_int":"1300000000", - "stamp":"1312121789700717" - }, - { - "price":17.3001, - "amount":0.2428, - "price_int":"1730010", - "amount_int":"24280000", - "stamp":"1312121928105626" - }, - { - "price":17.3101, - "amount":6, - "price_int":"1731010", - "amount_int":"600000000", - "stamp":"1323062985864213" - }, - { - "price":17.3333, - "amount":2.8563, - "price_int":"1733330", - "amount_int":"285630000", - "stamp":"1312121522528279" - }, - { - "price":17.38, - "amount":0.997, - "price_int":"1738000", - "amount_int":"99700000", - "stamp":"1312121551470332" - }, - { - "price":17.4, - "amount":27.29, - "price_int":"1740000", - "amount_int":"2729000000", - "stamp":"1320266461369575" - }, - { - "price":17.4101, - "amount":6, - "price_int":"1741010", - "amount_int":"600000000", - "stamp":"1323062988591259" - }, - { - "price":17.41282, - "amount":19.16017131, - "price_int":"1741282", - "amount_int":"1916017131", - "stamp":"1325810110554199" - }, - { - "price":17.41555, - "amount":0.0148106, - "price_int":"1741555", - "amount_int":"1481060", - "stamp":"1315265030451412" - }, - { - "price":17.4444, - "amount":6.398, - "price_int":"1744440", - "amount_int":"639800000", - "stamp":"1312121522567586" - }, - { - "price":17.463, - "amount":8, - "price_int":"1746300", - "amount_int":"800000000", - "stamp":"1312121542305339" - }, - { - "price":17.47, - "amount":5.971, - "price_int":"1747000", - "amount_int":"597100000", - "stamp":"1312121629182216" - }, - { - "price":17.4799, - "amount":0.969, - "price_int":"1747990", - "amount_int":"96900000", - "stamp":"1312121531959683" - }, - { - "price":17.489, - "amount":8.8, - "price_int":"1748900", - "amount_int":"880000000", - "stamp":"1312121536341317" - }, - { - "price":17.49, - "amount":195.598, - "price_int":"1749000", - "amount_int":"19559800000", - "stamp":"1312880326688771" - }, - { - "price":17.499, - "amount":1, - "price_int":"1749900", - "amount_int":"100000000", - "stamp":"1312121543988386" - }, - { - "price":17.49999, - "amount":0.37886, - "price_int":"1749999", - "amount_int":"37886000", - "stamp":"1315773655932022" - }, - { - "price":17.5, - "amount":221.62807789, - "price_int":"1750000", - "amount_int":"22162807789", - "stamp":"1327340399729053" - }, - { - "price":17.5101, - "amount":6, - "price_int":"1751010", - "amount_int":"600000000", - "stamp":"1323062991710190" - }, - { - "price":17.53, - "amount":2, - "price_int":"1753000", - "amount_int":"200000000", - "stamp":"1312121660238827" - }, - { - "price":17.53683, - "amount":1.19954, - "price_int":"1753683", - "amount_int":"119954000", - "stamp":"1312121668155665" - }, - { - "price":17.54297, - "amount":789, - "price_int":"1754297", - "amount_int":"78900000000", - "stamp":"1325811654597398" - }, - { - "price":17.54795, - "amount":14.44721497, - "price_int":"1754795", - "amount_int":"1444721497", - "stamp":"1328644648651537" - }, - { - "price":17.5556, - "amount":5.7125, - "price_int":"1755560", - "amount_int":"571250000", - "stamp":"1312121522613295" - }, - { - "price":17.56, - "amount":2.1, - "price_int":"1756000", - "amount_int":"210000000", - "stamp":"1312122212763082" - }, - { - "price":17.56755, - "amount":0.5, - "price_int":"1756755", - "amount_int":"50000000", - "stamp":"1312121623800308" - }, - { - "price":17.6, - "amount":6.46999999, - "price_int":"1760000", - "amount_int":"646999999", - "stamp":"1313947624989824" - }, - { - "price":17.6101, - "amount":6, - "price_int":"1761010", - "amount_int":"600000000", - "stamp":"1323062994729029" - }, - { - "price":17.6461, - "amount":0.238, - "price_int":"1764610", - "amount_int":"23800000", - "stamp":"1312121927995670" - }, - { - "price":17.6585, - "amount":11.326, - "price_int":"1765850", - "amount_int":"1132600000", - "stamp":"1312458699282899" - }, - { - "price":17.7, - "amount":19.075, - "price_int":"1770000", - "amount_int":"1907500000", - "stamp":"1312121775112779" - }, - { - "price":17.7101, - "amount":6, - "price_int":"1771010", - "amount_int":"600000000", - "stamp":"1323062998444158" - }, - { - "price":17.72, - "amount":2.1, - "price_int":"1772000", - "amount_int":"210000000", - "stamp":"1312121642778084" - }, - { - "price":17.73379, - "amount":10, - "price_int":"1773379", - "amount_int":"1000000000", - "stamp":"1312121671315562" - }, - { - "price":17.739, - "amount":1.3, - "price_int":"1773900", - "amount_int":"130000000", - "stamp":"1312121487516884" - }, - { - "price":17.7428, - "amount":5, - "price_int":"1774280", - "amount_int":"500000000", - "stamp":"1312121773082159" - }, - { - "price":17.746, - "amount":63, - "price_int":"1774600", - "amount_int":"6300000000", - "stamp":"1312122067059639" - }, - { - "price":17.747, - "amount":1.93, - "price_int":"1774700", - "amount_int":"193000000", - "stamp":"1312121507200315" - }, - { - "price":17.75, - "amount":20, - "price_int":"1775000", - "amount_int":"2000000000", - "stamp":"1312121777797703" - }, - { - "price":17.75279, - "amount":10, - "price_int":"1775279", - "amount_int":"1000000000", - "stamp":"1312121416639523" - }, - { - "price":17.77, - "amount":5, - "price_int":"1777000", - "amount_int":"500000000", - "stamp":"1312122196073158" - }, - { - "price":17.79758, - "amount":14.553472, - "price_int":"1779758", - "amount_int":"1455347200", - "stamp":"1328644649037317" - }, - { - "price":17.8, - "amount":494.60159044, - "price_int":"1780000", - "amount_int":"49460159044", - "stamp":"1318002054223098" - }, - { - "price":17.80999, - "amount":1, - "price_int":"1780999", - "amount_int":"100000000", - "stamp":"1315035832257639" - }, - { - "price":17.8101, - "amount":6, - "price_int":"1781010", - "amount_int":"600000000", - "stamp":"1323063001834416" - }, - { - "price":17.839, - "amount":1.2440446, - "price_int":"1783900", - "amount_int":"124404460", - "stamp":"1314282880811557" - }, - { - "price":17.85, - "amount":30, - "price_int":"1785000", - "amount_int":"3000000000", - "stamp":"1312121864546806" - }, - { - "price":17.86, - "amount":1, - "price_int":"1786000", - "amount_int":"100000000", - "stamp":"1313002804908832" - }, - { - "price":17.86055, - "amount":2, - "price_int":"1786055", - "amount_int":"200000000", - "stamp":"1312121621350552" - }, - { - "price":17.88, - "amount":1, - "price_int":"1788000", - "amount_int":"100000000", - "stamp":"1312725847430597" - }, - { - "price":17.888, - "amount":3.592, - "price_int":"1788800", - "amount_int":"359200000", - "stamp":"1312638593293208" - }, - { - "price":17.889, - "amount":0.22459232, - "price_int":"1788900", - "amount_int":"22459232", - "stamp":"1312121874752526" - }, - { - "price":17.89, - "amount":54.883, - "price_int":"1789000", - "amount_int":"5488300000", - "stamp":"1312121520189091" - }, - { - "price":17.9, - "amount":34.052, - "price_int":"1790000", - "amount_int":"3405200000", - "stamp":"1312121779268556" - }, - { - "price":17.9101, - "amount":6, - "price_int":"1791010", - "amount_int":"600000000", - "stamp":"1323063005391524" - }, - { - "price":17.929, - "amount":4.21745472, - "price_int":"1792900", - "amount_int":"421745472", - "stamp":"1309713530117700" - }, - { - "price":17.97, - "amount":4, - "price_int":"1797000", - "amount_int":"400000000", - "stamp":"1312121780277429" - }, - { - "price":17.97525, - "amount":1.39946, - "price_int":"1797525", - "amount_int":"139946000", - "stamp":"1312121668175909" - }, - { - "price":17.98, - "amount":2, - "price_int":"1798000", - "amount_int":"200000000", - "stamp":"1312121799111053" - }, - { - "price":17.989, - "amount":5, - "price_int":"1798900", - "amount_int":"500000000", - "stamp":"1312121542895833" - }, - { - "price":17.99, - "amount":19.079, - "price_int":"1799000", - "amount_int":"1907900000", - "stamp":"1326917903850737" - }, - { - "price":17.999, - "amount":10.2333, - "price_int":"1799900", - "amount_int":"1023330000", - "stamp":"1312121914873504" - }, - { - "price":17.9997, - "amount":1, - "price_int":"1799970", - "amount_int":"100000000", - "stamp":"1315530690245030" - }, - { - "price":17.99999, - "amount":200, - "price_int":"1799999", - "amount_int":"20000000000", - "stamp":"1325862478938372" - }, - { - "price":18, - "amount":2215.52523824, - "price_int":"1800000", - "amount_int":"221552523824", - "stamp":"1328241769299781" - }, - { - "price":18.01, - "amount":2, - "price_int":"1801000", - "amount_int":"200000000", - "stamp":"1312121935704536" - }, - { - "price":18.0101, - "amount":6, - "price_int":"1801010", - "amount_int":"600000000", - "stamp":"1323063011655237" - }, - { - "price":18.0482, - "amount":14.65719166, - "price_int":"1804820", - "amount_int":"1465719166", - "stamp":"1328644649403096" - }, - { - "price":18.1, - "amount":9.85, - "price_int":"1810000", - "amount_int":"985000000", - "stamp":"1312121442558529" - }, - { - "price":18.1101, - "amount":6, - "price_int":"1811010", - "amount_int":"600000000", - "stamp":"1323063015335882" - }, - { - "price":18.122, - "amount":1.149541, - "price_int":"1812200", - "amount_int":"114954100", - "stamp":"1312121543738516" - }, - { - "price":18.19, - "amount":1, - "price_int":"1819000", - "amount_int":"100000000", - "stamp":"1312121414427250" - }, - { - "price":18.2, - "amount":8, - "price_int":"1820000", - "amount_int":"800000000", - "stamp":"1312121671349601" - }, - { - "price":18.2101, - "amount":6, - "price_int":"1821010", - "amount_int":"600000000", - "stamp":"1323063018331910" - }, - { - "price":18.2132, - "amount":75, - "price_int":"1821320", - "amount_int":"7500000000", - "stamp":"1312121796979569" - }, - { - "price":18.23, - "amount":250, - "price_int":"1823000", - "amount_int":"25000000000", - "stamp":"1312121941792698" - }, - { - "price":18.29, - "amount":18.28954183, - "price_int":"1829000", - "amount_int":"1828954183", - "stamp":"1314282885299843" - }, - { - "price":18.29979, - "amount":14.7584552, - "price_int":"1829979", - "amount_int":"1475845520", - "stamp":"1328644649780441" - }, - { - "price":18.3, - "amount":90, - "price_int":"1830000", - "amount_int":"9000000000", - "stamp":"1312121795885557" - }, - { - "price":18.3101, - "amount":6, - "price_int":"1831010", - "amount_int":"600000000", - "stamp":"1323063021199703" - }, - { - "price":18.3333, - "amount":2.8563, - "price_int":"1833330", - "amount_int":"285630000", - "stamp":"1312121522636010" - }, - { - "price":18.3589, - "amount":0.2288, - "price_int":"1835890", - "amount_int":"22880000", - "stamp":"1312121915173470" - }, - { - "price":18.4, - "amount":30, - "price_int":"1840000", - "amount_int":"3000000000", - "stamp":"1312121976966756" - }, - { - "price":18.4101, - "amount":6, - "price_int":"1841010", - "amount_int":"600000000", - "stamp":"1323063024104592" - }, - { - "price":18.42, - "amount":11, - "price_int":"1842000", - "amount_int":"1100000000", - "stamp":"1312122196322925" - }, - { - "price":18.42463, - "amount":1.59938, - "price_int":"1842463", - "amount_int":"159938000", - "stamp":"1312121668207221" - }, - { - "price":18.45, - "amount":4, - "price_int":"1845000", - "amount_int":"400000000", - "stamp":"1316224741091274" - }, - { - "price":18.457, - "amount":5, - "price_int":"1845700", - "amount_int":"500000000", - "stamp":"1312121773200311" - }, - { - "price":18.47, - "amount":2.71, - "price_int":"1847000", - "amount_int":"271000000", - "stamp":"1312121429465708" - }, - { - "price":18.49, - "amount":51.676, - "price_int":"1849000", - "amount_int":"5167600000", - "stamp":"1312880326768475" - }, - { - "price":18.499, - "amount":1, - "price_int":"1849900", - "amount_int":"100000000", - "stamp":"1312121374533243" - }, - { - "price":18.5, - "amount":388.637, - "price_int":"1850000", - "amount_int":"38863700000", - "stamp":"1315781534348645" - }, - { - "price":18.50999, - "amount":2, - "price_int":"1850999", - "amount_int":"200000000", - "stamp":"1315035832310110" - }, - { - "price":18.5101, - "amount":6, - "price_int":"1851010", - "amount_int":"600000000", - "stamp":"1323063026895073" - }, - { - "price":18.55233, - "amount":14.85734078, - "price_int":"1855233", - "amount_int":"1485734078", - "stamp":"1328644650207889" - }, - { - "price":18.5556, - "amount":1.4281, - "price_int":"1855560", - "amount_int":"142810000", - "stamp":"1312121522676266" - }, - { - "price":18.6, - "amount":43.703, - "price_int":"1860000", - "amount_int":"4370300000", - "stamp":"1312121539259396" - }, - { - "price":18.6101, - "amount":6, - "price_int":"1861010", - "amount_int":"600000000", - "stamp":"1323063030235776" - }, - { - "price":18.61899, - "amount":1, - "price_int":"1861899", - "amount_int":"100000000", - "stamp":"1312122059750061" - }, - { - "price":18.7101, - "amount":6, - "price_int":"1871010", - "amount_int":"600000000", - "stamp":"1323063033396947" - }, - { - "price":18.7261, - "amount":0.2243, - "price_int":"1872610", - "amount_int":"22430000", - "stamp":"1312121915245831" - }, - { - "price":18.75, - "amount":9.51948, - "price_int":"1875000", - "amount_int":"951948000", - "stamp":"1312121487907551" - }, - { - "price":18.7778, - "amount":0.7152, - "price_int":"1877780", - "amount_int":"71520000", - "stamp":"1312121526114206" - }, - { - "price":18.78, - "amount":600, - "price_int":"1878000", - "amount_int":"60000000000", - "stamp":"1314762592662960" - }, - { - "price":18.8, - "amount":12.5, - "price_int":"1880000", - "amount_int":"1250000000", - "stamp":"1318002054183153" - }, - { - "price":18.80581, - "amount":14.95392359, - "price_int":"1880581", - "amount_int":"1495392359", - "stamp":"1328644650614782" - }, - { - "price":18.81, - "amount":2.22, - "price_int":"1881000", - "amount_int":"222000000", - "stamp":"1312121775634024" - }, - { - "price":18.8101, - "amount":6, - "price_int":"1881010", - "amount_int":"600000000", - "stamp":"1323063036797291" - }, - { - "price":18.84458, - "amount":3, - "price_int":"1884458", - "amount_int":"300000000", - "stamp":"1314636355089989" - }, - { - "price":18.8799, - "amount":2.354, - "price_int":"1887990", - "amount_int":"235400000", - "stamp":"1312121343953866" - }, - { - "price":18.88524, - "amount":1.7993, - "price_int":"1888524", - "amount_int":"179930000", - "stamp":"1312121668241056" - }, - { - "price":18.89, - "amount":12, - "price_int":"1889000", - "amount_int":"1200000000", - "stamp":"1312122080722650" - }, - { - "price":18.9, - "amount":238.59972122, - "price_int":"1890000", - "amount_int":"23859972122", - "stamp":"1326951767899279" - }, - { - "price":18.9101, - "amount":6, - "price_int":"1891010", - "amount_int":"600000000", - "stamp":"1323063039912677" - }, - { - "price":18.92, - "amount":1, - "price_int":"1892000", - "amount_int":"100000000", - "stamp":"1312121414099697" - }, - { - "price":18.95, - "amount":15.901, - "price_int":"1895000", - "amount_int":"1590100000", - "stamp":"1312390143419399" - }, - { - "price":18.97, - "amount":10, - "price_int":"1897000", - "amount_int":"1000000000", - "stamp":"1312121551375900" - }, - { - "price":18.974, - "amount":1.5, - "price_int":"1897400", - "amount_int":"150000000", - "stamp":"1312121336757336" - }, - { - "price":18.98, - "amount":4, - "price_int":"1898000", - "amount_int":"400000000", - "stamp":"1312121373847287" - }, - { - "price":18.99, - "amount":18, - "price_int":"1899000", - "amount_int":"1800000000", - "stamp":"1326917915788481" - }, - { - "price":18.9969, - "amount":0.994, - "price_int":"1899690", - "amount_int":"99400000", - "stamp":"1312121838978928" - }, - { - "price":18.999, - "amount":19.45, - "price_int":"1899900", - "amount_int":"1945000000", - "stamp":"1312121493374923" - }, - { - "price":18.9999, - "amount":2.099906, - "price_int":"1899990", - "amount_int":"209990600", - "stamp":"1312121640875112" - }, - { - "price":18.99999, - "amount":200, - "price_int":"1899999", - "amount_int":"20000000000", - "stamp":"1325862496284197" - }, - { - "price":19, - "amount":631.1445, - "price_int":"1900000", - "amount_int":"63114450000", - "stamp":"1326315795949957" - }, - { - "price":19.0101, - "amount":6, - "price_int":"1901010", - "amount_int":"600000000", - "stamp":"1323063048701936" - }, - { - "price":19.06022, - "amount":15.04827596, - "price_int":"1906022", - "amount_int":"1504827596", - "stamp":"1328644651032557" - }, - { - "price":19.1007, - "amount":0.2199, - "price_int":"1910070", - "amount_int":"21990000", - "stamp":"1312121915335734" - }, - { - "price":19.1101, - "amount":6, - "price_int":"1911010", - "amount_int":"600000000", - "stamp":"1323063051656631" - }, - { - "price":19.18315, - "amount":3, - "price_int":"1918315", - "amount_int":"300000000", - "stamp":"1319281695733437" - }, - { - "price":19.19, - "amount":100, - "price_int":"1919000", - "amount_int":"10000000000", - "stamp":"1319915702671153" - }, - { - "price":19.2, - "amount":7.95, - "price_int":"1920000", - "amount_int":"795000000", - "stamp":"1312121336796004" - }, - { - "price":19.20237, - "amount":103.49999999, - "price_int":"1920237", - "amount_int":"10349999999", - "stamp":"1315813859678142" - }, - { - "price":19.2101, - "amount":6, - "price_int":"1921010", - "amount_int":"600000000", - "stamp":"1323063054744044" - }, - { - "price":19.231, - "amount":52, - "price_int":"1923100", - "amount_int":"5200000000", - "stamp":"1326148298959545" - }, - { - "price":19.25, - "amount":30, - "price_int":"1925000", - "amount_int":"3000000000", - "stamp":"1312121428884448" - }, - { - "price":19.3, - "amount":6.16100555, - "price_int":"1930000", - "amount_int":"616100555", - "stamp":"1312121629564067" - }, - { - "price":19.3101, - "amount":6, - "price_int":"1931010", - "amount_int":"600000000", - "stamp":"1323063057684255" - }, - { - "price":19.31554, - "amount":15.14046754, - "price_int":"1931554", - "amount_int":"1514046754", - "stamp":"1328644651436958" - }, - { - "price":19.35, - "amount":1, - "price_int":"1935000", - "amount_int":"100000000", - "stamp":"1316224741135686" - }, - { - "price":19.35738, - "amount":1.99923, - "price_int":"1935738", - "amount_int":"199923000", - "stamp":"1312121668257961" - }, - { - "price":19.4, - "amount":7.797, - "price_int":"1940000", - "amount_int":"779700000", - "stamp":"1312121479120937" - }, - { - "price":19.40999, - "amount":2.2, - "price_int":"1940999", - "amount_int":"220000000", - "stamp":"1312121390569175" - }, - { - "price":19.4101, - "amount":6, - "price_int":"1941010", - "amount_int":"600000000", - "stamp":"1323063060630705" - }, - { - "price":19.42, - "amount":4, - "price_int":"1942000", - "amount_int":"400000000", - "stamp":"1312122197027883" - }, - { - "price":19.43, - "amount":4, - "price_int":"1943000", - "amount_int":"400000000", - "stamp":"1315585525601695" - }, - { - "price":19.44, - "amount":1, - "price_int":"1944000", - "amount_int":"100000000", - "stamp":"1312121551357511" - }, - { - "price":19.4826, - "amount":0.2156, - "price_int":"1948260", - "amount_int":"21560000", - "stamp":"1312121915406329" - }, - { - "price":19.49, - "amount":2.994, - "price_int":"1949000", - "amount_int":"299400000", - "stamp":"1312121953350741" - }, - { - "price":19.49231, - "amount":12, - "price_int":"1949231", - "amount_int":"1200000000", - "stamp":"1322795006363358" - }, - { - "price":19.499, - "amount":1, - "price_int":"1949900", - "amount_int":"100000000", - "stamp":"1312121374584967" - }, - { - "price":19.5, - "amount":95.5, - "price_int":"1950000", - "amount_int":"9550000000", - "stamp":"1313378087179522" - }, - { - "price":19.5101, - "amount":6, - "price_int":"1951010", - "amount_int":"600000000", - "stamp":"1323063063951719" - }, - { - "price":19.512, - "amount":20.5, - "price_int":"1951200", - "amount_int":"2050000000", - "stamp":"1313866444836716" - }, - { - "price":19.53, - "amount":24.298376, - "price_int":"1953000", - "amount_int":"2429837600", - "stamp":"1326002422231340" - }, - { - "price":19.54, - "amount":4.106, - "price_int":"1954000", - "amount_int":"410600000", - "stamp":"1312133474398160" - }, - { - "price":19.55, - "amount":1.968, - "price_int":"1955000", - "amount_int":"196800000", - "stamp":"1312121788178581" - }, - { - "price":19.57, - "amount":3.321334, - "price_int":"1957000", - "amount_int":"332133400", - "stamp":"1324682576719010" - }, - { - "price":19.57176, - "amount":15.23056531, - "price_int":"1957176", - "amount_int":"1523056531", - "stamp":"1328644651751835" - }, - { - "price":19.6101, - "amount":6, - "price_int":"1961010", - "amount_int":"600000000", - "stamp":"1323063067010985" - }, - { - "price":19.6369, - "amount":3.16, - "price_int":"1963690", - "amount_int":"316000000", - "stamp":"1312121839065661" - }, - { - "price":19.7, - "amount":8.86444022, - "price_int":"1970000", - "amount_int":"886444022", - "stamp":"1312121838594764" - }, - { - "price":19.70409, - "amount":10, - "price_int":"1970409", - "amount_int":"1000000000", - "stamp":"1312121774278544" - }, - { - "price":19.7101, - "amount":6, - "price_int":"1971010", - "amount_int":"600000000", - "stamp":"1323063070169093" - }, - { - "price":19.749, - "amount":1.876, - "price_int":"1974900", - "amount_int":"187600000", - "stamp":"1312121441044338" - }, - { - "price":19.75, - "amount":11.49285694, - "price_int":"1975000", - "amount_int":"1149285694", - "stamp":"1312121668345541" - }, - { - "price":19.75279, - "amount":10, - "price_int":"1975279", - "amount_int":"1000000000", - "stamp":"1312121416767842" - }, - { - "price":19.78, - "amount":15.143, - "price_int":"1978000", - "amount_int":"1514300000", - "stamp":"1312121552813400" - }, - { - "price":19.7857, - "amount":5, - "price_int":"1978570", - "amount_int":"500000000", - "stamp":"1312121773219669" - }, - { - "price":19.79, - "amount":5, - "price_int":"1979000", - "amount_int":"500000000", - "stamp":"1312121773959220" - }, - { - "price":19.8, - "amount":160.67223563, - "price_int":"1980000", - "amount_int":"16067223563", - "stamp":"1325453096743324" - }, - { - "price":19.8101, - "amount":6, - "price_int":"1981010", - "amount_int":"600000000", - "stamp":"1323063074656469" - }, - { - "price":19.82886, - "amount":15.31863378, - "price_int":"1982886", - "amount_int":"1531863378", - "stamp":"1328644652060747" - }, - { - "price":19.84245, - "amount":10, - "price_int":"1984245", - "amount_int":"1000000000", - "stamp":"1326575279236279" - }, - { - "price":19.849, - "amount":25, - "price_int":"1984900", - "amount_int":"2500000000", - "stamp":"1312121797241291" - }, - { - "price":19.8501, - "amount":99.761, - "price_int":"1985010", - "amount_int":"9976100000", - "stamp":"1312122183535361" - }, - { - "price":19.87, - "amount":4, - "price_int":"1987000", - "amount_int":"400000000", - "stamp":"1312121822939748" - }, - { - "price":19.8723, - "amount":0.2113, - "price_int":"1987230", - "amount_int":"21130000", - "stamp":"1312121914796138" - }, - { - "price":19.87289, - "amount":1.5, - "price_int":"1987289", - "amount_int":"150000000", - "stamp":"1312122185324435" - }, - { - "price":19.89, - "amount":5.73, - "price_int":"1989000", - "amount_int":"573000000", - "stamp":"1314905286001208" - }, - { - "price":19.9, - "amount":213.19651, - "price_int":"1990000", - "amount_int":"21319651000", - "stamp":"1323391275583231" - }, - { - "price":19.91, - "amount":2.879, - "price_int":"1991000", - "amount_int":"287900000", - "stamp":"1312121665484552" - }, - { - "price":19.9101, - "amount":6, - "price_int":"1991010", - "amount_int":"600000000", - "stamp":"1323063078199201" - }, - { - "price":19.91079, - "amount":1, - "price_int":"1991079", - "amount_int":"100000000", - "stamp":"1312121544971701" - }, - { - "price":19.92, - "amount":7.97521272, - "price_int":"1992000", - "amount_int":"797521272", - "stamp":"1314819704817545" - }, - { - "price":19.95, - "amount":316.699, - "price_int":"1995000", - "amount_int":"31669900000", - "stamp":"1312122081383879" - }, - { - "price":19.9567, - "amount":5, - "price_int":"1995670", - "amount_int":"500000000", - "stamp":"1312121773245511" - }, - { - "price":19.98, - "amount":9.05320942, - "price_int":"1998000", - "amount_int":"905320942", - "stamp":"1315282944091749" - }, - { - "price":19.9898, - "amount":25, - "price_int":"1998980", - "amount_int":"2500000000", - "stamp":"1325848008615388" - }, - { - "price":19.99, - "amount":48.90254, - "price_int":"1999000", - "amount_int":"4890254000", - "stamp":"1327941290444946" - }, - { - "price":19.995, - "amount":2.5, - "price_int":"1999500", - "amount_int":"250000000", - "stamp":"1312121480309999" - }, - { - "price":19.998, - "amount":1.263, - "price_int":"1999800", - "amount_int":"126300000", - "stamp":"1312121663611716" - }, - { - "price":19.999, - "amount":21.775346, - "price_int":"1999900", - "amount_int":"2177534600", - "stamp":"1312122059500590" - }, - { - "price":19.9999, - "amount":1, - "price_int":"1999990", - "amount_int":"100000000", - "stamp":"1314297314793001" - }, - { - "price":19.99992, - "amount":12, - "price_int":"1999992", - "amount_int":"1200000000", - "stamp":"1315871191557010" - }, - { - "price":19.99999, - "amount":300, - "price_int":"1999999", - "amount_int":"30000000000", - "stamp":"1326656701024363" - }, - { - "price":20, - "amount":2540.9991518, - "price_int":"2000000", - "amount_int":"254099915180", - "stamp":"1328283592488050" - }, - { - "price":20.01, - "amount":12, - "price_int":"2001000", - "amount_int":"1200000000", - "stamp":"1312121935731531" - }, - { - "price":20.0101, - "amount":6, - "price_int":"2001010", - "amount_int":"600000000", - "stamp":"1323063088105930" - }, - { - "price":20.05208, - "amount":14, - "price_int":"2005208", - "amount_int":"1400000000", - "stamp":"1327270586405115" - }, - { - "price":20.08683, - "amount":15.40473505, - "price_int":"2008683", - "amount_int":"1540473505", - "stamp":"1328644652458976" - }, - { - "price":20.1, - "amount":1, - "price_int":"2010000", - "amount_int":"100000000", - "stamp":"1312121642484868" - }, - { - "price":20.1101, - "amount":5, - "price_int":"2011010", - "amount_int":"500000000", - "stamp":"1323063095554681" - }, - { - "price":20.12, - "amount":51.86, - "price_int":"2012000", - "amount_int":"5186000000", - "stamp":"1318888652391459" - }, - { - "price":20.13099, - "amount":8.88, - "price_int":"2013099", - "amount_int":"888000000", - "stamp":"1312121850466110" - }, - { - "price":20.2101, - "amount":5, - "price_int":"2021010", - "amount_int":"500000000", - "stamp":"1323063100305270" - }, - { - "price":20.25, - "amount":0.984, - "price_int":"2025000", - "amount_int":"98400000", - "stamp":"1316224741176508" - }, - { - "price":20.25009, - "amount":1, - "price_int":"2025009", - "amount_int":"100000000", - "stamp":"1312121990303115" - }, - { - "price":20.2697, - "amount":0.2072, - "price_int":"2026970", - "amount_int":"20720000", - "stamp":"1312121915484190" - }, - { - "price":20.286, - "amount":1.491, - "price_int":"2028600", - "amount_int":"149100000", - "stamp":"1312121839018521" - }, - { - "price":20.3101, - "amount":5, - "price_int":"2031010", - "amount_int":"500000000", - "stamp":"1323063103259541" - }, - { - "price":20.4101, - "amount":5, - "price_int":"2041010", - "amount_int":"500000000", - "stamp":"1323063106317119" - }, - { - "price":20.44999, - "amount":7, - "price_int":"2044999", - "amount_int":"700000000", - "stamp":"1312121392391460" - }, - { - "price":20.499, - "amount":1, - "price_int":"2049900", - "amount_int":"100000000", - "stamp":"1312121668949723" - }, - { - "price":20.5, - "amount":45.000042, - "price_int":"2050000", - "amount_int":"4500004200", - "stamp":"1325895398697320" - }, - { - "price":20.5101, - "amount":5, - "price_int":"2051010", - "amount_int":"500000000", - "stamp":"1323063109601049" - }, - { - "price":20.6101, - "amount":5, - "price_int":"2061010", - "amount_int":"500000000", - "stamp":"1323063112661383" - }, - { - "price":20.61899, - "amount":1, - "price_int":"2061899", - "amount_int":"100000000", - "stamp":"1312122059778044" - }, - { - "price":20.6751, - "amount":0.2031, - "price_int":"2067510", - "amount_int":"20310000", - "stamp":"1312121915557286" - }, - { - "price":20.69, - "amount":1, - "price_int":"2069000", - "amount_int":"100000000", - "stamp":"1312121415381483" - }, - { - "price":20.7101, - "amount":5, - "price_int":"2071010", - "amount_int":"500000000", - "stamp":"1323063116022647" - }, - { - "price":20.8101, - "amount":5, - "price_int":"2081010", - "amount_int":"500000000", - "stamp":"1323063119581304" - }, - { - "price":20.83, - "amount":2.2, - "price_int":"2083000", - "amount_int":"220000000", - "stamp":"1312121622721635" - }, - { - "price":20.889, - "amount":2, - "price_int":"2088900", - "amount_int":"200000000", - "stamp":"1312121337157388" - }, - { - "price":20.89, - "amount":1.988, - "price_int":"2089000", - "amount_int":"198800000", - "stamp":"1312121659739303" - }, - { - "price":20.9, - "amount":10, - "price_int":"2090000", - "amount_int":"1000000000", - "stamp":"1312121508937945" - }, - { - "price":20.9101, - "amount":5, - "price_int":"2091010", - "amount_int":"500000000", - "stamp":"1323063124086305" - }, - { - "price":20.92, - "amount":5, - "price_int":"2092000", - "amount_int":"500000000", - "stamp":"1312121417361708" - }, - { - "price":20.99, - "amount":12.1, - "price_int":"2099000", - "amount_int":"1210000000", - "stamp":"1326917925209059" - }, - { - "price":20.99999, - "amount":200, - "price_int":"2099999", - "amount_int":"20000000000", - "stamp":"1325862526358226" - }, - { - "price":21, - "amount":359.72622122, - "price_int":"2100000", - "amount_int":"35972622122", - "stamp":"1328642866375106" - }, - { - "price":21.0101, - "amount":5, - "price_int":"2101010", - "amount_int":"500000000", - "stamp":"1323063130731692" - }, - { - "price":21.0886, - "amount":0.2, - "price_int":"2108860", - "amount_int":"20000000", - "stamp":"1312121915636103" - }, - { - "price":21.1101, - "amount":5, - "price_int":"2111010", - "amount_int":"500000000", - "stamp":"1323063176953463" - }, - { - "price":21.126, - "amount":0.473, - "price_int":"2112600", - "amount_int":"47300000", - "stamp":"1327606323365056" - }, - { - "price":21.2101, - "amount":5, - "price_int":"2121010", - "amount_int":"500000000", - "stamp":"1323063179891984" - }, - { - "price":21.25, - "amount":38, - "price_int":"2125000", - "amount_int":"3800000000", - "stamp":"1312121428929845" - }, - { - "price":21.28, - "amount":1, - "price_int":"2128000", - "amount_int":"100000000", - "stamp":"1312121435676601" - }, - { - "price":21.3, - "amount":2, - "price_int":"2130000", - "amount_int":"200000000", - "stamp":"1312121476503941" - }, - { - "price":21.3101, - "amount":5, - "price_int":"2131010", - "amount_int":"500000000", - "stamp":"1323063183867818" - }, - { - "price":21.324, - "amount":3, - "price_int":"2132400", - "amount_int":"300000000", - "stamp":"1315753788102388" - }, - { - "price":21.38888, - "amount":10, - "price_int":"2138888", - "amount_int":"1000000000", - "stamp":"1328559144275709" - }, - { - "price":21.39, - "amount":20.696, - "price_int":"2139000", - "amount_int":"2069600000", - "stamp":"1312121436087825" - }, - { - "price":21.4101, - "amount":5, - "price_int":"2141010", - "amount_int":"500000000", - "stamp":"1323063187261535" - }, - { - "price":21.499, - "amount":1, - "price_int":"2149900", - "amount_int":"100000000", - "stamp":"1312121668968671" - }, - { - "price":21.5, - "amount":23, - "price_int":"2150000", - "amount_int":"2300000000", - "stamp":"1316201948938593" - }, - { - "price":21.5101, - "amount":5, - "price_int":"2151010", - "amount_int":"500000000", - "stamp":"1323063190087514" - }, - { - "price":21.5104, - "amount":0.2, - "price_int":"2151040", - "amount_int":"20000000", - "stamp":"1312121915704134" - }, - { - "price":21.6101, - "amount":5, - "price_int":"2161010", - "amount_int":"500000000", - "stamp":"1323063193464000" - }, - { - "price":21.7101, - "amount":5, - "price_int":"2171010", - "amount_int":"500000000", - "stamp":"1323063197299987" - }, - { - "price":21.74, - "amount":15, - "price_int":"2174000", - "amount_int":"1500000000", - "stamp":"1312121440346637" - }, - { - "price":21.76269, - "amount":4, - "price_int":"2176269", - "amount_int":"400000000", - "stamp":"1326051113750587" - }, - { - "price":21.8101, - "amount":5, - "price_int":"2181010", - "amount_int":"500000000", - "stamp":"1323063200454310" - }, - { - "price":21.9101, - "amount":5, - "price_int":"2191010", - "amount_int":"500000000", - "stamp":"1323063203766600" - }, - { - "price":21.94, - "amount":20, - "price_int":"2194000", - "amount_int":"2000000000", - "stamp":"1312121508898674" - }, - { - "price":21.9406, - "amount":0.2, - "price_int":"2194060", - "amount_int":"20000000", - "stamp":"1312121914720228" - }, - { - "price":21.99, - "amount":10.1, - "price_int":"2199000", - "amount_int":"1010000000", - "stamp":"1326917941710675" - }, - { - "price":21.99999, - "amount":38.30860271, - "price_int":"2199999", - "amount_int":"3830860271", - "stamp":"1325862540484418" - }, - { - "price":22, - "amount":296.57599999, - "price_int":"2200000", - "amount_int":"29657599999", - "stamp":"1326662325702084" - }, - { - "price":22.0101, - "amount":5, - "price_int":"2201010", - "amount_int":"500000000", - "stamp":"1323063211112681" - }, - { - "price":22.1, - "amount":1, - "price_int":"2210000", - "amount_int":"100000000", - "stamp":"1314738014259532" - }, - { - "price":22.1101, - "amount":5, - "price_int":"2211010", - "amount_int":"500000000", - "stamp":"1323063213984723" - }, - { - "price":22.15, - "amount":2, - "price_int":"2215000", - "amount_int":"200000000", - "stamp":"1312121953587353" - }, - { - "price":22.2, - "amount":10, - "price_int":"2220000", - "amount_int":"1000000000", - "stamp":"1312121480662595" - }, - { - "price":22.2101, - "amount":5, - "price_int":"2221010", - "amount_int":"500000000", - "stamp":"1323063216689975" - }, - { - "price":22.22, - "amount":1, - "price_int":"2222000", - "amount_int":"100000000", - "stamp":"1313378183885577" - }, - { - "price":22.3101, - "amount":5, - "price_int":"2231010", - "amount_int":"500000000", - "stamp":"1323063219397091" - }, - { - "price":22.35, - "amount":53.13244604, - "price_int":"2235000", - "amount_int":"5313244604", - "stamp":"1310394459557662" - }, - { - "price":22.3794, - "amount":0.2, - "price_int":"2237940", - "amount_int":"20000000", - "stamp":"1312121915778876" - }, - { - "price":22.40277, - "amount":2.38, - "price_int":"2240277", - "amount_int":"238000000", - "stamp":"1326399594220641" - }, - { - "price":22.4101, - "amount":5, - "price_int":"2241010", - "amount_int":"500000000", - "stamp":"1323063222185056" - }, - { - "price":22.44, - "amount":15, - "price_int":"2244000", - "amount_int":"1500000000", - "stamp":"1312121440105926" - }, - { - "price":22.5, - "amount":144, - "price_int":"2250000", - "amount_int":"14400000000", - "stamp":"1318190969741322" - }, - { - "price":22.5101, - "amount":5, - "price_int":"2251010", - "amount_int":"500000000", - "stamp":"1323063225291610" - }, - { - "price":22.6101, - "amount":5, - "price_int":"2261010", - "amount_int":"500000000", - "stamp":"1323063232834933" - }, - { - "price":22.61899, - "amount":1, - "price_int":"2261899", - "amount_int":"100000000", - "stamp":"1312122059804564" - }, - { - "price":22.7101, - "amount":5, - "price_int":"2271010", - "amount_int":"500000000", - "stamp":"1323063236569628" - }, - { - "price":22.75, - "amount":125, - "price_int":"2275000", - "amount_int":"12500000000", - "stamp":"1325735079252720" - }, - { - "price":22.7698, - "amount":5, - "price_int":"2276980", - "amount_int":"500000000", - "stamp":"1325211065560571" - }, - { - "price":22.79977, - "amount":0.165, - "price_int":"2279977", - "amount_int":"16500000", - "stamp":"1328453330946814" - }, - { - "price":22.8101, - "amount":5, - "price_int":"2281010", - "amount_int":"500000000", - "stamp":"1323063239620076" - }, - { - "price":22.827, - "amount":0.2, - "price_int":"2282700", - "amount_int":"20000000", - "stamp":"1312121915848976" - }, - { - "price":22.8799, - "amount":2.01, - "price_int":"2287990", - "amount_int":"201000000", - "stamp":"1312121412704999" - }, - { - "price":22.91, - "amount":3, - "price_int":"2291000", - "amount_int":"300000000", - "stamp":"1312121425530499" - }, - { - "price":22.9101, - "amount":5, - "price_int":"2291010", - "amount_int":"500000000", - "stamp":"1323063243644760" - }, - { - "price":22.95, - "amount":5, - "price_int":"2295000", - "amount_int":"500000000", - "stamp":"1312121425213527" - }, - { - "price":22.99, - "amount":112.439, - "price_int":"2299000", - "amount_int":"11243900000", - "stamp":"1326917946884417" - }, - { - "price":23, - "amount":37.81, - "price_int":"2300000", - "amount_int":"3781000000", - "stamp":"1325430868562468" - }, - { - "price":23.0101, - "amount":5, - "price_int":"2301010", - "amount_int":"500000000", - "stamp":"1323063266147952" - }, - { - "price":23.1101, - "amount":5, - "price_int":"2311010", - "amount_int":"500000000", - "stamp":"1323063269275246" - }, - { - "price":23.15999, - "amount":11, - "price_int":"2315999", - "amount_int":"1100000000", - "stamp":"1312121478912749" - }, - { - "price":23.21, - "amount":7.602, - "price_int":"2321000", - "amount_int":"760200000", - "stamp":"1312121364719293" - }, - { - "price":23.2101, - "amount":5, - "price_int":"2321010", - "amount_int":"500000000", - "stamp":"1323063272285923" - }, - { - "price":23.2835, - "amount":0.2, - "price_int":"2328350", - "amount_int":"20000000", - "stamp":"1312121915917884" - }, - { - "price":23.3101, - "amount":5, - "price_int":"2331010", - "amount_int":"500000000", - "stamp":"1323063274889719" - }, - { - "price":23.4101, - "amount":5, - "price_int":"2341010", - "amount_int":"500000000", - "stamp":"1323063277560181" - }, - { - "price":23.439, - "amount":2, - "price_int":"2343900", - "amount_int":"200000000", - "stamp":"1312121337191927" - }, - { - "price":23.5, - "amount":2, - "price_int":"2350000", - "amount_int":"200000000", - "stamp":"1309114418994500" - }, - { - "price":23.5101, - "amount":5, - "price_int":"2351010", - "amount_int":"500000000", - "stamp":"1323063281076845" - }, - { - "price":23.6101, - "amount":5, - "price_int":"2361010", - "amount_int":"500000000", - "stamp":"1323063284437502" - }, - { - "price":23.674, - "amount":5, - "price_int":"2367400", - "amount_int":"500000000", - "stamp":"1312121773285891" - }, - { - "price":23.7101, - "amount":5, - "price_int":"2371010", - "amount_int":"500000000", - "stamp":"1323063287901876" - }, - { - "price":23.7492, - "amount":0.2, - "price_int":"2374920", - "amount_int":"20000000", - "stamp":"1312121915993370" - }, - { - "price":23.8, - "amount":2, - "price_int":"2380000", - "amount_int":"200000000", - "stamp":"1312121476048334" - }, - { - "price":23.8101, - "amount":5, - "price_int":"2381010", - "amount_int":"500000000", - "stamp":"1323063292984046" - }, - { - "price":23.9, - "amount":4.321, - "price_int":"2390000", - "amount_int":"432100000", - "stamp":"1312121442123772" - }, - { - "price":23.9101, - "amount":5, - "price_int":"2391010", - "amount_int":"500000000", - "stamp":"1323063297193253" - }, - { - "price":23.95, - "amount":1, - "price_int":"2395000", - "amount_int":"100000000", - "stamp":"1312121344456620" - }, - { - "price":23.96, - "amount":5.318, - "price_int":"2396000", - "amount_int":"531800000", - "stamp":"1314297303065559" - }, - { - "price":23.98, - "amount":50, - "price_int":"2398000", - "amount_int":"5000000000", - "stamp":"1312121641504985" - }, - { - "price":23.98976, - "amount":5, - "price_int":"2398976", - "amount_int":"500000000", - "stamp":"1325211386469310" - }, - { - "price":23.99, - "amount":18.11, - "price_int":"2399000", - "amount_int":"1811000000", - "stamp":"1312121425478131" - }, - { - "price":24, - "amount":339.35, - "price_int":"2400000", - "amount_int":"33935000000", - "stamp":"1326649115903470" - }, - { - "price":24.19976, - "amount":416, - "price_int":"2419976", - "amount_int":"41600000000", - "stamp":"1322720322525352" - }, - { - "price":24.21456, - "amount":49.92219619, - "price_int":"2421456", - "amount_int":"4992219619", - "stamp":"1325784841048418" - }, - { - "price":24.2242, - "amount":0.2, - "price_int":"2422420", - "amount_int":"20000000", - "stamp":"1312121914451817" - }, - { - "price":24.4489, - "amount":3.96484142, - "price_int":"2444890", - "amount_int":"396484142", - "stamp":"1314297307939698" - }, - { - "price":24.49, - "amount":1.25, - "price_int":"2449000", - "amount_int":"125000000", - "stamp":"1312121778104763" - }, - { - "price":24.5, - "amount":6.818, - "price_int":"2450000", - "amount_int":"681800000", - "stamp":"1312121744528313" - }, - { - "price":24.55, - "amount":1.13783663, - "price_int":"2455000", - "amount_int":"113783663", - "stamp":"1327594523033242" - }, - { - "price":24.61899, - "amount":1, - "price_int":"2461899", - "amount_int":"100000000", - "stamp":"1312122059835183" - }, - { - "price":24.7087, - "amount":0.2, - "price_int":"2470870", - "amount_int":"20000000", - "stamp":"1312121916066894" - }, - { - "price":24.75966, - "amount":0.411925, - "price_int":"2475966", - "amount_int":"41192500", - "stamp":"1309371445622100" - }, - { - "price":24.87123, - "amount":25.5823669, - "price_int":"2487123", - "amount_int":"2558236690", - "stamp":"1312121507336627" - }, - { - "price":24.89, - "amount":10, - "price_int":"2489000", - "amount_int":"1000000000", - "stamp":"1322938695537312" - }, - { - "price":24.9, - "amount":10, - "price_int":"2490000", - "amount_int":"1000000000", - "stamp":"1315759824646510" - }, - { - "price":24.93, - "amount":0.5, - "price_int":"2493000", - "amount_int":"50000000", - "stamp":"1312121380517056" - }, - { - "price":24.95, - "amount":5, - "price_int":"2495000", - "amount_int":"500000000", - "stamp":"1312121425251553" - }, - { - "price":24.959, - "amount":1.07378643, - "price_int":"2495900", - "amount_int":"107378643", - "stamp":"1311879084379235" - }, - { - "price":24.96308, - "amount":10, - "price_int":"2496308", - "amount_int":"1000000000", - "stamp":"1326575468100153" - }, - { - "price":24.98, - "amount":10, - "price_int":"2498000", - "amount_int":"1000000000", - "stamp":"1312121493340104" - }, - { - "price":24.99, - "amount":51.0535, - "price_int":"2499000", - "amount_int":"5105350000", - "stamp":"1327941431387118" - }, - { - "price":24.991, - "amount":1, - "price_int":"2499100", - "amount_int":"100000000", - "stamp":"1312121486865915" - }, - { - "price":24.999, - "amount":15, - "price_int":"2499900", - "amount_int":"1500000000", - "stamp":"1312121509755739" - }, - { - "price":25, - "amount":910.4620305, - "price_int":"2500000", - "amount_int":"91046203050", - "stamp":"1328241743570115" - }, - { - "price":25.1, - "amount":3, - "price_int":"2510000", - "amount_int":"300000000", - "stamp":"1312121435961122" - }, - { - "price":25.125, - "amount":50, - "price_int":"2512500", - "amount_int":"5000000000", - "stamp":"1312121573336104" - }, - { - "price":25.19, - "amount":10, - "price_int":"2519000", - "amount_int":"1000000000", - "stamp":"1313021868017143" - }, - { - "price":25.2028, - "amount":0.2, - "price_int":"2520280", - "amount_int":"20000000", - "stamp":"1312121916168380" - }, - { - "price":25.368, - "amount":2.568, - "price_int":"2536800", - "amount_int":"256800000", - "stamp":"1315753788146831" - }, - { - "price":25.5, - "amount":3, - "price_int":"2550000", - "amount_int":"300000000", - "stamp":"1328327374769384" - }, - { - "price":25.6, - "amount":2.337, - "price_int":"2560000", - "amount_int":"233700000", - "stamp":"1312121837589086" - }, - { - "price":25.66, - "amount":242.921, - "price_int":"2566000", - "amount_int":"24292100000", - "stamp":"1312121653016487" - }, - { - "price":25.7069, - "amount":0.2, - "price_int":"2570690", - "amount_int":"20000000", - "stamp":"1312121916258756" - }, - { - "price":25.711, - "amount":20, - "price_int":"2571100", - "amount_int":"2000000000", - "stamp":"1325968124022718" - }, - { - "price":25.8, - "amount":32, - "price_int":"2580000", - "amount_int":"3200000000", - "stamp":"1325482608762187" - }, - { - "price":25.82602, - "amount":5.99018029, - "price_int":"2582602", - "amount_int":"599018029", - "stamp":"1316459432226624" - }, - { - "price":25.8799, - "amount":2, - "price_int":"2587990", - "amount_int":"200000000", - "stamp":"1312121344307493" - }, - { - "price":25.89769, - "amount":5, - "price_int":"2589769", - "amount_int":"500000000", - "stamp":"1325510337934595" - }, - { - "price":25.99, - "amount":0.1, - "price_int":"2599000", - "amount_int":"10000000", - "stamp":"1312121411801058" - }, - { - "price":25.999, - "amount":10, - "price_int":"2599900", - "amount_int":"1000000000", - "stamp":"1312121351845202" - }, - { - "price":26, - "amount":118.2, - "price_int":"2600000", - "amount_int":"11820000000", - "stamp":"1313426929123210" - }, - { - "price":26.042, - "amount":23.846, - "price_int":"2604200", - "amount_int":"2384600000", - "stamp":"1312121317647885" - }, - { - "price":26.2211, - "amount":0.2, - "price_int":"2622110", - "amount_int":"20000000", - "stamp":"1312121916348134" - }, - { - "price":26.53558, - "amount":3, - "price_int":"2653558", - "amount_int":"300000000", - "stamp":"1319281823485176" - }, - { - "price":26.7361, - "amount":70, - "price_int":"2673610", - "amount_int":"7000000000", - "stamp":"1328559150990161" - }, - { - "price":26.7456, - "amount":0.2, - "price_int":"2674560", - "amount_int":"20000000", - "stamp":"1312121914390061" - }, - { - "price":26.85, - "amount":3, - "price_int":"2685000", - "amount_int":"300000000", - "stamp":"1312121345381920" - }, - { - "price":26.99, - "amount":0.1, - "price_int":"2699000", - "amount_int":"10000000", - "stamp":"1312121411825235" - }, - { - "price":27, - "amount":76.88974029, - "price_int":"2700000", - "amount_int":"7688974029", - "stamp":"1324967735942643" - }, - { - "price":27.00699, - "amount":89.78797, - "price_int":"2700699", - "amount_int":"8978797000", - "stamp":"1325811622233197" - }, - { - "price":27.04945, - "amount":54, - "price_int":"2704945", - "amount_int":"5400000000", - "stamp":"1323189700286564" - }, - { - "price":27.2805, - "amount":0.2, - "price_int":"2728050", - "amount_int":"20000000", - "stamp":"1312121916437453" - }, - { - "price":27.36, - "amount":5, - "price_int":"2736000", - "amount_int":"500000000", - "stamp":"1312121336739355" - }, - { - "price":27.49, - "amount":278, - "price_int":"2749000", - "amount_int":"27800000000", - "stamp":"1326746274618812" - }, - { - "price":27.49801, - "amount":200, - "price_int":"2749801", - "amount_int":"20000000000", - "stamp":"1326236185400656" - }, - { - "price":27.5, - "amount":0.5, - "price_int":"2750000", - "amount_int":"50000000", - "stamp":"1312953479727154" - }, - { - "price":27.826, - "amount":0.2, - "price_int":"2782600", - "amount_int":"20000000", - "stamp":"1312121916510107" - }, - { - "price":27.9, - "amount":20, - "price_int":"2790000", - "amount_int":"2000000000", - "stamp":"1315569355774769" - }, - { - "price":27.94, - "amount":97.47, - "price_int":"2794000", - "amount_int":"9747000000", - "stamp":"1312121429437483" - }, - { - "price":27.98, - "amount":174.499, - "price_int":"2798000", - "amount_int":"17449900000", - "stamp":"1312121941735184" - }, - { - "price":27.99, - "amount":0.1, - "price_int":"2799000", - "amount_int":"10000000", - "stamp":"1312121411852787" - }, - { - "price":28, - "amount":168.121, - "price_int":"2800000", - "amount_int":"16812100000", - "stamp":"1314896357755829" - }, - { - "price":28.01, - "amount":8, - "price_int":"2801000", - "amount_int":"800000000", - "stamp":"1312122198488403" - }, - { - "price":28.07291, - "amount":1, - "price_int":"2807291", - "amount_int":"100000000", - "stamp":"1328219578486145" - }, - { - "price":28.3826, - "amount":0.2, - "price_int":"2838260", - "amount_int":"20000000", - "stamp":"1312121916598188" - }, - { - "price":28.5, - "amount":220, - "price_int":"2850000", - "amount_int":"22000000000", - "stamp":"1312121553002755" - }, - { - "price":28.64354, - "amount":2.35, - "price_int":"2864354", - "amount_int":"235000000", - "stamp":"1325843047099631" - }, - { - "price":28.75279, - "amount":10, - "price_int":"2875279", - "amount_int":"1000000000", - "stamp":"1312121416828428" - }, - { - "price":28.80356, - "amount":1, - "price_int":"2880356", - "amount_int":"100000000", - "stamp":"1324657105949926" - }, - { - "price":28.9, - "amount":9.247, - "price_int":"2890000", - "amount_int":"924700000", - "stamp":"1312121481007650" - }, - { - "price":28.9502, - "amount":0.2, - "price_int":"2895020", - "amount_int":"20000000", - "stamp":"1312121916680717" - }, - { - "price":28.991, - "amount":2, - "price_int":"2899100", - "amount_int":"200000000", - "stamp":"1312122087294962" - }, - { - "price":28.999, - "amount":10, - "price_int":"2899900", - "amount_int":"1000000000", - "stamp":"1315554601579037" - }, - { - "price":29, - "amount":470.855, - "price_int":"2900000", - "amount_int":"47085500000", - "stamp":"1326315800854242" - }, - { - "price":29.29, - "amount":100, - "price_int":"2929000", - "amount_int":"10000000000", - "stamp":"1319915747423765" - }, - { - "price":29.3, - "amount":31.0763125, - "price_int":"2930000", - "amount_int":"3107631250", - "stamp":"1312789721182044" - }, - { - "price":29.40971, - "amount":1, - "price_int":"2940971", - "amount_int":"100000000", - "stamp":"1328134053420753" - }, - { - "price":29.45, - "amount":100, - "price_int":"2945000", - "amount_int":"10000000000", - "stamp":"1325807140422852" - }, - { - "price":29.46, - "amount":4, - "price_int":"2946000", - "amount_int":"400000000", - "stamp":"1325210710856083" - }, - { - "price":29.5, - "amount":50.715, - "price_int":"2950000", - "amount_int":"5071500000", - "stamp":"1323972096315142" - }, - { - "price":29.5292, - "amount":0.2, - "price_int":"2952920", - "amount_int":"20000000", - "stamp":"1312121914302859" - }, - { - "price":29.66, - "amount":1, - "price_int":"2966000", - "amount_int":"100000000", - "stamp":"1312313774125051" - }, - { - "price":29.67, - "amount":2, - "price_int":"2967000", - "amount_int":"200000000", - "stamp":"1313947625204393" - }, - { - "price":29.75279, - "amount":10, - "price_int":"2975279", - "amount_int":"1000000000", - "stamp":"1312121416884965" - }, - { - "price":29.78, - "amount":4000, - "price_int":"2978000", - "amount_int":"400000000000", - "stamp":"1314762554522883" - }, - { - "price":29.79999, - "amount":0.28148, - "price_int":"2979999", - "amount_int":"28148000", - "stamp":"1316361060966379" - }, - { - "price":29.8, - "amount":103, - "price_int":"2980000", - "amount_int":"10300000000", - "stamp":"1324360951408429" - }, - { - "price":29.87, - "amount":100, - "price_int":"2987000", - "amount_int":"10000000000", - "stamp":"1323188842846793" - }, - { - "price":29.9, - "amount":5, - "price_int":"2990000", - "amount_int":"500000000", - "stamp":"1312121509889305" - }, - { - "price":29.901, - "amount":10, - "price_int":"2990100", - "amount_int":"1000000000", - "stamp":"1312745414609434" - }, - { - "price":29.91, - "amount":8.247, - "price_int":"2991000", - "amount_int":"824700000", - "stamp":"1312121365494835" - }, - { - "price":29.95, - "amount":5, - "price_int":"2995000", - "amount_int":"500000000", - "stamp":"1312121425310763" - }, - { - "price":29.959, - "amount":89.70305683, - "price_int":"2995900", - "amount_int":"8970305683", - "stamp":"1313857267869210" - }, - { - "price":29.9797, - "amount":125.05996853, - "price_int":"2997970", - "amount_int":"12505996853", - "stamp":"1327703043140714" - }, - { - "price":29.99, - "amount":88.6, - "price_int":"2999000", - "amount_int":"8860000000", - "stamp":"1327941483979640" - }, - { - "price":29.999, - "amount":10, - "price_int":"2999900", - "amount_int":"1000000000", - "stamp":"1315554601547918" - }, - { - "price":29.9999, - "amount":10, - "price_int":"2999990", - "amount_int":"1000000000", - "stamp":"1312122003146849" - }, - { - "price":29.99999, - "amount":300, - "price_int":"2999999", - "amount_int":"30000000000", - "stamp":"1326311078326156" - }, - { - "price":30, - "amount":2293.0428876, - "price_int":"3000000", - "amount_int":"229304288760", - "stamp":"1328642419392050" - }, - { - "price":30.0999, - "amount":10, - "price_int":"3009990", - "amount_int":"1000000000", - "stamp":"1312122003214446" - }, - { - "price":30.1198, - "amount":0.2, - "price_int":"3011980", - "amount_int":"20000000", - "stamp":"1312121916783211" - }, - { - "price":30.1999, - "amount":10, - "price_int":"3019990", - "amount_int":"1000000000", - "stamp":"1312122003283833" - }, - { - "price":30.2999, - "amount":10, - "price_int":"3029990", - "amount_int":"1000000000", - "stamp":"1312122003360350" - }, - { - "price":30.3999, - "amount":10, - "price_int":"3039990", - "amount_int":"1000000000", - "stamp":"1312122003421703" - }, - { - "price":30.4999, - "amount":10, - "price_int":"3049990", - "amount_int":"1000000000", - "stamp":"1312122003485877" - }, - { - "price":30.5999, - "amount":10, - "price_int":"3059990", - "amount_int":"1000000000", - "stamp":"1312122003543413" - }, - { - "price":30.67619, - "amount":3.26, - "price_int":"3067619", - "amount_int":"326000000", - "stamp":"1323004095189926" - }, - { - "price":30.6999, - "amount":10, - "price_int":"3069990", - "amount_int":"1000000000", - "stamp":"1312122003591968" - }, - { - "price":30.711, - "amount":20, - "price_int":"3071100", - "amount_int":"2000000000", - "stamp":"1325968130310836" - }, - { - "price":30.7222, - "amount":0.2, - "price_int":"3072220", - "amount_int":"20000000", - "stamp":"1312121916887719" - }, - { - "price":30.74061, - "amount":30.09048834, - "price_int":"3074061", - "amount_int":"3009048834", - "stamp":"1323548256264105" - }, - { - "price":30.74652, - "amount":1, - "price_int":"3074652", - "amount_int":"100000000", - "stamp":"1328134049318201" - }, - { - "price":30.75279, - "amount":10, - "price_int":"3075279", - "amount_int":"1000000000", - "stamp":"1312121416910435" - }, - { - "price":30.765, - "amount":0.19, - "price_int":"3076500", - "amount_int":"19000000", - "stamp":"1318703616875395" - }, - { - "price":30.7999, - "amount":10, - "price_int":"3079990", - "amount_int":"1000000000", - "stamp":"1312122003653124" - }, - { - "price":30.89969, - "amount":0.717, - "price_int":"3089969", - "amount_int":"71700000", - "stamp":"1326507666502106" - }, - { - "price":30.8999, - "amount":10, - "price_int":"3089990", - "amount_int":"1000000000", - "stamp":"1312122003704440" - }, - { - "price":30.9999, - "amount":10, - "price_int":"3099990", - "amount_int":"1000000000", - "stamp":"1312122003782965" - }, - { - "price":31, - "amount":26.96682, - "price_int":"3100000", - "amount_int":"2696682000", - "stamp":"1316379315595407" - }, - { - "price":31.0345, - "amount":150, - "price_int":"3103450", - "amount_int":"15000000000", - "stamp":"1315316618315112" - }, - { - "price":31.0999, - "amount":10, - "price_int":"3109990", - "amount_int":"1000000000", - "stamp":"1312122003868805" - }, - { - "price":31.1999, - "amount":10, - "price_int":"3119990", - "amount_int":"1000000000", - "stamp":"1312122003953602" - }, - { - "price":31.2999, - "amount":10, - "price_int":"3129990", - "amount_int":"1000000000", - "stamp":"1312122004023637" - }, - { - "price":31.3366, - "amount":0.2, - "price_int":"3133660", - "amount_int":"20000000", - "stamp":"1312121916968102" - }, - { - "price":31.3999, - "amount":10, - "price_int":"3139990", - "amount_int":"1000000000", - "stamp":"1312122004087276" - }, - { - "price":31.467, - "amount":310.73222115, - "price_int":"3146700", - "amount_int":"31073222115", - "stamp":"1315244520806155" - }, - { - "price":31.49, - "amount":5.15688, - "price_int":"3149000", - "amount_int":"515688000", - "stamp":"1312121479660887" - }, - { - "price":31.4999, - "amount":10, - "price_int":"3149990", - "amount_int":"1000000000", - "stamp":"1312122004140342" - }, - { - "price":31.5999, - "amount":10, - "price_int":"3159990", - "amount_int":"1000000000", - "stamp":"1312122004201915" - }, - { - "price":31.68391, - "amount":6, - "price_int":"3168391", - "amount_int":"600000000", - "stamp":"1323997185284466" - }, - { - "price":31.6999, - "amount":10, - "price_int":"3169990", - "amount_int":"1000000000", - "stamp":"1312122004280091" - }, - { - "price":31.76, - "amount":9.441e-5, - "price_int":"3176000", - "amount_int":"9441", - "stamp":"1315582885829528" - }, - { - "price":31.7999, - "amount":10, - "price_int":"3179990", - "amount_int":"1000000000", - "stamp":"1312122004333215" - }, - { - "price":31.87, - "amount":4, - "price_int":"3187000", - "amount_int":"400000000", - "stamp":"1325210745820172" - }, - { - "price":31.87913, - "amount":33.14963346, - "price_int":"3187913", - "amount_int":"3314963346", - "stamp":"1328414022698264" - }, - { - "price":31.8999, - "amount":10, - "price_int":"3189990", - "amount_int":"1000000000", - "stamp":"1312122004389305" - }, - { - "price":31.9634, - "amount":0.2, - "price_int":"3196340", - "amount_int":"20000000", - "stamp":"1312121917073548" - }, - { - "price":31.99755, - "amount":36.69418271, - "price_int":"3199755", - "amount_int":"3669418271", - "stamp":"1326278862487847" - }, - { - "price":31.999, - "amount":10, - "price_int":"3199900", - "amount_int":"1000000000", - "stamp":"1315554601460563" - }, - { - "price":31.9999, - "amount":10, - "price_int":"3199990", - "amount_int":"1000000000", - "stamp":"1312122004475877" - }, - { - "price":32, - "amount":711.0180861, - "price_int":"3200000", - "amount_int":"71101808610", - "stamp":"1327989490633843" - }, - { - "price":32.00395, - "amount":850.39537299, - "price_int":"3200395", - "amount_int":"85039537299", - "stamp":"1328539738330324" - }, - { - "price":32.08332, - "amount":2, - "price_int":"3208332", - "amount_int":"200000000", - "stamp":"1328219518115373" - }, - { - "price":32.0999, - "amount":10, - "price_int":"3209990", - "amount_int":"1000000000", - "stamp":"1312122004561098" - }, - { - "price":32.1999, - "amount":10, - "price_int":"3219990", - "amount_int":"1000000000", - "stamp":"1312122004624440" - }, - { - "price":32.2999, - "amount":10, - "price_int":"3229990", - "amount_int":"1000000000", - "stamp":"1312122004690343" - }, - { - "price":32.3999, - "amount":10, - "price_int":"3239990", - "amount_int":"1000000000", - "stamp":"1312122004755633" - }, - { - "price":32.4999, - "amount":10, - "price_int":"3249990", - "amount_int":"1000000000", - "stamp":"1312122004825908" - }, - { - "price":32.5999, - "amount":10, - "price_int":"3259990", - "amount_int":"1000000000", - "stamp":"1312122004905418" - }, - { - "price":32.6026, - "amount":0.2, - "price_int":"3260260", - "amount_int":"20000000", - "stamp":"1312121914197862" - }, - { - "price":32.6999, - "amount":10, - "price_int":"3269990", - "amount_int":"1000000000", - "stamp":"1312122004965517" - }, - { - "price":32.7999, - "amount":10, - "price_int":"3279990", - "amount_int":"1000000000", - "stamp":"1312122005020139" - }, - { - "price":32.8799, - "amount":2, - "price_int":"3287990", - "amount_int":"200000000", - "stamp":"1312121344035607" - }, - { - "price":32.8999, - "amount":10, - "price_int":"3289990", - "amount_int":"1000000000", - "stamp":"1312122005100496" - }, - { - "price":32.989, - "amount":20, - "price_int":"3298900", - "amount_int":"2000000000", - "stamp":"1312121381668415" - }, - { - "price":32.9999, - "amount":10, - "price_int":"3299990", - "amount_int":"1000000000", - "stamp":"1312122005151772" - }, - { - "price":33, - "amount":301.30871738, - "price_int":"3300000", - "amount_int":"30130871738", - "stamp":"1318654140858365" - }, - { - "price":33.0999, - "amount":10, - "price_int":"3309990", - "amount_int":"1000000000", - "stamp":"1312122005211920" - }, - { - "price":33.1999, - "amount":10, - "price_int":"3319990", - "amount_int":"1000000000", - "stamp":"1312122005279052" - }, - { - "price":33.2196, - "amount":3, - "price_int":"3321960", - "amount_int":"300000000", - "stamp":"1319281840092215" - }, - { - "price":33.2547, - "amount":0.2, - "price_int":"3325470", - "amount_int":"20000000", - "stamp":"1312121917168177" - }, - { - "price":33.2999, - "amount":10, - "price_int":"3329990", - "amount_int":"1000000000", - "stamp":"1312122005362201" - }, - { - "price":33.3999, - "amount":10, - "price_int":"3339990", - "amount_int":"1000000000", - "stamp":"1312122005420075" - }, - { - "price":33.42013, - "amount":2, - "price_int":"3342013", - "amount_int":"200000000", - "stamp":"1328219503971559" - }, - { - "price":33.4999, - "amount":10, - "price_int":"3349990", - "amount_int":"1000000000", - "stamp":"1312122005490889" - }, - { - "price":33.5999, - "amount":10, - "price_int":"3359990", - "amount_int":"1000000000", - "stamp":"1312122005595422" - }, - { - "price":33.6999, - "amount":10, - "price_int":"3369990", - "amount_int":"1000000000", - "stamp":"1312122005654040" - }, - { - "price":33.7999, - "amount":10, - "price_int":"3379990", - "amount_int":"1000000000", - "stamp":"1312122005715433" - }, - { - "price":33.8999, - "amount":10, - "price_int":"3389990", - "amount_int":"1000000000", - "stamp":"1312122005790714" - }, - { - "price":33.9197, - "amount":0.2, - "price_int":"3391970", - "amount_int":"20000000", - "stamp":"1312121917258033" - }, - { - "price":33.9999, - "amount":10, - "price_int":"3399990", - "amount_int":"1000000000", - "stamp":"1312122005860286" - }, - { - "price":34, - "amount":12.76, - "price_int":"3400000", - "amount_int":"1276000000", - "stamp":"1325949203417430" - }, - { - "price":34.0999, - "amount":10, - "price_int":"3409990", - "amount_int":"1000000000", - "stamp":"1312122005933417" - }, - { - "price":34.1999, - "amount":10, - "price_int":"3419990", - "amount_int":"1000000000", - "stamp":"1312122005994380" - }, - { - "price":34.28, - "amount":5, - "price_int":"3428000", - "amount_int":"500000000", - "stamp":"1312121352802354" - }, - { - "price":34.2999, - "amount":10, - "price_int":"3429990", - "amount_int":"1000000000", - "stamp":"1312122006060172" - }, - { - "price":34.3999, - "amount":10, - "price_int":"3439990", - "amount_int":"1000000000", - "stamp":"1312122006148101" - }, - { - "price":34.4999, - "amount":10, - "price_int":"3449990", - "amount_int":"1000000000", - "stamp":"1312122006213185" - }, - { - "price":34.5981, - "amount":0.2, - "price_int":"3459810", - "amount_int":"20000000", - "stamp":"1312121917333998" - }, - { - "price":34.5999, - "amount":10, - "price_int":"3459990", - "amount_int":"1000000000", - "stamp":"1312122006285016" - }, - { - "price":34.6999, - "amount":10, - "price_int":"3469990", - "amount_int":"1000000000", - "stamp":"1312122006360569" - }, - { - "price":34.7, - "amount":2, - "price_int":"3470000", - "amount_int":"200000000", - "stamp":"1312121744026688" - }, - { - "price":34.73, - "amount":11.99201182, - "price_int":"3473000", - "amount_int":"1199201182", - "stamp":"1317997621132114" - }, - { - "price":34.75693, - "amount":2, - "price_int":"3475693", - "amount_int":"200000000", - "stamp":"1328219513072280" - }, - { - "price":34.7999, - "amount":10, - "price_int":"3479990", - "amount_int":"1000000000", - "stamp":"1312122006433867" - }, - { - "price":34.8999, - "amount":10, - "price_int":"3489990", - "amount_int":"1000000000", - "stamp":"1312122006528841" - }, - { - "price":34.95, - "amount":10, - "price_int":"3495000", - "amount_int":"1000000000", - "stamp":"1318829462717160" - }, - { - "price":34.99, - "amount":5, - "price_int":"3499000", - "amount_int":"500000000", - "stamp":"1312498671838507" - }, - { - "price":34.996, - "amount":0.5, - "price_int":"3499600", - "amount_int":"50000000", - "stamp":"1314414283796674" - }, - { - "price":34.999, - "amount":10, - "price_int":"3499900", - "amount_int":"1000000000", - "stamp":"1315554601519498" - }, - { - "price":34.9999, - "amount":10, - "price_int":"3499990", - "amount_int":"1000000000", - "stamp":"1312122010697053" - }, - { - "price":35, - "amount":1288.257421, - "price_int":"3500000", - "amount_int":"128825742100", - "stamp":"1327131894600399" - }, - { - "price":35.0999, - "amount":10, - "price_int":"3509990", - "amount_int":"1000000000", - "stamp":"1312122010852789" - }, - { - "price":35.12, - "amount":100, - "price_int":"3512000", - "amount_int":"10000000000", - "stamp":"1312121429116308" - }, - { - "price":35.1999, - "amount":10, - "price_int":"3519990", - "amount_int":"1000000000", - "stamp":"1312122011227968" - }, - { - "price":35.20435, - "amount":150, - "price_int":"3520435", - "amount_int":"15000000000", - "stamp":"1315933004775159" - }, - { - "price":35.2901, - "amount":0.2, - "price_int":"3529010", - "amount_int":"20000000", - "stamp":"1312121917420272" - }, - { - "price":35.2999, - "amount":10, - "price_int":"3529990", - "amount_int":"1000000000", - "stamp":"1312122011370427" - }, - { - "price":35.3999, - "amount":10, - "price_int":"3539990", - "amount_int":"1000000000", - "stamp":"1312122011529179" - }, - { - "price":35.4999, - "amount":10, - "price_int":"3549990", - "amount_int":"1000000000", - "stamp":"1312122011684155" - }, - { - "price":35.5999, - "amount":10, - "price_int":"3559990", - "amount_int":"1000000000", - "stamp":"1312122011829459" - }, - { - "price":35.6999, - "amount":10, - "price_int":"3569990", - "amount_int":"1000000000", - "stamp":"1312122011984115" - }, - { - "price":35.7999, - "amount":10, - "price_int":"3579990", - "amount_int":"1000000000", - "stamp":"1312122012063993" - }, - { - "price":35.8799, - "amount":1.99999999, - "price_int":"3587990", - "amount_int":"199999999", - "stamp":"1312121344262991" - }, - { - "price":35.8999, - "amount":10, - "price_int":"3589990", - "amount_int":"1000000000", - "stamp":"1312122012151901" - }, - { - "price":35.9959, - "amount":0.2, - "price_int":"3599590", - "amount_int":"20000000", - "stamp":"1312121914090758" - }, - { - "price":35.999, - "amount":10, - "price_int":"3599900", - "amount_int":"1000000000", - "stamp":"1315554601489529" - }, - { - "price":35.9999, - "amount":100, - "price_int":"3599990", - "amount_int":"10000000000", - "stamp":"1312121510319286" - }, - { - "price":36, - "amount":20, - "price_int":"3600000", - "amount_int":"2000000000", - "stamp":"1312121953521118" - }, - { - "price":36.09374, - "amount":1, - "price_int":"3609374", - "amount_int":"100000000", - "stamp":"1328134064121015" - }, - { - "price":36.1, - "amount":0.008, - "price_int":"3610000", - "amount_int":"800000", - "stamp":"1312121480280244" - }, - { - "price":36.59963, - "amount":202, - "price_int":"3659963", - "amount_int":"20200000000", - "stamp":"1325407749171281" - }, - { - "price":36.7158, - "amount":0.2, - "price_int":"3671580", - "amount_int":"20000000", - "stamp":"1312121915075708" - }, - { - "price":36.9999, - "amount":100, - "price_int":"3699990", - "amount_int":"10000000000", - "stamp":"1312121510390210" - }, - { - "price":37, - "amount":5, - "price_int":"3700000", - "amount_int":"500000000", - "stamp":"1324049918072891" - }, - { - "price":37.43054, - "amount":1, - "price_int":"3743054", - "amount_int":"100000000", - "stamp":"1328134067311127" - }, - { - "price":37.45, - "amount":0.2, - "price_int":"3745000", - "amount_int":"20000000", - "stamp":"1312121917498550" - }, - { - "price":37.8, - "amount":84.68, - "price_int":"3780000", - "amount_int":"8468000000", - "stamp":"1312121542656225" - }, - { - "price":37.9999, - "amount":100, - "price_int":"3799990", - "amount_int":"10000000000", - "stamp":"1312121510451547" - }, - { - "price":38, - "amount":105, - "price_int":"3800000", - "amount_int":"10500000000", - "stamp":"1326847614713027" - }, - { - "price":38.199, - "amount":0.2, - "price_int":"3819900", - "amount_int":"20000000", - "stamp":"1312121917573225" - }, - { - "price":38.76735, - "amount":1, - "price_int":"3876735", - "amount_int":"100000000", - "stamp":"1328134070012884" - }, - { - "price":38.77, - "amount":1, - "price_int":"3877000", - "amount_int":"100000000", - "stamp":"1312121543287184" - }, - { - "price":38.8799, - "amount":2, - "price_int":"3887990", - "amount_int":"200000000", - "stamp":"1312121946389347" - }, - { - "price":38.88, - "amount":10, - "price_int":"3888000", - "amount_int":"1000000000", - "stamp":"1322938715782406" - }, - { - "price":38.963, - "amount":0.2, - "price_int":"3896300", - "amount_int":"20000000", - "stamp":"1312121917669752" - }, - { - "price":38.9999, - "amount":100, - "price_int":"3899990", - "amount_int":"10000000000", - "stamp":"1312122006618763" - }, - { - "price":39, - "amount":8001, - "price_int":"3900000", - "amount_int":"800100000000", - "stamp":"1326315805638664" - }, - { - "price":39.65, - "amount":43, - "price_int":"3965000", - "amount_int":"4300000000", - "stamp":"1312121316776188" - }, - { - "price":39.7423, - "amount":0.2, - "price_int":"3974230", - "amount_int":"20000000", - "stamp":"1312121914589847" - }, - { - "price":39.9999, - "amount":100, - "price_int":"3999990", - "amount_int":"10000000000", - "stamp":"1312122010485250" - }, - { - "price":40, - "amount":347, - "price_int":"4000000", - "amount_int":"34700000000", - "stamp":"1325755079489135" - }, - { - "price":40.051, - "amount":300, - "price_int":"4005100", - "amount_int":"30000000000", - "stamp":"1326065994300443" - }, - { - "price":40.10415, - "amount":1, - "price_int":"4010415", - "amount_int":"100000000", - "stamp":"1328219521991139" - }, - { - "price":40.5371, - "amount":0.2, - "price_int":"4053710", - "amount_int":"20000000", - "stamp":"1312121914660368" - }, - { - "price":40.65224, - "amount":0.03773455, - "price_int":"4065224", - "amount_int":"3773455", - "stamp":"1326015902911533" - }, - { - "price":41, - "amount":3.6098, - "price_int":"4100000", - "amount_int":"360980000", - "stamp":"1319797859447724" - }, - { - "price":41.3, - "amount":125.38630403, - "price_int":"4130000", - "amount_int":"12538630403", - "stamp":"1318437240905806" - }, - { - "price":41.3478, - "amount":0.2, - "price_int":"4134780", - "amount_int":"20000000", - "stamp":"1312121917745444" - }, - { - "price":42, - "amount":0.73, - "price_int":"4200000", - "amount_int":"73000000", - "stamp":"1312121344873181" - }, - { - "price":42.1748, - "amount":0.2, - "price_int":"4217480", - "amount_int":"20000000", - "stamp":"1312121917818207" - }, - { - "price":43, - "amount":5, - "price_int":"4300000", - "amount_int":"500000000", - "stamp":"1324049945634720" - }, - { - "price":43.0183, - "amount":0.2, - "price_int":"4301830", - "amount_int":"20000000", - "stamp":"1312121917890013" - }, - { - "price":43.8787, - "amount":0.2, - "price_int":"4387870", - "amount_int":"20000000", - "stamp":"1312121917964692" - }, - { - "price":43.8799, - "amount":2, - "price_int":"4387990", - "amount_int":"200000000", - "stamp":"1312121946418133" - }, - { - "price":44, - "amount":1, - "price_int":"4400000", - "amount_int":"100000000", - "stamp":"1313254632524291" - }, - { - "price":44.7562, - "amount":0.2, - "price_int":"4475620", - "amount_int":"20000000", - "stamp":"1312121918041574" - }, - { - "price":45, - "amount":27.98407417, - "price_int":"4500000", - "amount_int":"2798407417", - "stamp":"1325486330795426" - }, - { - "price":45.09955, - "amount":107, - "price_int":"4509955", - "amount_int":"10700000000", - "stamp":"1328644774169424" - }, - { - "price":45.12, - "amount":200, - "price_int":"4512000", - "amount_int":"20000000000", - "stamp":"1312121429209985" - }, - { - "price":45.6514, - "amount":0.2, - "price_int":"4565140", - "amount_int":"20000000", - "stamp":"1312121918127020" - }, - { - "price":46.5644, - "amount":0.2, - "price_int":"4656440", - "amount_int":"20000000", - "stamp":"1312121918219011" - }, - { - "price":46.59953, - "amount":99.8, - "price_int":"4659953", - "amount_int":"9980000000", - "stamp":"1328410461251576" - }, - { - "price":47.4956, - "amount":0.2, - "price_int":"4749560", - "amount_int":"20000000", - "stamp":"1312121918309955" - }, - { - "price":48, - "amount":6, - "price_int":"4800000", - "amount_int":"600000000", - "stamp":"1324049956528602" - }, - { - "price":48.00593, - "amount":5, - "price_int":"4800593", - "amount_int":"500000000", - "stamp":"1315433102624677" - }, - { - "price":48.4455, - "amount":0.2, - "price_int":"4844550", - "amount_int":"20000000", - "stamp":"1312121918410030" - }, - { - "price":48.48, - "amount":100, - "price_int":"4848000", - "amount_int":"10000000000", - "stamp":"1319915769619581" - }, - { - "price":48.8799, - "amount":1.99999999, - "price_int":"4887990", - "amount_int":"199999999", - "stamp":"1312121946366039" - }, - { - "price":49, - "amount":1.985, - "price_int":"4900000", - "amount_int":"198500000", - "stamp":"1326315811654296" - }, - { - "price":49.4145, - "amount":0.2, - "price_int":"4941450", - "amount_int":"20000000", - "stamp":"1312121918490584" - }, - { - "price":49.73, - "amount":100, - "price_int":"4973000", - "amount_int":"10000000000", - "stamp":"1315756844805638" - }, - { - "price":49.87, - "amount":1, - "price_int":"4987000", - "amount_int":"100000000", - "stamp":"1325459680795397" - }, - { - "price":49.89679, - "amount":2.6, - "price_int":"4989679", - "amount_int":"260000000", - "stamp":"1325765775107028" - }, - { - "price":50, - "amount":857.274, - "price_int":"5000000", - "amount_int":"85727400000", - "stamp":"1328149849958223" - }, - { - "price":50.4027, - "amount":0.2, - "price_int":"5040270", - "amount_int":"20000000", - "stamp":"1312121918561395" - }, - { - "price":51.4108, - "amount":0.2, - "price_int":"5141080", - "amount_int":"20000000", - "stamp":"1312121918633733" - }, - { - "price":52.4391, - "amount":0.2, - "price_int":"5243910", - "amount_int":"20000000", - "stamp":"1312121918779644" - }, - { - "price":53.4722, - "amount":2, - "price_int":"5347220", - "amount_int":"200000000", - "stamp":"1325458518589902" - }, - { - "price":53.4878, - "amount":0.2, - "price_int":"5348780", - "amount_int":"20000000", - "stamp":"1312121918852488" - }, - { - "price":54.5576, - "amount":0.2, - "price_int":"5455760", - "amount_int":"20000000", - "stamp":"1312121918942503" - }, - { - "price":55, - "amount":1.01750838, - "price_int":"5500000", - "amount_int":"101750838", - "stamp":"1327252867283002" - }, - { - "price":55.55, - "amount":1, - "price_int":"5555000", - "amount_int":"100000000", - "stamp":"1312121366577100" - }, - { - "price":55.6487, - "amount":0.2, - "price_int":"5564870", - "amount_int":"20000000", - "stamp":"1312121919019327" - }, - { - "price":56.7617, - "amount":0.2, - "price_int":"5676170", - "amount_int":"20000000", - "stamp":"1312121919712007" - }, - { - "price":57.897, - "amount":0.2, - "price_int":"5789700", - "amount_int":"20000000", - "stamp":"1312121919796319" - }, - { - "price":58.7001, - "amount":3.4, - "price_int":"5870010", - "amount_int":"340000000", - "stamp":"1327537714061033" - }, - { - "price":58.7406, - "amount":4.76, - "price_int":"5874060", - "amount_int":"476000000", - "stamp":"1327536695365755" - }, - { - "price":59.0549, - "amount":0.2, - "price_int":"5905490", - "amount_int":"20000000", - "stamp":"1312121919884585" - }, - { - "price":59.8, - "amount":8.312, - "price_int":"5980000", - "amount_int":"831200000", - "stamp":"1312121480989517" - }, - { - "price":59.99, - "amount":20, - "price_int":"5999000", - "amount_int":"2000000000", - "stamp":"1312121343379573" - }, - { - "price":60, - "amount":115.5, - "price_int":"6000000", - "amount_int":"11550000000", - "stamp":"1325755096264276" - }, - { - "price":60.15623, - "amount":10, - "price_int":"6015623", - "amount_int":"1000000000", - "stamp":"1326645978448466" - }, - { - "price":60.2361, - "amount":0.2, - "price_int":"6023610", - "amount_int":"20000000", - "stamp":"1312121923401319" - }, - { - "price":60.48747, - "amount":1, - "price_int":"6048747", - "amount_int":"100000000", - "stamp":"1325815189985041" - }, - { - "price":61.4409, - "amount":0.2, - "price_int":"6144090", - "amount_int":"20000000", - "stamp":"1312121923554982" - }, - { - "price":62.6697, - "amount":0.2, - "price_int":"6266970", - "amount_int":"20000000", - "stamp":"1312121923706438" - }, - { - "price":63, - "amount":17.7, - "price_int":"6300000", - "amount_int":"1770000000", - "stamp":"1324050030162959" - }, - { - "price":63.2, - "amount":2.49, - "price_int":"6320000", - "amount_int":"249000000", - "stamp":"1327356932404958" - }, - { - "price":63.5001, - "amount":1.7, - "price_int":"6350010", - "amount_int":"170000000", - "stamp":"1327363418109309" - }, - { - "price":63.9231, - "amount":0.2, - "price_int":"6392310", - "amount_int":"20000000", - "stamp":"1312121923855740" - }, - { - "price":64, - "amount":0.4064734, - "price_int":"6400000", - "amount_int":"40647340", - "stamp":"1312121538880658" - }, - { - "price":65.12, - "amount":200, - "price_int":"6512000", - "amount_int":"20000000000", - "stamp":"1312121429247561" - }, - { - "price":65.2015, - "amount":0.2, - "price_int":"6520150", - "amount_int":"20000000", - "stamp":"1312121924033022" - }, - { - "price":66, - "amount":10, - "price_int":"6600000", - "amount_int":"1000000000", - "stamp":"1313511251028013" - }, - { - "price":66.5055, - "amount":0.2, - "price_int":"6650550", - "amount_int":"20000000", - "stamp":"1312121924199995" - }, - { - "price":66.84025, - "amount":0.99741632, - "price_int":"6684025", - "amount_int":"99741632", - "stamp":"1324886600376265" - }, - { - "price":67, - "amount":10, - "price_int":"6700000", - "amount_int":"1000000000", - "stamp":"1324050034901572" - }, - { - "price":67.8357, - "amount":0.2, - "price_int":"6783570", - "amount_int":"20000000", - "stamp":"1312121924346925" - }, - { - "price":69.1924, - "amount":0.2, - "price_int":"6919240", - "amount_int":"20000000", - "stamp":"1312121924489348" - }, - { - "price":69.89654, - "amount":2, - "price_int":"6989654", - "amount_int":"200000000", - "stamp":"1325497757409707" - }, - { - "price":70, - "amount":100, - "price_int":"7000000", - "amount_int":"10000000000", - "stamp":"1325755101943887" - }, - { - "price":70.5762, - "amount":0.2, - "price_int":"7057620", - "amount_int":"20000000", - "stamp":"1312121924683081" - }, - { - "price":70.84271, - "amount":10, - "price_int":"7084271", - "amount_int":"1000000000", - "stamp":"1315753788252878" - }, - { - "price":71.9877, - "amount":0.2, - "price_int":"7198770", - "amount_int":"20000000", - "stamp":"1312121924835368" - }, - { - "price":73.4274, - "amount":0.2, - "price_int":"7342740", - "amount_int":"20000000", - "stamp":"1312121925590127" - }, - { - "price":73.8799, - "amount":1, - "price_int":"7387990", - "amount_int":"100000000", - "stamp":"1312125025098570" - }, - { - "price":74.87, - "amount":100, - "price_int":"7487000", - "amount_int":"10000000000", - "stamp":"1323188899837012" - }, - { - "price":74.896, - "amount":0.2, - "price_int":"7489600", - "amount_int":"20000000", - "stamp":"1312121925463651" - }, - { - "price":75, - "amount":30.1353701, - "price_int":"7500000", - "amount_int":"3013537010", - "stamp":"1323553299879838" - }, - { - "price":76.3939, - "amount":0.2, - "price_int":"7639390", - "amount_int":"20000000", - "stamp":"1312121925286595" - }, - { - "price":77.9218, - "amount":0.2, - "price_int":"7792180", - "amount_int":"20000000", - "stamp":"1312121925107238" - }, - { - "price":79.4802, - "amount":0.2, - "price_int":"7948020", - "amount_int":"20000000", - "stamp":"1312121924962126" - }, - { - "price":80, - "amount":127, - "price_int":"8000000", - "amount_int":"12700000000", - "stamp":"1325755116293638" - }, - { - "price":81.0698, - "amount":0.2, - "price_int":"8106980", - "amount_int":"20000000", - "stamp":"1312121926238566" - }, - { - "price":82.6912, - "amount":0.2, - "price_int":"8269120", - "amount_int":"20000000", - "stamp":"1312121926129885" - }, - { - "price":83, - "amount":10, - "price_int":"8300000", - "amount_int":"1000000000", - "stamp":"1324050059646873" - }, - { - "price":84.345, - "amount":0.2, - "price_int":"8434500", - "amount_int":"20000000", - "stamp":"1312121926033569" - }, - { - "price":86.032, - "amount":0.2, - "price_int":"8603200", - "amount_int":"20000000", - "stamp":"1312121925878088" - }, - { - "price":87.7526, - "amount":0.2, - "price_int":"8775260", - "amount_int":"20000000", - "stamp":"1312121925764315" - }, - { - "price":89.5077, - "amount":0.2, - "price_int":"8950770", - "amount_int":"20000000", - "stamp":"1312121926624864" - }, - { - "price":89.89965, - "amount":1.5, - "price_int":"8989965", - "amount_int":"150000000", - "stamp":"1325497830313476" - }, - { - "price":90, - "amount":201, - "price_int":"9000000", - "amount_int":"20100000000", - "stamp":"1326316030140465" - }, - { - "price":91.2978, - "amount":0.2, - "price_int":"9129780", - "amount_int":"20000000", - "stamp":"1312121926720960" - }, - { - "price":92, - "amount":10, - "price_int":"9200000", - "amount_int":"1000000000", - "stamp":"1324050065916944" - }, - { - "price":93.1238, - "amount":0.2, - "price_int":"9312380", - "amount_int":"20000000", - "stamp":"1312121926517382" - }, - { - "price":94.87, - "amount":400, - "price_int":"9487000", - "amount_int":"40000000000", - "stamp":"1325625772112080" - }, - { - "price":94.9863, - "amount":0.2, - "price_int":"9498630", - "amount_int":"20000000", - "stamp":"1312121926435328" - }, - { - "price":95, - "amount":100, - "price_int":"9500000", - "amount_int":"10000000000", - "stamp":"1324315828906663" - }, - { - "price":96.886, - "amount":0.2, - "price_int":"9688600", - "amount_int":"20000000", - "stamp":"1312121926351592" - }, - { - "price":97.8, - "amount":0.82853428, - "price_int":"9780000", - "amount_int":"82853428", - "stamp":"1314905510660756" - }, - { - "price":97.89, - "amount":100, - "price_int":"9789000", - "amount_int":"10000000000", - "stamp":"1312121493296759" - }, - { - "price":98.8237, - "amount":0.2, - "price_int":"9882370", - "amount_int":"20000000", - "stamp":"1312121927249328" - }, - { - "price":99, - "amount":251.2, - "price_int":"9900000", - "amount_int":"25120000000", - "stamp":"1321790712523789" - }, - { - "price":99.9, - "amount":10, - "price_int":"9990000", - "amount_int":"1000000000", - "stamp":"1314507559297606" - }, - { - "price":99.9321, - "amount":0.45, - "price_int":"9993210", - "amount_int":"45000000", - "stamp":"1314414367368004" - }, - { - "price":99.95, - "amount":35.44902337, - "price_int":"9995000", - "amount_int":"3544902337", - "stamp":"1316770263577979" - }, - { - "price":99.99, - "amount":5, - "price_int":"9999000", - "amount_int":"500000000", - "stamp":"1312571007346414" - }, - { - "price":100, - "amount":85.4, - "price_int":"10000000", - "amount_int":"8540000000", - "stamp":"1328149786088730" - }, - { - "price":100.8002, - "amount":0.2, - "price_int":"10080020", - "amount_int":"20000000", - "stamp":"1312121927169122" - }, - { - "price":100.89099, - "amount":0.00056531, - "price_int":"10089099", - "amount_int":"56531", - "stamp":"1313665351409000" - }, - { - "price":102.8162, - "amount":0.2, - "price_int":"10281620", - "amount_int":"20000000", - "stamp":"1312121927070359" - }, - { - "price":104.8725, - "amount":0.2, - "price_int":"10487250", - "amount_int":"20000000", - "stamp":"1312121926973863" - }, - { - "price":105, - "amount":10, - "price_int":"10500000", - "amount_int":"1000000000", - "stamp":"1314628938851995" - }, - { - "price":106.97, - "amount":0.2, - "price_int":"10697000", - "amount_int":"20000000", - "stamp":"1312121926849084" - }, - { - "price":109.1094, - "amount":0.2, - "price_int":"10910940", - "amount_int":"20000000", - "stamp":"1312121927341500" - }, - { - "price":109.67, - "amount":1, - "price_int":"10967000", - "amount_int":"100000000", - "stamp":"1324979490644266" - }, - { - "price":110, - "amount":10, - "price_int":"11000000", - "amount_int":"1000000000", - "stamp":"1312121838305127" - }, - { - "price":111.11, - "amount":1, - "price_int":"11111000", - "amount_int":"100000000", - "stamp":"1312121367939368" - }, - { - "price":111.2916, - "amount":0.2, - "price_int":"11129160", - "amount_int":"20000000", - "stamp":"1312121927409274" - }, - { - "price":113.5174, - "amount":0.2, - "price_int":"11351740", - "amount_int":"20000000", - "stamp":"1312121927490249" - }, - { - "price":115.7877, - "amount":0.2, - "price_int":"11578770", - "amount_int":"20000000", - "stamp":"1312121927576165" - }, - { - "price":116.8, - "amount":2, - "price_int":"11680000", - "amount_int":"200000000", - "stamp":"1318659301106855" - }, - { - "price":118.1035, - "amount":0.2, - "price_int":"11810350", - "amount_int":"20000000", - "stamp":"1312121927674451" - }, - { - "price":119.58, - "amount":1, - "price_int":"11958000", - "amount_int":"100000000", - "stamp":"1324269625315189" - }, - { - "price":120, - "amount":10, - "price_int":"12000000", - "amount_int":"1000000000", - "stamp":"1326917982500020" - }, - { - "price":120.4656, - "amount":0.2, - "price_int":"12046560", - "amount_int":"20000000", - "stamp":"1312640997650548" - }, - { - "price":122.8749, - "amount":0.2, - "price_int":"12287490", - "amount_int":"20000000", - "stamp":"1315759379912142" - }, - { - "price":125.3314, - "amount":0.2, - "price_int":"12533140", - "amount_int":"20000000", - "stamp":"1315759379958657" - }, - { - "price":129.67, - "amount":1, - "price_int":"12967000", - "amount_int":"100000000", - "stamp":"1324979508508623" - }, - { - "price":131.37646, - "amount":2, - "price_int":"13137646", - "amount_int":"200000000", - "stamp":"1316522965731919" - }, - { - "price":140, - "amount":11, - "price_int":"14000000", - "amount_int":"1100000000", - "stamp":"1326917991752395" - }, - { - "price":149.89077, - "amount":1, - "price_int":"14989077", - "amount_int":"100000000", - "stamp":"1325497912164322" - }, - { - "price":160, - "amount":35, - "price_int":"16000000", - "amount_int":"3500000000", - "stamp":"1326917999102381" - }, - { - "price":163.43, - "amount":1, - "price_int":"16343000", - "amount_int":"100000000", - "stamp":"1324269661896074" - }, - { - "price":179.89679, - "amount":1, - "price_int":"17989679", - "amount_int":"100000000", - "stamp":"1325508942009374" - }, - { - "price":180, - "amount":10, - "price_int":"18000000", - "amount_int":"1000000000", - "stamp":"1326918009989438" - }, - { - "price":190, - "amount":1, - "price_int":"19000000", - "amount_int":"100000000", - "stamp":"1326316035941035" - }, - { - "price":190.84, - "amount":5.24, - "price_int":"19084000", - "amount_int":"524000000", - "stamp":"1312121522273329" - }, - { - "price":200, - "amount":129.1, - "price_int":"20000000", - "amount_int":"12910000000", - "stamp":"1327162531585880" - }, - { - "price":220, - "amount":10, - "price_int":"22000000", - "amount_int":"1000000000", - "stamp":"1326918023944522" - }, - { - "price":224.89544, - "amount":1, - "price_int":"22489544", - "amount_int":"100000000", - "stamp":"1325508968429683" - }, - { - "price":233.94088, - "amount":10, - "price_int":"23394088", - "amount_int":"1000000000", - "stamp":"1325454614997536" - }, - { - "price":235, - "amount":20, - "price_int":"23500000", - "amount_int":"2000000000", - "stamp":"1313891910124052" - }, - { - "price":240, - "amount":35, - "price_int":"24000000", - "amount_int":"3500000000", - "stamp":"1326918029436455" - }, - { - "price":249.32, - "amount":1, - "price_int":"24932000", - "amount_int":"100000000", - "stamp":"1324269687363416" - }, - { - "price":250, - "amount":1, - "price_int":"25000000", - "amount_int":"100000000", - "stamp":"1317913335047823" - }, - { - "price":250.84271, - "amount":10, - "price_int":"25084271", - "amount_int":"1000000000", - "stamp":"1315753787964598" - }, - { - "price":260, - "amount":10, - "price_int":"26000000", - "amount_int":"1000000000", - "stamp":"1326918035789038" - }, - { - "price":280, - "amount":10, - "price_int":"28000000", - "amount_int":"1000000000", - "stamp":"1326918042275404" - }, - { - "price":287.89421, - "amount":1, - "price_int":"28789421", - "amount_int":"100000000", - "stamp":"1325510506165928" - }, - { - "price":290, - "amount":1, - "price_int":"29000000", - "amount_int":"100000000", - "stamp":"1326316042383198" - }, - { - "price":299.9, - "amount":10, - "price_int":"29990000", - "amount_int":"1000000000", - "stamp":"1318013860064881" - }, - { - "price":300, - "amount":10.01, - "price_int":"30000000", - "amount_int":"1001000000", - "stamp":"1326918057129193" - }, - { - "price":320, - "amount":10, - "price_int":"32000000", - "amount_int":"1000000000", - "stamp":"1326918097982618" - }, - { - "price":330, - "amount":1, - "price_int":"33000000", - "amount_int":"100000000", - "stamp":"1319988834437767" - }, - { - "price":340, - "amount":10, - "price_int":"34000000", - "amount_int":"1000000000", - "stamp":"1326918105334477" - }, - { - "price":390, - "amount":1, - "price_int":"39000000", - "amount_int":"100000000", - "stamp":"1326316047217602" - }, - { - "price":397.31, - "amount":1, - "price_int":"39731000", - "amount_int":"100000000", - "stamp":"1324269814468150" - }, - { - "price":399.99, - "amount":5, - "price_int":"39999000", - "amount_int":"500000000", - "stamp":"1312571048206455" - }, - { - "price":400, - "amount":40, - "price_int":"40000000", - "amount_int":"4000000000", - "stamp":"1323973264954765" - }, - { - "price":490, - "amount":1, - "price_int":"49000000", - "amount_int":"100000000", - "stamp":"1326316052152966" - }, - { - "price":499.9, - "amount":10, - "price_int":"49990000", - "amount_int":"1000000000", - "stamp":"1318013859597878" - }, - { - "price":500, - "amount":48.90704115, - "price_int":"50000000", - "amount_int":"4890704115", - "stamp":"1327056120123966" - }, - { - "price":570, - "amount":1, - "price_int":"57000000", - "amount_int":"100000000", - "stamp":"1319988951884340" - }, - { - "price":576.35964, - "amount":5.56117627, - "price_int":"57635964", - "amount_int":"556117627", - "stamp":"1312121811211183" - }, - { - "price":700, - "amount":0.01, - "price_int":"70000000", - "amount_int":"1000000", - "stamp":"1315790222907414" - }, - { - "price":799, - "amount":2.15831003, - "price_int":"79900000", - "amount_int":"215831003", - "stamp":"1321100270525121" - }, - { - "price":799.9, - "amount":10, - "price_int":"79990000", - "amount_int":"1000000000", - "stamp":"1318326421015795" - }, - { - "price":800, - "amount":0.01, - "price_int":"80000000", - "amount_int":"1000000", - "stamp":"1315790217658571" - }, - { - "price":849.89766, - "amount":0.5, - "price_int":"84989766", - "amount_int":"50000000", - "stamp":"1325766442593356" - }, - { - "price":900, - "amount":1.01, - "price_int":"90000000", - "amount_int":"101000000", - "stamp":"1326316128293064" - }, - { - "price":999, - "amount":1.2, - "price_int":"99900000", - "amount_int":"120000000", - "stamp":"1312215568081002" - }, - { - "price":999.9, - "amount":15.001, - "price_int":"99990000", - "amount_int":"1500100000", - "stamp":"1318830500758109" - }, - { - "price":999.99, - "amount":5.105, - "price_int":"99999000", - "amount_int":"510500000", - "stamp":"1312571033962189" - }, - { - "price":1000, - "amount":151.94187654, - "price_int":"100000000", - "amount_int":"15194187654", - "stamp":"1328398461332845" - }, - { - "price":1005, - "amount":10, - "price_int":"100500000", - "amount_int":"1000000000", - "stamp":"1314628939002557" - }, - { - "price":1056.18, - "amount":0.5, - "price_int":"105618000", - "amount_int":"50000000", - "stamp":"1324269860682139" - }, - { - "price":1277.41075, - "amount":2, - "price_int":"127741075", - "amount_int":"200000000", - "stamp":"1323766487869510" - }, - { - "price":1328.90365, - "amount":9.03, - "price_int":"132890365", - "amount_int":"903000000", - "stamp":"1323860075194643" - }, - { - "price":1498.89544, - "amount":0.5, - "price_int":"149889544", - "amount_int":"50000000", - "stamp":"1325509062826401" - }, - { - "price":1499, - "amount":10, - "price_int":"149900000", - "amount_int":"1000000000", - "stamp":"1318955028067897" - }, - { - "price":1500, - "amount":10, - "price_int":"150000000", - "amount_int":"1000000000", - "stamp":"1326533928479477" - }, - { - "price":1900, - "amount":1, - "price_int":"190000000", - "amount_int":"100000000", - "stamp":"1326316135449161" - }, - { - "price":1999, - "amount":10, - "price_int":"199900000", - "amount_int":"1000000000", - "stamp":"1318955067566448" - }, - { - "price":2000, - "amount":7, - "price_int":"200000000", - "amount_int":"700000000", - "stamp":"1327575103833588" - }, - { - "price":2300, - "amount":0.86, - "price_int":"230000000", - "amount_int":"86000000", - "stamp":"1312661163329304" - }, - { - "price":2331, - "amount":0.5, - "price_int":"233100000", - "amount_int":"50000000", - "stamp":"1319988970012669" - }, - { - "price":2900, - "amount":1, - "price_int":"290000000", - "amount_int":"100000000", - "stamp":"1326316141426494" - }, - { - "price":2999, - "amount":10, - "price_int":"299900000", - "amount_int":"1000000000", - "stamp":"1319283786886781" - }, - { - "price":3200.39502, - "amount":6, - "price_int":"320039502", - "amount_int":"600000000", - "stamp":"1325516106101899" - }, - { - "price":3900, - "amount":1, - "price_int":"390000000", - "amount_int":"100000000", - "stamp":"1326316147284232" - }, - { - "price":3999, - "amount":10, - "price_int":"399900000", - "amount_int":"1000000000", - "stamp":"1319858999413113" - }, - { - "price":4788.22, - "amount":1.987, - "price_int":"478822000", - "amount_int":"198700000", - "stamp":"1312121492785935" - }, - { - "price":4900, - "amount":1, - "price_int":"490000000", - "amount_int":"100000000", - "stamp":"1326316167024047" - }, - { - "price":4999, - "amount":20, - "price_int":"499900000", - "amount_int":"2000000000", - "stamp":"1325839171075731" - }, - { - "price":5000, - "amount":138.74784021, - "price_int":"500000000", - "amount_int":"13874784021", - "stamp":"1327056113786542" - }, - { - "price":5399, - "amount":1.771, - "price_int":"539900000", - "amount_int":"177100000", - "stamp":"1312121622747338" - }, - { - "price":5999, - "amount":20, - "price_int":"599900000", - "amount_int":"2000000000", - "stamp":"1325839181761167" - }, - { - "price":6999, - "amount":20, - "price_int":"699900000", - "amount_int":"2000000000", - "stamp":"1325839191208120" - }, - { - "price":7999, - "amount":20, - "price_int":"799900000", - "amount_int":"2000000000", - "stamp":"1325839196559720" - }, - { - "price":8999, - "amount":20, - "price_int":"899900000", - "amount_int":"2000000000", - "stamp":"1325839202488951" - }, - { - "price":9999, - "amount":21, - "price_int":"999900000", - "amount_int":"2100000000", - "stamp":"1325839210497123" - }, - { - "price":10000, - "amount":27.638, - "price_int":"1000000000", - "amount_int":"2763800000", - "stamp":"1327055733493606" - }, - { - "price":11117.82099, - "amount":1.72603437, - "price_int":"1111782099", - "amount_int":"172603437", - "stamp":"1313718481111049" - }, - { - "price":17763.11727, - "amount":2, - "price_int":"1776311727", - "amount_int":"200000000", - "stamp":"1323766576107361" - }, - { - "price":17933, - "amount":0.5, - "price_int":"1793300000", - "amount_int":"50000000", - "stamp":"1319988970059886" - }, - { - "price":19999, - "amount":30, - "price_int":"1999900000", - "amount_int":"3000000000", - "stamp":"1325839252668328" - }, - { - "price":25000, - "amount":1, - "price_int":"2500000000", - "amount_int":"100000000", - "stamp":"1327056274352269" - }, - { - "price":32003.9502, - "amount":1, - "price_int":"3200395020", - "amount_int":"100000000", - "stamp":"1325516119142901" - }, - { - "price":35000, - "amount":2, - "price_int":"3500000000", - "amount_int":"200000000", - "stamp":"1323974080445939" - }, - { - "price":39999, - "amount":0.46, - "price_int":"3999900000", - "amount_int":"46000000", - "stamp":"1325839270044885" - }, - { - "price":50000, - "amount":1, - "price_int":"5000000000", - "amount_int":"100000000", - "stamp":"1327056106080227" - }, - { - "price":74000, - "amount":4, - "price_int":"7400000000", - "amount_int":"400000000", - "stamp":"1323973681247201" - }, - { - "price":99999, - "amount":0.6202774, - "price_int":"9999900000", - "amount_int":"62027740", - "stamp":"1312141558718267" - }, - { - "price":99999.1, - "amount":0.1, - "price_int":"9999910000", - "amount_int":"10000000", - "stamp":"1320660307160621" - }, - { - "price":100000, - "amount":14.01, - "price_int":"10000000000", - "amount_int":"1401000000", - "stamp":"1327299281639116" - }, - { - "price":179330, - "amount":0.5, - "price_int":"17933000000", - "amount_int":"50000000", - "stamp":"1319988970101968" - }, - { - "price":200000, - "amount":1, - "price_int":"20000000000", - "amount_int":"100000000", - "stamp":"1326711186500143" - }, - { - "price":250000, - "amount":2, - "price_int":"25000000000", - "amount_int":"200000000", - "stamp":"1327056241995574" - }, - { - "price":320039.50203, - "amount":1, - "price_int":"32003950203", - "amount_int":"100000000", - "stamp":"1325516130079657" - }, - { - "price":500000, - "amount":2, - "price_int":"50000000000", - "amount_int":"200000000", - "stamp":"1327056093270429" - }, - { - "price":700000, - "amount":1, - "price_int":"70000000000", - "amount_int":"100000000", - "stamp":"1323973914678073" - }, - { - "price":750000, - "amount":1, - "price_int":"75000000000", - "amount_int":"100000000", - "stamp":"1327056150056318" - }, - { - "price":1000000, - "amount":15.18071252, - "price_int":"100000000000", - "amount_int":"1518071252", - "stamp":"1327299327666503" - }, - { - "price":1793300, - "amount":0.25, - "price_int":"179330000000", - "amount_int":"25000000", - "stamp":"1319988970150900" - }, - { - "price":2000000, - "amount":2, - "price_int":"200000000000", - "amount_int":"200000000", - "stamp":"1327056209323091" - }, - { - "price":3500000, - "amount":1, - "price_int":"350000000000", - "amount_int":"100000000", - "stamp":"1325743232566049" - }, - { - "price":5000000, - "amount":1, - "price_int":"500000000000", - "amount_int":"100000000", - "stamp":"1327056215879351" - }, - { - "price":10000000, - "amount":2.01, - "price_int":"1000000000000", - "amount_int":"201000000", - "stamp":"1327056184296770" - }, - { - "price":13368050, - "amount":0.1, - "price_int":"1336805000000", - "amount_int":"10000000", - "stamp":"1323796338971618" - }, - { - "price":17933000, - "amount":0.25, - "price_int":"1793300000000", - "amount_int":"25000000", - "stamp":"1319988970189321" - }, - { - "price":100000000, - "amount":0.01, - "price_int":"10000000000000", - "amount_int":"1000000", - "stamp":"1325739919371943" - }, - { - "price":179330000, - "amount":0.25, - "price_int":"17933000000000", - "amount_int":"25000000", - "stamp":"1319988970239145" - }, - { - "price":1793300000, - "amount":0.25, - "price_int":"179330000000000", - "amount_int":"25000000", - "stamp":"1319988970283258" - }, - { - "price":17933000000, - "amount":0.25, - "price_int":"1793300000000000", - "amount_int":"25000000", - "stamp":"1319988970327447" - }, - { - "price":179330000000, - "amount":0.25, - "price_int":"17933000000000000", - "amount_int":"25000000", - "stamp":"1319988970379162" - } - ], - "bids":[ - { - "price":1.0e-5, - "amount":25560529.03, - "price_int":"1", - "amount_int":"2556052902999996", - "stamp":"1328398365433958" - }, - { - "price":2.0e-5, - "amount":0.02, - "price_int":"2", - "amount_int":"2000000", - "stamp":"1323840868378228" - }, - { - "price":3.0e-5, - "amount":1337.03, - "price_int":"3", - "amount_int":"133703000000", - "stamp":"1323850788694159" - }, - { - "price":4.0e-5, - "amount":0.02, - "price_int":"4", - "amount_int":"2000000", - "stamp":"1323843650506685" - }, - { - "price":5.0e-5, - "amount":0.01, - "price_int":"5", - "amount_int":"1000000", - "stamp":"1323836669165868" - }, - { - "price":6.0e-5, - "amount":0.03, - "price_int":"6", - "amount_int":"3000000", - "stamp":"1323841995216057" - }, - { - "price":7.0e-5, - "amount":0.02, - "price_int":"7", - "amount_int":"2000000", - "stamp":"1323851927243217" - }, - { - "price":8.0e-5, - "amount":0.01, - "price_int":"8", - "amount_int":"1000000", - "stamp":"1323851865415517" - }, - { - "price":9.0e-5, - "amount":110.78777777, - "price_int":"9", - "amount_int":"11078777777", - "stamp":"1323831743865113" - }, - { - "price":0.0001, - "amount":404641.52, - "price_int":"10", - "amount_int":"40464152000000", - "stamp":"1327499444431466" - }, - { - "price":0.00011, - "amount":50000.03, - "price_int":"11", - "amount_int":"5000003000000", - "stamp":"1323851966415303" - }, - { - "price":0.00012, - "amount":0.01, - "price_int":"12", - "amount_int":"1000000", - "stamp":"1323843548598101" - }, - { - "price":0.00013, - "amount":24438.24831383, - "price_int":"13", - "amount_int":"2443824831383", - "stamp":"1319717257274697" - }, - { - "price":0.00014, - "amount":0.01, - "price_int":"14", - "amount_int":"1000000", - "stamp":"1323839929813083" - }, - { - "price":0.00015, - "amount":0.01, - "price_int":"15", - "amount_int":"1000000", - "stamp":"1323831458895584" - }, - { - "price":0.00016, - "amount":0.02, - "price_int":"16", - "amount_int":"2000000", - "stamp":"1323852015996165" - }, - { - "price":0.00018, - "amount":0.01, - "price_int":"18", - "amount_int":"1000000", - "stamp":"1323851909931180" - }, - { - "price":0.00019, - "amount":0.01, - "price_int":"19", - "amount_int":"1000000", - "stamp":"1323840862998749" - }, - { - "price":0.00022, - "amount":100000.02, - "price_int":"22", - "amount_int":"10000002000000", - "stamp":"1323842397458503" - }, - { - "price":0.00024, - "amount":0.02, - "price_int":"24", - "amount_int":"2000000", - "stamp":"1323851993193075" - }, - { - "price":0.00025, - "amount":0.04, - "price_int":"25", - "amount_int":"4000000", - "stamp":"1323851826685040" - }, - { - "price":0.00026, - "amount":0.02, - "price_int":"26", - "amount_int":"2000000", - "stamp":"1323842014008096" - }, - { - "price":0.00028, - "amount":0.01, - "price_int":"28", - "amount_int":"1000000", - "stamp":"1323843557383918" - }, - { - "price":0.00029, - "amount":100000.01, - "price_int":"29", - "amount_int":"10000001000000", - "stamp":"1323851763702352" - }, - { - "price":0.0003, - "amount":0.01, - "price_int":"30", - "amount_int":"1000000", - "stamp":"1323851955687560" - }, - { - "price":0.00031, - "amount":0.01, - "price_int":"31", - "amount_int":"1000000", - "stamp":"1323831463989435" - }, - { - "price":0.00032, - "amount":0.02, - "price_int":"32", - "amount_int":"2000000", - "stamp":"1323843265995444" - }, - { - "price":0.00033, - "amount":0.01, - "price_int":"33", - "amount_int":"1000000", - "stamp":"1323843929599288" - }, - { - "price":0.00036, - "amount":0.02, - "price_int":"36", - "amount_int":"2000000", - "stamp":"1323842461997749" - }, - { - "price":0.00037, - "amount":0.03, - "price_int":"37", - "amount_int":"3000000", - "stamp":"1323842002740158" - }, - { - "price":0.00038, - "amount":0.01, - "price_int":"38", - "amount_int":"1000000", - "stamp":"1323851906629155" - }, - { - "price":0.00039, - "amount":0.02, - "price_int":"39", - "amount_int":"2000000", - "stamp":"1323842457061239" - }, - { - "price":0.0004, - "amount":0.01, - "price_int":"40", - "amount_int":"1000000", - "stamp":"1323836441911155" - }, - { - "price":0.00043, - "amount":0.02, - "price_int":"43", - "amount_int":"2000000", - "stamp":"1323851977577719" - }, - { - "price":0.00044, - "amount":0.02, - "price_int":"44", - "amount_int":"2000000", - "stamp":"1323831704632919" - }, - { - "price":0.00045, - "amount":0.02, - "price_int":"45", - "amount_int":"2000000", - "stamp":"1323841953981748" - }, - { - "price":0.00046, - "amount":0.03, - "price_int":"46", - "amount_int":"3000000", - "stamp":"1323851761267060" - }, - { - "price":0.00048, - "amount":0.01, - "price_int":"48", - "amount_int":"1000000", - "stamp":"1323841987649645" - }, - { - "price":0.00049, - "amount":0.04, - "price_int":"49", - "amount_int":"4000000", - "stamp":"1323851786089452" - }, - { - "price":0.0005, - "amount":28.69, - "price_int":"50", - "amount_int":"2869000000", - "stamp":"1323840856982606" - }, - { - "price":0.00051, - "amount":0.01, - "price_int":"51", - "amount_int":"1000000", - "stamp":"1323843497157495" - }, - { - "price":0.00053, - "amount":0.03, - "price_int":"53", - "amount_int":"3000000", - "stamp":"1323840905664685" - }, - { - "price":0.00055, - "amount":0.02, - "price_int":"55", - "amount_int":"2000000", - "stamp":"1323851968510939" - }, - { - "price":0.00056, - "amount":0.01, - "price_int":"56", - "amount_int":"1000000", - "stamp":"1323843113011179" - }, - { - "price":0.00057, - "amount":0.03, - "price_int":"57", - "amount_int":"3000000", - "stamp":"1323842312910176" - }, - { - "price":0.00058, - "amount":0.01, - "price_int":"58", - "amount_int":"1000000", - "stamp":"1323831989496603" - }, - { - "price":0.00059, - "amount":0.02, - "price_int":"59", - "amount_int":"2000000", - "stamp":"1323851892441047" - }, - { - "price":0.00061, - "amount":0.01, - "price_int":"61", - "amount_int":"1000000", - "stamp":"1323841987784951" - }, - { - "price":0.00062, - "amount":0.04, - "price_int":"62", - "amount_int":"4000000", - "stamp":"1323842034483769" - }, - { - "price":0.00065, - "amount":0.01, - "price_int":"65", - "amount_int":"1000000", - "stamp":"1323851954026692" - }, - { - "price":0.00066, - "amount":0.02, - "price_int":"66", - "amount_int":"2000000", - "stamp":"1323841962966515" - }, - { - "price":0.00067, - "amount":0.02, - "price_int":"67", - "amount_int":"2000000", - "stamp":"1323851966146367" - }, - { - "price":0.00068, - "amount":0.02, - "price_int":"68", - "amount_int":"2000000", - "stamp":"1323836691919108" - }, - { - "price":0.00069, - "amount":0.01, - "price_int":"69", - "amount_int":"1000000", - "stamp":"1323852018361722" - }, - { - "price":0.0007, - "amount":0.01, - "price_int":"70", - "amount_int":"1000000", - "stamp":"1323850699249290" - }, - { - "price":0.00072, - "amount":0.03, - "price_int":"72", - "amount_int":"3000000", - "stamp":"1323840660623112" - }, - { - "price":0.00073, - "amount":0.02, - "price_int":"73", - "amount_int":"2000000", - "stamp":"1323842657313601" - }, - { - "price":0.00074, - "amount":0.02, - "price_int":"74", - "amount_int":"2000000", - "stamp":"1323850559839635" - }, - { - "price":0.00075, - "amount":0.01, - "price_int":"75", - "amount_int":"1000000", - "stamp":"1323842315866009" - }, - { - "price":0.00076, - "amount":1000, - "price_int":"76", - "amount_int":"100000000000", - "stamp":"1319016869103085" - }, - { - "price":0.00077, - "amount":0.02, - "price_int":"77", - "amount_int":"2000000", - "stamp":"1323851908304045" - }, - { - "price":0.00078, - "amount":0.02, - "price_int":"78", - "amount_int":"2000000", - "stamp":"1323851964446579" - }, - { - "price":0.00079, - "amount":0.03, - "price_int":"79", - "amount_int":"3000000", - "stamp":"1323840891113649" - }, - { - "price":0.0008, - "amount":0.01, - "price_int":"80", - "amount_int":"1000000", - "stamp":"1323831620184793" - }, - { - "price":0.00081, - "amount":0.04, - "price_int":"81", - "amount_int":"4000000", - "stamp":"1323841952607210" - }, - { - "price":0.00082, - "amount":0.01, - "price_int":"82", - "amount_int":"1000000", - "stamp":"1323850701227417" - }, - { - "price":0.00083, - "amount":0.01, - "price_int":"83", - "amount_int":"1000000", - "stamp":"1323841998646005" - }, - { - "price":0.00084, - "amount":0.01, - "price_int":"84", - "amount_int":"1000000", - "stamp":"1323836659677733" - }, - { - "price":0.00085, - "amount":0.03, - "price_int":"85", - "amount_int":"3000000", - "stamp":"1323841993855452" - }, - { - "price":0.00086, - "amount":0.01, - "price_int":"86", - "amount_int":"1000000", - "stamp":"1323840829652173" - }, - { - "price":0.00087, - "amount":0.01, - "price_int":"87", - "amount_int":"1000000", - "stamp":"1323840905212164" - }, - { - "price":0.00088, - "amount":0.02, - "price_int":"88", - "amount_int":"2000000", - "stamp":"1323841869044727" - }, - { - "price":0.0009, - "amount":0.01, - "price_int":"90", - "amount_int":"1000000", - "stamp":"1323840899694840" - }, - { - "price":0.00091, - "amount":0.01, - "price_int":"91", - "amount_int":"1000000", - "stamp":"1323847984958263" - }, - { - "price":0.00092, - "amount":0.02, - "price_int":"92", - "amount_int":"2000000", - "stamp":"1323851853836338" - }, - { - "price":0.00093, - "amount":0.01, - "price_int":"93", - "amount_int":"1000000", - "stamp":"1323841999374379" - }, - { - "price":0.00094, - "amount":0.02, - "price_int":"94", - "amount_int":"2000000", - "stamp":"1323842399864929" - }, - { - "price":0.00095, - "amount":0.01, - "price_int":"95", - "amount_int":"1000000", - "stamp":"1323841973673544" - }, - { - "price":0.00096, - "amount":0.06, - "price_int":"96", - "amount_int":"6000000", - "stamp":"1323843515833900" - }, - { - "price":0.00097, - "amount":0.04, - "price_int":"97", - "amount_int":"4000000", - "stamp":"1323843451064649" - }, - { - "price":0.00099, - "amount":0.02, - "price_int":"99", - "amount_int":"2000000", - "stamp":"1323851990034045" - }, - { - "price":0.001, - "amount":60991.96, - "price_int":"100", - "amount_int":"6099196000000", - "stamp":"1327499448399239" - }, - { - "price":0.00101, - "amount":0.01, - "price_int":"101", - "amount_int":"1000000", - "stamp":"1323851793306324" - }, - { - "price":0.00102, - "amount":0.04, - "price_int":"102", - "amount_int":"4000000", - "stamp":"1323841975230030" - }, - { - "price":0.00103, - "amount":0.05, - "price_int":"103", - "amount_int":"5000000", - "stamp":"1323843279078950" - }, - { - "price":0.00104, - "amount":0.04, - "price_int":"104", - "amount_int":"4000000", - "stamp":"1323851849526041" - }, - { - "price":0.00105, - "amount":0.02, - "price_int":"105", - "amount_int":"2000000", - "stamp":"1323840824764562" - }, - { - "price":0.00106, - "amount":0.02, - "price_int":"106", - "amount_int":"2000000", - "stamp":"1323842530777483" - }, - { - "price":0.00107, - "amount":0.04, - "price_int":"107", - "amount_int":"4000000", - "stamp":"1323851986738664" - }, - { - "price":0.00108, - "amount":0.02, - "price_int":"108", - "amount_int":"2000000", - "stamp":"1323841868540494" - }, - { - "price":0.00109, - "amount":500.03, - "price_int":"109", - "amount_int":"50003000000", - "stamp":"1323841980648072" - }, - { - "price":0.0011, - "amount":0.01, - "price_int":"110", - "amount_int":"1000000", - "stamp":"1323840859698802" - }, - { - "price":0.00111, - "amount":0.05, - "price_int":"111", - "amount_int":"5000000", - "stamp":"1323850540983235" - }, - { - "price":0.00112, - "amount":0.02, - "price_int":"112", - "amount_int":"2000000", - "stamp":"1323843645711200" - }, - { - "price":0.00113, - "amount":0.01, - "price_int":"113", - "amount_int":"1000000", - "stamp":"1323832002471894" - }, - { - "price":0.00114, - "amount":0.01, - "price_int":"114", - "amount_int":"1000000", - "stamp":"1323851918170464" - }, - { - "price":0.00116, - "amount":0.01, - "price_int":"116", - "amount_int":"1000000", - "stamp":"1323840824954177" - }, - { - "price":0.00117, - "amount":0.01, - "price_int":"117", - "amount_int":"1000000", - "stamp":"1323843150135939" - }, - { - "price":0.00118, - "amount":0.01, - "price_int":"118", - "amount_int":"1000000", - "stamp":"1323840892926579" - }, - { - "price":0.00119, - "amount":0.02, - "price_int":"119", - "amount_int":"2000000", - "stamp":"1323842664836055" - }, - { - "price":0.0012, - "amount":0.01, - "price_int":"120", - "amount_int":"1000000", - "stamp":"1323831873609716" - }, - { - "price":0.00121, - "amount":0.02, - "price_int":"121", - "amount_int":"2000000", - "stamp":"1323840858589982" - }, - { - "price":0.00122, - "amount":0.01, - "price_int":"122", - "amount_int":"1000000", - "stamp":"1323851982512765" - }, - { - "price":0.00123, - "amount":0.01, - "price_int":"123", - "amount_int":"1000000", - "stamp":"1323840660080678" - }, - { - "price":0.00124, - "amount":0.01, - "price_int":"124", - "amount_int":"1000000", - "stamp":"1323831515729562" - }, - { - "price":0.00126, - "amount":0.01, - "price_int":"126", - "amount_int":"1000000", - "stamp":"1323851968290260" - }, - { - "price":0.00127, - "amount":1000.03, - "price_int":"127", - "amount_int":"100003000000", - "stamp":"1323843498622275" - }, - { - "price":0.00129, - "amount":0.01, - "price_int":"129", - "amount_int":"1000000", - "stamp":"1323836874305638" - }, - { - "price":0.00132, - "amount":0.02, - "price_int":"132", - "amount_int":"2000000", - "stamp":"1323843470488391" - }, - { - "price":0.00134, - "amount":0.01, - "price_int":"134", - "amount_int":"1000000", - "stamp":"1323843494479900" - }, - { - "price":0.00135, - "amount":0.03, - "price_int":"135", - "amount_int":"3000000", - "stamp":"1323850791678196" - }, - { - "price":0.00136, - "amount":0.03, - "price_int":"136", - "amount_int":"3000000", - "stamp":"1323852080639878" - }, - { - "price":0.00137, - "amount":0.01, - "price_int":"137", - "amount_int":"1000000", - "stamp":"1323840042255106" - }, - { - "price":0.00138, - "amount":0.01, - "price_int":"138", - "amount_int":"1000000", - "stamp":"1323841975154583" - }, - { - "price":0.00139, - "amount":0.01, - "price_int":"139", - "amount_int":"1000000", - "stamp":"1323832012060222" - }, - { - "price":0.0014, - "amount":0.02, - "price_int":"140", - "amount_int":"2000000", - "stamp":"1323850514440367" - }, - { - "price":0.00141, - "amount":0.02, - "price_int":"141", - "amount_int":"2000000", - "stamp":"1323851802992724" - }, - { - "price":0.00142, - "amount":0.02, - "price_int":"142", - "amount_int":"2000000", - "stamp":"1323840299654058" - }, - { - "price":0.00143, - "amount":0.01, - "price_int":"143", - "amount_int":"1000000", - "stamp":"1323843537986372" - }, - { - "price":0.00144, - "amount":0.02, - "price_int":"144", - "amount_int":"2000000", - "stamp":"1323851774392568" - }, - { - "price":0.00145, - "amount":0.02, - "price_int":"145", - "amount_int":"2000000", - "stamp":"1323841962907304" - }, - { - "price":0.00146, - "amount":0.01, - "price_int":"146", - "amount_int":"1000000", - "stamp":"1323840894254463" - }, - { - "price":0.00147, - "amount":0.02, - "price_int":"147", - "amount_int":"2000000", - "stamp":"1323842288313067" - }, - { - "price":0.00148, - "amount":0.01, - "price_int":"148", - "amount_int":"1000000", - "stamp":"1323852071852413" - }, - { - "price":0.00149, - "amount":0.03, - "price_int":"149", - "amount_int":"3000000", - "stamp":"1323852040578463" - }, - { - "price":0.00151, - "amount":0.03, - "price_int":"151", - "amount_int":"3000000", - "stamp":"1323841996596130" - }, - { - "price":0.00152, - "amount":0.01, - "price_int":"152", - "amount_int":"1000000", - "stamp":"1323842106424796" - }, - { - "price":0.00153, - "amount":0.01, - "price_int":"153", - "amount_int":"1000000", - "stamp":"1323831558268535" - }, - { - "price":0.00154, - "amount":0.04, - "price_int":"154", - "amount_int":"4000000", - "stamp":"1323851921513626" - }, - { - "price":0.00155, - "amount":0.02, - "price_int":"155", - "amount_int":"2000000", - "stamp":"1323836497431328" - }, - { - "price":0.00157, - "amount":0.01, - "price_int":"157", - "amount_int":"1000000", - "stamp":"1323831436299842" - }, - { - "price":0.00158, - "amount":0.01, - "price_int":"158", - "amount_int":"1000000", - "stamp":"1323839879259548" - }, - { - "price":0.00159, - "amount":0.01, - "price_int":"159", - "amount_int":"1000000", - "stamp":"1323851946232075" - }, - { - "price":0.0016, - "amount":0.01, - "price_int":"160", - "amount_int":"1000000", - "stamp":"1323843504621727" - }, - { - "price":0.00161, - "amount":0.02, - "price_int":"161", - "amount_int":"2000000", - "stamp":"1323836593459136" - }, - { - "price":0.00162, - "amount":0.01, - "price_int":"162", - "amount_int":"1000000", - "stamp":"1323831465732916" - }, - { - "price":0.00163, - "amount":0.01, - "price_int":"163", - "amount_int":"1000000", - "stamp":"1323851915112247" - }, - { - "price":0.00164, - "amount":0.01, - "price_int":"164", - "amount_int":"1000000", - "stamp":"1323842005246672" - }, - { - "price":0.00165, - "amount":0.02, - "price_int":"165", - "amount_int":"2000000", - "stamp":"1323851845621610" - }, - { - "price":0.00166, - "amount":0.01, - "price_int":"166", - "amount_int":"1000000", - "stamp":"1323840140668893" - }, - { - "price":0.00167, - "amount":0.02, - "price_int":"167", - "amount_int":"2000000", - "stamp":"1323841991537377" - }, - { - "price":0.0017, - "amount":0.01, - "price_int":"170", - "amount_int":"1000000", - "stamp":"1323849885137827" - }, - { - "price":0.00171, - "amount":0.01, - "price_int":"171", - "amount_int":"1000000", - "stamp":"1323831999492051" - }, - { - "price":0.00173, - "amount":0.03, - "price_int":"173", - "amount_int":"3000000", - "stamp":"1323840048535020" - }, - { - "price":0.00174, - "amount":0.03, - "price_int":"174", - "amount_int":"3000000", - "stamp":"1323840908250964" - }, - { - "price":0.00175, - "amount":0.01, - "price_int":"175", - "amount_int":"1000000", - "stamp":"1323836836830273" - }, - { - "price":0.00176, - "amount":0.01, - "price_int":"176", - "amount_int":"1000000", - "stamp":"1323843555574004" - }, - { - "price":0.00177, - "amount":0.01, - "price_int":"177", - "amount_int":"1000000", - "stamp":"1323831469666067" - }, - { - "price":0.00178, - "amount":0.05, - "price_int":"178", - "amount_int":"5000000", - "stamp":"1323847963864894" - }, - { - "price":0.00179, - "amount":0.03, - "price_int":"179", - "amount_int":"3000000", - "stamp":"1323850806080329" - }, - { - "price":0.0018, - "amount":0.02, - "price_int":"180", - "amount_int":"2000000", - "stamp":"1323842501250167" - }, - { - "price":0.00181, - "amount":0.01, - "price_int":"181", - "amount_int":"1000000", - "stamp":"1323850557088845" - }, - { - "price":0.00182, - "amount":0.01, - "price_int":"182", - "amount_int":"1000000", - "stamp":"1323851756146870" - }, - { - "price":0.00183, - "amount":0.01, - "price_int":"183", - "amount_int":"1000000", - "stamp":"1323842391844618" - }, - { - "price":0.00186, - "amount":0.01, - "price_int":"186", - "amount_int":"1000000", - "stamp":"1323831829916398" - }, - { - "price":0.00188, - "amount":0.02, - "price_int":"188", - "amount_int":"2000000", - "stamp":"1323851931432802" - }, - { - "price":0.0019, - "amount":0.01, - "price_int":"190", - "amount_int":"1000000", - "stamp":"1323836622720817" - }, - { - "price":0.00191, - "amount":0.03, - "price_int":"191", - "amount_int":"3000000", - "stamp":"1323851817274483" - }, - { - "price":0.00192, - "amount":0.01, - "price_int":"192", - "amount_int":"1000000", - "stamp":"1323841969240554" - }, - { - "price":0.00193, - "amount":0.01, - "price_int":"193", - "amount_int":"1000000", - "stamp":"1323851987687156" - }, - { - "price":0.00195, - "amount":0.01, - "price_int":"195", - "amount_int":"1000000", - "stamp":"1323851893795712" - }, - { - "price":0.00196, - "amount":0.01, - "price_int":"196", - "amount_int":"1000000", - "stamp":"1323850656031919" - }, - { - "price":0.00197, - "amount":0.01, - "price_int":"197", - "amount_int":"1000000", - "stamp":"1323840883858707" - }, - { - "price":0.00199, - "amount":0.02, - "price_int":"199", - "amount_int":"2000000", - "stamp":"1323841997743374" - }, - { - "price":0.002, - "amount":0.02, - "price_int":"200", - "amount_int":"2000000", - "stamp":"1323851943508933" - }, - { - "price":0.00201, - "amount":0.01, - "price_int":"201", - "amount_int":"1000000", - "stamp":"1323831671078437" - }, - { - "price":0.00202, - "amount":0.01, - "price_int":"202", - "amount_int":"1000000", - "stamp":"1323840137135061" - }, - { - "price":0.00203, - "amount":0.01, - "price_int":"203", - "amount_int":"1000000", - "stamp":"1323851899582994" - }, - { - "price":0.00204, - "amount":0.02, - "price_int":"204", - "amount_int":"2000000", - "stamp":"1323842467027958" - }, - { - "price":0.00205, - "amount":0.01, - "price_int":"205", - "amount_int":"1000000", - "stamp":"1323851877816178" - }, - { - "price":0.00206, - "amount":0.01, - "price_int":"206", - "amount_int":"1000000", - "stamp":"1323831512083079" - }, - { - "price":0.00207, - "amount":0.04, - "price_int":"207", - "amount_int":"4000000", - "stamp":"1323852078585657" - }, - { - "price":0.00208, - "amount":0.01, - "price_int":"208", - "amount_int":"1000000", - "stamp":"1323831627091145" - }, - { - "price":0.0021, - "amount":0.02, - "price_int":"210", - "amount_int":"2000000", - "stamp":"1323844013793500" - }, - { - "price":0.00211, - "amount":0.02, - "price_int":"211", - "amount_int":"2000000", - "stamp":"1323851972750355" - }, - { - "price":0.00212, - "amount":0.02, - "price_int":"212", - "amount_int":"2000000", - "stamp":"1323851998836835" - }, - { - "price":0.00213, - "amount":0.03, - "price_int":"213", - "amount_int":"3000000", - "stamp":"1323851959411788" - }, - { - "price":0.00214, - "amount":0.01, - "price_int":"214", - "amount_int":"1000000", - "stamp":"1323843260836198" - }, - { - "price":0.00215, - "amount":0.01, - "price_int":"215", - "amount_int":"1000000", - "stamp":"1323841991534642" - }, - { - "price":0.00217, - "amount":0.02, - "price_int":"217", - "amount_int":"2000000", - "stamp":"1323842888891461" - }, - { - "price":0.00218, - "amount":0.02, - "price_int":"218", - "amount_int":"2000000", - "stamp":"1323851985216523" - }, - { - "price":0.0022, - "amount":10000.01, - "price_int":"220", - "amount_int":"1000001000000", - "stamp":"1323831689028425" - }, - { - "price":0.00221, - "amount":0.01, - "price_int":"221", - "amount_int":"1000000", - "stamp":"1323836593977786" - }, - { - "price":0.00222, - "amount":0.01, - "price_int":"222", - "amount_int":"1000000", - "stamp":"1323843467309694" - }, - { - "price":0.00223, - "amount":0.01, - "price_int":"223", - "amount_int":"1000000", - "stamp":"1323831499790034" - }, - { - "price":0.00224, - "amount":0.02, - "price_int":"224", - "amount_int":"2000000", - "stamp":"1323840875542875" - }, - { - "price":0.00225, - "amount":0.01, - "price_int":"225", - "amount_int":"1000000", - "stamp":"1323836619797542" - }, - { - "price":0.00226, - "amount":0.01, - "price_int":"226", - "amount_int":"1000000", - "stamp":"1323841983541099" - }, - { - "price":0.00228, - "amount":0.01, - "price_int":"228", - "amount_int":"1000000", - "stamp":"1323831787164699" - }, - { - "price":0.00231, - "amount":0.01, - "price_int":"231", - "amount_int":"1000000", - "stamp":"1323831523950244" - }, - { - "price":0.00232, - "amount":0.01, - "price_int":"232", - "amount_int":"1000000", - "stamp":"1323851942963736" - }, - { - "price":0.00233, - "amount":0.04, - "price_int":"233", - "amount_int":"4000000", - "stamp":"1323852085711244" - }, - { - "price":0.00235, - "amount":0.01, - "price_int":"235", - "amount_int":"1000000", - "stamp":"1323851995329985" - }, - { - "price":0.00236, - "amount":0.02, - "price_int":"236", - "amount_int":"2000000", - "stamp":"1323842347075168" - }, - { - "price":0.00238, - "amount":0.01, - "price_int":"238", - "amount_int":"1000000", - "stamp":"1323851957331289" - }, - { - "price":0.00239, - "amount":0.01, - "price_int":"239", - "amount_int":"1000000", - "stamp":"1323831580520944" - }, - { - "price":0.0024, - "amount":0.03, - "price_int":"240", - "amount_int":"3000000", - "stamp":"1323843926054179" - }, - { - "price":0.00241, - "amount":0.01, - "price_int":"241", - "amount_int":"1000000", - "stamp":"1323851879475433" - }, - { - "price":0.00243, - "amount":0.05, - "price_int":"243", - "amount_int":"5000000", - "stamp":"1323851902875737" - }, - { - "price":0.00245, - "amount":0.01, - "price_int":"245", - "amount_int":"1000000", - "stamp":"1323851830410716" - }, - { - "price":0.00247, - "amount":0.02, - "price_int":"247", - "amount_int":"2000000", - "stamp":"1323843975153622" - }, - { - "price":0.00248, - "amount":0.03, - "price_int":"248", - "amount_int":"3000000", - "stamp":"1323843978539959" - }, - { - "price":0.00249, - "amount":0.03, - "price_int":"249", - "amount_int":"3000000", - "stamp":"1323851888909736" - }, - { - "price":0.0025, - "amount":0.02, - "price_int":"250", - "amount_int":"2000000", - "stamp":"1323843166963780" - }, - { - "price":0.00251, - "amount":0.02, - "price_int":"251", - "amount_int":"2000000", - "stamp":"1323840862533651" - }, - { - "price":0.00252, - "amount":0.01, - "price_int":"252", - "amount_int":"1000000", - "stamp":"1323831503768829" - }, - { - "price":0.00253, - "amount":0.01, - "price_int":"253", - "amount_int":"1000000", - "stamp":"1323831839183123" - }, - { - "price":0.00255, - "amount":0.02, - "price_int":"255", - "amount_int":"2000000", - "stamp":"1323841976702395" - }, - { - "price":0.00256, - "amount":0.03, - "price_int":"256", - "amount_int":"3000000", - "stamp":"1323842417992027" - }, - { - "price":0.00257, - "amount":0.01, - "price_int":"257", - "amount_int":"1000000", - "stamp":"1323840869948662" - }, - { - "price":0.00258, - "amount":0.02, - "price_int":"258", - "amount_int":"2000000", - "stamp":"1323851758725239" - }, - { - "price":0.00261, - "amount":0.01, - "price_int":"261", - "amount_int":"1000000", - "stamp":"1323841986275020" - }, - { - "price":0.00262, - "amount":0.02, - "price_int":"262", - "amount_int":"2000000", - "stamp":"1323851961892390" - }, - { - "price":0.00263, - "amount":0.01, - "price_int":"263", - "amount_int":"1000000", - "stamp":"1323851874151550" - }, - { - "price":0.00265, - "amount":0.03, - "price_int":"265", - "amount_int":"3000000", - "stamp":"1323832210421314" - }, - { - "price":0.00266, - "amount":0.01, - "price_int":"266", - "amount_int":"1000000", - "stamp":"1323841973257527" - }, - { - "price":0.00268, - "amount":0.01, - "price_int":"268", - "amount_int":"1000000", - "stamp":"1323841976666340" - }, - { - "price":0.00269, - "amount":0.01, - "price_int":"269", - "amount_int":"1000000", - "stamp":"1323836661563588" - }, - { - "price":0.0027, - "amount":0.01, - "price_int":"270", - "amount_int":"1000000", - "stamp":"1323831681347209" - }, - { - "price":0.00271, - "amount":1, - "price_int":"271", - "amount_int":"100000000", - "stamp":"1312559897704093" - }, - { - "price":0.00272, - "amount":0.02, - "price_int":"272", - "amount_int":"2000000", - "stamp":"1323836613284335" - }, - { - "price":0.00273, - "amount":0.03, - "price_int":"273", - "amount_int":"3000000", - "stamp":"1323840885860876" - }, - { - "price":0.00274, - "amount":0.01, - "price_int":"274", - "amount_int":"1000000", - "stamp":"1323851753564366" - }, - { - "price":0.00276, - "amount":0.01, - "price_int":"276", - "amount_int":"1000000", - "stamp":"1323832124770813" - }, - { - "price":0.00277, - "amount":0.03, - "price_int":"277", - "amount_int":"3000000", - "stamp":"1323851838695460" - }, - { - "price":0.00278, - "amount":0.02, - "price_int":"278", - "amount_int":"2000000", - "stamp":"1323840136357811" - }, - { - "price":0.0028, - "amount":0.02, - "price_int":"280", - "amount_int":"2000000", - "stamp":"1323842628282068" - }, - { - "price":0.00281, - "amount":0.01, - "price_int":"281", - "amount_int":"1000000", - "stamp":"1323831708195239" - }, - { - "price":0.00283, - "amount":0.02, - "price_int":"283", - "amount_int":"2000000", - "stamp":"1323843313106217" - }, - { - "price":0.00285, - "amount":0.02, - "price_int":"285", - "amount_int":"2000000", - "stamp":"1323851944649400" - }, - { - "price":0.00286, - "amount":0.01, - "price_int":"286", - "amount_int":"1000000", - "stamp":"1323841967301751" - }, - { - "price":0.00287, - "amount":0.02, - "price_int":"287", - "amount_int":"2000000", - "stamp":"1323842567525364" - }, - { - "price":0.00288, - "amount":0.01, - "price_int":"288", - "amount_int":"1000000", - "stamp":"1323831501535315" - }, - { - "price":0.00289, - "amount":0.01, - "price_int":"289", - "amount_int":"1000000", - "stamp":"1323851980039855" - }, - { - "price":0.0029, - "amount":0.01, - "price_int":"290", - "amount_int":"1000000", - "stamp":"1323836758899538" - }, - { - "price":0.00291, - "amount":0.02, - "price_int":"291", - "amount_int":"2000000", - "stamp":"1323851999902994" - }, - { - "price":0.00292, - "amount":0.01, - "price_int":"292", - "amount_int":"1000000", - "stamp":"1323836682030763" - }, - { - "price":0.00293, - "amount":0.02, - "price_int":"293", - "amount_int":"2000000", - "stamp":"1323839952009418" - }, - { - "price":0.00294, - "amount":0.03, - "price_int":"294", - "amount_int":"3000000", - "stamp":"1323852023327770" - }, - { - "price":0.00295, - "amount":0.01, - "price_int":"295", - "amount_int":"1000000", - "stamp":"1323841995558355" - }, - { - "price":0.00296, - "amount":0.02, - "price_int":"296", - "amount_int":"2000000", - "stamp":"1323843138137426" - }, - { - "price":0.00297, - "amount":0.01, - "price_int":"297", - "amount_int":"1000000", - "stamp":"1323840319506701" - }, - { - "price":0.00298, - "amount":0.01, - "price_int":"298", - "amount_int":"1000000", - "stamp":"1323842013347507" - }, - { - "price":0.003, - "amount":0.02, - "price_int":"300", - "amount_int":"2000000", - "stamp":"1323852060693315" - }, - { - "price":0.00301, - "amount":0.02, - "price_int":"301", - "amount_int":"2000000", - "stamp":"1323842560086265" - }, - { - "price":0.00302, - "amount":0.01, - "price_int":"302", - "amount_int":"1000000", - "stamp":"1323841998935068" - }, - { - "price":0.00304, - "amount":0.01, - "price_int":"304", - "amount_int":"1000000", - "stamp":"1323841969238419" - }, - { - "price":0.00305, - "amount":0.01, - "price_int":"305", - "amount_int":"1000000", - "stamp":"1323851949455194" - }, - { - "price":0.00306, - "amount":0.03, - "price_int":"306", - "amount_int":"3000000", - "stamp":"1323851924664419" - }, - { - "price":0.00308, - "amount":0.01, - "price_int":"308", - "amount_int":"1000000", - "stamp":"1323831459946455" - }, - { - "price":0.00309, - "amount":0.01, - "price_int":"309", - "amount_int":"1000000", - "stamp":"1323842000196096" - }, - { - "price":0.0031, - "amount":0.01, - "price_int":"310", - "amount_int":"1000000", - "stamp":"1323831861676492" - }, - { - "price":0.00311, - "amount":0.03, - "price_int":"311", - "amount_int":"3000000", - "stamp":"1323851811170763" - }, - { - "price":0.00312, - "amount":0.02, - "price_int":"312", - "amount_int":"2000000", - "stamp":"1323840875942691" - }, - { - "price":0.00314, - "amount":0.01, - "price_int":"314", - "amount_int":"1000000", - "stamp":"1323831734869812" - }, - { - "price":0.00316, - "amount":0.01, - "price_int":"316", - "amount_int":"1000000", - "stamp":"1323831594690380" - }, - { - "price":0.00317, - "amount":0.03, - "price_int":"317", - "amount_int":"3000000", - "stamp":"1323842153611908" - }, - { - "price":0.00319, - "amount":0.02, - "price_int":"319", - "amount_int":"2000000", - "stamp":"1323836490870255" - }, - { - "price":0.0032, - "amount":0.02, - "price_int":"320", - "amount_int":"2000000", - "stamp":"1323840865721756" - }, - { - "price":0.00322, - "amount":0.02, - "price_int":"322", - "amount_int":"2000000", - "stamp":"1323840307289131" - }, - { - "price":0.00323, - "amount":0.03, - "price_int":"323", - "amount_int":"3000000", - "stamp":"1323852013518451" - }, - { - "price":0.00324, - "amount":0.02, - "price_int":"324", - "amount_int":"2000000", - "stamp":"1323843495661304" - }, - { - "price":0.00325, - "amount":0.02, - "price_int":"325", - "amount_int":"2000000", - "stamp":"1323851789155841" - }, - { - "price":0.00326, - "amount":0.01, - "price_int":"326", - "amount_int":"1000000", - "stamp":"1323843088229416" - }, - { - "price":0.00327, - "amount":0.02, - "price_int":"327", - "amount_int":"2000000", - "stamp":"1323851834430389" - }, - { - "price":0.00328, - "amount":0.02, - "price_int":"328", - "amount_int":"2000000", - "stamp":"1323847974574359" - }, - { - "price":0.0033, - "amount":0.02, - "price_int":"330", - "amount_int":"2000000", - "stamp":"1323851975142498" - }, - { - "price":0.00333, - "amount":0.02, - "price_int":"333", - "amount_int":"2000000", - "stamp":"1323851989059655" - }, - { - "price":0.00336, - "amount":0.01, - "price_int":"336", - "amount_int":"1000000", - "stamp":"1323851950187256" - }, - { - "price":0.00337, - "amount":0.05, - "price_int":"337", - "amount_int":"5000000", - "stamp":"1323841995945552" - }, - { - "price":0.00338, - "amount":0.03, - "price_int":"338", - "amount_int":"3000000", - "stamp":"1323851884033770" - }, - { - "price":0.00339, - "amount":0.02, - "price_int":"339", - "amount_int":"2000000", - "stamp":"1323851783715498" - }, - { - "price":0.0034, - "amount":0.01, - "price_int":"340", - "amount_int":"1000000", - "stamp":"1323851933468799" - }, - { - "price":0.00341, - "amount":0.02, - "price_int":"341", - "amount_int":"2000000", - "stamp":"1323842464494110" - }, - { - "price":0.00342, - "amount":0.01, - "price_int":"342", - "amount_int":"1000000", - "stamp":"1323831998508006" - }, - { - "price":0.00343, - "amount":0.01, - "price_int":"343", - "amount_int":"1000000", - "stamp":"1323831900630664" - }, - { - "price":0.00345, - "amount":0.02, - "price_int":"345", - "amount_int":"2000000", - "stamp":"1323843934203102" - }, - { - "price":0.00346, - "amount":0.01, - "price_int":"346", - "amount_int":"1000000", - "stamp":"1323842318533116" - }, - { - "price":0.00347, - "amount":0.06, - "price_int":"347", - "amount_int":"6000000", - "stamp":"1323850555004456" - }, - { - "price":0.00348, - "amount":0.01, - "price_int":"348", - "amount_int":"1000000", - "stamp":"1323831693272195" - }, - { - "price":0.00349, - "amount":0.03, - "price_int":"349", - "amount_int":"3000000", - "stamp":"1323841953938887" - }, - { - "price":0.00351, - "amount":0.01, - "price_int":"351", - "amount_int":"1000000", - "stamp":"1323831464631058" - }, - { - "price":0.00352, - "amount":0.03, - "price_int":"352", - "amount_int":"3000000", - "stamp":"1323841982865181" - }, - { - "price":0.00355, - "amount":0.01, - "price_int":"355", - "amount_int":"1000000", - "stamp":"1323831435661113" - }, - { - "price":0.00356, - "amount":0.01, - "price_int":"356", - "amount_int":"1000000", - "stamp":"1323831884619468" - }, - { - "price":0.00358, - "amount":0.04, - "price_int":"358", - "amount_int":"4000000", - "stamp":"1323851887435807" - }, - { - "price":0.00361, - "amount":0.03, - "price_int":"361", - "amount_int":"3000000", - "stamp":"1323851859286843" - }, - { - "price":0.00362, - "amount":0.02, - "price_int":"362", - "amount_int":"2000000", - "stamp":"1323851842167879" - }, - { - "price":0.00363, - "amount":0.02, - "price_int":"363", - "amount_int":"2000000", - "stamp":"1323842420380039" - }, - { - "price":0.00364, - "amount":0.02, - "price_int":"364", - "amount_int":"2000000", - "stamp":"1323843506345747" - }, - { - "price":0.00365, - "amount":0.01, - "price_int":"365", - "amount_int":"1000000", - "stamp":"1323840305571190" - }, - { - "price":0.00367, - "amount":0.02, - "price_int":"367", - "amount_int":"2000000", - "stamp":"1323852002105624" - }, - { - "price":0.00368, - "amount":0.01, - "price_int":"368", - "amount_int":"1000000", - "stamp":"1323839883461799" - }, - { - "price":0.00369, - "amount":0.01, - "price_int":"369", - "amount_int":"1000000", - "stamp":"1323842483792622" - }, - { - "price":0.0037, - "amount":0.01, - "price_int":"370", - "amount_int":"1000000", - "stamp":"1323842476758943" - }, - { - "price":0.00371, - "amount":0.04, - "price_int":"371", - "amount_int":"4000000", - "stamp":"1323851979875625" - }, - { - "price":0.00372, - "amount":0.02, - "price_int":"372", - "amount_int":"2000000", - "stamp":"1323851895358787" - }, - { - "price":0.00373, - "amount":0.01, - "price_int":"373", - "amount_int":"1000000", - "stamp":"1323836550906414" - }, - { - "price":0.00374, - "amount":0.02, - "price_int":"374", - "amount_int":"2000000", - "stamp":"1323840884128024" - }, - { - "price":0.00375, - "amount":0.01, - "price_int":"375", - "amount_int":"1000000", - "stamp":"1323840311358343" - }, - { - "price":0.00377, - "amount":0.04, - "price_int":"377", - "amount_int":"4000000", - "stamp":"1323851911486248" - }, - { - "price":0.00378, - "amount":0.02, - "price_int":"378", - "amount_int":"2000000", - "stamp":"1323831876609336" - }, - { - "price":0.00383, - "amount":0.03, - "price_int":"383", - "amount_int":"3000000", - "stamp":"1323851750330969" - }, - { - "price":0.00384, - "amount":0.01, - "price_int":"384", - "amount_int":"1000000", - "stamp":"1323836654330454" - }, - { - "price":0.00385, - "amount":0.02, - "price_int":"385", - "amount_int":"2000000", - "stamp":"1323840907697431" - }, - { - "price":0.00389, - "amount":0.01, - "price_int":"389", - "amount_int":"1000000", - "stamp":"1323842002901390" - }, - { - "price":0.0039, - "amount":0.02, - "price_int":"390", - "amount_int":"2000000", - "stamp":"1323840865426163" - }, - { - "price":0.00391, - "amount":0.01, - "price_int":"391", - "amount_int":"1000000", - "stamp":"1323843981943082" - }, - { - "price":0.00392, - "amount":0.02, - "price_int":"392", - "amount_int":"2000000", - "stamp":"1323843366735586" - }, - { - "price":0.00395, - "amount":0.02, - "price_int":"395", - "amount_int":"2000000", - "stamp":"1323842005938345" - }, - { - "price":0.00398, - "amount":0.03, - "price_int":"398", - "amount_int":"3000000", - "stamp":"1323843511303508" - }, - { - "price":0.00402, - "amount":0.01, - "price_int":"402", - "amount_int":"1000000", - "stamp":"1323831646452127" - }, - { - "price":0.00403, - "amount":0.02, - "price_int":"403", - "amount_int":"2000000", - "stamp":"1323839742613908" - }, - { - "price":0.00404, - "amount":0.01, - "price_int":"404", - "amount_int":"1000000", - "stamp":"1323841868379983" - }, - { - "price":0.00405, - "amount":0.02, - "price_int":"405", - "amount_int":"2000000", - "stamp":"1323831994427515" - }, - { - "price":0.00407, - "amount":0.01, - "price_int":"407", - "amount_int":"1000000", - "stamp":"1323831663603555" - }, - { - "price":0.00408, - "amount":0.02, - "price_int":"408", - "amount_int":"2000000", - "stamp":"1323836819547535" - }, - { - "price":0.0041, - "amount":0.03, - "price_int":"410", - "amount_int":"3000000", - "stamp":"1323843381167526" - }, - { - "price":0.00411, - "amount":0.01, - "price_int":"411", - "amount_int":"1000000", - "stamp":"1323841983544116" - }, - { - "price":0.00412, - "amount":0.01, - "price_int":"412", - "amount_int":"1000000", - "stamp":"1323851901140841" - }, - { - "price":0.00413, - "amount":0.01, - "price_int":"413", - "amount_int":"1000000", - "stamp":"1323842953936975" - }, - { - "price":0.00414, - "amount":0.01, - "price_int":"414", - "amount_int":"1000000", - "stamp":"1323831707525727" - }, - { - "price":0.00415, - "amount":0.01, - "price_int":"415", - "amount_int":"1000000", - "stamp":"1323836501318201" - }, - { - "price":0.00418, - "amount":0.01, - "price_int":"418", - "amount_int":"1000000", - "stamp":"1323841991526730" - }, - { - "price":0.00419, - "amount":0.04, - "price_int":"419", - "amount_int":"4000000", - "stamp":"1323851881039901" - }, - { - "price":0.0042, - "amount":0.02, - "price_int":"420", - "amount_int":"2000000", - "stamp":"1323841868788274" - }, - { - "price":0.00421, - "amount":0.01, - "price_int":"421", - "amount_int":"1000000", - "stamp":"1323836520656568" - }, - { - "price":0.00422, - "amount":0.01, - "price_int":"422", - "amount_int":"1000000", - "stamp":"1323831594499202" - }, - { - "price":0.00423, - "amount":0.03, - "price_int":"423", - "amount_int":"3000000", - "stamp":"1323843332738976" - }, - { - "price":0.00424, - "amount":0.01, - "price_int":"424", - "amount_int":"1000000", - "stamp":"1323852004218925" - }, - { - "price":0.00426, - "amount":0.01, - "price_int":"426", - "amount_int":"1000000", - "stamp":"1323840873584415" - }, - { - "price":0.00429, - "amount":0.01, - "price_int":"429", - "amount_int":"1000000", - "stamp":"1323840863676689" - }, - { - "price":0.0043, - "amount":0.02, - "price_int":"430", - "amount_int":"2000000", - "stamp":"1323836748185132" - }, - { - "price":0.00431, - "amount":0.02, - "price_int":"431", - "amount_int":"2000000", - "stamp":"1323841995188715" - }, - { - "price":0.00434, - "amount":0.04, - "price_int":"434", - "amount_int":"4000000", - "stamp":"1323851797029590" - }, - { - "price":0.00435, - "amount":0.02, - "price_int":"435", - "amount_int":"2000000", - "stamp":"1323841979771342" - }, - { - "price":0.00438, - "amount":0.01, - "price_int":"438", - "amount_int":"1000000", - "stamp":"1323843571938862" - }, - { - "price":0.00439, - "amount":0.01, - "price_int":"439", - "amount_int":"1000000", - "stamp":"1323831829059191" - }, - { - "price":0.0044, - "amount":0.02, - "price_int":"440", - "amount_int":"2000000", - "stamp":"1323840842786441" - }, - { - "price":0.00444, - "amount":0.01, - "price_int":"444", - "amount_int":"1000000", - "stamp":"1323831859366161" - }, - { - "price":0.00445, - "amount":0.01, - "price_int":"445", - "amount_int":"1000000", - "stamp":"1323840052181035" - }, - { - "price":0.00446, - "amount":0.02, - "price_int":"446", - "amount_int":"2000000", - "stamp":"1323836736985003" - }, - { - "price":0.00447, - "amount":0.02, - "price_int":"447", - "amount_int":"2000000", - "stamp":"1323840888943588" - }, - { - "price":0.00448, - "amount":0.03, - "price_int":"448", - "amount_int":"3000000", - "stamp":"1323851934978532" - }, - { - "price":0.00449, - "amount":0.01, - "price_int":"449", - "amount_int":"1000000", - "stamp":"1323840130039898" - }, - { - "price":0.0045, - "amount":0.03, - "price_int":"450", - "amount_int":"3000000", - "stamp":"1323840900009239" - }, - { - "price":0.00451, - "amount":0.01, - "price_int":"451", - "amount_int":"1000000", - "stamp":"1323841987981267" - }, - { - "price":0.00452, - "amount":0.04, - "price_int":"452", - "amount_int":"4000000", - "stamp":"1323841969232578" - }, - { - "price":0.00455, - "amount":0.03, - "price_int":"455", - "amount_int":"3000000", - "stamp":"1323852011074530" - }, - { - "price":0.00456, - "amount":0.03, - "price_int":"456", - "amount_int":"3000000", - "stamp":"1323843424492644" - }, - { - "price":0.00457, - "amount":0.01, - "price_int":"457", - "amount_int":"1000000", - "stamp":"1323840326448877" - }, - { - "price":0.00458, - "amount":0.01, - "price_int":"458", - "amount_int":"1000000", - "stamp":"1323840047824122" - }, - { - "price":0.00463, - "amount":0.03, - "price_int":"463", - "amount_int":"3000000", - "stamp":"1323842469381030" - }, - { - "price":0.00464, - "amount":0.03, - "price_int":"464", - "amount_int":"3000000", - "stamp":"1323841999323864" - }, - { - "price":0.00465, - "amount":0.02, - "price_int":"465", - "amount_int":"2000000", - "stamp":"1323840824780812" - }, - { - "price":0.00466, - "amount":0.02, - "price_int":"466", - "amount_int":"2000000", - "stamp":"1323851885897947" - }, - { - "price":0.00468, - "amount":0.01, - "price_int":"468", - "amount_int":"1000000", - "stamp":"1323836492472649" - }, - { - "price":0.00469, - "amount":0.02, - "price_int":"469", - "amount_int":"2000000", - "stamp":"1323852008759656" - }, - { - "price":0.0047, - "amount":0.01, - "price_int":"470", - "amount_int":"1000000", - "stamp":"1323843473180101" - }, - { - "price":0.00471, - "amount":0.01, - "price_int":"471", - "amount_int":"1000000", - "stamp":"1323841969234655" - }, - { - "price":0.00473, - "amount":0.01, - "price_int":"473", - "amount_int":"1000000", - "stamp":"1323841868643822" - }, - { - "price":0.00475, - "amount":0.01, - "price_int":"475", - "amount_int":"1000000", - "stamp":"1323851766374449" - }, - { - "price":0.00476, - "amount":0.04, - "price_int":"476", - "amount_int":"4000000", - "stamp":"1323852007096370" - }, - { - "price":0.00477, - "amount":0.02, - "price_int":"477", - "amount_int":"2000000", - "stamp":"1323850705499022" - }, - { - "price":0.00478, - "amount":0.02, - "price_int":"478", - "amount_int":"2000000", - "stamp":"1323852075305837" - }, - { - "price":0.00479, - "amount":0.01, - "price_int":"479", - "amount_int":"1000000", - "stamp":"1323831656771017" - }, - { - "price":0.00481, - "amount":0.01, - "price_int":"481", - "amount_int":"1000000", - "stamp":"1323830050043584" - }, - { - "price":0.00482, - "amount":0.02, - "price_int":"482", - "amount_int":"2000000", - "stamp":"1323842000909518" - }, - { - "price":0.00484, - "amount":0.01, - "price_int":"484", - "amount_int":"1000000", - "stamp":"1323836531851421" - }, - { - "price":0.00485, - "amount":0.03, - "price_int":"485", - "amount_int":"3000000", - "stamp":"1323842338979095" - }, - { - "price":0.00486, - "amount":0.01, - "price_int":"486", - "amount_int":"1000000", - "stamp":"1323851937010842" - }, - { - "price":0.00487, - "amount":0.01, - "price_int":"487", - "amount_int":"1000000", - "stamp":"1323831627609064" - }, - { - "price":0.00488, - "amount":0.01, - "price_int":"488", - "amount_int":"1000000", - "stamp":"1323839899719177" - }, - { - "price":0.0049, - "amount":0.01, - "price_int":"490", - "amount_int":"1000000", - "stamp":"1323831810465402" - }, - { - "price":0.00491, - "amount":0.01, - "price_int":"491", - "amount_int":"1000000", - "stamp":"1323831478654783" - }, - { - "price":0.00492, - "amount":0.01, - "price_int":"492", - "amount_int":"1000000", - "stamp":"1323836789203252" - }, - { - "price":0.00493, - "amount":0.01, - "price_int":"493", - "amount_int":"1000000", - "stamp":"1323842293281032" - }, - { - "price":0.00494, - "amount":0.01, - "price_int":"494", - "amount_int":"1000000", - "stamp":"1323842002094948" - }, - { - "price":0.00495, - "amount":0.02, - "price_int":"495", - "amount_int":"2000000", - "stamp":"1323851952533365" - }, - { - "price":0.00496, - "amount":0.02, - "price_int":"496", - "amount_int":"2000000", - "stamp":"1323842523452496" - }, - { - "price":0.00497, - "amount":0.01, - "price_int":"497", - "amount_int":"1000000", - "stamp":"1323832258993086" - }, - { - "price":0.00499, - "amount":0.02, - "price_int":"499", - "amount_int":"2000000", - "stamp":"1323852006432958" - }, - { - "price":0.005, - "amount":4.596, - "price_int":"500", - "amount_int":"459600000", - "stamp":"1313383573836843" - }, - { - "price":0.00914, - "amount":35, - "price_int":"914", - "amount_int":"3500000000", - "stamp":"1315815634609120" - }, - { - "price":0.01, - "amount":111455.97899994, - "price_int":"1000", - "amount_int":"11145597899994", - "stamp":"1327708434549928" - }, - { - "price":0.01001, - "amount":60110.01198801, - "price_int":"1001", - "amount_int":"6011001198801", - "stamp":"1326853959504631" - }, - { - "price":0.0101, - "amount":261499.90099009, - "price_int":"1010", - "amount_int":"26149990099009", - "stamp":"1326842914021665" - }, - { - "price":0.0102, - "amount":5159, - "price_int":"1020", - "amount_int":"515900000000", - "stamp":"1312121492036952" - }, - { - "price":0.01027, - "amount":200, - "price_int":"1027", - "amount_int":"20000000000", - "stamp":"1318803429992742" - }, - { - "price":0.01033, - "amount":6, - "price_int":"1033", - "amount_int":"600000000", - "stamp":"1312465920401060" - }, - { - "price":0.0104, - "amount":0.43557692, - "price_int":"1040", - "amount_int":"43557692", - "stamp":"1312121383267242" - }, - { - "price":0.0106, - "amount":500, - "price_int":"1060", - "amount_int":"50000000000", - "stamp":"1325106531128828" - }, - { - "price":0.011, - "amount":93219.52818179, - "price_int":"1100", - "amount_int":"9321952818179", - "stamp":"1324351980515316" - }, - { - "price":0.0111, - "amount":10000, - "price_int":"1110", - "amount_int":"1000000000000", - "stamp":"1319047378614794" - }, - { - "price":0.01111, - "amount":7783.07830783, - "price_int":"1111", - "amount_int":"778307830783", - "stamp":"1312121902447174" - }, - { - "price":0.01156, - "amount":2000, - "price_int":"1156", - "amount_int":"200000000000", - "stamp":"1312121316619414" - }, - { - "price":0.01175, - "amount":100, - "price_int":"1175", - "amount_int":"10000000000", - "stamp":"1320036905272843" - }, - { - "price":0.012, - "amount":1601, - "price_int":"1200", - "amount_int":"160100000000", - "stamp":"1327739201750256" - }, - { - "price":0.0121, - "amount":71.95867768, - "price_int":"1210", - "amount_int":"7195867768", - "stamp":"1312121962897161" - }, - { - "price":0.01235, - "amount":2000, - "price_int":"1235", - "amount_int":"200000000000", - "stamp":"1318960535115305" - }, - { - "price":0.0124, - "amount":20000, - "price_int":"1240", - "amount_int":"2000000000000", - "stamp":"1312121417269694" - }, - { - "price":0.01241, - "amount":59478.67445608, - "price_int":"1241", - "amount_int":"5947867445608", - "stamp":"1321415945119479" - }, - { - "price":0.01272, - "amount":609, - "price_int":"1272", - "amount_int":"60900000000", - "stamp":"1327617813154755" - }, - { - "price":0.015, - "amount":1228, - "price_int":"1500", - "amount_int":"122800000000", - "stamp":"1312121947515525" - }, - { - "price":0.0151, - "amount":3000, - "price_int":"1510", - "amount_int":"300000000000", - "stamp":"1312121335785140" - }, - { - "price":0.016, - "amount":2000, - "price_int":"1600", - "amount_int":"200000000000", - "stamp":"1319047155504716" - }, - { - "price":0.02, - "amount":8141.6605, - "price_int":"2000", - "amount_int":"814166050000", - "stamp":"1327888336631753" - }, - { - "price":0.0201, - "amount":1112.13930348, - "price_int":"2010", - "amount_int":"111213930348", - "stamp":"1312121344064806" - }, - { - "price":0.0211, - "amount":10000, - "price_int":"2110", - "amount_int":"1000000000000", - "stamp":"1316536558879206" - }, - { - "price":0.0212, - "amount":10000, - "price_int":"2120", - "amount_int":"1000000000000", - "stamp":"1312121508322303" - }, - { - "price":0.02377, - "amount":1, - "price_int":"2377", - "amount_int":"100000000", - "stamp":"1312121786353679" - }, - { - "price":0.025, - "amount":4000, - "price_int":"2500", - "amount_int":"400000000000", - "stamp":"1320934553304469" - }, - { - "price":0.027, - "amount":350, - "price_int":"2700", - "amount_int":"35000000000", - "stamp":"1312121317613784" - }, - { - "price":0.03, - "amount":1037.24933333, - "price_int":"3000", - "amount_int":"103724933333", - "stamp":"1319985348831082" - }, - { - "price":0.0301, - "amount":200, - "price_int":"3010", - "amount_int":"20000000000", - "stamp":"1312121425898097" - }, - { - "price":0.03046, - "amount":100, - "price_int":"3046", - "amount_int":"10000000000", - "stamp":"1315307997788146" - }, - { - "price":0.0309, - "amount":1132.68608414, - "price_int":"3090", - "amount_int":"113268608414", - "stamp":"1312121675733305" - }, - { - "price":0.0313, - "amount":1307, - "price_int":"3130", - "amount_int":"130700000000", - "stamp":"1312121412828658" - }, - { - "price":0.034, - "amount":0.15264705, - "price_int":"3400", - "amount_int":"15264705", - "stamp":"1312121417210329" - }, - { - "price":0.035, - "amount":250, - "price_int":"3500", - "amount_int":"25000000000", - "stamp":"1312418567779301" - }, - { - "price":0.04, - "amount":246.55524999, - "price_int":"4000", - "amount_int":"24655524999", - "stamp":"1312446309068059" - }, - { - "price":0.044, - "amount":1000, - "price_int":"4400", - "amount_int":"100000000000", - "stamp":"1312121507690409" - }, - { - "price":0.05, - "amount":10191.8, - "price_int":"5000", - "amount_int":"1019180000000", - "stamp":"1326918326985597" - }, - { - "price":0.0501, - "amount":1500, - "price_int":"5010", - "amount_int":"150000000000", - "stamp":"1312121336871888" - }, - { - "price":0.0503, - "amount":3895.40755467, - "price_int":"5030", - "amount_int":"389540755467", - "stamp":"1312121317482310" - }, - { - "price":0.0505, - "amount":0.24712871, - "price_int":"5050", - "amount_int":"24712871", - "stamp":"1312122024386133" - }, - { - "price":0.0512, - "amount":186, - "price_int":"5120", - "amount_int":"18600000000", - "stamp":"1312122239048971" - }, - { - "price":0.05483, - "amount":1, - "price_int":"5483", - "amount_int":"100000000", - "stamp":"1323220412175484" - }, - { - "price":0.059, - "amount":75, - "price_int":"5900", - "amount_int":"7500000000", - "stamp":"1312121335416927" - }, - { - "price":0.0601, - "amount":0.07504159, - "price_int":"6010", - "amount_int":"7504159", - "stamp":"1318016016643170" - }, - { - "price":0.07, - "amount":51, - "price_int":"7000", - "amount_int":"5100000000", - "stamp":"1312122241503498" - }, - { - "price":0.08, - "amount":181.6, - "price_int":"8000", - "amount_int":"18160000000", - "stamp":"1319708646599360" - }, - { - "price":0.089, - "amount":5.68089887, - "price_int":"8900", - "amount_int":"568089887", - "stamp":"1318928844003044" - }, - { - "price":0.09, - "amount":1, - "price_int":"9000", - "amount_int":"100000000", - "stamp":"1312121848437324" - }, - { - "price":0.099, - "amount":170.90242424, - "price_int":"9900", - "amount_int":"17090242424", - "stamp":"1317575849393017" - }, - { - "price":0.0999, - "amount":25, - "price_int":"9990", - "amount_int":"2500000000", - "stamp":"1320158903927525" - }, - { - "price":0.1, - "amount":62114.32389992, - "price_int":"10000", - "amount_int":"6211432389992", - "stamp":"1328278999399467" - }, - { - "price":0.1003, - "amount":10000, - "price_int":"10030", - "amount_int":"1000000000000", - "stamp":"1312121335451621" - }, - { - "price":0.101, - "amount":44.260099, - "price_int":"10100", - "amount_int":"4426009900", - "stamp":"1312121335681705" - }, - { - "price":0.10179, - "amount":100, - "price_int":"10179", - "amount_int":"10000000000", - "stamp":"1318803394929963" - }, - { - "price":0.10199, - "amount":204.28845965, - "price_int":"10199", - "amount_int":"20428845965", - "stamp":"1327954876920116" - }, - { - "price":0.102, - "amount":305, - "price_int":"10200", - "amount_int":"30500000000", - "stamp":"1320506907925845" - }, - { - "price":0.11, - "amount":20592.59238181, - "price_int":"11000", - "amount_int":"2059259238181", - "stamp":"1326841301152374" - }, - { - "price":0.111, - "amount":1060, - "price_int":"11100", - "amount_int":"106000000000", - "stamp":"1319047353878198" - }, - { - "price":0.1111, - "amount":500, - "price_int":"11110", - "amount_int":"50000000000", - "stamp":"1314965101023784" - }, - { - "price":0.1123, - "amount":100, - "price_int":"11230", - "amount_int":"10000000000", - "stamp":"1325106401786114" - }, - { - "price":0.12, - "amount":10100, - "price_int":"12000", - "amount_int":"1010000000000", - "stamp":"1312513795251324" - }, - { - "price":0.124, - "amount":190, - "price_int":"12400", - "amount_int":"19000000000", - "stamp":"1312121391148644" - }, - { - "price":0.12406, - "amount":100, - "price_int":"12406", - "amount_int":"10000000000", - "stamp":"1326172736013976" - }, - { - "price":0.125, - "amount":100, - "price_int":"12500", - "amount_int":"10000000000", - "stamp":"1326918275262995" - }, - { - "price":0.12601, - "amount":7317.88540592, - "price_int":"12601", - "amount_int":"731788540592", - "stamp":"1318016469664873" - }, - { - "price":0.127, - "amount":2000, - "price_int":"12700", - "amount_int":"200000000000", - "stamp":"1321410987655715" - }, - { - "price":0.12724, - "amount":129, - "price_int":"12724", - "amount_int":"12900000000", - "stamp":"1327617782467723" - }, - { - "price":0.13, - "amount":30, - "price_int":"13000", - "amount_int":"3000000000", - "stamp":"1312121520140784" - }, - { - "price":0.14, - "amount":0.2, - "price_int":"14000", - "amount_int":"20000000", - "stamp":"1312121418472715" - }, - { - "price":0.14189, - "amount":4944.09014024, - "price_int":"14189", - "amount_int":"494409014024", - "stamp":"1328398901322847" - }, - { - "price":0.15, - "amount":4055.43909999, - "price_int":"15000", - "amount_int":"405543909999", - "stamp":"1326724124798075" - }, - { - "price":0.15625, - "amount":64, - "price_int":"15625", - "amount_int":"6400000000", - "stamp":"1325672450291278" - }, - { - "price":0.16, - "amount":1000, - "price_int":"16000", - "amount_int":"100000000000", - "stamp":"1312890288124937" - }, - { - "price":0.173, - "amount":1000, - "price_int":"17300", - "amount_int":"100000000000", - "stamp":"1319054599088172" - }, - { - "price":0.18, - "amount":10, - "price_int":"18000", - "amount_int":"1000000000", - "stamp":"1321241399630154" - }, - { - "price":0.191, - "amount":3.4, - "price_int":"19100", - "amount_int":"340000000", - "stamp":"1318742383897997" - }, - { - "price":0.2, - "amount":1113.25, - "price_int":"20000", - "amount_int":"111325000000", - "stamp":"1327092845809097" - }, - { - "price":0.2003, - "amount":5000, - "price_int":"20030", - "amount_int":"500000000000", - "stamp":"1313381513850355" - }, - { - "price":0.21, - "amount":345.05809522, - "price_int":"21000", - "amount_int":"34505809522", - "stamp":"1322088240517907" - }, - { - "price":0.2101, - "amount":100, - "price_int":"21010", - "amount_int":"10000000000", - "stamp":"1312121491977988" - }, - { - "price":0.211, - "amount":2000, - "price_int":"21100", - "amount_int":"200000000000", - "stamp":"1321410904517609" - }, - { - "price":0.22, - "amount":32.50613636, - "price_int":"22000", - "amount_int":"3250613636", - "stamp":"1322163251379952" - }, - { - "price":0.23, - "amount":18.02469565, - "price_int":"23000", - "amount_int":"1802469565", - "stamp":"1313315862630980" - }, - { - "price":0.24, - "amount":125.55404166, - "price_int":"24000", - "amount_int":"12555404166", - "stamp":"1312121573159560" - }, - { - "price":0.25, - "amount":731.57552, - "price_int":"25000", - "amount_int":"73157552000", - "stamp":"1326918268227975" - }, - { - "price":0.2548, - "amount":58.10470957, - "price_int":"25480", - "amount_int":"5810470957", - "stamp":"1309681436236400" - }, - { - "price":0.26, - "amount":16, - "price_int":"26000", - "amount_int":"1600000000", - "stamp":"1312121519914218" - }, - { - "price":0.2701, - "amount":250, - "price_int":"27010", - "amount_int":"25000000000", - "stamp":"1312121336953779" - }, - { - "price":0.27329, - "amount":2000, - "price_int":"27329", - "amount_int":"200000000000", - "stamp":"1328398843371075" - }, - { - "price":0.28, - "amount":500, - "price_int":"28000", - "amount_int":"50000000000", - "stamp":"1312423065354193" - }, - { - "price":0.28949, - "amount":51.15154236, - "price_int":"28949", - "amount_int":"5115154236", - "stamp":"1317887686014647" - }, - { - "price":0.29194, - "amount":26.3158, - "price_int":"29194", - "amount_int":"2631580000", - "stamp":"1318848973564103" - }, - { - "price":0.3, - "amount":1618.96736666, - "price_int":"30000", - "amount_int":"161896736666", - "stamp":"1318188650339322" - }, - { - "price":0.30462, - "amount":21, - "price_int":"30462", - "amount_int":"2100000000", - "stamp":"1327874244233873" - }, - { - "price":0.31, - "amount":30.4, - "price_int":"31000", - "amount_int":"3040000000", - "stamp":"1312122193965672" - }, - { - "price":0.3125, - "amount":32, - "price_int":"31250", - "amount_int":"3200000000", - "stamp":"1325672407636670" - }, - { - "price":0.32, - "amount":715.83684375, - "price_int":"32000", - "amount_int":"71583684375", - "stamp":"1315571961695385" - }, - { - "price":0.33, - "amount":1, - "price_int":"33000", - "amount_int":"100000000", - "stamp":"1312164928720429" - }, - { - "price":0.35, - "amount":50, - "price_int":"35000", - "amount_int":"5000000000", - "stamp":"1312121832698212" - }, - { - "price":0.36671, - "amount":1000, - "price_int":"36671", - "amount_int":"100000000000", - "stamp":"1328398266545893" - }, - { - "price":0.4, - "amount":238, - "price_int":"40000", - "amount_int":"23800000000", - "stamp":"1326818460599990" - }, - { - "price":0.41, - "amount":1500, - "price_int":"41000", - "amount_int":"150000000000", - "stamp":"1321410842382589" - }, - { - "price":0.45, - "amount":2, - "price_int":"45000", - "amount_int":"200000000", - "stamp":"1326774252638727" - }, - { - "price":0.45638, - "amount":5214.04391077, - "price_int":"45638", - "amount_int":"521404391077", - "stamp":"1321480679390651" - }, - { - "price":0.4625, - "amount":10800, - "price_int":"46250", - "amount_int":"1080000000000", - "stamp":"1324327549326120" - }, - { - "price":0.46607, - "amount":0.01, - "price_int":"46607", - "amount_int":"1000000", - "stamp":"1325550350901967" - }, - { - "price":0.4711, - "amount":11.18964126, - "price_int":"47110", - "amount_int":"1118964126", - "stamp":"1315597881446443" - }, - { - "price":0.49, - "amount":86.08161224, - "price_int":"49000", - "amount_int":"8608161224", - "stamp":"1318868979238471" - }, - { - "price":0.492, - "amount":5.65, - "price_int":"49200", - "amount_int":"565000000", - "stamp":"1324298630061134" - }, - { - "price":0.5, - "amount":2636.55276, - "price_int":"50000", - "amount_int":"263655276000", - "stamp":"1328465068639739" - }, - { - "price":0.5003, - "amount":2000, - "price_int":"50030", - "amount_int":"200000000000", - "stamp":"1313381543383866" - }, - { - "price":0.51, - "amount":1707.05009803, - "price_int":"51000", - "amount_int":"170705009803", - "stamp":"1325516487760233" - }, - { - "price":0.511, - "amount":1500, - "price_int":"51100", - "amount_int":"150000000000", - "stamp":"1321410736443221" - }, - { - "price":0.529, - "amount":75.5, - "price_int":"52900", - "amount_int":"7550000000", - "stamp":"1312121367874227" - }, - { - "price":0.55, - "amount":150, - "price_int":"55000", - "amount_int":"15000000000", - "stamp":"1319708670062713" - }, - { - "price":0.555, - "amount":0.01, - "price_int":"55500", - "amount_int":"1000000", - "stamp":"1318835756450663" - }, - { - "price":0.56, - "amount":5, - "price_int":"56000", - "amount_int":"500000000", - "stamp":"1318985777634165" - }, - { - "price":0.6, - "amount":150.93448333, - "price_int":"60000", - "amount_int":"15093448333", - "stamp":"1312680924545399" - }, - { - "price":0.60528, - "amount":6022.00634417, - "price_int":"60528", - "amount_int":"602200634417", - "stamp":"1319224806559807" - }, - { - "price":0.60924, - "amount":1, - "price_int":"60924", - "amount_int":"100000000", - "stamp":"1327874237745547" - }, - { - "price":0.61, - "amount":1500, - "price_int":"61000", - "amount_int":"150000000000", - "stamp":"1321410588818924" - }, - { - "price":0.625, - "amount":16, - "price_int":"62500", - "amount_int":"1600000000", - "stamp":"1325672331575970" - }, - { - "price":0.63, - "amount":15.2, - "price_int":"63000", - "amount_int":"1520000000", - "stamp":"1312122193905074" - }, - { - "price":0.63001, - "amount":1.75, - "price_int":"63001", - "amount_int":"175000000", - "stamp":"1324393512227354" - }, - { - "price":0.6362, - "amount":2.01872, - "price_int":"63620", - "amount_int":"201872000", - "stamp":"1325939251367671" - }, - { - "price":0.65, - "amount":1.15618461, - "price_int":"65000", - "amount_int":"115618461", - "stamp":"1324932738979551" - }, - { - "price":0.7, - "amount":500, - "price_int":"70000", - "amount_int":"50000000000", - "stamp":"1314712290942888" - }, - { - "price":0.70801, - "amount":726, - "price_int":"70801", - "amount_int":"72600000000", - "stamp":"1328644771373470" - }, - { - "price":0.75, - "amount":15, - "price_int":"75000", - "amount_int":"1500000000", - "stamp":"1317256169448524" - }, - { - "price":0.76, - "amount":12000, - "price_int":"76000", - "amount_int":"1200000000000", - "stamp":"1312391564426932" - }, - { - "price":0.771, - "amount":72.93124513, - "price_int":"77100", - "amount_int":"7293124513", - "stamp":"1312121277855056" - }, - { - "price":0.78, - "amount":8, - "price_int":"78000", - "amount_int":"800000000", - "stamp":"1319273870822280" - }, - { - "price":0.78282, - "amount":25, - "price_int":"78282", - "amount_int":"2500000000", - "stamp":"1327380078434371" - }, - { - "price":0.794, - "amount":7.18890428, - "price_int":"79400", - "amount_int":"718890428", - "stamp":"1327532450640104" - }, - { - "price":0.8, - "amount":889.16504999, - "price_int":"80000", - "amount_int":"88916504999", - "stamp":"1323726111736657" - }, - { - "price":0.80601, - "amount":3.66, - "price_int":"80601", - "amount_int":"366000000", - "stamp":"1321775869931429" - }, - { - "price":0.81215, - "amount":6430.36384904, - "price_int":"81215", - "amount_int":"643036384904", - "stamp":"1319008816612540" - }, - { - "price":0.813, - "amount":1000, - "price_int":"81300", - "amount_int":"100000000000", - "stamp":"1321410516040468" - }, - { - "price":0.87523, - "amount":0.00198804, - "price_int":"87523", - "amount_int":"198804", - "stamp":"1317202304389760" - }, - { - "price":0.88, - "amount":10, - "price_int":"88000", - "amount_int":"1000000000", - "stamp":"1321895192061759" - }, - { - "price":0.9, - "amount":573.33, - "price_int":"90000", - "amount_int":"57333000000", - "stamp":"1323622076503330" - }, - { - "price":0.91385, - "amount":1, - "price_int":"91385", - "amount_int":"100000000", - "stamp":"1327874020930075" - }, - { - "price":0.9142, - "amount":99.42, - "price_int":"91420", - "amount_int":"9942000000", - "stamp":"1321313717200187" - }, - { - "price":0.94, - "amount":101, - "price_int":"94000", - "amount_int":"10100000000", - "stamp":"1328603579473410" - }, - { - "price":0.95, - "amount":0.25, - "price_int":"95000", - "amount_int":"25000000", - "stamp":"1318906999680451" - }, - { - "price":0.95429, - "amount":66.6667, - "price_int":"95429", - "amount_int":"6666670000", - "stamp":"1327617693178863" - }, - { - "price":0.98, - "amount":31, - "price_int":"98000", - "amount_int":"3100000000", - "stamp":"1325450610500935" - }, - { - "price":0.99, - "amount":201.44, - "price_int":"99000", - "amount_int":"20144000000", - "stamp":"1326840035307491" - }, - { - "price":1, - "amount":33594.01106999, - "price_int":"100000", - "amount_int":"3359401106999", - "stamp":"1328241941765814" - }, - { - "price":1.00001, - "amount":151, - "price_int":"100001", - "amount_int":"15100000000", - "stamp":"1326656653166840" - }, - { - "price":1.001, - "amount":680.82734265, - "price_int":"100100", - "amount_int":"68082734265", - "stamp":"1312703662764830" - }, - { - "price":1.003, - "amount":1000, - "price_int":"100300", - "amount_int":"100000000000", - "stamp":"1328538670468957" - }, - { - "price":1.01, - "amount":3152.27453463, - "price_int":"101000", - "amount_int":"315227453463", - "stamp":"1325767313002381" - }, - { - "price":1.011, - "amount":16.39465875, - "price_int":"101100", - "amount_int":"1639465875", - "stamp":"1312121574919289" - }, - { - "price":1.0111, - "amount":13.38, - "price_int":"101110", - "amount_int":"1338000000", - "stamp":"1312121369407611" - }, - { - "price":1.0123, - "amount":50, - "price_int":"101230", - "amount_int":"5000000000", - "stamp":"1325106355813136" - }, - { - "price":1.017, - "amount":9.31, - "price_int":"101700", - "amount_int":"931000000", - "stamp":"1318862632449042" - }, - { - "price":1.02, - "amount":136.57857843, - "price_int":"102000", - "amount_int":"13657857843", - "stamp":"1327619732710298" - }, - { - "price":1.021, - "amount":700, - "price_int":"102100", - "amount_int":"70000000000", - "stamp":"1312121902288446" - }, - { - "price":1.025, - "amount":20.09774634, - "price_int":"102500", - "amount_int":"2009774634", - "stamp":"1319095781212386" - }, - { - "price":1.034, - "amount":0.00128626, - "price_int":"103400", - "amount_int":"128626", - "stamp":"1320100307294916" - }, - { - "price":1.04, - "amount":0.07766346, - "price_int":"104000", - "amount_int":"7766346", - "stamp":"1315574867929030" - }, - { - "price":1.04093, - "amount":1, - "price_int":"104093", - "amount_int":"100000000", - "stamp":"1322350579168869" - }, - { - "price":1.04517, - "amount":1004.62125779, - "price_int":"104517", - "amount_int":"100462125779", - "stamp":"1320436213309722" - }, - { - "price":1.05, - "amount":142.4857, - "price_int":"105000", - "amount_int":"14248570000", - "stamp":"1321240385888793" - }, - { - "price":1.06, - "amount":19985.09936792, - "price_int":"106000", - "amount_int":"1998509936792", - "stamp":"1312447269507532" - }, - { - "price":1.066, - "amount":3000, - "price_int":"106600", - "amount_int":"300000000000", - "stamp":"1321416095922729" - }, - { - "price":1.081, - "amount":50, - "price_int":"108100", - "amount_int":"5000000000", - "stamp":"1326870119608240" - }, - { - "price":1.08393, - "amount":1, - "price_int":"108393", - "amount_int":"100000000", - "stamp":"1319578772322741" - }, - { - "price":1.09, - "amount":31, - "price_int":"109000", - "amount_int":"3100000000", - "stamp":"1312121872355837" - }, - { - "price":1.09001, - "amount":50, - "price_int":"109001", - "amount_int":"5000000000", - "stamp":"1321662057556083" - }, - { - "price":1.1, - "amount":676.85391817, - "price_int":"110000", - "amount_int":"67685391817", - "stamp":"1326021952971080" - }, - { - "price":1.101, - "amount":1100, - "price_int":"110100", - "amount_int":"110000000000", - "stamp":"1320602723810824" - }, - { - "price":1.11, - "amount":255.01626125, - "price_int":"111000", - "amount_int":"25501626125", - "stamp":"1325224654355465" - }, - { - "price":1.111, - "amount":50, - "price_int":"111100", - "amount_int":"5000000000", - "stamp":"1324405927714529" - }, - { - "price":1.1111, - "amount":2.98642786, - "price_int":"111110", - "amount_int":"298642786", - "stamp":"1314393958528814" - }, - { - "price":1.1112, - "amount":26.82325413, - "price_int":"111120", - "amount_int":"2682325413", - "stamp":"1318860880186074" - }, - { - "price":1.12, - "amount":59.39447321, - "price_int":"112000", - "amount_int":"5939447321", - "stamp":"1322838750142906" - }, - { - "price":1.12903, - "amount":3808.57904573, - "price_int":"112903", - "amount_int":"380857904573", - "stamp":"1319008846606617" - }, - { - "price":1.132, - "amount":33.81954063, - "price_int":"113200", - "amount_int":"3381954063", - "stamp":"1327621943215265" - }, - { - "price":1.14515, - "amount":10, - "price_int":"114515", - "amount_int":"1000000000", - "stamp":"1327573833386201" - }, - { - "price":1.14702, - "amount":1, - "price_int":"114702", - "amount_int":"100000000", - "stamp":"1312121837387352" - }, - { - "price":1.15, - "amount":57471.41, - "price_int":"115000", - "amount_int":"5747141000000", - "stamp":"1328594703593713" - }, - { - "price":1.18, - "amount":5.084e-5, - "price_int":"118000", - "amount_int":"5084", - "stamp":"1317865355206902" - }, - { - "price":1.2, - "amount":255.5, - "price_int":"120000", - "amount_int":"25550000000", - "stamp":"1319906310467776" - }, - { - "price":1.21, - "amount":22.76, - "price_int":"121000", - "amount_int":"2276000000", - "stamp":"1325819819428610" - }, - { - "price":1.211, - "amount":50, - "price_int":"121100", - "amount_int":"5000000000", - "stamp":"1324405910337970" - }, - { - "price":1.2133, - "amount":82.4198, - "price_int":"121330", - "amount_int":"8241980000", - "stamp":"1321841498336645" - }, - { - "price":1.22, - "amount":0.01, - "price_int":"122000", - "amount_int":"1000000", - "stamp":"1320099435282667" - }, - { - "price":1.2267, - "amount":81.5195, - "price_int":"122670", - "amount_int":"8151950000", - "stamp":"1321841335795758" - }, - { - "price":1.23, - "amount":130, - "price_int":"123000", - "amount_int":"13000000000", - "stamp":"1319287024227187" - }, - { - "price":1.23422, - "amount":0.0101, - "price_int":"123422", - "amount_int":"1010000", - "stamp":"1327610886817276" - }, - { - "price":1.23457, - "amount":600.19925966, - "price_int":"123457", - "amount_int":"60019925966", - "stamp":"1328398232600575" - }, - { - "price":1.25, - "amount":48.6, - "price_int":"125000", - "amount_int":"4860000000", - "stamp":"1327181247429100" - }, - { - "price":1.27, - "amount":420.98273228, - "price_int":"127000", - "amount_int":"42098273228", - "stamp":"1316174604607368" - }, - { - "price":1.271, - "amount":19.45003933, - "price_int":"127100", - "amount_int":"1945003933", - "stamp":"1312121278509756" - }, - { - "price":1.27239, - "amount":35.89836, - "price_int":"127239", - "amount_int":"3589836000", - "stamp":"1327447023608598" - }, - { - "price":1.27531, - "amount":6.0241, - "price_int":"127531", - "amount_int":"602410000", - "stamp":"1319116369412404" - }, - { - "price":1.28, - "amount":20.24, - "price_int":"128000", - "amount_int":"2024000000", - "stamp":"1312121872203949" - }, - { - "price":1.3, - "amount":1326.74277692, - "price_int":"130000", - "amount_int":"132674277692", - "stamp":"1323622017528309" - }, - { - "price":1.311, - "amount":50, - "price_int":"131100", - "amount_int":"5000000000", - "stamp":"1324405906520566" - }, - { - "price":1.3154, - "amount":751.37013075, - "price_int":"131540", - "amount_int":"75137013075", - "stamp":"1322923047210487" - }, - { - "price":1.32, - "amount":200, - "price_int":"132000", - "amount_int":"20000000000", - "stamp":"1327134087749018" - }, - { - "price":1.34, - "amount":18.82, - "price_int":"134000", - "amount_int":"1882000000", - "stamp":"1312121872128631" - }, - { - "price":1.345, - "amount":8000, - "price_int":"134500", - "amount_int":"800000000000", - "stamp":"1312121336896801" - }, - { - "price":1.35, - "amount":130, - "price_int":"135000", - "amount_int":"13000000000", - "stamp":"1320945466748475" - }, - { - "price":1.35135, - "amount":18.5, - "price_int":"135135", - "amount_int":"1850000000", - "stamp":"1327489673784807" - }, - { - "price":1.37, - "amount":2, - "price_int":"137000", - "amount_int":"200000000", - "stamp":"1319592630868961" - }, - { - "price":1.3711, - "amount":100, - "price_int":"137110", - "amount_int":"10000000000", - "stamp":"1327381681983100" - }, - { - "price":1.39963, - "amount":10, - "price_int":"139963", - "amount_int":"1000000000", - "stamp":"1327573828128855" - }, - { - "price":1.4, - "amount":148.14, - "price_int":"140000", - "amount_int":"14814000000", - "stamp":"1322688346217551" - }, - { - "price":1.41, - "amount":17.49, - "price_int":"141000", - "amount_int":"1749000000", - "stamp":"1312121872079277" - }, - { - "price":1.411, - "amount":50, - "price_int":"141100", - "amount_int":"5000000000", - "stamp":"1324405897992835" - }, - { - "price":1.45, - "amount":0.40546206, - "price_int":"145000", - "amount_int":"40546206", - "stamp":"1320634965579150" - }, - { - "price":1.45052, - "amount":1, - "price_int":"145052", - "amount_int":"100000000", - "stamp":"1320438776922173" - }, - { - "price":1.46325, - "amount":7, - "price_int":"146325", - "amount_int":"700000000", - "stamp":"1319281537505471" - }, - { - "price":1.4659, - "amount":1637.21945562, - "price_int":"146590", - "amount_int":"163721945562", - "stamp":"1318982440167572" - }, - { - "price":1.47, - "amount":1, - "price_int":"147000", - "amount_int":"100000000", - "stamp":"1319093765665783" - }, - { - "price":1.47597, - "amount":5, - "price_int":"147597", - "amount_int":"500000000", - "stamp":"1326223887332888" - }, - { - "price":1.49, - "amount":16.25853691, - "price_int":"149000", - "amount_int":"1625853691", - "stamp":"1324413713421363" - }, - { - "price":1.5, - "amount":465.33113998, - "price_int":"150000", - "amount_int":"46533113998", - "stamp":"1327628026581136" - }, - { - "price":1.50102, - "amount":500, - "price_int":"150102", - "amount_int":"50000000000", - "stamp":"1321241948413563" - }, - { - "price":1.505, - "amount":65.5, - "price_int":"150500", - "amount_int":"6550000000", - "stamp":"1319153325260822" - }, - { - "price":1.50995, - "amount":2, - "price_int":"150995", - "amount_int":"200000000", - "stamp":"1324936130185088" - }, - { - "price":1.51, - "amount":410, - "price_int":"151000", - "amount_int":"41000000000", - "stamp":"1327379065366604" - }, - { - "price":1.511, - "amount":200, - "price_int":"151100", - "amount_int":"20000000000", - "stamp":"1324405847246575" - }, - { - "price":1.519, - "amount":100, - "price_int":"151900", - "amount_int":"10000000000", - "stamp":"1318994237133086" - }, - { - "price":1.52309, - "amount":13.137156, - "price_int":"152309", - "amount_int":"1313715600", - "stamp":"1327873964443506" - }, - { - "price":1.54, - "amount":704.24500649, - "price_int":"154000", - "amount_int":"70424500649", - "stamp":"1319056882220233" - }, - { - "price":1.5432, - "amount":10.28617807, - "price_int":"154320", - "amount_int":"1028617807", - "stamp":"1323006333331835" - }, - { - "price":1.55, - "amount":40, - "price_int":"155000", - "amount_int":"4000000000", - "stamp":"1312121434702480" - }, - { - "price":1.56093, - "amount":20, - "price_int":"156093", - "amount_int":"2000000000", - "stamp":"1327392542378956" - }, - { - "price":1.57, - "amount":15.16396178, - "price_int":"157000", - "amount_int":"1516396178", - "stamp":"1315758402991392" - }, - { - "price":1.57031, - "amount":0.2813, - "price_int":"157031", - "amount_int":"28130000", - "stamp":"1325589398392485" - }, - { - "price":1.57217, - "amount":0.19211296, - "price_int":"157217", - "amount_int":"19211296", - "stamp":"1325584661515999" - }, - { - "price":1.5812, - "amount":63.2431, - "price_int":"158120", - "amount_int":"6324310000", - "stamp":"1321841410881157" - }, - { - "price":1.59, - "amount":1000, - "price_int":"159000", - "amount_int":"100000000000", - "stamp":"1322317936804588" - }, - { - "price":1.6, - "amount":123.878, - "price_int":"160000", - "amount_int":"12387800000", - "stamp":"1325459207329565" - }, - { - "price":1.62, - "amount":0.26472222, - "price_int":"162000", - "amount_int":"26472222", - "stamp":"1312121657194398" - }, - { - "price":1.62393, - "amount":212, - "price_int":"162393", - "amount_int":"21200000000", - "stamp":"1320831997008541" - }, - { - "price":1.62934, - "amount":245.49817718, - "price_int":"162934", - "amount_int":"24549817718", - "stamp":"1321678869815420" - }, - { - "price":1.65, - "amount":16, - "price_int":"165000", - "amount_int":"1600000000", - "stamp":"1319288126809576" - }, - { - "price":1.65411, - "amount":10, - "price_int":"165411", - "amount_int":"1000000000", - "stamp":"1327573822457700" - }, - { - "price":1.6748, - "amount":4.17, - "price_int":"167480", - "amount_int":"417000000", - "stamp":"1319059197460749" - }, - { - "price":1.7, - "amount":28.767, - "price_int":"170000", - "amount_int":"2876700000", - "stamp":"1327073532560793" - }, - { - "price":1.70001, - "amount":0.00411762, - "price_int":"170001", - "amount_int":"411762", - "stamp":"1312121481576770" - }, - { - "price":1.701, - "amount":10, - "price_int":"170100", - "amount_int":"1000000000", - "stamp":"1312121487005121" - }, - { - "price":1.71, - "amount":25, - "price_int":"171000", - "amount_int":"2500000000", - "stamp":"1327510012981398" - }, - { - "price":1.73, - "amount":13.98, - "price_int":"173000", - "amount_int":"1398000000", - "stamp":"1319592611199963" - }, - { - "price":1.74217, - "amount":181.53873617, - "price_int":"174217", - "amount_int":"18153873617", - "stamp":"1319631905742303" - }, - { - "price":1.74382, - "amount":300, - "price_int":"174382", - "amount_int":"30000000000", - "stamp":"1320522899942273" - }, - { - "price":1.75, - "amount":17.71, - "price_int":"175000", - "amount_int":"1771000000", - "stamp":"1327181238727835" - }, - { - "price":1.7501, - "amount":0.765, - "price_int":"175010", - "amount_int":"76500000", - "stamp":"1321900288973103" - }, - { - "price":1.76, - "amount":50, - "price_int":"176000", - "amount_int":"5000000000", - "stamp":"1321658906945688" - }, - { - "price":1.779, - "amount":2000, - "price_int":"177900", - "amount_int":"200000000000", - "stamp":"1318868235702856" - }, - { - "price":1.78, - "amount":450, - "price_int":"178000", - "amount_int":"45000000000", - "stamp":"1321670759933712" - }, - { - "price":1.79, - "amount":5, - "price_int":"179000", - "amount_int":"500000000", - "stamp":"1319523290633807" - }, - { - "price":1.79278, - "amount":197.78221533, - "price_int":"179278", - "amount_int":"19778221533", - "stamp":"1321678804558137" - }, - { - "price":1.794, - "amount":10, - "price_int":"179400", - "amount_int":"1000000000", - "stamp":"1327532439241850" - }, - { - "price":1.8, - "amount":1093.5521, - "price_int":"180000", - "amount_int":"109355210000", - "stamp":"1322838731900638" - }, - { - "price":1.80002, - "amount":100, - "price_int":"180002", - "amount_int":"10000000000", - "stamp":"1321654946531871" - }, - { - "price":1.801, - "amount":55, - "price_int":"180100", - "amount_int":"5500000000", - "stamp":"1319104370918191" - }, - { - "price":1.80934, - "amount":1.3, - "price_int":"180934", - "amount_int":"130000000", - "stamp":"1322956562739166" - }, - { - "price":1.81, - "amount":54.64109944, - "price_int":"181000", - "amount_int":"5464109944", - "stamp":"1322250581903969" - }, - { - "price":1.82571, - "amount":1.3, - "price_int":"182571", - "amount_int":"130000000", - "stamp":"1322956562486142" - }, - { - "price":1.83, - "amount":12.03, - "price_int":"183000", - "amount_int":"1203000000", - "stamp":"1312121871787712" - }, - { - "price":1.83479, - "amount":1.3, - "price_int":"183479", - "amount_int":"130000000", - "stamp":"1322956558518652" - }, - { - "price":1.85, - "amount":1, - "price_int":"185000", - "amount_int":"100000000", - "stamp":"1321652969123298" - }, - { - "price":1.86023, - "amount":11.3, - "price_int":"186023", - "amount_int":"1130000000", - "stamp":"1322956554382619" - }, - { - "price":1.86556, - "amount":100, - "price_int":"186556", - "amount_int":"10000000000", - "stamp":"1323649918892982" - }, - { - "price":1.87, - "amount":53, - "price_int":"187000", - "amount_int":"5300000000", - "stamp":"1312680924637945" - }, - { - "price":1.88568, - "amount":1.3, - "price_int":"188568", - "amount_int":"130000000", - "stamp":"1322956549459373" - }, - { - "price":1.89, - "amount":2.191, - "price_int":"189000", - "amount_int":"219100000", - "stamp":"1319566517032942" - }, - { - "price":1.89499, - "amount":30, - "price_int":"189499", - "amount_int":"3000000000", - "stamp":"1320945448095438" - }, - { - "price":1.9, - "amount":650.6326, - "price_int":"190000", - "amount_int":"65063260000", - "stamp":"1326886760673958" - }, - { - "price":1.901, - "amount":40, - "price_int":"190100", - "amount_int":"4000000000", - "stamp":"1321371632094496" - }, - { - "price":1.90859, - "amount":334.64232, - "price_int":"190859", - "amount_int":"33464232000", - "stamp":"1328481497448225" - }, - { - "price":1.91002, - "amount":1.77, - "price_int":"191002", - "amount_int":"177000000", - "stamp":"1321311648540051" - }, - { - "price":1.91113, - "amount":1.3, - "price_int":"191113", - "amount_int":"130000000", - "stamp":"1322956544471934" - }, - { - "price":1.92, - "amount":15, - "price_int":"192000", - "amount_int":"1500000000", - "stamp":"1312121871741773" - }, - { - "price":1.9205, - "amount":7, - "price_int":"192050", - "amount_int":"700000000", - "stamp":"1326957592356528" - }, - { - "price":1.92114, - "amount":200, - "price_int":"192114", - "amount_int":"20000000000", - "stamp":"1321565314860386" - }, - { - "price":1.92156, - "amount":10, - "price_int":"192156", - "amount_int":"1000000000", - "stamp":"1321705291817599" - }, - { - "price":1.93658, - "amount":1.3, - "price_int":"193658", - "amount_int":"130000000", - "stamp":"1322956540088766" - }, - { - "price":1.95, - "amount":28.231, - "price_int":"195000", - "amount_int":"2823100000", - "stamp":"1327420564138853" - }, - { - "price":1.96, - "amount":0.6347602, - "price_int":"196000", - "amount_int":"63476020", - "stamp":"1326786155467829" - }, - { - "price":1.96203, - "amount":0.5, - "price_int":"196203", - "amount_int":"50000000", - "stamp":"1322956530247324" - }, - { - "price":1.971, - "amount":30, - "price_int":"197100", - "amount_int":"3000000000", - "stamp":"1321655435729476" - }, - { - "price":1.97475, - "amount":0.5, - "price_int":"197475", - "amount_int":"50000000", - "stamp":"1322956526467645" - }, - { - "price":1.98, - "amount":1, - "price_int":"198000", - "amount_int":"100000000", - "stamp":"1325450604538104" - }, - { - "price":1.98747, - "amount":0.5, - "price_int":"198747", - "amount_int":"50000000", - "stamp":"1322956521919724" - }, - { - "price":1.99, - "amount":181.62458291, - "price_int":"199000", - "amount_int":"18162458291", - "stamp":"1325577510616507" - }, - { - "price":1.994, - "amount":43.37487627, - "price_int":"199400", - "amount_int":"4337487627", - "stamp":"1320142495967359" - }, - { - "price":2, - "amount":5061.86809999, - "price_int":"200000", - "amount_int":"506186809999", - "stamp":"1328083165705946" - }, - { - "price":2.0001, - "amount":680.02805359, - "price_int":"200010", - "amount_int":"68002805359", - "stamp":"1322705399572795" - }, - { - "price":2.0002, - "amount":0.5, - "price_int":"200020", - "amount_int":"50000000", - "stamp":"1322956518206314" - }, - { - "price":2.001, - "amount":110, - "price_int":"200100", - "amount_int":"11000000000", - "stamp":"1324468088878811" - }, - { - "price":2.005, - "amount":62.3441, - "price_int":"200500", - "amount_int":"6234410000", - "stamp":"1328136595966856" - }, - { - "price":2.006, - "amount":402.57641076, - "price_int":"200600", - "amount_int":"40257641076", - "stamp":"1321720266555787" - }, - { - "price":2.0099, - "amount":2, - "price_int":"200990", - "amount_int":"200000000", - "stamp":"1321689398767228" - }, - { - "price":2.01, - "amount":3525.89938805, - "price_int":"201000", - "amount_int":"352589938805", - "stamp":"1325811990999647" - }, - { - "price":2.02, - "amount":152.55418811, - "price_int":"202000", - "amount_int":"15255418811", - "stamp":"1325701366469709" - }, - { - "price":2.02134, - "amount":100, - "price_int":"202134", - "amount_int":"10000000000", - "stamp":"1321737969439322" - }, - { - "price":2.02222, - "amount":1, - "price_int":"202222", - "amount_int":"100000000", - "stamp":"1324936065262145" - }, - { - "price":2.025, - "amount":110, - "price_int":"202500", - "amount_int":"11000000000", - "stamp":"1323519661067087" - }, - { - "price":2.02565, - "amount":0.5, - "price_int":"202565", - "amount_int":"50000000", - "stamp":"1322956511239338" - }, - { - "price":2.03, - "amount":55, - "price_int":"203000", - "amount_int":"5500000000", - "stamp":"1323519722369592" - }, - { - "price":2.03002, - "amount":18.7, - "price_int":"203002", - "amount_int":"1870000000", - "stamp":"1328644770528008" - }, - { - "price":2.031, - "amount":50.2216, - "price_int":"203100", - "amount_int":"5022160000", - "stamp":"1325552063545566" - }, - { - "price":2.03113, - "amount":0.5, - "price_int":"203113", - "amount_int":"50000000", - "stamp":"1322956514848874" - }, - { - "price":2.035, - "amount":100, - "price_int":"203500", - "amount_int":"10000000000", - "stamp":"1321624156787343" - }, - { - "price":2.03582, - "amount":500, - "price_int":"203582", - "amount_int":"50000000000", - "stamp":"1321971756877209" - }, - { - "price":2.03697, - "amount":0.33794, - "price_int":"203697", - "amount_int":"33794000", - "stamp":"1321807651946271" - }, - { - "price":2.0381, - "amount":0.1266, - "price_int":"203810", - "amount_int":"12660000", - "stamp":"1321668218817140" - }, - { - "price":2.03837, - "amount":0.5, - "price_int":"203837", - "amount_int":"50000000", - "stamp":"1322956506991943" - }, - { - "price":2.04, - "amount":100, - "price_int":"204000", - "amount_int":"10000000000", - "stamp":"1324029690884554" - }, - { - "price":2.05, - "amount":144.50364389, - "price_int":"205000", - "amount_int":"14450364389", - "stamp":"1326197580916967" - }, - { - "price":2.051, - "amount":136.12117503, - "price_int":"205100", - "amount_int":"13612117503", - "stamp":"1322158765242367" - }, - { - "price":2.05109, - "amount":0.5, - "price_int":"205109", - "amount_int":"50000000", - "stamp":"1322956502527541" - }, - { - "price":2.05333, - "amount":0.10374, - "price_int":"205333", - "amount_int":"10374000", - "stamp":"1321672216936345" - }, - { - "price":2.05883, - "amount":4, - "price_int":"205883", - "amount_int":"400000000", - "stamp":"1321673108388905" - }, - { - "price":2.06, - "amount":1110, - "price_int":"206000", - "amount_int":"111000000000", - "stamp":"1322687015631431" - }, - { - "price":2.06382, - "amount":0.5, - "price_int":"206382", - "amount_int":"50000000", - "stamp":"1322956498553183" - }, - { - "price":2.07, - "amount":134, - "price_int":"207000", - "amount_int":"13400000000", - "stamp":"1322162785040897" - }, - { - "price":2.07654, - "amount":0.5, - "price_int":"207654", - "amount_int":"50000000", - "stamp":"1322956493978954" - }, - { - "price":2.08, - "amount":111.13946153, - "price_int":"208000", - "amount_int":"11113946153", - "stamp":"1326724072517180" - }, - { - "price":2.08725, - "amount":10, - "price_int":"208725", - "amount_int":"1000000000", - "stamp":"1318857694122100" - }, - { - "price":2.08999, - "amount":15, - "price_int":"208999", - "amount_int":"1500000000", - "stamp":"1326866618825212" - }, - { - "price":2.09, - "amount":166.7464, - "price_int":"209000", - "amount_int":"16674640000", - "stamp":"1325577474956362" - }, - { - "price":2.09944, - "amount":4.5, - "price_int":"209944", - "amount_int":"450000000", - "stamp":"1322934456508051" - }, - { - "price":2.1, - "amount":803.6057, - "price_int":"210000", - "amount_int":"80360570000", - "stamp":"1328014889462212" - }, - { - "price":2.10011, - "amount":0.0434501, - "price_int":"210011", - "amount_int":"4345010", - "stamp":"1323090614633001" - }, - { - "price":2.10199, - "amount":0.5, - "price_int":"210199", - "amount_int":"50000000", - "stamp":"1322956486179889" - }, - { - "price":2.102, - "amount":2, - "price_int":"210200", - "amount_int":"200000000", - "stamp":"1321843294625857" - }, - { - "price":2.10817, - "amount":0.5, - "price_int":"210817", - "amount_int":"50000000", - "stamp":"1322956490204329" - }, - { - "price":2.109, - "amount":1.13651019, - "price_int":"210900", - "amount_int":"113651019", - "stamp":"1319172686017678" - }, - { - "price":2.11, - "amount":223.40604264, - "price_int":"211000", - "amount_int":"22340604264", - "stamp":"1327015931530827" - }, - { - "price":2.11001, - "amount":2000, - "price_int":"211001", - "amount_int":"200000000000", - "stamp":"1326082342732402" - }, - { - "price":2.1146, - "amount":283.7414679, - "price_int":"211460", - "amount_int":"28374146790", - "stamp":"1327523998937712" - }, - { - "price":2.11471, - "amount":0.4, - "price_int":"211471", - "amount_int":"40000000", - "stamp":"1322956479276273" - }, - { - "price":2.12, - "amount":388.9099, - "price_int":"212000", - "amount_int":"38890990000", - "stamp":"1322735738990906" - }, - { - "price":2.123, - "amount":16.88176165, - "price_int":"212300", - "amount_int":"1688176165", - "stamp":"1321872012737389" - }, - { - "price":2.12313, - "amount":100, - "price_int":"212313", - "amount_int":"10000000000", - "stamp":"1322998559644492" - }, - { - "price":2.125, - "amount":21, - "price_int":"212500", - "amount_int":"2100000000", - "stamp":"1324067452890373" - }, - { - "price":2.12744, - "amount":0.4, - "price_int":"212744", - "amount_int":"40000000", - "stamp":"1322956473817974" - }, - { - "price":2.12901, - "amount":50, - "price_int":"212901", - "amount_int":"5000000000", - "stamp":"1322749033531050" - }, - { - "price":2.13, - "amount":3, - "price_int":"213000", - "amount_int":"300000000", - "stamp":"1321680888975670" - }, - { - "price":2.14016, - "amount":0.4, - "price_int":"214016", - "amount_int":"40000000", - "stamp":"1322956464718832" - }, - { - "price":2.1411, - "amount":25, - "price_int":"214110", - "amount_int":"2500000000", - "stamp":"1326870054415092" - }, - { - "price":2.14421, - "amount":3.045, - "price_int":"214421", - "amount_int":"304500000", - "stamp":"1321764045028782" - }, - { - "price":2.15, - "amount":26.8458, - "price_int":"215000", - "amount_int":"2684580000", - "stamp":"1327420571238177" - }, - { - "price":2.15114, - "amount":0.22984835, - "price_int":"215114", - "amount_int":"22984835", - "stamp":"1321550044195415" - }, - { - "price":2.16, - "amount":0.79906944, - "price_int":"216000", - "amount_int":"79906944", - "stamp":"1321830957982495" - }, - { - "price":2.16002, - "amount":67.9, - "price_int":"216002", - "amount_int":"6790000000", - "stamp":"1321951677096856" - }, - { - "price":2.162, - "amount":0.07155874, - "price_int":"216200", - "amount_int":"7155874", - "stamp":"1321854002191808" - }, - { - "price":2.16306, - "amount":0.5, - "price_int":"216306", - "amount_int":"50000000", - "stamp":"1322934452487723" - }, - { - "price":2.16561, - "amount":0.4, - "price_int":"216561", - "amount_int":"40000000", - "stamp":"1322956454942892" - }, - { - "price":2.1705, - "amount":209.9194, - "price_int":"217050", - "amount_int":"20991940000", - "stamp":"1321885822398844" - }, - { - "price":2.17236, - "amount":0.4, - "price_int":"217236", - "amount_int":"40000000", - "stamp":"1322956460825731" - }, - { - "price":2.17833, - "amount":0.4, - "price_int":"217833", - "amount_int":"40000000", - "stamp":"1322956450314797" - }, - { - "price":2.18, - "amount":303.21357798, - "price_int":"218000", - "amount_int":"30321357798", - "stamp":"1325439314035622" - }, - { - "price":2.18634, - "amount":0.44915703, - "price_int":"218634", - "amount_int":"44915703", - "stamp":"1321879455659446" - }, - { - "price":2.19, - "amount":51.5, - "price_int":"219000", - "amount_int":"5150000000", - "stamp":"1321951742336506" - }, - { - "price":2.1901, - "amount":0.00124195, - "price_int":"219010", - "amount_int":"124195", - "stamp":"1321837034820799" - }, - { - "price":2.19094, - "amount":10.0444, - "price_int":"219094", - "amount_int":"1004440000", - "stamp":"1321880638673760" - }, - { - "price":2.19106, - "amount":0.4, - "price_int":"219106", - "amount_int":"40000000", - "stamp":"1322956445941541" - }, - { - "price":2.19162, - "amount":50, - "price_int":"219162", - "amount_int":"5000000000", - "stamp":"1321832602676970" - }, - { - "price":2.19308, - "amount":10.0594, - "price_int":"219308", - "amount_int":"1005940000", - "stamp":"1321900378877402" - }, - { - "price":2.19537, - "amount":10.0428, - "price_int":"219537", - "amount_int":"1004280000", - "stamp":"1321880724626901" - }, - { - "price":2.19545, - "amount":0.00017764, - "price_int":"219545", - "amount_int":"17764", - "stamp":"1321745934927381" - }, - { - "price":2.1972, - "amount":10.0416, - "price_int":"219720", - "amount_int":"1004160000", - "stamp":"1321880681904240" - }, - { - "price":2.19741, - "amount":10.0543, - "price_int":"219741", - "amount_int":"1005430000", - "stamp":"1321895027381447" - }, - { - "price":2.19879, - "amount":10.0506, - "price_int":"219879", - "amount_int":"1005060000", - "stamp":"1321880849086828" - }, - { - "price":2.2, - "amount":3304.32815452, - "price_int":"220000", - "amount_int":"330432815452", - "stamp":"1327880762167361" - }, - { - "price":2.20004, - "amount":10.0479, - "price_int":"220004", - "amount_int":"1004790000", - "stamp":"1321880812577117" - }, - { - "price":2.20006, - "amount":10.0566, - "price_int":"220006", - "amount_int":"1005660000", - "stamp":"1321900464752322" - }, - { - "price":2.20035, - "amount":10.0543, - "price_int":"220035", - "amount_int":"1005430000", - "stamp":"1321880921411938" - }, - { - "price":2.20037, - "amount":10.0543, - "price_int":"220037", - "amount_int":"1005430000", - "stamp":"1321890622536672" - }, - { - "price":2.20108, - "amount":10.0543, - "price_int":"220108", - "amount_int":"1005430000", - "stamp":"1321895119339803" - }, - { - "price":2.20236, - "amount":10.0468, - "price_int":"220236", - "amount_int":"1004680000", - "stamp":"1321880776221797" - }, - { - "price":2.203, - "amount":85, - "price_int":"220300", - "amount_int":"8500000000", - "stamp":"1321923003317363" - }, - { - "price":2.20369, - "amount":10.0506, - "price_int":"220369", - "amount_int":"1005060000", - "stamp":"1321880886928302" - }, - { - "price":2.20377, - "amount":10.0594, - "price_int":"220377", - "amount_int":"1005940000", - "stamp":"1321900573396791" - }, - { - "price":2.20378, - "amount":0.4, - "price_int":"220378", - "amount_int":"40000000", - "stamp":"1322956441709026" - }, - { - "price":2.20494, - "amount":10.0566, - "price_int":"220494", - "amount_int":"1005660000", - "stamp":"1321900530279012" - }, - { - "price":2.20514, - "amount":10.0491, - "price_int":"220514", - "amount_int":"1004910000", - "stamp":"1321894929447277" - }, - { - "price":2.20626, - "amount":10.0754, - "price_int":"220626", - "amount_int":"1007540000", - "stamp":"1321900924220203" - }, - { - "price":2.20788, - "amount":10.0662, - "price_int":"220788", - "amount_int":"1006620000", - "stamp":"1321900768847743" - }, - { - "price":2.20791, - "amount":10.0704, - "price_int":"220791", - "amount_int":"1007040000", - "stamp":"1321900854932160" - }, - { - "price":2.20859, - "amount":0.14667729, - "price_int":"220859", - "amount_int":"14667729", - "stamp":"1321725231722869" - }, - { - "price":2.20862, - "amount":10.0506, - "price_int":"220862", - "amount_int":"1005060000", - "stamp":"1321895054945922" - }, - { - "price":2.20863, - "amount":10.0594, - "price_int":"220863", - "amount_int":"1005940000", - "stamp":"1321900623705498" - }, - { - "price":2.20872, - "amount":10.0506, - "price_int":"220872", - "amount_int":"1005060000", - "stamp":"1321900292180324" - }, - { - "price":2.20885, - "amount":10.0506, - "price_int":"220885", - "amount_int":"1005060000", - "stamp":"1321900333459152" - }, - { - "price":2.20904, - "amount":10.0491, - "price_int":"220904", - "amount_int":"1004910000", - "stamp":"1321900222482680" - }, - { - "price":2.20998, - "amount":32.70730956, - "price_int":"220998", - "amount_int":"3270730956", - "stamp":"1321990819969531" - }, - { - "price":2.21, - "amount":31.02488687, - "price_int":"221000", - "amount_int":"3102488687", - "stamp":"1325819827620163" - }, - { - "price":2.21002, - "amount":3.79, - "price_int":"221002", - "amount_int":"379000000", - "stamp":"1325835648451008" - }, - { - "price":2.211, - "amount":0.06071008, - "price_int":"221100", - "amount_int":"6071008", - "stamp":"1322686028256322" - }, - { - "price":2.2134, - "amount":200, - "price_int":"221340", - "amount_int":"20000000000", - "stamp":"1322922600496648" - }, - { - "price":2.21351, - "amount":10.0594, - "price_int":"221351", - "amount_int":"1005940000", - "stamp":"1321900735028759" - }, - { - "price":2.2165, - "amount":0.4, - "price_int":"221650", - "amount_int":"40000000", - "stamp":"1322956437744150" - }, - { - "price":2.21754, - "amount":10.0662, - "price_int":"221754", - "amount_int":"1006620000", - "stamp":"1321900811172601" - }, - { - "price":2.22, - "amount":47.22066666, - "price_int":"222000", - "amount_int":"4722066666", - "stamp":"1322672425741598" - }, - { - "price":2.22017, - "amount":10.0692, - "price_int":"222017", - "amount_int":"1006920000", - "stamp":"1322500469734493" - }, - { - "price":2.22044, - "amount":10.1082, - "price_int":"222044", - "amount_int":"1010820000", - "stamp":"1322500275659208" - }, - { - "price":2.22099, - "amount":1.41714732, - "price_int":"222099", - "amount_int":"141714732", - "stamp":"1321816556994212" - }, - { - "price":2.2222, - "amount":45, - "price_int":"222220", - "amount_int":"4500000000", - "stamp":"1323168126976269" - }, - { - "price":2.22541, - "amount":10.0754, - "price_int":"222541", - "amount_int":"1007540000", - "stamp":"1321932122390366" - }, - { - "price":2.22715, - "amount":10.0704, - "price_int":"222715", - "amount_int":"1007040000", - "stamp":"1321931984809461" - }, - { - "price":2.22754, - "amount":10.1452, - "price_int":"222754", - "amount_int":"1014520000", - "stamp":"1322498557015545" - }, - { - "price":2.22826, - "amount":10.0506, - "price_int":"222826", - "amount_int":"1005060000", - "stamp":"1321953199636194" - }, - { - "price":2.22901, - "amount":10.1549, - "price_int":"222901", - "amount_int":"1015490000", - "stamp":"1322500331874826" - }, - { - "price":2.22923, - "amount":0.4, - "price_int":"222923", - "amount_int":"40000000", - "stamp":"1322956433727778" - }, - { - "price":2.23, - "amount":457.07179372, - "price_int":"223000", - "amount_int":"45707179372", - "stamp":"1322816525754144" - }, - { - "price":2.23221, - "amount":10.0566, - "price_int":"223221", - "amount_int":"1005660000", - "stamp":"1321953282053273" - }, - { - "price":2.23316, - "amount":10.0506, - "price_int":"223316", - "amount_int":"1005060000", - "stamp":"1321953243996278" - }, - { - "price":2.23784, - "amount":10.0594, - "price_int":"223784", - "amount_int":"1005940000", - "stamp":"1321953412441011" - }, - { - "price":2.23949, - "amount":10.0543, - "price_int":"223949", - "amount_int":"1005430000", - "stamp":"1321953322294681" - }, - { - "price":2.23972, - "amount":10.1457, - "price_int":"223972", - "amount_int":"1014570000", - "stamp":"1322500032525219" - }, - { - "price":2.23986, - "amount":10.1313, - "price_int":"223986", - "amount_int":"1013130000", - "stamp":"1322500110744647" - }, - { - "price":2.24195, - "amount":0.35, - "price_int":"224195", - "amount_int":"35000000", - "stamp":"1322956423857460" - }, - { - "price":2.24318, - "amount":10.0784, - "price_int":"224318", - "amount_int":"1007840000", - "stamp":"1322022905229250" - }, - { - "price":2.24374, - "amount":10.1313, - "price_int":"224374", - "amount_int":"1013130000", - "stamp":"1322500203514559" - }, - { - "price":2.24446, - "amount":10.0543, - "price_int":"224446", - "amount_int":"1005430000", - "stamp":"1321953365163581" - }, - { - "price":2.249, - "amount":1000, - "price_int":"224900", - "amount_int":"100000000000", - "stamp":"1322318224099316" - }, - { - "price":2.25, - "amount":286.70660888, - "price_int":"225000", - "amount_int":"28670660888", - "stamp":"1327531478760385" - }, - { - "price":2.25019, - "amount":10.1189, - "price_int":"225019", - "amount_int":"1011890000", - "stamp":"1322499968926613" - }, - { - "price":2.25153, - "amount":10.0536, - "price_int":"225153", - "amount_int":"1005360000", - "stamp":"1321967512988822" - }, - { - "price":2.25468, - "amount":0.35, - "price_int":"225468", - "amount_int":"35000000", - "stamp":"1322956417688536" - }, - { - "price":2.25634, - "amount":10.0536, - "price_int":"225634", - "amount_int":"1005360000", - "stamp":"1321967439809218" - }, - { - "price":2.25772, - "amount":10.0506, - "price_int":"225772", - "amount_int":"1005060000", - "stamp":"1322060375496603" - }, - { - "price":2.26, - "amount":0.45756194, - "price_int":"226000", - "amount_int":"45756194", - "stamp":"1323945194408780" - }, - { - "price":2.2601, - "amount":0.829646, - "price_int":"226010", - "amount_int":"82964600", - "stamp":"1323944955776755" - }, - { - "price":2.26107, - "amount":10.0491, - "price_int":"226107", - "amount_int":"1004910000", - "stamp":"1322060376943556" - }, - { - "price":2.26133, - "amount":10.0536, - "price_int":"226133", - "amount_int":"1005360000", - "stamp":"1321967557481306" - }, - { - "price":2.26223, - "amount":10.0554, - "price_int":"226223", - "amount_int":"1005540000", - "stamp":"1321967861065710" - }, - { - "price":2.2674, - "amount":0.35, - "price_int":"226740", - "amount_int":"35000000", - "stamp":"1322956413989472" - }, - { - "price":2.27968, - "amount":10.0597, - "price_int":"227968", - "amount_int":"1005970000", - "stamp":"1322155885860132" - }, - { - "price":2.28, - "amount":107.25791666, - "price_int":"228000", - "amount_int":"10725791666", - "stamp":"1323299011112293" - }, - { - "price":2.28012, - "amount":0.35, - "price_int":"228012", - "amount_int":"35000000", - "stamp":"1322956409638935" - }, - { - "price":2.28464, - "amount":5, - "price_int":"228464", - "amount_int":"500000000", - "stamp":"1327077466897350" - }, - { - "price":2.28681, - "amount":10.0554, - "price_int":"228681", - "amount_int":"1005540000", - "stamp":"1322108573247644" - }, - { - "price":2.28941, - "amount":0.35, - "price_int":"228941", - "amount_int":"35000000", - "stamp":"1322163221863328" - }, - { - "price":2.2903, - "amount":120, - "price_int":"229030", - "amount_int":"12000000000", - "stamp":"1324044096261020" - }, - { - "price":2.29285, - "amount":0.35, - "price_int":"229285", - "amount_int":"35000000", - "stamp":"1322956404674768" - }, - { - "price":2.29344, - "amount":5.1311, - "price_int":"229344", - "amount_int":"513110000", - "stamp":"1322498800245435" - }, - { - "price":2.29375, - "amount":10.0481, - "price_int":"229375", - "amount_int":"1004810000", - "stamp":"1322108489862577" - }, - { - "price":2.29892, - "amount":9.1347, - "price_int":"229892", - "amount_int":"913470000", - "stamp":"1325463497618195" - }, - { - "price":2.3, - "amount":1308.30626519, - "price_int":"230000", - "amount_int":"130830626519", - "stamp":"1327624408442617" - }, - { - "price":2.30201, - "amount":7.70023588, - "price_int":"230201", - "amount_int":"770023588", - "stamp":"1322168392653295" - }, - { - "price":2.30501, - "amount":5, - "price_int":"230501", - "amount_int":"500000000", - "stamp":"1326957491116499" - }, - { - "price":2.30557, - "amount":0.35, - "price_int":"230557", - "amount_int":"35000000", - "stamp":"1322956400902288" - }, - { - "price":2.30948, - "amount":10.0481, - "price_int":"230948", - "amount_int":"1004810000", - "stamp":"1322153030297038" - }, - { - "price":2.31, - "amount":990.73233246, - "price_int":"231000", - "amount_int":"99073233246", - "stamp":"1327732504288458" - }, - { - "price":2.31134, - "amount":5.0729, - "price_int":"231134", - "amount_int":"507290000", - "stamp":"1322499296180643" - }, - { - "price":2.31173, - "amount":10.0655, - "price_int":"231173", - "amount_int":"1006550000", - "stamp":"1322156046537709" - }, - { - "price":2.3124, - "amount":150, - "price_int":"231240", - "amount_int":"15000000000", - "stamp":"1322922641341841" - }, - { - "price":2.31469, - "amount":10.1079, - "price_int":"231469", - "amount_int":"1010790000", - "stamp":"1322498262415971" - }, - { - "price":2.3183, - "amount":0.35, - "price_int":"231830", - "amount_int":"35000000", - "stamp":"1322956397353153" - }, - { - "price":2.32, - "amount":247.3, - "price_int":"232000", - "amount_int":"24730000000", - "stamp":"1327134001698601" - }, - { - "price":2.32002, - "amount":22.34696683, - "price_int":"232002", - "amount_int":"2234696683", - "stamp":"1327348831090774" - }, - { - "price":2.32011, - "amount":5.2939, - "price_int":"232011", - "amount_int":"529390000", - "stamp":"1322578431504728" - }, - { - "price":2.32096, - "amount":5.0592, - "price_int":"232096", - "amount_int":"505920000", - "stamp":"1322498120392029" - }, - { - "price":2.32729, - "amount":18.7, - "price_int":"232729", - "amount_int":"1870000000", - "stamp":"1322135971337734" - }, - { - "price":2.32849, - "amount":0.02337692, - "price_int":"232849", - "amount_int":"2337692", - "stamp":"1321454851857414" - }, - { - "price":2.33, - "amount":0.00027896, - "price_int":"233000", - "amount_int":"27896", - "stamp":"1322293745081791" - }, - { - "price":2.33102, - "amount":0.35, - "price_int":"233102", - "amount_int":"35000000", - "stamp":"1322956392792509" - }, - { - "price":2.33239, - "amount":0.00077549, - "price_int":"233239", - "amount_int":"77549", - "stamp":"1321456080078472" - }, - { - "price":2.33398, - "amount":10.1821, - "price_int":"233398", - "amount_int":"1018210000", - "stamp":"1322499028713197" - }, - { - "price":2.34, - "amount":45, - "price_int":"234000", - "amount_int":"4500000000", - "stamp":"1322712850931931" - }, - { - "price":2.34139, - "amount":1627, - "price_int":"234139", - "amount_int":"162700000000", - "stamp":"1322532098774575" - }, - { - "price":2.34247, - "amount":0.35, - "price_int":"234247", - "amount_int":"35000000", - "stamp":"1322956380114821" - }, - { - "price":2.34502, - "amount":0.35, - "price_int":"234502", - "amount_int":"35000000", - "stamp":"1322956384024473" - }, - { - "price":2.35, - "amount":47.80604255, - "price_int":"235000", - "amount_int":"4780604255", - "stamp":"1322560565491637" - }, - { - "price":2.35128, - "amount":10.1821, - "price_int":"235128", - "amount_int":"1018210000", - "stamp":"1322499112746106" - }, - { - "price":2.35519, - "amount":0.35, - "price_int":"235519", - "amount_int":"35000000", - "stamp":"1322956376257636" - }, - { - "price":2.3579, - "amount":0.01203613, - "price_int":"235790", - "amount_int":"1203613", - "stamp":"1322449367159416" - }, - { - "price":2.35914, - "amount":28.29763, - "price_int":"235914", - "amount_int":"2829763000", - "stamp":"1322124606149714" - }, - { - "price":2.36, - "amount":10, - "price_int":"236000", - "amount_int":"1000000000", - "stamp":"1322999581341016" - }, - { - "price":2.36164, - "amount":10.1625, - "price_int":"236164", - "amount_int":"1016250000", - "stamp":"1322499208693954" - }, - { - "price":2.36792, - "amount":0.35, - "price_int":"236792", - "amount_int":"35000000", - "stamp":"1322956371944917" - }, - { - "price":2.37, - "amount":21.097, - "price_int":"237000", - "amount_int":"2109700000", - "stamp":"1327420581521630" - }, - { - "price":2.37759, - "amount":2.25, - "price_int":"237759", - "amount_int":"225000000", - "stamp":"1322629308493037" - }, - { - "price":2.37799, - "amount":8, - "price_int":"237799", - "amount_int":"800000000", - "stamp":"1322124684553776" - }, - { - "price":2.38, - "amount":101.00035294, - "price_int":"238000", - "amount_int":"10100035294", - "stamp":"1325439373344255" - }, - { - "price":2.38918, - "amount":10.0909, - "price_int":"238918", - "amount_int":"1009090000", - "stamp":"1322497976389958" - }, - { - "price":2.39, - "amount":0.55119246, - "price_int":"239000", - "amount_int":"55119246", - "stamp":"1322527464082469" - }, - { - "price":2.39286, - "amount":1, - "price_int":"239286", - "amount_int":"100000000", - "stamp":"1323023423447371" - }, - { - "price":2.39337, - "amount":0.35, - "price_int":"239337", - "amount_int":"35000000", - "stamp":"1322956362643221" - }, - { - "price":2.39413, - "amount":5.024, - "price_int":"239413", - "amount_int":"502400000", - "stamp":"1322242264835791" - }, - { - "price":2.3971, - "amount":1.2377456, - "price_int":"239710", - "amount_int":"123774560", - "stamp":"1325477367307572" - }, - { - "price":2.39901, - "amount":66.61514541, - "price_int":"239901", - "amount_int":"6661514541", - "stamp":"1323592047756392" - }, - { - "price":2.3999, - "amount":1, - "price_int":"239990", - "amount_int":"100000000", - "stamp":"1322442405530619" - }, - { - "price":2.4, - "amount":516.03654582, - "price_int":"240000", - "amount_int":"51603654582", - "stamp":"1327616996354324" - }, - { - "price":2.40001, - "amount":21.27979883, - "price_int":"240001", - "amount_int":"2127979883", - "stamp":"1326857738295924" - }, - { - "price":2.40034, - "amount":10.0489, - "price_int":"240034", - "amount_int":"1004890000", - "stamp":"1322243103307105" - }, - { - "price":2.40201, - "amount":0.81805654, - "price_int":"240201", - "amount_int":"81805654", - "stamp":"1322564524240826" - }, - { - "price":2.40218, - "amount":0.35, - "price_int":"240218", - "amount_int":"35000000", - "stamp":"1322956367932009" - }, - { - "price":2.40586, - "amount":5.0421, - "price_int":"240586", - "amount_int":"504210000", - "stamp":"1322498047439058" - }, - { - "price":2.40609, - "amount":0.35, - "price_int":"240609", - "amount_int":"35000000", - "stamp":"1322956356691526" - }, - { - "price":2.41, - "amount":623.025, - "price_int":"241000", - "amount_int":"62302500000", - "stamp":"1322576463371806" - }, - { - "price":2.41211, - "amount":8.8435, - "price_int":"241211", - "amount_int":"884350000", - "stamp":"1322534026049460" - }, - { - "price":2.41754, - "amount":10, - "price_int":"241754", - "amount_int":"1000000000", - "stamp":"1324426169579884" - }, - { - "price":2.4185, - "amount":0.0578752, - "price_int":"241850", - "amount_int":"5787520", - "stamp":"1322316062116658" - }, - { - "price":2.41881, - "amount":0.35, - "price_int":"241881", - "amount_int":"35000000", - "stamp":"1322956349860476" - }, - { - "price":2.42, - "amount":144.0083, - "price_int":"242000", - "amount_int":"14400830000", - "stamp":"1325577426606560" - }, - { - "price":2.42518, - "amount":1, - "price_int":"242518", - "amount_int":"100000000", - "stamp":"1323023413476297" - }, - { - "price":2.42735, - "amount":1, - "price_int":"242735", - "amount_int":"100000000", - "stamp":"1323023418120447" - }, - { - "price":2.42904, - "amount":42, - "price_int":"242904", - "amount_int":"4200000000", - "stamp":"1322197585328385" - }, - { - "price":2.43154, - "amount":0.35, - "price_int":"243154", - "amount_int":"35000000", - "stamp":"1322956343050123" - }, - { - "price":2.4326, - "amount":5.0367, - "price_int":"243260", - "amount_int":"503670000", - "stamp":"1322491202383342" - }, - { - "price":2.43695, - "amount":5, - "price_int":"243695", - "amount_int":"500000000", - "stamp":"1322510119585657" - }, - { - "price":2.44306, - "amount":2.18, - "price_int":"244306", - "amount_int":"218000000", - "stamp":"1322573079542957" - }, - { - "price":2.44426, - "amount":1.35, - "price_int":"244426", - "amount_int":"135000000", - "stamp":"1323023406637489" - }, - { - "price":2.44723, - "amount":0.00034324, - "price_int":"244723", - "amount_int":"34324", - "stamp":"1322388074554115" - }, - { - "price":2.44808, - "amount":1, - "price_int":"244808", - "amount_int":"100000000", - "stamp":"1322997510675719" - }, - { - "price":2.44812, - "amount":1, - "price_int":"244812", - "amount_int":"100000000", - "stamp":"1322997826032582" - }, - { - "price":2.45, - "amount":100, - "price_int":"245000", - "amount_int":"10000000000", - "stamp":"1323684506304492" - }, - { - "price":2.4526, - "amount":5.0495, - "price_int":"245260", - "amount_int":"504950000", - "stamp":"1322491359574766" - }, - { - "price":2.4555, - "amount":20, - "price_int":"245550", - "amount_int":"2000000000", - "stamp":"1322465484760806" - }, - { - "price":2.45699, - "amount":1.35, - "price_int":"245699", - "amount_int":"135000000", - "stamp":"1323023402879529" - }, - { - "price":2.45739, - "amount":1, - "price_int":"245739", - "amount_int":"100000000", - "stamp":"1322997514710253" - }, - { - "price":2.46, - "amount":1.03, - "price_int":"246000", - "amount_int":"103000000", - "stamp":"1322527455179294" - }, - { - "price":2.4608, - "amount":1, - "price_int":"246080", - "amount_int":"100000000", - "stamp":"1322997506307483" - }, - { - "price":2.46971, - "amount":0.35, - "price_int":"246971", - "amount_int":"35000000", - "stamp":"1322956329918738" - }, - { - "price":2.47, - "amount":807.6392, - "price_int":"247000", - "amount_int":"80763920000", - "stamp":"1328216570890071" - }, - { - "price":2.47381, - "amount":190, - "price_int":"247381", - "amount_int":"19000000000", - "stamp":"1322328169502708" - }, - { - "price":2.47607, - "amount":1, - "price_int":"247607", - "amount_int":"100000000", - "stamp":"1323023393420484" - }, - { - "price":2.47658, - "amount":1, - "price_int":"247658", - "amount_int":"100000000", - "stamp":"1322997497970255" - }, - { - "price":2.48, - "amount":100.0201, - "price_int":"248000", - "amount_int":"10002010000", - "stamp":"1322994055898026" - }, - { - "price":2.48243, - "amount":0.35, - "price_int":"248243", - "amount_int":"35000000", - "stamp":"1322956325591547" - }, - { - "price":2.48798, - "amount":1, - "price_int":"248798", - "amount_int":"100000000", - "stamp":"1323023388378621" - }, - { - "price":2.4893, - "amount":1, - "price_int":"248930", - "amount_int":"100000000", - "stamp":"1322997493877095" - }, - { - "price":2.49205, - "amount":1, - "price_int":"249205", - "amount_int":"100000000", - "stamp":"1323023398211043" - }, - { - "price":2.49516, - "amount":0.35, - "price_int":"249516", - "amount_int":"35000000", - "stamp":"1322956321115799" - }, - { - "price":2.49901, - "amount":60, - "price_int":"249901", - "amount_int":"6000000000", - "stamp":"1323592032253359" - }, - { - "price":2.5, - "amount":2512.20820797, - "price_int":"250000", - "amount_int":"251220820797", - "stamp":"1328261451091024" - }, - { - "price":2.5001, - "amount":0.00011999, - "price_int":"250010", - "amount_int":"11999", - "stamp":"1321499835896370" - }, - { - "price":2.50051, - "amount":5.0255, - "price_int":"250051", - "amount_int":"502550000", - "stamp":"1322491363593904" - }, - { - "price":2.501, - "amount":242.42689324, - "price_int":"250100", - "amount_int":"24242689324", - "stamp":"1323062446136089" - }, - { - "price":2.50152, - "amount":2.491235, - "price_int":"250152", - "amount_int":"249123500", - "stamp":"1323206120760529" - }, - { - "price":2.50203, - "amount":1, - "price_int":"250203", - "amount_int":"100000000", - "stamp":"1322997489408789" - }, - { - "price":2.50348, - "amount":1, - "price_int":"250348", - "amount_int":"100000000", - "stamp":"1323023384359682" - }, - { - "price":2.50661, - "amount":0.5, - "price_int":"250661", - "amount_int":"50000000", - "stamp":"1327573788803980" - }, - { - "price":2.50733, - "amount":5.0809, - "price_int":"250733", - "amount_int":"508090000", - "stamp":"1322569777103907" - }, - { - "price":2.5086, - "amount":5.1943, - "price_int":"250860", - "amount_int":"519430000", - "stamp":"1322578282228348" - }, - { - "price":2.51, - "amount":1132.9846976, - "price_int":"251000", - "amount_int":"113298469760", - "stamp":"1327425980571557" - }, - { - "price":2.51001, - "amount":0.74701195, - "price_int":"251001", - "amount_int":"74701195", - "stamp":"1323944880169418" - }, - { - "price":2.51174, - "amount":1, - "price_int":"251174", - "amount_int":"100000000", - "stamp":"1322997820296489" - }, - { - "price":2.5123, - "amount":100, - "price_int":"251230", - "amount_int":"10000000000", - "stamp":"1325106291089303" - }, - { - "price":2.51236, - "amount":50, - "price_int":"251236", - "amount_int":"5000000000", - "stamp":"1323024685314786" - }, - { - "price":2.51343, - "amount":1, - "price_int":"251343", - "amount_int":"100000000", - "stamp":"1323023380718193" - }, - { - "price":2.51417, - "amount":5, - "price_int":"251417", - "amount_int":"500000000", - "stamp":"1322565922560334" - }, - { - "price":2.51555, - "amount":1.7715667, - "price_int":"251555", - "amount_int":"177156670", - "stamp":"1322997810983170" - }, - { - "price":2.51715, - "amount":5.1943, - "price_int":"251715", - "amount_int":"519430000", - "stamp":"1322578355565625" - }, - { - "price":2.51933, - "amount":0.5, - "price_int":"251933", - "amount_int":"50000000", - "stamp":"1327573792459979" - }, - { - "price":2.52, - "amount":65.26832935, - "price_int":"252000", - "amount_int":"6526832935", - "stamp":"1325853025045483" - }, - { - "price":2.52108, - "amount":100, - "price_int":"252108", - "amount_int":"10000000000", - "stamp":"1322935802131722" - }, - { - "price":2.52259, - "amount":0.5593061, - "price_int":"252259", - "amount_int":"55930610", - "stamp":"1322517186634916" - }, - { - "price":2.52615, - "amount":1, - "price_int":"252615", - "amount_int":"100000000", - "stamp":"1323023375576136" - }, - { - "price":2.53057, - "amount":0.25, - "price_int":"253057", - "amount_int":"25000000", - "stamp":"1322956310875396" - }, - { - "price":2.5307, - "amount":100, - "price_int":"253070", - "amount_int":"10000000000", - "stamp":"1327530802842658" - }, - { - "price":2.53206, - "amount":5.5, - "price_int":"253206", - "amount_int":"550000000", - "stamp":"1327573785412918" - }, - { - "price":2.5375, - "amount":1, - "price_int":"253750", - "amount_int":"100000000", - "stamp":"1322997484421616" - }, - { - "price":2.54, - "amount":207.96640078, - "price_int":"254000", - "amount_int":"20796640078", - "stamp":"1325577406662264" - }, - { - "price":2.54385, - "amount":5.17, - "price_int":"254385", - "amount_int":"517000000", - "stamp":"1322570827468140" - }, - { - "price":2.54478, - "amount":35.93848999, - "price_int":"254478", - "amount_int":"3593848999", - "stamp":"1328082111182171" - }, - { - "price":2.545, - "amount":5, - "price_int":"254500", - "amount_int":"500000000", - "stamp":"1324351877567396" - }, - { - "price":2.54591, - "amount":0.2, - "price_int":"254591", - "amount_int":"20000000", - "stamp":"1327925605910181" - }, - { - "price":2.55, - "amount":22.79, - "price_int":"255000", - "amount_int":"2279000000", - "stamp":"1323605066320277" - }, - { - "price":2.551, - "amount":1500, - "price_int":"255100", - "amount_int":"150000000000", - "stamp":"1323062461568324" - }, - { - "price":2.55206, - "amount":18.8729, - "price_int":"255206", - "amount_int":"1887290000", - "stamp":"1322533352459608" - }, - { - "price":2.5522, - "amount":24.49039652, - "price_int":"255220", - "amount_int":"2449039652", - "stamp":"1319848128877200" - }, - { - "price":2.5575, - "amount":1.5, - "price_int":"255750", - "amount_int":"150000000", - "stamp":"1327573766379137" - }, - { - "price":2.56, - "amount":40, - "price_int":"256000", - "amount_int":"4000000000", - "stamp":"1323018797463497" - }, - { - "price":2.56153, - "amount":100, - "price_int":"256153", - "amount_int":"10000000000", - "stamp":"1323113752982351" - }, - { - "price":2.5701, - "amount":250, - "price_int":"257010", - "amount_int":"25000000000", - "stamp":"1323365087610387" - }, - { - "price":2.57023, - "amount":0.5, - "price_int":"257023", - "amount_int":"50000000", - "stamp":"1327573762326582" - }, - { - "price":2.57549, - "amount":1, - "price_int":"257549", - "amount_int":"100000000", - "stamp":"1324525721098528" - }, - { - "price":2.5811, - "amount":25, - "price_int":"258110", - "amount_int":"2500000000", - "stamp":"1327381709746021" - }, - { - "price":2.58295, - "amount":0.5, - "price_int":"258295", - "amount_int":"50000000", - "stamp":"1327573758951553" - }, - { - "price":2.59001, - "amount":0.40961231, - "price_int":"259001", - "amount_int":"40961231", - "stamp":"1322579788368440" - }, - { - "price":2.5905, - "amount":20, - "price_int":"259050", - "amount_int":"2000000000", - "stamp":"1328570534775518" - }, - { - "price":2.59568, - "amount":0.5, - "price_int":"259568", - "amount_int":"50000000", - "stamp":"1327573755970998" - }, - { - "price":2.6, - "amount":324.51188076, - "price_int":"260000", - "amount_int":"32451188076", - "stamp":"1324313972951034" - }, - { - "price":2.601, - "amount":1500, - "price_int":"260100", - "amount_int":"150000000000", - "stamp":"1323062469504311" - }, - { - "price":2.6084, - "amount":0.5, - "price_int":"260840", - "amount_int":"50000000", - "stamp":"1327573752640392" - }, - { - "price":2.61, - "amount":24.5366249, - "price_int":"261000", - "amount_int":"2453662490", - "stamp":"1327420591176413" - }, - { - "price":2.61003, - "amount":2.98, - "price_int":"261003", - "amount_int":"298000000", - "stamp":"1323859885688636" - }, - { - "price":2.612, - "amount":35, - "price_int":"261200", - "amount_int":"3500000000", - "stamp":"1323007127646741" - }, - { - "price":2.62, - "amount":1.00007633, - "price_int":"262000", - "amount_int":"100007633", - "stamp":"1323060213623812" - }, - { - "price":2.62112, - "amount":0.5, - "price_int":"262112", - "amount_int":"50000000", - "stamp":"1327573748251725" - }, - { - "price":2.62273, - "amount":37.5, - "price_int":"262273", - "amount_int":"3750000000", - "stamp":"1324302831156792" - }, - { - "price":2.62876, - "amount":10.2622, - "price_int":"262876", - "amount_int":"1026220000", - "stamp":"1323081579659082" - }, - { - "price":2.62991, - "amount":20, - "price_int":"262991", - "amount_int":"2000000000", - "stamp":"1323075726964319" - }, - { - "price":2.6305, - "amount":0.099, - "price_int":"263050", - "amount_int":"9900000", - "stamp":"1323000451974025" - }, - { - "price":2.63385, - "amount":0.5, - "price_int":"263385", - "amount_int":"50000000", - "stamp":"1327573745492427" - }, - { - "price":2.634, - "amount":10, - "price_int":"263400", - "amount_int":"1000000000", - "stamp":"1323007103000605" - }, - { - "price":2.63592, - "amount":4.98797004, - "price_int":"263592", - "amount_int":"498797004", - "stamp":"1323163153104308" - }, - { - "price":2.64003, - "amount":8.21186501, - "price_int":"264003", - "amount_int":"821186501", - "stamp":"1322549619083672" - }, - { - "price":2.64657, - "amount":1, - "price_int":"264657", - "amount_int":"100000000", - "stamp":"1327573743024645" - }, - { - "price":2.65, - "amount":31.75874339, - "price_int":"265000", - "amount_int":"3175874339", - "stamp":"1325033448163261" - }, - { - "price":2.6501, - "amount":2.41583336, - "price_int":"265010", - "amount_int":"241583336", - "stamp":"1323173576021636" - }, - { - "price":2.651, - "amount":1500, - "price_int":"265100", - "amount_int":"150000000000", - "stamp":"1323062476690187" - }, - { - "price":2.6593, - "amount":0.5, - "price_int":"265930", - "amount_int":"50000000", - "stamp":"1327573738569071" - }, - { - "price":2.6643, - "amount":0.079, - "price_int":"266430", - "amount_int":"7900000", - "stamp":"1323003318559802" - }, - { - "price":2.6654, - "amount":60.1885, - "price_int":"266540", - "amount_int":"6018850000", - "stamp":"1323362648349142" - }, - { - "price":2.67, - "amount":230.5243, - "price_int":"267000", - "amount_int":"23052430000", - "stamp":"1323385330679341" - }, - { - "price":2.6701, - "amount":120, - "price_int":"267010", - "amount_int":"12000000000", - "stamp":"1323401246722723" - }, - { - "price":2.67202, - "amount":80.5, - "price_int":"267202", - "amount_int":"8050000000", - "stamp":"1327573733402070" - }, - { - "price":2.674, - "amount":1900, - "price_int":"267400", - "amount_int":"190000000000", - "stamp":"1323601466732901" - }, - { - "price":2.68, - "amount":383.52933208, - "price_int":"268000", - "amount_int":"38352933208", - "stamp":"1326192125683763" - }, - { - "price":2.68474, - "amount":0.5, - "price_int":"268474", - "amount_int":"50000000", - "stamp":"1327573730024384" - }, - { - "price":2.68891, - "amount":575, - "price_int":"268891", - "amount_int":"57500000000", - "stamp":"1323210336576578" - }, - { - "price":2.69409, - "amount":1.50695799, - "price_int":"269409", - "amount_int":"150695799", - "stamp":"1323240909069230" - }, - { - "price":2.69747, - "amount":0.5, - "price_int":"269747", - "amount_int":"50000000", - "stamp":"1327573726833393" - }, - { - "price":2.7, - "amount":224.20634074, - "price_int":"270000", - "amount_int":"22420634074", - "stamp":"1328463820106718" - }, - { - "price":2.701, - "amount":1, - "price_int":"270100", - "amount_int":"100000000", - "stamp":"1323189379039032" - }, - { - "price":2.71, - "amount":98.1, - "price_int":"271000", - "amount_int":"9810000000", - "stamp":"1324405555941041" - }, - { - "price":2.71019, - "amount":0.5, - "price_int":"271019", - "amount_int":"50000000", - "stamp":"1327573723775180" - }, - { - "price":2.7135, - "amount":2.243, - "price_int":"271350", - "amount_int":"224300000", - "stamp":"1323195564595539" - }, - { - "price":2.71689, - "amount":50, - "price_int":"271689", - "amount_int":"5000000000", - "stamp":"1323513315480099" - }, - { - "price":2.71761, - "amount":10.1821, - "price_int":"271761", - "amount_int":"1018210000", - "stamp":"1323081577647872" - }, - { - "price":2.72, - "amount":32.76636397, - "price_int":"272000", - "amount_int":"3276636397", - "stamp":"1323559248006559" - }, - { - "price":2.721, - "amount":6.70792723, - "price_int":"272100", - "amount_int":"670792723", - "stamp":"1324616736233328" - }, - { - "price":2.72292, - "amount":0.5, - "price_int":"272292", - "amount_int":"50000000", - "stamp":"1327573719480145" - }, - { - "price":2.72991, - "amount":10, - "price_int":"272991", - "amount_int":"1000000000", - "stamp":"1323075776750984" - }, - { - "price":2.73, - "amount":0.0101, - "price_int":"273000", - "amount_int":"1010000", - "stamp":"1323095548703826" - }, - { - "price":2.73564, - "amount":0.5, - "price_int":"273564", - "amount_int":"50000000", - "stamp":"1327573716602106" - }, - { - "price":2.74156, - "amount":6.666e-5, - "price_int":"274156", - "amount_int":"6666", - "stamp":"1328535545811360" - }, - { - "price":2.74836, - "amount":0.5, - "price_int":"274836", - "amount_int":"50000000", - "stamp":"1327573712301887" - }, - { - "price":2.75, - "amount":33.2927, - "price_int":"275000", - "amount_int":"3329270000", - "stamp":"1327531473166510" - }, - { - "price":2.75123, - "amount":6.8, - "price_int":"275123", - "amount_int":"680000000", - "stamp":"1323191157719443" - }, - { - "price":2.75679, - "amount":5.5249, - "price_int":"275679", - "amount_int":"552490000", - "stamp":"1328596826181897" - }, - { - "price":2.76, - "amount":1.08, - "price_int":"276000", - "amount_int":"108000000", - "stamp":"1323210414761384" - }, - { - "price":2.7601, - "amount":0.67934783, - "price_int":"276010", - "amount_int":"67934783", - "stamp":"1323944996446811" - }, - { - "price":2.76109, - "amount":0.5, - "price_int":"276109", - "amount_int":"50000000", - "stamp":"1327573709497158" - }, - { - "price":2.765, - "amount":0.0203, - "price_int":"276500", - "amount_int":"2030000", - "stamp":"1323075400506260" - }, - { - "price":2.77001, - "amount":179.49905234, - "price_int":"277001", - "amount_int":"17949905234", - "stamp":"1327523107174962" - }, - { - "price":2.77381, - "amount":0.5, - "price_int":"277381", - "amount_int":"50000000", - "stamp":"1327573707060221" - }, - { - "price":2.7765, - "amount":81.433, - "price_int":"277650", - "amount_int":"8143300000", - "stamp":"1323041986020912" - }, - { - "price":2.78653, - "amount":0.5, - "price_int":"278653", - "amount_int":"50000000", - "stamp":"1327573703036596" - }, - { - "price":2.794, - "amount":5, - "price_int":"279400", - "amount_int":"500000000", - "stamp":"1327532395308204" - }, - { - "price":2.7987, - "amount":1489.87055775, - "price_int":"279870", - "amount_int":"148987055775", - "stamp":"1326985438969909" - }, - { - "price":2.79926, - "amount":1.5, - "price_int":"279926", - "amount_int":"150000000", - "stamp":"1327573699772845" - }, - { - "price":2.8, - "amount":302.65367499, - "price_int":"280000", - "amount_int":"30265367499", - "stamp":"1326922878416420" - }, - { - "price":2.8001, - "amount":1, - "price_int":"280010", - "amount_int":"100000000", - "stamp":"1323428092652381" - }, - { - "price":2.80079, - "amount":10.1082, - "price_int":"280079", - "amount_int":"1010820000", - "stamp":"1323081576215168" - }, - { - "price":2.801, - "amount":9.65265619, - "price_int":"280100", - "amount_int":"965265619", - "stamp":"1323080734012020" - }, - { - "price":2.80645, - "amount":0.9009, - "price_int":"280645", - "amount_int":"90090000", - "stamp":"1323168057090739" - }, - { - "price":2.81, - "amount":74.8248, - "price_int":"281000", - "amount_int":"7482480000", - "stamp":"1326737550124897" - }, - { - "price":2.811, - "amount":10, - "price_int":"281100", - "amount_int":"1000000000", - "stamp":"1324616379065879" - }, - { - "price":2.81198, - "amount":0.5, - "price_int":"281198", - "amount_int":"50000000", - "stamp":"1327573697100888" - }, - { - "price":2.812, - "amount":44.76085348, - "price_int":"281200", - "amount_int":"4476085348", - "stamp":"1324363547026774" - }, - { - "price":2.82471, - "amount":0.5, - "price_int":"282471", - "amount_int":"50000000", - "stamp":"1327573694294739" - }, - { - "price":2.83, - "amount":135, - "price_int":"283000", - "amount_int":"13500000000", - "stamp":"1324320733494108" - }, - { - "price":2.83295, - "amount":0.00011827, - "price_int":"283295", - "amount_int":"11827", - "stamp":"1320961154825469" - }, - { - "price":2.83743, - "amount":0.5, - "price_int":"283743", - "amount_int":"50000000", - "stamp":"1327573691375523" - }, - { - "price":2.84156, - "amount":657.39546126, - "price_int":"284156", - "amount_int":"65739546126", - "stamp":"1320890155440910" - }, - { - "price":2.84256, - "amount":200, - "price_int":"284256", - "amount_int":"20000000000", - "stamp":"1323210668180774" - }, - { - "price":2.84257, - "amount":0.00049188, - "price_int":"284257", - "amount_int":"49188", - "stamp":"1323093629994660" - }, - { - "price":2.85, - "amount":20.12561403, - "price_int":"285000", - "amount_int":"2012561403", - "stamp":"1323873511500496" - }, - { - "price":2.85015, - "amount":0.5, - "price_int":"285015", - "amount_int":"50000000", - "stamp":"1327573687988623" - }, - { - "price":2.85123, - "amount":6.8, - "price_int":"285123", - "amount_int":"680000000", - "stamp":"1323191131751296" - }, - { - "price":2.85422, - "amount":5.8842668, - "price_int":"285422", - "amount_int":"588426680", - "stamp":"1328132258280892" - }, - { - "price":2.86, - "amount":1.9965, - "price_int":"286000", - "amount_int":"199650000", - "stamp":"1323609831316649" - }, - { - "price":2.86288, - "amount":0.5, - "price_int":"286288", - "amount_int":"50000000", - "stamp":"1327573685175180" - }, - { - "price":2.86812, - "amount":2.56008814, - "price_int":"286812", - "amount_int":"256008814", - "stamp":"1323130020360769" - }, - { - "price":2.87, - "amount":17.4216, - "price_int":"287000", - "amount_int":"1742160000", - "stamp":"1327420637132192" - }, - { - "price":2.875, - "amount":0.01, - "price_int":"287500", - "amount_int":"1000000", - "stamp":"1323560647489302" - }, - { - "price":2.8756, - "amount":0.5, - "price_int":"287560", - "amount_int":"50000000", - "stamp":"1327573682654205" - }, - { - "price":2.88369, - "amount":5.94721249, - "price_int":"288369", - "amount_int":"594721249", - "stamp":"1319740470000501" - }, - { - "price":2.88984, - "amount":30.00431596, - "price_int":"288984", - "amount_int":"3000431596", - "stamp":"1319740616598820" - }, - { - "price":2.89, - "amount":27.94653631, - "price_int":"289000", - "amount_int":"2794653631", - "stamp":"1328129079470367" - }, - { - "price":2.89387, - "amount":1.57, - "price_int":"289387", - "amount_int":"157000000", - "stamp":"1323160483283605" - }, - { - "price":2.89469, - "amount":38, - "price_int":"289469", - "amount_int":"3800000000", - "stamp":"1319740903071294" - }, - { - "price":2.89732, - "amount":7.87888, - "price_int":"289732", - "amount_int":"787888000", - "stamp":"1319741041100853" - }, - { - "price":2.89981, - "amount":0.91716008, - "price_int":"289981", - "amount_int":"91716008", - "stamp":"1323080379272428" - }, - { - "price":2.8999, - "amount":1.81498327, - "price_int":"289990", - "amount_int":"181498327", - "stamp":"1324335298285472" - }, - { - "price":2.9, - "amount":150.25485861, - "price_int":"290000", - "amount_int":"15025485861", - "stamp":"1325366943465364" - }, - { - "price":2.9001, - "amount":1, - "price_int":"290010", - "amount_int":"100000000", - "stamp":"1323428100322334" - }, - { - "price":2.90011, - "amount":1, - "price_int":"290011", - "amount_int":"100000000", - "stamp":"1323437043484721" - }, - { - "price":2.90105, - "amount":0.5, - "price_int":"290105", - "amount_int":"50000000", - "stamp":"1327573676415459" - }, - { - "price":2.91, - "amount":106.9357, - "price_int":"291000", - "amount_int":"10693570000", - "stamp":"1324037254524576" - }, - { - "price":2.911, - "amount":10, - "price_int":"291100", - "amount_int":"1000000000", - "stamp":"1324615544197673" - }, - { - "price":2.913, - "amount":5, - "price_int":"291300", - "amount_int":"500000000", - "stamp":"1323745833356296" - }, - { - "price":2.91377, - "amount":0.5, - "price_int":"291377", - "amount_int":"50000000", - "stamp":"1327573673884821" - }, - { - "price":2.91446, - "amount":0.5, - "price_int":"291446", - "amount_int":"50000000", - "stamp":"1327573679258478" - }, - { - "price":2.92, - "amount":9.69, - "price_int":"292000", - "amount_int":"969000000", - "stamp":"1323443512198202" - }, - { - "price":2.9265, - "amount":0.5, - "price_int":"292650", - "amount_int":"50000000", - "stamp":"1327573670685501" - }, - { - "price":2.93001, - "amount":2, - "price_int":"293001", - "amount_int":"200000000", - "stamp":"1324781476236591" - }, - { - "price":2.93922, - "amount":43.79, - "price_int":"293922", - "amount_int":"4379000000", - "stamp":"1327573667952491" - }, - { - "price":2.94, - "amount":118.5374, - "price_int":"294000", - "amount_int":"11853740000", - "stamp":"1323556009694960" - }, - { - "price":2.9441, - "amount":2, - "price_int":"294410", - "amount_int":"200000000", - "stamp":"1323525074823272" - }, - { - "price":2.94461, - "amount":100, - "price_int":"294461", - "amount_int":"10000000000", - "stamp":"1326922864027564" - }, - { - "price":2.95, - "amount":283.30635084, - "price_int":"295000", - "amount_int":"28330635084", - "stamp":"1327733734444151" - }, - { - "price":2.95001, - "amount":5, - "price_int":"295001", - "amount_int":"500000000", - "stamp":"1323559786455663" - }, - { - "price":2.95002, - "amount":0.08336553, - "price_int":"295002", - "amount_int":"8336553", - "stamp":"1324111364917992" - }, - { - "price":2.95003, - "amount":3.36, - "price_int":"295003", - "amount_int":"336000000", - "stamp":"1328513246770052" - }, - { - "price":2.96, - "amount":1.98, - "price_int":"296000", - "amount_int":"198000000", - "stamp":"1323562240319990" - }, - { - "price":2.96467, - "amount":0.5, - "price_int":"296467", - "amount_int":"50000000", - "stamp":"1327573664615330" - }, - { - "price":2.96601, - "amount":0.16639862, - "price_int":"296601", - "amount_int":"16639862", - "stamp":"1323476854160914" - }, - { - "price":2.97739, - "amount":0.5, - "price_int":"297739", - "amount_int":"50000000", - "stamp":"1327573661700204" - }, - { - "price":2.98, - "amount":1, - "price_int":"298000", - "amount_int":"100000000", - "stamp":"1325450597265587" - }, - { - "price":2.98001, - "amount":0.33250695, - "price_int":"298001", - "amount_int":"33250695", - "stamp":"1323551816619670" - }, - { - "price":2.98114, - "amount":0.5757, - "price_int":"298114", - "amount_int":"57570000", - "stamp":"1324243694260405" - }, - { - "price":2.98301, - "amount":5.363e-5, - "price_int":"298301", - "amount_int":"5363", - "stamp":"1323453320177233" - }, - { - "price":2.99, - "amount":100.01001672, - "price_int":"299000", - "amount_int":"10001001672", - "stamp":"1324348645651273" - }, - { - "price":2.99012, - "amount":0.57, - "price_int":"299012", - "amount_int":"57000000", - "stamp":"1327573658452822" - }, - { - "price":2.994, - "amount":70, - "price_int":"299400", - "amount_int":"7000000000", - "stamp":"1324835243151600" - }, - { - "price":2.99701, - "amount":0.01009471, - "price_int":"299701", - "amount_int":"1009471", - "stamp":"1323860388116425" - }, - { - "price":3, - "amount":4887.70049661, - "price_int":"300000", - "amount_int":"488770049661", - "stamp":"1328460188795862" - }, - { - "price":3.00001, - "amount":2.94, - "price_int":"300001", - "amount_int":"294000000", - "stamp":"1326064964202788" - }, - { - "price":3.00002, - "amount":0.2, - "price_int":"300002", - "amount_int":"20000000", - "stamp":"1324111349146018" - }, - { - "price":3.0001, - "amount":508, - "price_int":"300010", - "amount_int":"50800000000", - "stamp":"1328078241418363" - }, - { - "price":3.001, - "amount":0.01, - "price_int":"300100", - "amount_int":"1000000", - "stamp":"1323875472182724" - }, - { - "price":3.00284, - "amount":0.5, - "price_int":"300284", - "amount_int":"50000000", - "stamp":"1327573655708420" - }, - { - "price":3.0035, - "amount":0.1593, - "price_int":"300350", - "amount_int":"15930000", - "stamp":"1323860660453970" - }, - { - "price":3.005, - "amount":24.9584, - "price_int":"300500", - "amount_int":"2495840000", - "stamp":"1328136582676011" - }, - { - "price":3.01, - "amount":4651.21846179, - "price_int":"301000", - "amount_int":"465121846179", - "stamp":"1328139476924890" - }, - { - "price":3.011, - "amount":10, - "price_int":"301100", - "amount_int":"1000000000", - "stamp":"1324616391372208" - }, - { - "price":3.01267, - "amount":1.01, - "price_int":"301267", - "amount_int":"101000000", - "stamp":"1323632434422824" - }, - { - "price":3.01556, - "amount":0.5, - "price_int":"301556", - "amount_int":"50000000", - "stamp":"1327573652739019" - }, - { - "price":3.02, - "amount":0.01, - "price_int":"302000", - "amount_int":"1000000", - "stamp":"1323880958180724" - }, - { - "price":3.022, - "amount":10, - "price_int":"302200", - "amount_int":"1000000000", - "stamp":"1324616424063461" - }, - { - "price":3.02402, - "amount":9, - "price_int":"302402", - "amount_int":"900000000", - "stamp":"1323862768502232" - }, - { - "price":3.02829, - "amount":0.5, - "price_int":"302829", - "amount_int":"50000000", - "stamp":"1327573649829403" - }, - { - "price":3.03, - "amount":0.01, - "price_int":"303000", - "amount_int":"1000000", - "stamp":"1323880962966521" - }, - { - "price":3.031, - "amount":41.4962, - "price_int":"303100", - "amount_int":"4149620000", - "stamp":"1328128934693371" - }, - { - "price":3.0316, - "amount":8, - "price_int":"303160", - "amount_int":"800000000", - "stamp":"1325713246001488" - }, - { - "price":3.0325, - "amount":0.212, - "price_int":"303250", - "amount_int":"21200000", - "stamp":"1323906923681233" - }, - { - "price":3.038, - "amount":53, - "price_int":"303800", - "amount_int":"5300000000", - "stamp":"1328477680652262" - }, - { - "price":3.04, - "amount":10.01, - "price_int":"304000", - "amount_int":"1001000000", - "stamp":"1324149533722861" - }, - { - "price":3.04101, - "amount":0.5, - "price_int":"304101", - "amount_int":"50000000", - "stamp":"1327573646609487" - }, - { - "price":3.04265, - "amount":0.61487715, - "price_int":"304265", - "amount_int":"61487715", - "stamp":"1323996029604995" - }, - { - "price":3.04446, - "amount":0.61390112, - "price_int":"304446", - "amount_int":"61390112", - "stamp":"1324050962772144" - }, - { - "price":3.04618, - "amount":68.546169, - "price_int":"304618", - "amount_int":"6854616900", - "stamp":"1328624782680034" - }, - { - "price":3.04999, - "amount":1, - "price_int":"304999", - "amount_int":"100000000", - "stamp":"1323990925403813" - }, - { - "price":3.05, - "amount":26.02395, - "price_int":"305000", - "amount_int":"2602395000", - "stamp":"1324362342349408" - }, - { - "price":3.05002, - "amount":0.2, - "price_int":"305002", - "amount_int":"20000000", - "stamp":"1324111344652595" - }, - { - "price":3.051, - "amount":0.01, - "price_int":"305100", - "amount_int":"1000000", - "stamp":"1323995650101290" - }, - { - "price":3.05374, - "amount":0.5, - "price_int":"305374", - "amount_int":"50000000", - "stamp":"1327573643799353" - }, - { - "price":3.06, - "amount":36.01, - "price_int":"306000", - "amount_int":"3601000000", - "stamp":"1325051621087138" - }, - { - "price":3.06187, - "amount":7.3, - "price_int":"306187", - "amount_int":"730000000", - "stamp":"1323879164157580" - }, - { - "price":3.06646, - "amount":0.5, - "price_int":"306646", - "amount_int":"50000000", - "stamp":"1327573640690171" - }, - { - "price":3.07, - "amount":0.01, - "price_int":"307000", - "amount_int":"1000000", - "stamp":"1326111010072451" - }, - { - "price":3.07304, - "amount":50, - "price_int":"307304", - "amount_int":"5000000000", - "stamp":"1326839662615421" - }, - { - "price":3.07918, - "amount":0.5, - "price_int":"307918", - "amount_int":"50000000", - "stamp":"1327573635223090" - }, - { - "price":3.08, - "amount":0.01, - "price_int":"308000", - "amount_int":"1000000", - "stamp":"1326183055674704" - }, - { - "price":3.09, - "amount":397.7932, - "price_int":"309000", - "amount_int":"39779320000", - "stamp":"1326183060858856" - }, - { - "price":3.09099, - "amount":0.0140385, - "price_int":"309099", - "amount_int":"1403850", - "stamp":"1324122818575116" - }, - { - "price":3.09191, - "amount":0.5, - "price_int":"309191", - "amount_int":"50000000", - "stamp":"1327573631456233" - }, - { - "price":3.0987, - "amount":111, - "price_int":"309870", - "amount_int":"11100000000", - "stamp":"1326724038851802" - }, - { - "price":3.1, - "amount":655.61019999, - "price_int":"310000", - "amount_int":"65561019999", - "stamp":"1326857355005882" - }, - { - "price":3.10001, - "amount":1, - "price_int":"310001", - "amount_int":"100000000", - "stamp":"1324269079152217" - }, - { - "price":3.10002, - "amount":0.2, - "price_int":"310002", - "amount_int":"20000000", - "stamp":"1324111326285439" - }, - { - "price":3.10004, - "amount":5, - "price_int":"310004", - "amount_int":"500000000", - "stamp":"1323889101596522" - }, - { - "price":3.102, - "amount":10, - "price_int":"310200", - "amount_int":"1000000000", - "stamp":"1324616435065599" - }, - { - "price":3.103, - "amount":600, - "price_int":"310300", - "amount_int":"60000000000", - "stamp":"1323949965285404" - }, - { - "price":3.10463, - "amount":0.5, - "price_int":"310463", - "amount_int":"50000000", - "stamp":"1327573627633923" - }, - { - "price":3.11, - "amount":1018.01, - "price_int":"311000", - "amount_int":"101801000000", - "stamp":"1328114484706705" - }, - { - "price":3.11736, - "amount":0.5, - "price_int":"311736", - "amount_int":"50000000", - "stamp":"1327573624124653" - }, - { - "price":3.12, - "amount":4.05808974, - "price_int":"312000", - "amount_int":"405808974", - "stamp":"1326183080892158" - }, - { - "price":3.12012, - "amount":152.67465353, - "price_int":"312012", - "amount_int":"15267465353", - "stamp":"1325533989138030" - }, - { - "price":3.13, - "amount":0.01, - "price_int":"313000", - "amount_int":"1000000", - "stamp":"1326266155109712" - }, - { - "price":3.13008, - "amount":0.5, - "price_int":"313008", - "amount_int":"50000000", - "stamp":"1327573620767307" - }, - { - "price":3.13213, - "amount":5, - "price_int":"313213", - "amount_int":"500000000", - "stamp":"1324002886455828" - }, - { - "price":3.14, - "amount":30.01, - "price_int":"314000", - "amount_int":"3001000000", - "stamp":"1327318113590866" - }, - { - "price":3.14159, - "amount":100, - "price_int":"314159", - "amount_int":"10000000000", - "stamp":"1324340741953939" - }, - { - "price":3.1428, - "amount":0.5, - "price_int":"314280", - "amount_int":"50000000", - "stamp":"1327573616859578" - }, - { - "price":3.14684, - "amount":0.67894645, - "price_int":"314684", - "amount_int":"67894645", - "stamp":"1324281139118472" - }, - { - "price":3.15, - "amount":72.04897999, - "price_int":"315000", - "amount_int":"7204897999", - "stamp":"1327318109309779" - }, - { - "price":3.15001, - "amount":2, - "price_int":"315001", - "amount_int":"200000000", - "stamp":"1324229083181598" - }, - { - "price":3.15002, - "amount":0.2, - "price_int":"315002", - "amount_int":"20000000", - "stamp":"1324111618522230" - }, - { - "price":3.151, - "amount":1.1904762, - "price_int":"315100", - "amount_int":"119047620", - "stamp":"1325446016696825" - }, - { - "price":3.15553, - "amount":0.5, - "price_int":"315553", - "amount_int":"50000000", - "stamp":"1327573613186495" - }, - { - "price":3.16, - "amount":65.8328, - "price_int":"316000", - "amount_int":"6583280000", - "stamp":"1327615406889681" - }, - { - "price":3.16167, - "amount":2.51, - "price_int":"316167", - "amount_int":"251000000", - "stamp":"1324273404904669" - }, - { - "price":3.16825, - "amount":0.5, - "price_int":"316825", - "amount_int":"50000000", - "stamp":"1327573608345160" - }, - { - "price":3.17, - "amount":0.01, - "price_int":"317000", - "amount_int":"1000000", - "stamp":"1327067509792788" - }, - { - "price":3.175, - "amount":0.9026, - "price_int":"317500", - "amount_int":"90260000", - "stamp":"1324270001183320" - }, - { - "price":3.17632, - "amount":49.4075, - "price_int":"317632", - "amount_int":"4940750000", - "stamp":"1324185361506487" - }, - { - "price":3.18, - "amount":536.2993, - "price_int":"318000", - "amount_int":"53629930000", - "stamp":"1327067512026797" - }, - { - "price":3.18098, - "amount":10.924256, - "price_int":"318098", - "amount_int":"1092425600", - "stamp":"1327573603686586" - }, - { - "price":3.19, - "amount":0.86941379, - "price_int":"319000", - "amount_int":"86941379", - "stamp":"1327067514436258" - }, - { - "price":3.19001, - "amount":3, - "price_int":"319001", - "amount_int":"300000000", - "stamp":"1326957312624073" - }, - { - "price":3.19341, - "amount":2119.49520418, - "price_int":"319341", - "amount_int":"211949520418", - "stamp":"1324339929947184" - }, - { - "price":3.1937, - "amount":0.5, - "price_int":"319370", - "amount_int":"50000000", - "stamp":"1327573297658924" - }, - { - "price":3.19906, - "amount":0.47, - "price_int":"319906", - "amount_int":"47000000", - "stamp":"1324382551861587" - }, - { - "price":3.19953, - "amount":0.02018943, - "price_int":"319953", - "amount_int":"2018943", - "stamp":"1324299689240444" - }, - { - "price":3.2, - "amount":149.01186774, - "price_int":"320000", - "amount_int":"14901186774", - "stamp":"1326571676266051" - }, - { - "price":3.20002, - "amount":0.2, - "price_int":"320002", - "amount_int":"20000000", - "stamp":"1324299824556533" - }, - { - "price":3.2001, - "amount":101.144213, - "price_int":"320010", - "amount_int":"10114421300", - "stamp":"1324299717538617" - }, - { - "price":3.20642, - "amount":0.5, - "price_int":"320642", - "amount_int":"50000000", - "stamp":"1327573191618405" - }, - { - "price":3.20976, - "amount":12.072, - "price_int":"320976", - "amount_int":"1207200000", - "stamp":"1327601189832438" - }, - { - "price":3.21, - "amount":32.34753894, - "price_int":"321000", - "amount_int":"3234753894", - "stamp":"1327068120828844" - }, - { - "price":3.21616, - "amount":0.74, - "price_int":"321616", - "amount_int":"74000000", - "stamp":"1323779156901038" - }, - { - "price":3.21915, - "amount":0.5, - "price_int":"321915", - "amount_int":"50000000", - "stamp":"1327573188290293" - }, - { - "price":3.22, - "amount":0.01, - "price_int":"322000", - "amount_int":"1000000", - "stamp":"1327068123064260" - }, - { - "price":3.22734, - "amount":0.365, - "price_int":"322734", - "amount_int":"36500000", - "stamp":"1324955386545528" - }, - { - "price":3.23, - "amount":573.055, - "price_int":"323000", - "amount_int":"57305500000", - "stamp":"1327068125941031" - }, - { - "price":3.23187, - "amount":0.5, - "price_int":"323187", - "amount_int":"50000000", - "stamp":"1327573184729786" - }, - { - "price":3.24, - "amount":108.6226, - "price_int":"324000", - "amount_int":"10862260000", - "stamp":"1327068128375929" - }, - { - "price":3.2446, - "amount":0.5, - "price_int":"324460", - "amount_int":"50000000", - "stamp":"1327573180634710" - }, - { - "price":3.25, - "amount":72.5464923, - "price_int":"325000", - "amount_int":"7254649230", - "stamp":"1327649593710078" - }, - { - "price":3.25001, - "amount":2, - "price_int":"325001", - "amount_int":"200000000", - "stamp":"1324305527988180" - }, - { - "price":3.25002, - "amount":0.2, - "price_int":"325002", - "amount_int":"20000000", - "stamp":"1324299917572682" - }, - { - "price":3.251, - "amount":100, - "price_int":"325100", - "amount_int":"10000000000", - "stamp":"1324337760828950" - }, - { - "price":3.25732, - "amount":0.5, - "price_int":"325732", - "amount_int":"50000000", - "stamp":"1327573177430999" - }, - { - "price":3.26, - "amount":0.01, - "price_int":"326000", - "amount_int":"1000000", - "stamp":"1327068134663299" - }, - { - "price":3.265, - "amount":0.38, - "price_int":"326500", - "amount_int":"38000000", - "stamp":"1324308118497282" - }, - { - "price":3.27, - "amount":15.3005, - "price_int":"327000", - "amount_int":"1530050000", - "stamp":"1328128908960743" - }, - { - "price":3.27004, - "amount":0.5, - "price_int":"327004", - "amount_int":"50000000", - "stamp":"1327573174107500" - }, - { - "price":3.28, - "amount":0.01, - "price_int":"328000", - "amount_int":"1000000", - "stamp":"1327068139387450" - }, - { - "price":3.28218, - "amount":1, - "price_int":"328218", - "amount_int":"100000000", - "stamp":"1327630056577396" - }, - { - "price":3.28277, - "amount":0.5, - "price_int":"328277", - "amount_int":"50000000", - "stamp":"1327573170032281" - }, - { - "price":3.28815, - "amount":3.5, - "price_int":"328815", - "amount_int":"350000000", - "stamp":"1328414928951537" - }, - { - "price":3.29, - "amount":0.01, - "price_int":"329000", - "amount_int":"1000000", - "stamp":"1327068141454778" - }, - { - "price":3.29549, - "amount":0.5, - "price_int":"329549", - "amount_int":"50000000", - "stamp":"1327573166095720" - }, - { - "price":3.3, - "amount":217.4645909, - "price_int":"330000", - "amount_int":"21746459090", - "stamp":"1328157905456433" - }, - { - "price":3.30001, - "amount":0.37839582, - "price_int":"330001", - "amount_int":"37839582", - "stamp":"1324305793549877" - }, - { - "price":3.30002, - "amount":0.2, - "price_int":"330002", - "amount_int":"20000000", - "stamp":"1324300282297273" - }, - { - "price":3.30821, - "amount":15, - "price_int":"330821", - "amount_int":"1500000000", - "stamp":"1327590093408351" - }, - { - "price":3.31, - "amount":1.055, - "price_int":"331000", - "amount_int":"105500000", - "stamp":"1327078216686089" - }, - { - "price":3.3101, - "amount":50.5033, - "price_int":"331010", - "amount_int":"5050330000", - "stamp":"1325762095289134" - }, - { - "price":3.32, - "amount":0.01284337, - "price_int":"332000", - "amount_int":"1284337", - "stamp":"1327078214280184" - }, - { - "price":3.32094, - "amount":0.5, - "price_int":"332094", - "amount_int":"50000000", - "stamp":"1327573151258650" - }, - { - "price":3.3211, - "amount":34.18116, - "price_int":"332110", - "amount_int":"3418116000", - "stamp":"1324306181262513" - }, - { - "price":3.32501, - "amount":105, - "price_int":"332501", - "amount_int":"10500000000", - "stamp":"1324305983851363" - }, - { - "price":3.33, - "amount":1.05, - "price_int":"333000", - "amount_int":"105000000", - "stamp":"1327078211914831" - }, - { - "price":3.33001, - "amount":40, - "price_int":"333001", - "amount_int":"4000000000", - "stamp":"1326840280808972" - }, - { - "price":3.331, - "amount":10, - "price_int":"333100", - "amount_int":"1000000000", - "stamp":"1324616478713643" - }, - { - "price":3.33366, - "amount":0.5, - "price_int":"333366", - "amount_int":"50000000", - "stamp":"1327573147784074" - }, - { - "price":3.34, - "amount":0.01, - "price_int":"334000", - "amount_int":"1000000", - "stamp":"1327078209684568" - }, - { - "price":3.34639, - "amount":0.5, - "price_int":"334639", - "amount_int":"50000000", - "stamp":"1327573144219128" - }, - { - "price":3.34988, - "amount":1, - "price_int":"334988", - "amount_int":"100000000", - "stamp":"1324301213946376" - }, - { - "price":3.35, - "amount":1.27, - "price_int":"335000", - "amount_int":"127000000", - "stamp":"1326814193789002" - }, - { - "price":3.35002, - "amount":0.2, - "price_int":"335002", - "amount_int":"20000000", - "stamp":"1324300286895615" - }, - { - "price":3.35035, - "amount":38.8, - "price_int":"335035", - "amount_int":"3880000000", - "stamp":"1324300287820247" - }, - { - "price":3.3508, - "amount":27.2727, - "price_int":"335080", - "amount_int":"2727270000", - "stamp":"1328624756259643" - }, - { - "price":3.35911, - "amount":0.5, - "price_int":"335911", - "amount_int":"50000000", - "stamp":"1327573136341188" - }, - { - "price":3.36, - "amount":0.01, - "price_int":"336000", - "amount_int":"1000000", - "stamp":"1327078207224335" - }, - { - "price":3.36847, - "amount":1.5, - "price_int":"336847", - "amount_int":"150000000", - "stamp":"1324301526191261" - }, - { - "price":3.37, - "amount":0.01, - "price_int":"337000", - "amount_int":"1000000", - "stamp":"1327078205001113" - }, - { - "price":3.37183, - "amount":4.4, - "price_int":"337183", - "amount_int":"440000000", - "stamp":"1327573131825217" - }, - { - "price":3.38, - "amount":0.01, - "price_int":"338000", - "amount_int":"1000000", - "stamp":"1327078202645616" - }, - { - "price":3.38126, - "amount":0.03196396, - "price_int":"338126", - "amount_int":"3196396", - "stamp":"1324319474055875" - }, - { - "price":3.38456, - "amount":0.5, - "price_int":"338456", - "amount_int":"50000000", - "stamp":"1327573127556397" - }, - { - "price":3.39, - "amount":7.01, - "price_int":"339000", - "amount_int":"701000000", - "stamp":"1327078200222301" - }, - { - "price":3.3999, - "amount":0.53090679, - "price_int":"339990", - "amount_int":"53090679", - "stamp":"1324304633032195" - }, - { - "price":3.4, - "amount":91.82834705, - "price_int":"340000", - "amount_int":"9182834705", - "stamp":"1327073513708085" - }, - { - "price":3.40002, - "amount":0.2, - "price_int":"340002", - "amount_int":"20000000", - "stamp":"1324300292187234" - }, - { - "price":3.4099, - "amount":2, - "price_int":"340990", - "amount_int":"200000000", - "stamp":"1324304622688938" - }, - { - "price":3.41, - "amount":102.2094, - "price_int":"341000", - "amount_int":"10220940000", - "stamp":"1327078196941436" - }, - { - "price":3.4105, - "amount":25, - "price_int":"341050", - "amount_int":"2500000000", - "stamp":"1325686126673474" - }, - { - "price":3.411, - "amount":10, - "price_int":"341100", - "amount_int":"1000000000", - "stamp":"1324615532523652" - }, - { - "price":3.4199, - "amount":2, - "price_int":"341990", - "amount_int":"200000000", - "stamp":"1324304614224625" - }, - { - "price":3.42, - "amount":400.01, - "price_int":"342000", - "amount_int":"40001000000", - "stamp":"1327078194528102" - }, - { - "price":3.42527, - "amount":1, - "price_int":"342527", - "amount_int":"100000000", - "stamp":"1324673309709380" - }, - { - "price":3.4299, - "amount":2, - "price_int":"342990", - "amount_int":"200000000", - "stamp":"1324304606503405" - }, - { - "price":3.43, - "amount":5.51, - "price_int":"343000", - "amount_int":"551000000", - "stamp":"1327078191974736" - }, - { - "price":3.438, - "amount":1, - "price_int":"343800", - "amount_int":"100000000", - "stamp":"1324673315707173" - }, - { - "price":3.4399, - "amount":2, - "price_int":"343990", - "amount_int":"200000000", - "stamp":"1324304585168735" - }, - { - "price":3.44, - "amount":108.32542441, - "price_int":"344000", - "amount_int":"10832542441", - "stamp":"1327078189416594" - }, - { - "price":3.44523, - "amount":1.5, - "price_int":"344523", - "amount_int":"150000000", - "stamp":"1324301462616633" - }, - { - "price":3.4484, - "amount":0.86996868, - "price_int":"344840", - "amount_int":"86996868", - "stamp":"1328642699253586" - }, - { - "price":3.4499, - "amount":2, - "price_int":"344990", - "amount_int":"200000000", - "stamp":"1324304572634636" - }, - { - "price":3.45, - "amount":0.06, - "price_int":"345000", - "amount_int":"6000000", - "stamp":"1326814303635782" - }, - { - "price":3.45002, - "amount":0.202, - "price_int":"345002", - "amount_int":"20200000", - "stamp":"1324349771257001" - }, - { - "price":3.45072, - "amount":1, - "price_int":"345072", - "amount_int":"100000000", - "stamp":"1324673319701008" - }, - { - "price":3.45361, - "amount":5.8842668, - "price_int":"345361", - "amount_int":"588426680", - "stamp":"1328132254340183" - }, - { - "price":3.457, - "amount":0.86780445, - "price_int":"345700", - "amount_int":"86780445", - "stamp":"1328642698672591" - }, - { - "price":3.4599, - "amount":2, - "price_int":"345990", - "amount_int":"200000000", - "stamp":"1324304558857596" - }, - { - "price":3.46, - "amount":1.01, - "price_int":"346000", - "amount_int":"101000000", - "stamp":"1327679880646414" - }, - { - "price":3.4611, - "amount":1, - "price_int":"346110", - "amount_int":"100000000", - "stamp":"1324334288990229" - }, - { - "price":3.4631, - "amount":0.5, - "price_int":"346310", - "amount_int":"50000000", - "stamp":"1324331949536818" - }, - { - "price":3.46345, - "amount":1, - "price_int":"346345", - "amount_int":"100000000", - "stamp":"1324673323223134" - }, - { - "price":3.4698, - "amount":0.86460315, - "price_int":"346980", - "amount_int":"86460315", - "stamp":"1328612879444096" - }, - { - "price":3.4699, - "amount":2, - "price_int":"346990", - "amount_int":"200000000", - "stamp":"1324304790186238" - }, - { - "price":3.47, - "amount":0.01, - "price_int":"347000", - "amount_int":"1000000", - "stamp":"1327078184434216" - }, - { - "price":3.4784, - "amount":0.8624655, - "price_int":"347840", - "amount_int":"86246550", - "stamp":"1328612879099005" - }, - { - "price":3.4799, - "amount":2, - "price_int":"347990", - "amount_int":"200000000", - "stamp":"1324304783369947" - }, - { - "price":3.48, - "amount":101.3778, - "price_int":"348000", - "amount_int":"10137780000", - "stamp":"1328001508879990" - }, - { - "price":3.48722, - "amount":11.6, - "price_int":"348722", - "amount_int":"1160000000", - "stamp":"1324346478125243" - }, - { - "price":3.48889, - "amount":1, - "price_int":"348889", - "amount_int":"100000000", - "stamp":"1324673292666384" - }, - { - "price":3.48921, - "amount":7.11885643, - "price_int":"348921", - "amount_int":"711885643", - "stamp":"1324346543228151" - }, - { - "price":3.4899, - "amount":2, - "price_int":"348990", - "amount_int":"200000000", - "stamp":"1324304778392928" - }, - { - "price":3.49, - "amount":0.01, - "price_int":"349000", - "amount_int":"1000000", - "stamp":"1327078179370342" - }, - { - "price":3.491, - "amount":3, - "price_int":"349100", - "amount_int":"300000000", - "stamp":"1325524651369627" - }, - { - "price":3.4915, - "amount":0.85922956, - "price_int":"349150", - "amount_int":"85922956", - "stamp":"1328487050931890" - }, - { - "price":3.4999, - "amount":2, - "price_int":"349990", - "amount_int":"200000000", - "stamp":"1324304860876328" - }, - { - "price":3.5, - "amount":281.41457713, - "price_int":"350000", - "amount_int":"28141457713", - "stamp":"1328115418250107" - }, - { - "price":3.5002, - "amount":0.85709388, - "price_int":"350020", - "amount_int":"85709388", - "stamp":"1328487050589154" - }, - { - "price":3.501, - "amount":1000, - "price_int":"350100", - "amount_int":"100000000000", - "stamp":"1324750659412656" - }, - { - "price":3.5011, - "amount":0.28562452, - "price_int":"350110", - "amount_int":"28562452", - "stamp":"1326176503887333" - }, - { - "price":3.50162, - "amount":1, - "price_int":"350162", - "amount_int":"100000000", - "stamp":"1324673286332613" - }, - { - "price":3.5089, - "amount":0.85496879, - "price_int":"350890", - "amount_int":"85496879", - "stamp":"1328487050203144" - }, - { - "price":3.51, - "amount":1514.08348803, - "price_int":"351000", - "amount_int":"151408348803", - "stamp":"1327611332890672" - }, - { - "price":3.511, - "amount":10, - "price_int":"351100", - "amount_int":"1000000000", - "stamp":"1324616454745637" - }, - { - "price":3.51434, - "amount":1, - "price_int":"351434", - "amount_int":"100000000", - "stamp":"1324673278628481" - }, - { - "price":3.5176, - "amount":0.85285422, - "price_int":"351760", - "amount_int":"85285422", - "stamp":"1328487049850147" - }, - { - "price":3.51893, - "amount":200, - "price_int":"351893", - "amount_int":"20000000000", - "stamp":"1326840472691689" - }, - { - "price":3.519, - "amount":14.54198067, - "price_int":"351900", - "amount_int":"1454198067", - "stamp":"1324570137329610" - }, - { - "price":3.52, - "amount":69.31710227, - "price_int":"352000", - "amount_int":"6931710227", - "stamp":"1327078173065033" - }, - { - "price":3.52115, - "amount":1.74394869, - "price_int":"352115", - "amount_int":"174394869", - "stamp":"1324332685561225" - }, - { - "price":3.52707, - "amount":1, - "price_int":"352707", - "amount_int":"100000000", - "stamp":"1324673273520407" - }, - { - "price":3.529, - "amount":0.85009918, - "price_int":"352900", - "amount_int":"85009918", - "stamp":"1328449282325800" - }, - { - "price":3.53, - "amount":12.6701, - "price_int":"353000", - "amount_int":"1267010000", - "stamp":"1328128315997037" - }, - { - "price":3.5307, - "amount":100, - "price_int":"353070", - "amount_int":"10000000000", - "stamp":"1327342128286127" - }, - { - "price":3.53088, - "amount":8.8154, - "price_int":"353088", - "amount_int":"881540000", - "stamp":"1324430879114238" - }, - { - "price":3.5378, - "amount":0.84798462, - "price_int":"353780", - "amount_int":"84798462", - "stamp":"1328449279253852" - }, - { - "price":3.53979, - "amount":0.5, - "price_int":"353979", - "amount_int":"50000000", - "stamp":"1324673265336489" - }, - { - "price":3.54, - "amount":1160.0169661, - "price_int":"354000", - "amount_int":"116001696610", - "stamp":"1327078161843455" - }, - { - "price":3.5466, - "amount":0.84588056, - "price_int":"354660", - "amount_int":"84588056", - "stamp":"1328449278749260" - }, - { - "price":3.55, - "amount":404.11, - "price_int":"355000", - "amount_int":"40411000000", - "stamp":"1326896775927266" - }, - { - "price":3.55251, - "amount":0.5, - "price_int":"355251", - "amount_int":"50000000", - "stamp":"1324673261190434" - }, - { - "price":3.5554, - "amount":0.84378692, - "price_int":"355540", - "amount_int":"84378692", - "stamp":"1328449278292843" - }, - { - "price":3.5555, - "amount":30, - "price_int":"355550", - "amount_int":"3000000000", - "stamp":"1325823989435780" - }, - { - "price":3.56, - "amount":0.01, - "price_int":"356000", - "amount_int":"1000000", - "stamp":"1327078159285844" - }, - { - "price":3.56269, - "amount":200.31764285, - "price_int":"356269", - "amount_int":"20031764285", - "stamp":"1328577199713869" - }, - { - "price":3.56397, - "amount":50, - "price_int":"356397", - "amount_int":"5000000000", - "stamp":"1326884419544068" - }, - { - "price":3.5643, - "amount":0.84167999, - "price_int":"356430", - "amount_int":"84167999", - "stamp":"1328449277892161" - }, - { - "price":3.56524, - "amount":0.5, - "price_int":"356524", - "amount_int":"50000000", - "stamp":"1324673254181996" - }, - { - "price":3.57, - "amount":0.01, - "price_int":"357000", - "amount_int":"1000000", - "stamp":"1327078156857359" - }, - { - "price":3.5732, - "amount":0.83958357, - "price_int":"357320", - "amount_int":"83958357", - "stamp":"1328449277537841" - }, - { - "price":3.57796, - "amount":0.5, - "price_int":"357796", - "amount_int":"50000000", - "stamp":"1324673249791192" - }, - { - "price":3.58, - "amount":97.3564, - "price_int":"358000", - "amount_int":"9735640000", - "stamp":"1327078154557258" - }, - { - "price":3.5821, - "amount":0.83749756, - "price_int":"358210", - "amount_int":"83749756", - "stamp":"1328449277134179" - }, - { - "price":3.5845, - "amount":0.01009471, - "price_int":"358450", - "amount_int":"1009471", - "stamp":"1324562818412754" - }, - { - "price":3.58455, - "amount":1064.8947, - "price_int":"358455", - "amount_int":"106489470000", - "stamp":"1327684674180161" - }, - { - "price":3.59, - "amount":0.01, - "price_int":"359000", - "amount_int":"1000000", - "stamp":"1327078151439648" - }, - { - "price":3.59069, - "amount":0.5, - "price_int":"359069", - "amount_int":"50000000", - "stamp":"1324673245199903" - }, - { - "price":3.591, - "amount":0.83542189, - "price_int":"359100", - "amount_int":"83542189", - "stamp":"1328449276785681" - }, - { - "price":3.5999, - "amount":0.83335648, - "price_int":"359990", - "amount_int":"83335648", - "stamp":"1328449276296909" - }, - { - "price":3.6, - "amount":8724.51070833, - "price_int":"360000", - "amount_int":"872451070833", - "stamp":"1328448024356465" - }, - { - "price":3.601, - "amount":1000, - "price_int":"360100", - "amount_int":"100000000000", - "stamp":"1324750665238637" - }, - { - "price":3.60341, - "amount":0.5, - "price_int":"360341", - "amount_int":"50000000", - "stamp":"1324673240355216" - }, - { - "price":3.6089, - "amount":0.83127823, - "price_int":"360890", - "amount_int":"83127823", - "stamp":"1328449275949019" - }, - { - "price":3.61, - "amount":0.01120775, - "price_int":"361000", - "amount_int":"1120775", - "stamp":"1327078118778125" - }, - { - "price":3.61212, - "amount":20, - "price_int":"361212", - "amount_int":"2000000000", - "stamp":"1325704686601698" - }, - { - "price":3.61613, - "amount":0.5, - "price_int":"361613", - "amount_int":"50000000", - "stamp":"1324673236544733" - }, - { - "price":3.6179, - "amount":0.82921032, - "price_int":"361790", - "amount_int":"82921032", - "stamp":"1328449275596154" - }, - { - "price":3.62, - "amount":6649.7338, - "price_int":"362000", - "amount_int":"664973380000", - "stamp":"1328499726140419" - }, - { - "price":3.621, - "amount":10, - "price_int":"362100", - "amount_int":"1000000000", - "stamp":"1324616460953358" - }, - { - "price":3.6269, - "amount":0.82715266, - "price_int":"362690", - "amount_int":"82715266", - "stamp":"1328449275251777" - }, - { - "price":3.62886, - "amount":1.5, - "price_int":"362886", - "amount_int":"150000000", - "stamp":"1324673299116766" - }, - { - "price":3.63, - "amount":0.01, - "price_int":"363000", - "amount_int":"1000000", - "stamp":"1327078114175469" - }, - { - "price":3.63522, - "amount":7, - "price_int":"363522", - "amount_int":"700000000", - "stamp":"1326048915056229" - }, - { - "price":3.6359, - "amount":0.8251052, - "price_int":"363590", - "amount_int":"82510520", - "stamp":"1328449274897393" - }, - { - "price":3.64, - "amount":0.01, - "price_int":"364000", - "amount_int":"1000000", - "stamp":"1327078111513700" - }, - { - "price":3.64158, - "amount":0.5, - "price_int":"364158", - "amount_int":"50000000", - "stamp":"1324673227241275" - }, - { - "price":3.645, - "amount":0.82304527, - "price_int":"364500", - "amount_int":"82304527", - "stamp":"1328449274547570" - }, - { - "price":3.64989, - "amount":2.00398094, - "price_int":"364989", - "amount_int":"200398094", - "stamp":"1325401599032989" - }, - { - "price":3.65, - "amount":0.01, - "price_int":"365000", - "amount_int":"1000000", - "stamp":"1326814313220200" - }, - { - "price":3.651, - "amount":10, - "price_int":"365100", - "amount_int":"1000000000", - "stamp":"1324616465644447" - }, - { - "price":3.65123, - "amount":6.8138, - "price_int":"365123", - "amount_int":"681380000", - "stamp":"1326107985722157" - }, - { - "price":3.6541, - "amount":0.82099559, - "price_int":"365410", - "amount_int":"82099559", - "stamp":"1328449274189996" - }, - { - "price":3.6543, - "amount":0.5, - "price_int":"365430", - "amount_int":"50000000", - "stamp":"1324673222703036" - }, - { - "price":3.65542, - "amount":25, - "price_int":"365542", - "amount_int":"2500000000", - "stamp":"1328624744797070" - }, - { - "price":3.66, - "amount":0.41, - "price_int":"366000", - "amount_int":"41000000", - "stamp":"1327078108659070" - }, - { - "price":3.661, - "amount":6.77008194, - "price_int":"366100", - "amount_int":"677008194", - "stamp":"1327706327537668" - }, - { - "price":3.6632, - "amount":0.8189561, - "price_int":"366320", - "amount_int":"81895610", - "stamp":"1328449273832626" - }, - { - "price":3.666, - "amount":272.7769, - "price_int":"366600", - "amount_int":"27277690000", - "stamp":"1328431903507911" - }, - { - "price":3.66703, - "amount":0.5, - "price_int":"366703", - "amount_int":"50000000", - "stamp":"1324673218013047" - }, - { - "price":3.6675, - "amount":0.40899796, - "price_int":"366750", - "amount_int":"40899796", - "stamp":"1327742334389667" - }, - { - "price":3.67, - "amount":7.78881198, - "price_int":"367000", - "amount_int":"778881198", - "stamp":"1327078105546355" - }, - { - "price":3.6723, - "amount":0.81692672, - "price_int":"367230", - "amount_int":"81692672", - "stamp":"1328449273480099" - }, - { - "price":3.67848, - "amount":1, - "price_int":"367848", - "amount_int":"100000000", - "stamp":"1324932933578324" - }, - { - "price":3.67975, - "amount":0.5, - "price_int":"367975", - "amount_int":"50000000", - "stamp":"1324673213304227" - }, - { - "price":3.68, - "amount":0.01, - "price_int":"368000", - "amount_int":"1000000", - "stamp":"1327078102687684" - }, - { - "price":3.6815, - "amount":0.81488524, - "price_int":"368150", - "amount_int":"81488524", - "stamp":"1328449273141905" - }, - { - "price":3.68993, - "amount":0.5, - "price_int":"368993", - "amount_int":"50000000", - "stamp":"1324673206095045" - }, - { - "price":3.69, - "amount":27.11, - "price_int":"369000", - "amount_int":"2711000000", - "stamp":"1327078100206153" - }, - { - "price":3.6907, - "amount":0.81285393, - "price_int":"369070", - "amount_int":"81285393", - "stamp":"1328449272800245" - }, - { - "price":3.6912, - "amount":1, - "price_int":"369120", - "amount_int":"100000000", - "stamp":"1324932928859348" - }, - { - "price":3.695, - "amount":25, - "price_int":"369500", - "amount_int":"2500000000", - "stamp":"1326884636453059" - }, - { - "price":3.69892, - "amount":1, - "price_int":"369892", - "amount_int":"100000000", - "stamp":"1324932939584147" - }, - { - "price":3.6999, - "amount":0.81083273, - "price_int":"369990", - "amount_int":"81083273", - "stamp":"1328449272328046" - }, - { - "price":3.7, - "amount":43.75247641, - "price_int":"370000", - "amount_int":"4375247641", - "stamp":"1328579177270837" - }, - { - "price":3.701, - "amount":1000, - "price_int":"370100", - "amount_int":"100000000000", - "stamp":"1324750672932175" - }, - { - "price":3.70123, - "amount":6.8138, - "price_int":"370123", - "amount_int":"681380000", - "stamp":"1326107972451241" - }, - { - "price":3.7091, - "amount":0.80882155, - "price_int":"370910", - "amount_int":"80882155", - "stamp":"1328449271975211" - }, - { - "price":3.71, - "amount":1.01, - "price_int":"371000", - "amount_int":"101000000", - "stamp":"1327078087000726" - }, - { - "price":3.711, - "amount":23.0832983, - "price_int":"371100", - "amount_int":"2308329830", - "stamp":"1328132613662925" - }, - { - "price":3.714, - "amount":150, - "price_int":"371400", - "amount_int":"15000000000", - "stamp":"1324748242704550" - }, - { - "price":3.7165, - "amount":0.26907036, - "price_int":"371650", - "amount_int":"26907036", - "stamp":"1326162485050061" - }, - { - "price":3.7183, - "amount":0.80682032, - "price_int":"371830", - "amount_int":"80682032", - "stamp":"1328449271624361" - }, - { - "price":3.72, - "amount":7.01, - "price_int":"372000", - "amount_int":"701000000", - "stamp":"1327078084677325" - }, - { - "price":3.7276, - "amount":0.80480738, - "price_int":"372760", - "amount_int":"80480738", - "stamp":"1328449271063673" - }, - { - "price":3.73, - "amount":0.01, - "price_int":"373000", - "amount_int":"1000000", - "stamp":"1327078082259338" - }, - { - "price":3.7333, - "amount":8.8154, - "price_int":"373330", - "amount_int":"881540000", - "stamp":"1324430798893878" - }, - { - "price":3.7369, - "amount":0.80280446, - "price_int":"373690", - "amount_int":"80280446", - "stamp":"1328449270710152" - }, - { - "price":3.74, - "amount":0.01, - "price_int":"374000", - "amount_int":"1000000", - "stamp":"1327078079707979" - }, - { - "price":3.7421, - "amount":1, - "price_int":"374210", - "amount_int":"100000000", - "stamp":"1324932910470554" - }, - { - "price":3.7462, - "amount":0.80081149, - "price_int":"374620", - "amount_int":"80081149", - "stamp":"1328449270218538" - }, - { - "price":3.75, - "amount":229.71481066, - "price_int":"375000", - "amount_int":"22971481066", - "stamp":"1327649578724372" - }, - { - "price":3.7501, - "amount":2, - "price_int":"375010", - "amount_int":"200000000", - "stamp":"1324807217707581" - }, - { - "price":3.75028, - "amount":1, - "price_int":"375028", - "amount_int":"100000000", - "stamp":"1324932920390553" - }, - { - "price":3.7515, - "amount":0.01009471, - "price_int":"375150", - "amount_int":"1009471", - "stamp":"1324579668024555" - }, - { - "price":3.75229, - "amount":1.2786, - "price_int":"375229", - "amount_int":"127860000", - "stamp":"1324593585565202" - }, - { - "price":3.753, - "amount":19.19996536, - "price_int":"375300", - "amount_int":"1919996536", - "stamp":"1326727774991722" - }, - { - "price":3.75482, - "amount":1, - "price_int":"375482", - "amount_int":"100000000", - "stamp":"1324932905062996" - }, - { - "price":3.7555, - "amount":0.79882839, - "price_int":"375550", - "amount_int":"79882839", - "stamp":"1328449269842356" - }, - { - "price":3.76, - "amount":0.01, - "price_int":"376000", - "amount_int":"1000000", - "stamp":"1327078073360024" - }, - { - "price":3.7621, - "amount":332, - "price_int":"376210", - "amount_int":"33200000000", - "stamp":"1324582472226106" - }, - { - "price":3.7649, - "amount":0.79683391, - "price_int":"376490", - "amount_int":"79683391", - "stamp":"1328449269521285" - }, - { - "price":3.77, - "amount":36.58074111, - "price_int":"377000", - "amount_int":"3658074111", - "stamp":"1328128268076361" - }, - { - "price":3.7743, - "amount":0.79484938, - "price_int":"377430", - "amount_int":"79484938", - "stamp":"1328449269193169" - }, - { - "price":3.78, - "amount":0.01, - "price_int":"378000", - "amount_int":"1000000", - "stamp":"1327078068775891" - }, - { - "price":3.78027, - "amount":1, - "price_int":"378027", - "amount_int":"100000000", - "stamp":"1324932891884207" - }, - { - "price":3.78221, - "amount":0.11341517, - "price_int":"378221", - "amount_int":"11341517", - "stamp":"1324805249699738" - }, - { - "price":3.7837, - "amount":0.7928747, - "price_int":"378370", - "amount_int":"79287470", - "stamp":"1328449268869665" - }, - { - "price":3.78431, - "amount":0.02398059, - "price_int":"378431", - "amount_int":"2398059", - "stamp":"1325534814287381" - }, - { - "price":3.79, - "amount":34.13664908, - "price_int":"379000", - "amount_int":"3413664908", - "stamp":"1327078066299048" - }, - { - "price":3.7931, - "amount":0.79090981, - "price_int":"379310", - "amount_int":"79090981", - "stamp":"1328449268416017" - }, - { - "price":3.794, - "amount":2, - "price_int":"379400", - "amount_int":"200000000", - "stamp":"1327532387370254" - }, - { - "price":3.79412, - "amount":0.04692099, - "price_int":"379412", - "amount_int":"4692099", - "stamp":"1325534812412606" - }, - { - "price":3.7949, - "amount":0.02, - "price_int":"379490", - "amount_int":"2000000", - "stamp":"1325629831052500" - }, - { - "price":3.8, - "amount":686.67169473, - "price_int":"380000", - "amount_int":"68667169473", - "stamp":"1328460589740748" - }, - { - "price":3.80123, - "amount":3.8138, - "price_int":"380123", - "amount_int":"381380000", - "stamp":"1326107956817905" - }, - { - "price":3.8021, - "amount":3, - "price_int":"380210", - "amount_int":"300000000", - "stamp":"1324855709222945" - }, - { - "price":3.8026, - "amount":0.78893389, - "price_int":"380260", - "amount_int":"78893389", - "stamp":"1328449268092001" - }, - { - "price":3.80392, - "amount":0.04682647, - "price_int":"380392", - "amount_int":"4682647", - "stamp":"1325534810669811" - }, - { - "price":3.80572, - "amount":1, - "price_int":"380572", - "amount_int":"100000000", - "stamp":"1324932879348372" - }, - { - "price":3.80601, - "amount":0.01855223, - "price_int":"380601", - "amount_int":"1855223", - "stamp":"1324804524492923" - }, - { - "price":3.80773, - "amount":5, - "price_int":"380773", - "amount_int":"500000000", - "stamp":"1324674750901044" - }, - { - "price":3.81, - "amount":88.27, - "price_int":"381000", - "amount_int":"8827000000", - "stamp":"1327652374403809" - }, - { - "price":3.811, - "amount":52.5, - "price_int":"381100", - "amount_int":"5250000000", - "stamp":"1328132588840417" - }, - { - "price":3.8121, - "amount":0.78696781, - "price_int":"381210", - "amount_int":"78696781", - "stamp":"1328449267697126" - }, - { - "price":3.81373, - "amount":0.04682484, - "price_int":"381373", - "amount_int":"4682484", - "stamp":"1325534950948381" - }, - { - "price":3.81717, - "amount":123.33353666, - "price_int":"381717", - "amount_int":"12333353666", - "stamp":"1328103909680864" - }, - { - "price":3.81844, - "amount":1, - "price_int":"381844", - "amount_int":"100000000", - "stamp":"1324932871300122" - }, - { - "price":3.82, - "amount":718.23125654, - "price_int":"382000", - "amount_int":"71823125654", - "stamp":"1328458327942881" - }, - { - "price":3.8216, - "amount":0.78501151, - "price_int":"382160", - "amount_int":"78501151", - "stamp":"1328449267369756" - }, - { - "price":3.82353, - "amount":0.04681535, - "price_int":"382353", - "amount_int":"4681535", - "stamp":"1325534948280729" - }, - { - "price":3.82989, - "amount":1, - "price_int":"382989", - "amount_int":"100000000", - "stamp":"1324932863072312" - }, - { - "price":3.83, - "amount":23.0648, - "price_int":"383000", - "amount_int":"2306480000", - "stamp":"1327420658269643" - }, - { - "price":3.8311, - "amount":0.78306492, - "price_int":"383110", - "amount_int":"78306492", - "stamp":"1328449267021105" - }, - { - "price":3.83333, - "amount":0.04680456, - "price_int":"383333", - "amount_int":"4680456", - "stamp":"1325534946164941" - }, - { - "price":3.84, - "amount":15.01, - "price_int":"384000", - "amount_int":"1501000000", - "stamp":"1327078015674486" - }, - { - "price":3.8407, - "amount":0.78110761, - "price_int":"384070", - "amount_int":"78110761", - "stamp":"1328449266676014" - }, - { - "price":3.84129, - "amount":4, - "price_int":"384129", - "amount_int":"400000000", - "stamp":"1325190362501756" - }, - { - "price":3.84262, - "amount":1.00002649, - "price_int":"384262", - "amount_int":"100002649", - "stamp":"1325084628231245" - }, - { - "price":3.84314, - "amount":0.04667994, - "price_int":"384314", - "amount_int":"4667994", - "stamp":"1325534944195609" - }, - { - "price":3.85, - "amount":173.95390649, - "price_int":"385000", - "amount_int":"17395390649", - "stamp":"1326814342843765" - }, - { - "price":3.8503, - "amount":0.77916007, - "price_int":"385030", - "amount_int":"77916007", - "stamp":"1328449266334059" - }, - { - "price":3.8505, - "amount":20, - "price_int":"385050", - "amount_int":"2000000000", - "stamp":"1325085089916734" - }, - { - "price":3.85123, - "amount":3.8138, - "price_int":"385123", - "amount_int":"381380000", - "stamp":"1326108000523430" - }, - { - "price":3.85171, - "amount":100, - "price_int":"385171", - "amount_int":"10000000000", - "stamp":"1327625710286595" - }, - { - "price":3.85294, - "amount":0.04669004, - "price_int":"385294", - "amount_int":"4669004", - "stamp":"1325534942412985" - }, - { - "price":3.857, - "amount":0.18735, - "price_int":"385700", - "amount_int":"18735000", - "stamp":"1328595058208234" - }, - { - "price":3.8599, - "amount":0.77722221, - "price_int":"385990", - "amount_int":"77722221", - "stamp":"1328449265620526" - }, - { - "price":3.86, - "amount":0.01, - "price_int":"386000", - "amount_int":"1000000", - "stamp":"1327078020507711" - }, - { - "price":3.86043, - "amount":1, - "price_int":"386043", - "amount_int":"100000000", - "stamp":"1324933064505662" - }, - { - "price":3.861, - "amount":35, - "price_int":"386100", - "amount_int":"3500000000", - "stamp":"1327706323194523" - }, - { - "price":3.862, - "amount":0.14208, - "price_int":"386200", - "amount_int":"14208000", - "stamp":"1327841027036073" - }, - { - "price":3.86275, - "amount":0.04664245, - "price_int":"386275", - "amount_int":"4664245", - "stamp":"1325534939808575" - }, - { - "price":3.864, - "amount":0.14233, - "price_int":"386400", - "amount_int":"14233000", - "stamp":"1327903890923042" - }, - { - "price":3.8695, - "amount":0.77529397, - "price_int":"386950", - "amount_int":"77529397", - "stamp":"1328449265298219" - }, - { - "price":3.87, - "amount":0.01, - "price_int":"387000", - "amount_int":"1000000", - "stamp":"1327078022856502" - }, - { - "price":3.87255, - "amount":0.04663503, - "price_int":"387255", - "amount_int":"4663503", - "stamp":"1325534937368214" - }, - { - "price":3.8791, - "amount":0.77337527, - "price_int":"387910", - "amount_int":"77337527", - "stamp":"1328449264986942" - }, - { - "price":3.88, - "amount":4.21, - "price_int":"388000", - "amount_int":"421000000", - "stamp":"1328479078097832" - }, - { - "price":3.88235, - "amount":0.04666097, - "price_int":"388235", - "amount_int":"4666097", - "stamp":"1325534934931168" - }, - { - "price":3.8888, - "amount":0.7714462, - "price_int":"388880", - "amount_int":"77144620", - "stamp":"1328449264658657" - }, - { - "price":3.89, - "amount":0.01, - "price_int":"389000", - "amount_int":"1000000", - "stamp":"1327078027138804" - }, - { - "price":3.89161, - "amount":6.5392, - "price_int":"389161", - "amount_int":"653920000", - "stamp":"1327601174090486" - }, - { - "price":3.89216, - "amount":0.04663409, - "price_int":"389216", - "amount_int":"4663409", - "stamp":"1325534933041881" - }, - { - "price":3.89795, - "amount":12.26527733, - "price_int":"389795", - "amount_int":"1226527733", - "stamp":"1324859783155832" - }, - { - "price":3.8985, - "amount":0.76952674, - "price_int":"389850", - "amount_int":"76952674", - "stamp":"1328449264330279" - }, - { - "price":3.9, - "amount":4252.99963845, - "price_int":"390000", - "amount_int":"425299963845", - "stamp":"1328579172291167" - }, - { - "price":3.90036, - "amount":0.01009471, - "price_int":"390036", - "amount_int":"1009471", - "stamp":"1324900726894736" - }, - { - "price":3.9005, - "amount":25, - "price_int":"390050", - "amount_int":"2500000000", - "stamp":"1325709562861554" - }, - { - "price":3.90052, - "amount":1.5, - "price_int":"390052", - "amount_int":"150000000", - "stamp":"1324900726529952" - }, - { - "price":3.90121, - "amount":3, - "price_int":"390121", - "amount_int":"300000000", - "stamp":"1325183067814760" - }, - { - "price":3.90196, - "amount":0.04662145, - "price_int":"390196", - "amount_int":"4662145", - "stamp":"1325534928668093" - }, - { - "price":3.9082, - "amount":0.76761681, - "price_int":"390820", - "amount_int":"76761681", - "stamp":"1328449264002734" - }, - { - "price":3.91, - "amount":11.287, - "price_int":"391000", - "amount_int":"1128700000", - "stamp":"1328637450464056" - }, - { - "price":3.911, - "amount":52.5, - "price_int":"391100", - "amount_int":"5250000000", - "stamp":"1328132711985507" - }, - { - "price":3.91123, - "amount":3.8138, - "price_int":"391123", - "amount_int":"381380000", - "stamp":"1326108015392061" - }, - { - "price":3.91176, - "amount":0.04660371, - "price_int":"391176", - "amount_int":"4660371", - "stamp":"1325534926811791" - }, - { - "price":3.91601, - "amount":0.78234223, - "price_int":"391601", - "amount_int":"78234223", - "stamp":"1326751810157004" - }, - { - "price":3.9179, - "amount":0.76571633, - "price_int":"391790", - "amount_int":"76571633", - "stamp":"1328449263679043" - }, - { - "price":3.91896, - "amount":0.01, - "price_int":"391896", - "amount_int":"1000000", - "stamp":"1325355177972471" - }, - { - "price":3.92, - "amount":100.01, - "price_int":"392000", - "amount_int":"10001000000", - "stamp":"1327077710454798" - }, - { - "price":3.92157, - "amount":0.04659602, - "price_int":"392157", - "amount_int":"4659602", - "stamp":"1325534925070579" - }, - { - "price":3.92587, - "amount":1.0054614, - "price_int":"392587", - "amount_int":"100546140", - "stamp":"1326751800121588" - }, - { - "price":3.92666, - "amount":123.7693, - "price_int":"392666", - "amount_int":"12376930000", - "stamp":"1327782449932261" - }, - { - "price":3.9277, - "amount":0.76380579, - "price_int":"392770", - "amount_int":"76380579", - "stamp":"1328449263338886" - }, - { - "price":3.92787, - "amount":180, - "price_int":"392787", - "amount_int":"18000000000", - "stamp":"1328577344210779" - }, - { - "price":3.93, - "amount":1.47155, - "price_int":"393000", - "amount_int":"147155000", - "stamp":"1328637449834669" - }, - { - "price":3.93001, - "amount":0.19492316, - "price_int":"393001", - "amount_int":"19492316", - "stamp":"1318329049321282" - }, - { - "price":3.93137, - "amount":0.04659029, - "price_int":"393137", - "amount_int":"4659029", - "stamp":"1325534922729930" - }, - { - "price":3.93574, - "amount":1.0054614, - "price_int":"393574", - "amount_int":"100546140", - "stamp":"1326751785601680" - }, - { - "price":3.9367, - "amount":1.9570808, - "price_int":"393670", - "amount_int":"195708080", - "stamp":"1324749724765289" - }, - { - "price":3.9375, - "amount":0.76190476, - "price_int":"393750", - "amount_int":"76190476", - "stamp":"1328449263028086" - }, - { - "price":3.94, - "amount":88.7218, - "price_int":"394000", - "amount_int":"8872180000", - "stamp":"1327077705591223" - }, - { - "price":3.94048, - "amount":10, - "price_int":"394048", - "amount_int":"1000000000", - "stamp":"1325626891153666" - }, - { - "price":3.94118, - "amount":0.04656656, - "price_int":"394118", - "amount_int":"4656656", - "stamp":"1325534919198548" - }, - { - "price":3.94184, - "amount":11, - "price_int":"394184", - "amount_int":"1100000000", - "stamp":"1325161243627483" - }, - { - "price":3.94441, - "amount":0.01, - "price_int":"394441", - "amount_int":"1000000", - "stamp":"1325516264145797" - }, - { - "price":3.94461, - "amount":100, - "price_int":"394461", - "amount_int":"10000000000", - "stamp":"1326922847426015" - }, - { - "price":3.9456, - "amount":1.0054614, - "price_int":"394560", - "amount_int":"100546140", - "stamp":"1326751781645651" - }, - { - "price":3.9473, - "amount":0.76001317, - "price_int":"394730", - "amount_int":"76001317", - "stamp":"1328449262716757" - }, - { - "price":3.95, - "amount":73.27683797, - "price_int":"395000", - "amount_int":"7327683797", - "stamp":"1328446948216734" - }, - { - "price":3.95004, - "amount":33.50052911, - "price_int":"395004", - "amount_int":"3350052911", - "stamp":"1324925956697205" - }, - { - "price":3.95005, - "amount":33.5004443, - "price_int":"395005", - "amount_int":"3350044430", - "stamp":"1324925958629996" - }, - { - "price":3.95098, - "amount":0.04655647, - "price_int":"395098", - "amount_int":"4655647", - "stamp":"1325534917130320" - }, - { - "price":3.95156, - "amount":33.48764286, - "price_int":"395156", - "amount_int":"3348764286", - "stamp":"1324925965212842" - }, - { - "price":3.95546, - "amount":1.0063319, - "price_int":"395546", - "amount_int":"100633190", - "stamp":"1326751772225712" - }, - { - "price":3.9571, - "amount":0.75813095, - "price_int":"395710", - "amount_int":"75813095", - "stamp":"1328449262402582" - }, - { - "price":3.96, - "amount":6.1085202, - "price_int":"396000", - "amount_int":"610852020", - "stamp":"1327077700373846" - }, - { - "price":3.96004, - "amount":2870.8601, - "price_int":"396004", - "amount_int":"287086010000", - "stamp":"1328624738632619" - }, - { - "price":3.96078, - "amount":0.04654965, - "price_int":"396078", - "amount_int":"4654965", - "stamp":"1325534914918199" - }, - { - "price":3.96533, - "amount":1.00633723, - "price_int":"396533", - "amount_int":"100633723", - "stamp":"1326751750612880" - }, - { - "price":3.967, - "amount":0.75623897, - "price_int":"396700", - "amount_int":"75623897", - "stamp":"1328449262051335" - }, - { - "price":3.97, - "amount":149.90274811, - "price_int":"397000", - "amount_int":"14990274811", - "stamp":"1327077697815859" - }, - { - "price":3.97059, - "amount":0.04654235, - "price_int":"397059", - "amount_int":"4654235", - "stamp":"1325534912748754" - }, - { - "price":3.97112, - "amount":8.81684512, - "price_int":"397112", - "amount_int":"881684512", - "stamp":"1328431155338896" - }, - { - "price":3.975, - "amount":10, - "price_int":"397500", - "amount_int":"1000000000", - "stamp":"1325060095228358" - }, - { - "price":3.97519, - "amount":1.00634254, - "price_int":"397519", - "amount_int":"100634254", - "stamp":"1326751738891275" - }, - { - "price":3.9769, - "amount":0.75435641, - "price_int":"397690", - "amount_int":"75435641", - "stamp":"1328449261712155" - }, - { - "price":3.977, - "amount":1, - "price_int":"397700", - "amount_int":"100000000", - "stamp":"1325255537218772" - }, - { - "price":3.978, - "amount":0.24, - "price_int":"397800", - "amount_int":"24000000", - "stamp":"1325029411341154" - }, - { - "price":3.9788, - "amount":0.20886378, - "price_int":"397880", - "amount_int":"20886378", - "stamp":"1325619869004006" - }, - { - "price":3.98, - "amount":20.51, - "price_int":"398000", - "amount_int":"2051000000", - "stamp":"1327077695387409" - }, - { - "price":3.98039, - "amount":0.04654623, - "price_int":"398039", - "amount_int":"4654623", - "stamp":"1325534908892563" - }, - { - "price":3.9809, - "amount":5, - "price_int":"398090", - "amount_int":"500000000", - "stamp":"1325026398556464" - }, - { - "price":3.98151, - "amount":1, - "price_int":"398151", - "amount_int":"100000000", - "stamp":"1325037774492577" - }, - { - "price":3.98506, - "amount":1.00634785, - "price_int":"398506", - "amount_int":"100634785", - "stamp":"1326751726596156" - }, - { - "price":3.986, - "amount":0.1036, - "price_int":"398600", - "amount_int":"10360000", - "stamp":"1327695022666610" - }, - { - "price":3.9868, - "amount":0.75248319, - "price_int":"398680", - "amount_int":"75248319", - "stamp":"1328449261365489" - }, - { - "price":3.9886, - "amount":0.20888611, - "price_int":"398860", - "amount_int":"20888611", - "stamp":"1325619867199364" - }, - { - "price":3.99, - "amount":0.01, - "price_int":"399000", - "amount_int":"1000000", - "stamp":"1327077682451098" - }, - { - "price":3.9902, - "amount":0.04653757, - "price_int":"399020", - "amount_int":"4653757", - "stamp":"1325534906637327" - }, - { - "price":3.99492, - "amount":1.00635313, - "price_int":"399492", - "amount_int":"100635313", - "stamp":"1326751717415534" - }, - { - "price":3.9967, - "amount":0.75061926, - "price_int":"399670", - "amount_int":"75061926", - "stamp":"1328449261032793" - }, - { - "price":3.9984, - "amount":0.20880654, - "price_int":"399840", - "amount_int":"20880654", - "stamp":"1325619865388929" - }, - { - "price":4, - "amount":2853.2288111, - "price_int":"400000", - "amount_int":"285322881110", - "stamp":"1328624499395976" - }, - { - "price":4.0001, - "amount":150, - "price_int":"400010", - "amount_int":"15000000000", - "stamp":"1327484788328071" - }, - { - "price":4.001, - "amount":120, - "price_int":"400100", - "amount_int":"12000000000", - "stamp":"1326922773011056" - }, - { - "price":4.0012, - "amount":103.19, - "price_int":"400120", - "amount_int":"10319000000", - "stamp":"1325512485653975" - }, - { - "price":4.004, - "amount":0.23324, - "price_int":"400400", - "amount_int":"23324000", - "stamp":"1328442077274418" - }, - { - "price":4.005, - "amount":12.4844, - "price_int":"400500", - "amount_int":"1248440000", - "stamp":"1327650693157167" - }, - { - "price":4.00622, - "amount":11.61973641, - "price_int":"400622", - "amount_int":"1161973641", - "stamp":"1324859764558694" - }, - { - "price":4.0067, - "amount":0.74874585, - "price_int":"400670", - "amount_int":"74874585", - "stamp":"1328449260531862" - }, - { - "price":4.0082, - "amount":0.20884881, - "price_int":"400820", - "amount_int":"20884881", - "stamp":"1325619863700083" - }, - { - "price":4.009, - "amount":3.3337, - "price_int":"400900", - "amount_int":"333370000", - "stamp":"1325368186141792" - }, - { - "price":4.0098, - "amount":0.04650802, - "price_int":"400980", - "amount_int":"4650802", - "stamp":"1325535079485344" - }, - { - "price":4.01, - "amount":193.989, - "price_int":"401000", - "amount_int":"19398900000", - "stamp":"1328312343020405" - }, - { - "price":4.011, - "amount":82.5, - "price_int":"401100", - "amount_int":"8250000000", - "stamp":"1328132708386117" - }, - { - "price":4.01234, - "amount":0.8286212, - "price_int":"401234", - "amount_int":"82862120", - "stamp":"1328208111427756" - }, - { - "price":4.01512, - "amount":6.8, - "price_int":"401512", - "amount_int":"680000000", - "stamp":"1325123554931175" - }, - { - "price":4.0167, - "amount":0.74688177, - "price_int":"401670", - "amount_int":"74688177", - "stamp":"1328449260204650" - }, - { - "price":4.018, - "amount":0.20889095, - "price_int":"401800", - "amount_int":"20889095", - "stamp":"1325619861947470" - }, - { - "price":4.01961, - "amount":0.04649875, - "price_int":"401961", - "amount_int":"4649875", - "stamp":"1325535075922498" - }, - { - "price":4.02, - "amount":1010.01, - "price_int":"402000", - "amount_int":"101001000000", - "stamp":"1328100576939718" - }, - { - "price":4.021, - "amount":2.38291718, - "price_int":"402100", - "amount_int":"238291718", - "stamp":"1325276778634563" - }, - { - "price":4.022, - "amount":100, - "price_int":"402200", - "amount_int":"10000000000", - "stamp":"1325246208336348" - }, - { - "price":4.02414, - "amount":189, - "price_int":"402414", - "amount_int":"18900000000", - "stamp":"1325084161689787" - }, - { - "price":4.0267, - "amount":0.74502695, - "price_int":"402670", - "amount_int":"74502695", - "stamp":"1328449259877705" - }, - { - "price":4.0278, - "amount":0.20893296, - "price_int":"402780", - "amount_int":"20893296", - "stamp":"1325619860127150" - }, - { - "price":4.02941, - "amount":0.04649237, - "price_int":"402941", - "amount_int":"4649237", - "stamp":"1325535073380802" - }, - { - "price":4.0297, - "amount":1, - "price_int":"402970", - "amount_int":"100000000", - "stamp":"1325255519393431" - }, - { - "price":4.0299, - "amount":82.93874289, - "price_int":"402990", - "amount_int":"8293874289", - "stamp":"1326940047353182" - }, - { - "price":4.03, - "amount":79.91405458, - "price_int":"403000", - "amount_int":"7991405458", - "stamp":"1328571115879180" - }, - { - "price":4.0367, - "amount":0.74318131, - "price_int":"403670", - "amount_int":"74318131", - "stamp":"1328449259553320" - }, - { - "price":4.0376, - "amount":0.20899446, - "price_int":"403760", - "amount_int":"20899446", - "stamp":"1325619858425008" - }, - { - "price":4.03922, - "amount":0.04649429, - "price_int":"403922", - "amount_int":"4649429", - "stamp":"1325535071656984" - }, - { - "price":4.04, - "amount":10.01, - "price_int":"404000", - "amount_int":"1001000000", - "stamp":"1327318383815959" - }, - { - "price":4.0468, - "amount":0.74132648, - "price_int":"404680", - "amount_int":"74132648", - "stamp":"1328449259226431" - }, - { - "price":4.0474, - "amount":0.20905583, - "price_int":"404740", - "amount_int":"20905583", - "stamp":"1325619856495845" - }, - { - "price":4.04902, - "amount":0.04648081, - "price_int":"404902", - "amount_int":"4648081", - "stamp":"1325535069694624" - }, - { - "price":4.05, - "amount":320.23030246, - "price_int":"405000", - "amount_int":"32023030246", - "stamp":"1328520753776726" - }, - { - "price":4.0505, - "amount":20, - "price_int":"405050", - "amount_int":"2000000000", - "stamp":"1325854194008789" - }, - { - "price":4.053, - "amount":1.79167663, - "price_int":"405300", - "amount_int":"179167663", - "stamp":"1325057647327817" - }, - { - "price":4.05312, - "amount":0.01047, - "price_int":"405312", - "amount_int":"1047000", - "stamp":"1326841937521074" - }, - { - "price":4.0569, - "amount":0.73948088, - "price_int":"405690", - "amount_int":"73948088", - "stamp":"1328449258910846" - }, - { - "price":4.0572, - "amount":0.209117, - "price_int":"405720", - "amount_int":"20911700", - "stamp":"1325619854798821" - }, - { - "price":4.05787, - "amount":10, - "price_int":"405787", - "amount_int":"1000000000", - "stamp":"1327916635659337" - }, - { - "price":4.05882, - "amount":0.04647563, - "price_int":"405882", - "amount_int":"4647563", - "stamp":"1325535066862052" - }, - { - "price":4.06, - "amount":0.01, - "price_int":"406000", - "amount_int":"1000000", - "stamp":"1327318386616932" - }, - { - "price":4.06515, - "amount":5, - "price_int":"406515", - "amount_int":"500000000", - "stamp":"1328567273950736" - }, - { - "price":4.067, - "amount":0.94655522, - "price_int":"406700", - "amount_int":"94655522", - "stamp":"1328449258581183" - }, - { - "price":4.06863, - "amount":0.04632484, - "price_int":"406863", - "amount_int":"4632484", - "stamp":"1325535064988278" - }, - { - "price":4.07, - "amount":102.01, - "price_int":"407000", - "amount_int":"10201000000", - "stamp":"1327318389457814" - }, - { - "price":4.07015, - "amount":11.85, - "price_int":"407015", - "amount_int":"1185000000", - "stamp":"1325038275470776" - }, - { - "price":4.07165, - "amount":950.5, - "price_int":"407165", - "amount_int":"95050000000", - "stamp":"1327625977824022" - }, - { - "price":4.072, - "amount":0.51, - "price_int":"407200", - "amount_int":"51000000", - "stamp":"1325242768618021" - }, - { - "price":4.07265, - "amount":39.25826181, - "price_int":"407265", - "amount_int":"3925826181", - "stamp":"1325812048476677" - }, - { - "price":4.07292, - "amount":50, - "price_int":"407292", - "amount_int":"5000000000", - "stamp":"1326884386393263" - }, - { - "price":4.0768, - "amount":0.20903108, - "price_int":"407680", - "amount_int":"20903108", - "stamp":"1325619851395039" - }, - { - "price":4.0771, - "amount":0.73581712, - "price_int":"407710", - "amount_int":"73581712", - "stamp":"1328449258159619" - }, - { - "price":4.07843, - "amount":0.04631742, - "price_int":"407843", - "amount_int":"4631742", - "stamp":"1325535063172745" - }, - { - "price":4.08, - "amount":0.01, - "price_int":"408000", - "amount_int":"1000000", - "stamp":"1327318393048378" - }, - { - "price":4.081, - "amount":2000, - "price_int":"408100", - "amount_int":"200000000000", - "stamp":"1327634562719601" - }, - { - "price":4.083, - "amount":1, - "price_int":"408300", - "amount_int":"100000000", - "stamp":"1325255439260606" - }, - { - "price":4.0866, - "amount":0.20911192, - "price_int":"408660", - "amount_int":"20911192", - "stamp":"1325619849741670" - }, - { - "price":4.0873, - "amount":0.73398087, - "price_int":"408730", - "amount_int":"73398087", - "stamp":"1328449257594156" - }, - { - "price":4.08824, - "amount":0.04630699, - "price_int":"408824", - "amount_int":"4630699", - "stamp":"1325535061331729" - }, - { - "price":4.09, - "amount":124.4599, - "price_int":"409000", - "amount_int":"12445990000", - "stamp":"1328128221598833" - }, - { - "price":4.0964, - "amount":0.20919251, - "price_int":"409640", - "amount_int":"20919251", - "stamp":"1325619847951480" - }, - { - "price":4.0971, - "amount":22.64870807, - "price_int":"409710", - "amount_int":"2264870807", - "stamp":"1325709716510691" - }, - { - "price":4.0975, - "amount":0.73215375, - "price_int":"409750", - "amount_int":"73215375", - "stamp":"1328449256984347" - }, - { - "price":4.09804, - "amount":0.04629404, - "price_int":"409804", - "amount_int":"4629404", - "stamp":"1325535058294595" - }, - { - "price":4.09975, - "amount":0.56542472, - "price_int":"409975", - "amount_int":"56542472", - "stamp":"1326857551449699" - }, - { - "price":4.1, - "amount":2561.74601463, - "price_int":"410000", - "amount_int":"256174601463", - "stamp":"1328579169083401" - }, - { - "price":4.104, - "amount":1.5, - "price_int":"410400", - "amount_int":"150000000", - "stamp":"1328330785808456" - }, - { - "price":4.1062, - "amount":0.20927288, - "price_int":"410620", - "amount_int":"20927288", - "stamp":"1325619846134211" - }, - { - "price":4.1077, - "amount":0.73033571, - "price_int":"410770", - "amount_int":"73033571", - "stamp":"1328449256656771" - }, - { - "price":4.10784, - "amount":0.0459282, - "price_int":"410784", - "amount_int":"4592820", - "stamp":"1325535055876242" - }, - { - "price":4.11, - "amount":1140.6799124, - "price_int":"411000", - "amount_int":"114067991240", - "stamp":"1328128466440645" - }, - { - "price":4.1101, - "amount":41, - "price_int":"411010", - "amount_int":"4100000000", - "stamp":"1325847814490936" - }, - { - "price":4.111, - "amount":52.5, - "price_int":"411100", - "amount_int":"5250000000", - "stamp":"1328132705779425" - }, - { - "price":4.116, - "amount":0.20935305, - "price_int":"411600", - "amount_int":"20935305", - "stamp":"1325619844446189" - }, - { - "price":4.11765, - "amount":0.04591657, - "price_int":"411765", - "amount_int":"4591657", - "stamp":"1325535053973065" - }, - { - "price":4.1179, - "amount":0.72852668, - "price_int":"411790", - "amount_int":"72852668", - "stamp":"1328449256317858" - }, - { - "price":4.12, - "amount":145.01, - "price_int":"412000", - "amount_int":"14501000000", - "stamp":"1328369587783729" - }, - { - "price":4.121, - "amount":2.5, - "price_int":"412100", - "amount_int":"250000000", - "stamp":"1328567882560536" - }, - { - "price":4.12254, - "amount":150, - "price_int":"412254", - "amount_int":"15000000000", - "stamp":"1328577073426558" - }, - { - "price":4.123, - "amount":1.5, - "price_int":"412300", - "amount_int":"150000000", - "stamp":"1326887316896654" - }, - { - "price":4.1258, - "amount":0.20941346, - "price_int":"412580", - "amount_int":"20941346", - "stamp":"1325619842653560" - }, - { - "price":4.12745, - "amount":0.04590731, - "price_int":"412745", - "amount_int":"4590731", - "stamp":"1325535051390755" - }, - { - "price":4.1282, - "amount":0.72670898, - "price_int":"412820", - "amount_int":"72670898", - "stamp":"1328449255993593" - }, - { - "price":4.13, - "amount":0.01, - "price_int":"413000", - "amount_int":"1000000", - "stamp":"1327318404140687" - }, - { - "price":4.133, - "amount":0.18735, - "price_int":"413300", - "amount_int":"18735000", - "stamp":"1328595053367315" - }, - { - "price":4.13313, - "amount":13.4997, - "price_int":"413313", - "amount_int":"1349970000", - "stamp":"1326865386093241" - }, - { - "price":4.13527, - "amount":0.00056307, - "price_int":"413527", - "amount_int":"56307", - "stamp":"1328581333566386" - }, - { - "price":4.1356, - "amount":0.20945416, - "price_int":"413560", - "amount_int":"20945416", - "stamp":"1325619840903108" - }, - { - "price":4.1366, - "amount":1, - "price_int":"413660", - "amount_int":"100000000", - "stamp":"1325255204352752" - }, - { - "price":4.13725, - "amount":0.04589712, - "price_int":"413725", - "amount_int":"4589712", - "stamp":"1325535049201342" - }, - { - "price":4.138, - "amount":0.14208, - "price_int":"413800", - "amount_int":"14208000", - "stamp":"1327841018507770" - }, - { - "price":4.1385, - "amount":0.72490033, - "price_int":"413850", - "amount_int":"72490033", - "stamp":"1328449255654884" - }, - { - "price":4.14, - "amount":84.33103, - "price_int":"414000", - "amount_int":"8433103000", - "stamp":"1327903885251847" - }, - { - "price":4.1454, - "amount":0.20949479, - "price_int":"414540", - "amount_int":"20949479", - "stamp":"1325619839169079" - }, - { - "price":4.14636, - "amount":2.41175392, - "price_int":"414636", - "amount_int":"241175392", - "stamp":"1324877050869287" - }, - { - "price":4.14706, - "amount":0.04588502, - "price_int":"414706", - "amount_int":"4588502", - "stamp":"1325535047353402" - }, - { - "price":4.1488, - "amount":0.72310066, - "price_int":"414880", - "amount_int":"72310066", - "stamp":"1328449255396420" - }, - { - "price":4.15, - "amount":11.01, - "price_int":"415000", - "amount_int":"1101000000", - "stamp":"1326846667855723" - }, - { - "price":4.1552, - "amount":0.20955485, - "price_int":"415520", - "amount_int":"20955485", - "stamp":"1325619835979726" - }, - { - "price":4.15597, - "amount":0.0202, - "price_int":"415597", - "amount_int":"2020000", - "stamp":"1327573038310156" - }, - { - "price":4.15686, - "amount":0.04587422, - "price_int":"415686", - "amount_int":"4587422", - "stamp":"1325535043729797" - }, - { - "price":4.1591, - "amount":0.7213099, - "price_int":"415910", - "amount_int":"72130990", - "stamp":"1328449255010977" - }, - { - "price":4.16, - "amount":302.36907451, - "price_int":"416000", - "amount_int":"30236907451", - "stamp":"1327318410164984" - }, - { - "price":4.16116, - "amount":6.8, - "price_int":"416116", - "amount_int":"680000000", - "stamp":"1325257617442244" - }, - { - "price":4.165, - "amount":0.20961479, - "price_int":"416500", - "amount_int":"20961479", - "stamp":"1325619834148620" - }, - { - "price":4.1666, - "amount":10, - "price_int":"416660", - "amount_int":"1000000000", - "stamp":"1328622503655113" - }, - { - "price":4.16667, - "amount":0.04586398, - "price_int":"416667", - "amount_int":"4586398", - "stamp":"1325535041133754" - }, - { - "price":4.1695, - "amount":0.71951073, - "price_int":"416950", - "amount_int":"71951073", - "stamp":"1328449254754519" - }, - { - "price":4.17, - "amount":1.26385, - "price_int":"417000", - "amount_int":"126385000", - "stamp":"1328367170035148" - }, - { - "price":4.17001, - "amount":20, - "price_int":"417001", - "amount_int":"2000000000", - "stamp":"1326841898060205" - }, - { - "price":4.17103, - "amount":0.0202, - "price_int":"417103", - "amount_int":"2020000", - "stamp":"1327573035368479" - }, - { - "price":4.17268, - "amount":3.384e-5, - "price_int":"417268", - "amount_int":"3384", - "stamp":"1325317543464657" - }, - { - "price":4.1748, - "amount":0.20965505, - "price_int":"417480", - "amount_int":"20965505", - "stamp":"1325619832510423" - }, - { - "price":4.17505, - "amount":4, - "price_int":"417505", - "amount_int":"400000000", - "stamp":"1325256112959287" - }, - { - "price":4.176, - "amount":0.26195, - "price_int":"417600", - "amount_int":"26195000", - "stamp":"1328248422568006" - }, - { - "price":4.17647, - "amount":0.04585881, - "price_int":"417647", - "amount_int":"4585881", - "stamp":"1325535038510753" - }, - { - "price":4.17887, - "amount":5.8842668, - "price_int":"417887", - "amount_int":"588426680", - "stamp":"1328132253653766" - }, - { - "price":4.1799, - "amount":0.71772052, - "price_int":"417990", - "amount_int":"71772052", - "stamp":"1328449254146075" - }, - { - "price":4.18, - "amount":40.35617224, - "price_int":"418000", - "amount_int":"4035617224", - "stamp":"1328586875608096" - }, - { - "price":4.18101, - "amount":3.8, - "price_int":"418101", - "amount_int":"380000000", - "stamp":"1325256036615958" - }, - { - "price":4.1846, - "amount":0.20965052, - "price_int":"418460", - "amount_int":"20965052", - "stamp":"1325619830751205" - }, - { - "price":4.18609, - "amount":0.0202, - "price_int":"418609", - "amount_int":"2020000", - "stamp":"1327573031416815" - }, - { - "price":4.18627, - "amount":0.04585147, - "price_int":"418627", - "amount_int":"4585147", - "stamp":"1325535034843130" - }, - { - "price":4.188, - "amount":0.4, - "price_int":"418800", - "amount_int":"40000000", - "stamp":"1327512616410681" - }, - { - "price":4.18989, - "amount":62.5728599, - "price_int":"418989", - "amount_int":"6257285990", - "stamp":"1325534216755197" - }, - { - "price":4.19, - "amount":109.08971599, - "price_int":"419000", - "amount_int":"10908971599", - "stamp":"1328445364786855" - }, - { - "price":4.1903, - "amount":0.71593919, - "price_int":"419030", - "amount_int":"71593919", - "stamp":"1328449253550201" - }, - { - "price":4.19031, - "amount":0.05852311, - "price_int":"419031", - "amount_int":"5852311", - "stamp":"1325274309889706" - }, - { - "price":4.19081, - "amount":1.9314667, - "price_int":"419081", - "amount_int":"193146670", - "stamp":"1325264387806411" - }, - { - "price":4.19345, - "amount":200, - "price_int":"419345", - "amount_int":"20000000000", - "stamp":"1327585072113635" - }, - { - "price":4.1944, - "amount":0.20969073, - "price_int":"419440", - "amount_int":"20969073", - "stamp":"1325619829159829" - }, - { - "price":4.19608, - "amount":0.04584535, - "price_int":"419608", - "amount_int":"4584535", - "stamp":"1325535032247289" - }, - { - "price":4.2, - "amount":4607.32385714, - "price_int":"420000", - "amount_int":"460732385714", - "stamp":"1328587049876516" - }, - { - "price":4.2001, - "amount":500.20648079, - "price_int":"420010", - "amount_int":"50020648079", - "stamp":"1328581259520021" - }, - { - "price":4.2008, - "amount":0.71414969, - "price_int":"420080", - "amount_int":"71414969", - "stamp":"1328449253123455" - }, - { - "price":4.20115, - "amount":0.0202, - "price_int":"420115", - "amount_int":"2020000", - "stamp":"1327573027727932" - }, - { - "price":4.204, - "amount":1.5, - "price_int":"420400", - "amount_int":"150000000", - "stamp":"1328330781221386" - }, - { - "price":4.2042, - "amount":0.20971141, - "price_int":"420420", - "amount_int":"20971141", - "stamp":"1325619827439682" - }, - { - "price":4.20588, - "amount":0.04583873, - "price_int":"420588", - "amount_int":"4583873", - "stamp":"1325535029021592" - }, - { - "price":4.21, - "amount":5222.66452612, - "price_int":"421000", - "amount_int":"522266452612", - "stamp":"1328613254919783" - }, - { - "price":4.211, - "amount":676.30936762, - "price_int":"421100", - "amount_int":"67630936762", - "stamp":"1328519388063850" - }, - { - "price":4.2113, - "amount":0.7123691, - "price_int":"421130", - "amount_int":"71236910", - "stamp":"1328449252517642" - }, - { - "price":4.2119, - "amount":32.01745135, - "price_int":"421190", - "amount_int":"3201745135", - "stamp":"1325272674444111" - }, - { - "price":4.21211, - "amount":500, - "price_int":"421211", - "amount_int":"50000000000", - "stamp":"1328034206835873" - }, - { - "price":4.214, - "amount":0.20973206, - "price_int":"421400", - "amount_int":"20973206", - "stamp":"1325619825746811" - }, - { - "price":4.215, - "amount":110.1274306, - "price_int":"421500", - "amount_int":"11012743060", - "stamp":"1325524199568858" - }, - { - "price":4.21569, - "amount":0.04583323, - "price_int":"421569", - "amount_int":"4583323", - "stamp":"1325535027174498" - }, - { - "price":4.2162, - "amount":0.0202, - "price_int":"421620", - "amount_int":"2020000", - "stamp":"1327573024725585" - }, - { - "price":4.217, - "amount":0.00315864, - "price_int":"421700", - "amount_int":"315864", - "stamp":"1328240906388799" - }, - { - "price":4.21775, - "amount":11.2440725, - "price_int":"421775", - "amount_int":"1124407250", - "stamp":"1326989931806600" - }, - { - "price":4.22, - "amount":1.01, - "price_int":"422000", - "amount_int":"101000000", - "stamp":"1327318422625024" - }, - { - "price":4.2218, - "amount":0.71059738, - "price_int":"422180", - "amount_int":"71059738", - "stamp":"1328449251882666" - }, - { - "price":4.2238, - "amount":0.20973325, - "price_int":"422380", - "amount_int":"20973325", - "stamp":"1325619824181852" - }, - { - "price":4.22549, - "amount":0.04582864, - "price_int":"422549", - "amount_int":"4582864", - "stamp":"1325535025110025" - }, - { - "price":4.23, - "amount":19.01, - "price_int":"423000", - "amount_int":"1901000000", - "stamp":"1327983137405580" - }, - { - "price":4.23105, - "amount":1.94286876, - "price_int":"423105", - "amount_int":"194286876", - "stamp":"1325166129648841" - }, - { - "price":4.23126, - "amount":0.0202, - "price_int":"423126", - "amount_int":"2020000", - "stamp":"1327573020389068" - }, - { - "price":4.2323, - "amount":0.70883444, - "price_int":"423230", - "amount_int":"70883444", - "stamp":"1328449249471671" - }, - { - "price":4.2336, - "amount":0.20973448, - "price_int":"423360", - "amount_int":"20973448", - "stamp":"1325619822481363" - }, - { - "price":4.23529, - "amount":0.04582507, - "price_int":"423529", - "amount_int":"4582507", - "stamp":"1325535022988229" - }, - { - "price":4.23581, - "amount":12.83483442, - "price_int":"423581", - "amount_int":"1283483442", - "stamp":"1326985826484630" - }, - { - "price":4.23688, - "amount":50.06649468, - "price_int":"423688", - "amount_int":"5006649468", - "stamp":"1326842744669141" - }, - { - "price":4.23706, - "amount":2, - "price_int":"423706", - "amount_int":"200000000", - "stamp":"1326885582798387" - }, - { - "price":4.24, - "amount":0.97556839, - "price_int":"424000", - "amount_int":"97556839", - "stamp":"1328561270038833" - }, - { - "price":4.2429, - "amount":0.70706357, - "price_int":"424290", - "amount_int":"70706357", - "stamp":"1328449248391303" - }, - { - "price":4.2434, - "amount":0.20975508, - "price_int":"424340", - "amount_int":"20975508", - "stamp":"1325619820795069" - }, - { - "price":4.244, - "amount":0.10439, - "price_int":"424400", - "amount_int":"10439000", - "stamp":"1327526402187114" - }, - { - "price":4.2451, - "amount":0.045821, - "price_int":"424510", - "amount_int":"4582100", - "stamp":"1325535019671320" - }, - { - "price":4.24632, - "amount":0.0202, - "price_int":"424632", - "amount_int":"2020000", - "stamp":"1327573015599684" - }, - { - "price":4.24756, - "amount":6, - "price_int":"424756", - "amount_int":"600000000", - "stamp":"1325116059338311" - }, - { - "price":4.25, - "amount":129.51, - "price_int":"425000", - "amount_int":"12951000000", - "stamp":"1328628374858315" - }, - { - "price":4.25153, - "amount":19.37, - "price_int":"425153", - "amount_int":"1937000000", - "stamp":"1325169202818877" - }, - { - "price":4.253, - "amount":25, - "price_int":"425300", - "amount_int":"2500000000", - "stamp":"1326727783145384" - }, - { - "price":4.2532, - "amount":0.20977566, - "price_int":"425320", - "amount_int":"20977566", - "stamp":"1325619819224834" - }, - { - "price":4.2535, - "amount":0.70530152, - "price_int":"425350", - "amount_int":"70530152", - "stamp":"1328449247931244" - }, - { - "price":4.2549, - "amount":0.04581783, - "price_int":"425490", - "amount_int":"4581783", - "stamp":"1325535017295064" - }, - { - "price":4.26, - "amount":10.39707, - "price_int":"426000", - "amount_int":"1039707000", - "stamp":"1327757579644159" - }, - { - "price":4.26138, - "amount":0.0202, - "price_int":"426138", - "amount_int":"2020000", - "stamp":"1327573012440291" - }, - { - "price":4.262, - "amount":0.46926325, - "price_int":"426200", - "amount_int":"46926325", - "stamp":"1325145220449455" - }, - { - "price":4.263, - "amount":0.20979621, - "price_int":"426300", - "amount_int":"20979621", - "stamp":"1325619817683961" - }, - { - "price":4.2641, - "amount":0.70354823, - "price_int":"426410", - "amount_int":"70354823", - "stamp":"1328449247573759" - }, - { - "price":4.26465, - "amount":1.41155, - "price_int":"426465", - "amount_int":"141155000", - "stamp":"1327647945404056" - }, - { - "price":4.26471, - "amount":0.04581348, - "price_int":"426471", - "amount_int":"4581348", - "stamp":"1325535014240321" - }, - { - "price":4.27, - "amount":10.01, - "price_int":"427000", - "amount_int":"1001000000", - "stamp":"1327318433770838" - }, - { - "price":4.2728, - "amount":0.20981674, - "price_int":"427280", - "amount_int":"20981674", - "stamp":"1325619816147329" - }, - { - "price":4.27451, - "amount":0.04581015, - "price_int":"427451", - "amount_int":"4581015", - "stamp":"1325535010653974" - }, - { - "price":4.2747, - "amount":0.70180364, - "price_int":"427470", - "amount_int":"70180364", - "stamp":"1328449247244085" - }, - { - "price":4.27644, - "amount":0.0202, - "price_int":"427644", - "amount_int":"2020000", - "stamp":"1327573009229601" - }, - { - "price":4.277, - "amount":11.6904, - "price_int":"427700", - "amount_int":"1169040000", - "stamp":"1328129003999320" - }, - { - "price":4.28, - "amount":0.01, - "price_int":"428000", - "amount_int":"1000000", - "stamp":"1327318436803580" - }, - { - "price":4.2826, - "amount":0.20985657, - "price_int":"428260", - "amount_int":"20985657", - "stamp":"1325619814556398" - }, - { - "price":4.28431, - "amount":0.04580519, - "price_int":"428431", - "amount_int":"4580519", - "stamp":"1325535008725394" - }, - { - "price":4.28496, - "amount":0.46278, - "price_int":"428496", - "amount_int":"46278000", - "stamp":"1328568254020921" - }, - { - "price":4.2854, - "amount":0.70005134, - "price_int":"428540", - "amount_int":"70005134", - "stamp":"1328449246798650" - }, - { - "price":4.28841, - "amount":30, - "price_int":"428841", - "amount_int":"3000000000", - "stamp":"1325334851787029" - }, - { - "price":4.29, - "amount":99.01, - "price_int":"429000", - "amount_int":"9901000000", - "stamp":"1327621790397034" - }, - { - "price":4.29149, - "amount":0.0202, - "price_int":"429149", - "amount_int":"2020000", - "stamp":"1327573006194758" - }, - { - "price":4.2924, - "amount":0.20989633, - "price_int":"429240", - "amount_int":"20989633", - "stamp":"1325619812866793" - }, - { - "price":4.29412, - "amount":0.04580128, - "price_int":"429412", - "amount_int":"4580128", - "stamp":"1325535006995747" - }, - { - "price":4.2961, - "amount":0.69830777, - "price_int":"429610", - "amount_int":"69830777", - "stamp":"1328449246336196" - }, - { - "price":4.29884, - "amount":303.47645411, - "price_int":"429884", - "amount_int":"30347645411", - "stamp":"1328395505927820" - }, - { - "price":4.3, - "amount":225.61626976, - "price_int":"430000", - "amount_int":"22561626976", - "stamp":"1328579166030683" - }, - { - "price":4.3022, - "amount":0.209936, - "price_int":"430220", - "amount_int":"20993600", - "stamp":"1325619811149695" - }, - { - "price":4.30392, - "amount":0.04579938, - "price_int":"430392", - "amount_int":"4579938", - "stamp":"1325535005105204" - }, - { - "price":4.304, - "amount":1.3, - "price_int":"430400", - "amount_int":"130000000", - "stamp":"1328330774322394" - }, - { - "price":4.3041, - "amount":5, - "price_int":"430410", - "amount_int":"500000000", - "stamp":"1325730642540056" - }, - { - "price":4.30655, - "amount":0.0202, - "price_int":"430655", - "amount_int":"2020000", - "stamp":"1327573002431595" - }, - { - "price":4.30677, - "amount":0.92529, - "price_int":"430677", - "amount_int":"92529000", - "stamp":"1328638814754082" - }, - { - "price":4.3068, - "amount":0.69657286, - "price_int":"430680", - "amount_int":"69657286", - "stamp":"1328449245988210" - }, - { - "price":4.31, - "amount":0.01, - "price_int":"431000", - "amount_int":"1000000", - "stamp":"1327318448804292" - }, - { - "price":4.311, - "amount":52.5, - "price_int":"431100", - "amount_int":"5250000000", - "stamp":"1328132700379735" - }, - { - "price":4.312, - "amount":0.20923249, - "price_int":"431200", - "amount_int":"20923249", - "stamp":"1325619809457134" - }, - { - "price":4.31373, - "amount":0.04579931, - "price_int":"431373", - "amount_int":"4579931", - "stamp":"1325535002092740" - }, - { - "price":4.3175, - "amount":0.69484655, - "price_int":"431750", - "amount_int":"69484655", - "stamp":"1328449245742330" - }, - { - "price":4.32, - "amount":50.01, - "price_int":"432000", - "amount_int":"5001000000", - "stamp":"1327318452114860" - }, - { - "price":4.32161, - "amount":0.0202, - "price_int":"432161", - "amount_int":"2020000", - "stamp":"1327572999008690" - }, - { - "price":4.3218, - "amount":0.20925441, - "price_int":"432180", - "amount_int":"20925441", - "stamp":"1325619807809572" - }, - { - "price":4.32353, - "amount":0.04579662, - "price_int":"432353", - "amount_int":"4579662", - "stamp":"1325534998985693" - }, - { - "price":4.32613, - "amount":75.5, - "price_int":"432613", - "amount_int":"7550000000", - "stamp":"1327625955154848" - }, - { - "price":4.32658, - "amount":0.10069, - "price_int":"432658", - "amount_int":"10069000", - "stamp":"1325747992921164" - }, - { - "price":4.32824, - "amount":0.44323, - "price_int":"432824", - "amount_int":"44323000", - "stamp":"1328568844438365" - }, - { - "price":4.3283, - "amount":0.69311277, - "price_int":"432830", - "amount_int":"69311277", - "stamp":"1328449245496647" - }, - { - "price":4.33, - "amount":1.51, - "price_int":"433000", - "amount_int":"151000000", - "stamp":"1327318455419033" - }, - { - "price":4.33077, - "amount":0.95957, - "price_int":"433077", - "amount_int":"95957000", - "stamp":"1328464566722549" - }, - { - "price":4.3316, - "amount":0.20927631, - "price_int":"433160", - "amount_int":"20927631", - "stamp":"1325619806108495" - }, - { - "price":4.33333, - "amount":0.04579435, - "price_int":"433333", - "amount_int":"4579435", - "stamp":"1325534997117015" - }, - { - "price":4.33434, - "amount":13.8474, - "price_int":"433434", - "amount_int":"1384740000", - "stamp":"1325337886439191" - }, - { - "price":4.33667, - "amount":0.0202, - "price_int":"433667", - "amount_int":"2020000", - "stamp":"1327572996284166" - }, - { - "price":4.3391, - "amount":0.69138761, - "price_int":"433910", - "amount_int":"69138761", - "stamp":"1328449245135033" - }, - { - "price":4.34, - "amount":2036.34387096, - "price_int":"434000", - "amount_int":"203634387096", - "stamp":"1327592508378037" - }, - { - "price":4.3414, - "amount":0.20929818, - "price_int":"434140", - "amount_int":"20929818", - "stamp":"1325619804467638" - }, - { - "price":4.343, - "amount":0.2013, - "price_int":"434300", - "amount_int":"20130000", - "stamp":"1328483209110129" - }, - { - "price":4.34314, - "amount":0.04579117, - "price_int":"434314", - "amount_int":"4579117", - "stamp":"1325534994637576" - }, - { - "price":4.3499, - "amount":0.68967103, - "price_int":"434990", - "amount_int":"68967103", - "stamp":"1328449244699911" - }, - { - "price":4.35, - "amount":210.52890459, - "price_int":"435000", - "amount_int":"21052890459", - "stamp":"1327540652984040" - }, - { - "price":4.35027, - "amount":0.77197, - "price_int":"435027", - "amount_int":"77197000", - "stamp":"1328565863169968" - }, - { - "price":4.3512, - "amount":0.20932002, - "price_int":"435120", - "amount_int":"20932002", - "stamp":"1325619802850821" - }, - { - "price":4.35173, - "amount":0.0202, - "price_int":"435173", - "amount_int":"2020000", - "stamp":"1327572992286027" - }, - { - "price":4.3524, - "amount":0.33239, - "price_int":"435240", - "amount_int":"33239000", - "stamp":"1328507207592102" - }, - { - "price":4.35294, - "amount":0.0457881, - "price_int":"435294", - "amount_int":"4578810", - "stamp":"1325534992376934" - }, - { - "price":4.35383, - "amount":0.45217, - "price_int":"435383", - "amount_int":"45217000", - "stamp":"1327750593282306" - }, - { - "price":4.35753, - "amount":0.01009471, - "price_int":"435753", - "amount_int":"1009471", - "stamp":"1325334088844061" - }, - { - "price":4.36, - "amount":0.01, - "price_int":"436000", - "amount_int":"1000000", - "stamp":"1327318460839684" - }, - { - "price":4.3608, - "amount":0.68794717, - "price_int":"436080", - "amount_int":"68794717", - "stamp":"1328449244275895" - }, - { - "price":4.361, - "amount":715.94773669, - "price_int":"436100", - "amount_int":"71594773669", - "stamp":"1328566593879619" - }, - { - "price":4.36275, - "amount":0.04578574, - "price_int":"436275", - "amount_int":"4578574", - "stamp":"1325534990565091" - }, - { - "price":4.36678, - "amount":0.0202, - "price_int":"436678", - "amount_int":"2020000", - "stamp":"1327572986560168" - }, - { - "price":4.37, - "amount":4.01, - "price_int":"437000", - "amount_int":"401000000", - "stamp":"1327318464565063" - }, - { - "price":4.3708, - "amount":0.20936361, - "price_int":"437080", - "amount_int":"20936361", - "stamp":"1325619799745753" - }, - { - "price":4.3717, - "amount":0.6862319, - "price_int":"437170", - "amount_int":"68623190", - "stamp":"1328449243956248" - }, - { - "price":4.37196, - "amount":0.42388, - "price_int":"437196", - "amount_int":"42388000", - "stamp":"1328568844865266" - }, - { - "price":4.37255, - "amount":0.04578429, - "price_int":"437255", - "amount_int":"4578429", - "stamp":"1325535162610703" - }, - { - "price":4.37333, - "amount":1.55724, - "price_int":"437333", - "amount_int":"155724000", - "stamp":"1326840594107761" - }, - { - "price":4.37677, - "amount":0.02079267, - "price_int":"437677", - "amount_int":"2079267", - "stamp":"1325334831838161" - }, - { - "price":4.3779, - "amount":3.01117338, - "price_int":"437790", - "amount_int":"301117338", - "stamp":"1325334101029280" - }, - { - "price":4.378, - "amount":3.52334398, - "price_int":"437800", - "amount_int":"352334398", - "stamp":"1325334104101929" - }, - { - "price":4.38, - "amount":0.01, - "price_int":"438000", - "amount_int":"1000000", - "stamp":"1327318466871825" - }, - { - "price":4.38052, - "amount":145, - "price_int":"438052", - "amount_int":"14500000000", - "stamp":"1327670967915596" - }, - { - "price":4.3806, - "amount":0.20938536, - "price_int":"438060", - "amount_int":"20938536", - "stamp":"1325619798277593" - }, - { - "price":4.38184, - "amount":0.0202, - "price_int":"438184", - "amount_int":"2020000", - "stamp":"1327572981873655" - }, - { - "price":4.38235, - "amount":0.04578073, - "price_int":"438235", - "amount_int":"4578073", - "stamp":"1325535160432114" - }, - { - "price":4.3826, - "amount":0.68452517, - "price_int":"438260", - "amount_int":"68452517", - "stamp":"1328449243714401" - }, - { - "price":4.38416, - "amount":100, - "price_int":"438416", - "amount_int":"10000000000", - "stamp":"1328577012586621" - }, - { - "price":4.38627, - "amount":0.41116, - "price_int":"438627", - "amount_int":"41116000", - "stamp":"1328459376924385" - }, - { - "price":4.38924, - "amount":0.0207893, - "price_int":"438924", - "amount_int":"2078930", - "stamp":"1325334828743999" - }, - { - "price":4.39, - "amount":102.10728018, - "price_int":"439000", - "amount_int":"10210728018", - "stamp":"1327621781660265" - }, - { - "price":4.3904, - "amount":0.20940709, - "price_int":"439040", - "amount_int":"20940709", - "stamp":"1325619796697650" - }, - { - "price":4.39216, - "amount":0.04577568, - "price_int":"439216", - "amount_int":"4577568", - "stamp":"1325535157928037" - }, - { - "price":4.3935, - "amount":0.6828269, - "price_int":"439350", - "amount_int":"68282690", - "stamp":"1328449243466112" - }, - { - "price":4.394, - "amount":22.7583, - "price_int":"439400", - "amount_int":"2275830000", - "stamp":"1325376516046945" - }, - { - "price":4.39421, - "amount":0.73876, - "price_int":"439421", - "amount_int":"73876000", - "stamp":"1328565863627459" - }, - { - "price":4.39636, - "amount":0.31872, - "price_int":"439636", - "amount_int":"31872000", - "stamp":"1328507516070026" - }, - { - "price":4.3969, - "amount":0.0202, - "price_int":"439690", - "amount_int":"2020000", - "stamp":"1327572978230533" - }, - { - "price":4.39918, - "amount":0.04993, - "price_int":"439918", - "amount_int":"4993000", - "stamp":"1328642963611518" - }, - { - "price":4.39992, - "amount":1.24018, - "price_int":"439992", - "amount_int":"124018000", - "stamp":"1328506592402718" - }, - { - "price":4.4, - "amount":2241.49364318, - "price_int":"440000", - "amount_int":"224149364318", - "stamp":"1327654306227782" - }, - { - "price":4.4001, - "amount":500, - "price_int":"440010", - "amount_int":"50000000000", - "stamp":"1328100522582909" - }, - { - "price":4.4002, - "amount":0.20940957, - "price_int":"440020", - "amount_int":"20940957", - "stamp":"1325619795127087" - }, - { - "price":4.40171, - "amount":0.02080013, - "price_int":"440171", - "amount_int":"2080013", - "stamp":"1325342838949771" - }, - { - "price":4.40196, - "amount":0.04577055, - "price_int":"440196", - "amount_int":"4577055", - "stamp":"1325535156065088" - }, - { - "price":4.40379, - "amount":0.02079684, - "price_int":"440379", - "amount_int":"2079684", - "stamp":"1325334835149005" - }, - { - "price":4.404, - "amount":1.3, - "price_int":"440400", - "amount_int":"130000000", - "stamp":"1328330768452361" - }, - { - "price":4.4045, - "amount":0.68112158, - "price_int":"440450", - "amount_int":"68112158", - "stamp":"1328449243188176" - }, - { - "price":4.408, - "amount":0.18735, - "price_int":"440800", - "amount_int":"18735000", - "stamp":"1328595049179234" - }, - { - "price":4.409, - "amount":304, - "price_int":"440900", - "amount_int":"30400000000", - "stamp":"1325421503644005" - }, - { - "price":4.41, - "amount":0.55593856, - "price_int":"441000", - "amount_int":"55593856", - "stamp":"1327318473630869" - }, - { - "price":4.411, - "amount":52.5, - "price_int":"441100", - "amount_int":"5250000000", - "stamp":"1328132697550304" - }, - { - "price":4.41176, - "amount":0.04587318, - "price_int":"441176", - "amount_int":"4587318", - "stamp":"1325535154119743" - }, - { - "price":4.41196, - "amount":0.0202, - "price_int":"441196", - "amount_int":"2020000", - "stamp":"1327572975385122" - }, - { - "price":4.412, - "amount":40, - "price_int":"441200", - "amount_int":"4000000000", - "stamp":"1325684623961828" - }, - { - "price":4.41234, - "amount":14.28113445, - "price_int":"441234", - "amount_int":"1428113445", - "stamp":"1325337856239353" - }, - { - "price":4.41306, - "amount":226.6001, - "price_int":"441306", - "amount_int":"22660010000", - "stamp":"1327384736892195" - }, - { - "price":4.414, - "amount":0.14208, - "price_int":"441400", - "amount_int":"14208000", - "stamp":"1327841012645505" - }, - { - "price":4.41418, - "amount":0.02079439, - "price_int":"441418", - "amount_int":"2079439", - "stamp":"1325342898155393" - }, - { - "price":4.4155, - "amount":0.67942475, - "price_int":"441550", - "amount_int":"67942475", - "stamp":"1328449242934233" - }, - { - "price":4.41612, - "amount":0.40471, - "price_int":"441612", - "amount_int":"40471000", - "stamp":"1328568845301075" - }, - { - "price":4.41696, - "amount":0.00045448, - "price_int":"441696", - "amount_int":"45448", - "stamp":"1325353027239126" - }, - { - "price":4.417, - "amount":1.33546524, - "price_int":"441700", - "amount_int":"133546524", - "stamp":"1327593082287080" - }, - { - "price":4.4198, - "amount":0.51596681, - "price_int":"441980", - "amount_int":"51596681", - "stamp":"1325339856777763" - }, - { - "price":4.42, - "amount":0.01, - "price_int":"442000", - "amount_int":"1000000", - "stamp":"1327318475767303" - }, - { - "price":4.42157, - "amount":0.04586958, - "price_int":"442157", - "amount_int":"4586958", - "stamp":"1325535151935144" - }, - { - "price":4.424, - "amount":0.15871, - "price_int":"442400", - "amount_int":"15871000", - "stamp":"1328075281119312" - }, - { - "price":4.4265, - "amount":2.89983636, - "price_int":"442650", - "amount_int":"289983636", - "stamp":"1328449242633736" - }, - { - "price":4.42665, - "amount":0.02078785, - "price_int":"442665", - "amount_int":"2078785", - "stamp":"1325342930205969" - }, - { - "price":4.42701, - "amount":0.0202, - "price_int":"442701", - "amount_int":"2020000", - "stamp":"1327572971527755" - }, - { - "price":4.4296, - "amount":0.51644084, - "price_int":"442960", - "amount_int":"51644084", - "stamp":"1325341956253289" - }, - { - "price":4.43, - "amount":0.01, - "price_int":"443000", - "amount_int":"1000000", - "stamp":"1327318478455948" - }, - { - "price":4.43077, - "amount":43.52326, - "price_int":"443077", - "amount_int":"4352326000", - "stamp":"1328620900274860" - }, - { - "price":4.43137, - "amount":0.04586618, - "price_int":"443137", - "amount_int":"4586618", - "stamp":"1325535148049397" - }, - { - "price":4.432, - "amount":0.15485, - "price_int":"443200", - "amount_int":"15485000", - "stamp":"1328049556662185" - }, - { - "price":4.43215, - "amount":5, - "price_int":"443215", - "amount_int":"500000000", - "stamp":"1328466320702882" - }, - { - "price":4.4375, - "amount":0.67605634, - "price_int":"443750", - "amount_int":"67605634", - "stamp":"1328449242162075" - }, - { - "price":4.43787, - "amount":0.02172379, - "price_int":"443787", - "amount_int":"2172379", - "stamp":"1325341961797742" - }, - { - "price":4.4386, - "amount":0.70588, - "price_int":"443860", - "amount_int":"70588000", - "stamp":"1328565864088280" - }, - { - "price":4.43912, - "amount":0.0207796, - "price_int":"443912", - "amount_int":"2077960", - "stamp":"1325343102012521" - }, - { - "price":4.4394, - "amount":0.51636435, - "price_int":"443940", - "amount_int":"51636435", - "stamp":"1325341953220476" - }, - { - "price":4.44, - "amount":16.67, - "price_int":"444000", - "amount_int":"1667000000", - "stamp":"1327318480823682" - }, - { - "price":4.44015, - "amount":10, - "price_int":"444015", - "amount_int":"1000000000", - "stamp":"1325352408251776" - }, - { - "price":4.44077, - "amount":0.3052, - "price_int":"444077", - "amount_int":"30520000", - "stamp":"1328507516558081" - }, - { - "price":4.44118, - "amount":0.045864, - "price_int":"444118", - "amount_int":"4586400", - "stamp":"1325535146188256" - }, - { - "price":4.44207, - "amount":0.0202, - "price_int":"444207", - "amount_int":"2020000", - "stamp":"1327572967528041" - }, - { - "price":4.44362, - "amount":0.04782, - "price_int":"444362", - "amount_int":"4782000", - "stamp":"1328643284273459" - }, - { - "price":4.44436, - "amount":1.18706, - "price_int":"444436", - "amount_int":"118706000", - "stamp":"1328506912085143" - }, - { - "price":4.445, - "amount":27, - "price_int":"444500", - "amount_int":"2700000000", - "stamp":"1327133574182780" - }, - { - "price":4.44773, - "amount":0.02171498, - "price_int":"444773", - "amount_int":"2171498", - "stamp":"1325341959211805" - }, - { - "price":4.4486, - "amount":0.67436946, - "price_int":"444860", - "amount_int":"67436946", - "stamp":"1328449241734806" - }, - { - "price":4.4492, - "amount":0.51628802, - "price_int":"444920", - "amount_int":"51628802", - "stamp":"1325341950212058" - }, - { - "price":4.45, - "amount":102.21840224, - "price_int":"445000", - "amount_int":"10221840224", - "stamp":"1326839393091978" - }, - { - "price":4.45098, - "amount":0.04586202, - "price_int":"445098", - "amount_int":"4586202", - "stamp":"1325535144294344" - }, - { - "price":4.45158, - "amount":0.02076984, - "price_int":"445158", - "amount_int":"2076984", - "stamp":"1325343136485420" - }, - { - "price":4.45337, - "amount":28.5, - "price_int":"445337", - "amount_int":"2850000000", - "stamp":"1327924854642955" - }, - { - "price":4.45464, - "amount":50, - "price_int":"445464", - "amount_int":"5000000000", - "stamp":"1326884380083572" - }, - { - "price":4.45713, - "amount":0.0202, - "price_int":"445713", - "amount_int":"2020000", - "stamp":"1327572964673109" - }, - { - "price":4.45759, - "amount":0.0217, - "price_int":"445759", - "amount_int":"2170000", - "stamp":"1325341943234974" - }, - { - "price":4.459, - "amount":0.51612921, - "price_int":"445900", - "amount_int":"51612921", - "stamp":"1325341990468557" - }, - { - "price":4.4597, - "amount":0.67269099, - "price_int":"445970", - "amount_int":"67269099", - "stamp":"1328449241108791" - }, - { - "price":4.46, - "amount":346.37999999, - "price_int":"446000", - "amount_int":"34637999999", - "stamp":"1327632114272434" - }, - { - "price":4.46073, - "amount":0.38574, - "price_int":"446073", - "amount_int":"38574000", - "stamp":"1328568845749093" - }, - { - "price":4.46078, - "amount":0.04586015, - "price_int":"446078", - "amount_int":"4586015", - "stamp":"1325535140666792" - }, - { - "price":4.46405, - "amount":0.02076139, - "price_int":"446405", - "amount_int":"2076139", - "stamp":"1325347302317890" - }, - { - "price":4.46609, - "amount":219.47863247, - "price_int":"446609", - "amount_int":"21947863247", - "stamp":"1328564836328450" - }, - { - "price":4.46746, - "amount":0.02169473, - "price_int":"446746", - "amount_int":"2169473", - "stamp":"1325341941184017" - }, - { - "price":4.46749, - "amount":210.80275981, - "price_int":"446749", - "amount_int":"21080275981", - "stamp":"1327905153419291" - }, - { - "price":4.4688, - "amount":0.5160533, - "price_int":"446880", - "amount_int":"51605330", - "stamp":"1325342718258447" - }, - { - "price":4.47, - "amount":0.01, - "price_int":"447000", - "amount_int":"1000000", - "stamp":"1327318485151509" - }, - { - "price":4.47059, - "amount":0.04585836, - "price_int":"447059", - "amount_int":"4585836", - "stamp":"1325535136876242" - }, - { - "price":4.4708, - "amount":0.67102085, - "price_int":"447080", - "amount_int":"67102085", - "stamp":"1328449240418469" - }, - { - "price":4.47219, - "amount":0.0202, - "price_int":"447219", - "amount_int":"2020000", - "stamp":"1327572961013253" - }, - { - "price":4.47652, - "amount":0.02076055, - "price_int":"447652", - "amount_int":"2076055", - "stamp":"1325347300030318" - }, - { - "price":4.47732, - "amount":0.02168593, - "price_int":"447732", - "amount_int":"2168593", - "stamp":"1325341938920126" - }, - { - "price":4.478, - "amount":0.26631, - "price_int":"447800", - "amount_int":"26631000", - "stamp":"1328162195950970" - }, - { - "price":4.4786, - "amount":0.51599825, - "price_int":"447860", - "amount_int":"51599825", - "stamp":"1325342832052931" - }, - { - "price":4.48, - "amount":0.01, - "price_int":"448000", - "amount_int":"1000000", - "stamp":"1327318487506548" - }, - { - "price":4.48039, - "amount":0.04585637, - "price_int":"448039", - "amount_int":"4585637", - "stamp":"1325535134991306" - }, - { - "price":4.481, - "amount":1, - "price_int":"448100", - "amount_int":"100000000", - "stamp":"1325385085428872" - }, - { - "price":4.482, - "amount":0.66934404, - "price_int":"448200", - "amount_int":"66934404", - "stamp":"1328449240074937" - }, - { - "price":4.48344, - "amount":0.67333, - "price_int":"448344", - "amount_int":"67333000", - "stamp":"1328565864535492" - }, - { - "price":4.48563, - "amount":0.2918, - "price_int":"448563", - "amount_int":"29180000", - "stamp":"1328507517163571" - }, - { - "price":4.48718, - "amount":0.02167824, - "price_int":"448718", - "amount_int":"2167824", - "stamp":"1325341990647849" - }, - { - "price":4.48725, - "amount":0.0202, - "price_int":"448725", - "amount_int":"2020000", - "stamp":"1327572956996624" - }, - { - "price":4.4884, - "amount":0.51592274, - "price_int":"448840", - "amount_int":"51592274", - "stamp":"1325343245266852" - }, - { - "price":4.4885, - "amount":0.04572, - "price_int":"448850", - "amount_int":"4572000", - "stamp":"1328643284726859" - }, - { - "price":4.48899, - "amount":0.0207491, - "price_int":"448899", - "amount_int":"2074910", - "stamp":"1325347297590044" - }, - { - "price":4.48926, - "amount":1.13447, - "price_int":"448926", - "amount_int":"113447000", - "stamp":"1328506913651061" - }, - { - "price":4.49, - "amount":106.15866146, - "price_int":"449000", - "amount_int":"10615866146", - "stamp":"1327621777205616" - }, - { - "price":4.4902, - "amount":0.04585368, - "price_int":"449020", - "amount_int":"4585368", - "stamp":"1325535131613279" - }, - { - "price":4.491, - "amount":0.19155, - "price_int":"449100", - "amount_int":"19155000", - "stamp":"1328519383768591" - }, - { - "price":4.49231, - "amount":0.12911, - "price_int":"449231", - "amount_int":"12911000", - "stamp":"1328234517614262" - }, - { - "price":4.4932, - "amount":0.6676756, - "price_int":"449320", - "amount_int":"66767560", - "stamp":"1328449239708517" - }, - { - "price":4.49704, - "amount":0.02167114, - "price_int":"449704", - "amount_int":"2167114", - "stamp":"1325342717793929" - }, - { - "price":4.4982, - "amount":0.51583011, - "price_int":"449820", - "amount_int":"51583011", - "stamp":"1325343242189061" - }, - { - "price":4.5, - "amount":9869.23353803, - "price_int":"450000", - "amount_int":"986923353803", - "stamp":"1328628324187426" - }, - { - "price":4.5001, - "amount":114, - "price_int":"450010", - "amount_int":"11400000000", - "stamp":"1327636451249061" - }, - { - "price":4.5002, - "amount":25, - "price_int":"450020", - "amount_int":"2500000000", - "stamp":"1328509544507335" - }, - { - "price":4.50025, - "amount":6.22498972, - "price_int":"450025", - "amount_int":"622498972", - "stamp":"1325616513162015" - }, - { - "price":4.50146, - "amount":0.02074302, - "price_int":"450146", - "amount_int":"2074302", - "stamp":"1325351104643122" - }, - { - "price":4.50172, - "amount":0.24854, - "price_int":"450172", - "amount_int":"24854000", - "stamp":"1328132526557688" - }, - { - "price":4.502, - "amount":11, - "price_int":"450200", - "amount_int":"1100000000", - "stamp":"1327970584716183" - }, - { - "price":4.5023, - "amount":0.0202, - "price_int":"450230", - "amount_int":"2020000", - "stamp":"1327572953856110" - }, - { - "price":4.504, - "amount":1.3, - "price_int":"450400", - "amount_int":"130000000", - "stamp":"1328330758386441" - }, - { - "price":4.5044, - "amount":0.66601545, - "price_int":"450440", - "amount_int":"66601545", - "stamp":"1328449239365175" - }, - { - "price":4.50446, - "amount":0.08497355, - "price_int":"450446", - "amount_int":"8497355", - "stamp":"1327976330190326" - }, - { - "price":4.505, - "amount":1.88720728, - "price_int":"450500", - "amount_int":"188720728", - "stamp":"1328012938743141" - }, - { - "price":4.50579, - "amount":0.36696, - "price_int":"450579", - "amount_int":"36696000", - "stamp":"1328568846200986" - }, - { - "price":4.5069, - "amount":0.0216601, - "price_int":"450690", - "amount_int":"2166010", - "stamp":"1325342829653108" - }, - { - "price":4.508, - "amount":0.51573935, - "price_int":"450800", - "amount_int":"51573935", - "stamp":"1325343239008260" - }, - { - "price":4.50877, - "amount":50, - "price_int":"450877", - "amount_int":"5000000000", - "stamp":"1327585048723641" - }, - { - "price":4.5098, - "amount":0.04574509, - "price_int":"450980", - "amount_int":"4574509", - "stamp":"1325535127537695" - }, - { - "price":4.51, - "amount":439.14298469, - "price_int":"451000", - "amount_int":"43914298469", - "stamp":"1328637449831609" - }, - { - "price":4.51013, - "amount":27.1327, - "price_int":"451013", - "amount_int":"2713270000", - "stamp":"1326865457009185" - }, - { - "price":4.511, - "amount":52.5, - "price_int":"451100", - "amount_int":"5250000000", - "stamp":"1328132694225820" - }, - { - "price":4.512, - "amount":11.0816, - "price_int":"451200", - "amount_int":"1108160000", - "stamp":"1328128872691813" - }, - { - "price":4.5123, - "amount":0.3, - "price_int":"451230", - "amount_int":"30000000", - "stamp":"1326898502052087" - }, - { - "price":4.513, - "amount":25, - "price_int":"451300", - "amount_int":"2500000000", - "stamp":"1327593591656342" - }, - { - "price":4.51393, - "amount":0.0207321, - "price_int":"451393", - "amount_int":"2073210", - "stamp":"1325379665604136" - }, - { - "price":4.5156, - "amount":0.66436354, - "price_int":"451560", - "amount_int":"66436354", - "stamp":"1328449239100507" - }, - { - "price":4.51677, - "amount":0.02164815, - "price_int":"451677", - "amount_int":"2164815", - "stamp":"1325343247030355" - }, - { - "price":4.51699, - "amount":10.05, - "price_int":"451699", - "amount_int":"1005000000", - "stamp":"1328577028034124" - }, - { - "price":4.51736, - "amount":0.0202, - "price_int":"451736", - "amount_int":"2020000", - "stamp":"1327572950966671" - }, - { - "price":4.5178, - "amount":0.46517708, - "price_int":"451780", - "amount_int":"46517708", - "stamp":"1325344477875819" - }, - { - "price":4.51961, - "amount":0.04574118, - "price_int":"451961", - "amount_int":"4574118", - "stamp":"1325535125489615" - }, - { - "price":4.52, - "amount":117.4634292, - "price_int":"452000", - "amount_int":"11746342920", - "stamp":"1327644490942319" - }, - { - "price":4.52155, - "amount":8.8124, - "price_int":"452155", - "amount_int":"881240000", - "stamp":"1325352671551638" - }, - { - "price":4.522, - "amount":10, - "price_int":"452200", - "amount_int":"1000000000", - "stamp":"1327638015147313" - }, - { - "price":4.52663, - "amount":0.02163302, - "price_int":"452663", - "amount_int":"2163302", - "stamp":"1325343244863271" - }, - { - "price":4.5269, - "amount":0.66270516, - "price_int":"452690", - "amount_int":"66270516", - "stamp":"1328449238742887" - }, - { - "price":4.5276, - "amount":0.46508281, - "price_int":"452760", - "amount_int":"46508281", - "stamp":"1325344474854015" - }, - { - "price":4.52872, - "amount":0.64111, - "price_int":"452872", - "amount_int":"64111000", - "stamp":"1328565865021235" - }, - { - "price":4.52941, - "amount":0.04573828, - "price_int":"452941", - "amount_int":"4573828", - "stamp":"1325535123583179" - }, - { - "price":4.53, - "amount":38.0658, - "price_int":"453000", - "amount_int":"3806580000", - "stamp":"1328348535657966" - }, - { - "price":4.5307, - "amount":100, - "price_int":"453070", - "amount_int":"10000000000", - "stamp":"1326918072596945" - }, - { - "price":4.53094, - "amount":0.27854, - "price_int":"453094", - "amount_int":"27854000", - "stamp":"1328507517655342" - }, - { - "price":4.53384, - "amount":0.04365, - "price_int":"453384", - "amount_int":"4365000", - "stamp":"1328643285180276" - }, - { - "price":4.5346, - "amount":1.0824, - "price_int":"453460", - "amount_int":"108240000", - "stamp":"1328506914969364" - }, - { - "price":4.5351, - "amount":0.01009471, - "price_int":"453510", - "amount_int":"1009471", - "stamp":"1325342115487952" - }, - { - "price":4.53649, - "amount":0.02165572, - "price_int":"453649", - "amount_int":"2165572", - "stamp":"1325358560188275" - }, - { - "price":4.5371, - "amount":25, - "price_int":"453710", - "amount_int":"2500000000", - "stamp":"1327621866915675" - }, - { - "price":4.5374, - "amount":0.46552732, - "price_int":"453740", - "amount_int":"46552732", - "stamp":"1325358540478942" - }, - { - "price":4.53769, - "amount":0.12399, - "price_int":"453769", - "amount_int":"12399000", - "stamp":"1328234823075987" - }, - { - "price":4.5382, - "amount":0.66105504, - "price_int":"453820", - "amount_int":"66105504", - "stamp":"1328449238398372" - }, - { - "price":4.53846, - "amount":1.91741, - "price_int":"453846", - "amount_int":"191741000", - "stamp":"1328534763016785" - }, - { - "price":4.53887, - "amount":0.02072733, - "price_int":"453887", - "amount_int":"2072733", - "stamp":"1325405039145417" - }, - { - "price":4.53922, - "amount":0.04573277, - "price_int":"453922", - "amount_int":"4573277", - "stamp":"1325535120519107" - }, - { - "price":4.54, - "amount":20.01, - "price_int":"454000", - "amount_int":"2001000000", - "stamp":"1327318501017319" - }, - { - "price":4.54569, - "amount":0.10021, - "price_int":"454569", - "amount_int":"10021000", - "stamp":"1328327969632549" - }, - { - "price":4.54625, - "amount":100, - "price_int":"454625", - "amount_int":"10000000000", - "stamp":"1328576980590876" - }, - { - "price":4.54635, - "amount":0.02164417, - "price_int":"454635", - "amount_int":"2164417", - "stamp":"1325358558071160" - }, - { - "price":4.54683, - "amount":0.32214, - "price_int":"454683", - "amount_int":"32214000", - "stamp":"1328380882008430" - }, - { - "price":4.54719, - "amount":0.2385, - "price_int":"454719", - "amount_int":"23850000", - "stamp":"1328132980901556" - }, - { - "price":4.5472, - "amount":0.46545495, - "price_int":"454720", - "amount_int":"46545495", - "stamp":"1325358537408522" - }, - { - "price":4.54902, - "amount":0.04572745, - "price_int":"454902", - "amount_int":"4572745", - "stamp":"1325535118672317" - }, - { - "price":4.5495, - "amount":0.65941312, - "price_int":"454950", - "amount_int":"65941312", - "stamp":"1328449237966067" - }, - { - "price":4.55, - "amount":491.08840769, - "price_int":"455000", - "amount_int":"49108840769", - "stamp":"1328554214110091" - }, - { - "price":4.5501, - "amount":44.93386518, - "price_int":"455010", - "amount_int":"4493386518", - "stamp":"1327848022535210" - }, - { - "price":4.5509, - "amount":0.0202, - "price_int":"455090", - "amount_int":"2020000", - "stamp":"1327572947506925" - }, - { - "price":4.5513, - "amount":0.34837, - "price_int":"455130", - "amount_int":"34837000", - "stamp":"1328568846643388" - }, - { - "price":4.55134, - "amount":0.02072367, - "price_int":"455134", - "amount_int":"2072367", - "stamp":"1325405035795150" - }, - { - "price":4.55621, - "amount":0.02163171, - "price_int":"455621", - "amount_int":"2163171", - "stamp":"1325358555524665" - }, - { - "price":4.557, - "amount":0.46540726, - "price_int":"455700", - "amount_int":"46540726", - "stamp":"1325358555929629" - }, - { - "price":4.55882, - "amount":0.04572144, - "price_int":"455882", - "amount_int":"4572144", - "stamp":"1325535232594902" - }, - { - "price":4.56, - "amount":2092.4354, - "price_int":"456000", - "amount_int":"209243540000", - "stamp":"1327668582202147" - }, - { - "price":4.5609, - "amount":0.65776491, - "price_int":"456090", - "amount_int":"65776491", - "stamp":"1328449237601287" - }, - { - "price":4.56254, - "amount":0.0202, - "price_int":"456254", - "amount_int":"2020000", - "stamp":"1327572940155650" - }, - { - "price":4.56381, - "amount":0.02072871, - "price_int":"456381", - "amount_int":"2072871", - "stamp":"1325405031981394" - }, - { - "price":4.56601, - "amount":0.0202, - "price_int":"456601", - "amount_int":"2020000", - "stamp":"1327572943591340" - }, - { - "price":4.56607, - "amount":0.02161461, - "price_int":"456607", - "amount_int":"2161461", - "stamp":"1325358552625522" - }, - { - "price":4.5668, - "amount":0.46535418, - "price_int":"456680", - "amount_int":"46535418", - "stamp":"1325359577061769" - }, - { - "price":4.567, - "amount":1.0948, - "price_int":"456700", - "amount_int":"109480000", - "stamp":"1326991427208721" - }, - { - "price":4.56735, - "amount":0.02073059, - "price_int":"456735", - "amount_int":"2073059", - "stamp":"1325405042149393" - }, - { - "price":4.5679, - "amount":100, - "price_int":"456790", - "amount_int":"10000000000", - "stamp":"1327603268373242" - }, - { - "price":4.56863, - "amount":0.04572017, - "price_int":"456863", - "amount_int":"4572017", - "stamp":"1325535230712913" - }, - { - "price":4.56927, - "amount":25.000068, - "price_int":"456927", - "amount_int":"2500006800", - "stamp":"1328427083195771" - }, - { - "price":4.57, - "amount":0.01, - "price_int":"457000", - "amount_int":"1000000", - "stamp":"1327318505333843" - }, - { - "price":4.57041, - "amount":5, - "price_int":"457041", - "amount_int":"500000000", - "stamp":"1325730564987562" - }, - { - "price":4.5723, - "amount":0.65612493, - "price_int":"457230", - "amount_int":"65612493", - "stamp":"1328449237257502" - }, - { - "price":4.57447, - "amount":0.60921, - "price_int":"457447", - "amount_int":"60921000", - "stamp":"1328565865472613" - }, - { - "price":4.57594, - "amount":0.02159742, - "price_int":"457594", - "amount_int":"2159742", - "stamp":"1325358549628406" - }, - { - "price":4.57628, - "amount":0.02073624, - "price_int":"457628", - "amount_int":"2073624", - "stamp":"1325405029048683" - }, - { - "price":4.5766, - "amount":0.46528276, - "price_int":"457660", - "amount_int":"46528276", - "stamp":"1325361747329946" - }, - { - "price":4.5767, - "amount":0.26542, - "price_int":"457670", - "amount_int":"26542000", - "stamp":"1328507518160909" - }, - { - "price":4.57685, - "amount":1.32382, - "price_int":"457685", - "amount_int":"132382000", - "stamp":"1328230588133644" - }, - { - "price":4.57759, - "amount":0.0202, - "price_int":"457759", - "amount_int":"2020000", - "stamp":"1327572937447275" - }, - { - "price":4.57843, - "amount":0.04571386, - "price_int":"457843", - "amount_int":"4571386", - "stamp":"1325535227439669" - }, - { - "price":4.57964, - "amount":0.04161, - "price_int":"457964", - "amount_int":"4161000", - "stamp":"1328643285611548" - }, - { - "price":4.58, - "amount":10.03655676, - "price_int":"458000", - "amount_int":"1003655676", - "stamp":"1327656898298581" - }, - { - "price":4.58041, - "amount":1.03086, - "price_int":"458041", - "amount_int":"103086000", - "stamp":"1328506915468897" - }, - { - "price":4.5806, - "amount":14.5, - "price_int":"458060", - "amount_int":"1450000000", - "stamp":"1327589967419437" - }, - { - "price":4.58345, - "amount":0.0122, - "price_int":"458345", - "amount_int":"1220000", - "stamp":"1328379483302341" - }, - { - "price":4.58352, - "amount":0.11891, - "price_int":"458352", - "amount_int":"11891000", - "stamp":"1328234823511168" - }, - { - "price":4.5837, - "amount":0.6544931, - "price_int":"458370", - "amount_int":"65449310", - "stamp":"1328449236853582" - }, - { - "price":4.5843, - "amount":1.67357, - "price_int":"458430", - "amount_int":"167357000", - "stamp":"1328530965195417" - }, - { - "price":4.5858, - "amount":0.02158356, - "price_int":"458580", - "amount_int":"2158356", - "stamp":"1325358569102683" - }, - { - "price":4.586, - "amount":31.56513737, - "price_int":"458600", - "amount_int":"3156513737", - "stamp":"1328547535095301" - }, - { - "price":4.5864, - "amount":0.46519299, - "price_int":"458640", - "amount_int":"46519299", - "stamp":"1325361851052947" - }, - { - "price":4.58824, - "amount":0.04570766, - "price_int":"458824", - "amount_int":"4570766", - "stamp":"1325535224464615" - }, - { - "price":4.58875, - "amount":0.02072884, - "price_int":"458875", - "amount_int":"2072884", - "stamp":"1325405026193327" - }, - { - "price":4.59, - "amount":0.01, - "price_int":"459000", - "amount_int":"1000000", - "stamp":"1327318510848956" - }, - { - "price":4.59161, - "amount":0.09602, - "price_int":"459161", - "amount_int":"9602000", - "stamp":"1328328293216837" - }, - { - "price":4.59231, - "amount":2.33292, - "price_int":"459231", - "amount_int":"233292000", - "stamp":"1328243508171718" - }, - { - "price":4.59265, - "amount":0.0202, - "price_int":"459265", - "amount_int":"2020000", - "stamp":"1327572933791898" - }, - { - "price":4.59276, - "amount":0.30905, - "price_int":"459276", - "amount_int":"30905000", - "stamp":"1328381183625509" - }, - { - "price":4.59312, - "amount":0.22857, - "price_int":"459312", - "amount_int":"22857000", - "stamp":"1328132981390194" - }, - { - "price":4.59333, - "amount":43.26038781, - "price_int":"459333", - "amount_int":"4326038781", - "stamp":"1325492548850054" - }, - { - "price":4.5951, - "amount":0.65286936, - "price_int":"459510", - "amount_int":"65286936", - "stamp":"1328449236427107" - }, - { - "price":4.59566, - "amount":0.0215694, - "price_int":"459566", - "amount_int":"2156940", - "stamp":"1325359569451687" - }, - { - "price":4.5962, - "amount":0.46510693, - "price_int":"459620", - "amount_int":"46510693", - "stamp":"1325362979460819" - }, - { - "price":4.59727, - "amount":0.32997, - "price_int":"459727", - "amount_int":"32997000", - "stamp":"1328568847080992" - }, - { - "price":4.59779, - "amount":1.06964315, - "price_int":"459779", - "amount_int":"106964315", - "stamp":"1325432491523103" - }, - { - "price":4.59804, - "amount":0.045701, - "price_int":"459804", - "amount_int":"4570100", - "stamp":"1325535222555955" - }, - { - "price":4.6, - "amount":520.09368084, - "price_int":"460000", - "amount_int":"52009368084", - "stamp":"1328547920531288" - }, - { - "price":4.60001, - "amount":0.04786076, - "price_int":"460001", - "amount_int":"4786076", - "stamp":"1327609458078673" - }, - { - "price":4.6001, - "amount":500, - "price_int":"460010", - "amount_int":"50000000000", - "stamp":"1328100471616853" - }, - { - "price":4.60046, - "amount":6.83187, - "price_int":"460046", - "amount_int":"683187000", - "stamp":"1327778148497816" - }, - { - "price":4.60122, - "amount":0.02070812, - "price_int":"460122", - "amount_int":"2070812", - "stamp":"1325405023234802" - }, - { - "price":4.604, - "amount":1.2, - "price_int":"460400", - "amount_int":"120000000", - "stamp":"1328330751291336" - }, - { - "price":4.60502, - "amount":12, - "price_int":"460502", - "amount_int":"1200000000", - "stamp":"1325369540376019" - }, - { - "price":4.60552, - "amount":0.02155394, - "price_int":"460552", - "amount_int":"2155394", - "stamp":"1325361754265938" - }, - { - "price":4.60583, - "amount":1.86445568, - "price_int":"460583", - "amount_int":"186445568", - "stamp":"1327694480304473" - }, - { - "price":4.606, - "amount":0.46500254, - "price_int":"460600", - "amount_int":"46500254", - "stamp":"1325363273096345" - }, - { - "price":4.6066, - "amount":0.65123953, - "price_int":"460660", - "amount_int":"65123953", - "stamp":"1328449236063891" - }, - { - "price":4.60771, - "amount":0.0202, - "price_int":"460771", - "amount_int":"2020000", - "stamp":"1327572930843332" - }, - { - "price":4.60784, - "amount":0.04569095, - "price_int":"460784", - "amount_int":"4569095", - "stamp":"1325535220690164" - }, - { - "price":4.60867, - "amount":5.38748, - "price_int":"460867", - "amount_int":"538748000", - "stamp":"1325358609694925" - }, - { - "price":4.60955, - "amount":11.2287134, - "price_int":"460955", - "amount_int":"1122871340", - "stamp":"1326071990976903" - }, - { - "price":4.61, - "amount":13.01, - "price_int":"461000", - "amount_int":"1301000000", - "stamp":"1327521111643626" - }, - { - "price":4.611, - "amount":703.1181, - "price_int":"461100", - "amount_int":"70311810000", - "stamp":"1328477054790309" - }, - { - "price":4.613, - "amount":0.03931, - "price_int":"461300", - "amount_int":"3931000", - "stamp":"1326861153615628" - }, - { - "price":4.61369, - "amount":0.02088064, - "price_int":"461369", - "amount_int":"2088064", - "stamp":"1325624504067321" - }, - { - "price":4.614, - "amount":1.32, - "price_int":"461400", - "amount_int":"132000000", - "stamp":"1328644715299306" - }, - { - "price":4.615, - "amount":100, - "price_int":"461500", - "amount_int":"10000000000", - "stamp":"1325413953850516" - }, - { - "price":4.61538, - "amount":0.5746506, - "price_int":"461538", - "amount_int":"57465060", - "stamp":"1328135048336369" - }, - { - "price":4.6158, - "amount":0.46500701, - "price_int":"461580", - "amount_int":"46500701", - "stamp":"1325393535787821" - }, - { - "price":4.61765, - "amount":0.06737633, - "price_int":"461765", - "amount_int":"6737633", - "stamp":"1326840772671475" - }, - { - "price":4.6181, - "amount":0.64961781, - "price_int":"461810", - "amount_int":"64961781", - "stamp":"1328449235719375" - }, - { - "price":4.62, - "amount":5.01, - "price_int":"462000", - "amount_int":"501000000", - "stamp":"1327318521292508" - }, - { - "price":4.6201, - "amount":10, - "price_int":"462010", - "amount_int":"1000000000", - "stamp":"1328460461143023" - }, - { - "price":4.6205, - "amount":0.6, - "price_int":"462050", - "amount_int":"60000000", - "stamp":"1326957193178133" - }, - { - "price":4.62067, - "amount":0.57762, - "price_int":"462067", - "amount_int":"57762000", - "stamp":"1328565865929241" - }, - { - "price":4.62277, - "amount":0.0202, - "price_int":"462277", - "amount_int":"2020000", - "stamp":"1327572927374597" - }, - { - "price":4.62293, - "amount":0.25242, - "price_int":"462293", - "amount_int":"25242000", - "stamp":"1328507518678249" - }, - { - "price":4.62308, - "amount":1.2681, - "price_int":"462308", - "amount_int":"126810000", - "stamp":"1328230907757647" - }, - { - "price":4.6231, - "amount":102.1631, - "price_int":"462310", - "amount_int":"10216310000", - "stamp":"1326846058868104" - }, - { - "price":4.62342, - "amount":5, - "price_int":"462342", - "amount_int":"500000000", - "stamp":"1327593914110087" - }, - { - "price":4.624, - "amount":0.13863, - "price_int":"462400", - "amount_int":"13863000", - "stamp":"1327875266062723" - }, - { - "price":4.625, - "amount":0.25269189, - "price_int":"462500", - "amount_int":"25269189", - "stamp":"1327922757896762" - }, - { - "price":4.62525, - "amount":0.02153622, - "price_int":"462525", - "amount_int":"2153622", - "stamp":"1325393191953418" - }, - { - "price":4.6256, - "amount":0.46491818, - "price_int":"462560", - "amount_int":"46491818", - "stamp":"1325393563150656" - }, - { - "price":4.62589, - "amount":0.03958, - "price_int":"462589", - "amount_int":"3958000", - "stamp":"1328643286049054" - }, - { - "price":4.62616, - "amount":0.02087697, - "price_int":"462616", - "amount_int":"2087697", - "stamp":"1325625436957733" - }, - { - "price":4.62667, - "amount":0.97983, - "price_int":"462667", - "amount_int":"97983000", - "stamp":"1328506915967822" - }, - { - "price":4.62745, - "amount":0.06717244, - "price_int":"462745", - "amount_int":"6717244", - "stamp":"1325596925618818" - }, - { - "price":4.62849, - "amount":0.20195, - "price_int":"462849", - "amount_int":"20195000", - "stamp":"1328134875076547" - }, - { - "price":4.6296, - "amount":0.64800415, - "price_int":"462960", - "amount_int":"64800415", - "stamp":"1328449235348680" - }, - { - "price":4.62975, - "amount":0.01011, - "price_int":"462975", - "amount_int":"1011000", - "stamp":"1328458433800616" - }, - { - "price":4.62982, - "amount":0.11389, - "price_int":"462982", - "amount_int":"11389000", - "stamp":"1328234823961809" - }, - { - "price":4.63, - "amount":0.01, - "price_int":"463000", - "amount_int":"1000000", - "stamp":"1327318523948368" - }, - { - "price":4.63061, - "amount":1.61505, - "price_int":"463061", - "amount_int":"161505000", - "stamp":"1328531910456276" - }, - { - "price":4.63077, - "amount":5.87717, - "price_int":"463077", - "amount_int":"587717000", - "stamp":"1328134436600024" - }, - { - "price":4.63078, - "amount":0.83545, - "price_int":"463078", - "amount_int":"83545000", - "stamp":"1328134471713597" - }, - { - "price":4.631, - "amount":8.54658, - "price_int":"463100", - "amount_int":"854658000", - "stamp":"1328200196509641" - }, - { - "price":4.632, - "amount":0.2013, - "price_int":"463200", - "amount_int":"20130000", - "stamp":"1328483200524585" - }, - { - "price":4.63215, - "amount":5, - "price_int":"463215", - "amount_int":"500000000", - "stamp":"1328466315251745" - }, - { - "price":4.63436, - "amount":0.14046, - "price_int":"463436", - "amount_int":"14046000", - "stamp":"1327743092105292" - }, - { - "price":4.63511, - "amount":0.0215186, - "price_int":"463511", - "amount_int":"2151860", - "stamp":"1325393539756180" - }, - { - "price":4.6354, - "amount":0.46484453, - "price_int":"463540", - "amount_int":"46484453", - "stamp":"1325401189442303" - }, - { - "price":4.6366, - "amount":0.128279, - "price_int":"463660", - "amount_int":"12827900", - "stamp":"1325613747082146" - }, - { - "price":4.63725, - "amount":0.06715741, - "price_int":"463725", - "amount_int":"6715741", - "stamp":"1325596969635298" - }, - { - "price":4.63782, - "amount":0.0202, - "price_int":"463782", - "amount_int":"2020000", - "stamp":"1327572922917543" - }, - { - "price":4.63799, - "amount":0.09187, - "price_int":"463799", - "amount_int":"9187000", - "stamp":"1328328293687079" - }, - { - "price":4.63846, - "amount":0.09158, - "price_int":"463846", - "amount_int":"9158000", - "stamp":"1328134336023298" - }, - { - "price":4.63863, - "amount":0.02087416, - "price_int":"463863", - "amount_int":"2087416", - "stamp":"1325625462671976" - }, - { - "price":4.6387, - "amount":2.23456, - "price_int":"463870", - "amount_int":"223456000", - "stamp":"1328243833671789" - }, - { - "price":4.63915, - "amount":0.29609, - "price_int":"463915", - "amount_int":"29609000", - "stamp":"1328381184059934" - }, - { - "price":4.63952, - "amount":0.21873, - "price_int":"463952", - "amount_int":"21873000", - "stamp":"1328132981882032" - }, - { - "price":4.64, - "amount":2670.51122314, - "price_int":"464000", - "amount_int":"267051122314", - "stamp":"1327420678527901" - }, - { - "price":4.641, - "amount":182.9936, - "price_int":"464100", - "amount_int":"18299360000", - "stamp":"1328324461046287" - }, - { - "price":4.6412, - "amount":0.64638456, - "price_int":"464120", - "amount_int":"64638456", - "stamp":"1328449234980306" - }, - { - "price":4.64367, - "amount":20.49008, - "price_int":"464367", - "amount_int":"2049008000", - "stamp":"1328132391757328" - }, - { - "price":4.64371, - "amount":0.31174, - "price_int":"464371", - "amount_int":"31174000", - "stamp":"1328568847531882" - }, - { - "price":4.64422, - "amount":3.5, - "price_int":"464422", - "amount_int":"350000000", - "stamp":"1325706539646937" - }, - { - "price":4.645, - "amount":10, - "price_int":"464500", - "amount_int":"1000000000", - "stamp":"1327637987392733" - }, - { - "price":4.64646, - "amount":2.87948, - "price_int":"464646", - "amount_int":"287948000", - "stamp":"1328135914916648" - }, - { - "price":4.64706, - "amount":0.06807145, - "price_int":"464706", - "amount_int":"6807145", - "stamp":"1326840769757337" - }, - { - "price":4.65, - "amount":259.96263978, - "price_int":"465000", - "amount_int":"25996263978", - "stamp":"1328599964995726" - }, - { - "price":4.65001, - "amount":5, - "price_int":"465001", - "amount_int":"500000000", - "stamp":"1327652015719953" - }, - { - "price":4.6511, - "amount":0.02086701, - "price_int":"465110", - "amount_int":"2086701", - "stamp":"1325625881992820" - }, - { - "price":4.6528, - "amount":0.64477304, - "price_int":"465280", - "amount_int":"64477304", - "stamp":"1328449234534404" - }, - { - "price":4.65288, - "amount":0.0202, - "price_int":"465288", - "amount_int":"2020000", - "stamp":"1327572919137843" - }, - { - "price":4.6544, - "amount":3.82161825, - "price_int":"465440", - "amount_int":"382161825", - "stamp":"1326850147252303" - }, - { - "price":4.655, - "amount":10, - "price_int":"465500", - "amount_int":"1000000000", - "stamp":"1327517255266189" - }, - { - "price":4.65615, - "amount":0.77878, - "price_int":"465615", - "amount_int":"77878000", - "stamp":"1328146660850821" - }, - { - "price":4.65686, - "amount":0.06806201, - "price_int":"465686", - "amount_int":"6806201", - "stamp":"1326840766370451" - }, - { - "price":4.66, - "amount":23.51, - "price_int":"466000", - "amount_int":"2351000000", - "stamp":"1328479008099226" - }, - { - "price":4.6601, - "amount":10, - "price_int":"466010", - "amount_int":"1000000000", - "stamp":"1328460436835331" - }, - { - "price":4.66015, - "amount":2.4186084, - "price_int":"466015", - "amount_int":"241860840", - "stamp":"1326852977222002" - }, - { - "price":4.6616, - "amount":6.8, - "price_int":"466160", - "amount_int":"680000000", - "stamp":"1325597301059367" - }, - { - "price":4.662, - "amount":1.80035, - "price_int":"466200", - "amount_int":"180035000", - "stamp":"1328460585341785" - }, - { - "price":4.66356, - "amount":0.02086544, - "price_int":"466356", - "amount_int":"2086544", - "stamp":"1325628252644374" - }, - { - "price":4.6644, - "amount":0.64316954, - "price_int":"466440", - "amount_int":"64316954", - "stamp":"1328449234185901" - }, - { - "price":4.666, - "amount":229.3163, - "price_int":"466600", - "amount_int":"22931630000", - "stamp":"1328622677130404" - }, - { - "price":4.66667, - "amount":0.06805851, - "price_int":"466667", - "amount_int":"6805851", - "stamp":"1326840763096784" - }, - { - "price":4.66735, - "amount":0.54636, - "price_int":"466735", - "amount_int":"54636000", - "stamp":"1328565866370493" - }, - { - "price":4.66794, - "amount":0.0202, - "price_int":"466794", - "amount_int":"2020000", - "stamp":"1327572916292880" - }, - { - "price":4.66923, - "amount":5.93067, - "price_int":"466923", - "amount_int":"593067000", - "stamp":"1328135853810997" - }, - { - "price":4.66963, - "amount":0.23956, - "price_int":"466963", - "amount_int":"23956000", - "stamp":"1328507519301852" - }, - { - "price":4.66978, - "amount":1.21294, - "price_int":"466978", - "amount_int":"121294000", - "stamp":"1328230908249196" - }, - { - "price":4.67, - "amount":1.01, - "price_int":"467000", - "amount_int":"101000000", - "stamp":"1327318530687672" - }, - { - "price":4.67262, - "amount":0.02779, - "price_int":"467262", - "amount_int":"2779000", - "stamp":"1328643286498115" - }, - { - "price":4.67341, - "amount":0.92931, - "price_int":"467341", - "amount_int":"92931000", - "stamp":"1328506916474425" - }, - { - "price":4.67524, - "amount":0.19381, - "price_int":"467524", - "amount_int":"19381000", - "stamp":"1328135882561510" - }, - { - "price":4.67554, - "amount":0.46791811, - "price_int":"467554", - "amount_int":"46791811", - "stamp":"1326841587350886" - }, - { - "price":4.676, - "amount":0.64157399, - "price_int":"467600", - "amount_int":"64157399", - "stamp":"1328449233558227" - }, - { - "price":4.67603, - "amount":0.02086175, - "price_int":"467603", - "amount_int":"2086175", - "stamp":"1325641519105700" - }, - { - "price":4.67647, - "amount":0.06805489, - "price_int":"467647", - "amount_int":"6805489", - "stamp":"1326840759580151" - }, - { - "price":4.67659, - "amount":0.10892, - "price_int":"467659", - "amount_int":"10892000", - "stamp":"1328234824415277" - }, - { - "price":4.67738, - "amount":1.53332, - "price_int":"467738", - "amount_int":"153332000", - "stamp":"1328532240047893" - }, - { - "price":4.67755, - "amount":5.62813, - "price_int":"467755", - "amount_int":"562813000", - "stamp":"1328134857584321" - }, - { - "price":4.67756, - "amount":0.80012, - "price_int":"467756", - "amount_int":"80012000", - "stamp":"1328134894569525" - }, - { - "price":4.67778, - "amount":1.00288, - "price_int":"467778", - "amount_int":"100288000", - "stamp":"1328200515939980" - }, - { - "price":4.678, - "amount":15.40852714, - "price_int":"467800", - "amount_int":"1540852714", - "stamp":"1327612788767729" - }, - { - "price":4.68, - "amount":106.01, - "price_int":"468000", - "amount_int":"10601000000", - "stamp":"1327372587442525" - }, - { - "price":4.682, - "amount":200, - "price_int":"468200", - "amount_int":"20000000000", - "stamp":"1328629049501499" - }, - { - "price":4.683, - "amount":0.0202, - "price_int":"468300", - "amount_int":"2020000", - "stamp":"1327572912659427" - }, - { - "price":4.684, - "amount":0.18735, - "price_int":"468400", - "amount_int":"18735000", - "stamp":"1328595040778758" - }, - { - "price":4.68483, - "amount":0.08777, - "price_int":"468483", - "amount_int":"8777000", - "stamp":"1328328294155452" - }, - { - "price":4.68531, - "amount":0.08772, - "price_int":"468531", - "amount_int":"8772000", - "stamp":"1328134680766633" - }, - { - "price":4.6854, - "amount":0.4679537, - "price_int":"468540", - "amount_int":"46795370", - "stamp":"1326841581936366" - }, - { - "price":4.68555, - "amount":2.13717, - "price_int":"468555", - "amount_int":"213717000", - "stamp":"1328243834136491" - }, - { - "price":4.68601, - "amount":0.28325, - "price_int":"468601", - "amount_int":"28325000", - "stamp":"1328381184498399" - }, - { - "price":4.68627, - "amount":0.06804989, - "price_int":"468627", - "amount_int":"6804989", - "stamp":"1326840756305901" - }, - { - "price":4.68638, - "amount":0.20899, - "price_int":"468638", - "amount_int":"20899000", - "stamp":"1328132982468262" - }, - { - "price":4.6877, - "amount":0.63997269, - "price_int":"468770", - "amount_int":"63997269", - "stamp":"1328449233206982" - }, - { - "price":4.6885, - "amount":0.02085776, - "price_int":"468850", - "amount_int":"2085776", - "stamp":"1325641501641825" - }, - { - "price":4.69, - "amount":0.01, - "price_int":"469000", - "amount_int":"1000000", - "stamp":"1327318535243334" - }, - { - "price":4.69058, - "amount":19.55078, - "price_int":"469058", - "amount_int":"1955078000", - "stamp":"1328132873589973" - }, - { - "price":4.69062, - "amount":0.2937, - "price_int":"469062", - "amount_int":"29370000", - "stamp":"1328568847977712" - }, - { - "price":4.69231, - "amount":0.68591, - "price_int":"469231", - "amount_int":"68591000", - "stamp":"1328137067864854" - }, - { - "price":4.6934, - "amount":2.76198, - "price_int":"469340", - "amount_int":"276198000", - "stamp":"1328135916572403" - }, - { - "price":4.69526, - "amount":0.46791204, - "price_int":"469526", - "amount_int":"46791204", - "stamp":"1326841577164335" - }, - { - "price":4.69608, - "amount":0.06804257, - "price_int":"469608", - "amount_int":"6804257", - "stamp":"1326840753900408" - }, - { - "price":4.69806, - "amount":0.0202, - "price_int":"469806", - "amount_int":"2020000", - "stamp":"1327572908499108" - }, - { - "price":4.69841, - "amount":15, - "price_int":"469841", - "amount_int":"1500000000", - "stamp":"1327144724256649" - }, - { - "price":4.6994, - "amount":0.63837937, - "price_int":"469940", - "amount_int":"63837937", - "stamp":"1328449232879426" - }, - { - "price":4.7, - "amount":701.78777233, - "price_int":"470000", - "amount_int":"70178777233", - "stamp":"1328590384854084" - }, - { - "price":4.70097, - "amount":0.02085761, - "price_int":"470097", - "amount_int":"2085761", - "stamp":"1325641492086185" - }, - { - "price":4.701, - "amount":0.15871, - "price_int":"470100", - "amount_int":"15871000", - "stamp":"1328075276057378" - }, - { - "price":4.704, - "amount":1.2, - "price_int":"470400", - "amount_int":"120000000", - "stamp":"1328330746891582" - }, - { - "price":4.70513, - "amount":0.46787404, - "price_int":"470513", - "amount_int":"46787404", - "stamp":"1326841572616947" - }, - { - "price":4.70588, - "amount":0.06803283, - "price_int":"470588", - "amount_int":"6803283", - "stamp":"1326840751194161" - }, - { - "price":4.70769, - "amount":15.88677, - "price_int":"470769", - "amount_int":"1588677000", - "stamp":"1328136368521944" - }, - { - "price":4.70784, - "amount":0.5, - "price_int":"470784", - "amount_int":"50000000", - "stamp":"1326921960251433" - }, - { - "price":4.70909, - "amount":0.50831, - "price_int":"470909", - "amount_int":"50831000", - "stamp":"1328135812482993" - }, - { - "price":4.71, - "amount":651.66047557, - "price_int":"471000", - "amount_int":"65166047557", - "stamp":"1328626409754701" - }, - { - "price":4.7101, - "amount":54.95552111, - "price_int":"471010", - "amount_int":"5495552111", - "stamp":"1328643740175691" - }, - { - "price":4.711, - "amount":83.78397068, - "price_int":"471100", - "amount_int":"8378397068", - "stamp":"1328132689206286" - }, - { - "price":4.7111, - "amount":0.63679395, - "price_int":"471110", - "amount_int":"63679395", - "stamp":"1328449232613285" - }, - { - "price":4.712, - "amount":0.44, - "price_int":"471200", - "amount_int":"44000000", - "stamp":"1326873253044923" - }, - { - "price":4.71311, - "amount":0.0202, - "price_int":"471311", - "amount_int":"2020000", - "stamp":"1327572905327974" - }, - { - "price":4.71344, - "amount":0.02086566, - "price_int":"471344", - "amount_int":"2086566", - "stamp":"1325664519103869" - }, - { - "price":4.71356, - "amount":8.83692792, - "price_int":"471356", - "amount_int":"883692792", - "stamp":"1325458121304229" - }, - { - "price":4.71449, - "amount":0.5154, - "price_int":"471449", - "amount_int":"51540000", - "stamp":"1328565866829236" - }, - { - "price":4.71499, - "amount":0.46781223, - "price_int":"471499", - "amount_int":"46781223", - "stamp":"1326841567911702" - }, - { - "price":4.715, - "amount":50, - "price_int":"471500", - "amount_int":"5000000000", - "stamp":"1326879425145740" - }, - { - "price":4.71569, - "amount":0.06804254, - "price_int":"471569", - "amount_int":"6804254", - "stamp":"1326840749002747" - }, - { - "price":4.71639, - "amount":5.68398, - "price_int":"471639", - "amount_int":"568398000", - "stamp":"1328135854321270" - }, - { - "price":4.7168, - "amount":0.22682, - "price_int":"471680", - "amount_int":"22682000", - "stamp":"1328507519953823" - }, - { - "price":4.71695, - "amount":1.15834, - "price_int":"471695", - "amount_int":"115834000", - "stamp":"1328230908853507" - }, - { - "price":4.717, - "amount":1.06, - "price_int":"471700", - "amount_int":"106000000", - "stamp":"1326991411674663" - }, - { - "price":4.7171, - "amount":10, - "price_int":"471710", - "amount_int":"1000000000", - "stamp":"1328006368677112" - }, - { - "price":4.71982, - "amount":0.02635, - "price_int":"471982", - "amount_int":"2635000", - "stamp":"1328643286939829" - }, - { - "price":4.72, - "amount":0.01, - "price_int":"472000", - "amount_int":"1000000", - "stamp":"1327318541880184" - }, - { - "price":4.7201, - "amount":10, - "price_int":"472010", - "amount_int":"1000000000", - "stamp":"1328460446786965" - }, - { - "price":4.72061, - "amount":0.87929, - "price_int":"472061", - "amount_int":"87929000", - "stamp":"1328506916984137" - }, - { - "price":4.72153, - "amount":0.3728652, - "price_int":"472153", - "amount_int":"37286520", - "stamp":"1325357321463872" - }, - { - "price":4.72247, - "amount":0.18575, - "price_int":"472247", - "amount_int":"18575000", - "stamp":"1328135883793178" - }, - { - "price":4.7229, - "amount":0.63520295, - "price_int":"472290", - "amount_int":"63520295", - "stamp":"1328449232231495" - }, - { - "price":4.72382, - "amount":0.104, - "price_int":"472382", - "amount_int":"10400000", - "stamp":"1328234824860479" - }, - { - "price":4.72463, - "amount":1.46422, - "price_int":"472463", - "amount_int":"146422000", - "stamp":"1328533177370869" - }, - { - "price":4.72479, - "amount":5.38158, - "price_int":"472479", - "amount_int":"538158000", - "stamp":"1328134858206292" - }, - { - "price":4.7248, - "amount":0.76515, - "price_int":"472480", - "amount_int":"76515000", - "stamp":"1328134895177841" - }, - { - "price":4.72486, - "amount":0.46776899, - "price_int":"472486", - "amount_int":"46776899", - "stamp":"1326841563144400" - }, - { - "price":4.72503, - "amount":0.95961, - "price_int":"472503", - "amount_int":"95961000", - "stamp":"1328200516381343" - }, - { - "price":4.72549, - "amount":0.06803456, - "price_int":"472549", - "amount_int":"6803456", - "stamp":"1326840745413758" - }, - { - "price":4.7259, - "amount":34.5, - "price_int":"472590", - "amount_int":"3450000000", - "stamp":"1328132140884688" - }, - { - "price":4.72591, - "amount":0.0208653, - "price_int":"472591", - "amount_int":"2086530", - "stamp":"1325664840654241" - }, - { - "price":4.72817, - "amount":0.0202, - "price_int":"472817", - "amount_int":"2020000", - "stamp":"1327572902420568" - }, - { - "price":4.73, - "amount":0.01, - "price_int":"473000", - "amount_int":"1000000", - "stamp":"1327318544539859" - }, - { - "price":4.73216, - "amount":0.08371, - "price_int":"473216", - "amount_int":"8371000", - "stamp":"1328328294614384" - }, - { - "price":4.73264, - "amount":0.08388, - "price_int":"473264", - "amount_int":"8388000", - "stamp":"1328134681388327" - }, - { - "price":4.73288, - "amount":2.04077, - "price_int":"473288", - "amount_int":"204077000", - "stamp":"1328243834942465" - }, - { - "price":4.73334, - "amount":0.27055, - "price_int":"473334", - "amount_int":"27055000", - "stamp":"1328381184935039" - }, - { - "price":4.73372, - "amount":0.19935, - "price_int":"473372", - "amount_int":"19935000", - "stamp":"1328132982958881" - }, - { - "price":4.7347, - "amount":0.63361987, - "price_int":"473470", - "amount_int":"63361987", - "stamp":"1328449231700049" - }, - { - "price":4.73472, - "amount":0.46769977, - "price_int":"473472", - "amount_int":"46769977", - "stamp":"1326841555921393" - }, - { - "price":4.73529, - "amount":0.06802209, - "price_int":"473529", - "amount_int":"6802209", - "stamp":"1326840742327608" - }, - { - "price":4.73796, - "amount":18.62088, - "price_int":"473796", - "amount_int":"1862088000", - "stamp":"1328132874102702" - }, - { - "price":4.738, - "amount":0.27584, - "price_int":"473800", - "amount_int":"27584000", - "stamp":"1328568848462355" - }, - { - "price":4.73838, - "amount":0.02100166, - "price_int":"473838", - "amount_int":"2100166", - "stamp":"1326840996508071" - }, - { - "price":4.73971, - "amount":0.65566, - "price_int":"473971", - "amount_int":"65566000", - "stamp":"1328137408313777" - }, - { - "price":4.74, - "amount":5.12757594, - "price_int":"474000", - "amount_int":"512757594", - "stamp":"1328368366871243" - }, - { - "price":4.74081, - "amount":2.64565, - "price_int":"474081", - "amount_int":"264565000", - "stamp":"1328135920395494" - }, - { - "price":4.74323, - "amount":0.0202, - "price_int":"474323", - "amount_int":"2020000", - "stamp":"1327572899127052" - }, - { - "price":4.74458, - "amount":0.46766083, - "price_int":"474458", - "amount_int":"46766083", - "stamp":"1326841549188193" - }, - { - "price":4.74497, - "amount":40, - "price_int":"474497", - "amount_int":"4000000000", - "stamp":"1326999961432361" - }, - { - "price":4.7451, - "amount":0.06801286, - "price_int":"474510", - "amount_int":"6801286", - "stamp":"1326840740252705" - }, - { - "price":4.7465, - "amount":0.63204466, - "price_int":"474650", - "amount_int":"63204466", - "stamp":"1328449231254322" - }, - { - "price":4.75, - "amount":1154.70383578, - "price_int":"475000", - "amount_int":"115470383578", - "stamp":"1328587434427344" - }, - { - "price":4.75085, - "amount":0.02100494, - "price_int":"475085", - "amount_int":"2100494", - "stamp":"1326840993055961" - }, - { - "price":4.7535, - "amount":0.25349, - "price_int":"475350", - "amount_int":"25349000", - "stamp":"1328459380354302" - }, - { - "price":4.75445, - "amount":0.4676592, - "price_int":"475445", - "amount_int":"46765920", - "stamp":"1326841540842268" - }, - { - "price":4.7549, - "amount":0.06800388, - "price_int":"475490", - "amount_int":"6800388", - "stamp":"1326840737702862" - }, - { - "price":4.75524, - "amount":15.18819, - "price_int":"475524", - "amount_int":"1518819000", - "stamp":"1328136701419128" - }, - { - "price":4.75666, - "amount":0.48626, - "price_int":"475666", - "amount_int":"48626000", - "stamp":"1328135813081619" - }, - { - "price":4.75829, - "amount":0.0202, - "price_int":"475829", - "amount_int":"2020000", - "stamp":"1327572895497662" - }, - { - "price":4.7583, - "amount":0.63047727, - "price_int":"475830", - "amount_int":"63047727", - "stamp":"1328449230877434" - }, - { - "price":4.76, - "amount":11.65, - "price_int":"476000", - "amount_int":"1165000000", - "stamp":"1327583365402676" - }, - { - "price":4.7601, - "amount":10, - "price_int":"476010", - "amount_int":"1000000000", - "stamp":"1328460432229421" - }, - { - "price":4.76103, - "amount":6.8138, - "price_int":"476103", - "amount_int":"681380000", - "stamp":"1326840053547896" - }, - { - "price":4.76211, - "amount":0.48476, - "price_int":"476211", - "amount_int":"48476000", - "stamp":"1328565867281197" - }, - { - "price":4.763, - "amount":25, - "price_int":"476300", - "amount_int":"2500000000", - "stamp":"1327593598461647" - }, - { - "price":4.76332, - "amount":0.02100499, - "price_int":"476332", - "amount_int":"2100499", - "stamp":"1326840990074965" - }, - { - "price":4.76403, - "amount":5.43976, - "price_int":"476403", - "amount_int":"543976000", - "stamp":"1328135854804444" - }, - { - "price":4.76431, - "amount":0.4676176, - "price_int":"476431", - "amount_int":"46761760", - "stamp":"1326841531102775" - }, - { - "price":4.76444, - "amount":0.21421, - "price_int":"476444", - "amount_int":"21421000", - "stamp":"1328507520655018" - }, - { - "price":4.76459, - "amount":1.10428, - "price_int":"476459", - "amount_int":"110428000", - "stamp":"1328230909342077" - }, - { - "price":4.76471, - "amount":0.06799622, - "price_int":"476471", - "amount_int":"6799622", - "stamp":"1326840735492390" - }, - { - "price":4.766, - "amount":0.25385, - "price_int":"476600", - "amount_int":"25385000", - "stamp":"1328367157023370" - }, - { - "price":4.76749, - "amount":0.02492, - "price_int":"476749", - "amount_int":"2492000", - "stamp":"1328643287388199" - }, - { - "price":4.7683, - "amount":0.82978, - "price_int":"476830", - "amount_int":"82978000", - "stamp":"1328506917584608" - }, - { - "price":4.77, - "amount":0.10376, - "price_int":"477000", - "amount_int":"10376000", - "stamp":"1327643520866695" - }, - { - "price":4.77017, - "amount":0.17776, - "price_int":"477017", - "amount_int":"17776000", - "stamp":"1328135888429087" - }, - { - "price":4.7702, - "amount":0.62890445, - "price_int":"477020", - "amount_int":"62890445", - "stamp":"1328449230465541" - }, - { - "price":4.77146, - "amount":74, - "price_int":"477146", - "amount_int":"7400000000", - "stamp":"1327625908533091" - }, - { - "price":4.77154, - "amount":0.09913, - "price_int":"477154", - "amount_int":"9913000", - "stamp":"1328234825305312" - }, - { - "price":4.772, - "amount":0.19155, - "price_int":"477200", - "amount_int":"19155000", - "stamp":"1328519378512437" - }, - { - "price":4.77235, - "amount":1.40036, - "price_int":"477235", - "amount_int":"140036000", - "stamp":"1328534123882085" - }, - { - "price":4.77252, - "amount":5.1375, - "price_int":"477252", - "amount_int":"513750000", - "stamp":"1328134858814676" - }, - { - "price":4.77253, - "amount":0.73052, - "price_int":"477253", - "amount_int":"73052000", - "stamp":"1328134895780288" - }, - { - "price":4.77276, - "amount":0.91677, - "price_int":"477276", - "amount_int":"91677000", - "stamp":"1328200516817410" - }, - { - "price":4.77329, - "amount":0.27091, - "price_int":"477329", - "amount_int":"27091000", - "stamp":"1327750902664096" - }, - { - "price":4.77335, - "amount":0.0202, - "price_int":"477335", - "amount_int":"2020000", - "stamp":"1327572892433037" - }, - { - "price":4.77418, - "amount":0.46759687, - "price_int":"477418", - "amount_int":"46759687", - "stamp":"1326841520575235" - }, - { - "price":4.77451, - "amount":0.06798274, - "price_int":"477451", - "amount_int":"6798274", - "stamp":"1326840733153429" - }, - { - "price":4.77579, - "amount":0.02100636, - "price_int":"477579", - "amount_int":"2100636", - "stamp":"1326840987136750" - }, - { - "price":4.77996, - "amount":0.07968, - "price_int":"477996", - "amount_int":"7968000", - "stamp":"1328328295124859" - }, - { - "price":4.78, - "amount":68.15, - "price_int":"478000", - "amount_int":"6815000000", - "stamp":"1327318554894140" - }, - { - "price":4.78044, - "amount":0.0801, - "price_int":"478044", - "amount_int":"8010000", - "stamp":"1328134681973603" - }, - { - "price":4.78069, - "amount":1.94533, - "price_int":"478069", - "amount_int":"194533000", - "stamp":"1328243835885037" - }, - { - "price":4.78115, - "amount":0.25797, - "price_int":"478115", - "amount_int":"25797000", - "stamp":"1328381185396926" - }, - { - "price":4.78153, - "amount":0.1898, - "price_int":"478153", - "amount_int":"18980000", - "stamp":"1328132983446554" - }, - { - "price":4.7821, - "amount":0.62733945, - "price_int":"478210", - "amount_int":"62733945", - "stamp":"1328449230146068" - }, - { - "price":4.78404, - "amount":0.46758367, - "price_int":"478404", - "amount_int":"46758367", - "stamp":"1326841511555183" - }, - { - "price":4.78431, - "amount":0.06796913, - "price_int":"478431", - "amount_int":"6796913", - "stamp":"1326840729754454" - }, - { - "price":4.78581, - "amount":17.70027, - "price_int":"478581", - "amount_int":"1770027000", - "stamp":"1328132874609648" - }, - { - "price":4.78586, - "amount":0.25816, - "price_int":"478586", - "amount_int":"25816000", - "stamp":"1328568848904462" - }, - { - "price":4.78758, - "amount":0.62571, - "price_int":"478758", - "amount_int":"62571000", - "stamp":"1328137408810347" - }, - { - "price":4.7884, - "amount":0.0202, - "price_int":"478840", - "amount_int":"2020000", - "stamp":"1327572889595991" - }, - { - "price":4.78869, - "amount":2.53049, - "price_int":"478869", - "amount_int":"253049000", - "stamp":"1328135920922816" - }, - { - "price":4.79, - "amount":82.7657, - "price_int":"479000", - "amount_int":"8276570000", - "stamp":"1327318557639644" - }, - { - "price":4.793, - "amount":0.13302, - "price_int":"479300", - "amount_int":"13302000", - "stamp":"1327133763162702" - }, - { - "price":4.79309, - "amount":1, - "price_int":"479309", - "amount_int":"100000000", - "stamp":"1327648300478450" - }, - { - "price":4.7939, - "amount":0.46753645, - "price_int":"479390", - "amount_int":"46753645", - "stamp":"1326841505654269" - }, - { - "price":4.794, - "amount":1.62578223, - "price_int":"479400", - "amount_int":"162578223", - "stamp":"1328449229792536" - }, - { - "price":4.79412, - "amount":0.06795335, - "price_int":"479412", - "amount_int":"6795335", - "stamp":"1326840724755227" - }, - { - "price":4.79466, - "amount":5, - "price_int":"479466", - "amount_int":"500000000", - "stamp":"1326926456589062" - }, - { - "price":4.7986, - "amount":24, - "price_int":"479860", - "amount_int":"2400000000", - "stamp":"1328219851594066" - }, - { - "price":4.79899, - "amount":0.00167535, - "price_int":"479899", - "amount_int":"167535", - "stamp":"1317250584898860" - }, - { - "price":4.8, - "amount":713.37676249, - "price_int":"480000", - "amount_int":"71337676249", - "stamp":"1328581052527001" - }, - { - "price":4.80073, - "amount":0.02101071, - "price_int":"480073", - "amount_int":"2101071", - "stamp":"1326840981304649" - }, - { - "price":4.80328, - "amount":14.49659, - "price_int":"480328", - "amount_int":"1449659000", - "stamp":"1328136701863241" - }, - { - "price":4.80346, - "amount":0.0202, - "price_int":"480346", - "amount_int":"2020000", - "stamp":"1327572885531557" - }, - { - "price":4.80377, - "amount":0.46747468, - "price_int":"480377", - "amount_int":"46747468", - "stamp":"1326841496106806" - }, - { - "price":4.80392, - "amount":0.06793458, - "price_int":"480392", - "amount_int":"6793458", - "stamp":"1326840721403538" - }, - { - "price":4.804, - "amount":1.2, - "price_int":"480400", - "amount_int":"120000000", - "stamp":"1328330743156589" - }, - { - "price":4.8047, - "amount":0.46442, - "price_int":"480470", - "amount_int":"46442000", - "stamp":"1328135813571029" - }, - { - "price":4.806, - "amount":2000.62421973, - "price_int":"480600", - "amount_int":"200062421973", - "stamp":"1328449229454880" - }, - { - "price":4.80635, - "amount":30, - "price_int":"480635", - "amount_int":"3000000000", - "stamp":"1327243987429943" - }, - { - "price":4.8065, - "amount":5, - "price_int":"480650", - "amount_int":"500000000", - "stamp":"1327635395836224" - }, - { - "price":4.81, - "amount":554.0546, - "price_int":"481000", - "amount_int":"55405460000", - "stamp":"1327640929610046" - }, - { - "price":4.81022, - "amount":0.45442, - "price_int":"481022", - "amount_int":"45442000", - "stamp":"1328565867776815" - }, - { - "price":4.811, - "amount":1309.642, - "price_int":"481100", - "amount_int":"130964200000", - "stamp":"1328569308367544" - }, - { - "price":4.81101, - "amount":11, - "price_int":"481101", - "amount_int":"1100000000", - "stamp":"1327835330957216" - }, - { - "price":4.81216, - "amount":5.19797, - "price_int":"481216", - "amount_int":"519797000", - "stamp":"1328135855412119" - }, - { - "price":4.81257, - "amount":0.20173, - "price_int":"481257", - "amount_int":"20173000", - "stamp":"1328507521138587" - }, - { - "price":4.81272, - "amount":1.05075, - "price_int":"481272", - "amount_int":"105075000", - "stamp":"1328230909834188" - }, - { - "price":4.81313, - "amount":50, - "price_int":"481313", - "amount_int":"5000000000", - "stamp":"1327847727440063" - }, - { - "price":4.8132, - "amount":0.02101221, - "price_int":"481320", - "amount_int":"2101221", - "stamp":"1326840978931410" - }, - { - "price":4.81363, - "amount":0.46746906, - "price_int":"481363", - "amount_int":"46746906", - "stamp":"1326841489253614" - }, - { - "price":4.81373, - "amount":0.06792144, - "price_int":"481373", - "amount_int":"6792144", - "stamp":"1326840718320477" - }, - { - "price":4.81463, - "amount":22, - "price_int":"481463", - "amount_int":"2200000000", - "stamp":"1328559058251932" - }, - { - "price":4.815, - "amount":204.45511942, - "price_int":"481500", - "amount_int":"20445511942", - "stamp":"1328547535615663" - }, - { - "price":4.81556, - "amount":0.9138, - "price_int":"481556", - "amount_int":"91380000", - "stamp":"1326840594717570" - }, - { - "price":4.81565, - "amount":0.02351, - "price_int":"481565", - "amount_int":"2351000", - "stamp":"1328643287830070" - }, - { - "price":4.81646, - "amount":0.78076, - "price_int":"481646", - "amount_int":"78076000", - "stamp":"1328506918070917" - }, - { - "price":4.818, - "amount":0.62266501, - "price_int":"481800", - "amount_int":"62266501", - "stamp":"1328449229134946" - }, - { - "price":4.81835, - "amount":0.16986, - "price_int":"481835", - "amount_int":"16986000", - "stamp":"1328135889099305" - }, - { - "price":4.81852, - "amount":0.0202, - "price_int":"481852", - "amount_int":"2020000", - "stamp":"1327572881888450" - }, - { - "price":4.81974, - "amount":0.0943, - "price_int":"481974", - "amount_int":"9430000", - "stamp":"1328234825772111" - }, - { - "price":4.82, - "amount":5.57, - "price_int":"482000", - "amount_int":"557000000", - "stamp":"1327684577485709" - }, - { - "price":4.8201, - "amount":10, - "price_int":"482010", - "amount_int":"1000000000", - "stamp":"1328460451140692" - }, - { - "price":4.82056, - "amount":1.33227, - "price_int":"482056", - "amount_int":"133227000", - "stamp":"1328535074920552" - }, - { - "price":4.82073, - "amount":4.89585, - "price_int":"482073", - "amount_int":"489585000", - "stamp":"1328134859419807" - }, - { - "price":4.82074, - "amount":0.69625, - "price_int":"482074", - "amount_int":"69625000", - "stamp":"1328134896389412" - }, - { - "price":4.82097, - "amount":0.87437, - "price_int":"482097", - "amount_int":"87437000", - "stamp":"1328200517272920" - }, - { - "price":4.821, - "amount":16, - "price_int":"482100", - "amount_int":"1600000000", - "stamp":"1327382087630214" - }, - { - "price":4.8235, - "amount":0.46731963, - "price_int":"482350", - "amount_int":"46731963", - "stamp":"1326841483994552" - }, - { - "price":4.82353, - "amount":0.0679073, - "price_int":"482353", - "amount_int":"6790730", - "stamp":"1326840714745595" - }, - { - "price":4.824, - "amount":10, - "price_int":"482400", - "amount_int":"1000000000", - "stamp":"1327637960811626" - }, - { - "price":4.82567, - "amount":0.02101218, - "price_int":"482567", - "amount_int":"2101218", - "stamp":"1326840975838120" - }, - { - "price":4.82824, - "amount":0.0757, - "price_int":"482824", - "amount_int":"7570000", - "stamp":"1328328295581932" - }, - { - "price":4.82873, - "amount":0.07635, - "price_int":"482873", - "amount_int":"7635000", - "stamp":"1328134682598238" - }, - { - "price":4.82898, - "amount":1.85083, - "price_int":"482898", - "amount_int":"185083000", - "stamp":"1328243838380890" - }, - { - "price":4.82945, - "amount":0.24552, - "price_int":"482945", - "amount_int":"24552000", - "stamp":"1328381185841172" - }, - { - "price":4.82983, - "amount":0.18035, - "price_int":"482983", - "amount_int":"18035000", - "stamp":"1328132983941208" - }, - { - "price":4.83, - "amount":115.60311801, - "price_int":"483000", - "amount_int":"11560311801", - "stamp":"1328449228756716" - }, - { - "price":4.83158, - "amount":0.02100742, - "price_int":"483158", - "amount_int":"2100742", - "stamp":"1326840983836251" - }, - { - "price":4.832, - "amount":99.66715645, - "price_int":"483200", - "amount_int":"9966715645", - "stamp":"1328356207394381" - }, - { - "price":4.83333, - "amount":0.06789132, - "price_int":"483333", - "amount_int":"6789132", - "stamp":"1326840711776646" - }, - { - "price":4.83336, - "amount":0.46724195, - "price_int":"483336", - "amount_int":"46724195", - "stamp":"1326841477507023" - }, - { - "price":4.83358, - "amount":0.0202, - "price_int":"483358", - "amount_int":"2020000", - "stamp":"1327572879077222" - }, - { - "price":4.83415, - "amount":16.78888, - "price_int":"483415", - "amount_int":"1678888000", - "stamp":"1328132875122656" - }, - { - "price":4.8342, - "amount":0.24066, - "price_int":"483420", - "amount_int":"24066000", - "stamp":"1328568849345045" - }, - { - "price":4.83508, - "amount":22.8684, - "price_int":"483508", - "amount_int":"2286840000", - "stamp":"1327993388108698" - }, - { - "price":4.83594, - "amount":0.59606, - "price_int":"483594", - "amount_int":"59606000", - "stamp":"1328137409419598" - }, - { - "price":4.83706, - "amount":2.41647, - "price_int":"483706", - "amount_int":"241647000", - "stamp":"1328135921423498" - }, - { - "price":4.83814, - "amount":0.02101254, - "price_int":"483814", - "amount_int":"2101254", - "stamp":"1326840973324424" - }, - { - "price":4.84, - "amount":21.9108, - "price_int":"484000", - "amount_int":"2191080000", - "stamp":"1327521458686872" - }, - { - "price":4.8421, - "amount":0.61956589, - "price_int":"484210", - "amount_int":"61956589", - "stamp":"1328449228304141" - }, - { - "price":4.84314, - "amount":0.06788444, - "price_int":"484314", - "amount_int":"6788444", - "stamp":"1326840708610531" - }, - { - "price":4.84322, - "amount":0.46718309, - "price_int":"484322", - "amount_int":"46718309", - "stamp":"1326841468012075" - }, - { - "price":4.84533, - "amount":0.74978, - "price_int":"484533", - "amount_int":"74978000", - "stamp":"1328143936360221" - }, - { - "price":4.84781, - "amount":52.09186351, - "price_int":"484781", - "amount_int":"5209186351", - "stamp":"1327653277504119" - }, - { - "price":4.85, - "amount":197.1278, - "price_int":"485000", - "amount_int":"19712780000", - "stamp":"1328586243576433" - }, - { - "price":4.85061, - "amount":0.02101222, - "price_int":"485061", - "amount_int":"2101222", - "stamp":"1326840969994644" - }, - { - "price":4.85179, - "amount":13.81192, - "price_int":"485179", - "amount_int":"1381192000", - "stamp":"1328136702320092" - }, - { - "price":4.85294, - "amount":0.06787438, - "price_int":"485294", - "amount_int":"6787438", - "stamp":"1326840704608253" - }, - { - "price":4.85309, - "amount":0.46685429, - "price_int":"485309", - "amount_int":"46685429", - "stamp":"1326841464803435" - }, - { - "price":4.8532, - "amount":179.2453886, - "price_int":"485320", - "amount_int":"17924538860", - "stamp":"1328630035172217" - }, - { - "price":4.85324, - "amount":1.42325, - "price_int":"485324", - "amount_int":"142325000", - "stamp":"1328461918795222" - }, - { - "price":4.8542, - "amount":0.61802151, - "price_int":"485420", - "amount_int":"61802151", - "stamp":"1328449227888358" - }, - { - "price":4.8554, - "amount":20, - "price_int":"485540", - "amount_int":"2000000000", - "stamp":"1328568144610049" - }, - { - "price":4.857, - "amount":291, - "price_int":"485700", - "amount_int":"29100000000", - "stamp":"1328567972485604" - }, - { - "price":4.8588, - "amount":0.42438, - "price_int":"485880", - "amount_int":"42438000", - "stamp":"1328565868234829" - }, - { - "price":4.86, - "amount":0.01, - "price_int":"486000", - "amount_int":"1000000", - "stamp":"1327318572578255" - }, - { - "price":4.8601, - "amount":10, - "price_int":"486010", - "amount_int":"1000000000", - "stamp":"1328460419842087" - }, - { - "price":4.86013, - "amount":3.8, - "price_int":"486013", - "amount_int":"380000000", - "stamp":"1325670984340239" - }, - { - "price":4.86076, - "amount":4.95861, - "price_int":"486076", - "amount_int":"495861000", - "stamp":"1328135856022310" - }, - { - "price":4.86118, - "amount":0.18937, - "price_int":"486118", - "amount_int":"18937000", - "stamp":"1328507521727474" - }, - { - "price":4.86133, - "amount":0.99777, - "price_int":"486133", - "amount_int":"99777000", - "stamp":"1328230910449659" - }, - { - "price":4.862, - "amount":0.23324, - "price_int":"486200", - "amount_int":"23324000", - "stamp":"1328442063492997" - }, - { - "price":4.86275, - "amount":0.06786949, - "price_int":"486275", - "amount_int":"6786949", - "stamp":"1326840701447427" - }, - { - "price":4.86295, - "amount":0.46671225, - "price_int":"486295", - "amount_int":"46671225", - "stamp":"1326841462005554" - }, - { - "price":4.863, - "amount":1000, - "price_int":"486300", - "amount_int":"100000000000", - "stamp":"1327634934193010" - }, - { - "price":4.86308, - "amount":0.02101206, - "price_int":"486308", - "amount_int":"2101206", - "stamp":"1326840966695290" - }, - { - "price":4.86369, - "amount":0.0202, - "price_int":"486369", - "amount_int":"2020000", - "stamp":"1327572871156604" - }, - { - "price":4.86429, - "amount":0.02211, - "price_int":"486429", - "amount_int":"2211000", - "stamp":"1328643288280988" - }, - { - "price":4.86444, - "amount":100, - "price_int":"486444", - "amount_int":"10000000000", - "stamp":"1328600094667114" - }, - { - "price":4.86511, - "amount":0.73223, - "price_int":"486511", - "amount_int":"73223000", - "stamp":"1328506918643656" - }, - { - "price":4.86615, - "amount":5, - "price_int":"486615", - "amount_int":"500000000", - "stamp":"1328466302505769" - }, - { - "price":4.8663, - "amount":0.6164848, - "price_int":"486630", - "amount_int":"61648480", - "stamp":"1328449227609729" - }, - { - "price":4.867, - "amount":1.0273, - "price_int":"486700", - "amount_int":"102730000", - "stamp":"1326991400417547" - }, - { - "price":4.86702, - "amount":0.16204, - "price_int":"486702", - "amount_int":"16204000", - "stamp":"1328135889581624" - }, - { - "price":4.86727, - "amount":10.1512169, - "price_int":"486727", - "amount_int":"1015121690", - "stamp":"1328644624890834" - }, - { - "price":4.8684, - "amount":0.0202, - "price_int":"486840", - "amount_int":"2020000", - "stamp":"1327572875111233" - }, - { - "price":4.86842, - "amount":0.08953, - "price_int":"486842", - "amount_int":"8953000", - "stamp":"1328234826222785" - }, - { - "price":4.86925, - "amount":1.28189, - "price_int":"486925", - "amount_int":"128189000", - "stamp":"1328556810865921" - }, - { - "price":4.86942, - "amount":4.65662, - "price_int":"486942", - "amount_int":"465662000", - "stamp":"1328134860028384" - }, - { - "price":4.86943, - "amount":0.66231, - "price_int":"486943", - "amount_int":"66231000", - "stamp":"1328134897018022" - }, - { - "price":4.86966, - "amount":0.83239, - "price_int":"486966", - "amount_int":"83239000", - "stamp":"1328200517886510" - }, - { - "price":4.87, - "amount":16.15975975, - "price_int":"487000", - "amount_int":"1615975975", - "stamp":"1327624865347410" - }, - { - "price":4.87255, - "amount":0.06785649, - "price_int":"487255", - "amount_int":"6785649", - "stamp":"1326840698382080" - }, - { - "price":4.87282, - "amount":0.46657963, - "price_int":"487282", - "amount_int":"46657963", - "stamp":"1326841459026696" - }, - { - "price":4.87389, - "amount":5, - "price_int":"487389", - "amount_int":"500000000", - "stamp":"1325866866153144" - }, - { - "price":4.875, - "amount":2, - "price_int":"487500", - "amount_int":"200000000", - "stamp":"1327922754584742" - }, - { - "price":4.87554, - "amount":0.02101392, - "price_int":"487554", - "amount_int":"2101392", - "stamp":"1326840963370241" - }, - { - "price":4.87701, - "amount":0.07175, - "price_int":"487701", - "amount_int":"7175000", - "stamp":"1328328296028937" - }, - { - "price":4.87751, - "amount":0.07263, - "price_int":"487751", - "amount_int":"7263000", - "stamp":"1328134683200769" - }, - { - "price":4.8776, - "amount":7.2883, - "price_int":"487760", - "amount_int":"728830000", - "stamp":"1326865366213966" - }, - { - "price":4.87776, - "amount":1.75729, - "price_int":"487776", - "amount_int":"175729000", - "stamp":"1328243838837215" - }, - { - "price":4.87823, - "amount":0.2332, - "price_int":"487823", - "amount_int":"23320000", - "stamp":"1328381186273221" - }, - { - "price":4.8784, - "amount":0.61495572, - "price_int":"487840", - "amount_int":"61495572", - "stamp":"1328449227367018" - }, - { - "price":4.87862, - "amount":0.171, - "price_int":"487862", - "amount_int":"17100000", - "stamp":"1328132984652234" - }, - { - "price":4.87875, - "amount":0.0202, - "price_int":"487875", - "amount_int":"2020000", - "stamp":"1327572868365870" - }, - { - "price":4.88, - "amount":19.24, - "price_int":"488000", - "amount_int":"1924000000", - "stamp":"1328644693151104" - }, - { - "price":4.88235, - "amount":0.06783885, - "price_int":"488235", - "amount_int":"6783885", - "stamp":"1326840696197582" - }, - { - "price":4.88268, - "amount":0.46687115, - "price_int":"488268", - "amount_int":"46687115", - "stamp":"1326841452201798" - }, - { - "price":4.88298, - "amount":15.88659, - "price_int":"488298", - "amount_int":"1588659000", - "stamp":"1328132875638312" - }, - { - "price":4.88303, - "amount":0.22333, - "price_int":"488303", - "amount_int":"22333000", - "stamp":"1328568849786090" - }, - { - "price":4.88479, - "amount":0.5667, - "price_int":"488479", - "amount_int":"56670000", - "stamp":"1328137409901592" - }, - { - "price":4.8859, - "amount":2.11312552, - "price_int":"488590", - "amount_int":"211312552", - "stamp":"1328409833804681" - }, - { - "price":4.88592, - "amount":2.3036, - "price_int":"488592", - "amount_int":"230360000", - "stamp":"1328135921929780" - }, - { - "price":4.88801, - "amount":0.02101729, - "price_int":"488801", - "amount_int":"2101729", - "stamp":"1326840960475082" - }, - { - "price":4.89, - "amount":0.01, - "price_int":"489000", - "amount_int":"1000000", - "stamp":"1327318579986291" - }, - { - "price":4.8906, - "amount":0.61342167, - "price_int":"489060", - "amount_int":"61342167", - "stamp":"1328449227062960" - }, - { - "price":4.89216, - "amount":0.06781207, - "price_int":"489216", - "amount_int":"6781207", - "stamp":"1326840693581673" - }, - { - "price":4.89254, - "amount":0.46676175, - "price_int":"489254", - "amount_int":"46676175", - "stamp":"1326841449332936" - }, - { - "price":4.89381, - "amount":0.0202, - "price_int":"489381", - "amount_int":"2020000", - "stamp":"1327572864234058" - }, - { - "price":4.89461, - "amount":25, - "price_int":"489461", - "amount_int":"2500000000", - "stamp":"1327619239038460" - }, - { - "price":4.89712, - "amount":64.83785, - "price_int":"489712", - "amount_int":"6483785000", - "stamp":"1326979992726873" - }, - { - "price":4.9, - "amount":299.6668755, - "price_int":"490000", - "amount_int":"29966687550", - "stamp":"1328622721228359" - }, - { - "price":4.90023, - "amount":6.85137476, - "price_int":"490023", - "amount_int":"685137476", - "stamp":"1327636575350144" - }, - { - "price":4.90048, - "amount":0.02101662, - "price_int":"490048", - "amount_int":"2101662", - "stamp":"1326840956724963" - }, - { - "price":4.9008, - "amount":13.13409, - "price_int":"490080", - "amount_int":"1313409000", - "stamp":"1328136702777452" - }, - { - "price":4.901, - "amount":100, - "price_int":"490100", - "amount_int":"10000000000", - "stamp":"1326840890671077" - }, - { - "price":4.90196, - "amount":0.06779245, - "price_int":"490196", - "amount_int":"6779245", - "stamp":"1326840691176866" - }, - { - "price":4.90226, - "amount":0.4214, - "price_int":"490226", - "amount_int":"42140000", - "stamp":"1328135814554386" - }, - { - "price":4.90241, - "amount":0.46665704, - "price_int":"490241", - "amount_int":"46665704", - "stamp":"1326841445959559" - }, - { - "price":4.9028, - "amount":0.61189524, - "price_int":"490280", - "amount_int":"61189524", - "stamp":"1328449226463951" - }, - { - "price":4.903, - "amount":0.09376, - "price_int":"490300", - "amount_int":"9376000", - "stamp":"1327643514299167" - }, - { - "price":4.904, - "amount":1.2, - "price_int":"490400", - "amount_int":"120000000", - "stamp":"1328330739461957" - }, - { - "price":4.90707, - "amount":27.18162, - "price_int":"490707", - "amount_int":"2718162000", - "stamp":"1328641826592870" - }, - { - "price":4.90788, - "amount":0.39465, - "price_int":"490788", - "amount_int":"39465000", - "stamp":"1328565868772288" - }, - { - "price":4.90887, - "amount":0.0202, - "price_int":"490887", - "amount_int":"2020000", - "stamp":"1327572860283271" - }, - { - "price":4.90986, - "amount":4.72164, - "price_int":"490986", - "amount_int":"472164000", - "stamp":"1328135856516102" - }, - { - "price":4.91, - "amount":30.01, - "price_int":"491000", - "amount_int":"3001000000", - "stamp":"1327318584288673" - }, - { - "price":4.91028, - "amount":0.17713, - "price_int":"491028", - "amount_int":"17713000", - "stamp":"1328507522229433" - }, - { - "price":4.91044, - "amount":0.94531, - "price_int":"491044", - "amount_int":"94531000", - "stamp":"1328230910969062" - }, - { - "price":4.91045, - "amount":4.6526, - "price_int":"491045", - "amount_int":"465260000", - "stamp":"1327694467787080" - }, - { - "price":4.911, - "amount":52.5, - "price_int":"491100", - "amount_int":"5250000000", - "stamp":"1328132683990975" - }, - { - "price":4.91176, - "amount":0.06777738, - "price_int":"491176", - "amount_int":"6777738", - "stamp":"1326840687313763" - }, - { - "price":4.91224, - "amount":17.51892296, - "price_int":"491224", - "amount_int":"1751892296", - "stamp":"1326839842193283" - }, - { - "price":4.91227, - "amount":0.46644259, - "price_int":"491227", - "amount_int":"46644259", - "stamp":"1326841443172258" - }, - { - "price":4.91295, - "amount":0.02102252, - "price_int":"491295", - "amount_int":"2102252", - "stamp":"1326840951773876" - }, - { - "price":4.91343, - "amount":0.02073, - "price_int":"491343", - "amount_int":"2073000", - "stamp":"1328643288729660" - }, - { - "price":4.91425, - "amount":0.68419, - "price_int":"491425", - "amount_int":"68419000", - "stamp":"1328506919139372" - }, - { - "price":4.915, - "amount":0.6103764, - "price_int":"491500", - "amount_int":"61037640", - "stamp":"1328449226043862" - }, - { - "price":4.91609, - "amount":490, - "price_int":"491609", - "amount_int":"49000000000", - "stamp":"1328567650608889" - }, - { - "price":4.91618, - "amount":0.1543, - "price_int":"491618", - "amount_int":"15430000", - "stamp":"1328135890161072" - }, - { - "price":4.91686, - "amount":11, - "price_int":"491686", - "amount_int":"1100000000", - "stamp":"1328610515218491" - }, - { - "price":4.9176, - "amount":0.0848, - "price_int":"491760", - "amount_int":"8480000", - "stamp":"1328234826668230" - }, - { - "price":4.91844, - "amount":1.19469, - "price_int":"491844", - "amount_int":"119469000", - "stamp":"1328556811308624" - }, - { - "price":4.91861, - "amount":4.41979, - "price_int":"491861", - "amount_int":"441979000", - "stamp":"1328134860524241" - }, - { - "price":4.91862, - "amount":0.62872, - "price_int":"491862", - "amount_int":"62872000", - "stamp":"1328134897645175" - }, - { - "price":4.91885, - "amount":0.79083, - "price_int":"491885", - "amount_int":"79083000", - "stamp":"1328200518340631" - }, - { - "price":4.9192, - "amount":9.30972701, - "price_int":"491920", - "amount_int":"930972701", - "stamp":"1328644624602734" - }, - { - "price":4.92, - "amount":6.01190447, - "price_int":"492000", - "amount_int":"601190447", - "stamp":"1328644683664312" - }, - { - "price":4.9201, - "amount":10, - "price_int":"492010", - "amount_int":"1000000000", - "stamp":"1328460455882676" - }, - { - "price":4.92157, - "amount":0.06775731, - "price_int":"492157", - "amount_int":"6775731", - "stamp":"1326840679533436" - }, - { - "price":4.922, - "amount":0.2013, - "price_int":"492200", - "amount_int":"20130000", - "stamp":"1328483189043700" - }, - { - "price":4.92214, - "amount":0.46620203, - "price_int":"492214", - "amount_int":"46620203", - "stamp":"1326841440198141" - }, - { - "price":4.924, - "amount":1.05, - "price_int":"492400", - "amount_int":"105000000", - "stamp":"1328644666333934" - }, - { - "price":4.92542, - "amount":0.02101323, - "price_int":"492542", - "amount_int":"2101323", - "stamp":"1326840385922563" - }, - { - "price":4.92627, - "amount":0.06785, - "price_int":"492627", - "amount_int":"6785000", - "stamp":"1328328296464805" - }, - { - "price":4.92677, - "amount":1.2898, - "price_int":"492677", - "amount_int":"128980000", - "stamp":"1328589797024999" - }, - { - "price":4.92703, - "amount":1.66468, - "price_int":"492703", - "amount_int":"166468000", - "stamp":"1328243839267556" - }, - { - "price":4.9273, - "amount":0.60885272, - "price_int":"492730", - "amount_int":"60885272", - "stamp":"1328449225780000" - }, - { - "price":4.92751, - "amount":0.22099, - "price_int":"492751", - "amount_int":"22099000", - "stamp":"1328381186711986" - }, - { - "price":4.9279, - "amount":0.16173, - "price_int":"492790", - "amount_int":"16173000", - "stamp":"1328132985149205" - }, - { - "price":4.92961, - "amount":5, - "price_int":"492961", - "amount_int":"500000000", - "stamp":"1327593893813852" - }, - { - "price":4.93, - "amount":327.65301622, - "price_int":"493000", - "amount_int":"32765301622", - "stamp":"1327318592991831" - }, - { - "price":4.93137, - "amount":0.06773179, - "price_int":"493137", - "amount_int":"6773179", - "stamp":"1326840677235029" - }, - { - "price":4.932, - "amount":0.46599341, - "price_int":"493200", - "amount_int":"46599341", - "stamp":"1326841437263117" - }, - { - "price":4.93231, - "amount":14.99333, - "price_int":"493231", - "amount_int":"1499333000", - "stamp":"1328132876141745" - }, - { - "price":4.93235, - "amount":0.20618, - "price_int":"493235", - "amount_int":"20618000", - "stamp":"1328568850232469" - }, - { - "price":4.93413, - "amount":0.53764, - "price_int":"493413", - "amount_int":"53764000", - "stamp":"1328137410407728" - }, - { - "price":4.93528, - "amount":2.19186, - "price_int":"493528", - "amount_int":"219186000", - "stamp":"1328135922644551" - }, - { - "price":4.93789, - "amount":0.02102889, - "price_int":"493789", - "amount_int":"2102889", - "stamp":"1326840949639671" - }, - { - "price":4.93898, - "amount":0.0202, - "price_int":"493898", - "amount_int":"2020000", - "stamp":"1327572854201796" - }, - { - "price":4.9396, - "amount":0.60733663, - "price_int":"493960", - "amount_int":"60733663", - "stamp":"1328449225344370" - }, - { - "price":4.94, - "amount":28.29457894, - "price_int":"494000", - "amount_int":"2829457894", - "stamp":"1328637449599098" - }, - { - "price":4.94118, - "amount":0.06770155, - "price_int":"494118", - "amount_int":"6770155", - "stamp":"1326840674856722" - }, - { - "price":4.94186, - "amount":0.30507591, - "price_int":"494186", - "amount_int":"30507591", - "stamp":"1326841434272366" - }, - { - "price":4.944, - "amount":0.0202, - "price_int":"494400", - "amount_int":"2020000", - "stamp":"1327572857493685" - }, - { - "price":4.947, - "amount":39.03346674, - "price_int":"494700", - "amount_int":"3903346674", - "stamp":"1328475551388645" - }, - { - "price":4.94746, - "amount":1, - "price_int":"494746", - "amount_int":"100000000", - "stamp":"1328549184249987" - }, - { - "price":4.95, - "amount":48.22655151, - "price_int":"495000", - "amount_int":"4822655151", - "stamp":"1328637449599665" - }, - { - "price":4.95001, - "amount":5, - "price_int":"495001", - "amount_int":"500000000", - "stamp":"1326841358699152" - }, - { - "price":4.9503, - "amount":12.46304, - "price_int":"495030", - "amount_int":"1246304000", - "stamp":"1328136703223787" - }, - { - "price":4.95036, - "amount":0.021031, - "price_int":"495036", - "amount_int":"2103100", - "stamp":"1326840946337313" - }, - { - "price":4.95098, - "amount":0.0677227, - "price_int":"495098", - "amount_int":"6772270", - "stamp":"1326840672301992" - }, - { - "price":4.95139, - "amount":6.68547651, - "price_int":"495139", - "amount_int":"668547651", - "stamp":"1327644504032585" - }, - { - "price":4.9516, - "amount":290, - "price_int":"495160", - "amount_int":"29000000000", - "stamp":"1328567693698020" - }, - { - "price":4.95173, - "amount":0.30507091, - "price_int":"495173", - "amount_int":"30507091", - "stamp":"1326841430885956" - }, - { - "price":4.95178, - "amount":0.40021, - "price_int":"495178", - "amount_int":"40021000", - "stamp":"1328135815048572" - }, - { - "price":4.9519, - "amount":0.60582807, - "price_int":"495190", - "amount_int":"60582807", - "stamp":"1328449224888349" - }, - { - "price":4.95404, - "amount":0.0202, - "price_int":"495404", - "amount_int":"2020000", - "stamp":"1327572850718359" - }, - { - "price":4.95746, - "amount":0.36521, - "price_int":"495746", - "amount_int":"36521000", - "stamp":"1328565869210631" - }, - { - "price":4.959, - "amount":0.18735, - "price_int":"495900", - "amount_int":"18735000", - "stamp":"1328595035380006" - }, - { - "price":4.95946, - "amount":4.48704, - "price_int":"495946", - "amount_int":"448704000", - "stamp":"1328135857485406" - }, - { - "price":4.95988, - "amount":0.16502, - "price_int":"495988", - "amount_int":"16502000", - "stamp":"1328507522762608" - }, - { - "price":4.96, - "amount":0.01, - "price_int":"496000", - "amount_int":"1000000", - "stamp":"1327318598768413" - }, - { - "price":4.96004, - "amount":0.89338, - "price_int":"496004", - "amount_int":"89338000", - "stamp":"1328230911464929" - }, - { - "price":4.9601, - "amount":10, - "price_int":"496010", - "amount_int":"1000000000", - "stamp":"1328460427779574" - }, - { - "price":4.96035, - "amount":3.65951, - "price_int":"496035", - "amount_int":"365951000", - "stamp":"1327742342900739" - }, - { - "price":4.96078, - "amount":0.06770642, - "price_int":"496078", - "amount_int":"6770642", - "stamp":"1326840668528511" - }, - { - "price":4.96159, - "amount":0.30496589, - "price_int":"496159", - "amount_int":"30496589", - "stamp":"1326841428105115" - }, - { - "price":4.96232, - "amount":2.20153846, - "price_int":"496232", - "amount_int":"220153846", - "stamp":"1328007706996785" - }, - { - "price":4.96283, - "amount":0.02101685, - "price_int":"496283", - "amount_int":"2101685", - "stamp":"1326840382614565" - }, - { - "price":4.96306, - "amount":0.01935, - "price_int":"496306", - "amount_int":"1935000", - "stamp":"1328643289199255" - }, - { - "price":4.96389, - "amount":0.63663, - "price_int":"496389", - "amount_int":"63663000", - "stamp":"1328506919649908" - }, - { - "price":4.9643, - "amount":0.60431481, - "price_int":"496430", - "amount_int":"60431481", - "stamp":"1328449224509519" - }, - { - "price":4.96584, - "amount":0.14663, - "price_int":"496584", - "amount_int":"14663000", - "stamp":"1328135891680858" - }, - { - "price":4.96727, - "amount":0.08012, - "price_int":"496727", - "amount_int":"8012000", - "stamp":"1328234827118743" - }, - { - "price":4.96812, - "amount":1.14111, - "price_int":"496812", - "amount_int":"114111000", - "stamp":"1328642478645976" - }, - { - "price":4.96829, - "amount":4.18531, - "price_int":"496829", - "amount_int":"418531000", - "stamp":"1328134861113930" - }, - { - "price":4.9683, - "amount":0.59546, - "price_int":"496830", - "amount_int":"59546000", - "stamp":"1328134898490957" - }, - { - "price":4.96854, - "amount":0.74968, - "price_int":"496854", - "amount_int":"74968000", - "stamp":"1328200518787332" - }, - { - "price":4.9691, - "amount":0.0202, - "price_int":"496910", - "amount_int":"2020000", - "stamp":"1327572847402796" - }, - { - "price":4.97, - "amount":22.59, - "price_int":"497000", - "amount_int":"2259000000", - "stamp":"1328586426641998" - }, - { - "price":4.97001, - "amount":8.50312293, - "price_int":"497001", - "amount_int":"850312293", - "stamp":"1328644624313662" - }, - { - "price":4.97059, - "amount":0.06768773, - "price_int":"497059", - "amount_int":"6768773", - "stamp":"1326840666264298" - }, - { - "price":4.971, - "amount":166, - "price_int":"497100", - "amount_int":"16600000000", - "stamp":"1328567855517266" - }, - { - "price":4.97146, - "amount":0.30496066, - "price_int":"497146", - "amount_int":"30496066", - "stamp":"1326841425301283" - }, - { - "price":4.9753, - "amount":0.02161699, - "price_int":"497530", - "amount_int":"2161699", - "stamp":"1327725544760992" - }, - { - "price":4.97603, - "amount":0.06399, - "price_int":"497603", - "amount_int":"6399000", - "stamp":"1328328296904970" - }, - { - "price":4.97654, - "amount":0.06531, - "price_int":"497654", - "amount_int":"6531000", - "stamp":"1328134684939048" - }, - { - "price":4.9767, - "amount":0.60280909, - "price_int":"497670", - "amount_int":"60280909", - "stamp":"1328449224058056" - }, - { - "price":4.97679, - "amount":1.573, - "price_int":"497679", - "amount_int":"157300000", - "stamp":"1328243839700940" - }, - { - "price":4.97728, - "amount":0.20891, - "price_int":"497728", - "amount_int":"20891000", - "stamp":"1328381187159905" - }, - { - "price":4.97767, - "amount":0.15257, - "price_int":"497767", - "amount_int":"15257000", - "stamp":"1328132985641625" - }, - { - "price":4.98, - "amount":1.02, - "price_int":"498000", - "amount_int":"102000000", - "stamp":"1328637449018401" - }, - { - "price":4.98039, - "amount":0.06767246, - "price_int":"498039", - "amount_int":"6767246", - "stamp":"1326840663639376" - }, - { - "price":4.98132, - "amount":0.30511293, - "price_int":"498132", - "amount_int":"30511293", - "stamp":"1326841422605948" - }, - { - "price":4.98213, - "amount":14.109, - "price_int":"498213", - "amount_int":"1410900000", - "stamp":"1328132876630544" - }, - { - "price":4.98217, - "amount":0.18919, - "price_int":"498217", - "amount_int":"18919000", - "stamp":"1328568850676140" - }, - { - "price":4.98397, - "amount":0.50887, - "price_int":"498397", - "amount_int":"50887000", - "stamp":"1328137410932834" - }, - { - "price":4.98513, - "amount":2.08123, - "price_int":"498513", - "amount_int":"208123000", - "stamp":"1328135923180220" - }, - { - "price":4.986, - "amount":0.15485, - "price_int":"498600", - "amount_int":"15485000", - "stamp":"1328049545640047" - }, - { - "price":4.987, - "amount":191, - "price_int":"498700", - "amount_int":"19100000000", - "stamp":"1328567919687473" - }, - { - "price":4.98751, - "amount":15, - "price_int":"498751", - "amount_int":"1500000000", - "stamp":"1327144714732324" - }, - { - "price":4.98777, - "amount":0.02161635, - "price_int":"498777", - "amount_int":"2161635", - "stamp":"1327727722065848" - }, - { - "price":4.9891, - "amount":0.60131086, - "price_int":"498910", - "amount_int":"60131086", - "stamp":"1328449223523869" - }, - { - "price":4.99, - "amount":65.10158517, - "price_int":"499000", - "amount_int":"6510158517", - "stamp":"1328502330743011" - }, - { - "price":4.9902, - "amount":0.06764941, - "price_int":"499020", - "amount_int":"6764941", - "stamp":"1326840661031766" - }, - { - "price":4.99118, - "amount":0.30511091, - "price_int":"499118", - "amount_int":"30511091", - "stamp":"1326841419813789" - }, - { - "price":4.99368, - "amount":32.93064306, - "price_int":"499368", - "amount_int":"3293064306", - "stamp":"1328578033250731" - }, - { - "price":4.99921, - "amount":0.0404, - "price_int":"499921", - "amount_int":"4040000", - "stamp":"1327572841379739" - }, - { - "price":5, - "amount":4305.46077347, - "price_int":"500000", - "amount_int":"430546077347", - "stamp":"1328636760750690" - }, - { - "price":5.00001, - "amount":141.3997, - "price_int":"500001", - "amount_int":"14139970000", - "stamp":"1327864184890333" - }, - { - "price":5.0001, - "amount":2, - "price_int":"500010", - "amount_int":"200000000", - "stamp":"1327003552420488" - }, - { - "price":5.0002, - "amount":10, - "price_int":"500020", - "amount_int":"1000000000", - "stamp":"1328003194542454" - }, - { - "price":5.00024, - "amount":0.02162024, - "price_int":"500024", - "amount_int":"2162024", - "stamp":"1327731594006172" - }, - { - "price":5.00031, - "amount":11.79869, - "price_int":"500031", - "amount_int":"1179869000", - "stamp":"1328136703795473" - }, - { - "price":5.001, - "amount":43.5, - "price_int":"500100", - "amount_int":"4350000000", - "stamp":"1328506402971247" - }, - { - "price":5.00105, - "amount":0.30509273, - "price_int":"500105", - "amount_int":"30509273", - "stamp":"1326841417130196" - }, - { - "price":5.0016, - "amount":0.59980806, - "price_int":"500160", - "amount_int":"59980806", - "stamp":"1328449223199839" - }, - { - "price":5.0018, - "amount":0.37923, - "price_int":"500180", - "amount_int":"37923000", - "stamp":"1328135815533645" - }, - { - "price":5.004, - "amount":1.04, - "price_int":"500400", - "amount_int":"104000000", - "stamp":"1328644618707978" - }, - { - "price":5.00447, - "amount":0.0202, - "price_int":"500447", - "amount_int":"2020000", - "stamp":"1327572844614399" - }, - { - "price":5.005, - "amount":6.37797602, - "price_int":"500500", - "amount_int":"637797602", - "stamp":"1328136910995747" - }, - { - "price":5.00753, - "amount":0.42421, - "price_int":"500753", - "amount_int":"42421000", - "stamp":"1328642436297017" - }, - { - "price":5.00955, - "amount":4.25478, - "price_int":"500955", - "amount_int":"425478000", - "stamp":"1328135858001137" - }, - { - "price":5.0098, - "amount":0.0677881, - "price_int":"500980", - "amount_int":"6778810", - "stamp":"1326840653281636" - }, - { - "price":5.00998, - "amount":0.15303, - "price_int":"500998", - "amount_int":"15303000", - "stamp":"1328507523381273" - }, - { - "price":5.01, - "amount":1269.62513411, - "price_int":"501000", - "amount_int":"126962513411", - "stamp":"1328632607303229" - }, - { - "price":5.01001, - "amount":7.70033792, - "price_int":"501001", - "amount_int":"770033792", - "stamp":"1327875427897471" - }, - { - "price":5.01014, - "amount":0.84197, - "price_int":"501014", - "amount_int":"84197000", - "stamp":"1328230911984594" - }, - { - "price":5.0103, - "amount":6.8138, - "price_int":"501030", - "amount_int":"681380000", - "stamp":"1326840007804798" - }, - { - "price":5.01091, - "amount":0.30452985, - "price_int":"501091", - "amount_int":"30452985", - "stamp":"1326841414376304" - }, - { - "price":5.011, - "amount":1269.8658, - "price_int":"501100", - "amount_int":"126986580000", - "stamp":"1328569289854607" - }, - { - "price":5.01101, - "amount":7.5, - "price_int":"501101", - "amount_int":"750000000", - "stamp":"1327835247288413" - }, - { - "price":5.0113, - "amount":23.313113, - "price_int":"501130", - "amount_int":"2331311300", - "stamp":"1327653596123042" - }, - { - "price":5.01137, - "amount":18.8138, - "price_int":"501137", - "amount_int":"1881380000", - "stamp":"1327667520748679" - }, - { - "price":5.012, - "amount":51.89136272, - "price_int":"501200", - "amount_int":"5189136272", - "stamp":"1328133162907279" - }, - { - "price":5.01271, - "amount":0.02162103, - "price_int":"501271", - "amount_int":"2162103", - "stamp":"1327731591025859" - }, - { - "price":5.01319, - "amount":0.018, - "price_int":"501319", - "amount_int":"1800000", - "stamp":"1328643289651561" - }, - { - "price":5.01403, - "amount":0.58954, - "price_int":"501403", - "amount_int":"58954000", - "stamp":"1328506920166019" - }, - { - "price":5.0141, - "amount":0.59831276, - "price_int":"501410", - "amount_int":"59831276", - "stamp":"1328449222774729" - }, - { - "price":5.01427, - "amount":0.02026215, - "price_int":"501427", - "amount_int":"2026215", - "stamp":"1327648195476216" - }, - { - "price":5.016, - "amount":0.13904, - "price_int":"501600", - "amount_int":"13904000", - "stamp":"1328135892290792" - }, - { - "price":5.0163, - "amount":12.5, - "price_int":"501630", - "amount_int":"1250000000", - "stamp":"1327879980620857" - }, - { - "price":5.017, - "amount":0.9966, - "price_int":"501700", - "amount_int":"99660000", - "stamp":"1326991385617258" - }, - { - "price":5.01744, - "amount":0.07548, - "price_int":"501744", - "amount_int":"7548000", - "stamp":"1328234827563124" - }, - { - "price":5.018, - "amount":50, - "price_int":"501800", - "amount_int":"5000000000", - "stamp":"1328346357297664" - }, - { - "price":5.0183, - "amount":1.05912, - "price_int":"501830", - "amount_int":"105912000", - "stamp":"1328642479102218" - }, - { - "price":5.01847, - "amount":3.95319, - "price_int":"501847", - "amount_int":"395319000", - "stamp":"1328134861594184" - }, - { - "price":5.01848, - "amount":0.56253, - "price_int":"501848", - "amount_int":"56253000", - "stamp":"1328134899092775" - }, - { - "price":5.01859, - "amount":5, - "price_int":"501859", - "amount_int":"500000000", - "stamp":"1327682657505574" - }, - { - "price":5.01872, - "amount":0.70894, - "price_int":"501872", - "amount_int":"70894000", - "stamp":"1328200519254977" - }, - { - "price":5.01898, - "amount":80, - "price_int":"501898", - "amount_int":"8000000000", - "stamp":"1328533547959604" - }, - { - "price":5.01961, - "amount":0.06776375, - "price_int":"501961", - "amount_int":"6776375", - "stamp":"1326840650556375" - }, - { - "price":5.01966, - "amount":7.7309026, - "price_int":"501966", - "amount_int":"773090260", - "stamp":"1328644624031336" - }, - { - "price":5.02, - "amount":4803.27731075, - "price_int":"502000", - "amount_int":"480327731075", - "stamp":"1328340057497844" - }, - { - "price":5.02001, - "amount":40, - "price_int":"502001", - "amount_int":"4000000000", - "stamp":"1327875419487777" - }, - { - "price":5.02078, - "amount":0.30452805, - "price_int":"502078", - "amount_int":"30452805", - "stamp":"1326841411623431" - }, - { - "price":5.021, - "amount":0.4, - "price_int":"502100", - "amount_int":"40000000", - "stamp":"1326956930477665" - }, - { - "price":5.02123, - "amount":20, - "price_int":"502123", - "amount_int":"2000000000", - "stamp":"1327683698222887" - }, - { - "price":5.022, - "amount":580, - "price_int":"502200", - "amount_int":"58000000000", - "stamp":"1328567498077145" - }, - { - "price":5.02201, - "amount":300, - "price_int":"502201", - "amount_int":"30000000000", - "stamp":"1328579372054033" - }, - { - "price":5.025, - "amount":35, - "price_int":"502500", - "amount_int":"3500000000", - "stamp":"1327751740659528" - }, - { - "price":5.02501, - "amount":1000, - "price_int":"502501", - "amount_int":"100000000000", - "stamp":"1328464085588650" - }, - { - "price":5.02518, - "amount":0.02161867, - "price_int":"502518", - "amount_int":"2161867", - "stamp":"1327731587750819" - }, - { - "price":5.026, - "amount":20, - "price_int":"502600", - "amount_int":"2000000000", - "stamp":"1328574047504810" - }, - { - "price":5.0262, - "amount":47.61868848, - "price_int":"502620", - "amount_int":"4761868848", - "stamp":"1328534142756895" - }, - { - "price":5.02629, - "amount":0.06016, - "price_int":"502629", - "amount_int":"6016000", - "stamp":"1328328297352708" - }, - { - "price":5.0266, - "amount":0.59682489, - "price_int":"502660", - "amount_int":"59682489", - "stamp":"1328449222446119" - }, - { - "price":5.02681, - "amount":0.06172, - "price_int":"502681", - "amount_int":"6172000", - "stamp":"1328134685560664" - }, - { - "price":5.02706, - "amount":1.48223, - "price_int":"502706", - "amount_int":"148223000", - "stamp":"1328243840143185" - }, - { - "price":5.02755, - "amount":0.19695, - "price_int":"502755", - "amount_int":"19695000", - "stamp":"1328381188325868" - }, - { - "price":5.02764, - "amount":6.50922744, - "price_int":"502764", - "amount_int":"650922744", - "stamp":"1327712623059532" - }, - { - "price":5.02795, - "amount":0.14349, - "price_int":"502795", - "amount_int":"14349000", - "stamp":"1328132986245535" - }, - { - "price":5.028, - "amount":40, - "price_int":"502800", - "amount_int":"4000000000", - "stamp":"1327751752949318" - }, - { - "price":5.02933, - "amount":0.0202, - "price_int":"502933", - "amount_int":"2020000", - "stamp":"1327572775253728" - }, - { - "price":5.02941, - "amount":0.06773557, - "price_int":"502941", - "amount_int":"6773557", - "stamp":"1326840647995943" - }, - { - "price":5.03, - "amount":132.2843, - "price_int":"503000", - "amount_int":"13228430000", - "stamp":"1328637448746909" - }, - { - "price":5.03001, - "amount":40, - "price_int":"503001", - "amount_int":"4000000000", - "stamp":"1327875410659287" - }, - { - "price":5.03015, - "amount":5, - "price_int":"503015", - "amount_int":"500000000", - "stamp":"1328466289116258" - }, - { - "price":5.03064, - "amount":0.3045019, - "price_int":"503064", - "amount_int":"30450190", - "stamp":"1326841408974341" - }, - { - "price":5.03091, - "amount":6.46408032, - "price_int":"503091", - "amount_int":"646408032", - "stamp":"1327659472155521" - }, - { - "price":5.031, - "amount":10, - "price_int":"503100", - "amount_int":"1000000000", - "stamp":"1328433367787413" - }, - { - "price":5.03113, - "amount":8.8138, - "price_int":"503113", - "amount_int":"881380000", - "stamp":"1326841547869513" - }, - { - "price":5.032, - "amount":45, - "price_int":"503200", - "amount_int":"4500000000", - "stamp":"1327751783039678" - }, - { - "price":5.03212, - "amount":6.49721321, - "price_int":"503212", - "amount_int":"649721321", - "stamp":"1327688204955612" - }, - { - "price":5.03245, - "amount":13.23352, - "price_int":"503245", - "amount_int":"1323352000", - "stamp":"1328132877224353" - }, - { - "price":5.0325, - "amount":20.17238, - "price_int":"503250", - "amount_int":"2017238000", - "stamp":"1328568851129411" - }, - { - "price":5.0326, - "amount":10, - "price_int":"503260", - "amount_int":"1000000000", - "stamp":"1327751839815507" - }, - { - "price":5.033, - "amount":25, - "price_int":"503300", - "amount_int":"2500000000", - "stamp":"1327593622034734" - }, - { - "price":5.034, - "amount":10, - "price_int":"503400", - "amount_int":"1000000000", - "stamp":"1326840839011587" - }, - { - "price":5.03431, - "amount":0.48039, - "price_int":"503431", - "amount_int":"48039000", - "stamp":"1328137411441943" - }, - { - "price":5.03479, - "amount":1, - "price_int":"503479", - "amount_int":"100000000", - "stamp":"1326840455016086" - }, - { - "price":5.03534, - "amount":6.48594634, - "price_int":"503534", - "amount_int":"648594634", - "stamp":"1327709094245470" - }, - { - "price":5.03548, - "amount":1.97171, - "price_int":"503548", - "amount_int":"197171000", - "stamp":"1328135923839891" - }, - { - "price":5.03765, - "amount":0.02161286, - "price_int":"503765", - "amount_int":"2161286", - "stamp":"1327731584722392" - }, - { - "price":5.03855, - "amount":6.48001975, - "price_int":"503855", - "amount_int":"648001975", - "stamp":"1327658645658087" - }, - { - "price":5.0391, - "amount":0.59534441, - "price_int":"503910", - "amount_int":"59534441", - "stamp":"1328449222195955" - }, - { - "price":5.03922, - "amount":0.06772071, - "price_int":"503922", - "amount_int":"6772071", - "stamp":"1326840644966773" - }, - { - "price":5.0399, - "amount":100, - "price_int":"503990", - "amount_int":"10000000000", - "stamp":"1326939992894359" - }, - { - "price":5.04, - "amount":1558.57, - "price_int":"504000", - "amount_int":"155857000000", - "stamp":"1327691035533835" - }, - { - "price":5.04001, - "amount":40, - "price_int":"504001", - "amount_int":"4000000000", - "stamp":"1327875403492274" - }, - { - "price":5.04013, - "amount":6.47519535, - "price_int":"504013", - "amount_int":"647519535", - "stamp":"1327710825360484" - }, - { - "price":5.0405, - "amount":0.30291725, - "price_int":"504050", - "amount_int":"30291725", - "stamp":"1326841405794843" - }, - { - "price":5.04084, - "amount":6.47224264, - "price_int":"504084", - "amount_int":"647224264", - "stamp":"1327711090881486" - }, - { - "price":5.043, - "amount":37, - "price_int":"504300", - "amount_int":"3700000000", - "stamp":"1327679736750051" - }, - { - "price":5.04439, - "amount":0.02026178, - "price_int":"504439", - "amount_int":"2026178", - "stamp":"1327649316023032" - }, - { - "price":5.045, - "amount":44, - "price_int":"504500", - "amount_int":"4400000000", - "stamp":"1327679667125513" - }, - { - "price":5.046, - "amount":32, - "price_int":"504600", - "amount_int":"3200000000", - "stamp":"1327679687433095" - }, - { - "price":5.04718, - "amount":0.45853, - "price_int":"504718", - "amount_int":"45853000", - "stamp":"1328464892990124" - }, - { - "price":5.04892, - "amount":17.4604, - "price_int":"504892", - "amount_int":"1746040000", - "stamp":"1327634335449104" - }, - { - "price":5.04902, - "amount":0.06770285, - "price_int":"504902", - "amount_int":"6770285", - "stamp":"1326840642885832" - }, - { - "price":5.04964, - "amount":6.45040672, - "price_int":"504964", - "amount_int":"645040672", - "stamp":"1327711370761110" - }, - { - "price":5.05, - "amount":411.46965544, - "price_int":"505000", - "amount_int":"41146965544", - "stamp":"1328607830135531" - }, - { - "price":5.05001, - "amount":90, - "price_int":"505001", - "amount_int":"9000000000", - "stamp":"1328203922538072" - }, - { - "price":5.0501, - "amount":5, - "price_int":"505010", - "amount_int":"500000000", - "stamp":"1327636247344198" - }, - { - "price":5.05012, - "amount":0.02160488, - "price_int":"505012", - "amount_int":"2160488", - "stamp":"1327731582063456" - }, - { - "price":5.05037, - "amount":0.30486052, - "price_int":"505037", - "amount_int":"30486052", - "stamp":"1327634483658359" - }, - { - "price":5.05051, - "amount":197.00980693, - "price_int":"505051", - "amount_int":"19700980693", - "stamp":"1327996429198613" - }, - { - "price":5.05082, - "amount":11.141, - "price_int":"505082", - "amount_int":"1114100000", - "stamp":"1328136704251282" - }, - { - "price":5.051, - "amount":2.02, - "price_int":"505100", - "amount_int":"202000000", - "stamp":"1327684109453258" - }, - { - "price":5.0517, - "amount":0.59385949, - "price_int":"505170", - "amount_int":"59385949", - "stamp":"1328449221791569" - }, - { - "price":5.05232, - "amount":0.99455, - "price_int":"505232", - "amount_int":"99455000", - "stamp":"1328453414182422" - }, - { - "price":5.0525, - "amount":11, - "price_int":"505250", - "amount_int":"1100000000", - "stamp":"1328133337191830" - }, - { - "price":5.05292, - "amount":0.16679, - "price_int":"505292", - "amount_int":"16679000", - "stamp":"1327750903115481" - }, - { - "price":5.053, - "amount":133.56591968, - "price_int":"505300", - "amount_int":"13356591968", - "stamp":"1328519372776619" - }, - { - "price":5.055, - "amount":0.437272, - "price_int":"505500", - "amount_int":"43727200", - "stamp":"1327643044038033" - }, - { - "price":5.05555, - "amount":999, - "price_int":"505555", - "amount_int":"99900000000", - "stamp":"1328237792721658" - }, - { - "price":5.056, - "amount":39.8, - "price_int":"505600", - "amount_int":"3980000000", - "stamp":"1328547536131079" - }, - { - "price":5.05643, - "amount":5.86497915, - "price_int":"505643", - "amount_int":"586497915", - "stamp":"1328132251982454" - }, - { - "price":5.05811, - "amount":0.39342, - "price_int":"505811", - "amount_int":"39342000", - "stamp":"1328642436749495" - }, - { - "price":5.0583, - "amount":3, - "price_int":"505830", - "amount_int":"300000000", - "stamp":"1328434846636739" - }, - { - "price":5.05882, - "amount":0.06868869, - "price_int":"505882", - "amount_int":"6868869", - "stamp":"1327634804605272" - }, - { - "price":5.05921, - "amount":13.4286, - "price_int":"505921", - "amount_int":"1342860000", - "stamp":"1327954278317245" - }, - { - "price":5.05945, - "amount":0.0202, - "price_int":"505945", - "amount_int":"2020000", - "stamp":"1327572767756705" - }, - { - "price":5.06, - "amount":258.22845968, - "price_int":"506000", - "amount_int":"25822845968", - "stamp":"1328613034193789" - }, - { - "price":5.06001, - "amount":5, - "price_int":"506001", - "amount_int":"500000000", - "stamp":"1327643964532561" - }, - { - "price":5.06015, - "amount":4.02485, - "price_int":"506015", - "amount_int":"402485000", - "stamp":"1328135859312299" - }, - { - "price":5.06023, - "amount":0.30486976, - "price_int":"506023", - "amount_int":"30486976", - "stamp":"1327634586607064" - }, - { - "price":5.0605, - "amount":6.42114546, - "price_int":"506050", - "amount_int":"642114546", - "stamp":"1327681473734947" - }, - { - "price":5.06059, - "amount":0.14116, - "price_int":"506059", - "amount_int":"14116000", - "stamp":"1328507523985496" - }, - { - "price":5.06075, - "amount":0.79107, - "price_int":"506075", - "amount_int":"79107000", - "stamp":"1328230912498352" - }, - { - "price":5.06205, - "amount":0.27, - "price_int":"506205", - "amount_int":"27000000", - "stamp":"1327634509777631" - }, - { - "price":5.06235, - "amount":4.51887167, - "price_int":"506235", - "amount_int":"451887167", - "stamp":"1328003188357846" - }, - { - "price":5.06259, - "amount":0.0215962, - "price_int":"506259", - "amount_int":"2159620", - "stamp":"1327741907702185" - }, - { - "price":5.063, - "amount":0.25385, - "price_int":"506300", - "amount_int":"25385000", - "stamp":"1328367150731646" - }, - { - "price":5.06383, - "amount":0.01665, - "price_int":"506383", - "amount_int":"1665000", - "stamp":"1328643290103760" - }, - { - "price":5.0643, - "amount":0.59238197, - "price_int":"506430", - "amount_int":"59238197", - "stamp":"1328449221532786" - }, - { - "price":5.06468, - "amount":0.54293, - "price_int":"506468", - "amount_int":"54293000", - "stamp":"1328506920669156" - }, - { - "price":5.06506, - "amount":100, - "price_int":"506506", - "amount_int":"10000000000", - "stamp":"1328498664578419" - }, - { - "price":5.06667, - "amount":0.13153, - "price_int":"506667", - "amount_int":"13153000", - "stamp":"1328135892927770" - }, - { - "price":5.06725, - "amount":50, - "price_int":"506725", - "amount_int":"5000000000", - "stamp":"1328138233811665" - }, - { - "price":5.06804, - "amount":6.99273401, - "price_int":"506804", - "amount_int":"699273401", - "stamp":"1328644623736794" - }, - { - "price":5.06813, - "amount":0.0709, - "price_int":"506813", - "amount_int":"7090000", - "stamp":"1328234827986964" - }, - { - "price":5.06861, - "amount":6.38060936, - "price_int":"506861", - "amount_int":"638060936", - "stamp":"1327714270899522" - }, - { - "price":5.06863, - "amount":0.06868196, - "price_int":"506863", - "amount_int":"6868196", - "stamp":"1327634801608636" - }, - { - "price":5.06879, - "amount":6.39959923, - "price_int":"506879", - "amount_int":"639959923", - "stamp":"1327719531323260" - }, - { - "price":5.06899, - "amount":0.79009, - "price_int":"506899", - "amount_int":"79009000", - "stamp":"1328133116190635" - }, - { - "price":5.06917, - "amount":3.72339, - "price_int":"506917", - "amount_int":"372339000", - "stamp":"1328134862190578" - }, - { - "price":5.06918, - "amount":0.52993, - "price_int":"506918", - "amount_int":"52993000", - "stamp":"1328134899696897" - }, - { - "price":5.06942, - "amount":0.66862, - "price_int":"506942", - "amount_int":"66862000", - "stamp":"1328200519706195" - }, - { - "price":5.07, - "amount":53.31, - "price_int":"507000", - "amount_int":"5331000000", - "stamp":"1328451921019304" - }, - { - "price":5.0701, - "amount":0.30484559, - "price_int":"507010", - "amount_int":"30484559", - "stamp":"1327634583515312" - }, - { - "price":5.0711, - "amount":1279.45052552, - "price_int":"507110", - "amount_int":"127945052552", - "stamp":"1328052034163988" - }, - { - "price":5.07144, - "amount":50, - "price_int":"507144", - "amount_int":"5000000000", - "stamp":"1328520269610732" - }, - { - "price":5.0745, - "amount":0.02024743, - "price_int":"507450", - "amount_int":"2024743", - "stamp":"1327637506259404" - }, - { - "price":5.075, - "amount":49, - "price_int":"507500", - "amount_int":"4900000000", - "stamp":"1327679598863218" - }, - { - "price":5.07506, - "amount":0.02158571, - "price_int":"507506", - "amount_int":"2158571", - "stamp":"1327742205293938" - }, - { - "price":5.0769, - "amount":0.59091178, - "price_int":"507690", - "amount_int":"59091178", - "stamp":"1328449221152570" - }, - { - "price":5.077, - "amount":54, - "price_int":"507700", - "amount_int":"5400000000", - "stamp":"1327679610256046" - }, - { - "price":5.07706, - "amount":0.05637, - "price_int":"507706", - "amount_int":"5637000", - "stamp":"1328328297796452" - }, - { - "price":5.07758, - "amount":0.05815, - "price_int":"507758", - "amount_int":"5815000", - "stamp":"1328134686185593" - }, - { - "price":5.07784, - "amount":1.39237, - "price_int":"507784", - "amount_int":"139237000", - "stamp":"1328243840594758" - }, - { - "price":5.078, - "amount":1000, - "price_int":"507800", - "amount_int":"100000000000", - "stamp":"1328527103619592" - }, - { - "price":5.07834, - "amount":0.18511, - "price_int":"507834", - "amount_int":"18511000", - "stamp":"1328381189568901" - }, - { - "price":5.07843, - "amount":0.06867788, - "price_int":"507843", - "amount_int":"6867788", - "stamp":"1327634857215467" - }, - { - "price":5.07874, - "amount":0.1345, - "price_int":"507874", - "amount_int":"13450000", - "stamp":"1328132986738260" - }, - { - "price":5.07996, - "amount":0.30486385, - "price_int":"507996", - "amount_int":"30486385", - "stamp":"1327634580321247" - }, - { - "price":5.08, - "amount":95.01, - "price_int":"508000", - "amount_int":"9501000000", - "stamp":"1327811721035023" - }, - { - "price":5.08329, - "amount":12.36679, - "price_int":"508329", - "amount_int":"1236679000", - "stamp":"1328132877754751" - }, - { - "price":5.08333, - "amount":0.15573, - "price_int":"508333", - "amount_int":"15573000", - "stamp":"1328568851581588" - }, - { - "price":5.085, - "amount":5, - "price_int":"508500", - "amount_int":"500000000", - "stamp":"1327656945701185" - }, - { - "price":5.08517, - "amount":0.45219, - "price_int":"508517", - "amount_int":"45219000", - "stamp":"1328137412056263" - }, - { - "price":5.08582, - "amount":1.46013, - "price_int":"508582", - "amount_int":"146013000", - "stamp":"1328644466120487" - }, - { - "price":5.08635, - "amount":1.86329, - "price_int":"508635", - "amount_int":"186329000", - "stamp":"1328135924333253" - }, - { - "price":5.08824, - "amount":0.06868324, - "price_int":"508824", - "amount_int":"6868324", - "stamp":"1327636337917416" - }, - { - "price":5.08956, - "amount":279.92124731, - "price_int":"508956", - "amount_int":"27992124731", - "stamp":"1328559049218093" - }, - { - "price":5.0896, - "amount":0.58943728, - "price_int":"508960", - "amount_int":"58943728", - "stamp":"1328449220716787" - }, - { - "price":5.08969, - "amount":81.34, - "price_int":"508969", - "amount_int":"8134000000", - "stamp":"1328181853368332" - }, - { - "price":5.08982, - "amount":0.3049609, - "price_int":"508982", - "amount_int":"30496090", - "stamp":"1327635687165186" - }, - { - "price":5.09, - "amount":235.54, - "price_int":"509000", - "amount_int":"23554000000", - "stamp":"1328559473879539" - }, - { - "price":5.09626, - "amount":0.5977, - "price_int":"509626", - "amount_int":"59770000", - "stamp":"1328596676792518" - }, - { - "price":5.097, - "amount":0.18735, - "price_int":"509700", - "amount_int":"18735000", - "stamp":"1328595027734160" - }, - { - "price":5.09804, - "amount":0.06868274, - "price_int":"509804", - "amount_int":"6868274", - "stamp":"1327636395253465" - }, - { - "price":5.09969, - "amount":0.30501663, - "price_int":"509969", - "amount_int":"30501663", - "stamp":"1327635683949079" - }, - { - "price":5.09999, - "amount":0.02156585, - "price_int":"509999", - "amount_int":"2156585", - "stamp":"1327742460382873" - }, - { - "price":5.1, - "amount":2099.75598036, - "price_int":"510000", - "amount_int":"209975598036", - "stamp":"1328628972487796" - }, - { - "price":5.1001, - "amount":502, - "price_int":"510010", - "amount_int":"50200000000", - "stamp":"1328100414176105" - }, - { - "price":5.10015, - "amount":5, - "price_int":"510015", - "amount_int":"500000000", - "stamp":"1327640391814186" - }, - { - "price":5.1009, - "amount":2.73467819, - "price_int":"510090", - "amount_int":"273467819", - "stamp":"1327692787406959" - }, - { - "price":5.101, - "amount":64, - "price_int":"510100", - "amount_int":"6400000000", - "stamp":"1328491239586242" - }, - { - "price":5.1012, - "amount":1.18033403, - "price_int":"510120", - "amount_int":"118033403", - "stamp":"1327728536088556" - }, - { - "price":5.10183, - "amount":10.48988, - "price_int":"510183", - "amount_int":"1048988000", - "stamp":"1328136704692230" - }, - { - "price":5.102, - "amount":40.5625, - "price_int":"510200", - "amount_int":"4056250000", - "stamp":"1328617593166416" - }, - { - "price":5.10228, - "amount":90, - "price_int":"510228", - "amount_int":"9000000000", - "stamp":"1328600343655540" - }, - { - "price":5.1023, - "amount":0.58797013, - "price_int":"510230", - "amount_int":"58797013", - "stamp":"1328449220304544" - }, - { - "price":5.103, - "amount":0.14208, - "price_int":"510300", - "amount_int":"14208000", - "stamp":"1327840991099963" - }, - { - "price":5.10335, - "amount":0.33791, - "price_int":"510335", - "amount_int":"33791000", - "stamp":"1328135819970137" - }, - { - "price":5.1036, - "amount":50.21592849, - "price_int":"510360", - "amount_int":"5021592849", - "stamp":"1328567757457885" - }, - { - "price":5.105, - "amount":0.34413712, - "price_int":"510500", - "amount_int":"34413712", - "stamp":"1327967514728569" - }, - { - "price":5.10547, - "amount":20, - "price_int":"510547", - "amount_int":"2000000000", - "stamp":"1327931152934785" - }, - { - "price":5.10784, - "amount":0.06845939, - "price_int":"510784", - "amount_int":"6845939", - "stamp":"1327637243283904" - }, - { - "price":5.108, - "amount":5, - "price_int":"510800", - "amount_int":"500000000", - "stamp":"1327656936003704" - }, - { - "price":5.10921, - "amount":0.36292, - "price_int":"510921", - "amount_int":"36292000", - "stamp":"1328642437216191" - }, - { - "price":5.10955, - "amount":0.3050626, - "price_int":"510955", - "amount_int":"30506260", - "stamp":"1327635680748082" - }, - { - "price":5.10977, - "amount":20, - "price_int":"510977", - "amount_int":"2000000000", - "stamp":"1327887862129823" - }, - { - "price":5.11, - "amount":70.6295, - "price_int":"511000", - "amount_int":"7062950000", - "stamp":"1328132570116089" - }, - { - "price":5.1101, - "amount":88.68194751, - "price_int":"511010", - "amount_int":"8868194751", - "stamp":"1328604996791955" - }, - { - "price":5.111, - "amount":210.43247309, - "price_int":"511100", - "amount_int":"21043247309", - "stamp":"1327769385483596" - }, - { - "price":5.11112, - "amount":3.8138, - "price_int":"511112", - "amount_int":"381380000", - "stamp":"1328591028155372" - }, - { - "price":5.11127, - "amount":3.79722, - "price_int":"511127", - "amount_int":"379722000", - "stamp":"1328135859924738" - }, - { - "price":5.1117, - "amount":0.1294, - "price_int":"511170", - "amount_int":"12940000", - "stamp":"1328507524491091" - }, - { - "price":5.11187, - "amount":0.74068, - "price_int":"511187", - "amount_int":"74068000", - "stamp":"1328230913012761" - }, - { - "price":5.112, - "amount":0.8, - "price_int":"511200", - "amount_int":"80000000", - "stamp":"1328540008871431" - }, - { - "price":5.11246, - "amount":0.02155466, - "price_int":"511246", - "amount_int":"2155466", - "stamp":"1327742456757744" - }, - { - "price":5.1126, - "amount":0.72, - "price_int":"511260", - "amount_int":"72000000", - "stamp":"1328458639454462" - }, - { - "price":5.11498, - "amount":0.01532, - "price_int":"511498", - "amount_int":"1532000", - "stamp":"1328643290540012" - }, - { - "price":5.115, - "amount":10.69011026, - "price_int":"511500", - "amount_int":"1069011026", - "stamp":"1328449218737109" - }, - { - "price":5.1151, - "amount":6.28847596, - "price_int":"511510", - "amount_int":"628847596", - "stamp":"1328644623442121" - }, - { - "price":5.11584, - "amount":0.49678, - "price_int":"511584", - "amount_int":"49678000", - "stamp":"1328506921198434" - }, - { - "price":5.11605, - "amount":350, - "price_int":"511605", - "amount_int":"35000000000", - "stamp":"1328568077447288" - }, - { - "price":5.11625, - "amount":6.64002486, - "price_int":"511625", - "amount_int":"664002486", - "stamp":"1327870181064300" - }, - { - "price":5.11765, - "amount":0.06846171, - "price_int":"511765", - "amount_int":"6846171", - "stamp":"1327637288654691" - }, - { - "price":5.11785, - "amount":0.12409, - "price_int":"511785", - "amount_int":"12409000", - "stamp":"1328135893407452" - }, - { - "price":5.11854, - "amount":20, - "price_int":"511854", - "amount_int":"2000000000", - "stamp":"1327652789360889" - }, - { - "price":5.11898, - "amount":50, - "price_int":"511898", - "amount_int":"5000000000", - "stamp":"1328533404482272" - }, - { - "price":5.11932, - "amount":0.06635, - "price_int":"511932", - "amount_int":"6635000", - "stamp":"1328234828427863" - }, - { - "price":5.11942, - "amount":0.30511826, - "price_int":"511942", - "amount_int":"30511826", - "stamp":"1327635677565321" - }, - { - "price":5.11951, - "amount":25, - "price_int":"511951", - "amount_int":"2500000000", - "stamp":"1328141165965233" - }, - { - "price":5.11968, - "amount":0.02026003, - "price_int":"511968", - "amount_int":"2026003", - "stamp":"1327649411166012" - }, - { - "price":5.12, - "amount":269.5256, - "price_int":"512000", - "amount_int":"26952560000", - "stamp":"1328637509385688" - }, - { - "price":5.12012, - "amount":3.8138, - "price_int":"512012", - "amount_int":"381380000", - "stamp":"1328591016033935" - }, - { - "price":5.12019, - "amount":0.73819, - "price_int":"512019", - "amount_int":"73819000", - "stamp":"1328133116676330" - }, - { - "price":5.12037, - "amount":3.49589, - "price_int":"512037", - "amount_int":"349589000", - "stamp":"1328134862806612" - }, - { - "price":5.12038, - "amount":0.49766, - "price_int":"512038", - "amount_int":"49766000", - "stamp":"1328134900310912" - }, - { - "price":5.12062, - "amount":0.62869, - "price_int":"512062", - "amount_int":"62869000", - "stamp":"1328200520150787" - }, - { - "price":5.12083, - "amount":0.08328, - "price_int":"512083", - "amount_int":"8328000", - "stamp":"1328132422666761" - }, - { - "price":5.1209, - "amount":8.8138, - "price_int":"512090", - "amount_int":"881380000", - "stamp":"1328590976598605" - }, - { - "price":5.1216, - "amount":0.78529, - "price_int":"512160", - "amount_int":"78529000", - "stamp":"1328146982380163" - }, - { - "price":5.12493, - "amount":0.02154823, - "price_int":"512493", - "amount_int":"2154823", - "stamp":"1327742454211728" - }, - { - "price":5.125, - "amount":2, - "price_int":"512500", - "amount_int":"200000000", - "stamp":"1327922748835390" - }, - { - "price":5.12543, - "amount":0.02026027, - "price_int":"512543", - "amount_int":"2026027", - "stamp":"1327649414519297" - }, - { - "price":5.12745, - "amount":0.06854433, - "price_int":"512745", - "amount_int":"6854433", - "stamp":"1327644674337243" - }, - { - "price":5.1278, - "amount":0.58504622, - "price_int":"512780", - "amount_int":"58504622", - "stamp":"1328449217969227" - }, - { - "price":5.12835, - "amount":0.05262, - "price_int":"512835", - "amount_int":"5262000", - "stamp":"1328328298236518" - }, - { - "price":5.12887, - "amount":0.05461, - "price_int":"512887", - "amount_int":"5461000", - "stamp":"1328134686821344" - }, - { - "price":5.12891, - "amount":8.30465968, - "price_int":"512891", - "amount_int":"830465968", - "stamp":"1327645410085362" - }, - { - "price":5.12913, - "amount":1.30341, - "price_int":"512913", - "amount_int":"130341000", - "stamp":"1328243841061335" - }, - { - "price":5.12928, - "amount":0.30549244, - "price_int":"512928", - "amount_int":"30549244", - "stamp":"1327646209244892" - }, - { - "price":5.12963, - "amount":0.17339, - "price_int":"512963", - "amount_int":"17339000", - "stamp":"1328381190005219" - }, - { - "price":5.13, - "amount":1.63092142, - "price_int":"513000", - "amount_int":"163092142", - "stamp":"1328469875705703" - }, - { - "price":5.13004, - "amount":0.1256, - "price_int":"513004", - "amount_int":"12560000", - "stamp":"1328132987229878" - }, - { - "price":5.131, - "amount":2, - "price_int":"513100", - "amount_int":"200000000", - "stamp":"1327872208130983" - }, - { - "price":5.13319, - "amount":8.07027988, - "price_int":"513319", - "amount_int":"807027988", - "stamp":"1328573054390975" - }, - { - "price":5.13356, - "amount":0.021573, - "price_int":"513356", - "amount_int":"2157300", - "stamp":"1327742464199081" - }, - { - "price":5.13463, - "amount":11.50872, - "price_int":"513463", - "amount_int":"1150872000", - "stamp":"1328132878269602" - }, - { - "price":5.13468, - "amount":0.13925, - "price_int":"513468", - "amount_int":"13925000", - "stamp":"1328568852038279" - }, - { - "price":5.13473, - "amount":0.02025989, - "price_int":"513473", - "amount_int":"2025989", - "stamp":"1327649408565044" - }, - { - "price":5.13653, - "amount":0.42427, - "price_int":"513653", - "amount_int":"42427000", - "stamp":"1328137414627149" - }, - { - "price":5.13725, - "amount":0.06856341, - "price_int":"513725", - "amount_int":"6856341", - "stamp":"1327646247200662" - }, - { - "price":5.1374, - "amount":0.02154552, - "price_int":"513740", - "amount_int":"2154552", - "stamp":"1327742451056072" - }, - { - "price":5.13772, - "amount":1.75595, - "price_int":"513772", - "amount_int":"175595000", - "stamp":"1328135924817828" - }, - { - "price":5.13914, - "amount":0.30724984, - "price_int":"513914", - "amount_int":"30724984", - "stamp":"1327646206049748" - }, - { - "price":5.14, - "amount":44.03, - "price_int":"514000", - "amount_int":"4403000000", - "stamp":"1328637448616389" - }, - { - "price":5.1406, - "amount":0.58358946, - "price_int":"514060", - "amount_int":"58358946", - "stamp":"1328449216480061" - }, - { - "price":5.14484, - "amount":10.15, - "price_int":"514484", - "amount_int":"1015000000", - "stamp":"1328573392091139" - }, - { - "price":5.14706, - "amount":0.068587, - "price_int":"514706", - "amount_int":"6858700", - "stamp":"1327646243556814" - }, - { - "price":5.148, - "amount":0.23324, - "price_int":"514800", - "amount_int":"23324000", - "stamp":"1328442054839297" - }, - { - "price":5.14901, - "amount":0.30732744, - "price_int":"514901", - "amount_int":"30732744", - "stamp":"1327646202803207" - }, - { - "price":5.14979, - "amount":0.02026702, - "price_int":"514979", - "amount_int":"2026702", - "stamp":"1327742520974181" - }, - { - "price":5.14987, - "amount":0.02154293, - "price_int":"514987", - "amount_int":"2154293", - "stamp":"1327742447735359" - }, - { - "price":5.15, - "amount":632.64512911, - "price_int":"515000", - "amount_int":"63264512911", - "stamp":"1328575680747300" - }, - { - "price":5.15001, - "amount":65, - "price_int":"515001", - "amount_int":"6500000000", - "stamp":"1327758198014010" - }, - { - "price":5.15005, - "amount":498, - "price_int":"515005", - "amount_int":"49800000000", - "stamp":"1328644767311688" - }, - { - "price":5.1501, - "amount":14.724, - "price_int":"515010", - "amount_int":"1472400000", - "stamp":"1327645770226566" - }, - { - "price":5.151, - "amount":5, - "price_int":"515100", - "amount_int":"500000000", - "stamp":"1327728481511184" - }, - { - "price":5.15144, - "amount":25, - "price_int":"515144", - "amount_int":"2500000000", - "stamp":"1328520254000330" - }, - { - "price":5.15148, - "amount":0.13581, - "price_int":"515148", - "amount_int":"13581000", - "stamp":"1328462036144250" - }, - { - "price":5.15337, - "amount":9.84526, - "price_int":"515337", - "amount_int":"984526000", - "stamp":"1328136705128098" - }, - { - "price":5.1534, - "amount":0.58213995, - "price_int":"515340", - "amount_int":"58213995", - "stamp":"1328449216061963" - }, - { - "price":5.154, - "amount":1, - "price_int":"515400", - "amount_int":"100000000", - "stamp":"1328644553276341" - }, - { - "price":5.1549, - "amount":0.31755, - "price_int":"515490", - "amount_int":"31755000", - "stamp":"1328135820489666" - }, - { - "price":5.15552, - "amount":23.7004, - "price_int":"515552", - "amount_int":"2370040000", - "stamp":"1327879937456382" - }, - { - "price":5.15686, - "amount":0.06861161, - "price_int":"515686", - "amount_int":"6861161", - "stamp":"1327646323683319" - }, - { - "price":5.15719, - "amount":0.12, - "price_int":"515719", - "amount_int":"12000000", - "stamp":"1327843767007106" - }, - { - "price":5.15887, - "amount":0.30729706, - "price_int":"515887", - "amount_int":"30729706", - "stamp":"1327646198430549" - }, - { - "price":5.159, - "amount":25, - "price_int":"515900", - "amount_int":"2500000000", - "stamp":"1328151399514700" - }, - { - "price":5.16, - "amount":2.14683658, - "price_int":"516000", - "amount_int":"214683658", - "stamp":"1328637448471473" - }, - { - "price":5.1601, - "amount":10.0996339, - "price_int":"516010", - "amount_int":"1009963390", - "stamp":"1327648254325128" - }, - { - "price":5.1603, - "amount":119.0014, - "price_int":"516030", - "amount_int":"11900140000", - "stamp":"1328542133279636" - }, - { - "price":5.16069, - "amount":5.61820759, - "price_int":"516069", - "amount_int":"561820759", - "stamp":"1328644623125232" - }, - { - "price":5.16081, - "amount":0.31353, - "price_int":"516081", - "amount_int":"31353000", - "stamp":"1328639472554312" - }, - { - "price":5.161, - "amount":222.38749854, - "price_int":"516100", - "amount_int":"22238749854", - "stamp":"1328458080732877" - }, - { - "price":5.16234, - "amount":0.0215429, - "price_int":"516234", - "amount_int":"2154290", - "stamp":"1327742444819295" - }, - { - "price":5.1625, - "amount":0.25127871, - "price_int":"516250", - "amount_int":"25127871", - "stamp":"1327849505224648" - }, - { - "price":5.1629, - "amount":3.57186, - "price_int":"516290", - "amount_int":"357186000", - "stamp":"1328135860411570" - }, - { - "price":5.16334, - "amount":0.11777, - "price_int":"516334", - "amount_int":"11777000", - "stamp":"1328507525093581" - }, - { - "price":5.1635, - "amount":0.6908, - "price_int":"516350", - "amount_int":"69080000", - "stamp":"1328230913627646" - }, - { - "price":5.1636, - "amount":1.5, - "price_int":"516360", - "amount_int":"150000000", - "stamp":"1328457150010536" - }, - { - "price":5.16372, - "amount":2.17333451, - "price_int":"516372", - "amount_int":"217333451", - "stamp":"1325452500692858" - }, - { - "price":5.16485, - "amount":0.02026608, - "price_int":"516485", - "amount_int":"2026608", - "stamp":"1327742518416742" - }, - { - "price":5.1663, - "amount":0.58068637, - "price_int":"516630", - "amount_int":"58068637", - "stamp":"1328449215642620" - }, - { - "price":5.16664, - "amount":0.01401, - "price_int":"516664", - "amount_int":"1401000", - "stamp":"1328643291006632" - }, - { - "price":5.16667, - "amount":0.06865048, - "price_int":"516667", - "amount_int":"6865048", - "stamp":"1327648693864597" - }, - { - "price":5.16751, - "amount":0.45109, - "price_int":"516751", - "amount_int":"45109000", - "stamp":"1328506921759994" - }, - { - "price":5.168, - "amount":0.13863, - "price_int":"516800", - "amount_int":"13863000", - "stamp":"1327875239083871" - }, - { - "price":5.16874, - "amount":0.30742508, - "price_int":"516874", - "amount_int":"30742508", - "stamp":"1327648704049469" - }, - { - "price":5.16954, - "amount":0.11672, - "price_int":"516954", - "amount_int":"11672000", - "stamp":"1328135893887782" - }, - { - "price":5.17, - "amount":1.98, - "price_int":"517000", - "amount_int":"198000000", - "stamp":"1328637448317057" - }, - { - "price":5.17103, - "amount":0.06186, - "price_int":"517103", - "amount_int":"6186000", - "stamp":"1328234828859207" - }, - { - "price":5.17191, - "amount":0.68682, - "price_int":"517191", - "amount_int":"68682000", - "stamp":"1328133117132358" - }, - { - "price":5.17209, - "amount":3.27066, - "price_int":"517209", - "amount_int":"327066000", - "stamp":"1328134863409456" - }, - { - "price":5.1721, - "amount":0.46571, - "price_int":"517210", - "amount_int":"46571000", - "stamp":"1328134903639666" - }, - { - "price":5.17235, - "amount":0.58917, - "price_int":"517235", - "amount_int":"58917000", - "stamp":"1328200520606949" - }, - { - "price":5.17256, - "amount":0.07783, - "price_int":"517256", - "amount_int":"7783000", - "stamp":"1328132423160859" - }, - { - "price":5.17481, - "amount":0.02153916, - "price_int":"517481", - "amount_int":"2153916", - "stamp":"1327742442265171" - }, - { - "price":5.17647, - "amount":0.0686665, - "price_int":"517647", - "amount_int":"6866650", - "stamp":"1327651384342565" - }, - { - "price":5.1786, - "amount":0.13823374, - "price_int":"517860", - "amount_int":"13823374", - "stamp":"1327648699740798" - }, - { - "price":5.1792, - "amount":0.57924004, - "price_int":"517920", - "amount_int":"57924004", - "stamp":"1328449215364352" - }, - { - "price":5.17991, - "amount":0.02026505, - "price_int":"517991", - "amount_int":"2026505", - "stamp":"1327742514821453" - }, - { - "price":5.17999, - "amount":50, - "price_int":"517999", - "amount_int":"5000000000", - "stamp":"1328144870757674" - }, - { - "price":5.18, - "amount":4.8651628, - "price_int":"518000", - "amount_int":"486516280", - "stamp":"1328637448150104" - }, - { - "price":5.18015, - "amount":0.04891, - "price_int":"518015", - "amount_int":"4891000", - "stamp":"1328328298696103" - }, - { - "price":5.18068, - "amount":0.05112, - "price_int":"518068", - "amount_int":"5112000", - "stamp":"1328134687441429" - }, - { - "price":5.18094, - "amount":1.21534, - "price_int":"518094", - "amount_int":"121534000", - "stamp":"1328243841512694" - }, - { - "price":5.181, - "amount":500, - "price_int":"518100", - "amount_int":"50000000000", - "stamp":"1327690982538897" - }, - { - "price":5.18145, - "amount":0.16178, - "price_int":"518145", - "amount_int":"16178000", - "stamp":"1328381190463320" - }, - { - "price":5.18186, - "amount":0.1168, - "price_int":"518186", - "amount_int":"11680000", - "stamp":"1328132987715142" - }, - { - "price":5.18627, - "amount":0.0686992, - "price_int":"518627", - "amount_int":"6869920", - "stamp":"1327679240043950" - }, - { - "price":5.1865, - "amount":10.65923, - "price_int":"518650", - "amount_int":"1065923000", - "stamp":"1328132878780626" - }, - { - "price":5.18654, - "amount":0.157, - "price_int":"518654", - "amount_int":"15700000", - "stamp":"1328643360311381" - }, - { - "price":5.18728, - "amount":0.02153815, - "price_int":"518728", - "amount_int":"2153815", - "stamp":"1327742439315351" - }, - { - "price":5.18842, - "amount":0.39664, - "price_int":"518842", - "amount_int":"39664000", - "stamp":"1328137416132200" - }, - { - "price":5.18846, - "amount":0.3077006, - "price_int":"518846", - "amount_int":"30770060", - "stamp":"1327677975980615" - }, - { - "price":5.18962, - "amount":1.64968, - "price_int":"518962", - "amount_int":"164968000", - "stamp":"1328135925311643" - }, - { - "price":5.19, - "amount":23.16342466, - "price_int":"519000", - "amount_int":"2316342466", - "stamp":"1328502295448710" - }, - { - "price":5.19138, - "amount":19.65753, - "price_int":"519138", - "amount_int":"1965753000", - "stamp":"1328642487943523" - }, - { - "price":5.1921, - "amount":0.57780089, - "price_int":"519210", - "amount_int":"57780089", - "stamp":"1328449215121095" - }, - { - "price":5.19265, - "amount":6.17275515, - "price_int":"519265", - "amount_int":"617275515", - "stamp":"1327980658384189" - }, - { - "price":5.193, - "amount":0.19155, - "price_int":"519300", - "amount_int":"19155000", - "stamp":"1328519367986907" - }, - { - "price":5.19497, - "amount":0.02026412, - "price_int":"519497", - "amount_int":"2026412", - "stamp":"1327742511204121" - }, - { - "price":5.19608, - "amount":0.06871539, - "price_int":"519608", - "amount_int":"6871539", - "stamp":"1327679237106850" - }, - { - "price":5.19613, - "amount":6.17748371, - "price_int":"519613", - "amount_int":"617748371", - "stamp":"1328003460546902" - }, - { - "price":5.19833, - "amount":0.30780757, - "price_int":"519833", - "amount_int":"30780757", - "stamp":"1327679118318834" - }, - { - "price":5.1985, - "amount":0.72215, - "price_int":"519850", - "amount_int":"72215000", - "stamp":"1327710956680953" - }, - { - "price":5.19975, - "amount":0.02161386, - "price_int":"519975", - "amount_int":"2161386", - "stamp":"1327852278869572" - }, - { - "price":5.2, - "amount":503.35375574, - "price_int":"520000", - "amount_int":"50335375574", - "stamp":"1328502121349391" - }, - { - "price":5.20001, - "amount":209.01, - "price_int":"520001", - "amount_int":"20901000000", - "stamp":"1328551536094165" - }, - { - "price":5.20009, - "amount":4.9999, - "price_int":"520009", - "amount_int":"499990000", - "stamp":"1327692736322332" - }, - { - "price":5.201, - "amount":9, - "price_int":"520100", - "amount_int":"900000000", - "stamp":"1328591626423385" - }, - { - "price":5.20123, - "amount":6.8138, - "price_int":"520123", - "amount_int":"681380000", - "stamp":"1327935009572563" - }, - { - "price":5.20327, - "amount":3.16215383, - "price_int":"520327", - "amount_int":"316215383", - "stamp":"1327862740116837" - }, - { - "price":5.2038, - "amount":0.02214701, - "price_int":"520380", - "amount_int":"2214701", - "stamp":"1327679233244027" - }, - { - "price":5.2047, - "amount":4.98227006, - "price_int":"520470", - "amount_int":"498227006", - "stamp":"1328644622796336" - }, - { - "price":5.205, - "amount":1.9227, - "price_int":"520500", - "amount_int":"192270000", - "stamp":"1328136891899135" - }, - { - "price":5.2051, - "amount":0.5763578, - "price_int":"520510", - "amount_int":"57635780", - "stamp":"1328449214889650" - }, - { - "price":5.20542, - "amount":9.2071, - "price_int":"520542", - "amount_int":"920710000", - "stamp":"1328136705715058" - }, - { - "price":5.20561, - "amount":54.62, - "price_int":"520561", - "amount_int":"5462000000", - "stamp":"1328578542259248" - }, - { - "price":5.20588, - "amount":0.04658058, - "price_int":"520588", - "amount_int":"4658058", - "stamp":"1327679211186721" - }, - { - "price":5.20697, - "amount":0.2974, - "price_int":"520697", - "amount_int":"29740000", - "stamp":"1328135820977526" - }, - { - "price":5.20819, - "amount":0.30794115, - "price_int":"520819", - "amount_int":"30794115", - "stamp":"1327679169405054" - }, - { - "price":5.21, - "amount":730.22286736, - "price_int":"521000", - "amount_int":"73022286736", - "stamp":"1328484233677696" - }, - { - "price":5.21013, - "amount":37.7887, - "price_int":"521013", - "amount_int":"3778870000", - "stamp":"1327772298704927" - }, - { - "price":5.21015, - "amount":5, - "price_int":"521015", - "amount_int":"500000000", - "stamp":"1328466276574410" - }, - { - "price":5.211, - "amount":105, - "price_int":"521100", - "amount_int":"10500000000", - "stamp":"1327854168280451" - }, - { - "price":5.21102, - "amount":19.19010097, - "price_int":"521102", - "amount_int":"1919010097", - "stamp":"1325537083452980" - }, - { - "price":5.212, - "amount":0.6, - "price_int":"521200", - "amount_int":"60000000", - "stamp":"1328540029931789" - }, - { - "price":5.21222, - "amount":0.02161387, - "price_int":"521222", - "amount_int":"2161387", - "stamp":"1327852275705820" - }, - { - "price":5.21294, - "amount":0.28268, - "price_int":"521294", - "amount_int":"28268000", - "stamp":"1328639473003534" - }, - { - "price":5.2136, - "amount":0.022155, - "price_int":"521360", - "amount_int":"2215500", - "stamp":"1327679228479501" - }, - { - "price":5.214, - "amount":43, - "price_int":"521400", - "amount_int":"4300000000", - "stamp":"1328491214490893" - }, - { - "price":5.21505, - "amount":3.34876, - "price_int":"521505", - "amount_int":"334876000", - "stamp":"1328135860910592" - }, - { - "price":5.21515, - "amount":6.8138, - "price_int":"521515", - "amount_int":"681380000", - "stamp":"1327935044741754" - }, - { - "price":5.21549, - "amount":0.10625, - "price_int":"521549", - "amount_int":"10625000", - "stamp":"1328507525719990" - }, - { - "price":5.21566, - "amount":0.64141, - "price_int":"521566", - "amount_int":"64141000", - "stamp":"1328230914132724" - }, - { - "price":5.21569, - "amount":0.04658599, - "price_int":"521569", - "amount_int":"4658599", - "stamp":"1327679208357325" - }, - { - "price":5.2168, - "amount":91.9056, - "price_int":"521680", - "amount_int":"9190560000", - "stamp":"1328536912765177" - }, - { - "price":5.21806, - "amount":0.30808777, - "price_int":"521806", - "amount_int":"30808777", - "stamp":"1327679228331602" - }, - { - "price":5.2181, - "amount":0.57492191, - "price_int":"521810", - "amount_int":"57492191", - "stamp":"1328449214652110" - }, - { - "price":5.21883, - "amount":0.0127, - "price_int":"521883", - "amount_int":"1270000", - "stamp":"1328643291442753" - }, - { - "price":5.21898, - "amount":40, - "price_int":"521898", - "amount_int":"4000000000", - "stamp":"1328533527583866" - }, - { - "price":5.21934, - "amount":40, - "price_int":"521934", - "amount_int":"4000000000", - "stamp":"1327940969849947" - }, - { - "price":5.21971, - "amount":0.40586, - "price_int":"521971", - "amount_int":"40586000", - "stamp":"1328506922263745" - }, - { - "price":5.22, - "amount":308.15679579, - "price_int":"522000", - "amount_int":"30815679579", - "stamp":"1328593828739738" - }, - { - "price":5.22027, - "amount":6.31333245, - "price_int":"522027", - "amount_int":"631333245", - "stamp":"1327689520567775" - }, - { - "price":5.221, - "amount":5.1076835, - "price_int":"522100", - "amount_int":"510768350", - "stamp":"1327712104096074" - }, - { - "price":5.22176, - "amount":0.10943, - "price_int":"522176", - "amount_int":"10943000", - "stamp":"1328135894373244" - }, - { - "price":5.22326, - "amount":0.05741, - "price_int":"522326", - "amount_int":"5741000", - "stamp":"1328234829298538" - }, - { - "price":5.2234, - "amount":0.02215857, - "price_int":"522340", - "amount_int":"2215857", - "stamp":"1327679223216787" - }, - { - "price":5.22415, - "amount":0.63595, - "price_int":"522415", - "amount_int":"63595000", - "stamp":"1328133117715487" - }, - { - "price":5.22433, - "amount":3.04768, - "price_int":"522433", - "amount_int":"304768000", - "stamp":"1328134863916903" - }, - { - "price":5.22434, - "amount":0.43409, - "price_int":"522434", - "amount_int":"43409000", - "stamp":"1328134904264166" - }, - { - "price":5.22459, - "amount":0.55004, - "price_int":"522459", - "amount_int":"55004000", - "stamp":"1328200521079803" - }, - { - "price":5.22469, - "amount":0.0216293, - "price_int":"522469", - "amount_int":"2162930", - "stamp":"1327896448476884" - }, - { - "price":5.2248, - "amount":0.07244, - "price_int":"522480", - "amount_int":"7244000", - "stamp":"1328132423670162" - }, - { - "price":5.22508, - "amount":0.02026311, - "price_int":"522508", - "amount_int":"2026311", - "stamp":"1327742505423614" - }, - { - "price":5.22549, - "amount":0.04659311, - "price_int":"522549", - "amount_int":"4659311", - "stamp":"1327679205863204" - }, - { - "price":5.22792, - "amount":0.30885194, - "price_int":"522792", - "amount_int":"30885194", - "stamp":"1327679223450611" - }, - { - "price":5.22825, - "amount":5, - "price_int":"522825", - "amount_int":"500000000", - "stamp":"1328570482789430" - }, - { - "price":5.22884, - "amount":6.08879321, - "price_int":"522884", - "amount_int":"608879321", - "stamp":"1328011040254858" - }, - { - "price":5.23, - "amount":1.01, - "price_int":"523000", - "amount_int":"101000000", - "stamp":"1327843096890698" - }, - { - "price":5.2311, - "amount":0.57349315, - "price_int":"523110", - "amount_int":"57349315", - "stamp":"1328449214432758" - }, - { - "price":5.23126, - "amount":0.02026321, - "price_int":"523126", - "amount_int":"2026321", - "stamp":"1327742508579599" - }, - { - "price":5.23247, - "amount":0.04523, - "price_int":"523247", - "amount_int":"4523000", - "stamp":"1328328299141521" - }, - { - "price":5.23301, - "amount":0.04766, - "price_int":"523301", - "amount_int":"4766000", - "stamp":"1328134688060956" - }, - { - "price":5.2332, - "amount":0.02220748, - "price_int":"523320", - "amount_int":"2220748", - "stamp":"1327693362012067" - }, - { - "price":5.23328, - "amount":1.12815, - "price_int":"523328", - "amount_int":"112815000", - "stamp":"1328243841954436" - }, - { - "price":5.23379, - "amount":0.15029, - "price_int":"523379", - "amount_int":"15029000", - "stamp":"1328381190898373" - }, - { - "price":5.2342, - "amount":0.10808, - "price_int":"523420", - "amount_int":"10808000", - "stamp":"1328132988303450" - }, - { - "price":5.235, - "amount":0.18735, - "price_int":"523500", - "amount_int":"18735000", - "stamp":"1328595022851169" - }, - { - "price":5.23529, - "amount":0.04661421, - "price_int":"523529", - "amount_int":"4661421", - "stamp":"1327693328997984" - }, - { - "price":5.2356, - "amount":6.06821663, - "price_int":"523560", - "amount_int":"606821663", - "stamp":"1327973863848988" - }, - { - "price":5.236, - "amount":0.13863, - "price_int":"523600", - "amount_int":"13863000", - "stamp":"1327875165202517" - }, - { - "price":5.2365, - "amount":0.85099971, - "price_int":"523650", - "amount_int":"85099971", - "stamp":"1328615162139653" - }, - { - "price":5.23684, - "amount":9.5, - "price_int":"523684", - "amount_int":"950000000", - "stamp":"1328607254725167" - }, - { - "price":5.23716, - "amount":0.02163114, - "price_int":"523716", - "amount_int":"2163114", - "stamp":"1327896456599831" - }, - { - "price":5.2372, - "amount":1, - "price_int":"523720", - "amount_int":"100000000", - "stamp":"1328459680527369" - }, - { - "price":5.23778, - "amount":0.30940131, - "price_int":"523778", - "amount_int":"30940131", - "stamp":"1327692093923630" - }, - { - "price":5.2379, - "amount":6.0644164, - "price_int":"523790", - "amount_int":"606441640", - "stamp":"1327971477364439" - }, - { - "price":5.23889, - "amount":9.81825, - "price_int":"523889", - "amount_int":"981825000", - "stamp":"1328132879292017" - }, - { - "price":5.23893, - "amount":0.13491, - "price_int":"523893", - "amount_int":"13491000", - "stamp":"1328643008980909" - }, - { - "price":5.23935, - "amount":0.11811, - "price_int":"523935", - "amount_int":"11811000", - "stamp":"1327752542579669" - }, - { - "price":5.24, - "amount":2.22918893, - "price_int":"524000", - "amount_int":"222918893", - "stamp":"1328637448043232" - }, - { - "price":5.2401, - "amount":6.29332801, - "price_int":"524010", - "amount_int":"629332801", - "stamp":"1327867736272455" - }, - { - "price":5.24014, - "amount":0.0202614, - "price_int":"524014", - "amount_int":"2026140", - "stamp":"1327742501744806" - }, - { - "price":5.24056, - "amount":6.12802965, - "price_int":"524056", - "amount_int":"612802965", - "stamp":"1328056458066554" - }, - { - "price":5.24082, - "amount":0.36928, - "price_int":"524082", - "amount_int":"36928000", - "stamp":"1328137416631982" - }, - { - "price":5.24204, - "amount":1.54448, - "price_int":"524204", - "amount_int":"154448000", - "stamp":"1328135925810026" - }, - { - "price":5.24259, - "amount":2.05446, - "price_int":"524259", - "amount_int":"205446000", - "stamp":"1327778023511582" - }, - { - "price":5.243, - "amount":0.0222194, - "price_int":"524300", - "amount_int":"2221940", - "stamp":"1327701840884956" - }, - { - "price":5.2442, - "amount":0.57206056, - "price_int":"524420", - "amount_int":"57206056", - "stamp":"1328449214195622" - }, - { - "price":5.2451, - "amount":0.04661991, - "price_int":"524510", - "amount_int":"4661991", - "stamp":"1327701819820305" - }, - { - "price":5.24655, - "amount":6.0347246, - "price_int":"524655", - "amount_int":"603472460", - "stamp":"1327985527351282" - }, - { - "price":5.24699, - "amount":4.38132646, - "price_int":"524699", - "amount_int":"438132646", - "stamp":"1328644622481644" - }, - { - "price":5.24765, - "amount":0.30945595, - "price_int":"524765", - "amount_int":"30945595", - "stamp":"1327692090731139" - }, - { - "price":5.24963, - "amount":0.02163411, - "price_int":"524963", - "amount_int":"2163411", - "stamp":"1327896488311243" - }, - { - "price":5.25, - "amount":242.67319142, - "price_int":"525000", - "amount_int":"24267319142", - "stamp":"1328638519413476" - }, - { - "price":5.25006, - "amount":6, - "price_int":"525006", - "amount_int":"600000000", - "stamp":"1327842348341773" - }, - { - "price":5.251, - "amount":0.47065, - "price_int":"525100", - "amount_int":"47065000", - "stamp":"1328143941814970" - }, - { - "price":5.2528, - "amount":0.02223386, - "price_int":"525280", - "amount_int":"2223386", - "stamp":"1327701926155394" - }, - { - "price":5.2549, - "amount":0.04662581, - "price_int":"525490", - "amount_int":"4662581", - "stamp":"1327701893789169" - }, - { - "price":5.2552, - "amount":0.02029971, - "price_int":"525520", - "amount_int":"2029971", - "stamp":"1327879140209023" - }, - { - "price":5.256, - "amount":174.6651, - "price_int":"525600", - "amount_int":"17466510000", - "stamp":"1328508681854743" - }, - { - "price":5.25644, - "amount":12.5, - "price_int":"525644", - "amount_int":"1250000000", - "stamp":"1328520242227248" - }, - { - "price":5.25671, - "amount":0.14503058, - "price_int":"525671", - "amount_int":"14503058", - "stamp":"1327717402518779" - }, - { - "price":5.25691, - "amount":1.11064295, - "price_int":"525691", - "amount_int":"111064295", - "stamp":"1327717494664401" - }, - { - "price":5.2573, - "amount":0.57063512, - "price_int":"525730", - "amount_int":"57063512", - "stamp":"1328449213941686" - }, - { - "price":5.25751, - "amount":0.30961041, - "price_int":"525751", - "amount_int":"30961041", - "stamp":"1327701828765562" - }, - { - "price":5.258, - "amount":8.57532, - "price_int":"525800", - "amount_int":"857532000", - "stamp":"1328136706169003" - }, - { - "price":5.25888, - "amount":6.00831543, - "price_int":"525888", - "amount_int":"600831543", - "stamp":"1328020745313755" - }, - { - "price":5.25896, - "amount":1.7662, - "price_int":"525896", - "amount_int":"176620000", - "stamp":"1328596429461090" - }, - { - "price":5.25957, - "amount":0.79143, - "price_int":"525957", - "amount_int":"79143000", - "stamp":"1328463236827209" - }, - { - "price":5.26, - "amount":248.5828, - "price_int":"526000", - "amount_int":"24858280000", - "stamp":"1328637447713195" - }, - { - "price":5.26076, - "amount":3, - "price_int":"526076", - "amount_int":"300000000", - "stamp":"1328632055161155" - }, - { - "price":5.261, - "amount":18, - "price_int":"526100", - "amount_int":"1800000000", - "stamp":"1327725372800401" - }, - { - "price":5.2621, - "amount":0.02163905, - "price_int":"526210", - "amount_int":"2163905", - "stamp":"1327901920033407" - }, - { - "price":5.2626, - "amount":0.02225167, - "price_int":"526260", - "amount_int":"2225167", - "stamp":"1327732976688370" - }, - { - "price":5.26471, - "amount":0.04663652, - "price_int":"526471", - "amount_int":"4663652", - "stamp":"1327732972471871" - }, - { - "price":5.26506, - "amount":100, - "price_int":"526506", - "amount_int":"10000000000", - "stamp":"1328498676180111" - }, - { - "price":5.2656, - "amount":0.25214, - "price_int":"526560", - "amount_int":"25214000", - "stamp":"1328639473462380" - }, - { - "price":5.267, - "amount":10, - "price_int":"526700", - "amount_int":"1000000000", - "stamp":"1328563305471009" - }, - { - "price":5.26738, - "amount":0.30987689, - "price_int":"526738", - "amount_int":"30987689", - "stamp":"1327732921193675" - }, - { - "price":5.26772, - "amount":3.12789, - "price_int":"526772", - "amount_int":"312789000", - "stamp":"1328135861413744" - }, - { - "price":5.26806, - "amount":60, - "price_int":"526806", - "amount_int":"6000000000", - "stamp":"1327757454566745" - }, - { - "price":5.26817, - "amount":0.09484, - "price_int":"526817", - "amount_int":"9484000", - "stamp":"1328507526326864" - }, - { - "price":5.26834, - "amount":0.59252, - "price_int":"526834", - "amount_int":"59252000", - "stamp":"1328230914737918" - }, - { - "price":5.27, - "amount":29.99296204, - "price_int":"527000", - "amount_int":"2999296204", - "stamp":"1328637447547275" - }, - { - "price":5.27026, - "amount":0.02029953, - "price_int":"527026", - "amount_int":"2029953", - "stamp":"1327879418669130" - }, - { - "price":5.2704, - "amount":0.56921676, - "price_int":"527040", - "amount_int":"56921676", - "stamp":"1328449213698928" - }, - { - "price":5.27155, - "amount":0.01141, - "price_int":"527155", - "amount_int":"1141000", - "stamp":"1328643291899143" - }, - { - "price":5.2724, - "amount":0.0222726, - "price_int":"527240", - "amount_int":"2227260", - "stamp":"1327733985114128" - }, - { - "price":5.27244, - "amount":0.36108, - "price_int":"527244", - "amount_int":"36108000", - "stamp":"1328506922872238" - }, - { - "price":5.27288, - "amount":10, - "price_int":"527288", - "amount_int":"1000000000", - "stamp":"1328641961623723" - }, - { - "price":5.2736, - "amount":0.25371879, - "price_int":"527360", - "amount_int":"25371879", - "stamp":"1327750193045803" - }, - { - "price":5.27451, - "amount":0.14886223, - "price_int":"527451", - "amount_int":"14886223", - "stamp":"1328135894963289" - }, - { - "price":5.27457, - "amount":0.02177689, - "price_int":"527457", - "amount_int":"2177689", - "stamp":"1328573757869702" - }, - { - "price":5.27602, - "amount":0.053, - "price_int":"527602", - "amount_int":"5300000", - "stamp":"1328234829807780" - }, - { - "price":5.27692, - "amount":0.5856, - "price_int":"527692", - "amount_int":"58560000", - "stamp":"1328133118168623" - }, - { - "price":5.2771, - "amount":2.82693, - "price_int":"527710", - "amount_int":"282693000", - "stamp":"1328134864538555" - }, - { - "price":5.27712, - "amount":0.40277, - "price_int":"527712", - "amount_int":"40277000", - "stamp":"1328134904864773" - }, - { - "price":5.27724, - "amount":0.31007202, - "price_int":"527724", - "amount_int":"31007202", - "stamp":"1327732918065931" - }, - { - "price":5.27737, - "amount":0.5113, - "price_int":"527737", - "amount_int":"51130000", - "stamp":"1328200521564261" - }, - { - "price":5.27758, - "amount":0.0671, - "price_int":"527758", - "amount_int":"6710000", - "stamp":"1328132424188126" - }, - { - "price":5.27915, - "amount":200, - "price_int":"527915", - "amount_int":"20000000000", - "stamp":"1328642767954339" - }, - { - "price":5.28, - "amount":66.0138, - "price_int":"528000", - "amount_int":"6601380000", - "stamp":"1327745132844475" - }, - { - "price":5.28042, - "amount":60.241, - "price_int":"528042", - "amount_int":"6024100000", - "stamp":"1328604102935642" - }, - { - "price":5.2822, - "amount":0.0222918, - "price_int":"528220", - "amount_int":"2229180", - "stamp":"1327735049716513" - }, - { - "price":5.2836, - "amount":0.56779469, - "price_int":"528360", - "amount_int":"56779469", - "stamp":"1328449213469952" - }, - { - "price":5.28431, - "amount":0.04677818, - "price_int":"528431", - "amount_int":"4677818", - "stamp":"1327735048559049" - }, - { - "price":5.28531, - "amount":0.02030013, - "price_int":"528531", - "amount_int":"2030013", - "stamp":"1327883426689535" - }, - { - "price":5.28533, - "amount":0.04159, - "price_int":"528533", - "amount_int":"4159000", - "stamp":"1328328299594703" - }, - { - "price":5.28587, - "amount":0.04423, - "price_int":"528587", - "amount_int":"4423000", - "stamp":"1328134688679123" - }, - { - "price":5.28614, - "amount":1.04184, - "price_int":"528614", - "amount_int":"104184000", - "stamp":"1328243842389778" - }, - { - "price":5.28633, - "amount":6.00376423, - "price_int":"528633", - "amount_int":"600376423", - "stamp":"1328091472702168" - }, - { - "price":5.28665, - "amount":0.13892, - "price_int":"528665", - "amount_int":"13892000", - "stamp":"1328381191347118" - }, - { - "price":5.28704, - "amount":0.02178126, - "price_int":"528704", - "amount_int":"2178126", - "stamp":"1328576564240790" - }, - { - "price":5.28707, - "amount":0.1042, - "price_int":"528707", - "amount_int":"10420000", - "stamp":"1328133306555823" - }, - { - "price":5.2871, - "amount":0.310021, - "price_int":"528710", - "amount_int":"31002100", - "stamp":"1327732957203184" - }, - { - "price":5.28738, - "amount":3.81644913, - "price_int":"528738", - "amount_int":"381644913", - "stamp":"1328644622194056" - }, - { - "price":5.29, - "amount":40.96, - "price_int":"529000", - "amount_int":"4096000000", - "stamp":"1328637447519546" - }, - { - "price":5.291, - "amount":0.23324, - "price_int":"529100", - "amount_int":"23324000", - "stamp":"1328442049292642" - }, - { - "price":5.2918, - "amount":8.98567, - "price_int":"529180", - "amount_int":"898567000", - "stamp":"1328132879783228" - }, - { - "price":5.29185, - "amount":0.1175, - "price_int":"529185", - "amount_int":"11750000", - "stamp":"1328613289544932" - }, - { - "price":5.292, - "amount":0.02231736, - "price_int":"529200", - "amount_int":"2231736", - "stamp":"1327735158722563" - }, - { - "price":5.29376, - "amount":0.34219, - "price_int":"529376", - "amount_int":"34219000", - "stamp":"1328137417144480" - }, - { - "price":5.29412, - "amount":0.04678622, - "price_int":"529412", - "amount_int":"4678622", - "stamp":"1327735142579805" - }, - { - "price":5.29444, - "amount":1.14005, - "price_int":"529444", - "amount_int":"114005000", - "stamp":"1328613317776009" - }, - { - "price":5.29499, - "amount":1.44032, - "price_int":"529499", - "amount_int":"144032000", - "stamp":"1328135926356534" - }, - { - "price":5.295, - "amount":0.0202, - "price_int":"529500", - "amount_int":"2020000", - "stamp":"1328000442975674" - }, - { - "price":5.2968, - "amount":0.5663797, - "price_int":"529680", - "amount_int":"56637970", - "stamp":"1328449213219937" - }, - { - "price":5.29684, - "amount":6.75118208, - "price_int":"529684", - "amount_int":"675118208", - "stamp":"1328642990879076" - }, - { - "price":5.29697, - "amount":0.31023583, - "price_int":"529697", - "amount_int":"31023583", - "stamp":"1327732974982027" - }, - { - "price":5.29951, - "amount":0.0217878, - "price_int":"529951", - "amount_int":"2178780", - "stamp":"1328577807646862" - }, - { - "price":5.2999, - "amount":10.87673918, - "price_int":"529990", - "amount_int":"1087673918", - "stamp":"1327877116073987" - }, - { - "price":5.3, - "amount":3708.57349221, - "price_int":"530000", - "amount_int":"370857349221", - "stamp":"1328637447352131" - }, - { - "price":5.30002, - "amount":25, - "price_int":"530002", - "amount_int":"2500000000", - "stamp":"1328632102163383" - }, - { - "price":5.3001, - "amount":500, - "price_int":"530010", - "amount_int":"50000000000", - "stamp":"1328166023049961" - }, - { - "price":5.30037, - "amount":0.02041128, - "price_int":"530037", - "amount_int":"2041128", - "stamp":"1328575399706885" - }, - { - "price":5.30099, - "amount":30, - "price_int":"530099", - "amount_int":"3000000000", - "stamp":"1328637289332717" - }, - { - "price":5.301, - "amount":55.2698061, - "price_int":"530100", - "amount_int":"5526980610", - "stamp":"1328639207006724" - }, - { - "price":5.30113, - "amount":6.8138, - "price_int":"530113", - "amount_int":"681380000", - "stamp":"1327934978336186" - }, - { - "price":5.3012, - "amount":10, - "price_int":"530120", - "amount_int":"1000000000", - "stamp":"1328487761896467" - }, - { - "price":5.3018, - "amount":0.02233197, - "price_int":"530180", - "amount_int":"2233197", - "stamp":"1327741894408835" - }, - { - "price":5.302, - "amount":20, - "price_int":"530200", - "amount_int":"2000000000", - "stamp":"1328462722242504" - }, - { - "price":5.3021, - "amount":0.00081477, - "price_int":"530210", - "amount_int":"81477", - "stamp":"1327901740005085" - }, - { - "price":5.303, - "amount":0.18735, - "price_int":"530300", - "amount_int":"18735000", - "stamp":"1328595016525491" - }, - { - "price":5.30319, - "amount":6.95625025, - "price_int":"530319", - "amount_int":"695625025", - "stamp":"1328127743111205" - }, - { - "price":5.3036, - "amount":50.21592849, - "price_int":"530360", - "amount_int":"5021592849", - "stamp":"1328567754185650" - }, - { - "price":5.30392, - "amount":0.04678851, - "price_int":"530392", - "amount_int":"4678851", - "stamp":"1327741881190529" - }, - { - "price":5.304, - "amount":0.13863, - "price_int":"530400", - "amount_int":"13863000", - "stamp":"1327875160130099" - }, - { - "price":5.30516, - "amount":6.95603144, - "price_int":"530516", - "amount_int":"695603144", - "stamp":"1328094436333649" - }, - { - "price":5.30683, - "amount":0.31041804, - "price_int":"530683", - "amount_int":"31041804", - "stamp":"1327733984922858" - }, - { - "price":5.309, - "amount":39.8, - "price_int":"530900", - "amount_int":"3980000000", - "stamp":"1328547536647430" - }, - { - "price":5.31, - "amount":174.02525423, - "price_int":"531000", - "amount_int":"17402525423", - "stamp":"1328637447095949" - }, - { - "price":5.3105, - "amount":26.360987, - "price_int":"531050", - "amount_int":"2636098700", - "stamp":"1328625347050703" - }, - { - "price":5.311, - "amount":105, - "price_int":"531100", - "amount_int":"10500000000", - "stamp":"1327854163913130" - }, - { - "price":5.31111, - "amount":7.94985, - "price_int":"531111", - "amount_int":"794985000", - "stamp":"1328136706888983" - }, - { - "price":5.3116, - "amount":0.02235682, - "price_int":"531160", - "amount_int":"2235682", - "stamp":"1327741890773999" - }, - { - "price":5.31197, - "amount":0.02179748, - "price_int":"531197", - "amount_int":"2179748", - "stamp":"1328577841388689" - }, - { - "price":5.312, - "amount":0.6, - "price_int":"531200", - "amount_int":"60000000", - "stamp":"1328540038459152" - }, - { - "price":5.31269, - "amount":0.2577, - "price_int":"531269", - "amount_int":"25770000", - "stamp":"1328135822550858" - }, - { - "price":5.3127, - "amount":0.41509, - "price_int":"531270", - "amount_int":"41509000", - "stamp":"1328462608668043" - }, - { - "price":5.31373, - "amount":0.046766, - "price_int":"531373", - "amount_int":"4676600", - "stamp":"1327741879378960" - }, - { - "price":5.31543, - "amount":0.02040995, - "price_int":"531543", - "amount_int":"2040995", - "stamp":"1328575396664057" - }, - { - "price":5.3167, - "amount":0.31063829, - "price_int":"531670", - "amount_int":"31063829", - "stamp":"1327735044987333" - }, - { - "price":5.31879, - "amount":0.21001, - "price_int":"531879", - "amount_int":"21001000", - "stamp":"1328639149890399" - }, - { - "price":5.31998, - "amount":25, - "price_int":"531998", - "amount_int":"2500000000", - "stamp":"1327710163518739" - }, - { - "price":5.32, - "amount":116.5863, - "price_int":"532000", - "amount_int":"11658630000", - "stamp":"1328564730699311" - }, - { - "price":5.32093, - "amount":2.90923, - "price_int":"532093", - "amount_int":"290923000", - "stamp":"1328135861910788" - }, - { - "price":5.3213, - "amount":12.34209685, - "price_int":"532130", - "amount_int":"1234209685", - "stamp":"1328359583625277" - }, - { - "price":5.32139, - "amount":0.08355, - "price_int":"532139", - "amount_int":"8355000", - "stamp":"1328507526936887" - }, - { - "price":5.3214, - "amount":0.02237704, - "price_int":"532140", - "amount_int":"2237704", - "stamp":"1327741888167222" - }, - { - "price":5.32156, - "amount":0.54412, - "price_int":"532156", - "amount_int":"54412000", - "stamp":"1328230915344902" - }, - { - "price":5.32238, - "amount":6.73140679, - "price_int":"532238", - "amount_int":"673140679", - "stamp":"1328576126266129" - }, - { - "price":5.3233, - "amount":0.5635602, - "price_int":"532330", - "amount_int":"56356020", - "stamp":"1328449212596169" - }, - { - "price":5.32353, - "amount":0.04677465, - "price_int":"532353", - "amount_int":"4677465", - "stamp":"1327741877006995" - }, - { - "price":5.32444, - "amount":0.02180696, - "price_int":"532444", - "amount_int":"2180696", - "stamp":"1328577982592482" - }, - { - "price":5.3248, - "amount":0.01013, - "price_int":"532480", - "amount_int":"1013000", - "stamp":"1328643292349816" - }, - { - "price":5.32563, - "amount":3.28925079, - "price_int":"532563", - "amount_int":"328925079", - "stamp":"1328644621898877" - }, - { - "price":5.32569, - "amount":0.31675, - "price_int":"532569", - "amount_int":"31675000", - "stamp":"1328506923356427" - }, - { - "price":5.32656, - "amount":0.31091466, - "price_int":"532656", - "amount_int":"31091466", - "stamp":"1327741408808994" - }, - { - "price":5.32778, - "amount":0.09507, - "price_int":"532778", - "amount_int":"9507000", - "stamp":"1328135895454257" - }, - { - "price":5.32932, - "amount":0.04864, - "price_int":"532932", - "amount_int":"4864000", - "stamp":"1328234830483735" - }, - { - "price":5.33, - "amount":13.85105046, - "price_int":"533000", - "amount_int":"1385105046", - "stamp":"1328457148062108" - }, - { - "price":5.33022, - "amount":0.53575, - "price_int":"533022", - "amount_int":"53575000", - "stamp":"1328133118609842" - }, - { - "price":5.33041, - "amount":2.6084, - "price_int":"533041", - "amount_int":"260840000", - "stamp":"1328134865028305" - }, - { - "price":5.33042, - "amount":0.37177, - "price_int":"533042", - "amount_int":"37177000", - "stamp":"1328134905457742" - }, - { - "price":5.33049, - "amount":0.02040953, - "price_int":"533049", - "amount_int":"2040953", - "stamp":"1328575393395059" - }, - { - "price":5.33067, - "amount":0.47295, - "price_int":"533067", - "amount_int":"47295000", - "stamp":"1328200522030442" - }, - { - "price":5.33089, - "amount":0.06182, - "price_int":"533089", - "amount_int":"6182000", - "stamp":"1328132424693360" - }, - { - "price":5.3312, - "amount":0.0225222, - "price_int":"533120", - "amount_int":"2252220", - "stamp":"1327871289225587" - }, - { - "price":5.332, - "amount":0.15485, - "price_int":"533200", - "amount_int":"15485000", - "stamp":"1328049529745394" - }, - { - "price":5.333, - "amount":0.19155, - "price_int":"533300", - "amount_int":"19155000", - "stamp":"1328519363319720" - }, - { - "price":5.33333, - "amount":0.04684022, - "price_int":"533333", - "amount_int":"4684022", - "stamp":"1327871287607037" - }, - { - "price":5.33642, - "amount":0.31205833, - "price_int":"533642", - "amount_int":"31205833", - "stamp":"1327870416280062" - }, - { - "price":5.3366, - "amount":0.56215568, - "price_int":"533660", - "amount_int":"56215568", - "stamp":"1328449212069594" - }, - { - "price":5.33691, - "amount":0.02180412, - "price_int":"533691", - "amount_int":"2180412", - "stamp":"1328578042270382" - }, - { - "price":5.337, - "amount":0.13863, - "price_int":"533700", - "amount_int":"13863000", - "stamp":"1327875153574235" - }, - { - "price":5.33871, - "amount":0.03799, - "price_int":"533871", - "amount_int":"3799000", - "stamp":"1328328300036020" - }, - { - "price":5.339, - "amount":5.26, - "price_int":"533900", - "amount_int":"526000000", - "stamp":"1328482353754503" - }, - { - "price":5.33926, - "amount":0.04137, - "price_int":"533926", - "amount_int":"4137000", - "stamp":"1328135989271734" - }, - { - "price":5.33953, - "amount":0.95638, - "price_int":"533953", - "amount_int":"95638000", - "stamp":"1328243842812402" - }, - { - "price":5.34, - "amount":16.32, - "price_int":"534000", - "amount_int":"1632000000", - "stamp":"1328006762693105" - }, - { - "price":5.34005, - "amount":0.12766, - "price_int":"534005", - "amount_int":"12766000", - "stamp":"1328381191786671" - }, - { - "price":5.34047, - "amount":0.10555, - "price_int":"534047", - "amount_int":"10555000", - "stamp":"1328134037691486" - }, - { - "price":5.341, - "amount":0.02255067, - "price_int":"534100", - "amount_int":"2255067", - "stamp":"1327887348664744" - }, - { - "price":5.34172, - "amount":6.71842322, - "price_int":"534172", - "amount_int":"671842322", - "stamp":"1328633682702789" - }, - { - "price":5.3427, - "amount":6.71304016, - "price_int":"534270", - "amount_int":"671304016", - "stamp":"1328634024853254" - }, - { - "price":5.34314, - "amount":0.04685265, - "price_int":"534314", - "amount_int":"4685265", - "stamp":"1327887333817566" - }, - { - "price":5.34404, - "amount":179.7595, - "price_int":"534404", - "amount_int":"17975950000", - "stamp":"1328618428060860" - }, - { - "price":5.34526, - "amount":8.16142, - "price_int":"534526", - "amount_int":"816142000", - "stamp":"1328132880267817" - }, - { - "price":5.34531, - "amount":0.10281, - "price_int":"534531", - "amount_int":"10281000", - "stamp":"1328613290014022" - }, - { - "price":5.34554, - "amount":0.02040821, - "price_int":"534554", - "amount_int":"2040821", - "stamp":"1328575389337622" - }, - { - "price":5.34629, - "amount":0.31246674, - "price_int":"534629", - "amount_int":"31246674", - "stamp":"1327884961814874" - }, - { - "price":5.34723, - "amount":0.31537, - "price_int":"534723", - "amount_int":"31537000", - "stamp":"1328137417633608" - }, - { - "price":5.34847, - "amount":1.33721, - "price_int":"534847", - "amount_int":"133721000", - "stamp":"1328135926956645" - }, - { - "price":5.34938, - "amount":0.02180612, - "price_int":"534938", - "amount_int":"2180612", - "stamp":"1328578097238540" - }, - { - "price":5.3499, - "amount":0.56075815, - "price_int":"534990", - "amount_int":"56075815", - "stamp":"1328449211551073" - }, - { - "price":5.35, - "amount":273.6984841, - "price_int":"535000", - "amount_int":"27369848410", - "stamp":"1328644667256037" - }, - { - "price":5.35002, - "amount":25, - "price_int":"535002", - "amount_int":"2500000000", - "stamp":"1328632095436758" - }, - { - "price":5.3504, - "amount":10.15, - "price_int":"535040", - "amount_int":"1015000000", - "stamp":"1328644474696506" - }, - { - "price":5.3508, - "amount":0.02257323, - "price_int":"535080", - "amount_int":"2257323", - "stamp":"1327887519978493" - }, - { - "price":5.351, - "amount":25, - "price_int":"535100", - "amount_int":"2500000000", - "stamp":"1328265387064178" - }, - { - "price":5.35129, - "amount":10, - "price_int":"535129", - "amount_int":"1000000000", - "stamp":"1328583263093872" - }, - { - "price":5.35294, - "amount":0.0215977, - "price_int":"535294", - "amount_int":"2159770", - "stamp":"1327887507882048" - }, - { - "price":5.353, - "amount":0.80879, - "price_int":"535300", - "amount_int":"80879000", - "stamp":"1328058235577644" - }, - { - "price":5.35615, - "amount":0.31268065, - "price_int":"535615", - "amount_int":"31268065", - "stamp":"1327885560709949" - }, - { - "price":5.35656, - "amount":6.8138, - "price_int":"535656", - "amount_int":"681380000", - "stamp":"1327934954498393" - }, - { - "price":5.358, - "amount":1110.86879432, - "price_int":"535800", - "amount_int":"111086879432", - "stamp":"1328531244847350" - }, - { - "price":5.36, - "amount":191.525, - "price_int":"536000", - "amount_int":"19152500000", - "stamp":"1328637447180945" - }, - { - "price":5.36002, - "amount":200, - "price_int":"536002", - "amount_int":"20000000000", - "stamp":"1328017504959885" - }, - { - "price":5.3606, - "amount":0.04300214, - "price_int":"536060", - "amount_int":"4300214", - "stamp":"1328575385285601" - }, - { - "price":5.361, - "amount":2.25385, - "price_int":"536100", - "amount_int":"225385000", - "stamp":"1328459490151699" - }, - { - "price":5.36147, - "amount":2.80208859, - "price_int":"536147", - "amount_int":"280208859", - "stamp":"1328644621592079" - }, - { - "price":5.36185, - "amount":0.02180036, - "price_int":"536185", - "amount_int":"2180036", - "stamp":"1328578183447012" - }, - { - "price":5.36245, - "amount":8.5, - "price_int":"536245", - "amount_int":"850000000", - "stamp":"1328581233967947" - }, - { - "price":5.36275, - "amount":0.01656526, - "price_int":"536275", - "amount_int":"1656526", - "stamp":"1327887506117228" - }, - { - "price":5.3633, - "amount":0.55935711, - "price_int":"536330", - "amount_int":"55935711", - "stamp":"1328449211109878" - }, - { - "price":5.36476, - "amount":7.33065, - "price_int":"536476", - "amount_int":"733065000", - "stamp":"1328136707775760" - }, - { - "price":5.365, - "amount":10, - "price_int":"536500", - "amount_int":"1000000000", - "stamp":"1328589912257630" - }, - { - "price":5.36602, - "amount":0.31287336, - "price_int":"536602", - "amount_int":"31287336", - "stamp":"1327886295155179" - }, - { - "price":5.36636, - "amount":0.59201, - "price_int":"536636", - "amount_int":"59201000", - "stamp":"1328462609097327" - }, - { - "price":5.36666, - "amount":58.8821, - "price_int":"536666", - "amount_int":"5888210000", - "stamp":"1328475981418878" - }, - { - "price":5.36868, - "amount":50, - "price_int":"536868", - "amount_int":"5000000000", - "stamp":"1328232572698058" - }, - { - "price":5.37, - "amount":159.74044506, - "price_int":"537000", - "amount_int":"15974044506", - "stamp":"1328455676968911" - }, - { - "price":5.3704, - "amount":0.02263099, - "price_int":"537040", - "amount_int":"2263099", - "stamp":"1327897476258602" - }, - { - "price":5.372, - "amount":0.18735, - "price_int":"537200", - "amount_int":"18735000", - "stamp":"1328595012259806" - }, - { - "price":5.37251, - "amount":0.17957, - "price_int":"537251", - "amount_int":"17957000", - "stamp":"1328639150352469" - }, - { - "price":5.37255, - "amount":0.01658207, - "price_int":"537255", - "amount_int":"1658207", - "stamp":"1327897451875792" - }, - { - "price":5.373, - "amount":0.26631, - "price_int":"537300", - "amount_int":"26631000", - "stamp":"1328162177973120" - }, - { - "price":5.37432, - "amount":0.02180137, - "price_int":"537432", - "amount_int":"2180137", - "stamp":"1328578180252441" - }, - { - "price":5.37468, - "amount":2.69275, - "price_int":"537468", - "amount_int":"269275000", - "stamp":"1328135862527887" - }, - { - "price":5.375, - "amount":202, - "price_int":"537500", - "amount_int":"20200000000", - "stamp":"1328464818605986" - }, - { - "price":5.37514, - "amount":0.07238, - "price_int":"537514", - "amount_int":"7238000", - "stamp":"1328507527451336" - }, - { - "price":5.37531, - "amount":0.4962, - "price_int":"537531", - "amount_int":"49620000", - "stamp":"1328230915850598" - }, - { - "price":5.37533, - "amount":2.47844, - "price_int":"537533", - "amount_int":"247844000", - "stamp":"1328644337687471" - }, - { - "price":5.37566, - "amount":0.02040816, - "price_int":"537566", - "amount_int":"2040816", - "stamp":"1328597319036320" - }, - { - "price":5.37588, - "amount":5.31323083, - "price_int":"537588", - "amount_int":"531323083", - "stamp":"1328641834970900" - }, - { - "price":5.3767, - "amount":0.55796306, - "price_int":"537670", - "amount_int":"55796306", - "stamp":"1328449210517078" - }, - { - "price":5.37949, - "amount":0.27286, - "price_int":"537949", - "amount_int":"27286000", - "stamp":"1328506923866029" - }, - { - "price":5.38, - "amount":29.75298512, - "price_int":"538000", - "amount_int":"2975298512", - "stamp":"1328639558427934" - }, - { - "price":5.3802, - "amount":0.02265259, - "price_int":"538020", - "amount_int":"2265259", - "stamp":"1327897472645862" - }, - { - "price":5.3807, - "amount":64.8986, - "price_int":"538070", - "amount_int":"6489860000", - "stamp":"1328604903418154" - }, - { - "price":5.381, - "amount":2, - "price_int":"538100", - "amount_int":"200000000", - "stamp":"1328459477891469" - }, - { - "price":5.3816, - "amount":0.088, - "price_int":"538160", - "amount_int":"8800000", - "stamp":"1328135896061715" - }, - { - "price":5.38222, - "amount":0.2785687, - "price_int":"538222", - "amount_int":"27856870", - "stamp":"1328573742924769" - }, - { - "price":5.38235, - "amount":0.01407105, - "price_int":"538235", - "amount_int":"1407105", - "stamp":"1327897449494779" - }, - { - "price":5.38303, - "amount":0.65693, - "price_int":"538303", - "amount_int":"65693000", - "stamp":"1328043385748930" - }, - { - "price":5.38315, - "amount":0.04432, - "price_int":"538315", - "amount_int":"4432000", - "stamp":"1328234830916582" - }, - { - "price":5.38406, - "amount":0.48639, - "price_int":"538406", - "amount_int":"48639000", - "stamp":"1328133119072514" - }, - { - "price":5.38425, - "amount":2.39204, - "price_int":"538425", - "amount_int":"239204000", - "stamp":"1328134865616018" - }, - { - "price":5.38426, - "amount":0.34109, - "price_int":"538426", - "amount_int":"34109000", - "stamp":"1328134906050868" - }, - { - "price":5.38452, - "amount":0.43498, - "price_int":"538452", - "amount_int":"43498000", - "stamp":"1328200522501351" - }, - { - "price":5.38474, - "amount":0.05659, - "price_int":"538474", - "amount_int":"5659000", - "stamp":"1328132425313563" - }, - { - "price":5.38564, - "amount":1.33, - "price_int":"538564", - "amount_int":"133000000", - "stamp":"1328641183291595" - }, - { - "price":5.38574, - "amount":0.31343328, - "price_int":"538574", - "amount_int":"31343328", - "stamp":"1327897370741567" - }, - { - "price":5.38679, - "amount":0.02180288, - "price_int":"538679", - "amount_int":"2180288", - "stamp":"1328578177755501" - }, - { - "price":5.39, - "amount":4.92801866, - "price_int":"539000", - "amount_int":"492801866", - "stamp":"1328513519235276" - }, - { - "price":5.3901, - "amount":0.55657594, - "price_int":"539010", - "amount_int":"55657594", - "stamp":"1328449210019239" - }, - { - "price":5.39015, - "amount":5, - "price_int":"539015", - "amount_int":"500000000", - "stamp":"1328466259788560" - }, - { - "price":5.39072, - "amount":0.02040369, - "price_int":"539072", - "amount_int":"2040369", - "stamp":"1328604250038159" - }, - { - "price":5.39216, - "amount":0.01407439, - "price_int":"539216", - "amount_int":"1407439", - "stamp":"1327897448005117" - }, - { - "price":5.39264, - "amount":0.03443, - "price_int":"539264", - "amount_int":"3443000", - "stamp":"1328328300495943" - }, - { - "price":5.39319, - "amount":0.02863, - "price_int":"539319", - "amount_int":"2863000", - "stamp":"1328134689920671" - }, - { - "price":5.39347, - "amount":0.87178, - "price_int":"539347", - "amount_int":"87178000", - "stamp":"1328243843276460" - }, - { - "price":5.39399, - "amount":0.11651, - "price_int":"539399", - "amount_int":"11651000", - "stamp":"1328381192242857" - }, - { - "price":5.39454, - "amount":2.35839757, - "price_int":"539454", - "amount_int":"235839757", - "stamp":"1328644621297722" - }, - { - "price":5.39561, - "amount":0.31360392, - "price_int":"539561", - "amount_int":"31360392", - "stamp":"1327897367057245" - }, - { - "price":5.398, - "amount":10, - "price_int":"539800", - "amount_int":"1000000000", - "stamp":"1328490043347278" - }, - { - "price":5.39925, - "amount":7.34541, - "price_int":"539925", - "amount_int":"734541000", - "stamp":"1328132880768321" - }, - { - "price":5.39926, - "amount":0.02181526, - "price_int":"539926", - "amount_int":"2181526", - "stamp":"1328597312205987" - }, - { - "price":5.3993, - "amount":0.08826, - "price_int":"539930", - "amount_int":"8826000", - "stamp":"1328613290580419" - }, - { - "price":5.3998, - "amount":0.02269005, - "price_int":"539980", - "amount_int":"2269005", - "stamp":"1327898499814785" - }, - { - "price":5.39999, - "amount":29.39, - "price_int":"539999", - "amount_int":"2939000000", - "stamp":"1328027811825025" - }, - { - "price":5.4, - "amount":1760.58461107, - "price_int":"540000", - "amount_int":"176058461107", - "stamp":"1328643327570524" - }, - { - "price":5.40001, - "amount":12.60835442, - "price_int":"540001", - "amount_int":"1260835442", - "stamp":"1328078644180123" - }, - { - "price":5.40002, - "amount":25, - "price_int":"540002", - "amount_int":"2500000000", - "stamp":"1328632087211395" - }, - { - "price":5.4001, - "amount":150.1454, - "price_int":"540010", - "amount_int":"15014540000", - "stamp":"1328467870554408" - }, - { - "price":5.401, - "amount":6.9616608, - "price_int":"540100", - "amount_int":"696166080", - "stamp":"1328631863951559" - }, - { - "price":5.40125, - "amount":0.28883, - "price_int":"540125", - "amount_int":"28883000", - "stamp":"1328137418226558" - }, - { - "price":5.40196, - "amount":0.01407676, - "price_int":"540196", - "amount_int":"1407676", - "stamp":"1327898500515074" - }, - { - "price":5.402, - "amount":500.15485, - "price_int":"540200", - "amount_int":"50015485000", - "stamp":"1328100700556242" - }, - { - "price":5.4025, - "amount":1.23513, - "price_int":"540250", - "amount_int":"123513000", - "stamp":"1328135927453844" - }, - { - "price":5.403, - "amount":0.19155, - "price_int":"540300", - "amount_int":"19155000", - "stamp":"1328519358389384" - }, - { - "price":5.4036, - "amount":0.55518543, - "price_int":"540360", - "amount_int":"55518543", - "stamp":"1328449209723626" - }, - { - "price":5.40547, - "amount":0.3137725, - "price_int":"540547", - "amount_int":"31377250", - "stamp":"1327897456746428" - }, - { - "price":5.40578, - "amount":0.02040159, - "price_int":"540578", - "amount_int":"2040159", - "stamp":"1328607225139482" - }, - { - "price":5.40718, - "amount":1.04419689, - "price_int":"540718", - "amount_int":"104419689", - "stamp":"1328644003931923" - }, - { - "price":5.40877, - "amount":15.09310619, - "price_int":"540877", - "amount_int":"1509310619", - "stamp":"1328642646971295" - }, - { - "price":5.4096, - "amount":0.02270076, - "price_int":"540960", - "amount_int":"2270076", - "stamp":"1327898525705941" - }, - { - "price":5.41, - "amount":115.4061035, - "price_int":"541000", - "amount_int":"11540610350", - "stamp":"1328614861819122" - }, - { - "price":5.41002, - "amount":200, - "price_int":"541002", - "amount_int":"20000000000", - "stamp":"1328017511097189" - }, - { - "price":5.4108, - "amount":1.01, - "price_int":"541080", - "amount_int":"101000000", - "stamp":"1328609217492085" - }, - { - "price":5.411, - "amount":105, - "price_int":"541100", - "amount_int":"10500000000", - "stamp":"1328132157270720" - }, - { - "price":5.41101, - "amount":3.70088449, - "price_int":"541101", - "amount_int":"370088449", - "stamp":"1328634897988571" - }, - { - "price":5.41173, - "amount":0.02181651, - "price_int":"541173", - "amount_int":"2181651", - "stamp":"1328600574604077" - }, - { - "price":5.41176, - "amount":0.03675914, - "price_int":"541176", - "amount_int":"3675914", - "stamp":"1327898516507713" - }, - { - "price":5.412, - "amount":0.5, - "price_int":"541200", - "amount_int":"50000000", - "stamp":"1328540046485393" - }, - { - "price":5.41269, - "amount":0.01618049, - "price_int":"541269", - "amount_int":"1618049", - "stamp":"1327898714509479" - }, - { - "price":5.414, - "amount":0.18735, - "price_int":"541400", - "amount_int":"18735000", - "stamp":"1328595001965717" - }, - { - "price":5.41534, - "amount":0.31388542, - "price_int":"541534", - "amount_int":"31388542", - "stamp":"1327897453538558" - }, - { - "price":5.4171, - "amount":0.55380185, - "price_int":"541710", - "amount_int":"55380185", - "stamp":"1328449209312771" - }, - { - "price":5.41895, - "amount":6.71762, - "price_int":"541895", - "amount_int":"671762000", - "stamp":"1328136708234527" - }, - { - "price":5.41911, - "amount":0.071, - "price_int":"541911", - "amount_int":"7100000", - "stamp":"1328611451071659" - }, - { - "price":5.4194, - "amount":0.02271394, - "price_int":"541940", - "amount_int":"2271394", - "stamp":"1327898558012153" - }, - { - "price":5.41946, - "amount":20.20800034, - "price_int":"541946", - "amount_int":"2020800034", - "stamp":"1328572446212286" - }, - { - "price":5.42, - "amount":32.02, - "price_int":"542000", - "amount_int":"3202000000", - "stamp":"1328644776214878" - }, - { - "price":5.42014, - "amount":6.52055608, - "price_int":"542014", - "amount_int":"652055608", - "stamp":"1328617028326693" - }, - { - "price":5.42056, - "amount":0.2188, - "price_int":"542056", - "amount_int":"21880000", - "stamp":"1328135824583108" - }, - { - "price":5.42057, - "amount":0.33885, - "price_int":"542057", - "amount_int":"33885000", - "stamp":"1328463237267616" - }, - { - "price":5.4208, - "amount":0.15, - "price_int":"542080", - "amount_int":"15000000", - "stamp":"1328581841378659" - }, - { - "price":5.42083, - "amount":0.02039948, - "price_int":"542083", - "amount_int":"2039948", - "stamp":"1328611181619729" - }, - { - "price":5.421, - "amount":58.911, - "price_int":"542100", - "amount_int":"5891100000", - "stamp":"1328643247704012" - }, - { - "price":5.42157, - "amount":0.02417321, - "price_int":"542157", - "amount_int":"2417321", - "stamp":"1327898556438334" - }, - { - "price":5.423, - "amount":0.14233, - "price_int":"542300", - "amount_int":"14233000", - "stamp":"1327903835181149" - }, - { - "price":5.42391, - "amount":100, - "price_int":"542391", - "amount_int":"10000000000", - "stamp":"1328636760911498" - }, - { - "price":5.42392, - "amount":86.97965728, - "price_int":"542392", - "amount_int":"8697965728", - "stamp":"1328639358152288" - }, - { - "price":5.4242, - "amount":0.02181396, - "price_int":"542420", - "amount_int":"2181396", - "stamp":"1328611563272696" - }, - { - "price":5.42434, - "amount":1.96327155, - "price_int":"542434", - "amount_int":"196327155", - "stamp":"1328644621007175" - }, - { - "price":5.42516, - "amount":1, - "price_int":"542516", - "amount_int":"100000000", - "stamp":"1328612464445716" - }, - { - "price":5.4252, - "amount":0.31407474, - "price_int":"542520", - "amount_int":"31407474", - "stamp":"1327897450354251" - }, - { - "price":5.4256, - "amount":0.26, - "price_int":"542560", - "amount_int":"26000000", - "stamp":"1328084945561648" - }, - { - "price":5.42678, - "amount":0.14944, - "price_int":"542678", - "amount_int":"14944000", - "stamp":"1328639150813500" - }, - { - "price":5.42848, - "amount":0.15, - "price_int":"542848", - "amount_int":"15000000", - "stamp":"1328571752437884" - }, - { - "price":5.42897, - "amount":2.47844, - "price_int":"542897", - "amount_int":"247844000", - "stamp":"1328135863018299" - }, - { - "price":5.4292, - "amount":0.0227414, - "price_int":"542920", - "amount_int":"2274140", - "stamp":"1328014522756311" - }, - { - "price":5.42943, - "amount":0.07755, - "price_int":"542943", - "amount_int":"7755000", - "stamp":"1328643403282103" - }, - { - "price":5.42961, - "amount":0.44876, - "price_int":"542961", - "amount_int":"44876000", - "stamp":"1328230916364086" - }, - { - "price":5.42974, - "amount":0.26958, - "price_int":"542974", - "amount_int":"26958000", - "stamp":"1328613313279097" - }, - { - "price":5.43, - "amount":56.34833332, - "price_int":"543000", - "amount_int":"5634833332", - "stamp":"1328487558392016" - }, - { - "price":5.43001, - "amount":0.00055249, - "price_int":"543001", - "amount_int":"55249", - "stamp":"1327685983878218" - }, - { - "price":5.4304, - "amount":1.01, - "price_int":"543040", - "amount_int":"101000000", - "stamp":"1328598910286377" - }, - { - "price":5.4306, - "amount":0.55242515, - "price_int":"543060", - "amount_int":"55242515", - "stamp":"1328449209050991" - }, - { - "price":5.43137, - "amount":0.02543713, - "price_int":"543137", - "amount_int":"2543713", - "stamp":"1328014512222310" - }, - { - "price":5.4315, - "amount":200, - "price_int":"543150", - "amount_int":"20000000000", - "stamp":"1328630019322528" - }, - { - "price":5.4319, - "amount":0.60358, - "price_int":"543190", - "amount_int":"60358000", - "stamp":"1328146982843794" - }, - { - "price":5.4338, - "amount":1.223, - "price_int":"543380", - "amount_int":"122300000", - "stamp":"1328507943246733" - }, - { - "price":5.43383, - "amount":0.22941, - "price_int":"543383", - "amount_int":"22941000", - "stamp":"1328506924477669" - }, - { - "price":5.43506, - "amount":0.31429793, - "price_int":"543506", - "amount_int":"31429793", - "stamp":"1328001905284740" - }, - { - "price":5.43589, - "amount":0.02040739, - "price_int":"543589", - "amount_int":"2040739", - "stamp":"1328637954362255" - }, - { - "price":5.43596, - "amount":0.08099, - "price_int":"543596", - "amount_int":"8099000", - "stamp":"1328135896561805" - }, - { - "price":5.436, - "amount":50.52948849, - "price_int":"543600", - "amount_int":"5052948849", - "stamp":"1328643676363652" - }, - { - "price":5.43667, - "amount":0.02183327, - "price_int":"543667", - "amount_int":"2183327", - "stamp":"1328642158448585" - }, - { - "price":5.43752, - "amount":0.04004, - "price_int":"543752", - "amount_int":"4004000", - "stamp":"1328234831655629" - }, - { - "price":5.43845, - "amount":0.43754, - "price_int":"543845", - "amount_int":"43754000", - "stamp":"1328133119550546" - }, - { - "price":5.43864, - "amount":2.17786, - "price_int":"543864", - "amount_int":"217786000", - "stamp":"1328134866109039" - }, - { - "price":5.43865, - "amount":0.31069, - "price_int":"543865", - "amount_int":"31069000", - "stamp":"1328134906656459" - }, - { - "price":5.43891, - "amount":0.39739, - "price_int":"543891", - "amount_int":"39739000", - "stamp":"1328200522961120" - }, - { - "price":5.439, - "amount":0.02276007, - "price_int":"543900", - "amount_int":"2276007", - "stamp":"1328014518681137" - }, - { - "price":5.43913, - "amount":0.0514, - "price_int":"543913", - "amount_int":"5140000", - "stamp":"1328132425927388" - }, - { - "price":5.44, - "amount":1.0053, - "price_int":"544000", - "amount_int":"100530000", - "stamp":"1328033640111617" - }, - { - "price":5.44084, - "amount":0.33839442, - "price_int":"544084", - "amount_int":"33839442", - "stamp":"1328015509264895" - }, - { - "price":5.441, - "amount":0.18735, - "price_int":"544100", - "amount_int":"18735000", - "stamp":"1328594998484362" - }, - { - "price":5.44118, - "amount":0.02544441, - "price_int":"544118", - "amount_int":"2544441", - "stamp":"1328014509760948" - }, - { - "price":5.4427, - "amount":2.051, - "price_int":"544270", - "amount_int":"205100000", - "stamp":"1328580132321181" - }, - { - "price":5.44394, - "amount":13.20778, - "price_int":"544394", - "amount_int":"1320778000", - "stamp":"1328642488384316" - }, - { - "price":5.44399, - "amount":9.99104149, - "price_int":"544399", - "amount_int":"999104149", - "stamp":"1328580836539801" - }, - { - "price":5.4442, - "amount":0.55104515, - "price_int":"544420", - "amount_int":"55104515", - "stamp":"1328449207928060" - }, - { - "price":5.44493, - "amount":0.31441697, - "price_int":"544493", - "amount_int":"31441697", - "stamp":"1328014087229827" - }, - { - "price":5.445, - "amount":20.08607897, - "price_int":"544500", - "amount_int":"2008607897", - "stamp":"1328587684742135" - }, - { - "price":5.44509, - "amount":3.4200877, - "price_int":"544509", - "amount_int":"342008770", - "stamp":"1328595133974329" - }, - { - "price":5.44711, - "amount":0.03089, - "price_int":"544711", - "amount_int":"3089000", - "stamp":"1328328300926756" - }, - { - "price":5.44767, - "amount":0.37696, - "price_int":"544767", - "amount_int":"37696000", - "stamp":"1328613049892246" - }, - { - "price":5.44795, - "amount":0.78803, - "price_int":"544795", - "amount_int":"78803000", - "stamp":"1328243843697228" - }, - { - "price":5.44848, - "amount":0.10548, - "price_int":"544848", - "amount_int":"10548000", - "stamp":"1328381192686528" - }, - { - "price":5.4488, - "amount":0.02277834, - "price_int":"544880", - "amount_int":"2277834", - "stamp":"1328014512268753" - }, - { - "price":5.449, - "amount":75, - "price_int":"544900", - "amount_int":"7500000000", - "stamp":"1328623562155653" - }, - { - "price":5.44914, - "amount":0.02183582, - "price_int":"544914", - "amount_int":"2183582", - "stamp":"1328642155489941" - }, - { - "price":5.45, - "amount":9293.06616266, - "price_int":"545000", - "amount_int":"929306616266", - "stamp":"1328643106067878" - }, - { - "price":5.45001, - "amount":205.01158162, - "price_int":"545001", - "amount_int":"20501158162", - "stamp":"1328613410347342" - }, - { - "price":5.45002, - "amount":25, - "price_int":"545002", - "amount_int":"2500000000", - "stamp":"1328632074342002" - }, - { - "price":5.45005, - "amount":99, - "price_int":"545005", - "amount_int":"9900000000", - "stamp":"1328615889199777" - }, - { - "price":5.45008, - "amount":0.03137752, - "price_int":"545008", - "amount_int":"3137752", - "stamp":"1328578569120087" - }, - { - "price":5.4501, - "amount":1516.70324599, - "price_int":"545010", - "amount_int":"151670324599", - "stamp":"1328617151841776" - }, - { - "price":5.45013, - "amount":17.335413, - "price_int":"545013", - "amount_int":"1733541300", - "stamp":"1328635459502500" - }, - { - "price":5.45014, - "amount":1.62456747, - "price_int":"545014", - "amount_int":"162456747", - "stamp":"1328644620700521" - }, - { - "price":5.45019, - "amount":4.43, - "price_int":"545019", - "amount_int":"443000000", - "stamp":"1328578555938237" - }, - { - "price":5.45025, - "amount":3.02, - "price_int":"545025", - "amount_int":"302000000", - "stamp":"1328614661041786" - }, - { - "price":5.45041, - "amount":7.08291031, - "price_int":"545041", - "amount_int":"708291031", - "stamp":"1328600788858061" - }, - { - "price":5.45095, - "amount":0.02040705, - "price_int":"545095", - "amount_int":"2040705", - "stamp":"1328638012739628" - }, - { - "price":5.45098, - "amount":0.03060671, - "price_int":"545098", - "amount_int":"3060671", - "stamp":"1328612092066896" - }, - { - "price":5.451, - "amount":58.4732, - "price_int":"545100", - "amount_int":"5847320000", - "stamp":"1328643803156412" - }, - { - "price":5.45101, - "amount":80.75970591, - "price_int":"545101", - "amount_int":"8075970591", - "stamp":"1328608095519197" - }, - { - "price":5.45105, - "amount":99, - "price_int":"545105", - "amount_int":"9900000000", - "stamp":"1328615899995564" - }, - { - "price":5.45367, - "amount":0.15, - "price_int":"545367", - "amount_int":"15000000", - "stamp":"1328598506056283" - }, - { - "price":5.45379, - "amount":4.36374, - "price_int":"545379", - "amount_int":"436374000", - "stamp":"1328613345662054" - }, - { - "price":5.45384, - "amount":0.07386, - "price_int":"545384", - "amount_int":"7386000", - "stamp":"1328613291038476" - }, - { - "price":5.45479, - "amount":0.31568139, - "price_int":"545479", - "amount_int":"31568139", - "stamp":"1328583552596134" - }, - { - "price":5.4551, - "amount":100, - "price_int":"545510", - "amount_int":"10000000000", - "stamp":"1328573320116563" - }, - { - "price":5.4557, - "amount":1, - "price_int":"545570", - "amount_int":"100000000", - "stamp":"1328595604073892" - }, - { - "price":5.45581, - "amount":0.14624, - "price_int":"545581", - "amount_int":"14624000", - "stamp":"1328613952824465" - }, - { - "price":5.4565, - "amount":2.1369, - "price_int":"545650", - "amount_int":"213690000", - "stamp":"1328586892374036" - }, - { - "price":5.45651, - "amount":0.01, - "price_int":"545651", - "amount_int":"1000000", - "stamp":"1328588811348920" - }, - { - "price":5.45689, - "amount":7, - "price_int":"545689", - "amount_int":"700000000", - "stamp":"1328644637169776" - }, - { - "price":5.45707, - "amount":0.58936, - "price_int":"545707", - "amount_int":"58936000", - "stamp":"1328614032043929" - }, - { - "price":5.45852, - "amount":564, - "price_int":"545852", - "amount_int":"56400000000", - "stamp":"1328642088796737" - }, - { - "price":5.4586, - "amount":0.02311215, - "price_int":"545860", - "amount_int":"2311215", - "stamp":"1328612551903855" - }, - { - "price":5.45901, - "amount":40, - "price_int":"545901", - "amount_int":"4000000000", - "stamp":"1328643776244496" - }, - { - "price":5.45948, - "amount":0.01, - "price_int":"545948", - "amount_int":"1000000", - "stamp":"1328596635652657" - }, - { - "price":5.46, - "amount":1791.66784461, - "price_int":"546000", - "amount_int":"179166784461", - "stamp":"1328634424609601" - }, - { - "price":5.46001, - "amount":8.37931083, - "price_int":"546001", - "amount_int":"837931083", - "stamp":"1328620500401832" - }, - { - "price":5.46002, - "amount":39.87408984, - "price_int":"546002", - "amount_int":"3987408984", - "stamp":"1328613158693340" - }, - { - "price":5.4601, - "amount":46.62936576, - "price_int":"546010", - "amount_int":"4662936576", - "stamp":"1328628082952870" - }, - { - "price":5.46024, - "amount":0.73599, - "price_int":"546024", - "amount_int":"73599000", - "stamp":"1328613318650987" - }, - { - "price":5.46047, - "amount":0.01, - "price_int":"546047", - "amount_int":"1000000", - "stamp":"1328597237875861" - }, - { - "price":5.4605, - "amount":0.54940024, - "price_int":"546050", - "amount_int":"54940024", - "stamp":"1328612878634965" - }, - { - "price":5.46071, - "amount":0.66666667, - "price_int":"546071", - "amount_int":"66666667", - "stamp":"1328612608579032" - }, - { - "price":5.46078, - "amount":0.02809261, - "price_int":"546078", - "amount_int":"2809261", - "stamp":"1328612547683026" - }, - { - "price":5.46102, - "amount":0.19, - "price_int":"546102", - "amount_int":"19000000", - "stamp":"1328638181816808" - }, - { - "price":5.46154, - "amount":0.05032261, - "price_int":"546154", - "amount_int":"5032261", - "stamp":"1328644776277794" - }, - { - "price":5.46161, - "amount":0.0218398, - "price_int":"546161", - "amount_int":"2183980", - "stamp":"1328642152836769" - }, - { - "price":5.462, - "amount":55, - "price_int":"546200", - "amount_int":"5500000000", - "stamp":"1328637587490219" - }, - { - "price":5.46202, - "amount":0.34, - "price_int":"546202", - "amount_int":"34000000", - "stamp":"1328638189879430" - }, - { - "price":5.463, - "amount":1.28229361, - "price_int":"546300", - "amount_int":"128229361", - "stamp":"1328591314661639" - }, - { - "price":5.4646, - "amount":274.76529846, - "price_int":"546460", - "amount_int":"27476529846", - "stamp":"1328601665000823" - }, - { - "price":5.465, - "amount":99.23855251, - "price_int":"546500", - "amount_int":"9923855251", - "stamp":"1328613160692344" - }, - { - "price":5.4651, - "amount":50, - "price_int":"546510", - "amount_int":"5000000000", - "stamp":"1328615458894875" - }, - { - "price":5.46511, - "amount":130.52920618, - "price_int":"546511", - "amount_int":"13052920618", - "stamp":"1328623587835144" - }, - { - "price":5.46601, - "amount":0.0204049, - "price_int":"546601", - "amount_int":"2040490", - "stamp":"1328638071123098" - }, - { - "price":5.46666, - "amount":51, - "price_int":"546666", - "amount_int":"5100000000", - "stamp":"1328601199863970" - }, - { - "price":5.46694, - "amount":9.0004012, - "price_int":"546694", - "amount_int":"900040120", - "stamp":"1328613162198738" - }, - { - "price":5.4684, - "amount":0.02313173, - "price_int":"546840", - "amount_int":"2313173", - "stamp":"1328612590340257" - }, - { - "price":5.469, - "amount":26.66790455, - "price_int":"546900", - "amount_int":"2666790455", - "stamp":"1328614530760428" - }, - { - "price":5.4698, - "amount":1.01, - "price_int":"546980", - "amount_int":"101000000", - "stamp":"1328612089387024" - }, - { - "price":5.47, - "amount":1002.5905, - "price_int":"547000", - "amount_int":"100259050000", - "stamp":"1328641897715987" - }, - { - "price":5.47001, - "amount":45.5231, - "price_int":"547001", - "amount_int":"4552310000", - "stamp":"1328628107022168" - }, - { - "price":5.47059, - "amount":0.02810082, - "price_int":"547059", - "amount_int":"2810082", - "stamp":"1328612587547218" - }, - { - "price":5.47083, - "amount":1.35528515, - "price_int":"547083", - "amount_int":"135528515", - "stamp":"1328644620412356" - }, - { - "price":5.471, - "amount":11.87585815, - "price_int":"547100", - "amount_int":"1187585815", - "stamp":"1328630926628597" - }, - { - "price":5.47174, - "amount":34.27681339, - "price_int":"547174", - "amount_int":"3427681339", - "stamp":"1328635042817809" - }, - { - "price":5.47369, - "amount":3.26897, - "price_int":"547369", - "amount_int":"326897000", - "stamp":"1328613324233153" - }, - { - "price":5.47408, - "amount":0.0218458, - "price_int":"547408", - "amount_int":"2184580", - "stamp":"1328642275420231" - }, - { - "price":5.4741, - "amount":0.54803529, - "price_int":"547410", - "amount_int":"54803529", - "stamp":"1328612878288907" - }, - { - "price":5.475, - "amount":190.27870867, - "price_int":"547500", - "amount_int":"19027870867", - "stamp":"1328610778774456" - }, - { - "price":5.47531, - "amount":0.1034, - "price_int":"547531", - "amount_int":"10340000", - "stamp":"1328613354231926" - }, - { - "price":5.47532, - "amount":0.23323, - "price_int":"547532", - "amount_int":"23323000", - "stamp":"1328613303458835" - }, - { - "price":5.47539, - "amount":2.79953782, - "price_int":"547539", - "amount_int":"279953782", - "stamp":"1328619749433807" - }, - { - "price":5.476, - "amount":5, - "price_int":"547600", - "amount_int":"500000000", - "stamp":"1328630818525105" - }, - { - "price":5.47719, - "amount":1.33, - "price_int":"547719", - "amount_int":"133000000", - "stamp":"1328641182538146" - }, - { - "price":5.4777, - "amount":333, - "price_int":"547770", - "amount_int":"33300000000", - "stamp":"1328613045860658" - }, - { - "price":5.478, - "amount":43.65, - "price_int":"547800", - "amount_int":"4365000000", - "stamp":"1328622063291345" - }, - { - "price":5.4782, - "amount":0.02314881, - "price_int":"547820", - "amount_int":"2314881", - "stamp":"1328612919633764" - }, - { - "price":5.47911, - "amount":7.30012197, - "price_int":"547911", - "amount_int":"730012197", - "stamp":"1328611506864837" - }, - { - "price":5.48, - "amount":37.71468613, - "price_int":"548000", - "amount_int":"3771468613", - "stamp":"1328643744286809" - }, - { - "price":5.48005, - "amount":540.5303437, - "price_int":"548005", - "amount_int":"54053034370", - "stamp":"1328642081306678" - }, - { - "price":5.4801, - "amount":57.54805298, - "price_int":"548010", - "amount_int":"5754805298", - "stamp":"1328638474115387" - }, - { - "price":5.48039, - "amount":0.02811225, - "price_int":"548039", - "amount_int":"2811225", - "stamp":"1328612906545710" - }, - { - "price":5.4804, - "amount":100, - "price_int":"548040", - "amount_int":"10000000000", - "stamp":"1328643254760932" - }, - { - "price":5.48107, - "amount":0.02040286, - "price_int":"548107", - "amount_int":"2040286", - "stamp":"1328638129705924" - }, - { - "price":5.4816, - "amount":0.15788, - "price_int":"548160", - "amount_int":"15788000", - "stamp":"1328642437681604" - }, - { - "price":5.482, - "amount":300, - "price_int":"548200", - "amount_int":"30000000000", - "stamp":"1328628971838849" - }, - { - "price":5.48212, - "amount":6.64812742, - "price_int":"548212", - "amount_int":"664812742", - "stamp":"1328640197455846" - }, - { - "price":5.48381, - "amount":1.38799, - "price_int":"548381", - "amount_int":"138799000", - "stamp":"1328643189168895" - }, - { - "price":5.48427, - "amount":0.05892, - "price_int":"548427", - "amount_int":"5892000", - "stamp":"1328613351165864" - }, - { - "price":5.4844, - "amount":1.17980145, - "price_int":"548440", - "amount_int":"117980145", - "stamp":"1328644620127506" - }, - { - "price":5.48445, - "amount":0.21024, - "price_int":"548445", - "amount_int":"21024000", - "stamp":"1328612996814826" - }, - { - "price":5.48466, - "amount":0.47016, - "price_int":"548466", - "amount_int":"47016000", - "stamp":"1328631619717095" - }, - { - "price":5.485, - "amount":200, - "price_int":"548500", - "amount_int":"20000000000", - "stamp":"1328617407053383" - }, - { - "price":5.48514, - "amount":0.01, - "price_int":"548514", - "amount_int":"1000000", - "stamp":"1328612283164802" - }, - { - "price":5.48601, - "amount":69.99067263, - "price_int":"548601", - "amount_int":"6999067263", - "stamp":"1328613845117599" - }, - { - "price":5.48614, - "amount":1.15732151, - "price_int":"548614", - "amount_int":"115732151", - "stamp":"1328644619840314" - }, - { - "price":5.4865, - "amount":60, - "price_int":"548650", - "amount_int":"6000000000", - "stamp":"1328640567164819" - }, - { - "price":5.48655, - "amount":0.02183, - "price_int":"548655", - "amount_int":"2183000", - "stamp":"1328642271512038" - }, - { - "price":5.4878, - "amount":0.54666715, - "price_int":"548780", - "amount_int":"54666715", - "stamp":"1328612877931154" - }, - { - "price":5.488, - "amount":10.02316743, - "price_int":"548800", - "amount_int":"1002316743", - "stamp":"1328643598460666" - }, - { - "price":5.48872, - "amount":0.18902, - "price_int":"548872", - "amount_int":"18902000", - "stamp":"1328613028665872" - }, - { - "price":5.489, - "amount":0.34682539, - "price_int":"548900", - "amount_int":"34682539", - "stamp":"1328614862778174" - }, - { - "price":5.4895, - "amount":1.01, - "price_int":"548950", - "amount_int":"101000000", - "stamp":"1328612587065798" - }, - { - "price":5.49, - "amount":29, - "price_int":"549000", - "amount_int":"2900000000", - "stamp":"1328613693761878" - }, - { - "price":5.4902, - "amount":0.02812038, - "price_int":"549020", - "amount_int":"2812038", - "stamp":"1328612903974877" - }, - { - "price":5.4903, - "amount":2, - "price_int":"549030", - "amount_int":"200000000", - "stamp":"1328623295502724" - }, - { - "price":5.49087, - "amount":0.03599, - "price_int":"549087", - "amount_int":"3599000", - "stamp":"1328613046751224" - }, - { - "price":5.49244, - "amount":0.01286, - "price_int":"549244", - "amount_int":"1286000", - "stamp":"1328613300141681" - }, - { - "price":5.49338, - "amount":0.29124, - "price_int":"549338", - "amount_int":"29124000", - "stamp":"1328613967534364" - }, - { - "price":5.49358, - "amount":1.28715, - "price_int":"549358", - "amount_int":"128715000", - "stamp":"1328643215744181" - }, - { - "price":5.49359, - "amount":0.15332, - "price_int":"549359", - "amount_int":"15332000", - "stamp":"1328643225829282" - }, - { - "price":5.49385, - "amount":0.14178, - "price_int":"549385", - "amount_int":"14178000", - "stamp":"1328643077425593" - }, - { - "price":5.49477, - "amount":1.15113735, - "price_int":"549477", - "amount_int":"115113735", - "stamp":"1328644772228922" - }, - { - "price":5.49612, - "amount":0.02040143, - "price_int":"549612", - "amount_int":"2040143", - "stamp":"1328641149392989" - }, - { - "price":5.49742, - "amount":1.44446948, - "price_int":"549742", - "amount_int":"144446948", - "stamp":"1328635910668088" - }, - { - "price":5.4978, - "amount":0.02317779, - "price_int":"549780", - "amount_int":"2317779", - "stamp":"1328612913306086" - }, - { - "price":5.49835, - "amount":0.33027826, - "price_int":"549835", - "amount_int":"33027826", - "stamp":"1328644502049666" - }, - { - "price":5.499, - "amount":10.23, - "price_int":"549900", - "amount_int":"1023000000", - "stamp":"1328639486656245" - }, - { - "price":5.5, - "amount":996.10129077, - "price_int":"550000", - "amount_int":"99610129077", - "stamp":"1328642943802564" - }, - { - "price":5.50001, - "amount":5.4545, - "price_int":"550001", - "amount_int":"545450000", - "stamp":"1328643516461889" - }, - { - "price":5.50003, - "amount":3.05, - "price_int":"550003", - "amount_int":"305000000", - "stamp":"1328641224222985" - }, - { - "price":5.50048, - "amount":0.15, - "price_int":"550048", - "amount_int":"15000000", - "stamp":"1328612126703539" - }, - { - "price":5.5005, - "amount":88.36105081, - "price_int":"550050", - "amount_int":"8836105081", - "stamp":"1328632141928927" - }, - { - "price":5.50053, - "amount":14.96453338, - "price_int":"550053", - "amount_int":"1496453338", - "stamp":"1328641557691297" - }, - { - "price":5.501, - "amount":39.9, - "price_int":"550100", - "amount_int":"3990000000", - "stamp":"1328642456270694" - }, - { - "price":5.5011, - "amount":1.6354, - "price_int":"550110", - "amount_int":"163540000", - "stamp":"1328620644586479" - }, - { - "price":5.50111, - "amount":15, - "price_int":"550111", - "amount_int":"1500000000", - "stamp":"1328622990382452" - }, - { - "price":5.50112, - "amount":249.18200475, - "price_int":"550112", - "amount_int":"24918200475", - "stamp":"1328643966546253" - }, - { - "price":5.5015, - "amount":50.54530583, - "price_int":"550150", - "amount_int":"5054530583", - "stamp":"1328640785845262" - }, - { - "price":5.50213, - "amount":0.01551, - "price_int":"550213", - "amount_int":"1551000", - "stamp":"1328613598289028" - }, - { - "price":5.5027, - "amount":0.28053, - "price_int":"550270", - "amount_int":"28053000", - "stamp":"1328613012618505" - }, - { - "price":5.50298, - "amount":0.47021, - "price_int":"550298", - "amount_int":"47021000", - "stamp":"1328643194778940" - }, - { - "price":5.50352, - "amount":0.04956, - "price_int":"550352", - "amount_int":"4956000", - "stamp":"1328613916406806" - }, - { - "price":5.5036, - "amount":50.21592849, - "price_int":"550360", - "amount_int":"5021592849", - "stamp":"1328641276023227" - }, - { - "price":5.50378, - "amount":2.97909517, - "price_int":"550378", - "amount_int":"297909517", - "stamp":"1328641443699326" - }, - { - "price":5.505, - "amount":250, - "price_int":"550500", - "amount_int":"25000000000", - "stamp":"1328624417346196" - }, - { - "price":5.50587, - "amount":0.01, - "price_int":"550587", - "amount_int":"1000000", - "stamp":"1328612885517650" - }, - { - "price":5.50597, - "amount":12.36746, - "price_int":"550597", - "amount_int":"1236746000", - "stamp":"1328643144055059" - }, - { - "price":5.5076, - "amount":0.02318326, - "price_int":"550760", - "amount_int":"2318326", - "stamp":"1328612910019963" - }, - { - "price":5.50888, - "amount":3.44209, - "price_int":"550888", - "amount_int":"344209000", - "stamp":"1328613015862310" - }, - { - "price":5.50893, - "amount":0.0596, - "price_int":"550893", - "amount_int":"5960000", - "stamp":"1328612960715391" - }, - { - "price":5.5092, - "amount":1.01, - "price_int":"550920", - "amount_int":"101000000", - "stamp":"1328612879441134" - }, - { - "price":5.5098, - "amount":0.01994459, - "price_int":"550980", - "amount_int":"1994459", - "stamp":"1328612899431973" - }, - { - "price":5.51, - "amount":251.83, - "price_int":"551000", - "amount_int":"25183000000", - "stamp":"1328643730516526" - }, - { - "price":5.5101, - "amount":42, - "price_int":"551010", - "amount_int":"4200000000", - "stamp":"1328642364916915" - }, - { - "price":5.51013, - "amount":0.51135342, - "price_int":"551013", - "amount_int":"51135342", - "stamp":"1328640567638714" - }, - { - "price":5.51092, - "amount":0.14165, - "price_int":"551092", - "amount_int":"14165000", - "stamp":"1328643399813282" - }, - { - "price":5.51118, - "amount":12.79462339, - "price_int":"551118", - "amount_int":"1279462339", - "stamp":"1328643025581909" - }, - { - "price":5.51149, - "amount":0.91636682, - "price_int":"551149", - "amount_int":"91636682", - "stamp":"1328616488911440" - }, - { - "price":5.5115, - "amount":50, - "price_int":"551150", - "amount_int":"5000000000", - "stamp":"1328640533312157" - }, - { - "price":5.51163, - "amount":0.51283277, - "price_int":"551163", - "amount_int":"51283277", - "stamp":"1328640943412341" - }, - { - "price":5.51219, - "amount":0.60052, - "price_int":"551219", - "amount_int":"60052000", - "stamp":"1328643235542013" - }, - { - "price":5.51386, - "amount":1, - "price_int":"551386", - "amount_int":"100000000", - "stamp":"1328612151692835" - }, - { - "price":5.51401, - "amount":9, - "price_int":"551401", - "amount_int":"900000000", - "stamp":"1328644294017026" - }, - { - "price":5.5154, - "amount":0.54393154, - "price_int":"551540", - "amount_int":"54393154", - "stamp":"1328641811340739" - }, - { - "price":5.5174, - "amount":0.02316092, - "price_int":"551740", - "amount_int":"2316092", - "stamp":"1328612906811570" - }, - { - "price":5.51961, - "amount":0.01995134, - "price_int":"551961", - "amount_int":"1995134", - "stamp":"1328612897380688" - }, - { - "price":5.52, - "amount":493, - "price_int":"552000", - "amount_int":"49300000000", - "stamp":"1328641672670945" - }, - { - "price":5.52045, - "amount":4.14586976, - "price_int":"552045", - "amount_int":"414586976", - "stamp":"1328612942067488" - }, - { - "price":5.52093, - "amount":0.35014, - "price_int":"552093", - "amount_int":"35014000", - "stamp":"1328643155670798" - }, - { - "price":5.521, - "amount":50, - "price_int":"552100", - "amount_int":"5000000000", - "stamp":"1328642649513604" - }, - { - "price":5.5215, - "amount":4.18193067, - "price_int":"552150", - "amount_int":"418193067", - "stamp":"1328613472933162" - }, - { - "price":5.52509, - "amount":51.92, - "price_int":"552509", - "amount_int":"5192000000", - "stamp":"1328642909662560" - }, - { - "price":5.52624, - "amount":0.02040332, - "price_int":"552624", - "amount_int":"2040332", - "stamp":"1328644109027012" - }, - { - "price":5.5272, - "amount":0.02316838, - "price_int":"552720", - "amount_int":"2316838", - "stamp":"1328612902911469" - }, - { - "price":5.5288, - "amount":1.0406, - "price_int":"552880", - "amount_int":"104060000", - "stamp":"1328612879027461" - }, - { - "price":5.52898, - "amount":3.14326, - "price_int":"552898", - "amount_int":"314326000", - "stamp":"1328643150290888" - }, - { - "price":5.52941, - "amount":0.03003607, - "price_int":"552941", - "amount_int":"3003607", - "stamp":"1328612892996380" - }, - { - "price":5.53, - "amount":101.5, - "price_int":"553000", - "amount_int":"10150000000", - "stamp":"1328642946908152" - }, - { - "price":5.53062, - "amount":0.09933, - "price_int":"553062", - "amount_int":"9933000", - "stamp":"1328643405628184" - }, - { - "price":5.53063, - "amount":0.225, - "price_int":"553063", - "amount_int":"22500000", - "stamp":"1328643429226877" - }, - { - "price":5.531, - "amount":100, - "price_int":"553100", - "amount_int":"10000000000", - "stamp":"1328624701123006" - }, - { - "price":5.53102, - "amount":0.14034, - "price_int":"553102", - "amount_int":"14034000", - "stamp":"1328637955390227" - }, - { - "price":5.53105, - "amount":4.00733797, - "price_int":"553105", - "amount_int":"400733797", - "stamp":"1328641559214141" - }, - { - "price":5.5338, - "amount":9, - "price_int":"553380", - "amount_int":"900000000", - "stamp":"1328552462841594" - }, - { - "price":5.53532, - "amount":16.69000659, - "price_int":"553532", - "amount_int":"1669000659", - "stamp":"1328641561211581" - }, - { - "price":5.53597, - "amount":0.15, - "price_int":"553597", - "amount_int":"15000000", - "stamp":"1328626483894488" - }, - { - "price":5.536, - "amount":50.21592849, - "price_int":"553600", - "amount_int":"5021592849", - "stamp":"1328643308950641" - }, - { - "price":5.53603, - "amount":0.50470457, - "price_int":"553603", - "amount_int":"50470457", - "stamp":"1328634930893555" - }, - { - "price":5.53697, - "amount":0.12975, - "price_int":"553697", - "amount_int":"12975000", - "stamp":"1328642438146946" - }, - { - "price":5.537, - "amount":0.02318461, - "price_int":"553700", - "amount_int":"2318461", - "stamp":"1328612899025935" - }, - { - "price":5.53715, - "amount":0.2814751, - "price_int":"553715", - "amount_int":"28147510", - "stamp":"1328614847397561" - }, - { - "price":5.5378, - "amount":1.0406, - "price_int":"553780", - "amount_int":"104060000", - "stamp":"1328612878208773" - }, - { - "price":5.5392, - "amount":1.66920445, - "price_int":"553920", - "amount_int":"166920445", - "stamp":"1328643189683256" - }, - { - "price":5.53922, - "amount":0.02500335, - "price_int":"553922", - "amount_int":"2500335", - "stamp":"1328612890323973" - }, - { - "price":5.53943, - "amount":0.66666667, - "price_int":"553943", - "amount_int":"66666667", - "stamp":"1328612609582890" - }, - { - "price":5.53967, - "amount":0.04841, - "price_int":"553967", - "amount_int":"4841000", - "stamp":"1328613351753105" - }, - { - "price":5.53985, - "amount":0.20386, - "price_int":"553985", - "amount_int":"20386000", - "stamp":"1328642500041795" - }, - { - "price":5.53999, - "amount":14.44045927, - "price_int":"553999", - "amount_int":"1444045927", - "stamp":"1327961978556458" - }, - { - "price":5.54, - "amount":2, - "price_int":"554000", - "amount_int":"200000000", - "stamp":"1328621567243293" - }, - { - "price":5.54035, - "amount":0.55757734, - "price_int":"554035", - "amount_int":"55757734", - "stamp":"1328641627865866" - }, - { - "price":5.54269, - "amount":0.15, - "price_int":"554269", - "amount_int":"15000000", - "stamp":"1328614847709361" - }, - { - "price":5.54416, - "amount":0.19257, - "price_int":"554416", - "amount_int":"19257000", - "stamp":"1328643182392724" - }, - { - "price":5.5445, - "amount":0.37037037, - "price_int":"554450", - "amount_int":"37037037", - "stamp":"1328612829030426" - }, - { - "price":5.54532, - "amount":0.15, - "price_int":"554532", - "amount_int":"15000000", - "stamp":"1328629306076772" - }, - { - "price":5.54535, - "amount":0.01, - "price_int":"554535", - "amount_int":"1000000", - "stamp":"1328620110760330" - }, - { - "price":5.54633, - "amount":0.02709, - "price_int":"554633", - "amount_int":"2709000", - "stamp":"1328613047252892" - }, - { - "price":5.5468, - "amount":0.02369178, - "price_int":"554680", - "amount_int":"2369178", - "stamp":"1328612893089684" - }, - { - "price":5.54683, - "amount":3.21037396, - "price_int":"554683", - "amount_int":"321037396", - "stamp":"1328637996975019" - }, - { - "price":5.54792, - "amount":0.01346, - "price_int":"554792", - "amount_int":"1346000", - "stamp":"1328613606113882" - }, - { - "price":5.54887, - "amount":0.28289, - "price_int":"554887", - "amount_int":"28289000", - "stamp":"1328642479564808" - }, - { - "price":5.54902, - "amount":0.02501215, - "price_int":"554902", - "amount_int":"2501215", - "stamp":"1328612888228612" - }, - { - "price":5.54907, - "amount":1.04081, - "price_int":"554907", - "amount_int":"104081000", - "stamp":"1328643216358545" - }, - { - "price":5.54908, - "amount":0.13836, - "price_int":"554908", - "amount_int":"13836000", - "stamp":"1328643226380625" - }, - { - "price":5.54934, - "amount":0.09322, - "price_int":"554934", - "amount_int":"9322000", - "stamp":"1328643077879703" - }, - { - "price":5.55, - "amount":406.21347387, - "price_int":"555000", - "amount_int":"40621347387", - "stamp":"1328642958161549" - }, - { - "price":5.551, - "amount":124.8162, - "price_int":"555100", - "amount_int":"12481620000", - "stamp":"1328641648691679" - }, - { - "price":5.55146, - "amount":1.0321, - "price_int":"555146", - "amount_int":"103210000", - "stamp":"1328642018503989" - }, - { - "price":5.55178, - "amount":9.85952696, - "price_int":"555178", - "amount_int":"985952696", - "stamp":"1328642002586589" - }, - { - "price":5.55217, - "amount":345, - "price_int":"555217", - "amount_int":"34500000000", - "stamp":"1328642081299268" - }, - { - "price":5.5566, - "amount":0.02372482, - "price_int":"555660", - "amount_int":"2372482", - "stamp":"1328641238451715" - }, - { - "price":5.55771, - "amount":0.01148, - "price_int":"555771", - "amount_int":"1148000", - "stamp":"1328642019441210" - }, - { - "price":5.5579, - "amount":1.051, - "price_int":"555790", - "amount_int":"105100000", - "stamp":"1328638564548663" - }, - { - "price":5.55828, - "amount":0.2659, - "price_int":"555828", - "amount_int":"26590000", - "stamp":"1328642882748300" - }, - { - "price":5.55857, - "amount":0.37627, - "price_int":"555857", - "amount_int":"37627000", - "stamp":"1328643195302340" - }, - { - "price":5.55882, - "amount":0.02191203, - "price_int":"555882", - "amount_int":"2191203", - "stamp":"1328641239016877" - }, - { - "price":5.55911, - "amount":0.04813, - "price_int":"555911", - "amount_int":"4813000", - "stamp":"1328643419552078" - }, - { - "price":5.56, - "amount":115, - "price_int":"556000", - "amount_int":"11500000000", - "stamp":"1328644433151168" - }, - { - "price":5.5601, - "amount":558.47648063, - "price_int":"556010", - "amount_int":"55847648063", - "stamp":"1328635041595489" - }, - { - "price":5.56011, - "amount":1.01, - "price_int":"556011", - "amount_int":"101000000", - "stamp":"1328639994759348" - }, - { - "price":5.5602, - "amount":27.11, - "price_int":"556020", - "amount_int":"2711000000", - "stamp":"1328636843813907" - }, - { - "price":5.56049, - "amount":8.20616915, - "price_int":"556049", - "amount_int":"820616915", - "stamp":"1328636452103129" - }, - { - "price":5.5605, - "amount":50, - "price_int":"556050", - "amount_int":"5000000000", - "stamp":"1328640718540125" - }, - { - "price":5.56059, - "amount":0.19, - "price_int":"556059", - "amount_int":"19000000", - "stamp":"1328638148719881" - }, - { - "price":5.56063, - "amount":11.33755096, - "price_int":"556063", - "amount_int":"1133755096", - "stamp":"1328642129788252" - }, - { - "price":5.561, - "amount":39.9, - "price_int":"556100", - "amount_int":"3990000000", - "stamp":"1328642447649024" - }, - { - "price":5.5637, - "amount":0.53920952, - "price_int":"556370", - "amount_int":"53920952", - "stamp":"1328642698303200" - }, - { - "price":5.56438, - "amount":2.76814, - "price_int":"556438", - "amount_int":"276814000", - "stamp":"1328643071836181" - }, - { - "price":5.56453, - "amount":3.0403, - "price_int":"556453", - "amount_int":"304030000", - "stamp":"1328642399001169" - }, - { - "price":5.56458, - "amount":0.05827, - "price_int":"556458", - "amount_int":"5827000", - "stamp":"1328643361393542" - }, - { - "price":5.565, - "amount":17.96945193, - "price_int":"556500", - "amount_int":"1796945193", - "stamp":"1328638542349646" - }, - { - "price":5.56511, - "amount":3.14515114, - "price_int":"556511", - "amount_int":"314515114", - "stamp":"1328641888172573" - }, - { - "price":5.5664, - "amount":0.02374004, - "price_int":"556640", - "amount_int":"2374004", - "stamp":"1328641293869224" - }, - { - "price":5.56659, - "amount":0.10079, - "price_int":"556659", - "amount_int":"10079000", - "stamp":"1328642403104122" - }, - { - "price":5.56787, - "amount":0.4796, - "price_int":"556787", - "amount_int":"47960000", - "stamp":"1328643236152262" - }, - { - "price":5.56863, - "amount":0.08135384, - "price_int":"556863", - "amount_int":"8135384", - "stamp":"1328644776637477" - }, - { - "price":5.57, - "amount":90.9478, - "price_int":"557000", - "amount_int":"9094780000", - "stamp":"1328642984542257" - }, - { - "price":5.5703, - "amount":1.33, - "price_int":"557030", - "amount_int":"133000000", - "stamp":"1328641181664634" - }, - { - "price":5.572, - "amount":66.74676776, - "price_int":"557200", - "amount_int":"6674676776", - "stamp":"1328619780552841" - }, - { - "price":5.57229, - "amount":0.24554, - "price_int":"557229", - "amount_int":"24554000", - "stamp":"1328643139317585" - }, - { - "price":5.5723, - "amount":0.55757734, - "price_int":"557230", - "amount_int":"55757734", - "stamp":"1328641628372034" - }, - { - "price":5.57321, - "amount":0.17034, - "price_int":"557321", - "amount_int":"17034000", - "stamp":"1328638084923127" - }, - { - "price":5.57322, - "amount":0.61687857, - "price_int":"557322", - "amount_int":"61687857", - "stamp":"1328638716199987" - }, - { - "price":5.57326, - "amount":50.37767927, - "price_int":"557326", - "amount_int":"5037767927", - "stamp":"1328641327361419" - }, - { - "price":5.57351, - "amount":0.05327, - "price_int":"557351", - "amount_int":"5327000", - "stamp":"1328642493136331" - }, - { - "price":5.57408, - "amount":10.79867, - "price_int":"557408", - "amount_int":"1079867000", - "stamp":"1328643144512140" - }, - { - "price":5.57429, - "amount":0.49388, - "price_int":"557429", - "amount_int":"49388000", - "stamp":"1328642155590108" - }, - { - "price":5.5762, - "amount":0.02375182, - "price_int":"557620", - "amount_int":"2375182", - "stamp":"1328641327170680" - }, - { - "price":5.57653, - "amount":0.12475, - "price_int":"557653", - "amount_int":"12475000", - "stamp":"1328642423397536" - }, - { - "price":5.5776, - "amount":0.53786575, - "price_int":"557760", - "amount_int":"53786575", - "stamp":"1328642697907961" - }, - { - "price":5.5777, - "amount":1.051, - "price_int":"557770", - "amount_int":"105100000", - "stamp":"1328639066458756" - }, - { - "price":5.57832, - "amount":3.97031443, - "price_int":"557832", - "amount_int":"397031443", - "stamp":"1328639493548452" - }, - { - "price":5.57843, - "amount":0.0269621, - "price_int":"557843", - "amount_int":"2696210", - "stamp":"1328641324632634" - }, - { - "price":5.57988, - "amount":0.15, - "price_int":"557988", - "amount_int":"15000000", - "stamp":"1328640343214532" - }, - { - "price":5.58, - "amount":44.80576344, - "price_int":"558000", - "amount_int":"4480576344", - "stamp":"1328643353992574" - }, - { - "price":5.581, - "amount":5, - "price_int":"558100", - "amount_int":"500000000", - "stamp":"1328643663898825" - }, - { - "price":5.58483, - "amount":2.41277, - "price_int":"558483", - "amount_int":"241277000", - "stamp":"1328643150738665" - }, - { - "price":5.58484, - "amount":0.01, - "price_int":"558484", - "amount_int":"1000000", - "stamp":"1328639370823509" - }, - { - "price":5.585, - "amount":50.6177, - "price_int":"558500", - "amount_int":"5061770000", - "stamp":"1328641648792832" - }, - { - "price":5.58518, - "amount":10.02339121, - "price_int":"558518", - "amount_int":"1002339121", - "stamp":"1328642354939195" - }, - { - "price":5.586, - "amount":0.02379782, - "price_int":"558600", - "amount_int":"2379782", - "stamp":"1328641546897275" - }, - { - "price":5.58648, - "amount":0.06918, - "price_int":"558648", - "amount_int":"6918000", - "stamp":"1328642407281826" - }, - { - "price":5.58649, - "amount":0.14388, - "price_int":"558649", - "amount_int":"14388000", - "stamp":"1328643081781530" - }, - { - "price":5.58824, - "amount":0.02571035, - "price_int":"558824", - "amount_int":"2571035", - "stamp":"1328641534571330" - }, - { - "price":5.59, - "amount":1, - "price_int":"559000", - "amount_int":"100000000", - "stamp":"1328642805824547" - }, - { - "price":5.5929, - "amount":0.10189, - "price_int":"559290", - "amount_int":"10189000", - "stamp":"1328642438608386" - }, - { - "price":5.59515, - "amount":0.86983, - "price_int":"559515", - "amount_int":"86983000", - "stamp":"1328643190202450" - }, - { - "price":5.5954, - "amount":1.1155, - "price_int":"559540", - "amount_int":"111550000", - "stamp":"1328641319938961" - }, - { - "price":5.59563, - "amount":0.03733, - "price_int":"559563", - "amount_int":"3733000", - "stamp":"1328642077280655" - }, - { - "price":5.5958, - "amount":0.02378868, - "price_int":"559580", - "amount_int":"2378868", - "stamp":"1328641768579045" - }, - { - "price":5.59581, - "amount":0.15063, - "price_int":"559581", - "amount_int":"15063000", - "stamp":"1328642169468402" - }, - { - "price":5.59804, - "amount":0.01932646, - "price_int":"559804", - "amount_int":"1932646", - "stamp":"1328641764729538" - }, - { - "price":5.59869, - "amount":0.53486585, - "price_int":"559869", - "amount_int":"53486585", - "stamp":"1328640058026542" - }, - { - "price":5.6, - "amount":1163.04410714, - "price_int":"560000", - "amount_int":"116304410714", - "stamp":"1328643793428787" - }, - { - "price":5.60002, - "amount":22.39488966, - "price_int":"560002", - "amount_int":"2239488966", - "stamp":"1328614021059211" - }, - { - "price":5.60016, - "amount":0.15229, - "price_int":"560016", - "amount_int":"15229000", - "stamp":"1328643182894729" - }, - { - "price":5.60024, - "amount":12.48258405, - "price_int":"560024", - "amount_int":"1248258405", - "stamp":"1328642915671311" - }, - { - "price":5.601, - "amount":19.9, - "price_int":"560100", - "amount_int":"1990000000", - "stamp":"1328642411995510" - }, - { - "price":5.6012, - "amount":543, - "price_int":"560120", - "amount_int":"54300000000", - "stamp":"1328642051051074" - }, - { - "price":5.60171, - "amount":0.50500949, - "price_int":"560171", - "amount_int":"50500949", - "stamp":"1328642237786675" - }, - { - "price":5.60235, - "amount":0.02819, - "price_int":"560235", - "amount_int":"2819000", - "stamp":"1328643220023875" - }, - { - "price":5.60396, - "amount":0.01321, - "price_int":"560396", - "amount_int":"1321000", - "stamp":"1328642097327382" - }, - { - "price":5.60492, - "amount":0.20947, - "price_int":"560492", - "amount_int":"20947000", - "stamp":"1328642149301625" - }, - { - "price":5.605, - "amount":10, - "price_int":"560500", - "amount_int":"1000000000", - "stamp":"1328641534299913" - }, - { - "price":5.60512, - "amount":0.80293, - "price_int":"560512", - "amount_int":"80293000", - "stamp":"1328643216872642" - }, - { - "price":5.60513, - "amount":0.10321, - "price_int":"560513", - "amount_int":"10321000", - "stamp":"1328643227008497" - }, - { - "price":5.60539, - "amount":0.04515, - "price_int":"560539", - "amount_int":"4515000", - "stamp":"1328642746613967" - }, - { - "price":5.6056, - "amount":0.02379994, - "price_int":"560560", - "amount_int":"2379994", - "stamp":"1328641803828457" - }, - { - "price":5.6058, - "amount":0.24504, - "price_int":"560580", - "amount_int":"24504000", - "stamp":"1328642817066907" - }, - { - "price":5.60598, - "amount":1.65308561, - "price_int":"560598", - "amount_int":"165308561", - "stamp":"1328641892118397" - }, - { - "price":5.606, - "amount":200.61, - "price_int":"560600", - "amount_int":"20061000000", - "stamp":"1328642228056075" - }, - { - "price":5.60605, - "amount":2.27332804, - "price_int":"560605", - "amount_int":"227332804", - "stamp":"1328642722205666" - }, - { - "price":5.60606, - "amount":40, - "price_int":"560606", - "amount_int":"4000000000", - "stamp":"1328643746351115" - }, - { - "price":5.60754, - "amount":0.48846, - "price_int":"560754", - "amount_int":"48846000", - "stamp":"1328642345527839" - }, - { - "price":5.60784, - "amount":0.01933233, - "price_int":"560784", - "amount_int":"1933233", - "stamp":"1328641804715818" - }, - { - "price":5.61, - "amount":6, - "price_int":"561000", - "amount_int":"600000000", - "stamp":"1328642923951662" - }, - { - "price":5.61011, - "amount":5.12171062, - "price_int":"561011", - "amount_int":"512171062", - "stamp":"1328643300129973" - }, - { - "price":5.61385, - "amount":0.01123, - "price_int":"561385", - "amount_int":"1123000", - "stamp":"1328643011870193" - }, - { - "price":5.61442, - "amount":0.18009, - "price_int":"561442", - "amount_int":"18009000", - "stamp":"1328642883249591" - }, - { - "price":5.61445, - "amount":0.01, - "price_int":"561445", - "amount_int":"1000000", - "stamp":"1328641778912633" - }, - { - "price":5.61472, - "amount":0.25702, - "price_int":"561472", - "amount_int":"25702000", - "stamp":"1328643195921322" - }, - { - "price":5.61514, - "amount":5.62743776, - "price_int":"561514", - "amount_int":"562743776", - "stamp":"1328641804180766" - }, - { - "price":5.61526, - "amount":0.02815, - "price_int":"561526", - "amount_int":"2815000", - "stamp":"1328642741626566" - }, - { - "price":5.6154, - "amount":0.02377599, - "price_int":"561540", - "amount_int":"2377599", - "stamp":"1328642028853863" - }, - { - "price":5.61626, - "amount":0.15, - "price_int":"561626", - "amount_int":"15000000", - "stamp":"1328641329442296" - }, - { - "price":5.61765, - "amount":0.01931945, - "price_int":"561765", - "amount_int":"1931945", - "stamp":"1328642010758891" - }, - { - "price":5.6193, - "amount":1.01, - "price_int":"561930", - "amount_int":"101000000", - "stamp":"1328641801107101" - }, - { - "price":5.62, - "amount":2, - "price_int":"562000", - "amount_int":"200000000", - "stamp":"1328643792853848" - }, - { - "price":5.62074, - "amount":2.16275, - "price_int":"562074", - "amount_int":"216275000", - "stamp":"1328642067446059" - }, - { - "price":5.62079, - "amount":0.04472, - "price_int":"562079", - "amount_int":"4472000", - "stamp":"1328643010024856" - }, - { - "price":5.621, - "amount":5, - "price_int":"562100", - "amount_int":"500000000", - "stamp":"1328643755883390" - }, - { - "price":5.62151, - "amount":142, - "price_int":"562151", - "amount_int":"14200000000", - "stamp":"1328642350226754" - }, - { - "price":5.62203, - "amount":1.18641699, - "price_int":"562203", - "amount_int":"118641699", - "stamp":"1328642795066380" - }, - { - "price":5.62282, - "amount":0.06939, - "price_int":"562282", - "amount_int":"6939000", - "stamp":"1328642069726343" - }, - { - "price":5.62394, - "amount":0.15, - "price_int":"562394", - "amount_int":"15000000", - "stamp":"1328644093454551" - }, - { - "price":5.62411, - "amount":0.3599, - "price_int":"562411", - "amount_int":"35990000", - "stamp":"1328642892075936" - }, - { - "price":5.625, - "amount":60.9778, - "price_int":"562500", - "amount_int":"6097780000", - "stamp":"1328642248745093" - }, - { - "price":5.6252, - "amount":0.02378432, - "price_int":"562520", - "amount_int":"2378432", - "stamp":"1328642024995771" - }, - { - "price":5.6268, - "amount":0.15, - "price_int":"562680", - "amount_int":"15000000", - "stamp":"1328641316651082" - }, - { - "price":5.6271, - "amount":6.02890137, - "price_int":"562710", - "amount_int":"602890137", - "stamp":"1328642004563174" - }, - { - "price":5.62745, - "amount":0.01932157, - "price_int":"562745", - "amount_int":"1932157", - "stamp":"1328642008837058" - }, - { - "price":5.62939, - "amount":8.84042, - "price_int":"562939", - "amount_int":"884042000", - "stamp":"1328642157382465" - }, - { - "price":5.63, - "amount":1, - "price_int":"563000", - "amount_int":"100000000", - "stamp":"1328643442210779" - }, - { - "price":5.6331, - "amount":10.62610995, - "price_int":"563310", - "amount_int":"1062610995", - "stamp":"1328644560180960" - }, - { - "price":5.634, - "amount":141.995, - "price_int":"563400", - "amount_int":"14199500000", - "stamp":"1328641571075796" - }, - { - "price":5.635, - "amount":0.02380093, - "price_int":"563500", - "amount_int":"2380093", - "stamp":"1328642653164367" - }, - { - "price":5.63569, - "amount":594.0122533, - "price_int":"563569", - "amount_int":"59401225330", - "stamp":"1328642366923117" - }, - { - "price":5.636, - "amount":50.21592849, - "price_int":"563600", - "amount_int":"5021592849", - "stamp":"1328643620666222" - }, - { - "price":5.63725, - "amount":0.01932461, - "price_int":"563725", - "amount_int":"1932461", - "stamp":"1328642652413254" - }, - { - "price":5.639, - "amount":1.01, - "price_int":"563900", - "amount_int":"101000000", - "stamp":"1328642013472278" - }, - { - "price":5.64, - "amount":0.5, - "price_int":"564000", - "amount_int":"50000000", - "stamp":"1328643482103728" - }, - { - "price":5.64078, - "amount":2.28844437, - "price_int":"564078", - "amount_int":"228844437", - "stamp":"1328642006069945" - }, - { - "price":5.64124, - "amount":1.6896, - "price_int":"564124", - "amount_int":"168960000", - "stamp":"1328642815630261" - }, - { - "price":5.64178, - "amount":0.34493, - "price_int":"564178", - "amount_int":"34493000", - "stamp":"1328641823530139" - }, - { - "price":5.642, - "amount":23.48594568, - "price_int":"564200", - "amount_int":"2348594568", - "stamp":"1328643026862754" - }, - { - "price":5.64291, - "amount":0.04618, - "price_int":"564291", - "amount_int":"4618000", - "stamp":"1328642079057582" - }, - { - "price":5.64292, - "amount":0.11342, - "price_int":"564292", - "amount_int":"11342000", - "stamp":"1328643082220134" - }, - { - "price":5.6448, - "amount":0.0238124, - "price_int":"564480", - "amount_int":"2381240", - "stamp":"1328642705512114" - }, - { - "price":5.645, - "amount":26.5722, - "price_int":"564500", - "amount_int":"2657220000", - "stamp":"1328643317387798" - }, - { - "price":5.64706, - "amount":0.01932834, - "price_int":"564706", - "amount_int":"1932834", - "stamp":"1328642694754978" - }, - { - "price":5.64939, - "amount":0.07432, - "price_int":"564939", - "amount_int":"7432000", - "stamp":"1328642102773019" - }, - { - "price":5.65, - "amount":56.3982, - "price_int":"565000", - "amount_int":"5639820000", - "stamp":"1328643762995873" - }, - { - "price":5.65001, - "amount":1, - "price_int":"565001", - "amount_int":"100000000", - "stamp":"1328644760479497" - }, - { - "price":5.651, - "amount":1, - "price_int":"565100", - "amount_int":"100000000", - "stamp":"1328644764492510" - }, - { - "price":5.6512, - "amount":265, - "price_int":"565120", - "amount_int":"26500000000", - "stamp":"1328642263957371" - }, - { - "price":5.65167, - "amount":0.61462, - "price_int":"565167", - "amount_int":"61462000", - "stamp":"1328642858611435" - }, - { - "price":5.652, - "amount":283.03489117, - "price_int":"565200", - "amount_int":"28303489117", - "stamp":"1328644766548926" - }, - { - "price":5.65215, - "amount":0.027, - "price_int":"565215", - "amount_int":"2700000", - "stamp":"1328641741751502" - }, - { - "price":5.653, - "amount":1, - "price_int":"565300", - "amount_int":"100000000", - "stamp":"1328644769823330" - }, - { - "price":5.65399, - "amount":9.51838172, - "price_int":"565399", - "amount_int":"951838172", - "stamp":"1328641765317590" - }, - { - "price":5.654, - "amount":1, - "price_int":"565400", - "amount_int":"100000000", - "stamp":"1328644772299293" - }, - { - "price":5.6546, - "amount":0.02381226, - "price_int":"565460", - "amount_int":"2381226", - "stamp":"1328642789551254" - }, - { - "price":5.655, - "amount":1, - "price_int":"565500", - "amount_int":"100000000", - "stamp":"1328644774273524" - }, - { - "price":5.656, - "amount":1, - "price_int":"565600", - "amount_int":"100000000", - "stamp":"1328644775864941" - }, - { - "price":5.65673, - "amount":0.11241, - "price_int":"565673", - "amount_int":"11241000", - "stamp":"1328642853732625" - }, - { - "price":5.65686, - "amount":0.01286459, - "price_int":"565686", - "amount_int":"1286459", - "stamp":"1328642780624880" - }, - { - "price":5.657, - "amount":1, - "price_int":"565700", - "amount_int":"100000000", - "stamp":"1328644777396642" - }, - { - "price":5.65765, - "amount":0.01, - "price_int":"565765", - "amount_int":"1000000", - "stamp":"1328644189016642" - }, - { - "price":5.658, - "amount":1, - "price_int":"565800", - "amount_int":"100000000", - "stamp":"1328644779083327" - }, - { - "price":5.6586, - "amount":1.01, - "price_int":"565860", - "amount_int":"101000000", - "stamp":"1328642693703819" - }, - { - "price":5.65894, - "amount":0.01993, - "price_int":"565894", - "amount_int":"1993000", - "stamp":"1328642874851934" - }, - { - "price":5.65927, - "amount":0.06419, - "price_int":"565927", - "amount_int":"6419000", - "stamp":"1328642093982118" - }, - { - "price":5.66, - "amount":13.5, - "price_int":"566000", - "amount_int":"1350000000", - "stamp":"1328643675847364" - }, - { - "price":5.66174, - "amount":0.55606, - "price_int":"566174", - "amount_int":"55606000", - "stamp":"1328642872373045" - }, - { - "price":5.66175, - "amount":0.02727, - "price_int":"566175", - "amount_int":"2727000", - "stamp":"1328642888078541" - }, - { - "price":5.66238, - "amount":0.17193, - "price_int":"566238", - "amount_int":"17193000", - "stamp":"1328642817527759" - }, - { - "price":5.66281, - "amount":0.01, - "price_int":"566281", - "amount_int":"1000000", - "stamp":"1328642982802954" - }, - { - "price":5.6644, - "amount":0.02382646, - "price_int":"566440", - "amount_int":"2382646", - "stamp":"1328643063430271" - }, - { - "price":5.665, - "amount":1.33, - "price_int":"566500", - "amount_int":"133000000", - "stamp":"1328642721662573" - }, - { - "price":5.66516, - "amount":1, - "price_int":"566516", - "amount_int":"100000000", - "stamp":"1328643144943324" - }, - { - "price":5.66538, - "amount":0.22255, - "price_int":"566538", - "amount_int":"22255000", - "stamp":"1328642159427723" - }, - { - "price":5.66667, - "amount":0.01286989, - "price_int":"566667", - "amount_int":"1286989", - "stamp":"1328643055777688" - }, - { - "price":5.67, - "amount":10.5, - "price_int":"567000", - "amount_int":"1050000000", - "stamp":"1328643662987983" - }, - { - "price":5.67043, - "amount":14.91716752, - "price_int":"567043", - "amount_int":"1491716752", - "stamp":"1328642357445115" - }, - { - "price":5.67076, - "amount":115.62441013, - "price_int":"567076", - "amount_int":"11562441013", - "stamp":"1328642697063218" - }, - { - "price":5.67113, - "amount":0.12832, - "price_int":"567113", - "amount_int":"12832000", - "stamp":"1328642883723394" - }, - { - "price":5.67143, - "amount":0.18011, - "price_int":"567143", - "amount_int":"18011000", - "stamp":"1328642861370948" - }, - { - "price":5.67158, - "amount":0.05649888, - "price_int":"567158", - "amount_int":"5649888", - "stamp":"1328642834551466" - }, - { - "price":5.675, - "amount":111, - "price_int":"567500", - "amount_int":"11100000000", - "stamp":"1328643683582399" - }, - { - "price":5.6759, - "amount":2, - "price_int":"567590", - "amount_int":"200000000", - "stamp":"1328643679757821" - }, - { - "price":5.6783, - "amount":1.01, - "price_int":"567830", - "amount_int":"101000000", - "stamp":"1328642777367770" - }, - { - "price":5.67959, - "amount":8.53205, - "price_int":"567959", - "amount_int":"853205000", - "stamp":"1328643144951489" - }, - { - "price":5.67989, - "amount":4.44981699, - "price_int":"567989", - "amount_int":"444981699", - "stamp":"1328643249218936" - }, - { - "price":5.68, - "amount":8.79, - "price_int":"568000", - "amount_int":"879000000", - "stamp":"1328643654607441" - } - ] -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-ticker-data.json b/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-ticker-data.json deleted file mode 100644 index eeb624348..000000000 --- a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-ticker-data.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "high":{ - "value":"94.98000", - "value_int":"9498000", - "display":"$94.98", - "display_short":"$94.98", - "currency":"USD" - }, - "low":{ - "value":"85.50000", - "value_int":"8550000", - "display":"$85.50", - "display_short":"$85.50", - "currency":"USD" - }, - "avg":{ - "value":"90.45971", - "value_int":"9045971", - "display":"$90.46", - "display_short":"$90.46", - "currency":"USD" - }, - "vwap":{ - "value":"90.73124", - "value_int":"9073124", - "display":"$90.73", - "display_short":"$90.73", - "currency":"USD" - }, - "vol":{ - "value":"49524.15110020", - "value_int":"4952415110020", - "display":"49,524.15\u00a0BTC", - "display_short":"49,524.15\u00a0BTC", - "currency":"BTC" - }, - "last_local":{ - "value":"91.46000", - "value_int":"9146000", - "display":"$91.46", - "display_short":"$91.46", - "currency":"USD" - }, - "last_orig":{ - "value":"91.46000", - "value_int":"9146000", - "display":"$91.46", - "display_short":"$91.46", - "currency":"USD" - }, - "last_all":{ - "value":"91.46000", - "value_int":"9146000", - "display":"$91.46", - "display_short":"$91.46", - "currency":"USD" - }, - "last":{ - "value":"91.46000", - "value_int":"9146000", - "display":"$91.46", - "display_short":"$91.46", - "currency":"USD" - }, - "buy":{ - "value":"90.68502", - "value_int":"9068502", - "display":"$90.69", - "display_short":"$90.69", - "currency":"USD" - }, - "sell":{ - "value":"91.45898", - "value_int":"9145898", - "display":"$91.46", - "display_short":"$91.46", - "currency":"USD" - }, - "now":"1364669160478556" -} diff --git a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-trades-data.json b/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-trades-data.json deleted file mode 100644 index 248ab415c..000000000 --- a/xchange-mtgox/src/test/resources/v1/marketdata/polling/example-trades-data.json +++ /dev/null @@ -1,392 +0,0 @@ -[ - { - "date":1365499103, - "price":"193.99989", - "amount":"0.01985186", - "price_int":"19399989", - "amount_int":"1985186", - "tid":"1365499103363494", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499103, - "price":"193.9999", - "amount":"41.3836022", - "price_int":"19399990", - "amount_int":"4138360220", - "tid":"1365499103466790", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499156, - "price":"193.9999", - "amount":"0.01", - "price_int":"19399990", - "amount_int":"1000000", - "tid":"1365499156495360", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499187, - "price":"193.9999", - "amount":"0.017", - "price_int":"19399990", - "amount_int":"1700000", - "tid":"1365499187879294", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499195, - "price":"193.9999", - "amount":"0.2", - "price_int":"19399990", - "amount_int":"20000000", - "tid":"1365499195395761", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499195, - "price":"193.9999", - "amount":"53.6083", - "price_int":"19399990", - "amount_int":"5360830000", - "tid":"1365499195490854", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499205, - "price":"193.92003", - "amount":"0.02049697", - "price_int":"19392003", - "amount_int":"2049697", - "tid":"1365499205146394", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499205, - "price":"193.92002", - "amount":"0.23730303", - "price_int":"19392002", - "amount_int":"23730303", - "tid":"1365499205245720", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499226, - "price":"193.99989", - "amount":"0.02049697", - "price_int":"19399989", - "amount_int":"2049697", - "tid":"1365499226497248", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"market" - }, - { - "date":1365499230, - "price":"193.9999", - "amount":"13.97950303", - "price_int":"19399990", - "amount_int":"1397950303", - "tid":"1365499230613925", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"market" - }, - { - "date":1365499231, - "price":"193.9999", - "amount":"0.2", - "price_int":"19399990", - "amount_int":"20000000", - "tid":"1365499231018023", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499264, - "price":"193.9999", - "amount":"0.2", - "price_int":"19399990", - "amount_int":"20000000", - "tid":"1365499264990775", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499273, - "price":"193.9999", - "amount":"0.69587629", - "price_int":"19399990", - "amount_int":"69587629", - "tid":"1365499273480393", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"market" - }, - { - "date":1365499275, - "price":"193.93001", - "amount":"0.01569363", - "price_int":"19393001", - "amount_int":"1569363", - "tid":"1365499275012635", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"market" - }, - { - "date":1365499275, - "price":"193.92002", - "amount":"0.11430637", - "price_int":"19392002", - "amount_int":"11430637", - "tid":"1365499275081750", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"market" - }, - { - "date":1365499302, - "price":"193.99989", - "amount":"0.01569363", - "price_int":"19399989", - "amount_int":"1569363", - "tid":"1365499302560009", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499302, - "price":"193.9999", - "amount":"0.18430637", - "price_int":"19399990", - "amount_int":"18430637", - "tid":"1365499302850898", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499326, - "price":"193.9999", - "amount":"0.5178", - "price_int":"19399990", - "amount_int":"51780000", - "tid":"1365499326433904", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"market" - }, - { - "date":1365499356, - "price":"193.99989", - "amount":"0.01392296", - "price_int":"19399989", - "amount_int":"1392296", - "tid":"1365499356144041", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499382, - "price":"193.99989", - "amount":"0.00177067", - "price_int":"19399989", - "amount_int":"177067", - "tid":"1365499382630855", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499382, - "price":"193.92002", - "amount":"0.6483906", - "price_int":"19392002", - "amount_int":"64839060", - "tid":"1365499382704564", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499382, - "price":"193.92", - "amount":"1", - "price_int":"19392000", - "amount_int":"100000000", - "tid":"1365499382751204", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499382, - "price":"193.91", - "amount":"1", - "price_int":"19391000", - "amount_int":"100000000", - "tid":"1365499382793712", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499382, - "price":"193.903", - "amount":"3.53016114", - "price_int":"19390300", - "amount_int":"353016114", - "tid":"1365499382840298", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499382, - "price":"193.803", - "amount":"4", - "price_int":"19380300", - "amount_int":"400000000", - "tid":"1365499382898039", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499384, - "price":"193.8", - "amount":"0.12865442", - "price_int":"19380000", - "amount_int":"12865442", - "tid":"1365499384100909", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499434, - "price":"193.70301", - "amount":"0.04225194", - "price_int":"19370301", - "amount_int":"4225194", - "tid":"1365499434362137", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499434, - "price":"193.703", - "amount":"2.17774806", - "price_int":"19370300", - "amount_int":"217774806", - "tid":"1365499434439455", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"limit" - }, - { - "date":1365499443, - "price":"193.79999", - "amount":"0.12936502", - "price_int":"19379999", - "amount_int":"12936502", - "tid":"1365499443625382", - "price_currency":"USD", - "item":"BTC", - "trade_type":"bid", - "primary":"N", - "properties":"market,mixed_currency" - }, - { - "date":1365499476, - "price":"193.703", - "amount":"1", - "price_int":"19370300", - "amount_int":"100000000", - "tid":"1365499476987765", - "price_currency":"USD", - "item":"BTC", - "trade_type":"ask", - "primary":"Y", - "properties":"market" - } -] \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-depth-streaming-data.json b/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-depth-streaming-data.json deleted file mode 100644 index 8098e6162..000000000 --- a/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-depth-streaming-data.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe", - "depth":{ - "currency":"USD", - "item":"BTC", - "now":"1364643714372176", - "price":"62.5", - "price_int":"6250000", - "total_volume_int":"32402839775", - "type":2, - "type_str":"bid", - "volume":"4.97732719", - "volume_int":"497732719" - }, - "op":"private", - "origin":"broadcast", - "private":"depth" -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-ticker-streaming-data.json b/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-ticker-streaming-data.json deleted file mode 100644 index a2858dc6b..000000000 --- a/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-ticker-streaming-data.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f", - "op":"private", - "origin":"broadcast", - "private":"ticker", - "ticker":{ - "avg":{ - "currency":"USD", - "display":"$90.43573", - "display_short":"$90.44", - "value":"90.43573", - "value_int":"9043573" - }, - "buy":{ - "currency":"USD", - "display":"$90.78469", - "display_short":"$90.78", - "value":"90.78469", - "value_int":"9078469" - }, - "high":{ - "currency":"USD", - "display":"$94.98000", - "display_short":"$94.98", - "value":"94.98000", - "value_int":"9498000" - }, - "last":{ - "currency":"USD", - "display":"$91.00000", - "display_short":"$91.00", - "value":"91.00000", - "value_int":"9100000" - }, - "last_all":{ - "currency":"USD", - "display":"$91.00000", - "display_short":"$91.00", - "value":"91.00000", - "value_int":"9100000" - }, - "last_local":{ - "currency":"USD", - "display":"$91.00000", - "display_short":"$91.00", - "value":"91.00000", - "value_int":"9100000" - }, - "last_orig":{ - "currency":"USD", - "display":"$91.00000", - "display_short":"$91.00", - "value":"91.00000", - "value_int":"9100000" - }, - "low":{ - "currency":"USD", - "display":"$85.50000", - "display_short":"$85.50", - "value":"85.50000", - "value_int":"8550000" - }, - "now":"1364667533416136", - "sell":{ - "currency":"USD", - "display":"$91.00000", - "display_short":"$91.00", - "value":"91.00000", - "value_int":"9100000" - }, - "vol":{ - "currency":"BTC", - "display":"49,692.83815274\u00a0BTC", - "display_short":"49,692.84\u00a0BTC", - "value":"49692.83815274", - "value_int":"4969283815274" - }, - "vwap":{ - "currency":"USD", - "display":"$90.71698", - "display_short":"$90.72", - "value":"90.71698", - "value_int":"9071698" - } - } -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-trade-streaming-data.json b/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-trade-streaming-data.json deleted file mode 100644 index 40738266a..000000000 --- a/xchange-mtgox/src/test/resources/v1/marketdata/streaming/example-trade-streaming-data.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "channel":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21", - "op":"private", - "origin":"broadcast", - "private":"trade", - "trade":{ - "amount":0.01851242, - "amount_int":"1851242", - "date":1364652424, - "item":"BTC", - "price":90.79995, - "price_currency":"USD", - "price_int":"9079995", - "primary":"Y", - "properties":"limit", - "tid":"1364652424875559", - "trade_type":"ask", - "type":"trade" - } -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/trade/example-failure-response-data.json b/xchange-mtgox/src/test/resources/v1/trade/example-failure-response-data.json deleted file mode 100644 index df12b7ee0..000000000 --- a/xchange-mtgox/src/test/resources/v1/trade/example-failure-response-data.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "result":"error", - "error":"Invalid parameter \"type\" (should be ask or bid)" -} \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/trade/example-openorders-data.json b/xchange-mtgox/src/test/resources/v1/trade/example-openorders-data.json deleted file mode 100644 index e233473c6..000000000 --- a/xchange-mtgox/src/test/resources/v1/trade/example-openorders-data.json +++ /dev/null @@ -1,876 +0,0 @@ -[ - { - "oid":"055e81e4-fe38-4b3c-bbca-69e61724f64a", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.23385868", - "value_int":"23385868", - "display":"0.23385868\u00a0BTC", - "display_short":"0.23\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1333897151, - "priority":"1333897151233721" - }, - { - "oid":"07bdad59-247b-428a-abc7-800b3a8bd554", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.02604846", - "value_int":"2604846", - "display":"0.02604846\u00a0BTC", - "display_short":"0.03\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1330881521, - "priority":"1330881521484355" - }, - { - "oid":"0ea044eb-17ec-4bd2-8635-16165783dd29", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.68275074", - "value_int":"68275074", - "display":"0.68275074\u00a0BTC", - "display_short":"0.68\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1334002340, - "priority":"1334002340477458" - }, - { - "oid":"1739d399-9f34-499c-b199-8e249bfc2885", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"1.00000000", - "value_int":"100000000", - "display":"1.00000000\u00a0BTC", - "display_short":"1.00\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"4.25000", - "value_int":"425000", - "display":"$4.25000", - "display_short":"$4.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331299497, - "priority":"1331299497504312" - }, - { - "oid":"207195e7-ea08-40e8-8fd1-3d56a8807bde", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.64146996", - "value_int":"64146996", - "display":"0.64146996\u00a0BTC", - "display_short":"0.64\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331410496, - "priority":"1331410496213848" - }, - { - "oid":"21fcde50-7d4f-4bac-b58a-87bcd0cf6eba", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.62518803", - "value_int":"62518803", - "display":"0.62518803\u00a0BTC", - "display_short":"0.63\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332016602, - "priority":"1332016602681357" - }, - { - "oid":"26f87d17-cda1-4901-9780-b158f5a62dbc", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.94004301", - "value_int":"94004301", - "display":"0.94004301\u00a0BTC", - "display_short":"0.94\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1333574740, - "priority":"1333574740042943" - }, - { - "oid":"29200940-28bf-48cb-93aa-97c12cbc934a", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.01564032", - "value_int":"1564032", - "display":"0.01564032\u00a0BTC", - "display_short":"0.02\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332616612, - "priority":"1332616612535544" - }, - { - "oid":"2960dce6-3137-4ec1-bd56-5e37636f3948", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.01228569", - "value_int":"1228569", - "display":"0.01228569\u00a0BTC", - "display_short":"0.01\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332960124, - "priority":"1332960124497241" - }, - { - "oid":"3f031b5c-4c67-4714-80cc-2c884dcf1d6d", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.30892090", - "value_int":"30892090", - "display":"0.30892090\u00a0BTC", - "display_short":"0.31\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332857535, - "priority":"1332857535926963" - }, - { - "oid":"3f54a441-2418-4227-8abf-5b37dab5113a", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.41315095", - "value_int":"41315095", - "display":"0.41315095\u00a0BTC", - "display_short":"0.41\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331071931, - "priority":"1331071931027844" - }, - { - "oid":"4204cc39-9abf-4f72-904c-9b756c2ab312", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.08473245", - "value_int":"8473245", - "display":"0.08473245\u00a0BTC", - "display_short":"0.08\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1333901433, - "priority":"1333901433265985" - }, - { - "oid":"4307f70c-0f9f-408d-bceb-046d459fe37f", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.97447736", - "value_int":"97447736", - "display":"0.97447736\u00a0BTC", - "display_short":"0.97\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1333574327, - "priority":"1333574327705363" - }, - { - "oid":"45b1d036-8662-41bb-ba93-2e0925b9fc82", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.11751047", - "value_int":"11751047", - "display":"0.11751047\u00a0BTC", - "display_short":"0.12\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1334002767, - "priority":"1334002767796596" - }, - { - "oid":"4d17f56f-21a1-4436-a1eb-52a9171d00bb", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.73764411", - "value_int":"73764411", - "display":"0.73764411\u00a0BTC", - "display_short":"0.74\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332959257, - "priority":"1332959257169054" - }, - { - "oid":"4db6e0a9-e928-4f1d-8221-8f57dc941aa5", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.20288353", - "value_int":"20288353", - "display":"0.20288353\u00a0BTC", - "display_short":"0.20\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332961181, - "priority":"1332961181947292" - }, - { - "oid":"51329c01-0b7b-4bb8-954f-1c835120c380", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.98863317", - "value_int":"98863317", - "display":"0.98863317\u00a0BTC", - "display_short":"0.99\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1334229920, - "priority":"1334229920345162" - }, - { - "oid":"64d07bfc-0560-475c-a491-d760a6fd2572", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.09581342", - "value_int":"9581342", - "display":"0.09581342\u00a0BTC", - "display_short":"0.10\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331334901, - "priority":"1331334901035511" - }, - { - "oid":"71b1e31f-e334-440b-afaa-18538896faba", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"1.00000000", - "value_int":"100000000", - "display":"1.00000000\u00a0BTC", - "display_short":"1.00\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"4.25000", - "value_int":"425000", - "display":"$4.25000", - "display_short":"$4.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331292981, - "priority":"1331292981263586" - }, - { - "oid":"7b838369-6653-46f5-8211-bd9fcb451afc", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.20803579", - "value_int":"20803579", - "display":"0.20803579\u00a0BTC", - "display_short":"0.21\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331325037, - "priority":"1331325037380723" - }, - { - "oid":"878b86d7-4179-45cd-b29c-333d9f7eb5fc", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.83454696", - "value_int":"83454696", - "display":"0.83454696\u00a0BTC", - "display_short":"0.83\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1330882113, - "priority":"1330882113817761" - }, - { - "oid":"8abd21db-bd67-4688-8efc-bfbdfec9be9d", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.30282047", - "value_int":"30282047", - "display":"0.30282047\u00a0BTC", - "display_short":"0.30\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1333980588, - "priority":"1333980588265495" - }, - { - "oid":"9488f479-eeb0-4e4b-bf50-2302156c3b51", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.95314356", - "value_int":"95314356", - "display":"0.95314356\u00a0BTC", - "display_short":"0.95\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1333896673, - "priority":"1333896673137442" - }, - { - "oid":"96f165dd-e2cb-4370-8291-b864ceb59e95", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.34265091", - "value_int":"34265091", - "display":"0.34265091\u00a0BTC", - "display_short":"0.34\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1330891052, - "priority":"1330891052549523" - }, - { - "oid":"9bb0f6a4-b4d3-40ea-a2f3-e56f39212e1e", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.39648439", - "value_int":"39648439", - "display":"0.39648439\u00a0BTC", - "display_short":"0.40\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331297609, - "priority":"1331297609142639" - }, - { - "oid":"a2d63c63-0e6f-49a3-bb26-ab96c557ed4a", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.54836040", - "value_int":"54836040", - "display":"0.54836040\u00a0BTC", - "display_short":"0.55\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332097230, - "priority":"1332097230914136" - }, - { - "oid":"ad66742a-7d9f-4101-93cb-952e8d5346f6", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.12060048", - "value_int":"12060048", - "display":"0.12060048\u00a0BTC", - "display_short":"0.12\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1334182371, - "priority":"1334182371796949" - }, - { - "oid":"b3cd7f98-698e-4e2d-9402-d63e7728dd1a", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.62705401", - "value_int":"62705401", - "display":"0.62705401\u00a0BTC", - "display_short":"0.63\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1330881596, - "priority":"1330881596820079" - }, - { - "oid":"b5fcd7bc-073a-46d2-82e8-56e9d94ef053", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.56748458", - "value_int":"56748458", - "display":"0.56748458\u00a0BTC", - "display_short":"0.57\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332857674, - "priority":"1332857674900875" - }, - { - "oid":"bcf77f82-a04d-4b0b-b864-107bf3f39331", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.93323035", - "value_int":"93323035", - "display":"0.93323035\u00a0BTC", - "display_short":"0.93\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331309458, - "priority":"1331309458666369" - }, - { - "oid":"c9e7f827-a6df-41c6-b9a9-17801afd62ab", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.64283028", - "value_int":"64283028", - "display":"0.64283028\u00a0BTC", - "display_short":"0.64\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332098455, - "priority":"1332098455590990" - }, - { - "oid":"cf58abb4-deeb-4f75-88e3-48f662b96220", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.89122625", - "value_int":"89122625", - "display":"0.89122625\u00a0BTC", - "display_short":"0.89\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332858785, - "priority":"1332858785536458" - }, - { - "oid":"ec0291b1-c766-49b2-a893-b82eb5f60390", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.95174964", - "value_int":"95174964", - "display":"0.95174964\u00a0BTC", - "display_short":"0.95\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331309677, - "priority":"1331309677015926" - }, - { - "oid":"ecc0572c-3967-4fc8-991a-5acc39dbf5c0", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.45342729", - "value_int":"45342729", - "display":"0.45342729\u00a0BTC", - "display_short":"0.45\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1333990248, - "priority":"1333990248838205" - }, - { - "oid":"ecd20ab8-261e-41bf-95ad-3a41cfc3f7b0", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.07932267", - "value_int":"7932267", - "display":"0.07932267\u00a0BTC", - "display_short":"0.08\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1330881566, - "priority":"1330881566997660" - }, - { - "oid":"f4d74b1d-d213-4013-94b2-bc8cdd65b8e7", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.43878939", - "value_int":"43878939", - "display":"0.43878939\u00a0BTC", - "display_short":"0.44\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1331332520, - "priority":"1331332520408512" - }, - { - "oid":"f74a80c0-de4e-4501-aeb4-618050abea53", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.94366072", - "value_int":"94366072", - "display":"0.94366072\u00a0BTC", - "display_short":"0.94\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332846676, - "priority":"1332846676619705" - }, - { - "oid":"f9fe9bd0-1105-46a2-b241-5167aad145ce", - "currency":"USD", - "item":"BTC", - "type":"bid", - "amount":{ - "value":"0.80803674", - "value_int":"80803674", - "display":"0.80803674\u00a0BTC", - "display_short":"0.81\u00a0BTC", - "currency":"BTC" - }, - "price":{ - "value":"1.25000", - "value_int":"125000", - "display":"$1.25000", - "display_short":"$1.25", - "currency":"USD" - }, - "status":"invalid", - "date":1332857578, - "priority":"1332857578438935" - } -] \ No newline at end of file diff --git a/xchange-mtgox/src/test/resources/v1/trade/example-success-response-data.json b/xchange-mtgox/src/test/resources/v1/trade/example-success-response-data.json deleted file mode 100644 index b7841e11a..000000000 --- a/xchange-mtgox/src/test/resources/v1/trade/example-success-response-data.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "result":"success", - "return":"662f3a5c-229c-4145-925c-6bef58575948" -} \ No newline at end of file diff --git a/xchange-openexchangerates/api-specification.txt b/xchange-openexchangerates/api-specification.txt deleted file mode 100644 index 8a42444aa..000000000 --- a/xchange-openexchangerates/api-specification.txt +++ /dev/null @@ -1,16 +0,0 @@ -Open Exchange Rates API specification -================================ - -Public API - -Latest ------- -http://openexchangerates.org/api/latest.json?app_id=ab32c922bca749ec9345b4717914ee1f - -Currencies ------- -http://openexchangerates.org/api/currencies.json?app_id=ab32c922bca749ec9345b4717914ee1f - -Data update rate! ------- -According to https://openexchangerates.org/about, the rates are updated once an hour. Therefore, to limit APIs calls, the rates are cached and refreshed once per hour. \ No newline at end of file diff --git a/xchange-openexchangerates/pom.xml b/xchange-openexchangerates/pom.xml deleted file mode 100644 index 606d0cd7e..000000000 --- a/xchange-openexchangerates/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - 4.0.0 - - com.xeiam.xchange - xchange-parent - 1.6.1-SNAPSHOT - - - xchange-openexchangerates - - Open Exchange Rates - XChange implementation for Open Exchange Rates - - http://xeiam.com - 2012 - - - Xeiam, LLC - http://xeiam.com - - - - - - - com.xeiam.xchange - xchange-core - 1.6.1-SNAPSHOT - - - - - \ No newline at end of file diff --git a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OER.java b/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OER.java deleted file mode 100644 index 96cf81e89..000000000 --- a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OER.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.oer; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; - -import com.xeiam.xchange.oer.dto.marketdata.OERTickers; - -/** - * @author timmolter - */ -@Path("api") -public interface OER { - - @GET - @Path("latest.json?app_id={app_id}") - @Produces("application/json") - public OERTickers getTickers(@PathParam("app_id") String appId); - -} diff --git a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERAdapters.java b/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERAdapters.java deleted file mode 100644 index b96d7ee1b..000000000 --- a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERAdapters.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.oer; - -import org.joda.money.BigMoney; - -import com.xeiam.xchange.currency.MoneyUtils; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Ticker.TickerBuilder; - -/** - * Various adapters for converting from OER DTOs to XChange DTOs - */ -public final class OERAdapters { - - /** - * private Constructor - */ - private OERAdapters() { - - } - - public static Ticker adaptTicker(String tradableIdentifier, Double exchangeRate, Long timestamp) { - - BigMoney last = MoneyUtils.parse(tradableIdentifier + " " + exchangeRate); - return TickerBuilder.newInstance().withTradableIdentifier(tradableIdentifier).withLast(last).withBid(null).withAsk(null).withHigh(null).withLow(null).withVolume(null).build(); - } - -} diff --git a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERExchange.java b/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERExchange.java deleted file mode 100644 index 3bf1b6959..000000000 --- a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERExchange.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.oer; - -import com.xeiam.xchange.BaseExchange; -import com.xeiam.xchange.Exchange; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.oer.service.marketdata.polling.OERPollingMarketDataService; - -/** - *

- * Exchange implementation to provide the following to applications: - *

- *
    - *
  • A wrapper for the Open Exchange Rate API
  • - *
- */ -public class OERExchange extends BaseExchange implements Exchange { - - /** - * Constructor - */ - public OERExchange() { - - } - - /** - * @return A default configuration for this exchange - */ - public static Exchange newInstance() { - - Exchange exchange = new OERExchange(); - exchange.applySpecification(exchange.getDefaultExchangeSpecification()); - return exchange; - } - - @Override - public void applySpecification(ExchangeSpecification exchangeSpecification) { - - super.applySpecification(exchangeSpecification); - this.pollingMarketDataService = new OERPollingMarketDataService(exchangeSpecification); - } - - @Override - public ExchangeSpecification getDefaultExchangeSpecification() { - - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); - exchangeSpecification.setPlainTextUri("http://openexchangerates.org"); - exchangeSpecification.setHost("openexchangerates.org"); - exchangeSpecification.setPort(80); - exchangeSpecification.setExchangeName("Open Exchange Rates"); - exchangeSpecification.setExchangeDescription("Open Exchange Rates is an exchange rate provider for a wide range of currencies."); - - return exchangeSpecification; - } -} diff --git a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERUtils.java b/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERUtils.java deleted file mode 100644 index f8b54191e..000000000 --- a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/OERUtils.java +++ /dev/null @@ -1,381 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.oer; - -import java.util.Arrays; -import java.util.List; - -import com.xeiam.xchange.currency.Currencies; -import com.xeiam.xchange.currency.CurrencyPair; - -/** - * A central place for shared OER properties - */ -public final class OERUtils { - - /** - * private Constructor - */ - private OERUtils() { - - } - - public static final List CURRENCY_PAIRS = Arrays.asList( - - new CurrencyPair(Currencies.AED, Currencies.USD), - - new CurrencyPair(Currencies.AFN, Currencies.USD), - - new CurrencyPair(Currencies.ALL, Currencies.USD), - - new CurrencyPair(Currencies.AMD, Currencies.USD), - - new CurrencyPair(Currencies.ANG, Currencies.USD), - - new CurrencyPair(Currencies.AOA, Currencies.USD), - - new CurrencyPair(Currencies.ARS, Currencies.USD), - - new CurrencyPair(Currencies.AUD, Currencies.USD), - - new CurrencyPair(Currencies.AWG, Currencies.USD), - - new CurrencyPair(Currencies.AZN, Currencies.USD), - - new CurrencyPair(Currencies.BAM, Currencies.USD), - - new CurrencyPair(Currencies.BBD, Currencies.USD), - - new CurrencyPair(Currencies.BDT, Currencies.USD), - - new CurrencyPair(Currencies.BGN, Currencies.USD), - - new CurrencyPair(Currencies.BHD, Currencies.USD), - - new CurrencyPair(Currencies.BIF, Currencies.USD), - - new CurrencyPair(Currencies.BMD, Currencies.USD), - - new CurrencyPair(Currencies.BND, Currencies.USD), - - new CurrencyPair(Currencies.BOB, Currencies.USD), - - new CurrencyPair(Currencies.BRL, Currencies.USD), - - new CurrencyPair(Currencies.BSD, Currencies.USD), - - new CurrencyPair(Currencies.BTC, Currencies.USD), - - new CurrencyPair(Currencies.BTN, Currencies.USD), - - new CurrencyPair(Currencies.BWP, Currencies.USD), - - new CurrencyPair(Currencies.BYR, Currencies.USD), - - new CurrencyPair(Currencies.BZD, Currencies.USD), - - new CurrencyPair(Currencies.CAD, Currencies.USD), - - new CurrencyPair(Currencies.CDF, Currencies.USD), - - new CurrencyPair(Currencies.CHF, Currencies.USD), - - new CurrencyPair(Currencies.CLF, Currencies.USD), - - new CurrencyPair(Currencies.CLP, Currencies.USD), - - new CurrencyPair(Currencies.CNY, Currencies.USD), - - new CurrencyPair(Currencies.COP, Currencies.USD), - - new CurrencyPair(Currencies.CRC, Currencies.USD), - - new CurrencyPair(Currencies.CUP, Currencies.USD), - - new CurrencyPair(Currencies.CVE, Currencies.USD), - - new CurrencyPair(Currencies.CZK, Currencies.USD), - - new CurrencyPair(Currencies.DJF, Currencies.USD), - - new CurrencyPair(Currencies.DKK, Currencies.USD), - - new CurrencyPair(Currencies.DOP, Currencies.USD), - - new CurrencyPair(Currencies.DZD, Currencies.USD), - - new CurrencyPair(Currencies.EEK, Currencies.USD), - - new CurrencyPair(Currencies.EGP, Currencies.USD), - - new CurrencyPair(Currencies.ETB, Currencies.USD), - - new CurrencyPair(Currencies.EUR, Currencies.USD), - - new CurrencyPair(Currencies.FJD, Currencies.USD), - - new CurrencyPair(Currencies.FKP, Currencies.USD), - - new CurrencyPair(Currencies.GBP, Currencies.USD), - - new CurrencyPair(Currencies.GEL, Currencies.USD), - - new CurrencyPair(Currencies.GHS, Currencies.USD), - - new CurrencyPair(Currencies.GIP, Currencies.USD), - - new CurrencyPair(Currencies.GMD, Currencies.USD), - - new CurrencyPair(Currencies.GNF, Currencies.USD), - - new CurrencyPair(Currencies.GTQ, Currencies.USD), - - new CurrencyPair(Currencies.GYD, Currencies.USD), - - new CurrencyPair(Currencies.HKD, Currencies.USD), - - new CurrencyPair(Currencies.HNL, Currencies.USD), - - new CurrencyPair(Currencies.HRK, Currencies.USD), - - new CurrencyPair(Currencies.HTG, Currencies.USD), - - new CurrencyPair(Currencies.HUF, Currencies.USD), - - new CurrencyPair(Currencies.IDR, Currencies.USD), - - new CurrencyPair(Currencies.ILS, Currencies.USD), - - new CurrencyPair(Currencies.INR, Currencies.USD), - - new CurrencyPair(Currencies.IQD, Currencies.USD), - - new CurrencyPair(Currencies.IRR, Currencies.USD), - - new CurrencyPair(Currencies.ISK, Currencies.USD), - - new CurrencyPair(Currencies.JEP, Currencies.USD), - - new CurrencyPair(Currencies.JMD, Currencies.USD), - - new CurrencyPair(Currencies.JOD, Currencies.USD), - - new CurrencyPair(Currencies.JPY, Currencies.USD), - - new CurrencyPair(Currencies.KES, Currencies.USD), - - new CurrencyPair(Currencies.KGS, Currencies.USD), - - new CurrencyPair(Currencies.KHR, Currencies.USD), - - new CurrencyPair(Currencies.KMF, Currencies.USD), - - new CurrencyPair(Currencies.KPW, Currencies.USD), - - new CurrencyPair(Currencies.KRW, Currencies.USD), - - new CurrencyPair(Currencies.KWD, Currencies.USD), - - new CurrencyPair(Currencies.KYD, Currencies.USD), - - new CurrencyPair(Currencies.KZT, Currencies.USD), - - new CurrencyPair(Currencies.LAK, Currencies.USD), - - new CurrencyPair(Currencies.LBP, Currencies.USD), - - new CurrencyPair(Currencies.LKR, Currencies.USD), - - new CurrencyPair(Currencies.LRD, Currencies.USD), - - new CurrencyPair(Currencies.LSL, Currencies.USD), - - new CurrencyPair(Currencies.LTL, Currencies.USD), - - new CurrencyPair(Currencies.LVL, Currencies.USD), - - new CurrencyPair(Currencies.LYD, Currencies.USD), - - new CurrencyPair(Currencies.MAD, Currencies.USD), - - new CurrencyPair(Currencies.MDL, Currencies.USD), - - new CurrencyPair(Currencies.MGA, Currencies.USD), - - new CurrencyPair(Currencies.MKD, Currencies.USD), - - new CurrencyPair(Currencies.MMK, Currencies.USD), - - new CurrencyPair(Currencies.MNT, Currencies.USD), - - new CurrencyPair(Currencies.MOP, Currencies.USD), - - new CurrencyPair(Currencies.MRO, Currencies.USD), - - new CurrencyPair(Currencies.MUR, Currencies.USD), - - new CurrencyPair(Currencies.MVR, Currencies.USD), - - new CurrencyPair(Currencies.MWK, Currencies.USD), - - new CurrencyPair(Currencies.MXN, Currencies.USD), - - new CurrencyPair(Currencies.MYR, Currencies.USD), - - new CurrencyPair(Currencies.MZN, Currencies.USD), - - new CurrencyPair(Currencies.NAD, Currencies.USD), - - new CurrencyPair(Currencies.NGN, Currencies.USD), - - new CurrencyPair(Currencies.NIO, Currencies.USD), - - new CurrencyPair(Currencies.NOK, Currencies.USD), - - new CurrencyPair(Currencies.NPR, Currencies.USD), - - new CurrencyPair(Currencies.NZD, Currencies.USD), - - new CurrencyPair(Currencies.OMR, Currencies.USD), - - new CurrencyPair(Currencies.PAB, Currencies.USD), - - new CurrencyPair(Currencies.PEN, Currencies.USD), - - new CurrencyPair(Currencies.PGK, Currencies.USD), - - new CurrencyPair(Currencies.PHP, Currencies.USD), - - new CurrencyPair(Currencies.PKR, Currencies.USD), - - new CurrencyPair(Currencies.PLN, Currencies.USD), - - new CurrencyPair(Currencies.PYG, Currencies.USD), - - new CurrencyPair(Currencies.QAR, Currencies.USD), - - new CurrencyPair(Currencies.RON, Currencies.USD), - - new CurrencyPair(Currencies.RSD, Currencies.USD), - - new CurrencyPair(Currencies.RUB, Currencies.USD), - - new CurrencyPair(Currencies.RWF, Currencies.USD), - - new CurrencyPair(Currencies.SAR, Currencies.USD), - - new CurrencyPair(Currencies.SBD, Currencies.USD), - - new CurrencyPair(Currencies.SCR, Currencies.USD), - - new CurrencyPair(Currencies.SDG, Currencies.USD), - - new CurrencyPair(Currencies.SEK, Currencies.USD), - - new CurrencyPair(Currencies.SGD, Currencies.USD), - - new CurrencyPair(Currencies.SHP, Currencies.USD), - - new CurrencyPair(Currencies.SLL, Currencies.USD), - - new CurrencyPair(Currencies.SOS, Currencies.USD), - - new CurrencyPair(Currencies.SRD, Currencies.USD), - - new CurrencyPair(Currencies.STD, Currencies.USD), - - new CurrencyPair(Currencies.SVC, Currencies.USD), - - new CurrencyPair(Currencies.SYP, Currencies.USD), - - new CurrencyPair(Currencies.SZL, Currencies.USD), - - new CurrencyPair(Currencies.THB, Currencies.USD), - - new CurrencyPair(Currencies.TJS, Currencies.USD), - - new CurrencyPair(Currencies.TMT, Currencies.USD), - - new CurrencyPair(Currencies.TND, Currencies.USD), - - new CurrencyPair(Currencies.TOP, Currencies.USD), - - new CurrencyPair(Currencies.TRY, Currencies.USD), - - new CurrencyPair(Currencies.TTD, Currencies.USD), - - new CurrencyPair(Currencies.TWD, Currencies.USD), - - new CurrencyPair(Currencies.TZS, Currencies.USD), - - new CurrencyPair(Currencies.UAH, Currencies.USD), - - new CurrencyPair(Currencies.UGX, Currencies.USD), - - new CurrencyPair(Currencies.USD, Currencies.USD), - - new CurrencyPair(Currencies.UYU, Currencies.USD), - - new CurrencyPair(Currencies.UZS, Currencies.USD), - - new CurrencyPair(Currencies.VEF, Currencies.USD), - - new CurrencyPair(Currencies.VND, Currencies.USD), - - new CurrencyPair(Currencies.VUV, Currencies.USD), - - new CurrencyPair(Currencies.WST, Currencies.USD), - - new CurrencyPair(Currencies.XAF, Currencies.USD), - - new CurrencyPair(Currencies.XCD, Currencies.USD), - - new CurrencyPair(Currencies.XDR, Currencies.USD), - - new CurrencyPair(Currencies.XOF, Currencies.USD), - - new CurrencyPair(Currencies.XPF, Currencies.USD), - - new CurrencyPair(Currencies.YER, Currencies.USD), - - new CurrencyPair(Currencies.ZAR, Currencies.USD), - - new CurrencyPair(Currencies.ZMK, Currencies.USD), - - new CurrencyPair(Currencies.ZWL, Currencies.USD) - - ); - - public static final long REFRESH_RATE_MILLIS = 1000L * 60L * 60L; // rates refresh every 60 minutes - - /** - * Checks if a given CurrencyPair is covered by this exchange - * - * @param currencyPair - * @return - */ - public static boolean isValidCurrencyPair(CurrencyPair currencyPair) { - - return CURRENCY_PAIRS.contains(currencyPair); - } - -} diff --git a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/OERTickers.java b/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/OERTickers.java deleted file mode 100644 index 896072c6d..000000000 --- a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/OERTickers.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.oer.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * * - *

- * Data object representing a Exchange Rates from Open ExchangeRates - *

- * Auto-generated using the simplest types possible with conversion delegated to the adapter - * - * @author timmolter - */ -public final class OERTickers { - - private final Rates rates; - private final Long timestamp; - - /** - * Constructor - * - * @param rates - * @param timestamp - */ - public OERTickers(@JsonProperty("rates") Rates rates, @JsonProperty("timestamp") Long timestamp) { - - this.rates = rates; - this.timestamp = timestamp; - } - - public Rates getRates() { - - return this.rates; - } - - public Long getTimestamp() { - - return this.timestamp; - } - - @Override - public String toString() { - - return "OERTickers [rates=" + rates + ", timestamp=" + timestamp + "]"; - } - -} diff --git a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/Rates.java b/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/Rates.java deleted file mode 100644 index 9274f82a9..000000000 --- a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/dto/marketdata/Rates.java +++ /dev/null @@ -1,1965 +0,0 @@ -/** - * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is furnished to do - * so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package com.xeiam.xchange.oer.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The exchange rates. Purposely made not immutable due to lack of motivation to crate monster constructor - * - * @author timmolter - */ -public class Rates { - - private double aED; - private double aFN; - private double aLL; - private double aMD; - private double aNG; - private double aOA; - private double aRS; - private double aUD; - private double aWG; - private double aZN; - private double bAM; - private double bBD; - private double bDT; - private double bGN; - private double bHD; - private double bIF; - private double bMD; - private double bND; - private double bOB; - private double bRL; - private double bSD; - private double bTC; - private double bTN; - private double bWP; - private double bYR; - private double bZD; - private double cAD; - private double cDF; - private double cHF; - private double cLF; - private double cLP; - private double cNY; - private double cOP; - private double cRC; - private double cUP; - private double cVE; - private double cZK; - private double dJF; - private double dKK; - private double dOP; - private double dZD; - private double eEK; - private double eGP; - private double eTB; - private double eUR; - private double fJD; - private double fKP; - private double gBP; - private double gEL; - private double gHS; - private double gIP; - private double gMD; - private double gNF; - private double gTQ; - private double gYD; - private double hKD; - private double hNL; - private double hRK; - private double hTG; - private double hUF; - private double iDR; - private double iLS; - private double iNR; - private double iQD; - private double iRR; - private double iSK; - private double jEP; - private double jMD; - private double jOD; - private double jPY; - private double kES; - private double kGS; - private double kHR; - private double kMF; - private double kPW; - private double kRW; - private double kWD; - private double kYD; - private double kZT; - private double lAK; - private double lBP; - private double lKR; - private double lRD; - private double lSL; - private double lTL; - private double lVL; - private double lYD; - private double mAD; - private double mDL; - private double mGA; - private double mKD; - private double mMK; - private double mNT; - private double mOP; - private double mRO; - private double mUR; - private double mVR; - private double mWK; - private double mXN; - private double mYR; - private double mZN; - private double nAD; - private double nGN; - private double nIO; - private double nOK; - private double nPR; - private double nZD; - private double oMR; - private double pAB; - private double pEN; - private double pGK; - private double pHP; - private double pKR; - private double pLN; - private double pYG; - private double qAR; - private double rON; - private double rSD; - private double rUB; - private double rWF; - private double sAR; - private double sBD; - private double sCR; - private double sDG; - private double sEK; - private double sGD; - private double sHP; - private double sLL; - private double sOS; - private double sRD; - private double sTD; - private double sVC; - private double sYP; - private double sZL; - private double tHB; - private double tJS; - private double tMT; - private double tND; - private double tOP; - private double tRY; - private double tTD; - private double tWD; - private double tZS; - private double uAH; - private double uGX; - private double uSD; - private double uYU; - private double uZS; - private double vEF; - private double vND; - private double vUV; - private double wST; - private double xAF; - private double xCD; - private double xDR; - private double xOF; - private double xPF; - private double yER; - private double zAR; - private double zMK; - private double zWL; - - public double getAED() { - - return this.aED; - } - - @JsonProperty("AED") - public void setAED(double aED) { - - this.aED = aED; - } - - public double getAFN() { - - return this.aFN; - } - - @JsonProperty("AFN") - public void setAFN(double aFN) { - - this.aFN = aFN; - } - - public double getALL() { - - return this.aLL; - } - - @JsonProperty("ALL") - public void setALL(double aLL) { - - this.aLL = aLL; - } - - public double getAMD() { - - return this.aMD; - } - - @JsonProperty("AMD") - public void setAMD(double aMD) { - - this.aMD = aMD; - } - - public double getANG() { - - return this.aNG; - } - - @JsonProperty("ANG") - public void setANG(double aNG) { - - this.aNG = aNG; - } - - public double getAOA() { - - return this.aOA; - } - - @JsonProperty("AOA") - public void setAOA(double aOA) { - - this.aOA = aOA; - } - - public double getARS() { - - return this.aRS; - } - - @JsonProperty("ARS") - public void setARS(double aRS) { - - this.aRS = aRS; - } - - public double getAUD() { - - return this.aUD; - } - - @JsonProperty("AUD") - public void setAUD(double aUD) { - - this.aUD = aUD; - } - - public double getAWG() { - - return this.aWG; - } - - @JsonProperty("AWG") - public void setAWG(double aWG) { - - this.aWG = aWG; - } - - public double getAZN() { - - return this.aZN; - } - - @JsonProperty("AZN") - public void setAZN(double aZN) { - - this.aZN = aZN; - } - - public double getBAM() { - - return this.bAM; - } - - @JsonProperty("BAM") - public void setBAM(double bAM) { - - this.bAM = bAM; - } - - public double getBBD() { - - return this.bBD; - } - - @JsonProperty("BBD") - public void setBBD(double bBD) { - - this.bBD = bBD; - } - - public double getBDT() { - - return this.bDT; - } - - @JsonProperty("BDT") - public void setBDT(double bDT) { - - this.bDT = bDT; - } - - public double getBGN() { - - return this.bGN; - } - - @JsonProperty("BGN") - public void setBGN(double bGN) { - - this.bGN = bGN; - } - - public double getBHD() { - - return this.bHD; - } - - @JsonProperty("BHD") - public void setBHD(double bHD) { - - this.bHD = bHD; - } - - public double getBIF() { - - return this.bIF; - } - - @JsonProperty("BIF") - public void setBIF(double bIF) { - - this.bIF = bIF; - } - - public double getBMD() { - - return this.bMD; - } - - @JsonProperty("BMD") - public void setBMD(double bMD) { - - this.bMD = bMD; - } - - public double getBND() { - - return this.bND; - } - - @JsonProperty("BND") - public void setBND(double bND) { - - this.bND = bND; - } - - public double getBOB() { - - return this.bOB; - } - - @JsonProperty("BOB") - public void setBOB(double bOB) { - - this.bOB = bOB; - } - - public double getBRL() { - - return this.bRL; - } - - @JsonProperty("BRL") - public void setBRL(double bRL) { - - this.bRL = bRL; - } - - public double getBSD() { - - return this.bSD; - } - - @JsonProperty("BSD") - public void setBSD(double bSD) { - - this.bSD = bSD; - } - - public double getBTC() { - - return this.bTC; - } - - @JsonProperty("BTC") - public void setBTC(double bTC) { - - this.bTC = bTC; - } - - public double getBTN() { - - return this.bTN; - } - - @JsonProperty("BTN") - public void setBTN(double bTN) { - - this.bTN = bTN; - } - - public double getBWP() { - - return this.bWP; - } - - @JsonProperty("BWP") - public void setBWP(double bWP) { - - this.bWP = bWP; - } - - public double getBYR() { - - return this.bYR; - } - - @JsonProperty("BYR") - public void setBYR(double bYR) { - - this.bYR = bYR; - } - - public double getBZD() { - - return this.bZD; - } - - @JsonProperty("BZD") - public void setBZD(double bZD) { - - this.bZD = bZD; - } - - public double getCAD() { - - return this.cAD; - } - - @JsonProperty("CAD") - public void setCAD(double cAD) { - - this.cAD = cAD; - } - - public double getCDF() { - - return this.cDF; - } - - @JsonProperty("CDF") - public void setCDF(double cDF) { - - this.cDF = cDF; - } - - public double getCHF() { - - return this.cHF; - } - - @JsonProperty("CHF") - public void setCHF(double cHF) { - - this.cHF = cHF; - } - - public double getCLF() { - - return this.cLF; - } - - @JsonProperty("CLF") - public void setCLF(double cLF) { - - this.cLF = cLF; - } - - public double getCLP() { - - return this.cLP; - } - - @JsonProperty("CLP") - public void setCLP(double cLP) { - - this.cLP = cLP; - } - - public double getCNY() { - - return this.cNY; - } - - @JsonProperty("CNY") - public void setCNY(double cNY) { - - this.cNY = cNY; - } - - public double getCOP() { - - return this.cOP; - } - - @JsonProperty("COP") - public void setCOP(double cOP) { - - this.cOP = cOP; - } - - public double getCRC() { - - return this.cRC; - } - - @JsonProperty("CRC") - public void setCRC(double cRC) { - - this.cRC = cRC; - } - - public double getCUP() { - - return this.cUP; - } - - @JsonProperty("CUP") - public void setCUP(double cUP) { - - this.cUP = cUP; - } - - public double getCVE() { - - return this.cVE; - } - - @JsonProperty("CVE") - public void setCVE(double cVE) { - - this.cVE = cVE; - } - - public double getCZK() { - - return this.cZK; - } - - @JsonProperty("CZK") - public void setCZK(double cZK) { - - this.cZK = cZK; - } - - public double getDJF() { - - return this.dJF; - } - - @JsonProperty("DJF") - public void setDJF(double dJF) { - - this.dJF = dJF; - } - - public double getDKK() { - - return this.dKK; - } - - @JsonProperty("DKK") - public void setDKK(double dKK) { - - this.dKK = dKK; - } - - public double getDOP() { - - return this.dOP; - } - - @JsonProperty("DOP") - public void setDOP(double dOP) { - - this.dOP = dOP; - } - - public double getDZD() { - - return this.dZD; - } - - @JsonProperty("DZD") - public void setDZD(double dZD) { - - this.dZD = dZD; - } - - public double getEEK() { - - return this.eEK; - } - - @JsonProperty("EEK") - public void setEEK(double eEK) { - - this.eEK = eEK; - } - - public double getEGP() { - - return this.eGP; - } - - @JsonProperty("EGP") - public void setEGP(double eGP) { - - this.eGP = eGP; - } - - public double getETB() { - - return this.eTB; - } - - @JsonProperty("ETB") - public void setETB(double eTB) { - - this.eTB = eTB; - } - - public double getEUR() { - - return this.eUR; - } - - @JsonProperty("EUR") - public void setEUR(double eUR) { - - this.eUR = eUR; - } - - public double getFJD() { - - return this.fJD; - } - - @JsonProperty("FJD") - public void setFJD(double fJD) { - - this.fJD = fJD; - } - - public double getFKP() { - - return this.fKP; - } - - @JsonProperty("FKP") - public void setFKP(double fKP) { - - this.fKP = fKP; - } - - public double getGBP() { - - return this.gBP; - } - - @JsonProperty("GBP") - public void setGBP(double gBP) { - - this.gBP = gBP; - } - - public double getGEL() { - - return this.gEL; - } - - @JsonProperty("GEL") - public void setGEL(double gEL) { - - this.gEL = gEL; - } - - public double getGHS() { - - return this.gHS; - } - - @JsonProperty("GHS") - public void setGHS(double gHS) { - - this.gHS = gHS; - } - - public double getGIP() { - - return this.gIP; - } - - @JsonProperty("GIP") - public void setGIP(double gIP) { - - this.gIP = gIP; - } - - public double getGMD() { - - return this.gMD; - } - - @JsonProperty("GMD") - public void setGMD(double gMD) { - - this.gMD = gMD; - } - - public double getGNF() { - - return this.gNF; - } - - @JsonProperty("GNF") - public void setGNF(double gNF) { - - this.gNF = gNF; - } - - public double getGTQ() { - - return this.gTQ; - } - - @JsonProperty("GTQ") - public void setGTQ(double gTQ) { - - this.gTQ = gTQ; - } - - public double getGYD() { - - return this.gYD; - } - - @JsonProperty("GYD") - public void setGYD(double gYD) { - - this.gYD = gYD; - } - - public double getHKD() { - - return this.hKD; - } - - @JsonProperty("HKD") - public void setHKD(double hKD) { - - this.hKD = hKD; - } - - public double getHNL() { - - return this.hNL; - } - - @JsonProperty("HNL") - public void setHNL(double hNL) { - - this.hNL = hNL; - } - - public double getHRK() { - - return this.hRK; - } - - @JsonProperty("HRK") - public void setHRK(double hRK) { - - this.hRK = hRK; - } - - public double getHTG() { - - return this.hTG; - } - - @JsonProperty("HTG") - public void setHTG(double hTG) { - - this.hTG = hTG; - } - - public double getHUF() { - - return this.hUF; - } - - @JsonProperty("HUF") - public void setHUF(double hUF) { - - this.hUF = hUF; - } - - public double getIDR() { - - return this.iDR; - } - - @JsonProperty("IDR") - public void setIDR(double iDR) { - - this.iDR = iDR; - } - - public double getILS() { - - return this.iLS; - } - - @JsonProperty("ILS") - public void setILS(double iLS) { - - this.iLS = iLS; - } - - public double getINR() { - - return this.iNR; - } - - @JsonProperty("INR") - public void setINR(double iNR) { - - this.iNR = iNR; - } - - public double getIQD() { - - return this.iQD; - } - - @JsonProperty("IQD") - public void setIQD(double iQD) { - - this.iQD = iQD; - } - - public double getIRR() { - - return this.iRR; - } - - @JsonProperty("IRR") - public void setIRR(double iRR) { - - this.iRR = iRR; - } - - public double getISK() { - - return this.iSK; - } - - @JsonProperty("ISK") - public void setISK(double iSK) { - - this.iSK = iSK; - } - - public double getJEP() { - - return this.jEP; - } - - @JsonProperty("JEP") - public void setJEP(double jEP) { - - this.jEP = jEP; - } - - public double getJMD() { - - return this.jMD; - } - - @JsonProperty("JMD") - public void setJMD(double jMD) { - - this.jMD = jMD; - } - - public double getJOD() { - - return this.jOD; - } - - @JsonProperty("JOD") - public void setJOD(double jOD) { - - this.jOD = jOD; - } - - public double getJPY() { - - return this.jPY; - } - - @JsonProperty("JPY") - public void setJPY(double jPY) { - - this.jPY = jPY; - } - - public double getKES() { - - return this.kES; - } - - @JsonProperty("KES") - public void setKES(double kES) { - - this.kES = kES; - } - - public double getKGS() { - - return this.kGS; - } - - @JsonProperty("KGS") - public void setKGS(double kGS) { - - this.kGS = kGS; - } - - public double getKHR() { - - return this.kHR; - } - - @JsonProperty("KHR") - public void setKHR(double kHR) { - - this.kHR = kHR; - } - - public double getKMF() { - - return this.kMF; - } - - @JsonProperty("KMF") - public void setKMF(double kMF) { - - this.kMF = kMF; - } - - public double getKPW() { - - return this.kPW; - } - - @JsonProperty("KPW") - public void setKPW(double kPW) { - - this.kPW = kPW; - } - - public double getKRW() { - - return this.kRW; - } - - @JsonProperty("KRW") - public void setKRW(double kRW) { - - this.kRW = kRW; - } - - public double getKWD() { - - return this.kWD; - } - - @JsonProperty("KWD") - public void setKWD(double kWD) { - - this.kWD = kWD; - } - - public double getKYD() { - - return this.kYD; - } - - @JsonProperty("KYD") - public void setKYD(double kYD) { - - this.kYD = kYD; - } - - public double getKZT() { - - return this.kZT; - } - - @JsonProperty("KZT") - public void setKZT(double kZT) { - - this.kZT = kZT; - } - - public double getLAK() { - - return this.lAK; - } - - @JsonProperty("LAK") - public void setLAK(double lAK) { - - this.lAK = lAK; - } - - public double getLBP() { - - return this.lBP; - } - - @JsonProperty("LBP") - public void setLBP(double lBP) { - - this.lBP = lBP; - } - - public double getLKR() { - - return this.lKR; - } - - @JsonProperty("LKR") - public void setLKR(double lKR) { - - this.lKR = lKR; - } - - public double getLRD() { - - return this.lRD; - } - - @JsonProperty("LRD") - public void setLRD(double lRD) { - - this.lRD = lRD; - } - - public double getLSL() { - - return this.lSL; - } - - @JsonProperty("LSL") - public void setLSL(double lSL) { - - this.lSL = lSL; - } - - public double getLTL() { - - return this.lTL; - } - - @JsonProperty("LTL") - public void setLTL(double lTL) { - - this.lTL = lTL; - } - - public double getLVL() { - - return this.lVL; - } - - @JsonProperty("LVL") - public void setLVL(double lVL) { - - this.lVL = lVL; - } - - public double getLYD() { - - return this.lYD; - } - - @JsonProperty("LYD") - public void setLYD(double lYD) { - - this.lYD = lYD; - } - - public double getMAD() { - - return this.mAD; - } - - @JsonProperty("MAD") - public void setMAD(double mAD) { - - this.mAD = mAD; - } - - public double getMDL() { - - return this.mDL; - } - - @JsonProperty("MDL") - public void setMDL(double mDL) { - - this.mDL = mDL; - } - - public double getMGA() { - - return this.mGA; - } - - @JsonProperty("MGA") - public void setMGA(double mGA) { - - this.mGA = mGA; - } - - public double getMKD() { - - return this.mKD; - } - - @JsonProperty("MKD") - public void setMKD(double mKD) { - - this.mKD = mKD; - } - - public double getMMK() { - - return this.mMK; - } - - @JsonProperty("MMK") - public void setMMK(double mMK) { - - this.mMK = mMK; - } - - public double getMNT() { - - return this.mNT; - } - - @JsonProperty("MNT") - public void setMNT(double mNT) { - - this.mNT = mNT; - } - - public double getMOP() { - - return this.mOP; - } - - @JsonProperty("MOP") - public void setMOP(double mOP) { - - this.mOP = mOP; - } - - public double getMRO() { - - return this.mRO; - } - - @JsonProperty("MRO") - public void setMRO(double mRO) { - - this.mRO = mRO; - } - - public double getMUR() { - - return this.mUR; - } - - @JsonProperty("MUR") - public void setMUR(double mUR) { - - this.mUR = mUR; - } - - public double getMVR() { - - return this.mVR; - } - - @JsonProperty("MVR") - public void setMVR(double mVR) { - - this.mVR = mVR; - } - - public double getMWK() { - - return this.mWK; - } - - @JsonProperty("MWK") - public void setMWK(double mWK) { - - this.mWK = mWK; - } - - public double getMXN() { - - return this.mXN; - } - - @JsonProperty("MXN") - public void setMXN(double mXN) { - - this.mXN = mXN; - } - - public double getMYR() { - - return this.mYR; - } - - @JsonProperty("MYR") - public void setMYR(double mYR) { - - this.mYR = mYR; - } - - public double getMZN() { - - return this.mZN; - } - - @JsonProperty("MZN") - public void setMZN(double mZN) { - - this.mZN = mZN; - } - - public double getNAD() { - - return this.nAD; - } - - @JsonProperty("NAD") - public void setNAD(double nAD) { - - this.nAD = nAD; - } - - public double getNGN() { - - return this.nGN; - } - - @JsonProperty("NGN") - public void setNGN(double nGN) { - - this.nGN = nGN; - } - - public double getNIO() { - - return this.nIO; - } - - @JsonProperty("NIO") - public void setNIO(double nIO) { - - this.nIO = nIO; - } - - public double getNOK() { - - return this.nOK; - } - - @JsonProperty("NOK") - public void setNOK(double nOK) { - - this.nOK = nOK; - } - - public double getNPR() { - - return this.nPR; - } - - @JsonProperty("NPR") - public void setNPR(double nPR) { - - this.nPR = nPR; - } - - public double getNZD() { - - return this.nZD; - } - - @JsonProperty("NZD") - public void setNZD(double nZD) { - - this.nZD = nZD; - } - - public double getOMR() { - - return this.oMR; - } - - @JsonProperty("OMR") - public void setOMR(double oMR) { - - this.oMR = oMR; - } - - public double getPAB() { - - return this.pAB; - } - - @JsonProperty("PAB") - public void setPAB(double pAB) { - - this.pAB = pAB; - } - - public double getPEN() { - - return this.pEN; - } - - @JsonProperty("PEN") - public void setPEN(double pEN) { - - this.pEN = pEN; - } - - public double getPGK() { - - return this.pGK; - } - - @JsonProperty("PGK") - public void setPGK(double pGK) { - - this.pGK = pGK; - } - - public double getPHP() { - - return this.pHP; - } - - @JsonProperty("PHP") - public void setPHP(double pHP) { - - this.pHP = pHP; - } - - public double getPKR() { - - return this.pKR; - } - - @JsonProperty("PKR") - public void setPKR(double pKR) { - - this.pKR = pKR; - } - - public double getPLN() { - - return this.pLN; - } - - @JsonProperty("PLN") - public void setPLN(double pLN) { - - this.pLN = pLN; - } - - public double getPYG() { - - return this.pYG; - } - - @JsonProperty("PYG") - public void setPYG(double pYG) { - - this.pYG = pYG; - } - - public double getQAR() { - - return this.qAR; - } - - @JsonProperty("QAR") - public void setQAR(double qAR) { - - this.qAR = qAR; - } - - public double getRON() { - - return this.rON; - } - - @JsonProperty("RON") - public void setRON(double rON) { - - this.rON = rON; - } - - public double getRSD() { - - return this.rSD; - } - - @JsonProperty("RSD") - public void setRSD(double rSD) { - - this.rSD = rSD; - } - - public double getRUB() { - - return this.rUB; - } - - @JsonProperty("RUB") - public void setRUB(double rUB) { - - this.rUB = rUB; - } - - public double getRWF() { - - return this.rWF; - } - - @JsonProperty("RWF") - public void setRWF(double rWF) { - - this.rWF = rWF; - } - - public double getSAR() { - - return this.sAR; - } - - @JsonProperty("SAR") - public void setSAR(double sAR) { - - this.sAR = sAR; - } - - public double getSBD() { - - return this.sBD; - } - - @JsonProperty("SBD") - public void setSBD(double sBD) { - - this.sBD = sBD; - } - - public double getSCR() { - - return this.sCR; - } - - @JsonProperty("SCR") - public void setSCR(double sCR) { - - this.sCR = sCR; - } - - public double getSDG() { - - return this.sDG; - } - - @JsonProperty("SDG") - public void setSDG(double sDG) { - - this.sDG = sDG; - } - - public double getSEK() { - - return this.sEK; - } - - @JsonProperty("SEK") - public void setSEK(double sEK) { - - this.sEK = sEK; - } - - public double getSGD() { - - return this.sGD; - } - - @JsonProperty("SGD") - public void setSGD(double sGD) { - - this.sGD = sGD; - } - - public double getSHP() { - - return this.sHP; - } - - @JsonProperty("SHP") - public void setSHP(double sHP) { - - this.sHP = sHP; - } - - public double getSLL() { - - return this.sLL; - } - - @JsonProperty("SLL") - public void setSLL(double sLL) { - - this.sLL = sLL; - } - - public double getSOS() { - - return this.sOS; - } - - @JsonProperty("SOS") - public void setSOS(double sOS) { - - this.sOS = sOS; - } - - public double getSRD() { - - return this.sRD; - } - - @JsonProperty("SRD") - public void setSRD(double sRD) { - - this.sRD = sRD; - } - - public double getSTD() { - - return this.sTD; - } - - @JsonProperty("STD") - public void setSTD(double sTD) { - - this.sTD = sTD; - } - - public double getSVC() { - - return this.sVC; - } - - @JsonProperty("SVC") - public void setSVC(double sVC) { - - this.sVC = sVC; - } - - public double getSYP() { - - return this.sYP; - } - - @JsonProperty("SYP") - public void setSYP(double sYP) { - - this.sYP = sYP; - } - - public double getSZL() { - - return this.sZL; - } - - @JsonProperty("SZL") - public void setSZL(double sZL) { - - this.sZL = sZL; - } - - public double getTHB() { - - return this.tHB; - } - - @JsonProperty("THB") - public void setTHB(double tHB) { - - this.tHB = tHB; - } - - public double getTJS() { - - return this.tJS; - } - - @JsonProperty("TJS") - public void setTJS(double tJS) { - - this.tJS = tJS; - } - - public double getTMT() { - - return this.tMT; - } - - @JsonProperty("TMT") - public void setTMT(double tMT) { - - this.tMT = tMT; - } - - public double getTND() { - - return this.tND; - } - - @JsonProperty("TND") - public void setTND(double tND) { - - this.tND = tND; - } - - public double getTOP() { - - return this.tOP; - } - - @JsonProperty("TOP") - public void setTOP(double tOP) { - - this.tOP = tOP; - } - - public double getTRY() { - - return this.tRY; - } - - @JsonProperty("TRY") - public void setTRY(double tRY) { - - this.tRY = tRY; - } - - public double getTTD() { - - return this.tTD; - } - - @JsonProperty("TTD") - public void setTTD(double tTD) { - - this.tTD = tTD; - } - - public double getTWD() { - - return this.tWD; - } - - @JsonProperty("TWD") - public void setTWD(double tWD) { - - this.tWD = tWD; - } - - public double getTZS() { - - return this.tZS; - } - - @JsonProperty("TZS") - public void setTZS(double tZS) { - - this.tZS = tZS; - } - - public double getUAH() { - - return this.uAH; - } - - @JsonProperty("UAH") - public void setUAH(double uAH) { - - this.uAH = uAH; - } - - public double getUGX() { - - return this.uGX; - } - - @JsonProperty("UGX") - public void setUGX(double uGX) { - - this.uGX = uGX; - } - - public double getUSD() { - - return this.uSD; - } - - @JsonProperty("USD") - public void setUSD(double uSD) { - - this.uSD = uSD; - } - - public double getUYU() { - - return this.uYU; - } - - @JsonProperty("UYU") - public void setUYU(double uYU) { - - this.uYU = uYU; - } - - public double getUZS() { - - return this.uZS; - } - - @JsonProperty("UZS") - public void setUZS(double uZS) { - - this.uZS = uZS; - } - - public double getVEF() { - - return this.vEF; - } - - @JsonProperty("VEF") - public void setVEF(double vEF) { - - this.vEF = vEF; - } - - public double getVND() { - - return this.vND; - } - - @JsonProperty("VND") - public void setVND(double vND) { - - this.vND = vND; - } - - public double getVUV() { - - return this.vUV; - } - - @JsonProperty("VUV") - public void setVUV(double vUV) { - - this.vUV = vUV; - } - - public double getWST() { - - return this.wST; - } - - @JsonProperty("WST") - public void setWST(double wST) { - - this.wST = wST; - } - - public double getXAF() { - - return this.xAF; - } - - @JsonProperty("XAF") - public void setXAF(double xAF) { - - this.xAF = xAF; - } - - public double getXCD() { - - return this.xCD; - } - - @JsonProperty("XCD") - public void setXCD(double xCD) { - - this.xCD = xCD; - } - - public double getXDR() { - - return this.xDR; - } - - @JsonProperty("XDR") - public void setXDR(double xDR) { - - this.xDR = xDR; - } - - public double getXOF() { - - return this.xOF; - } - - @JsonProperty("XOF") - public void setXOF(double xOF) { - - this.xOF = xOF; - } - - public double getXPF() { - - return this.xPF; - } - - @JsonProperty("XPF") - public void setXPF(double xPF) { - - this.xPF = xPF; - } - - public double getYER() { - - return this.yER; - } - - @JsonProperty("YER") - public void setYER(double yER) { - - this.yER = yER; - } - - public double getZAR() { - - return this.zAR; - } - - @JsonProperty("ZAR") - public void setZAR(double zAR) { - - this.zAR = zAR; - } - - public double getZMK() { - - return this.zMK; - } - - @JsonProperty("ZMK") - public void setZMK(double zMK) { - - this.zMK = zMK; - } - - public double getZWL() { - - return this.zWL; - } - - @JsonProperty("ZWL") - public void setZWL(double zWL) { - - this.zWL = zWL; - } -} diff --git a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/service/marketdata/polling/OERPollingMarketDataService.java b/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/service/marketdata/polling/OERPollingMarketDataService.java deleted file mode 100644 index 5cc749491..000000000 --- a/xchange-openexchangerates/src/main/java/com/xeiam/xchange/oer/service/marketdata/polling/OERPollingMarketDataService.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright 2012 Xeiam LLC. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.xeiam.xchange.oer.service.marketdata.polling; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.List; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import si.mazi.rescu.RestProxyFactory; - -import com.xeiam.xchange.CachedDataSession; -import com.xeiam.xchange.ExchangeException; -import com.xeiam.xchange.ExchangeSpecification; -import com.xeiam.xchange.NotAvailableFromExchangeException; -import com.xeiam.xchange.currency.CurrencyPair; -import com.xeiam.xchange.dto.marketdata.OrderBook; -import com.xeiam.xchange.dto.marketdata.Ticker; -import com.xeiam.xchange.dto.marketdata.Trades; -import com.xeiam.xchange.oer.OER; -import com.xeiam.xchange.oer.OERAdapters; -import com.xeiam.xchange.oer.OERUtils; -import com.xeiam.xchange.oer.dto.marketdata.OERTickers; -import com.xeiam.xchange.oer.dto.marketdata.Rates; -import com.xeiam.xchange.service.marketdata.polling.PollingMarketDataService; -import com.xeiam.xchange.service.streaming.BasePollingExchangeService; -import com.xeiam.xchange.utils.Assert; - -/** - * @author timmolter - */ -public class OERPollingMarketDataService extends BasePollingExchangeService implements PollingMarketDataService, CachedDataSession { - - private final Logger logger = LoggerFactory.getLogger(OERPollingMarketDataService.class); - - private final OER openExchangeRates; - - /** - * time stamps used to pace API calls - */ - private long tickerRequestTimeStamp = 0L; - - private OERTickers cachedOERTickers; - - /** - * Constructor - * - * @param exchangeSpecification The exchange specification - */ - public OERPollingMarketDataService(ExchangeSpecification exchangeSpecification) { - - super(exchangeSpecification); - this.openExchangeRates = RestProxyFactory.createProxy(OER.class, exchangeSpecification.getPlainTextUri()); - } - - @Override - public long getRefreshRate() { - - return OERUtils.REFRESH_RATE_MILLIS; - } - - @Override - public List getExchangeSymbols() { - - return OERUtils.CURRENCY_PAIRS; - } - - @Override - public Ticker getTicker(String tradableIdentifier, String currency) { - - verify(tradableIdentifier, currency); - - // check for pacing violation - if (tickerRequestTimeStamp == 0L || System.currentTimeMillis() - tickerRequestTimeStamp >= getRefreshRate()) { - - logger.debug("requesting OER tickers"); - tickerRequestTimeStamp = System.currentTimeMillis(); - - // Request data - cachedOERTickers = openExchangeRates.getTickers(exchangeSpecification.getApiKey()); - } - - Rates rates = cachedOERTickers.getRates(); - - // Use reflection to get at data. - Method method = null; - try { - method = Rates.class.getMethod("get" + tradableIdentifier, null); - } catch (SecurityException e) { - throw new ExchangeException("Problem getting exchange rate!", e); - } catch (NoSuchMethodException e) { - throw new ExchangeException("Problem getting exchange rate!", e); - } - - Double exchangeRate = null; - try { - exchangeRate = (Double) method.invoke(rates, null); - } catch (IllegalArgumentException e) { - throw new ExchangeException("Problem getting exchange rate!", e); - } catch (IllegalAccessException e) { - throw new ExchangeException("Problem getting exchange rate!", e); - } catch (InvocationTargetException e) { - throw new ExchangeException("Problem getting exchange rate!", e); - } - // System.out.println(exchangeRate); - - // Adapt to XChange DTOs - return OERAdapters.adaptTicker(tradableIdentifier, exchangeRate, cachedOERTickers.getTimestamp() * 1000L); - } - - @Override - public OrderBook getPartialOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public OrderBook getFullOrderBook(String tradableIdentifier, String currency) { - - throw new NotAvailableFromExchangeException(); - } - - @Override - public Trades getTrades(String tradableIdentifier, String currency, Object... args) { - - throw new NotAvailableFromExchangeException(); - } - - /** - * Verify - * - * @param tradableIdentifier - * @param currency - */ - private void verify(String tradableIdentifier, String currency) { - - Assert.notNull(tradableIdentifier, "tradableIdentifier cannot be null"); - Assert.isTrue(currency.equals("USD"), "Base curreny must be USD for this exchange"); - Assert.isTrue(OERUtils.isValidCurrencyPair(new CurrencyPair(tradableIdentifier, currency)), "currencyPair is not valid:" + tradableIdentifier + " " + currency); - - } - -} diff --git a/xchange-openexchangerates/src/test/java/com/xeiam/xchange/oer/dto/marketdata/TestOERTickers.java b/xchange-openexchangerates/src/test/java/com/xeiam/xchange/oer/dto/marketdata/TestOERTickers.java deleted file mode 100644 index 06a9acb91..000000000 --- a/xchange-openexchangerates/src/test/java/com/xeiam/xchange/oer/dto/marketdata/TestOERTickers.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright 2012 Xeiam LLC. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.xeiam.xchange.oer.dto.marketdata; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.IOException; -import java.io.InputStream; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; - -/** - * @author timmolter - */ -public class TestOERTickers { - - @Test - public void testUnmarshal() throws IOException { - - // Read in the JSON from the example resources - InputStream is = TestOERTickers.class.getResourceAsStream("/example-latest-rates.json"); - - // Use Jackson to parse it - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - OERTickers oERTickers = mapper.readValue(is, OERTickers.class); - - // Verify that the example data was unmarshalled correctly - System.out.println(oERTickers.getTimestamp().toString()); - assertThat("Unexpected Return Timestamp value", oERTickers.getTimestamp(), equalTo(1354687208L)); - - System.out.println(oERTickers.getRates().getAED()); - assertThat("Unexpected Return AED value", oERTickers.getRates().getAED(), equalTo(3.672989)); - } -} diff --git a/xchange-openexchangerates/src/test/resources/example-currencies.json b/xchange-openexchangerates/src/test/resources/example-currencies.json deleted file mode 100644 index 63e1e8031..000000000 --- a/xchange-openexchangerates/src/test/resources/example-currencies.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "AED": "United Arab Emirates Dirham", - "AFN": "Afghan Afghani", - "ALL": "Albanian Lek", - "AMD": "Armenian Dram", - "ANG": "Netherlands Antillean Guilder", - "AOA": "Angolan Kwanza", - "ARS": "Argentine Peso", - "AUD": "Australian Dollar", - "AWG": "Aruban Florin", - "AZN": "Azerbaijani Manat", - "BAM": "Bosnia-Herzegovina Convertible Mark", - "BBD": "Barbadian Dollar", - "BDT": "Bangladeshi Taka", - "BGN": "Bulgarian Lev", - "BHD": "Bahraini Dinar", - "BIF": "Burundian Franc", - "BMD": "Bermudan Dollar", - "BND": "Brunei Dollar", - "BOB": "Bolivian Boliviano", - "BRL": "Brazilian Real", - "BSD": "Bahamian Dollar", - "BTC": "Bitcoin", - "BTN": "Bhutanese Ngultrum", - "BWP": "Botswanan Pula", - "BYR": "Belarusian Ruble", - "BZD": "Belize Dollar", - "CAD": "Canadian Dollar", - "CDF": "Congolese Franc", - "CHF": "Swiss Franc", - "CLF": "Chilean Unit of Account (UF)", - "CLP": "Chilean Peso", - "CNY": "Chinese Yuan", - "COP": "Colombian Peso", - "CRC": "Costa Rican Colón", - "CUP": "Cuban Peso", - "CVE": "Cape Verdean Escudo", - "CZK": "Czech Republic Koruna", - "DJF": "Djiboutian Franc", - "DKK": "Danish Krone", - "DOP": "Dominican Peso", - "DZD": "Algerian Dinar", - "EEK": "Estonian Kroon", - "EGP": "Egyptian Pound", - "ETB": "Ethiopian Birr", - "EUR": "Euro", - "FJD": "Fijian Dollar", - "FKP": "Falkland Islands Pound", - "GBP": "British Pound Sterling", - "GEL": "Georgian Lari", - "GHS": "Ghanaian Cedi", - "GIP": "Gibraltar Pound", - "GMD": "Gambian Dalasi", - "GNF": "Guinean Franc", - "GTQ": "Guatemalan Quetzal", - "GYD": "Guyanaese Dollar", - "HKD": "Hong Kong Dollar", - "HNL": "Honduran Lempira", - "HRK": "Croatian Kuna", - "HTG": "Haitian Gourde", - "HUF": "Hungarian Forint", - "IDR": "Indonesian Rupiah", - "ILS": "Israeli New Sheqel", - "INR": "Indian Rupee", - "IQD": "Iraqi Dinar", - "IRR": "Iranian Rial", - "ISK": "Icelandic Króna", - "JEP": "Jersey Pound", - "JMD": "Jamaican Dollar", - "JOD": "Jordanian Dinar", - "JPY": "Japanese Yen", - "KES": "Kenyan Shilling", - "KGS": "Kyrgystani Som", - "KHR": "Cambodian Riel", - "KMF": "Comorian Franc", - "KPW": "North Korean Won", - "KRW": "South Korean Won", - "KWD": "Kuwaiti Dinar", - "KYD": "Cayman Islands Dollar", - "KZT": "Kazakhstani Tenge", - "LAK": "Laotian Kip", - "LBP": "Lebanese Pound", - "LKR": "Sri Lankan Rupee", - "LRD": "Liberian Dollar", - "LSL": "Lesotho Loti", - "LTL": "Lithuanian Litas", - "LVL": "Latvian Lats", - "LYD": "Libyan Dinar", - "MAD": "Moroccan Dirham", - "MDL": "Moldovan Leu", - "MGA": "Malagasy Ariary", - "MKD": "Macedonian Denar", - "MMK": "Myanma Kyat", - "MNT": "Mongolian Tugrik", - "MOP": "Macanese Pataca", - "MRO": "Mauritanian Ouguiya", - "MUR": "Mauritian Rupee", - "MVR": "Maldivian Rufiyaa", - "MWK": "Malawian Kwacha", - "MXN": "Mexican Peso", - "MYR": "Malaysian Ringgit", - "MZN": "Mozambican Metical", - "NAD": "Namibian Dollar", - "NGN": "Nigerian Naira", - "NIO": "Nicaraguan Córdoba", - "NOK": "Norwegian Krone", - "NPR": "Nepalese Rupee", - "NZD": "New Zealand Dollar", - "OMR": "Omani Rial", - "PAB": "Panamanian Balboa", - "PEN": "Peruvian Nuevo Sol", - "PGK": "Papua New Guinean Kina", - "PHP": "Philippine Peso", - "PKR": "Pakistani Rupee", - "PLN": "Polish Zloty", - "PYG": "Paraguayan Guarani", - "QAR": "Qatari Rial", - "RON": "Romanian Leu", - "RSD": "Serbian Dinar", - "RUB": "Russian Ruble", - "RWF": "Rwandan Franc", - "SAR": "Saudi Riyal", - "SBD": "Solomon Islands Dollar", - "SCR": "Seychellois Rupee", - "SDG": "Sudanese Pound", - "SEK": "Swedish Krona", - "SGD": "Singapore Dollar", - "SHP": "Saint Helena Pound", - "SLL": "Sierra Leonean Leone", - "SOS": "Somali Shilling", - "SRD": "Surinamese Dollar", - "STD": "São Tomé and Príncipe Dobra", - "SVC": "Salvadoran Colón", - "SYP": "Syrian Pound", - "SZL": "Swazi Lilangeni", - "THB": "Thai Baht", - "TJS": "Tajikistani Somoni", - "TMT": "Turkmenistani Manat", - "TND": "Tunisian Dinar", - "TOP": "Tongan Paʻanga", - "TRY": "Turkish Lira", - "TTD": "Trinidad and Tobago Dollar", - "TWD": "New Taiwan Dollar", - "TZS": "Tanzanian Shilling", - "UAH": "Ukrainian Hryvnia", - "UGX": "Ugandan Shilling", - "USD": "United States Dollar", - "UYU": "Uruguayan Peso", - "UZS": "Uzbekistan Som", - "VEF": "Venezuelan Bolívar", - "VND": "Vietnamese Dong", - "VUV": "Vanuatu Vatu", - "WST": "Samoan Tala", - "XAF": "CFA Franc BEAC", - "XCD": "East Caribbean Dollar", - "XDR": "Special Drawing Rights", - "XOF": "CFA Franc BCEAO", - "XPF": "CFP Franc", - "YER": "Yemeni Rial", - "ZAR": "South African Rand", - "ZMK": "Zambian Kwacha", - "ZWL": "Zimbabwean Dollar" -} \ No newline at end of file diff --git a/xchange-openexchangerates/src/test/resources/example-latest-rates.json b/xchange-openexchangerates/src/test/resources/example-latest-rates.json deleted file mode 100644 index 798539438..000000000 --- a/xchange-openexchangerates/src/test/resources/example-latest-rates.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "disclaimer": "Exchange rates provided for informational purposes only, with no guarantee whatsoever of accuracy, validity, availability, or fitness for any purpose; use at your own risk. Other than that, have fun! Usage subject to acceptance of terms: http://openexchangerates.org/terms/", - "license": "Data sourced from various providers with public-facing APIs; copyright may apply; not for resale; no warranties given. Usage subject to acceptance of license agreement: http://openexchangerates.org/license/", - "timestamp": 1354687208, - "base": "USD", - "rates": { - "AED": 3.672989, - "AFN": 51.986301, - "ALL": 106.759251, - "AMD": 407.160001, - "ANG": 1.78524, - "AOA": 95.759934, - "ARS": 4.845272, - "AUD": 0.954715, - "AWG": 1.789967, - "AZN": 0.7845, - "BAM": 1.494105, - "BBD": 2, - "BDT": 81.297462, - "BGN": 1.493481, - "BHD": 0.377007, - "BIF": 1516.03125, - "BMD": 1, - "BND": 1.216839, - "BOB": 6.983429, - "BRL": 2.119819, - "BSD": 1, - "BTN": 54.65015, - "BWP": 7.929383, - "BYR": 8559.783333, - "BZD": 1.992678, - "CAD": 0.992514, - "CDF": 931.368634, - "CHF": 0.926105, - "CLF": 0.02099, - "CLP": 480.415361, - "CNY": 6.237883, - "COP": 1812.69284, - "CRC": 498.961099, - "CUP": 22.687419, - "CVE": 84.392462, - "CZK": 19.288887, - "DJF": 177.814, - "DKK": 5.694553, - "DOP": 39.982661, - "DZD": 78.750943, - "EEK": 11.760122, - "EGP": 6.115131, - "ETB": 18.185775, - "EUR": 0.76288, - "FJD": 1.761458, - "FKP": 0.620724, - "GBP": 0.620724, - "GEL": 1.661275, - "GHS": 1.890626, - "GIP": 0.62327, - "GMD": 30.25825, - "GNF": 7104.7, - "GTQ": 7.876708, - "GYD": 202.468332, - "HKD": 7.750064, - "HNL": 19.781244, - "HRK": 5.744455, - "HTG": 42.100726, - "HUF": 216.131751, - "IDR": 9611.614924, - "ILS": 3.80994, - "INR": 54.632088, - "IQD": 1162.79375, - "IRR": 12280.44, - "ISK": 124.910001, - "JEP": 0.620724, - "JMD": 91.273304, - "JOD": 0.709616, - "JPY": 82.116861, - "KES": 85.93407, - "KGS": 47.361133, - "KHR": 3994.0725, - "KMF": 375.7345, - "KPW": 900, - "KRW": 1082.579732, - "KWD": 0.281313, - "KYD": 0.822304, - "KZT": 150.447746, - "LAK": 7992.7675, - "LBP": 1503.76588, - "LKR": 128.414265, - "LRD": 73.433333, - "LSL": 8.824495, - "LTL": 2.635597, - "LVL": 0.531762, - "LYD": 1.260464, - "MAD": 8.501475, - "MDL": 12.312367, - "MGA": 2239.2975, - "MKD": 47.349395, - "MMK": 851.12525, - "MNT": 1397.5, - "MOP": 7.973435, - "MRO": 297.4175, - "MUR": 30.841111, - "MVR": 15.370325, - "MWK": 326.417751, - "MXN": 12.944991, - "MYR": 3.043575, - "MZN": 29.65, - "NAD": 8.819134, - "NGN": 156.996669, - "NIO": 24.014619, - "NOK": 5.617861, - "NPR": 87.365673, - "NZD": 1.212318, - "OMR": 0.385021, - "PAB": 1, - "PEN": 2.575927, - "PGK": 2.067303, - "PHP": 40.873551, - "PKR": 96.525712, - "PLN": 3.155008, - "PYG": 4379.599218, - "QAR": 3.640629, - "RON": 3.460106, - "RSD": 86.703387, - "RUB": 30.810699, - "RWF": 620.605832, - "SAR": 3.750209, - "SBD": 7.087878, - "SCR": 13.105993, - "SDG": 4.41135, - "SEK": 6.594079, - "SGD": 1.218248, - "SHP": 0.620724, - "SLL": 4334.001083, - "SOS": 1612.770012, - "SRD": 3.275, - "STD": 18720.7, - "SVC": 8.740148, - "SYP": 70.96845, - "SZL": 8.825381, - "THB": 30.68032, - "TJS": 4.770867, - "TMT": 2.85015, - "TND": 1.563978, - "TOP": 1.742264, - "TRY": 1.784662, - "TTD": 6.392481, - "TWD": 29.059003, - "TZS": 1600.53882, - "UAH": 8.180114, - "UGX": 2680.38903, - "USD": 1, - "UYU": 19.449969, - "UZS": 1971.449316, - "VEF": 4.294254, - "VND": 20824.05066, - "VUV": 91.25, - "WST": 2.290383, - "XAF": 500.847662, - "XCD": 2.70185, - "XDR": 0.64895, - "XOF": 501.090249, - "XPF": 91.110438, - "YER": 214.816304, - "ZAR": 8.803578, - "ZMK": 5244.318578, - "ZWL": 322.387247 - } -} \ No newline at end of file From e6d9be0b39d70bfae6e67ca5cc9780b3fcfdcf20 Mon Sep 17 00:00:00 2001 From: Tim Molter Date: Thu, 6 Mar 2014 11:36:37 +0100 Subject: [PATCH 002/117] shouldn't need this anymore --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c90ae99c9..000000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: java - -# whitelist -branches: - only: - - develop From 368e40914eff79a3291dee0da8c0db3870da03be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Reiter?= Date: Wed, 7 Feb 2018 15:34:50 +0100 Subject: [PATCH 003/117] fixed the timestamp of funding records --- .../java/org/knowm/xchange/dsx/service/DSXAccountService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java b/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java index 9cabc76f7..e8a564653 100644 --- a/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java +++ b/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java @@ -26,7 +26,6 @@ import org.knowm.xchange.service.trade.params.TradeHistoryParamsIdSpan; import org.knowm.xchange.service.trade.params.TradeHistoryParamsTimeSpan; import org.knowm.xchange.service.trade.params.WithdrawFundsParams; -import org.knowm.xchange.utils.DateUtils; /** * @author Mikhail Wall @@ -153,7 +152,7 @@ private FundingRecord.Type convert(DSXTransHistoryResult.Type type) { } private static Long nullSafeUnixTime(Date time) { - return time != null ? DateUtils.toUnixTime(time) : null; + return time != null ? time.getTime(): null; } private static Long nullSafeToLong(String str) { From f3e94766d5e39f5bf23230619c9e7416bc54d273 Mon Sep 17 00:00:00 2001 From: ww3456 Date: Wed, 7 Feb 2018 20:56:33 +0000 Subject: [PATCH 004/117] [GDAX] added user verify endpoint, used to authenticate websocket connections --- .../java/org/knowm/xchange/gdax/GDAX.java | 6 +++ .../org/knowm/xchange/gdax/GDAXAdapters.java | 4 +- .../dto/account/GDAXWebsocketAuthData.java | 37 +++++++++++++++++++ .../gdax/service/GDAXAccountServiceRaw.java | 12 ++++++ .../xchange/gdax/service/GDAXDigest.java | 9 ++++- 5 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/account/GDAXWebsocketAuthData.java diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java index 76cf2349b..2b043a605 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java @@ -36,6 +36,7 @@ import org.knowm.xchange.utils.DateUtils; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; import si.mazi.rescu.HttpStatusIOException; import si.mazi.rescu.ParamsDigest; @@ -171,6 +172,11 @@ GDAXCoinbaseAccountAddress getGDAXAccountAddress(@HeaderParam("CB-ACCESS-KEY") S @HeaderParam("CB-ACCESS-PASSPHRASE") String passphrase, @PathParam("account_id") String accountId); + @GET + @Path("/users/self/verify") + JsonNode getVerifyId(@HeaderParam("CB-ACCESS-KEY") String apiKey, @HeaderParam("CB-ACCESS-SIGN") ParamsDigest signer, + @HeaderParam("CB-ACCESS-TIMESTAMP") long timestamp, @HeaderParam("CB-ACCESS-PASSPHRASE") String passphrase) throws GDAXException, IOException; + class GDAXReportRequest { public final @JsonProperty("type") String type; public final @JsonProperty("start_date") String startDate; diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java index 785486720..3c51637cd 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java @@ -243,10 +243,10 @@ public static OrderStatus adaptOrderStatus(GDAXOrder order) { } - if(order.getFilledSize().equals(0.0)) + if(order.getFilledSize().signum() == 0) return OrderStatus.NEW; - if(order.getFilledSize().compareTo(new BigDecimal(0.0)) > 0 + if(order.getFilledSize().compareTo(BigDecimal.ZERO) > 0 && order.getSize().compareTo(order.getFilledSize()) < 0) return OrderStatus.PARTIALLY_FILLED; diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/account/GDAXWebsocketAuthData.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/account/GDAXWebsocketAuthData.java new file mode 100644 index 000000000..fc4ffca9b --- /dev/null +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/account/GDAXWebsocketAuthData.java @@ -0,0 +1,37 @@ +package org.knowm.xchange.gdax.dto.account; + +public class GDAXWebsocketAuthData { + private final String userId; + private final String key; + private final String passphrase; + private final String signature; + private final long timestamp; + + public GDAXWebsocketAuthData(String userId, String key, String passphrase, String signature, long timestamp) { + this.userId = userId; + this.key = key; + this.passphrase = passphrase; + this.signature = signature; + this.timestamp = timestamp; + } + + public String getUserId() { + return userId; + } + + public String getKey() { + return key; + } + + public String getPassphrase() { + return passphrase; + } + + public String getSignature() { + return signature; + } + + public long getTimestamp() { + return timestamp; + } +} diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java index 6732abd75..973d2349c 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java @@ -11,12 +11,15 @@ import org.knowm.xchange.gdax.dto.GDAXException; import org.knowm.xchange.gdax.dto.account.GDAXAccount; import org.knowm.xchange.gdax.dto.account.GDAXSendMoneyRequest; +import org.knowm.xchange.gdax.dto.account.GDAXWebsocketAuthData; import org.knowm.xchange.gdax.dto.account.GDAXWithdrawCryptoResponse; import org.knowm.xchange.gdax.dto.account.GDAXWithdrawFundsRequest; import org.knowm.xchange.gdax.dto.trade.GDAXCoinbaseAccount; import org.knowm.xchange.gdax.dto.trade.GDAXCoinbaseAccountAddress; import org.knowm.xchange.gdax.dto.trade.GDAXSendMoneyResponse; +import com.fasterxml.jackson.databind.JsonNode; + import si.mazi.rescu.SynchronizedValueFactory; public class GDAXAccountServiceRaw extends GDAXBaseService { @@ -65,4 +68,13 @@ public GDAXCoinbaseAccount[] getCoinbaseAccounts() throws IOException { public GDAXCoinbaseAccountAddress getCoinbaseAccountAddress(String accountId) throws IOException { return gdax.getGDAXAccountAddress(apiKey, digest, nonceFactory, passphrase, accountId); } + + public GDAXWebsocketAuthData getWebsocketAuthData() throws GDAXException, IOException { + long timestamp = nonceFactory.createValue(); + JsonNode json = gdax.getVerifyId(apiKey, digest, timestamp, passphrase); + String userId = json.get("id").asText(); + GDAXDigest gdaxDigest = (GDAXDigest)digest; + GDAXWebsocketAuthData data = new GDAXWebsocketAuthData(userId, apiKey, passphrase, gdaxDigest.getSignature(), timestamp); + return data; + } } diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXDigest.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXDigest.java index be894f796..f8b17f63f 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXDigest.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXDigest.java @@ -13,6 +13,8 @@ public class GDAXDigest extends BaseParamsDigest { + private String signature = ""; + private GDAXDigest(byte[] secretKey) { super(secretKey, HMAC_SHA_256); @@ -42,6 +44,11 @@ public String digestParams(RestInvocation restInvocation) { throw new ExchangeException("Digest encoding exception", e); } - return Base64.encodeBytes(mac256.doFinal()); + signature = Base64.encodeBytes(mac256.doFinal()); + return signature; + } + + public String getSignature() { + return signature; } } From 0a4d6c6e8f8a89fa0e8268841162d883d7ce06bc Mon Sep 17 00:00:00 2001 From: Frank Kaiser Date: Wed, 7 Feb 2018 22:10:34 +0100 Subject: [PATCH 005/117] Fixed md5 generation --- .../bitcoinde/service/BitcoindeDigest.java | 140 ++++++++++-------- 1 file changed, 80 insertions(+), 60 deletions(-) diff --git a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeDigest.java b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeDigest.java index 0de0bd710..f45f831b2 100644 --- a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeDigest.java +++ b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeDigest.java @@ -1,71 +1,91 @@ package org.knowm.xchange.bitcoinde.service; import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import javax.crypto.Mac; import org.knowm.xchange.service.BaseParamsDigest; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import si.mazi.rescu.RestInvocation; +import si.mazi.rescu.RestInvocation; +/** + * + * @author kaiserfr + * + */ public class BitcoindeDigest extends BaseParamsDigest { - - private final String apiKey; -// private final MessageDigest md; - - /** - * Constructor - * - * @param secretKeyBase64 - * @param apiKey @throws IllegalArgumentException if key is invalid (cannot be base-64-decoded or the decoded key is invalid). - */ - private BitcoindeDigest(String secretKeyBase64, String apiKey) { - - super(secretKeyBase64, HMAC_SHA_256); - this.apiKey = apiKey; -// try { -// md = MessageDigest.getInstance("MD5"); -// } catch (NoSuchAlgorithmException e) { -// throw new RuntimeException("Problem instantiating message digest."); -// } - } - - public static BitcoindeDigest createInstance(String secretKeyBase64, String apiKey) { - - return secretKeyBase64 == null ? null : new BitcoindeDigest(secretKeyBase64, apiKey); - } - - @Override - public String digestParams(RestInvocation restInvocation) { - - // Step 1: get url-encoded query string (skip) - -// String queryString = restInvocation.getQueryString(); -// System.out.println("queryString = " + queryString); - - // Step 2: concatenate URL with query string - - String completeURL = restInvocation.getInvocationUrl(); -// System.out.println("completeURL = " + completeURL); - - // Step 3: md5-Hash der POST-Parameter für die HMAC-Daten erstellen - - String mD5Post = "d41d8cd98f00b204e9800998ecf8427e"; // no post params for GET methods - - // Step 4: Konkatinieren der HMAC-Eingabedaten - // http_method+'#'+uri+'#'+api_key+'#'+nonce+'#'+post_parameter_md5_hashed_url_encoded_query_string - // ex: 'GET#https://api.bitcoin.de/v1/orders?type=buy&amount=5.3&price=255.5#MY_API_KEY#1234567#d41d8cd98f00b204e9800998ecf8427e' - - String nonce = restInvocation.getHttpHeadersFromParams().get("X-API-NONCE"); - String hmac_data = String.format("GET#%s#%s#%s#%s", completeURL, apiKey, nonce, mD5Post); -// System.out.println("hmac_data = " + hmac_data); - - // Step 5: Bilden des eigentlichen sha256-HMACs - - Mac mac256 = getMac(); - mac256.update(hmac_data.getBytes()); - - return String.format("%064x", new BigInteger(1, mac256.doFinal())); - - } + private final String apiKey; + + /** + * Constructor + * + * @param secretKeyBase64 + * @param apiKey + * @throws IllegalArgumentException + * if key is invalid (cannot be base-64-decoded or the decoded key is + * invalid). + */ + private BitcoindeDigest(String secretKeyBase64, String apiKey) { + super(secretKeyBase64, HMAC_SHA_256); + this.apiKey = apiKey; + } + + public static BitcoindeDigest createInstance( + String secretKeyBase64, + String apiKey) { + + return secretKeyBase64 == null ? null : new BitcoindeDigest(secretKeyBase64, apiKey); + } + + @Override + public String digestParams( + RestInvocation restInvocation) { + + // Step 1: concatenate URL with query string + String completeURL = restInvocation.getInvocationUrl(); + + // Step 2: create md5-Hash of the POST-Parameters for the HMAC-data + String httpMethod = restInvocation.getHttpMethod(); + String requestBody = restInvocation.getRequestBody(); + + String md5; + if ("POST".equals(httpMethod)) { + md5 = getMD5(requestBody); + } else { + md5 = "d41d8cd98f00b204e9800998ecf8427e"; // no post params for GET methods + } + + // Step 3: concat HMAC-input + + // http_method+'#'+uri+'#'+api_key+'#'+nonce+'#'+post_parameter_md5_hashed_url_encoded_query_string + String nonce = restInvocation.getHttpHeadersFromParams().get("X-API-NONCE"); + String hmac_data = String.format("%s#%s#%s#%s#%s", httpMethod, completeURL, apiKey, nonce, md5); + + // Step 3: Create actual sha256-HMAC + Mac mac256 = getMac(); + mac256.update(hmac_data.getBytes()); + + return String.format("%064x", new BigInteger(1, mac256.doFinal())); + } + + private String getMD5( + String original) { + MessageDigest md = null; + try { + md = MessageDigest.getInstance("MD5"); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + md.update(original.getBytes()); + byte[] digest = md.digest(); + StringBuffer sb = new StringBuffer(); + for (byte b : digest) { + sb.append(String.format("%02x", b & 0xff)); + } + return sb.toString(); + } } From d92c5c278fc7d9f137c39d7bff84b38d38b86c56 Mon Sep 17 00:00:00 2001 From: Frank Kaiser Date: Wed, 7 Feb 2018 22:15:47 +0100 Subject: [PATCH 006/117] added cancelOrder --- .../java/org/knowm/xchange/bitcoinde/Bitcoinde.java | 13 +++++++++++++ .../bitcoinde/service/BitcoindeTradeService.java | 13 +++++++++++-- .../bitcoinde/service/BitcoindeTradeServiceRaw.java | 11 +++++++++++ .../service/CancelOrderByIdAndCurrencyPair.java | 9 +++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/CancelOrderByIdAndCurrencyPair.java diff --git a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/Bitcoinde.java b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/Bitcoinde.java index b4074bbe8..ebffea04e 100644 --- a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/Bitcoinde.java +++ b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/Bitcoinde.java @@ -3,11 +3,13 @@ import java.io.IOException; import java.math.BigDecimal; +import javax.ws.rs.DELETE; import javax.ws.rs.FormParam; import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; import javax.ws.rs.Path; +import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; @@ -28,6 +30,17 @@ public interface Bitcoinde { // formatter:off + @DELETE + @Path("orders/{order_id}/{trading_pair}") + // https://api.bitcoin.de/v2/orders/:order_id/:trading_pair + BitcoindeIdResponse deleteOrder(@HeaderParam("X-API-KEY") String apiKey, + @HeaderParam("X-API-NONCE") SynchronizedValueFactory nonce, + @HeaderParam("X-API-SIGNATURE") ParamsDigest paramsDigest, + @PathParam("order_id") String order_id, + @PathParam("trading_pair") String trading_pair) throws BitcoindeException, + IOException; + + @POST @Path("orders") BitcoindeIdResponse createOrder( diff --git a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeService.java b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeService.java index e0bb47f89..be58a8002 100644 --- a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeService.java +++ b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeService.java @@ -7,7 +7,11 @@ import org.knowm.xchange.bitcoinde.BitcoindeAdapters; import org.knowm.xchange.bitcoinde.trade.BitcoindeIdResponse; import org.knowm.xchange.dto.Order; -import org.knowm.xchange.dto.trade.*; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.MarketOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.StopOrder; +import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderParams; @@ -58,7 +62,12 @@ public boolean cancelOrder(String orderId) throws IOException { @Override public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { - throw new NotYetImplementedForExchangeException(); + if (orderParams instanceof CancelOrderByIdAndCurrencyPair) { + CancelOrderByIdAndCurrencyPair cob = (CancelOrderByIdAndCurrencyPair) orderParams; + bitcoindeCancelOrders(cob.getId(), + cob.getCurrencyPair()); + } + return true; } @Override diff --git a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeServiceRaw.java b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeServiceRaw.java index 7f4cb5636..b3464f2d6 100644 --- a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeServiceRaw.java +++ b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/BitcoindeTradeServiceRaw.java @@ -6,6 +6,7 @@ import org.knowm.xchange.bitcoinde.dto.BitcoindeException; import org.knowm.xchange.bitcoinde.trade.BitcoindeIdResponse; import org.knowm.xchange.bitcoinde.trade.BitcoindeMyOpenOrdersWrapper; +import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order.OrderType; import org.knowm.xchange.dto.trade.LimitOrder; @@ -31,6 +32,16 @@ public BitcoindeMyOpenOrdersWrapper getBitcoindeOpenOrders() throws IOException } } + public BitcoindeIdResponse bitcoindeCancelOrders(String order_id, + CurrencyPair currencyPair) throws IOException { + try { + String currPair = currencyPair.base.getCurrencyCode() + currencyPair.counter.getCurrencyCode(); + return bitcoinde.deleteOrder(apiKey, nonceFactory, signatureCreator, order_id, currPair); + } catch (BitcoindeException e) { + throw handleError(e); + } + } + public BitcoindeIdResponse bitcoindePlaceLimitOrder(LimitOrder l) throws IOException { try { String side = l.getType().equals(OrderType.ASK) ? "sell" : "buy"; diff --git a/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/CancelOrderByIdAndCurrencyPair.java b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/CancelOrderByIdAndCurrencyPair.java new file mode 100644 index 000000000..c30baf696 --- /dev/null +++ b/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/service/CancelOrderByIdAndCurrencyPair.java @@ -0,0 +1,9 @@ +package org.knowm.xchange.bitcoinde.service; + +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.service.trade.params.CancelOrderParams; + +public interface CancelOrderByIdAndCurrencyPair extends CancelOrderParams{ + public CurrencyPair getCurrencyPair(); + public String getId(); +} From 5a55bf8164e2d8fb0a0d72d782b1535bcc0f453f Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Wed, 7 Feb 2018 23:34:52 +0100 Subject: [PATCH 007/117] core: Add HMAC_MD5 to BaseParamsDigest constants --- .../main/java/org/knowm/xchange/service/BaseParamsDigest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/xchange-core/src/main/java/org/knowm/xchange/service/BaseParamsDigest.java b/xchange-core/src/main/java/org/knowm/xchange/service/BaseParamsDigest.java index 8955c5023..0cc208bde 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/service/BaseParamsDigest.java +++ b/xchange-core/src/main/java/org/knowm/xchange/service/BaseParamsDigest.java @@ -18,6 +18,7 @@ public abstract class BaseParamsDigest implements ParamsDigest { public static final String HMAC_SHA_384 = "HmacSHA384"; public static final String HMAC_SHA_256 = "HmacSHA256"; public static final String HMAC_SHA_1 = "HmacSHA1"; + public static final String HMAC_MD5 = "HmacMD5"; private final ThreadLocal threadLocalMac; From 2f04a76f75db554ca4656a06ce1de4a1647ca322 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Thu, 8 Feb 2018 04:43:50 +0530 Subject: [PATCH 008/117] Bug in parsing v2 Deposit Address response Added testcase --- .../dto/account/BitstampDepositAddress.java | 5 ++- .../dto/account/DepositAddressJSONTest.java | 42 +++++++++++++++++++ .../account/example-deposit-error.json | 1 + .../account/example-v2-deposit-response.json | 1 + 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 xchange-bitstamp/src/test/java/org/knowm/xchange/bitstamp/dto/account/DepositAddressJSONTest.java create mode 100644 xchange-bitstamp/src/test/resources/account/example-deposit-error.json create mode 100644 xchange-bitstamp/src/test/resources/account/example-v2-deposit-response.json diff --git a/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/dto/account/BitstampDepositAddress.java b/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/dto/account/BitstampDepositAddress.java index edc4a88c7..4fc458615 100644 --- a/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/dto/account/BitstampDepositAddress.java +++ b/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/dto/account/BitstampDepositAddress.java @@ -44,8 +44,11 @@ public BitstampDepositAddress deserialize(JsonParser jsonParser, Deserialization JsonNode node = oc.readTree(jsonParser); if (node.get("error") != null) { return new BitstampDepositAddress(node.path("error").asText(), ""); + } else if(node.get("address") != null) { + return new BitstampDepositAddress(null, node.get("address").asText()); + } else { + return new BitstampDepositAddress(null, node.asText()); } - return new BitstampDepositAddress(null, node.asText()); } } } diff --git a/xchange-bitstamp/src/test/java/org/knowm/xchange/bitstamp/dto/account/DepositAddressJSONTest.java b/xchange-bitstamp/src/test/java/org/knowm/xchange/bitstamp/dto/account/DepositAddressJSONTest.java new file mode 100644 index 000000000..71a26a8b0 --- /dev/null +++ b/xchange-bitstamp/src/test/java/org/knowm/xchange/bitstamp/dto/account/DepositAddressJSONTest.java @@ -0,0 +1,42 @@ +package org.knowm.xchange.bitstamp.dto.account; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.Test; + +import java.io.IOException; +import java.io.InputStream; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author ujjwal on 08/02/18. + */ +public class DepositAddressJSONTest { + + private BitstampDepositAddress unmarshall(String file) throws IOException { + InputStream is = getClass().getResourceAsStream(file); + ObjectMapper mapper = new ObjectMapper(); + return mapper.readValue(is, BitstampDepositAddress.class); + } + + @Test + public void testError() throws IOException { + BitstampDepositAddress address = unmarshall("/account/example-deposit-error.json"); + assertThat(address.getError()).isNotBlank(); + assertThat(address.getDepositAddress()).isNullOrEmpty(); + } + + @Test + public void testV1DepositResponse() throws IOException { + final BitstampDepositAddress address = unmarshall("/account/example-deposit-response.json"); + assertThat(address.getError()).isNullOrEmpty(); + assertThat(address.getDepositAddress()).isNotBlank(); + } + + @Test + public void testV2DepositResponse() throws IOException { + final BitstampDepositAddress address = unmarshall("/account/example-v2-deposit-response.json"); + assertThat(address.getError()).isNullOrEmpty(); + assertThat(address.getDepositAddress()).isNotBlank(); + } +} diff --git a/xchange-bitstamp/src/test/resources/account/example-deposit-error.json b/xchange-bitstamp/src/test/resources/account/example-deposit-error.json new file mode 100644 index 000000000..6bf916958 --- /dev/null +++ b/xchange-bitstamp/src/test/resources/account/example-deposit-error.json @@ -0,0 +1 @@ +{"error":"Some random error text"} \ No newline at end of file diff --git a/xchange-bitstamp/src/test/resources/account/example-v2-deposit-response.json b/xchange-bitstamp/src/test/resources/account/example-v2-deposit-response.json new file mode 100644 index 000000000..46572686d --- /dev/null +++ b/xchange-bitstamp/src/test/resources/account/example-v2-deposit-response.json @@ -0,0 +1 @@ +{"address":"MS1JPX755b7J4SRdfNjzyemAebfBUjo89u"} \ No newline at end of file From e414bac0c478db457a3989669e8d3f879f095869 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Thu, 8 Feb 2018 00:16:15 +0100 Subject: [PATCH 009/117] [Bibox] implement getTicker call --- xchange-bibox/api-specification.txt | 7 + xchange-bibox/pom.xml | 34 +++ .../java/org/knowm/xchange/bibox/Bibox.java | 31 ++ .../xchange/bibox/BiboxAuthenticated.java | 10 + .../knowm/xchange/bibox/BiboxException.java | 85 ++++++ .../knowm/xchange/bibox/BiboxExchange.java | 47 ++++ .../xchange/bibox/dto/BiboxAdapters.java | 28 ++ .../xchange/bibox/dto/BiboxResponse.java | 26 ++ .../bibox/dto/marketdata/BiboxTicker.java | 264 ++++++++++++++++++ .../bibox/service/BiboxBaseService.java | 28 ++ .../bibox/service/BiboxMarketDataService.java | 49 ++++ .../service/BiboxMarketDataServiceRaw.java | 28 ++ xchange-bibox/src/main/resources/bibox.json | 1 + .../BiboxMarketdataUnmarshalTest.java | 44 +++ .../MarketDataServiceIntegration.java | 26 ++ .../resources/marketdata/example-ticker.json | 15 + 16 files changed, 723 insertions(+) create mode 100644 xchange-bibox/api-specification.txt create mode 100644 xchange-bibox/pom.xml create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxException.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxTicker.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java create mode 100644 xchange-bibox/src/main/resources/bibox.json create mode 100644 xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java create mode 100644 xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java create mode 100644 xchange-bibox/src/test/resources/marketdata/example-ticker.json diff --git a/xchange-bibox/api-specification.txt b/xchange-bibox/api-specification.txt new file mode 100644 index 000000000..7c5da3c42 --- /dev/null +++ b/xchange-bibox/api-specification.txt @@ -0,0 +1,7 @@ +Bibox Exchange API specification +================================ + +Documentation +------------- +https://github.com/Biboxcom/api_reference/wiki/home_en +https://github.com/Biboxcom/api_reference/wiki/api_reference \ No newline at end of file diff --git a/xchange-bibox/pom.xml b/xchange-bibox/pom.xml new file mode 100644 index 000000000..710fc0a84 --- /dev/null +++ b/xchange-bibox/pom.xml @@ -0,0 +1,34 @@ + + + 4.0.0 + + + org.knowm.xchange + xchange-parent + 4.3.4-SNAPSHOT + + + xchange-bibox + + XChange Bibox + XChange implementation for the Bibox Exchange + + http://knowm.org/open-source/xchange/ + 2012 + + + Knowm Inc. + http://knowm.org/open-source/xchange/ + + + + + + + org.knowm.xchange + xchange-core + 4.3.4-SNAPSHOT + + + diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java new file mode 100644 index 000000000..40ffdba2d --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java @@ -0,0 +1,31 @@ +package org.knowm.xchange.bibox; + +import java.io.IOException; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + +import org.knowm.xchange.bibox.dto.BiboxResponse; +import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; + +/** + * @author odrotleff + */ +@Path("v1") +@Produces(MediaType.APPLICATION_JSON) +public interface Bibox { + + /** + * Retrieves a ticker. + * + * @param symbol the currency pair + * @return + * @throws IOException + */ + @GET + @Path("mdata") + BiboxResponse mdata(@QueryParam("cmd") String cmd, @QueryParam("pair") String pair) throws IOException, BiboxException; +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java new file mode 100644 index 000000000..fd85743e3 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -0,0 +1,10 @@ +package org.knowm.xchange.bibox; + +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +@Path("v1") +@Produces(MediaType.APPLICATION_JSON) +public interface BiboxAuthenticated extends Bibox { +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxException.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxException.java new file mode 100644 index 000000000..7d340af9e --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxException.java @@ -0,0 +1,85 @@ +package org.knowm.xchange.bibox; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import si.mazi.rescu.HttpStatusExceptionSupport; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({"code", "msg", "success", "timestamp"}) +public class BiboxException extends HttpStatusExceptionSupport { + + private static final long serialVersionUID = 1L; + + @JsonProperty("code") + private String code; + @JsonProperty("msg") + private String msg; + @JsonProperty("success") + private boolean success; + @JsonProperty("timestamp") + private long timestamp; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @Override + public String getMessage() { + return String.format("%s - %s (HTTP status code: %d)", code, msg, getHttpStatusCode()); + } + + @JsonProperty("code") + public String getCode() { + return code; + } + + @JsonProperty("code") + public void setCode(String code) { + this.code = code; + } + + @JsonProperty("msg") + public String getMsg() { + return msg; + } + + @JsonProperty("msg") + public void setMsg(String msg) { + this.msg = msg; + } + + @JsonProperty("success") + public boolean isSuccess() { + return success; + } + + @JsonProperty("success") + public void setSuccess(boolean success) { + this.success = success; + } + + @JsonProperty("timestamp") + public long getTimestamp() { + return timestamp; + } + + @JsonProperty("timestamp") + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java new file mode 100644 index 000000000..3c230b1a7 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java @@ -0,0 +1,47 @@ +package org.knowm.xchange.bibox; + +import org.knowm.xchange.BaseExchange; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.bibox.service.BiboxMarketDataService; +import org.knowm.xchange.utils.nonce.CurrentTimeNonceFactory; + +import si.mazi.rescu.SynchronizedValueFactory; + +public class BiboxExchange extends BaseExchange implements Exchange { + + private SynchronizedValueFactory nonceFactory = new CurrentTimeNonceFactory(); + + @Override + protected void initServices() { + + this.marketDataService = new BiboxMarketDataService(this); + // this.accountService = new BiboxAccountService(this); + // this.tradeService = new BiboxTradeService(this); + } + + @Override + public ExchangeSpecification getDefaultExchangeSpecification() { + + ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); + exchangeSpecification.setSslUri("https://api.bibox.com/"); + exchangeSpecification.setHost("bibox.com"); + exchangeSpecification.setPort(80); + exchangeSpecification.setExchangeName("Bibox"); + exchangeSpecification.setExchangeDescription("AI ENHANCED ENCRYPTED DIGITAL ASSET EXCHANGE."); + + return exchangeSpecification; + } + + @Override + public SynchronizedValueFactory getNonceFactory() { + + return nonceFactory; + } + + // @Override + // public void remoteInit() throws IOException, ExchangeException { + // + // exchangeMetaData = ((BiboxMarketDataService) marketDataService).getMetadata(); + // } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java new file mode 100644 index 000000000..6c6e78487 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -0,0 +1,28 @@ +package org.knowm.xchange.bibox.dto; + +import java.util.Date; + +import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.Ticker; + +public class BiboxAdapters { + + public static String toBiboxPair(CurrencyPair pair) { + + return pair.base.getCurrencyCode() + "_" + pair.counter.getCurrencyCode(); + } + + public static Ticker adaptTicker(BiboxTicker ticker, CurrencyPair currencyPair) { + return new Ticker.Builder() + .currencyPair(currencyPair) + .ask(ticker.getSell()) + .bid(ticker.getBuy()) + .high(ticker.getHigh()) + .low(ticker.getLow()) + .last(ticker.getLast()) + .volume(ticker.getVol()) + .timestamp(new Date(ticker.getTimestamp())) + .build(); + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java new file mode 100644 index 000000000..19a99b43b --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java @@ -0,0 +1,26 @@ +package org.knowm.xchange.bibox.dto; + +/** + * General Bibox response + * + * @param Result type + * + * @author odrotleff + */ +public class BiboxResponse { + private T result; + private String cmd; + + public T getResult() { + return result; + } + public void setResult(T result) { + this.result = result; + } + public String getCmd() { + return cmd; + } + public void setCmd(String cmd) { + this.cmd = cmd; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxTicker.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxTicker.java new file mode 100644 index 000000000..d5ee0aca0 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxTicker.java @@ -0,0 +1,264 @@ +package org.knowm.xchange.bibox.dto.marketdata; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "buy", + "high", + "last", + "low", + "sell", + "timestamp", + "vol", + "last_cny", + "last_usd", + "percent" +}) +public class BiboxTicker { + + @JsonProperty("buy") + private BigDecimal buy; + @JsonProperty("high") + private BigDecimal high; + @JsonProperty("last") + private BigDecimal last; + @JsonProperty("low") + private BigDecimal low; + @JsonProperty("sell") + private BigDecimal sell; + @JsonProperty("timestamp") + private long timestamp; + @JsonProperty("vol") + private BigDecimal vol; + @JsonProperty("last_cny") + private BigDecimal lastCny; + @JsonProperty("last_usd") + private BigDecimal lastUsd; + // yes, I'm lazy + @JsonProperty("percent") + private String percent; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * + * @return + * The buy + */ + @JsonProperty("buy") + public BigDecimal getBuy() { + return buy; + } + + /** + * + * @param buy + * The buy + */ + @JsonProperty("buy") + public void setBuy(BigDecimal buy) { + this.buy = buy; + } + + /** + * + * @return + * The high + */ + @JsonProperty("high") + public BigDecimal getHigh() { + return high; + } + + /** + * + * @param high + * The high + */ + @JsonProperty("high") + public void setHigh(BigDecimal high) { + this.high = high; + } + + /** + * + * @return + * The last + */ + @JsonProperty("last") + public BigDecimal getLast() { + return last; + } + + /** + * + * @param last + * The last + */ + @JsonProperty("last") + public void setLast(BigDecimal last) { + this.last = last; + } + + /** + * + * @return + * The low + */ + @JsonProperty("low") + public BigDecimal getLow() { + return low; + } + + /** + * + * @param low + * The low + */ + @JsonProperty("low") + public void setLow(BigDecimal low) { + this.low = low; + } + + /** + * + * @return + * The sell + */ + @JsonProperty("sell") + public BigDecimal getSell() { + return sell; + } + + /** + * + * @param sell + * The sell + */ + @JsonProperty("sell") + public void setSell(BigDecimal sell) { + this.sell = sell; + } + + /** + * + * @return + * The timestamp + */ + @JsonProperty("timestamp") + public long getTimestamp() { + return timestamp; + } + + /** + * + * @param timestamp + * The timestamp + */ + @JsonProperty("timestamp") + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + } + + /** + * + * @return + * The vol + */ + @JsonProperty("vol") + public BigDecimal getVol() { + return vol; + } + + /** + * + * @param vol + * The vol + */ + @JsonProperty("vol") + public void setVol(BigDecimal vol) { + this.vol = vol; + } + + /** + * + * @return + * The lastCny + */ + @JsonProperty("last_cny") + public BigDecimal getLastCny() { + return lastCny; + } + + /** + * + * @param lastCny + * The last_cny + */ + @JsonProperty("last_cny") + public void setLastCny(BigDecimal lastCny) { + this.lastCny = lastCny; + } + + /** + * + * @return + * The lastUsd + */ + @JsonProperty("last_usd") + public BigDecimal getLastUsd() { + return lastUsd; + } + + /** + * + * @param lastUsd + * The last_usd + */ + @JsonProperty("last_usd") + public void setLastUsd(BigDecimal lastUsd) { + this.lastUsd = lastUsd; + } + + /** + * + * @return + * The percent + */ + @JsonProperty("percent") + public String getPercent() { + return percent; + } + + /** + * + * @param percent + * The percent + */ + @JsonProperty("percent") + public void setPercent(String percent) { + this.percent = percent; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java new file mode 100644 index 000000000..462fd242e --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java @@ -0,0 +1,28 @@ +package org.knowm.xchange.bibox.service; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.BiboxAuthenticated; +import org.knowm.xchange.service.BaseExchangeService; +import org.knowm.xchange.service.BaseService; + +import si.mazi.rescu.ParamsDigest; +import si.mazi.rescu.RestProxyFactory; + +public class BiboxBaseService extends BaseExchangeService implements BaseService { + + protected final String apiKey; + protected final BiboxAuthenticated bibox; + protected final ParamsDigest signatureCreator; + + /** + * Constructor + * + * @param exchange + */ + protected BiboxBaseService(Exchange exchange) { + super(exchange); + this.bibox = RestProxyFactory.createProxy(BiboxAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); + this.apiKey = exchange.getExchangeSpecification().getApiKey(); + this.signatureCreator = BiboxDigest.createInstance(exchange.getExchangeSpecification().getSecretKey()); + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java new file mode 100644 index 000000000..81c9ab78d --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java @@ -0,0 +1,49 @@ +package org.knowm.xchange.bibox.service; + +import java.io.IOException; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.dto.marketdata.Trades; +import org.knowm.xchange.service.marketdata.MarketDataService; + +/** + *

+ * Implementation of the market data service for Bibox + *

+ *
    + *
  • Provides access to various market data values
  • + *
+ */ +public class BiboxMarketDataService extends BiboxMarketDataServiceRaw implements MarketDataService { + + /** + * Constructor + * + * @param exchange + */ + public BiboxMarketDataService(Exchange exchange) { + + super(exchange); + } + + @Override + public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException { + return BiboxAdapters.adaptTicker(getBiboxTicker(currencyPair), currencyPair); + } + + @Override + public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { + // TODO Auto-generated method stub + return null; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java new file mode 100644 index 000000000..3df450a08 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -0,0 +1,28 @@ +package org.knowm.xchange.bibox.service; + +import static org.knowm.xchange.bibox.dto.BiboxAdapters.toBiboxPair; + +import java.io.IOException; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.BiboxException; +import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.exceptions.ExchangeException; + +public class BiboxMarketDataServiceRaw extends BiboxBaseService { + + private static final String TICKER_CMD = "ticker"; + + protected BiboxMarketDataServiceRaw(Exchange exchange) { + super(exchange); + } + + public BiboxTicker getBiboxTicker(CurrencyPair currencyPair) throws IOException { + try { + return bibox.mdata(TICKER_CMD, toBiboxPair(currencyPair)).getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } + } +} diff --git a/xchange-bibox/src/main/resources/bibox.json b/xchange-bibox/src/main/resources/bibox.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/xchange-bibox/src/main/resources/bibox.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java new file mode 100644 index 000000000..399d8dda1 --- /dev/null +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java @@ -0,0 +1,44 @@ + +package org.knowm.xchange.bibox.dto.marketdata; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; + +import org.junit.Test; +import org.knowm.xchange.bibox.dto.BiboxResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +/** + * Test Marketdata JSON parsing + * + * @author odrotleff + */ +public class BiboxMarketdataUnmarshalTest { + + private static final ObjectMapper MAPPER = new ObjectMapper(); + + @Test + public void testCoinUnmarshal() throws IOException { + + InputStream is = BiboxMarketdataUnmarshalTest.class.getResourceAsStream("/marketdata/example-ticker.json"); + BiboxResponse response = MAPPER.readValue(is, new TypeReference>() {}); + assertThat(response.getCmd()).isEqualTo("ticker"); + + BiboxTicker ticker = response.getResult(); + assertThat(ticker.getBuy()).isEqualTo(new BigDecimal("0.00009284")); + assertThat(ticker.getHigh()).isEqualTo(new BigDecimal("0.00010000")); + assertThat(ticker.getLast()).isEqualTo(new BigDecimal("0.00009293")); + assertThat(ticker.getLow()).isEqualTo(new BigDecimal("0.00008892")); + assertThat(ticker.getSell()).isEqualTo(new BigDecimal("0.00009293")); + assertThat(ticker.getTimestamp()).isEqualTo(1518037192690L); + assertThat(ticker.getVol()).isEqualTo(new BigDecimal("5691444")); + assertThat(ticker.getLastCny()).isEqualTo(new BigDecimal("4.77")); + assertThat(ticker.getLastUsd()).isEqualTo(new BigDecimal("0.76")); + assertThat(ticker.getPercent()).isEqualTo("-3.62%"); + } +} \ No newline at end of file diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java new file mode 100644 index 000000000..76802e524 --- /dev/null +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java @@ -0,0 +1,26 @@ +package org.knowm.xchange.bibox.service.marketdata; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.bibox.BiboxExchange; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.service.marketdata.MarketDataService; + +public class MarketDataServiceIntegration { + + private static final Exchange BIBOX = ExchangeFactory.INSTANCE.createExchange(BiboxExchange.class.getName()); + private static final CurrencyPair BIX_BTC = new CurrencyPair("BIX", "BTC"); + + @Test + public void testGetTicker() throws Exception { + + MarketDataService marketDataService = BIBOX.getMarketDataService(); + Ticker ticker = marketDataService.getTicker(BIX_BTC); + assertThat(ticker.getAsk()).isGreaterThan(ticker.getBid()); + assertThat(ticker.getHigh()).isGreaterThan(ticker.getLow()); + } +} diff --git a/xchange-bibox/src/test/resources/marketdata/example-ticker.json b/xchange-bibox/src/test/resources/marketdata/example-ticker.json new file mode 100644 index 000000000..20aa9c327 --- /dev/null +++ b/xchange-bibox/src/test/resources/marketdata/example-ticker.json @@ -0,0 +1,15 @@ +{ + "result":{ + "buy":"0.00009284", + "high":"0.00010000", + "last":"0.00009293", + "low":"0.00008892", + "sell":"0.00009293", + "timestamp":1518037192690, + "vol":"5691444", + "last_cny":"4.77", + "last_usd":"0.76", + "percent":"-3.62%" + }, + "cmd":"ticker" +} \ No newline at end of file From d970075079939c4c4821cc929f11ccecba90a429 Mon Sep 17 00:00:00 2001 From: Dmitry Fedorenko Date: Thu, 8 Feb 2018 16:19:33 +0300 Subject: [PATCH 010/117] [Binance] + service ticker24h() without pair param Return array with all tickers --- .../org/knowm/xchange/binance/Binance.java | 10 ++++++++++ .../dto/marketdata/BinanceTicker24h.java | 9 ++++++++- .../service/BinanceMarketDataServiceRaw.java | 5 +++++ .../marketdata/BinanceMarketDataDemo.java | 18 ++++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/Binance.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/Binance.java index 3e1bef1d4..cbe80bdab 100644 --- a/xchange-binance/src/main/java/org/knowm/xchange/binance/Binance.java +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/Binance.java @@ -103,6 +103,16 @@ List klines(@QueryParam("symbol") String symbol, @QueryParam("interval , @QueryParam("endTime") Long endTime) throws IOException, BinanceException; + @GET + @Path("api/v1/ticker/24hr") + /** + * 24 hour price change statistics for all symbols. - bee carreful this api call have a big weight, + * only about 4 call per minut can be without ban. + * @return + * @throws IOException + * @throws BinanceException */ + List ticker24h() throws IOException, BinanceException; + @GET @Path("api/v1/ticker/24hr") /** diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/dto/marketdata/BinanceTicker24h.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/dto/marketdata/BinanceTicker24h.java index 40e6be720..847ee2e9f 100644 --- a/xchange-binance/src/main/java/org/knowm/xchange/binance/dto/marketdata/BinanceTicker24h.java +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/dto/marketdata/BinanceTicker24h.java @@ -30,6 +30,7 @@ public final class BinanceTicker24h { private final long firstId; private final long lastId; private final long count; + private final String symbol; // The curency pair that is unfortunately not returned in the response private CurrencyPair pair; @@ -56,7 +57,8 @@ public BinanceTicker24h(@JsonProperty("priceChange") BigDecimal priceChange , @JsonProperty("closeTime") long closeTime , @JsonProperty("firstId") long firstId , @JsonProperty("lastId") long lastId - , @JsonProperty("count") long count) { + , @JsonProperty("count") long count + , @JsonProperty("symbol") String symbol) { this.priceChange = priceChange; this.priceChangePercent = priceChangePercent; this.weightedAvgPrice = weightedAvgPrice; @@ -77,6 +79,11 @@ public BinanceTicker24h(@JsonProperty("priceChange") BigDecimal priceChange this.firstId = firstId; this.lastId = lastId; this.count = count; + this.symbol = symbol; + } + + public String getSymbol() { + return symbol; } public CurrencyPair getCurrencyPair() { diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataServiceRaw.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataServiceRaw.java index 1bce9eba3..826d13fc1 100644 --- a/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataServiceRaw.java +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/service/BinanceMarketDataServiceRaw.java @@ -47,6 +47,11 @@ public List klines(CurrencyPair pair, KlineInterval interval, Inte return raw.stream().map(obj -> new BinanceKline(pair, interval, obj)).collect(Collectors.toList()); } + public List ticker24h() throws IOException { + List binanceTicker24hList = binance.ticker24h(); + return binanceTicker24hList; + } + public BinanceTicker24h ticker24h(CurrencyPair pair) throws IOException { BinanceTicker24h ticker24h = binance.ticker24h(BinanceAdapters.toSymbol(pair)); ticker24h.setCurrencyPair(pair); diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/binance/marketdata/BinanceMarketDataDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/binance/marketdata/BinanceMarketDataDemo.java index 4848dd224..480842f51 100644 --- a/xchange-examples/src/main/java/org/knowm/xchange/examples/binance/marketdata/BinanceMarketDataDemo.java +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/binance/marketdata/BinanceMarketDataDemo.java @@ -26,6 +26,7 @@ public static void main(String[] args) throws IOException { generic(exchange, marketDataService); raw((BinanceExchange) exchange, (BinanceMarketDataService) marketDataService); + rawAll((BinanceExchange) exchange, (BinanceMarketDataService) marketDataService); } public static void generic(Exchange exchange, MarketDataService marketDataService) throws IOException { @@ -53,5 +54,22 @@ public int compare(BinanceTicker24h t1, BinanceTicker24h t2) { }); } + + public static void rawAll(BinanceExchange exchange, BinanceMarketDataService marketDataService) throws IOException { + + List tickers = new ArrayList<>(); + tickers.addAll(marketDataService.ticker24h()); + Collections.sort(tickers, new Comparator() { + @Override + public int compare(BinanceTicker24h t1, BinanceTicker24h t2) { + return t2.getPriceChangePercent().compareTo(t1.getPriceChangePercent()); + } + }); + + tickers.stream().forEach(t -> { + System.out.println(t.getSymbol() + " => " + String.format("%+.2f%%", t.getLastPrice())); + }); + + } } From f62f7c3674e9613e7de7059b47bc8374e8d258f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Reiter?= Date: Thu, 8 Feb 2018 14:45:12 +0100 Subject: [PATCH 011/117] refactored and removed the nullSafeUnixTime method --- .../org/knowm/xchange/dsx/service/DSXAccountService.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java b/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java index e8a564653..6feb6f732 100644 --- a/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java +++ b/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/DSXAccountService.java @@ -94,8 +94,8 @@ public List getFundingHistory(TradeHistoryParams params) throws E if (params instanceof TradeHistoryParamsTimeSpan) { TradeHistoryParamsTimeSpan timeSpan = (TradeHistoryParamsTimeSpan) params; - since = nullSafeUnixTime(timeSpan.getStartTime()); - end = nullSafeUnixTime(timeSpan.getEndTime()); + since = timeSpan.getStartTime() != null ? timeSpan.getStartTime().getTime(): null; + end = timeSpan.getEndTime() != null ? timeSpan.getEndTime().getTime(): null; } if (params instanceof TradeHistoryParamsIdSpan) { TradeHistoryParamsIdSpan idSpan = (TradeHistoryParamsIdSpan) params; @@ -151,10 +151,6 @@ private FundingRecord.Type convert(DSXTransHistoryResult.Type type) { } } - private static Long nullSafeUnixTime(Date time) { - return time != null ? time.getTime(): null; - } - private static Long nullSafeToLong(String str) { try { return (str == null || str.isEmpty()) ? null : Long.valueOf(str); From 279e5753be8eb832feeb8b9765f162e36afa3bcd Mon Sep 17 00:00:00 2001 From: Artur Date: Fri, 9 Feb 2018 00:46:01 +0530 Subject: [PATCH 012/117] [Cexio] Add cancel all orders --- .../xchange/cexio/CexIOAuthenticated.java | 29 +++++++---- .../trade/CexIOCancelAllOrdersResponse.java | 52 +++++++++++++++++++ .../cexio/service/CexIOTradeServiceRaw.java | 12 ++++- 3 files changed, 80 insertions(+), 13 deletions(-) create mode 100644 xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/trade/CexIOCancelAllOrdersResponse.java diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java index 5a425e4ff..5d426826d 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java @@ -1,5 +1,17 @@ package org.knowm.xchange.cexio; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import javax.ws.rs.Consumes; +import javax.ws.rs.HeaderParam; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + import org.knowm.xchange.cexio.dto.ArchivedOrdersRequest; import org.knowm.xchange.cexio.dto.CexIORequest; import org.knowm.xchange.cexio.dto.CexioSingleIdRequest; @@ -9,21 +21,12 @@ import org.knowm.xchange.cexio.dto.account.GHashIOHashrate; import org.knowm.xchange.cexio.dto.account.GHashIOWorkers; import org.knowm.xchange.cexio.dto.trade.CexIOArchivedOrder; +import org.knowm.xchange.cexio.dto.trade.CexIOCancelAllOrdersResponse; import org.knowm.xchange.cexio.dto.trade.CexIOOpenOrder; import org.knowm.xchange.cexio.dto.trade.CexIOOpenOrders; import org.knowm.xchange.cexio.dto.trade.CexIOOrder; -import si.mazi.rescu.ParamsDigest; -import javax.ws.rs.Consumes; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import java.io.IOException; -import java.util.List; -import java.util.Map; +import si.mazi.rescu.ParamsDigest; @Path("api") @Produces(MediaType.APPLICATION_JSON) @@ -42,6 +45,10 @@ public interface CexIOAuthenticated extends CexIO { @Path("cancel_order/") Object cancelOrder(@HeaderParam("signature") ParamsDigest signer, CexioSingleOrderIdRequest request) throws IOException; + @POST + @Path("cancel_orders/{currencyA}/{currencyB}/") + CexIOCancelAllOrdersResponse cancelAllOrders(@HeaderParam("signature") ParamsDigest signer, @PathParam("currencyA") String currencyA, @PathParam("currencyB") String currencyB, CexIORequest request) throws IOException; + @POST @Path("place_order/{currencyA}/{currencyB}/") CexIOOrder placeOrder(@HeaderParam("signature") ParamsDigest signer, @PathParam("currencyA") String currencyA, @PathParam("currencyB") String currencyB, PlaceOrderRequest placeOrderRequest) throws IOException; diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/trade/CexIOCancelAllOrdersResponse.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/trade/CexIOCancelAllOrdersResponse.java new file mode 100644 index 000000000..bb4f7cc81 --- /dev/null +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/trade/CexIOCancelAllOrdersResponse.java @@ -0,0 +1,52 @@ +package org.knowm.xchange.cexio.dto.trade; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class CexIOCancelAllOrdersResponse { + + @JsonProperty("e") + private String eventName; + + @JsonProperty("ok") + private String status; + + @JsonProperty("data") + private List canceledOrderIds; + + public String getEventName() { + return eventName; + } + + public void setEventName(String eventName) { + this.eventName = eventName; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public List getCanceledOrderIds() { + return canceledOrderIds; + } + + public void setCanceledOrderIds(List canceledOrderIds) { + this.canceledOrderIds = canceledOrderIds; + } + + @Override + public String toString() { + return "CexIOCancelAllOrdersResponse{" + + "eventName='" + eventName + '\'' + + ", status='" + status + '\'' + + ", canceledOrderIds=" + canceledOrderIds + + '}'; + } +} diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeServiceRaw.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeServiceRaw.java index 0d0791724..137b3c110 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeServiceRaw.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOTradeServiceRaw.java @@ -16,6 +16,7 @@ import org.knowm.xchange.cexio.dto.CexioSingleOrderIdRequest; import org.knowm.xchange.cexio.dto.PlaceOrderRequest; import org.knowm.xchange.cexio.dto.trade.CexIOArchivedOrder; +import org.knowm.xchange.cexio.dto.trade.CexIOCancelAllOrdersResponse; import org.knowm.xchange.cexio.dto.trade.CexIOOpenOrder; import org.knowm.xchange.cexio.dto.trade.CexIOOpenOrders; import org.knowm.xchange.cexio.dto.trade.CexIOOrder; @@ -28,8 +29,6 @@ import org.knowm.xchange.service.trade.params.TradeHistoryParams; import org.knowm.xchange.service.trade.params.TradeHistoryParamsTimeSpan; -import si.mazi.rescu.HttpStatusIOException; - public class CexIOTradeServiceRaw extends CexIOBaseService { public CexIOTradeServiceRaw(Exchange exchange) { @@ -92,6 +91,15 @@ public boolean cancelCexIOOrder(String orderId) throws IOException { .equals(true); } + public CexIOCancelAllOrdersResponse cancelCexIOOrders(CurrencyPair currencyPair) throws IOException { + return cexIOAuthenticated + .cancelAllOrders( + signatureCreator, + currencyPair.base.getCurrencyCode(), + currencyPair.counter.getCurrencyCode(), + new CexIORequest()); + } + public List archivedOrders(TradeHistoryParams tradeHistoryParams) throws IOException { String baseCcy = null; String counterCcy = null; From f0b34371dfd5f79d469253f9f4215240f065acb0 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Thu, 8 Feb 2018 22:28:59 +0100 Subject: [PATCH 013/117] [Bibox] implement authenticated call getAccountInfo() The construction of the form parameter "cmds" is a bit of a pain. Its a JSON encoded object (this happens in BiboxCommands.json()) that can contain multiple API calls (commands) in one request (this might be handy later). The possible responses are handled in BiboxResponse (simple GET request, only one possible call), BiboxSingleResponse (POST request with only one command), BiboxMultipleResponses (POST request with multiple commands). --- .../xchange/bibox/BiboxAuthenticated.java | 25 ++ .../knowm/xchange/bibox/BiboxExchange.java | 3 +- .../xchange/bibox/dto/BiboxAdapters.java | 42 ++- .../knowm/xchange/bibox/dto/BiboxCommand.java | 21 ++ .../xchange/bibox/dto/BiboxCommands.java | 37 ++ .../xchange/bibox/dto/BiboxEmptyBody.java | 11 + .../bibox/dto/BiboxMultipleResponses.java | 27 ++ .../bibox/dto/BiboxSingleResponse.java | 27 ++ .../xchange/bibox/dto/account/BiboxCoin.java | 356 ++++++++++++++++++ .../bibox/service/BiboxAccountService.java | 60 +++ .../bibox/service/BiboxAccountServiceRaw.java | 28 ++ .../xchange/bibox/service/BiboxDigest.java | 41 ++ .../knowm/xchange/bibox/BiboxTestUtils.java | 22 ++ .../account/BiboxAccountUnmarshalTest.java | 41 ++ .../BiboxMarketdataUnmarshalTest.java | 15 +- .../resources/account/example-coin-list.json | 57 +++ 16 files changed, 794 insertions(+), 19 deletions(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxEmptyBody.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxCoin.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxDigest.java create mode 100644 xchange-bibox/src/test/java/org/knowm/xchange/bibox/BiboxTestUtils.java create mode 100644 xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/account/BiboxAccountUnmarshalTest.java create mode 100644 xchange-bibox/src/test/resources/account/example-coin-list.json diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index fd85743e3..44bbabb1b 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -1,10 +1,35 @@ package org.knowm.xchange.bibox; +import java.util.List; + +import javax.ws.rs.Consumes; +import javax.ws.rs.FormParam; +import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import org.knowm.xchange.bibox.dto.BiboxSingleResponse; +import org.knowm.xchange.bibox.dto.account.BiboxCoin; + +import si.mazi.rescu.ParamsDigest; + +/** + * @author odrotleff + */ @Path("v1") +@Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public interface BiboxAuthenticated extends Bibox { + + static final String FORM_CMDS = "cmds"; + static final String FORM_APIKEY = "apikey"; + static final String FORM_SIGNATURE = "sign"; + + @POST + @Path("transfer") + BiboxSingleResponse> coinList( + @FormParam(FORM_CMDS) String cmds, + @FormParam(FORM_APIKEY) String apiKey, + @FormParam(FORM_SIGNATURE) ParamsDigest signature); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java index 3c230b1a7..53daf7926 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java @@ -3,6 +3,7 @@ import org.knowm.xchange.BaseExchange; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.bibox.service.BiboxAccountService; import org.knowm.xchange.bibox.service.BiboxMarketDataService; import org.knowm.xchange.utils.nonce.CurrentTimeNonceFactory; @@ -16,7 +17,7 @@ public class BiboxExchange extends BaseExchange implements Exchange { protected void initServices() { this.marketDataService = new BiboxMarketDataService(this); - // this.accountService = new BiboxAccountService(this); + this.accountService = new BiboxAccountService(this); // this.tradeService = new BiboxTradeService(this); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index 6c6e78487..a63e2362b 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -1,11 +1,21 @@ package org.knowm.xchange.bibox.dto; import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; +import org.knowm.xchange.bibox.dto.account.BiboxCoin; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.currency.Currency; import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.account.AccountInfo; +import org.knowm.xchange.dto.account.Balance; +import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.dto.marketdata.Ticker; +/** + * @author odrotleff + */ public class BiboxAdapters { public static String toBiboxPair(CurrencyPair pair) { @@ -14,15 +24,29 @@ public static String toBiboxPair(CurrencyPair pair) { } public static Ticker adaptTicker(BiboxTicker ticker, CurrencyPair currencyPair) { - return new Ticker.Builder() - .currencyPair(currencyPair) - .ask(ticker.getSell()) - .bid(ticker.getBuy()) - .high(ticker.getHigh()) - .low(ticker.getLow()) - .last(ticker.getLast()) - .volume(ticker.getVol()) - .timestamp(new Date(ticker.getTimestamp())) + return new Ticker.Builder().currencyPair(currencyPair).ask(ticker.getSell()) + .bid(ticker.getBuy()).high(ticker.getHigh()).low(ticker.getLow()).last(ticker.getLast()) + .volume(ticker.getVol()).timestamp(new Date(ticker.getTimestamp())).build(); + } + + public static AccountInfo adaptAccountInfo(List coins) { + Wallet wallet = adaptWallet(coins); + System.out.println(wallet); + return new AccountInfo(wallet); + } + + private static Wallet adaptWallet(List coins) { + List balances = + coins.stream().map(BiboxAdapters::adaptBalance).collect(Collectors.toList()); + return new Wallet(balances); + } + + private static Balance adaptBalance(BiboxCoin coin) { + return new Balance.Builder() + .currency(Currency.getInstance(coin.getSymbol())) + .available(coin.getBalance()) + .frozen(coin.getFreeze()) + .total(coin.getTotalBalance()) .build(); } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java new file mode 100644 index 000000000..da20fd508 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java @@ -0,0 +1,21 @@ +package org.knowm.xchange.bibox.dto; + +public class BiboxCommand { + + private String cmd; + private B body; + + public BiboxCommand(String cmd, B body) { + super(); + this.cmd = cmd; + this.body = body; + } + + public String getCmd() { + return cmd; + } + + public B getBody() { + return body; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java new file mode 100644 index 000000000..727710ab0 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java @@ -0,0 +1,37 @@ +package org.knowm.xchange.bibox.dto; + +import java.util.ArrayList; +import java.util.Arrays; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +public class BiboxCommands extends ArrayList> { + + private static final ObjectMapper MAPPER = + new ObjectMapper().configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + + public static final BiboxCommands COIN_LIST_CMD = + BiboxCommands.of(new BiboxCommand("transfer/coinList", new BiboxEmptyBody())); + + private static final long serialVersionUID = 1L; + + private BiboxCommands() { + super(); + } + + public static BiboxCommands of(BiboxCommand... commands) { + BiboxCommands cmds = new BiboxCommands(); + cmds.addAll(Arrays.asList(commands)); + return cmds; + } + + public String json() { + try { + return MAPPER.writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxEmptyBody.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxEmptyBody.java new file mode 100644 index 000000000..8b378498a --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxEmptyBody.java @@ -0,0 +1,11 @@ +package org.knowm.xchange.bibox.dto; + +/** + * Just an object that will be JSON serialized to {} + * Often needed when there are no parameters for a command + * + * @author odrotleff + */ +public class BiboxEmptyBody { + public BiboxEmptyBody() {} +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java new file mode 100644 index 000000000..b2aa8e22c --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java @@ -0,0 +1,27 @@ +package org.knowm.xchange.bibox.dto; + +import java.util.List; + +/** + * Result of batched calls (all POST requests) + * + * @author odrotleff + */ +public class BiboxMultipleResponses { + + private List> result; + + public BiboxResponse getFirst() { + return result.get(0); + } + + public BiboxMultipleResponses() {} + + public List> getResult() { + return result; + } + + public void setResult(List> result) { + this.result = result; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java new file mode 100644 index 000000000..00eafdca6 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java @@ -0,0 +1,27 @@ +package org.knowm.xchange.bibox.dto; + +import java.util.List; + +/** + * Result of batched calls with just one call (which happens most of the time) + * + * @author odrotleff + */ +public class BiboxSingleResponse { + + private List> result; + + public BiboxResponse get() { + return result.get(0); + } + + public BiboxSingleResponse() {} + + public List> getResult() { + return result; + } + + public void setResult(List> result) { + this.result = result; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxCoin.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxCoin.java new file mode 100644 index 000000000..e6c9f810d --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxCoin.java @@ -0,0 +1,356 @@ +package org.knowm.xchange.bibox.dto.account; + +import java.math.BigDecimal; +import java.net.URI; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "totalBalance", + "balance", + "freeze", + "id", + "symbol", + "icon_url", + "describe_url", + "name", + "enable_withdraw", + "enable_deposit", + "confirm_count", + "BTCValue", + "CNYValue", + "USDValue" +}) +public class BiboxCoin { + + @JsonProperty("totalBalance") + private BigDecimal totalBalance; + @JsonProperty("balance") + private BigDecimal balance; + @JsonProperty("freeze") + private BigDecimal freeze; + @JsonProperty("id") + private Integer id; + @JsonProperty("symbol") + private String symbol; + @JsonProperty("icon_url") + private URI iconUrl; + @JsonProperty("describe_url") + private String describeUrl; + @JsonProperty("name") + private String name; + @JsonProperty("enable_withdraw") + private boolean enableWithdraw; + @JsonProperty("enable_deposit") + private boolean enableDeposit; + @JsonProperty("confirm_count") + private Integer confirmCount; + @JsonProperty("BTCValue") + private BigDecimal btcValue; + @JsonProperty("CNYValue") + private BigDecimal cnyValue; + @JsonProperty("USDValue") + private BigDecimal usdValue; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * + * @return + * The totalBalance + */ + @JsonProperty("totalBalance") + public BigDecimal getTotalBalance() { + return totalBalance; + } + + /** + * + * @param totalBalance + * The totalBalance + */ + @JsonProperty("totalBalance") + public void setTotalBalance(BigDecimal totalBalance) { + this.totalBalance = totalBalance; + } + + /** + * + * @return + * The balance + */ + @JsonProperty("balance") + public BigDecimal getBalance() { + return balance; + } + + /** + * + * @param balance + * The balance + */ + @JsonProperty("balance") + public void setBalance(BigDecimal balance) { + this.balance = balance; + } + + /** + * + * @return + * The freeze + */ + @JsonProperty("freeze") + public BigDecimal getFreeze() { + return freeze; + } + + /** + * + * @param freeze + * The freeze + */ + @JsonProperty("freeze") + public void setFreeze(BigDecimal freeze) { + this.freeze = freeze; + } + + /** + * + * @return + * The id + */ + @JsonProperty("id") + public Integer getId() { + return id; + } + + /** + * + * @param id + * The id + */ + @JsonProperty("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * + * @return + * The symbol + */ + @JsonProperty("symbol") + public String getSymbol() { + return symbol; + } + + /** + * + * @param symbol + * The symbol + */ + @JsonProperty("symbol") + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + /** + * + * @return + * The iconUrl + */ + @JsonProperty("icon_url") + public URI getIconUrl() { + return iconUrl; + } + + /** + * + * @param iconUrl + * The icon_url + */ + @JsonProperty("icon_url") + public void setIconUrl(URI iconUrl) { + this.iconUrl = iconUrl; + } + + /** + * + * @return + * The describeUrl + */ + @JsonProperty("describe_url") + public String getDescribeUrl() { + return describeUrl; + } + + /** + * + * @param describeUrl + * The describe_url + */ + @JsonProperty("describe_url") + public void setDescribeUrl(String describeUrl) { + this.describeUrl = describeUrl; + } + + /** + * + * @return + * The name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * + * @param name + * The name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * + * @return + * The enableWithdraw + */ + @JsonProperty("enable_withdraw") + public boolean getEnableWithdraw() { + return enableWithdraw; + } + + /** + * + * @param enableWithdraw + * The enable_withdraw + */ + @JsonProperty("enable_withdraw") + public void setEnableWithdraw(boolean enableWithdraw) { + this.enableWithdraw = enableWithdraw; + } + + /** + * + * @return + * The enableDeposit + */ + @JsonProperty("enable_deposit") + public boolean getEnableDeposit() { + return enableDeposit; + } + + /** + * + * @param enableDeposit + * The enable_deposit + */ + @JsonProperty("enable_deposit") + public void setEnableDeposit(boolean enableDeposit) { + this.enableDeposit = enableDeposit; + } + + /** + * + * @return + * The confirmCount + */ + @JsonProperty("confirm_count") + public Integer getConfirmCount() { + return confirmCount; + } + + /** + * + * @param confirmCount + * The confirm_count + */ + @JsonProperty("confirm_count") + public void setConfirmCount(Integer confirmCount) { + this.confirmCount = confirmCount; + } + + /** + * + * @return + * The btcValue + */ + @JsonProperty("BTCValue") + public BigDecimal getBtcValue() { + return btcValue; + } + + /** + * + * @param btcValue + * The BTCValue + */ + @JsonProperty("BTCValue") + public void setBtcValue(BigDecimal bTCValue) { + this.btcValue = bTCValue; + } + + /** + * + * @return + * The cnyValue + */ + @JsonProperty("CNYValue") + public BigDecimal getCnyValue() { + return cnyValue; + } + + /** + * + * @param cnyValue + * The CNYValue + */ + @JsonProperty("CNYValue") + public void setCnyValue(BigDecimal cNYValue) { + this.cnyValue = cNYValue; + } + + /** + * + * @return + * The usdValue + */ + @JsonProperty("USDValue") + public BigDecimal getUsdValue() { + return usdValue; + } + + /** + * + * @param usdValue + * The USDValue + */ + @JsonProperty("USDValue") + public void setUsdValue(BigDecimal usdValue) { + this.usdValue = usdValue; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java new file mode 100644 index 000000000..297082c6d --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java @@ -0,0 +1,60 @@ +package org.knowm.xchange.bibox.service; + +import java.io.IOException; +import java.math.BigDecimal; +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.currency.Currency; +import org.knowm.xchange.dto.account.AccountInfo; +import org.knowm.xchange.dto.account.FundingRecord; +import org.knowm.xchange.service.account.AccountService; +import org.knowm.xchange.service.trade.params.TradeHistoryParams; +import org.knowm.xchange.service.trade.params.WithdrawFundsParams; + +/** + * @author odrotleff + */ +public class BiboxAccountService extends BiboxAccountServiceRaw implements AccountService { + + public BiboxAccountService(Exchange exchange) { + super(exchange); + } + + @Override + public AccountInfo getAccountInfo() throws IOException { + // TODO could be improved with a batched call to get other infos + return BiboxAdapters.adaptAccountInfo(getBiboxAccountInfo()); + } + + @Override + public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String withdrawFunds(WithdrawFundsParams params) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String requestDepositAddress(Currency currency, String... args) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TradeHistoryParams createFundingHistoryParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List getFundingHistory(TradeHistoryParams params) throws IOException { + // TODO Auto-generated method stub + return null; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java new file mode 100644 index 000000000..20a02ee44 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java @@ -0,0 +1,28 @@ +package org.knowm.xchange.bibox.service; + +import static org.knowm.xchange.bibox.dto.BiboxCommands.COIN_LIST_CMD; + +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.BiboxException; +import org.knowm.xchange.bibox.dto.account.BiboxCoin; +import org.knowm.xchange.exceptions.ExchangeException; + +/** + * @author odrotleff + */ +public class BiboxAccountServiceRaw extends BiboxBaseService { + + protected BiboxAccountServiceRaw(Exchange exchange) { + super(exchange); + } + + public List getBiboxAccountInfo() { + try { + return bibox.coinList(COIN_LIST_CMD.json(), apiKey, signatureCreator).get().getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxDigest.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxDigest.java new file mode 100644 index 000000000..23443e768 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxDigest.java @@ -0,0 +1,41 @@ +package org.knowm.xchange.bibox.service; + +import java.io.UnsupportedEncodingException; + +import javax.ws.rs.FormParam; + +import org.apache.commons.codec.binary.Hex; +import org.knowm.xchange.bibox.BiboxAuthenticated; +import org.knowm.xchange.service.BaseParamsDigest; + +import si.mazi.rescu.RestInvocation; + +public class BiboxDigest extends BaseParamsDigest { + + /** + * Constructor + * + * @param secretKey + * @throws IllegalArgumentException if key is invalid (cannot be base-64-decoded or the decoded key is invalid). + */ + private BiboxDigest(String secretKey) { + + super(secretKey, HMAC_MD5); + } + + public static BiboxDigest createInstance(String secretKey) { + + return secretKey == null ? null : new BiboxDigest(secretKey); + } + + @Override + public String digestParams(RestInvocation restInvocation) { + + String cmds = (String) restInvocation.getParamValue(FormParam.class, BiboxAuthenticated.FORM_CMDS); + try { + return new String(Hex.encodeHex(getMac().doFinal(cmds.getBytes("UTF-8")))); + } catch (IllegalStateException | UnsupportedEncodingException e1) { + throw new RuntimeException(e1.getMessage()); + } + } +} diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/BiboxTestUtils.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/BiboxTestUtils.java new file mode 100644 index 000000000..dbbf9c821 --- /dev/null +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/BiboxTestUtils.java @@ -0,0 +1,22 @@ +package org.knowm.xchange.bibox; + + +import java.io.IOException; +import java.io.InputStream; + +import org.knowm.xchange.bibox.dto.account.BiboxAccountUnmarshalTest; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class BiboxTestUtils { + + private static final ObjectMapper MAPPER = new ObjectMapper(); + + public static R getResponse(TypeReference ref, String resourcePath) throws JsonParseException, JsonMappingException, IOException { + InputStream is = BiboxAccountUnmarshalTest.class.getResourceAsStream(resourcePath); + return MAPPER.readValue(is, ref); + } +} diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/account/BiboxAccountUnmarshalTest.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/account/BiboxAccountUnmarshalTest.java new file mode 100644 index 000000000..7e86fa291 --- /dev/null +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/account/BiboxAccountUnmarshalTest.java @@ -0,0 +1,41 @@ + +package org.knowm.xchange.bibox.dto.account; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import java.math.BigDecimal; +import java.util.List; + +import org.junit.Test; +import org.knowm.xchange.bibox.BiboxTestUtils; +import org.knowm.xchange.bibox.dto.BiboxSingleResponse; + +import com.fasterxml.jackson.core.type.TypeReference; + +/** + * Test Account JSON parsing + * + * @author odrotleff + */ +public class BiboxAccountUnmarshalTest { + + @Test + public void testTickerUnmarshal() throws IOException { + + BiboxSingleResponse> response = + BiboxTestUtils.getResponse(new TypeReference>>() {}, + "/account/example-coin-list.json"); + assertThat(response.get().getCmd()).isEqualTo("transfer/coinList"); + + List coinList = response.get().getResult(); + assertThat(coinList).hasSize(3); + + BiboxCoin etc = coinList.get(2); + assertThat(etc.getSymbol()).isEqualTo("ETC"); + assertThat(etc.getId()).isEqualTo(45); + assertThat(etc.getTotalBalance()).isEqualTo(new BigDecimal("0.40652300")); + assertThat(etc.getBalance()).isEqualTo(new BigDecimal("0.40652300")); + assertThat(etc.getFreeze()).isEqualTo(new BigDecimal("0.00000000")); + } +} diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java index 399d8dda1..3c930e185 100644 --- a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java @@ -4,14 +4,13 @@ import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; -import java.io.InputStream; import java.math.BigDecimal; import org.junit.Test; +import org.knowm.xchange.bibox.BiboxTestUtils; import org.knowm.xchange.bibox.dto.BiboxResponse; import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; /** * Test Marketdata JSON parsing @@ -20,15 +19,13 @@ */ public class BiboxMarketdataUnmarshalTest { - private static final ObjectMapper MAPPER = new ObjectMapper(); - @Test - public void testCoinUnmarshal() throws IOException { + public void testTickerUnmarshal() throws IOException { - InputStream is = BiboxMarketdataUnmarshalTest.class.getResourceAsStream("/marketdata/example-ticker.json"); - BiboxResponse response = MAPPER.readValue(is, new TypeReference>() {}); + BiboxResponse response = BiboxTestUtils.getResponse( + new TypeReference>() {}, "/marketdata/example-ticker.json"); assertThat(response.getCmd()).isEqualTo("ticker"); - + BiboxTicker ticker = response.getResult(); assertThat(ticker.getBuy()).isEqualTo(new BigDecimal("0.00009284")); assertThat(ticker.getHigh()).isEqualTo(new BigDecimal("0.00010000")); @@ -41,4 +38,4 @@ public void testCoinUnmarshal() throws IOException { assertThat(ticker.getLastUsd()).isEqualTo(new BigDecimal("0.76")); assertThat(ticker.getPercent()).isEqualTo("-3.62%"); } -} \ No newline at end of file +} diff --git a/xchange-bibox/src/test/resources/account/example-coin-list.json b/xchange-bibox/src/test/resources/account/example-coin-list.json new file mode 100644 index 000000000..04922630f --- /dev/null +++ b/xchange-bibox/src/test/resources/account/example-coin-list.json @@ -0,0 +1,57 @@ +{ + "result":[ + { + "result":[ + { + "totalBalance":"0.00000000", + "balance":"0.00000000", + "freeze":"0.00000000", + "id":42, + "symbol":"BTC", + "icon_url":"https://res.linkcoin.pro/coinicon/BTC.png", + "describe_url":null, + "name":"Bitcoin", + "enable_withdraw":1, + "enable_deposit":1, + "confirm_count":3, + "BTCValue":"0.00000000", + "CNYValue":"0.00000000", + "USDValue":"0.00000000" + }, + { + "totalBalance":"0.00000000", + "balance":"0.00000000", + "freeze":"0.00000000", + "id":43, + "symbol":"BIX", + "icon_url":"https://res.linkcoin.pro/coinicon/BIX.png", + "describe_url":null, + "name":"BIX Token", + "enable_withdraw":1, + "enable_deposit":1, + "confirm_count":12, + "BTCValue":"0.00000000", + "CNYValue":"0.00000000", + "USDValue":"0.00000000" + }, + { + "totalBalance":"0.40652300", + "balance":"0.40652300", + "freeze":"0.00000000", + "id":45, + "symbol":"ETC", + "icon_url":"https://res.linkcoin.pro/coinicon/ETC.png", + "describe_url":null, + "name":"EthereumClassic", + "enable_withdraw":1, + "enable_deposit":1, + "confirm_count":20, + "BTCValue":"0.00096413", + "CNYValue":"50.76382292", + "USDValue":"8.09023442" + } + ], + "cmd":"transfer/coinList" + } + ] +} \ No newline at end of file From 268b6817fb1f62c3bebb5572054de8f5a52a0447 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Thu, 8 Feb 2018 16:15:14 -0600 Subject: [PATCH 014/117] [bitmex] implement getOpenOrders --- .../xchange/bitmex/service/BitmexTradeService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 9969e7cea..9e0968570 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -54,7 +54,15 @@ public OpenOrders getOpenOrders() throws IOException { @Override public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); + List limitOrders = new ArrayList<>(); + + for (LimitOrder order : getOpenOrders().getOpenOrders()) { + if (params.accept(order)) { + limitOrders.add(order); + } + } + + return new OpenOrders(limitOrders); } @Override From fe3ee1d6a03a55feaefcd78de9fbe0ab5c332962 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Thu, 8 Feb 2018 23:39:15 +0100 Subject: [PATCH 015/117] [Bibox] implement TradeService.placeLimitOrder() call --- .../xchange/bibox/BiboxAuthenticated.java | 19 +++- .../knowm/xchange/bibox/BiboxExchange.java | 3 +- .../knowm/xchange/bibox/dto/BiboxCommand.java | 5 + .../xchange/bibox/dto/BiboxCommands.java | 3 + .../bibox/dto/trade/BiboxAccountType.java | 19 ++++ .../bibox/dto/trade/BiboxOrderSide.java | 33 ++++++ .../bibox/dto/trade/BiboxOrderType.java | 19 ++++ .../bibox/dto/trade/BiboxTradeCommand.java | 17 +++ .../dto/trade/BiboxTradeCommandBody.java | 76 +++++++++++++ .../bibox/service/BiboxTradeService.java | 103 ++++++++++++++++++ .../bibox/service/BiboxTradeServiceRaw.java | 33 ++++++ 11 files changed, 328 insertions(+), 2 deletions(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommand.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommandBody.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index 44bbabb1b..674566e55 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -26,10 +26,27 @@ public interface BiboxAuthenticated extends Bibox { static final String FORM_APIKEY = "apikey"; static final String FORM_SIGNATURE = "sign"; + /** + * Retrieve balances of the account + * + * @return list of coins + */ @POST @Path("transfer") BiboxSingleResponse> coinList( @FormParam(FORM_CMDS) String cmds, @FormParam(FORM_APIKEY) String apiKey, - @FormParam(FORM_SIGNATURE) ParamsDigest signature); + @FormParam(FORM_SIGNATURE) ParamsDigest signature); + + /** + * Create an order (market/limit) + * + * @return order id + */ + @POST + @Path("orderpending") + BiboxSingleResponse trade( + @FormParam(FORM_CMDS) String cmds, + @FormParam(FORM_APIKEY) String apiKey, + @FormParam(FORM_SIGNATURE) ParamsDigest signature); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java index 53daf7926..43cc7bbdf 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java @@ -5,6 +5,7 @@ import org.knowm.xchange.ExchangeSpecification; import org.knowm.xchange.bibox.service.BiboxAccountService; import org.knowm.xchange.bibox.service.BiboxMarketDataService; +import org.knowm.xchange.bibox.service.BiboxTradeService; import org.knowm.xchange.utils.nonce.CurrentTimeNonceFactory; import si.mazi.rescu.SynchronizedValueFactory; @@ -18,7 +19,7 @@ protected void initServices() { this.marketDataService = new BiboxMarketDataService(this); this.accountService = new BiboxAccountService(this); - // this.tradeService = new BiboxTradeService(this); + this.tradeService = new BiboxTradeService(this); } @Override diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java index da20fd508..dae64289e 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommand.java @@ -1,5 +1,10 @@ package org.knowm.xchange.bibox.dto; +/** + * @param type of body parameter + * + * @author odrotleff + */ public class BiboxCommand { private String cmd; diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java index 727710ab0..14d1e81ff 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java @@ -7,6 +7,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +/** + * @author odrotleff + */ public class BiboxCommands extends ArrayList> { private static final ObjectMapper MAPPER = diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java new file mode 100644 index 000000000..354c185ee --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java @@ -0,0 +1,19 @@ +package org.knowm.xchange.bibox.dto.trade; + +/** + * @author odrotleff + */ +public enum BiboxAccountType { + REGULAR(0), + MARGIN(1); + + private int accountType; + + private BiboxAccountType(int accountType) { + this.accountType = accountType; + } + + public int asInt() { + return accountType; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java new file mode 100644 index 000000000..2aa6dbc23 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java @@ -0,0 +1,33 @@ +package org.knowm.xchange.bibox.dto.trade; + +import org.knowm.xchange.dto.Order.OrderType; +import org.knowm.xchange.exceptions.ExchangeException; + +/** + * @author odrotleff + */ +public enum BiboxOrderSide { + BID(1), + ASK(2); + + private int orderSide; + + private BiboxOrderSide(int orderSide) { + this.orderSide = orderSide; + } + + public int asInt() { + return orderSide; + } + + public static BiboxOrderSide fromOrderType(OrderType orderType) { + switch (orderType) { + case BID: + return BiboxOrderSide.BID; + case ASK: + return BiboxOrderSide.ASK; + default: + throw new ExchangeException("Order type " + orderType + " unsupported."); + } + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java new file mode 100644 index 000000000..ad36db4d1 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java @@ -0,0 +1,19 @@ +package org.knowm.xchange.bibox.dto.trade; + +/** + * @author odrotleff + */ +public enum BiboxOrderType { + MARKET_ORDER(1), + LIMIT_ORDER(2); + + private int orderType; + + private BiboxOrderType(int orderType) { + this.orderType = orderType; + } + + public int asInt() { + return orderType; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommand.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommand.java new file mode 100644 index 000000000..56880c3e3 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommand.java @@ -0,0 +1,17 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.math.BigDecimal; + +import org.knowm.xchange.bibox.dto.BiboxCommand; + +/** + * @author odrotleff + */ +public class BiboxTradeCommand extends BiboxCommand { + + public BiboxTradeCommand(String pair, int accountType, int orderType, int orderSide, boolean payBix, BigDecimal price, BigDecimal amount, + BigDecimal money) { + super("orderpending/trade", + new BiboxTradeCommandBody(pair, accountType, orderType, orderSide, payBix, price, amount, money)); + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommandBody.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommandBody.java new file mode 100644 index 000000000..c18773fb0 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeCommandBody.java @@ -0,0 +1,76 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class BiboxTradeCommandBody { + + private String pair; + + @JsonProperty("account_type") + private int accountType; + + @JsonProperty("order_type") + private int orderType; + + @JsonProperty("order_side") + private int orderSide; + + @JsonProperty("pay_bix") + private boolean payBix; + + private BigDecimal price; + + private BigDecimal amount; + + /** + * what? + */ + private BigDecimal money; + + public BiboxTradeCommandBody(String pair, int accountType, int orderType, int orderSide, boolean payBix, BigDecimal price, BigDecimal amount, + BigDecimal money) { + super(); + this.pair = pair; + this.accountType = accountType; + this.orderType = orderType; + this.orderSide = orderSide; + this.payBix = payBix; + this.price = price; + this.amount = amount; + this.money = money; + } + + public String getPair() { + return pair; + } + + public int getAccountType() { + return accountType; + } + + public int getOrderType() { + return orderType; + } + + public int getOrderSide() { + return orderSide; + } + + public boolean isPayBix() { + return payBix; + } + + public BigDecimal getPrice() { + return price; + } + + public BigDecimal getAmount() { + return amount; + } + + public BigDecimal getMoney() { + return money; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java new file mode 100644 index 000000000..79e7d02c5 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -0,0 +1,103 @@ +package org.knowm.xchange.bibox.service; + +import java.io.IOException; +import java.util.Collection; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.dto.Order; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.MarketOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.StopOrder; +import org.knowm.xchange.dto.trade.UserTrades; +import org.knowm.xchange.service.trade.TradeService; +import org.knowm.xchange.service.trade.params.CancelOrderParams; +import org.knowm.xchange.service.trade.params.TradeHistoryParams; +import org.knowm.xchange.service.trade.params.orders.OpenOrdersParams; + +/** + * @author odrotleff + */ +public class BiboxTradeService extends BiboxTradeServiceRaw implements TradeService { + + public BiboxTradeService(Exchange exchange) { + super(exchange); + } + + @Override + public OpenOrders getOpenOrders() throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String placeMarketOrder(MarketOrder marketOrder) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String placeLimitOrder(LimitOrder limitOrder) throws IOException { + return placeBiboxLimitOrder(limitOrder).toString(); + } + + @Override + public boolean cancelOrder(String orderId) throws IOException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { + // TODO Auto-generated method stub + return false; + } + + @Override + public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TradeHistoryParams createTradeHistoryParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public OpenOrdersParams createOpenOrdersParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void verifyOrder(MarketOrder marketOrder) { + // TODO Auto-generated method stub + + } + + @Override + public Collection getOrder(String... orderIds) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String placeStopOrder(StopOrder arg0) throws IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void verifyOrder(LimitOrder limitOrder) { + // TODO Auto-generated method stub + + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java new file mode 100644 index 000000000..978b071ab --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java @@ -0,0 +1,33 @@ +package org.knowm.xchange.bibox.service; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.bibox.dto.BiboxCommands; +import org.knowm.xchange.bibox.dto.trade.BiboxAccountType; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderSide; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderType; +import org.knowm.xchange.bibox.dto.trade.BiboxTradeCommand; +import org.knowm.xchange.dto.trade.LimitOrder; + +/** + * @author odrotleff + */ +public class BiboxTradeServiceRaw extends BiboxBaseService { + + protected BiboxTradeServiceRaw(Exchange exchange) { + super(exchange); + } + + public Integer placeBiboxLimitOrder(LimitOrder limitOrder) { + BiboxTradeCommand cmd = new BiboxTradeCommand( + BiboxAdapters.toBiboxPair(limitOrder.getCurrencyPair()), + BiboxAccountType.REGULAR.asInt(), + BiboxOrderType.LIMIT_ORDER.asInt(), + BiboxOrderSide.fromOrderType(limitOrder.getType()).asInt(), + true, + limitOrder.getLimitPrice(), + limitOrder.getOriginalAmount(), + null); + return bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + } +} From 26937b0bc6302758dbd23026bf1778e48ecf9919 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Fri, 9 Feb 2018 00:06:11 +0100 Subject: [PATCH 016/117] [Bibox] implement TradeService.cancelOrder() call --- .../xchange/bibox/BiboxAuthenticated.java | 12 ++++++++++ .../dto/trade/BiboxCancelTradeCommand.java | 15 ++++++++++++ .../trade/BiboxCancelTradeCommandBody.java | 23 +++++++++++++++++++ .../bibox/service/BiboxTradeService.java | 8 +++---- .../bibox/service/BiboxTradeServiceRaw.java | 8 +++++++ 5 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommand.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommandBody.java diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index 674566e55..b2af5087c 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -49,4 +49,16 @@ BiboxSingleResponse trade( @FormParam(FORM_CMDS) String cmds, @FormParam(FORM_APIKEY) String apiKey, @FormParam(FORM_SIGNATURE) ParamsDigest signature); + + /** + * Cancel an order + * + * @return chinese for "cancelled", useless + */ + @POST + @Path("orderpending") + BiboxSingleResponse cancelTrade( + @FormParam(FORM_CMDS) String cmds, + @FormParam(FORM_APIKEY) String apiKey, + @FormParam(FORM_SIGNATURE) ParamsDigest signature); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommand.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommand.java new file mode 100644 index 000000000..4b84270ba --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommand.java @@ -0,0 +1,15 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.math.BigInteger; + +import org.knowm.xchange.bibox.dto.BiboxCommand; + +/** + * @author odrotleff + */ +public class BiboxCancelTradeCommand extends BiboxCommand { + + public BiboxCancelTradeCommand(BigInteger orderId) { + super("orderpending/cancelTrade", new BiboxCancelTradeCommandBody(orderId)); + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommandBody.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommandBody.java new file mode 100644 index 000000000..74d05babf --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxCancelTradeCommandBody.java @@ -0,0 +1,23 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.math.BigInteger; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * @author odrotleff + */ +class BiboxCancelTradeCommandBody { + + @JsonProperty("orders_id") + private BigInteger orderId; + + public BiboxCancelTradeCommandBody(BigInteger orderId) { + super(); + this.orderId = orderId; + } + + public BigInteger getOrderId() { + return orderId; + } +} \ No newline at end of file diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index 79e7d02c5..5fdba7188 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -49,8 +49,8 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { @Override public boolean cancelOrder(String orderId) throws IOException { - // TODO Auto-generated method stub - return false; + cancelBiboxOrder(orderId); + return true; } @Override @@ -80,7 +80,7 @@ public OpenOrdersParams createOpenOrdersParams() { @Override public void verifyOrder(MarketOrder marketOrder) { // TODO Auto-generated method stub - + } @Override @@ -98,6 +98,6 @@ public String placeStopOrder(StopOrder arg0) throws IOException { @Override public void verifyOrder(LimitOrder limitOrder) { // TODO Auto-generated method stub - + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java index 978b071ab..7486b2980 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java @@ -1,9 +1,12 @@ package org.knowm.xchange.bibox.service; +import java.math.BigInteger; + import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.dto.BiboxAdapters; import org.knowm.xchange.bibox.dto.BiboxCommands; import org.knowm.xchange.bibox.dto.trade.BiboxAccountType; +import org.knowm.xchange.bibox.dto.trade.BiboxCancelTradeCommand; import org.knowm.xchange.bibox.dto.trade.BiboxOrderSide; import org.knowm.xchange.bibox.dto.trade.BiboxOrderType; import org.knowm.xchange.bibox.dto.trade.BiboxTradeCommand; @@ -30,4 +33,9 @@ public Integer placeBiboxLimitOrder(LimitOrder limitOrder) { null); return bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); } + + public void cancelBiboxOrder(String orderId) { + BiboxCancelTradeCommand cmd = new BiboxCancelTradeCommand(new BigInteger(orderId)); + bibox.cancelTrade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); + } } From 26c9f6673faf14c4fc3a6a306908f2ddda58eea7 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Fri, 9 Feb 2018 00:48:58 +0100 Subject: [PATCH 017/117] [Bibox] implement MarketDataService.getOrderBook() call --- .../java/org/knowm/xchange/bibox/Bibox.java | 19 ++- .../xchange/bibox/dto/BiboxAdapters.java | 19 +++ .../bibox/dto/trade/BiboxOrderBook.java | 126 ++++++++++++++++++ .../bibox/dto/trade/BiboxOrderBookEntry.java | 79 +++++++++++ .../bibox/service/BiboxMarketDataService.java | 12 +- .../service/BiboxMarketDataServiceRaw.java | 11 ++ .../BiboxMarketdataUnmarshalTest.java | 19 ++- .../marketdata/example-order-book.json | 27 ++++ 8 files changed, 306 insertions(+), 6 deletions(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBook.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBookEntry.java create mode 100644 xchange-bibox/src/test/resources/marketdata/example-order-book.json diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java index 40ffdba2d..9298414c6 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java @@ -10,6 +10,7 @@ import org.knowm.xchange.bibox.dto.BiboxResponse; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; /** * @author odrotleff @@ -18,14 +19,26 @@ @Produces(MediaType.APPLICATION_JSON) public interface Bibox { + @GET + @Path("mdata") + BiboxResponse mdata( + @QueryParam("cmd") String cmd, + @QueryParam("pair") String pair) throws IOException, BiboxException; + /** - * Retrieves a ticker. + * Retrieves the order book for a currency pair. * - * @param symbol the currency pair + * @param cmd always "depth" + * @param pair the currency pair + * @param size the max size of the order book (1-200) * @return * @throws IOException + * @throws BiboxException */ @GET @Path("mdata") - BiboxResponse mdata(@QueryParam("cmd") String cmd, @QueryParam("pair") String pair) throws IOException, BiboxException; + BiboxResponse orderBook( + @QueryParam("cmd") String cmd, + @QueryParam("pair") String pair, + @QueryParam("size") Integer size) throws IOException, BiboxException; } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index a63e2362b..0f691c2f9 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -6,12 +6,17 @@ import org.knowm.xchange.bibox.dto.account.BiboxCoin; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderBookEntry; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.Order.OrderType; import org.knowm.xchange.dto.account.AccountInfo; import org.knowm.xchange.dto.account.Balance; import org.knowm.xchange.dto.account.Wallet; +import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.dto.trade.LimitOrder; /** * @author odrotleff @@ -49,4 +54,18 @@ private static Balance adaptBalance(BiboxCoin coin) { .total(coin.getTotalBalance()) .build(); } + + public static OrderBook adaptOrderBook(BiboxOrderBook orderBook, CurrencyPair currencyPair) { + return new OrderBook( + new Date(orderBook.getUpdateTime()), + orderBook.getAsks().stream().map(e -> adaptOrderBookOrder(e, OrderType.ASK, currencyPair)).collect(Collectors.toList()), + orderBook.getBids().stream().map(e -> adaptOrderBookOrder(e, OrderType.BID, currencyPair)).collect(Collectors.toList())); + } + + public static LimitOrder adaptOrderBookOrder(BiboxOrderBookEntry entry, OrderType orderType, CurrencyPair currencyPair) { + return new LimitOrder.Builder(orderType, currencyPair) + .limitPrice(entry.getPrice()) + .originalAmount(entry.getVolume()) + .build(); + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBook.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBook.java new file mode 100644 index 000000000..0e0dd3401 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBook.java @@ -0,0 +1,126 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "pair", + "update_time", + "asks", + "bids" +}) +public class BiboxOrderBook { + + @JsonProperty("pair") + private String pair; + @JsonProperty("update_time") + private long updateTime; + @JsonProperty("asks") + private List asks = new ArrayList(); + @JsonProperty("bids") + private List bids = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * + * @return + * The pair + */ + @JsonProperty("pair") + public String getPair() { + return pair; + } + + /** + * + * @param pair + * The pair + */ + @JsonProperty("pair") + public void setPair(String pair) { + this.pair = pair; + } + + /** + * + * @return + * The updateTime + */ + @JsonProperty("update_time") + public long getUpdateTime() { + return updateTime; + } + + /** + * + * @param updateTime + * The update_time + */ + @JsonProperty("update_time") + public void setUpdateTime(long updateTime) { + this.updateTime = updateTime; + } + + /** + * + * @return + * The asks + */ + @JsonProperty("asks") + public List getAsks() { + return asks; + } + + /** + * + * @param asks + * The asks + */ + @JsonProperty("asks") + public void setAsks(List asks) { + this.asks = asks; + } + + /** + * + * @return + * The bids + */ + @JsonProperty("bids") + public List getBids() { + return bids; + } + + /** + * + * @param bids + * The bids + */ + @JsonProperty("bids") + public void setBids(List bids) { + this.bids = bids; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBookEntry.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBookEntry.java new file mode 100644 index 000000000..3c1460ade --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderBookEntry.java @@ -0,0 +1,79 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "price", + "volume" +}) +public class BiboxOrderBookEntry { + + @JsonProperty("price") + private BigDecimal price; + @JsonProperty("volume") + private BigDecimal volume; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * + * @return + * The price + */ + @JsonProperty("price") + public BigDecimal getPrice() { + return price; + } + + /** + * + * @param price + * The price + */ + @JsonProperty("price") + public void setPrice(BigDecimal price) { + this.price = price; + } + + /** + * + * @return + * The volume + */ + @JsonProperty("volume") + public BigDecimal getVolume() { + return volume; + } + + /** + * + * @param volume + * The volume + */ + @JsonProperty("volume") + public void setVolume(BigDecimal volume) { + this.volume = volume; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java index 81c9ab78d..63c25a82b 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java @@ -4,6 +4,7 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; @@ -37,8 +38,15 @@ public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOExce @Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { - // TODO Auto-generated method stub - return null; + Integer depth = 16; // default on website + + if (args != null && args.length > 0) { + if (args[0] instanceof Integer && (Integer) args[0] > 0) { + depth = (Integer) args[0]; + } + } + BiboxOrderBook biboxOrderBook = getBiboxOrderBook(currencyPair, depth); + return BiboxAdapters.adaptOrderBook(biboxOrderBook, currencyPair); } @Override diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java index 3df450a08..7ed40ef3b 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -6,13 +6,16 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.BiboxException; +import org.knowm.xchange.bibox.dto.BiboxAdapters; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.exceptions.ExchangeException; public class BiboxMarketDataServiceRaw extends BiboxBaseService { private static final String TICKER_CMD = "ticker"; + private static final String DEPTH_CMD = "depth"; protected BiboxMarketDataServiceRaw(Exchange exchange) { super(exchange); @@ -25,4 +28,12 @@ public BiboxTicker getBiboxTicker(CurrencyPair currencyPair) throws IOException throw new ExchangeException(e.getMessage()); } } + + public BiboxOrderBook getBiboxOrderBook(CurrencyPair currencyPair, Integer depth) throws IOException { + try { + return bibox.orderBook(DEPTH_CMD, BiboxAdapters.toBiboxPair(currencyPair), depth).getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } + } } diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java index 3c930e185..d57270559 100644 --- a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java @@ -9,6 +9,7 @@ import org.junit.Test; import org.knowm.xchange.bibox.BiboxTestUtils; import org.knowm.xchange.bibox.dto.BiboxResponse; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import com.fasterxml.jackson.core.type.TypeReference; @@ -21,7 +22,6 @@ public class BiboxMarketdataUnmarshalTest { @Test public void testTickerUnmarshal() throws IOException { - BiboxResponse response = BiboxTestUtils.getResponse( new TypeReference>() {}, "/marketdata/example-ticker.json"); assertThat(response.getCmd()).isEqualTo("ticker"); @@ -38,4 +38,21 @@ public void testTickerUnmarshal() throws IOException { assertThat(ticker.getLastUsd()).isEqualTo(new BigDecimal("0.76")); assertThat(ticker.getPercent()).isEqualTo("-3.62%"); } + + @Test + public void testOrderBookUnmarshal() throws IOException { + BiboxResponse response = BiboxTestUtils.getResponse( + new TypeReference>() {}, "/marketdata/example-order-book.json"); + assertThat(response.getCmd()).isEqualTo("depth"); + + BiboxOrderBook orderBook = response.getResult(); + assertThat(orderBook.getPair()).isEqualTo("BIX_BTC"); + assertThat(orderBook.getUpdateTime()).isEqualTo(1518133407425L); + assertThat(orderBook.getAsks()).hasSize(2); + assertThat(orderBook.getBids()).hasSize(2); + assertThat(orderBook.getAsks().get(0).getPrice()).isEqualTo(BigDecimal.valueOf(0.00010202)); + assertThat(orderBook.getAsks().get(0).getVolume()).isEqualTo(BigDecimal.valueOf(100)); + assertThat(orderBook.getBids().get(0).getPrice()).isEqualTo(BigDecimal.valueOf(0.00010179)); + assertThat(orderBook.getBids().get(0).getVolume()).isEqualTo(BigDecimal.valueOf(127.7667)); + } } diff --git a/xchange-bibox/src/test/resources/marketdata/example-order-book.json b/xchange-bibox/src/test/resources/marketdata/example-order-book.json new file mode 100644 index 000000000..be6951baa --- /dev/null +++ b/xchange-bibox/src/test/resources/marketdata/example-order-book.json @@ -0,0 +1,27 @@ +{ + "result":{ + "pair":"BIX_BTC", + "update_time":1518133407425, + "asks":[ + { + "price":"0.00010202", + "volume":"100" + }, + { + "price":"0.00010217", + "volume":"22.4913" + } + ], + "bids":[ + { + "price":"0.00010179", + "volume":"127.7667" + }, + { + "price":"0.00010007", + "volume":"9.9927" + } + ] + }, + "cmd":"depth" +} \ No newline at end of file From 6028783914e974318573cb4eef08aaf6253152ee Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Thu, 8 Feb 2018 17:49:23 -0600 Subject: [PATCH 018/117] [bitmex] make sure digest signs url-escaped string --- .../org/knowm/xchange/bitmex/service/BitmexDigest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java index d9f3caeb6..43dabe2ad 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java @@ -3,7 +3,6 @@ import java.util.Base64; import javax.ws.rs.HeaderParam; -import javax.ws.rs.QueryParam; import org.apache.commons.codec.binary.Hex; import org.knowm.xchange.service.BaseParamsDigest; @@ -37,11 +36,8 @@ public static BitmexDigest createInstance(String secretKeyBase64) { public String digestParams(RestInvocation restInvocation) { String nonce = restInvocation.getParamValue(HeaderParam.class, "api-nonce").toString(); - - String params = restInvocation.getParamsMap().get(QueryParam.class).toString(); - String query = params.isEmpty() ? "" : "?" + params; - - String payload = restInvocation.getHttpMethod() + "/" + restInvocation.getPath() + query + nonce + restInvocation.getRequestBody(); + String path = restInvocation.getInvocationUrl().split(restInvocation.getBaseUrl())[1]; + String payload = restInvocation.getHttpMethod() + "/" + path + nonce + restInvocation.getRequestBody(); return new String(Hex.encodeHex(getMac().doFinal(payload.getBytes()))); } From 4fe60ed9e7d2674ace47f8f2ab2bbfd09abacd67 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Thu, 8 Feb 2018 17:49:54 -0600 Subject: [PATCH 019/117] [bitmex] implement getOrder --- .../bitmex/service/BitmexTradeService.java | 21 +++++++++++++++---- .../bitmex/service/BitmexTradeServiceRaw.java | 8 +++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 9e0968570..28dd131d2 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -1,9 +1,7 @@ package org.knowm.xchange.bitmex.service; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; +import java.util.*; import org.knowm.xchange.Exchange; import org.knowm.xchange.bitmex.dto.marketdata.BitmexPrivateOrder; @@ -107,6 +105,21 @@ public OpenOrdersParams createOpenOrdersParams() { @Override public Collection getOrder(String... orderIds) throws IOException { - throw new NotYetImplementedForExchangeException(); + + String filter = "{\"orderID\": [\"" + String.join("\",\"", orderIds) + "\"]}"; + + List privateOrders = getBitmexOrders(null, filter); + + Set orders = new HashSet<>(); + + for (BitmexPrivateOrder privateOrder : privateOrders) { + Order.OrderType type = privateOrder.getSide() == BitmexSide.BUY ? Order.OrderType.BID : Order.OrderType.ASK; + CurrencyPair pair = new CurrencyPair(privateOrder.getCurrency(), privateOrder.getSettleCurrency()); + + orders.add(new LimitOrder(type, privateOrder.getVolume(), pair, privateOrder.getId(), privateOrder.getTimestamp(), + privateOrder.getPrice())); + } + + return orders; } } diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index ccd25c4e2..6d44f244c 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -41,15 +41,19 @@ public List getBitmexPositions(String symbol) throws IOException } } - public List getBitmexOrders() throws IOException { + public List getBitmexOrders(String symbol, String filter) throws IOException { ArrayList orders = new ArrayList<>(); for (int i = 0; orders.size() % 500 == 0; i++) { List orderResponse = bitmex.getOrders(apiKey, exchange.getNonceFactory(), signatureCreator, - null, null, 500, i * 500, true, null, null); + symbol, filter, 500, i * 500, true, null, null); orders.addAll(orderResponse); } return orders; } + + public List getBitmexOrders() throws IOException { + return getBitmexOrders(null, null); + } } From 80168395f4c97408979c263153a9d8ff30217441 Mon Sep 17 00:00:00 2001 From: Graham Crockford Date: Sat, 3 Feb 2018 12:42:31 +0000 Subject: [PATCH 020/117] Fixing some issues with getOrder on GDAX. Specifically: * A division by zero if an order has not been filled * Some BigDecimal.equals() misuses * Wasn't handling the pending state * Wasn't handling the settled state * Wasn't handling the cancelled state (although I'm not convinced this is more than a stopgap solution) * Added FIXMEs for some other issues spotted --- xchange-gdax/pom.xml | 11 ++ .../org/knowm/xchange/gdax/GDAXAdapters.java | 21 +++- .../gdax/service/GDAXAccountServiceRaw.java | 16 +-- .../xchange/gdax/service/GDAXBaseService.java | 6 +- .../service/GDAXMarketDataServiceRaw.java | 24 ++-- .../gdax/service/GDAXTradeService.java | 19 +++- .../gdax/service/GDAXTradeServiceRaw.java | 35 +++--- .../knowm/xchange/gdax/GDAXAdaptersTest.java | 83 +++++++++++++- .../gdax/service/GDAXTradeServiceTest.java | 106 ++++++++++++++++++ .../order/example-limit-order-new.json | 17 +++ .../order/example-limit-order-pending.json | 17 +++ .../order/example-limit-order-settled.json | 19 ++++ 12 files changed, 330 insertions(+), 44 deletions(-) create mode 100644 xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java create mode 100644 xchange-gdax/src/test/resources/order/example-limit-order-new.json create mode 100644 xchange-gdax/src/test/resources/order/example-limit-order-pending.json create mode 100644 xchange-gdax/src/test/resources/order/example-limit-order-settled.json diff --git a/xchange-gdax/pom.xml b/xchange-gdax/pom.xml index dfdb8a4fc..b029e9184 100644 --- a/xchange-gdax/pom.xml +++ b/xchange-gdax/pom.xml @@ -30,6 +30,17 @@ 4.3.4-SNAPSHOT + + org.powermock + powermock-module-junit4 + test + + + org.powermock + powermock-api-mockito + test + + \ No newline at end of file diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java index 3c51637cd..ad98db397 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java @@ -185,7 +185,12 @@ public static Order adaptOrder(GDAXOrder order) { OrderStatus orderStatus = adaptOrderStatus(order); - BigDecimal averagePrice = order.getExecutedvalue().divide(order.getFilledSize(), new MathContext(8)); + final BigDecimal averagePrice; + if (order.getFilledSize().compareTo(BigDecimal.ZERO) == 0) { + averagePrice = BigDecimal.ZERO; + } else { + averagePrice = order.getExecutedvalue().divide(order.getFilledSize(), new MathContext(8)); + } if(order.getType().equals("market")) { returnValue = new MarketOrder( @@ -234,13 +239,19 @@ public static OrderStatus[] adaptOrderStatuses(GDAXOrder[] orders) { /** The status from the GDAXOrder object converted to xchange status */ public static OrderStatus adaptOrderStatus(GDAXOrder order) { - if(order.getStatus().equals("done")) { + + if(order.getStatus().equals("pending")) { + return OrderStatus.PENDING_NEW; + } + + if(order.getStatus().equals("done") || order.getStatus().equals("settled")) { if(order.getDoneReason().equals("filled")) return OrderStatus.FILLED; - return null; - + return null; // FIXME could be STOPPED perhaps. GDAX documentation doesn't really cover the possible + // values of done_reason so will need to run some tests with different order types + // to determine which is which. We can't return null! } if(order.getFilledSize().signum() == 0) @@ -250,7 +261,7 @@ public static OrderStatus adaptOrderStatus(GDAXOrder order) { && order.getSize().compareTo(order.getFilledSize()) < 0) return OrderStatus.PARTIALLY_FILLED; - return null; + return null; // FIXME probably need a better response than this. } public static UserTrades adaptTradeHistory(GDAXFill[] coinbaseExFills) { diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java index 973d2349c..ffbf20152 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java @@ -33,40 +33,40 @@ public GDAXAccountServiceRaw(Exchange exchange) { } public GDAXAccount[] getGDAXAccountInfo() throws GDAXException, IOException { - return gdax.getAccounts(apiKey, digest, nonceFactory, passphrase); + return gdax().getAccounts(apiKey, digest, nonceFactory, passphrase); } public GDAXSendMoneyResponse sendMoney(String accountId, String to, BigDecimal amount, Currency currency) throws GDAXException, IOException { - return gdax.sendMoney(new GDAXSendMoneyRequest(to, amount, currency.getCurrencyCode()), apiKey, digest, nonceFactory, passphrase, + return gdax().sendMoney(new GDAXSendMoneyRequest(to, amount, currency.getCurrencyCode()), apiKey, digest, nonceFactory, passphrase, accountId); } public GDAXWithdrawCryptoResponse withdrawCrypto(String address, BigDecimal amount, Currency currency) throws GDAXException, IOException { - return gdax.withdrawCrypto(apiKey, digest, nonceFactory, passphrase, new GDAXWithdrawFundsRequest(amount, currency.getCurrencyCode(), address)); + return gdax().withdrawCrypto(apiKey, digest, nonceFactory, passphrase, new GDAXWithdrawFundsRequest(amount, currency.getCurrencyCode(), address)); } public List ledger(String accountId, Integer startingOrderId) throws IOException { - return gdax.ledger(apiKey, digest, nonceFactory, passphrase, accountId, startingOrderId); + return gdax().ledger(apiKey, digest, nonceFactory, passphrase, accountId, startingOrderId); } /** * @return the report id */ public String requestNewReport(GDAX.GDAXReportRequest reportRequest) throws IOException { - Map response = gdax.createReport(apiKey, digest, nonceFactory, passphrase, reportRequest); + final Map response = gdax().createReport(apiKey, digest, nonceFactory, passphrase, reportRequest); return response.get("id").toString(); } public List report(String reportId) throws IOException { - return gdax.getReport(apiKey, digest, nonceFactory, passphrase, reportId); + return gdax().getReport(apiKey, digest, nonceFactory, passphrase, reportId); } public GDAXCoinbaseAccount[] getCoinbaseAccounts() throws IOException { - return gdax.getGDAXAccounts(apiKey, digest, nonceFactory, passphrase); + return gdax().getGDAXAccounts(apiKey, digest, nonceFactory, passphrase); } public GDAXCoinbaseAccountAddress getCoinbaseAccountAddress(String accountId) throws IOException { - return gdax.getGDAXAccountAddress(apiKey, digest, nonceFactory, passphrase, accountId); + return gdax().getGDAXAccountAddress(apiKey, digest, nonceFactory, passphrase, accountId); } public GDAXWebsocketAuthData getWebsocketAuthData() throws GDAXException, IOException { diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java index 03eeb9e3c..e27cf7411 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java @@ -15,7 +15,7 @@ public class GDAXBaseService extends BaseExchangeService implements BaseService { - protected final GDAX gdax; + private final GDAX gdax; protected final ParamsDigest digest; protected final String apiKey; @@ -42,4 +42,8 @@ protected ExchangeException handleError(GDAXException exception) { return new ExchangeException(exception); } } + + protected GDAX gdax() { + return gdax; + } } diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java index 39001da79..fbbfad06d 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java @@ -27,9 +27,9 @@ public GDAXProductTicker getGDAXProductTicker(CurrencyPair currencyPair) throws return null; } try { - GDAXProductTicker tickerReturn = this.gdax.getProductTicker(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); + final GDAXProductTicker tickerReturn = this.gdax().getProductTicker(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); return tickerReturn; - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } @@ -40,9 +40,9 @@ public GDAXProductStats getGDAXProductStats(CurrencyPair currencyPair) throws IO return null; } try { - GDAXProductStats statsReturn = this.gdax.getProductStats(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); + final GDAXProductStats statsReturn = this.gdax().getProductStats(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); return statsReturn; - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } @@ -54,9 +54,9 @@ public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair) throws } try { - GDAXProductBook book = this.gdax.getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), "1"); + final GDAXProductBook book = this.gdax().getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), "1"); return book; - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } @@ -64,10 +64,10 @@ public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair) throws public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair, int level) throws IOException { try { - GDAXProductBook book = this.gdax.getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), + final GDAXProductBook book = this.gdax().getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), String.valueOf(level)); return book; - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } @@ -75,9 +75,9 @@ public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair, int le public GDAXTrade[] getGDAXTrades(CurrencyPair currencyPair) throws IOException { try { - return this.gdax.getTrades(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); + return this.gdax().getTrades(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } @@ -99,8 +99,8 @@ public boolean checkProductExists(CurrencyPair currencyPair) { public GDAXProduct[] getGDAXProducts() throws IOException { try { - return gdax.getProducts(); - } catch (GDAXException e){ + return gdax().getProducts(); + } catch (final GDAXException e){ throw handleError(e); } } diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java index 2f227148a..dd9a74b02 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java @@ -7,6 +7,7 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.*; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.exceptions.FundsExceededException; import org.knowm.xchange.gdax.GDAXAdapters; import org.knowm.xchange.gdax.dto.trade.GDAXFill; @@ -20,6 +21,8 @@ import org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair; import org.knowm.xchange.service.trade.params.orders.OpenOrdersParams; +import si.mazi.rescu.HttpStatusExceptionSupport; + public class GDAXTradeService extends GDAXTradeServiceRaw implements TradeService { public GDAXTradeService(Exchange exchange) { @@ -98,7 +101,21 @@ public Collection getOrder(String... orderIds) throws IOException { Collection orders = new ArrayList<>(orderIds.length); for (String orderId : orderIds) { - orders.add(GDAXAdapters.adaptOrder(super.getOrder(orderId))); + try { + final GDAXOrder order = super.getOrder(orderId); + orders.add(GDAXAdapters.adaptOrder(order)); + } catch (final ExchangeException e) { + // We get 404 for cancelled orders. This is a bit of a pain.... + if ( e.getCause() instanceof HttpStatusExceptionSupport && ((HttpStatusExceptionSupport)e.getCause()).getHttpStatusCode() == 404) { + // We can't actually tell, if we get a 404, whether it was a market or limit order, or + // whether it was a bid or an ask and so on. This makes things very tricky. Let's + // put a take in the ground and say you get get neither, and lots of nulls. At least + // the caller gets a consistent behaviour they can code to. + orders.add(new Order(null, null, null, orderId, null, null, null, Order.OrderStatus.CANCELED) { }); + } else { + throw e; + } + } } return orders; diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java index 43620e728..b5a3d53aa 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java @@ -32,8 +32,8 @@ public GDAXTradeServiceRaw(Exchange exchange) { public GDAXOrder[] getGDAXOpenOrders() throws IOException { try { - return gdax.getListOrders(apiKey, digest, nonceFactory, passphrase, "open"); - } catch (GDAXException e) { + return gdax().getListOrders(apiKey, digest, nonceFactory, passphrase, "open"); + } catch (final GDAXException e) { throw handleError(e); } } @@ -63,8 +63,8 @@ public GDAXFill[] getGDAXFills(TradeHistoryParams tradeHistoryParams) throws IOE } } try { - return gdax.getFills(apiKey, digest, nonceFactory, passphrase, startingOrderId, orderId, productId); - } catch (GDAXException e) { + return gdax().getFills(apiKey, digest, nonceFactory, passphrase, startingOrderId, orderId, productId); + } catch (final GDAXException e) { throw handleError(e); } } @@ -75,9 +75,9 @@ public GDAXIdResponse placeGDAXLimitOrder(LimitOrder limitOrder) throws IOExcept String productId = toProductId(limitOrder.getCurrencyPair()); try { - return gdax.placeLimitOrder(new GDAXPlaceOrder(limitOrder.getOriginalAmount(), limitOrder.getLimitPrice(), side, productId, "limit", limitOrder.getOrderFlags()), + return gdax().placeLimitOrder(new GDAXPlaceOrder(limitOrder.getOriginalAmount(), limitOrder.getLimitPrice(), side, productId, "limit", limitOrder.getOrderFlags()), apiKey, digest, nonceFactory, passphrase); - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } @@ -88,33 +88,38 @@ public GDAXIdResponse placeGDAXMarketOrder(MarketOrder marketOrder) throws IOExc String productId = toProductId(marketOrder.getCurrencyPair()); try { - return gdax.placeMarketOrder(new GDAXPlaceOrder(marketOrder.getOriginalAmount(), null, side, productId, "market", marketOrder.getOrderFlags + return gdax().placeMarketOrder(new GDAXPlaceOrder(marketOrder.getOriginalAmount(), null, side, productId, "market", marketOrder.getOrderFlags ()), apiKey, digest, nonceFactory, passphrase); - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } +<<<<<<< HEAD public GDAXIdResponse placeGDAXStopOrder(StopOrder stopOrder) throws IOException { +======= + + public GDAXIdResponse placeGDAXStopOrder(MarketOrder stopOrder) throws IOException { +>>>>>>> 6c9fc5236... Fixing some issues with getOrder on GDAX. Specifically: String side = side(stopOrder.getType()); String productId = toProductId(stopOrder.getCurrencyPair()); try { - return gdax.placeStopOrder(new GDAXPlaceOrder(stopOrder.getOriginalAmount(), stopOrder.getAveragePrice(), side, productId, "stop", stopOrder.getOrderFlags + return gdax().placeStopOrder(new GDAXPlaceOrder(stopOrder.getOriginalAmount(), stopOrder.getAveragePrice(), side, productId, "stop", stopOrder.getOrderFlags ()), apiKey, digest, nonceFactory, passphrase); - } catch (GDAXException e) { + } catch (final GDAXException e) { throw handleError(e); } } - + public boolean cancelGDAXOrder(String id) throws IOException { try { - gdax.cancelOrder(id, apiKey, digest, nonceFactory, passphrase); - } catch (GDAXException e) { + gdax().cancelOrder(id, apiKey, digest, nonceFactory, passphrase); + } catch (final GDAXException e) { throw handleError(e); } return true; @@ -123,8 +128,8 @@ public boolean cancelGDAXOrder(String id) throws IOException { public GDAXOrder getOrder(String id) throws IOException { try { - return gdax.getOrder(id, apiKey, digest, nonceFactory, passphrase); - } catch (GDAXException e) { + return gdax().getOrder(id, apiKey, digest, nonceFactory, passphrase); + } catch (final GDAXException e) { throw handleError(e); } } diff --git a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java index 554d9986d..0fd9841e7 100644 --- a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java +++ b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java @@ -118,14 +118,20 @@ public void testOrderStatusMarketOrderFilled() throws IOException { assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.FILLED); assertThat(order.getId()).isEqualTo(gdaxOrder.getId()); assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); +<<<<<<< HEAD assertThat(order.getOriginalAmount().equals(new BigDecimal("1.00000000"))).isTrue(); assertThat(order.getCumulativeAmount()).isEqualTo(new BigDecimal("0.01291771")); assertThat(order.getRemainingAmount()).isEqualTo(new BigDecimal("1.0").subtract(new BigDecimal("0.01291771"))); assertThat(order.getFee()).isEqualTo(new BigDecimal("0.0249376391550000")); +======= + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("1.00000000")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(new BigDecimal("0.01291771")); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("1.0").subtract(new BigDecimal("0.01291771"))); +>>>>>>> 6c9fc5236... Fixing some issues with getOrder on GDAX. Specifically: assertThat(MarketOrder.class.isAssignableFrom(order.getClass())).isTrue(); assertThat(order.getType()).isEqualTo(OrderType.BID); assertThat(order.getTimestamp()).isEqualTo(new Date(1481227745508L)); - assertThat(order.getAveragePrice()).isEqualTo(new BigDecimal("9.9750556620000000").divide(new BigDecimal("0.01291771"), new MathContext(8))); + assertThat(order.getAveragePrice()).isEqualByComparingTo(new BigDecimal("9.9750556620000000").divide(new BigDecimal("0.01291771"), new MathContext(8))); } @@ -145,16 +151,89 @@ public void testOrderStatusLimitOrderFilled() throws IOException { assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.FILLED); assertThat(order.getId()).isEqualTo("b2cdd7fe-1f4a-495e-8b96-7a4be368f43c"); assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); +<<<<<<< HEAD assertThat(order.getOriginalAmount().equals(new BigDecimal("0.07060351"))).isTrue(); assertThat(order.getCumulativeAmount()).isEqualTo(new BigDecimal("0.07060351")); assertThat(order.getRemainingAmount()).isEqualTo(new BigDecimal("0.00000000")); assertThat(order.getFee()).isEqualTo(new BigDecimal("2.6256545174247500")); +======= + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("0.00000000")); +>>>>>>> 6c9fc5236... Fixing some issues with getOrder on GDAX. Specifically: assertThat(LimitOrder.class.isAssignableFrom(order.getClass())).isTrue(); assertThat(order.getType()).isEqualTo(OrderType.ASK); assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); - assertThat(order.getAveragePrice()).isEqualTo(new BigDecimal("1050.2618069699000000").divide(new BigDecimal("0.07060351"), new MathContext(8))); + assertThat(order.getAveragePrice()).isEqualByComparingTo(new BigDecimal("1050.2618069699000000").divide(new BigDecimal("0.07060351"), new MathContext(8))); + } + + @Test + public void testOrderStatusLimitOrderSettled() throws IOException { + + final JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); + final ObjectMapper mapper = factory.createObjectMapper(); + + final InputStream is = getClass().getResourceAsStream("/order/example-limit-order-settled.json"); + final GDAXOrder gdaxOrder = mapper.readValue(is, GDAXOrder.class); + + final Order order = GDAXAdapters.adaptOrder(gdaxOrder); + + assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.FILLED); + assertThat(order.getId()).isEqualTo("b2cdd7fe-1f4a-495e-8b96-7a4be368f43c"); + assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(BigDecimal.ZERO); + assertThat(LimitOrder.class.isAssignableFrom(order.getClass())).isTrue(); + assertThat(order.getType()).isEqualTo(OrderType.ASK); + assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); + assertThat(order.getAveragePrice()).isEqualByComparingTo(new BigDecimal("1050.2618069699000000").divide(new BigDecimal("0.07060351"), new MathContext(8))); + } + + @Test + public void testOrderStatusLimitOrderNew() throws IOException { + + final JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); + final ObjectMapper mapper = factory.createObjectMapper(); + + final InputStream is = getClass().getResourceAsStream("/order/example-limit-order-new.json"); + final GDAXOrder gdaxOrder = mapper.readValue(is, GDAXOrder.class); + final Order order = GDAXAdapters.adaptOrder(gdaxOrder); + assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.NEW); + assertThat(order.getId()).isEqualTo("b2cdd7fe-1f4a-495e-8b96-7a4be368f43c"); + assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(BigDecimal.ZERO); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(LimitOrder.class.isAssignableFrom(order.getClass())).isTrue(); + assertThat(order.getType()).isEqualTo(OrderType.ASK); + assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); + assertThat(order.getAveragePrice()).isEqualByComparingTo(BigDecimal.ZERO); + } + + @Test + public void testOrderStatusLimitOrderPending() throws IOException { + + final JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); + final ObjectMapper mapper = factory.createObjectMapper(); + + final InputStream is = getClass().getResourceAsStream("/order/example-limit-order-pending.json"); + final GDAXOrder gdaxOrder = mapper.readValue(is, GDAXOrder.class); + + final Order order = GDAXAdapters.adaptOrder(gdaxOrder); + + assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.PENDING_NEW); + assertThat(order.getId()).isEqualTo("b2cdd7fe-1f4a-495e-8b96-7a4be368f43c"); + assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(BigDecimal.ZERO); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(LimitOrder.class.isAssignableFrom(order.getClass())).isTrue(); + assertThat(order.getType()).isEqualTo(OrderType.ASK); + assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); + assertThat(order.getAveragePrice()).isEqualByComparingTo(BigDecimal.ZERO); } } diff --git a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java new file mode 100644 index 000000000..d95ffc4f8 --- /dev/null +++ b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java @@ -0,0 +1,106 @@ +package org.knowm.xchange.gdax.service; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.when; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyString; + +import java.io.IOException; +import java.util.Collection; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.dto.Order; +import org.knowm.xchange.gdax.GDAX; +import org.knowm.xchange.gdax.GDAXAdapters; +import org.knowm.xchange.gdax.dto.GDAXException; +import org.knowm.xchange.gdax.dto.trade.GDAXOrder; +import org.knowm.xchange.service.trade.TradeService; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.powermock.modules.junit4.PowerMockRunner; + +import si.mazi.rescu.ParamsDigest; +import si.mazi.rescu.SynchronizedValueFactory; + +/** + * Tests for {@link GDAXTradeServiceRaw}. + */ +@RunWith(PowerMockRunner.class) +@PrepareForTest(GDAXAdapters.class) +public class GDAXTradeServiceTest { + + private static final String ORDER_ID = "Whatevs"; + + @Mock private Exchange mockExchange; + @Mock private ExchangeSpecification mockExchangeSpecification; + @Mock private GDAX mockGdax; + @Mock private GDAXOrder mockGdaxOrder; + @Mock private Order mockOrder; + + private TradeService service; + + @Before + public void setup() { + MockitoAnnotations.initMocks(this); + when(mockExchange.getExchangeSpecification()).thenReturn(mockExchangeSpecification); + service = new GDAXTradeService(mockExchange) { + @Override + protected GDAX gdax() { + return mockGdax; + } + }; + } + + /** + * See The GDAX API. 404 is returned if an order was cancelled. + * @throws IOException + */ + @SuppressWarnings("unchecked") + @Test + public void testGetOrder404() throws IOException { + + final GDAXException fourOhFour = new GDAXException("Not found"); + fourOhFour.setHttpStatusCode(404); + + when(mockGdax.getOrder(eq(ORDER_ID), anyString(), any(ParamsDigest.class), + any(SynchronizedValueFactory.class), anyString())).thenThrow(fourOhFour); + + final Collection orders = service.getOrder(ORDER_ID); + + assertEquals(1, orders.size()); + final Order order = orders.iterator().next(); + + assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.CANCELED); + assertThat(order.getId()).isEqualTo(ORDER_ID); + } + + + /** + * Make sure we handle non 404 cases correctly. + */ + @SuppressWarnings("unchecked") + @Test + public void testGetOrder200() throws IOException { + + PowerMockito.mockStatic(GDAXAdapters.class); + + when(mockGdax.getOrder(eq(ORDER_ID), anyString(), any(ParamsDigest.class), + any(SynchronizedValueFactory.class), anyString())).thenReturn(mockGdaxOrder); + + PowerMockito.when(GDAXAdapters.adaptOrder(mockGdaxOrder)).thenReturn(mockOrder); + + final Collection orders = service.getOrder(ORDER_ID); + + assertEquals(1, orders.size()); + Assert.assertSame(mockOrder, orders.iterator().next()); + } +} \ No newline at end of file diff --git a/xchange-gdax/src/test/resources/order/example-limit-order-new.json b/xchange-gdax/src/test/resources/order/example-limit-order-new.json new file mode 100644 index 000000000..3df3a67d1 --- /dev/null +++ b/xchange-gdax/src/test/resources/order/example-limit-order-new.json @@ -0,0 +1,17 @@ +{ + "id": "b2cdd7fe-1f4a-495e-8b96-7a4be368f43c", + "price": "14839.76000000", + "size": "0.07060351", + "product_id": "BTC-USD", + "side": "sell", + "stp": "dc", + "type": "limit", + "time_in_force": "IOC", + "post_only": false, + "created_at": "2018-01-08T17:55:44.454112Z", + "fill_fees": "0.0000000000000000", + "filled_size": "0.00000000", + "executed_value": "0.0000000000000000", + "status": "open", + "settled": false +} \ No newline at end of file diff --git a/xchange-gdax/src/test/resources/order/example-limit-order-pending.json b/xchange-gdax/src/test/resources/order/example-limit-order-pending.json new file mode 100644 index 000000000..bb13839f7 --- /dev/null +++ b/xchange-gdax/src/test/resources/order/example-limit-order-pending.json @@ -0,0 +1,17 @@ +{ + "id": "b2cdd7fe-1f4a-495e-8b96-7a4be368f43c", + "price": "14839.76000000", + "size": "0.07060351", + "product_id": "BTC-USD", + "side": "sell", + "stp": "dc", + "type": "limit", + "time_in_force": "IOC", + "post_only": false, + "created_at": "2018-01-08T17:55:44.454112Z", + "fill_fees": "0.0000000000000000", + "filled_size": "0.00000000", + "executed_value": "0.0000000000000000", + "status": "pending", + "settled": false +} \ No newline at end of file diff --git a/xchange-gdax/src/test/resources/order/example-limit-order-settled.json b/xchange-gdax/src/test/resources/order/example-limit-order-settled.json new file mode 100644 index 000000000..54d55b2cc --- /dev/null +++ b/xchange-gdax/src/test/resources/order/example-limit-order-settled.json @@ -0,0 +1,19 @@ +{ + "id": "b2cdd7fe-1f4a-495e-8b96-7a4be368f43c", + "price": "14839.76000000", + "size": "0.07060351", + "product_id": "BTC-USD", + "side": "sell", + "stp": "dc", + "type": "limit", + "time_in_force": "IOC", + "post_only": false, + "created_at": "2018-01-08T17:55:44.454112Z", + "done_at": "2018-01-08T17:55:44.492Z", + "done_reason": "filled", + "fill_fees": "2.6256545174247500", + "filled_size": "0.07060351", + "executed_value": "1050.2618069699000000", + "status": "settled", + "settled": true +} \ No newline at end of file From f0b495b615e14f3cc91ac89633b18996d251eb50 Mon Sep 17 00:00:00 2001 From: Graham Crockford Date: Fri, 9 Feb 2018 12:57:37 +0000 Subject: [PATCH 021/117] Post-rebase cleanup, remove formatting changes --- xchange-gdax/pom.xml | 11 -- .../org/knowm/xchange/gdax/GDAXAdapters.java | 2 +- .../gdax/service/GDAXAccountServiceRaw.java | 16 +-- .../xchange/gdax/service/GDAXBaseService.java | 6 +- .../service/GDAXMarketDataServiceRaw.java | 24 ++-- .../gdax/service/GDAXTradeService.java | 19 +--- .../gdax/service/GDAXTradeServiceRaw.java | 35 +++--- .../knowm/xchange/gdax/GDAXAdaptersTest.java | 16 +-- .../gdax/service/GDAXTradeServiceTest.java | 106 ------------------ 9 files changed, 40 insertions(+), 195 deletions(-) delete mode 100644 xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java diff --git a/xchange-gdax/pom.xml b/xchange-gdax/pom.xml index b029e9184..dfdb8a4fc 100644 --- a/xchange-gdax/pom.xml +++ b/xchange-gdax/pom.xml @@ -30,17 +30,6 @@ 4.3.4-SNAPSHOT - - org.powermock - powermock-module-junit4 - test - - - org.powermock - powermock-api-mockito - test - - \ No newline at end of file diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java index ad98db397..dea28d8ef 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java @@ -186,7 +186,7 @@ public static Order adaptOrder(GDAXOrder order) { OrderStatus orderStatus = adaptOrderStatus(order); final BigDecimal averagePrice; - if (order.getFilledSize().compareTo(BigDecimal.ZERO) == 0) { + if (order.getFilledSize().signum() == 0) { averagePrice = BigDecimal.ZERO; } else { averagePrice = order.getExecutedvalue().divide(order.getFilledSize(), new MathContext(8)); diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java index ffbf20152..973d2349c 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountServiceRaw.java @@ -33,40 +33,40 @@ public GDAXAccountServiceRaw(Exchange exchange) { } public GDAXAccount[] getGDAXAccountInfo() throws GDAXException, IOException { - return gdax().getAccounts(apiKey, digest, nonceFactory, passphrase); + return gdax.getAccounts(apiKey, digest, nonceFactory, passphrase); } public GDAXSendMoneyResponse sendMoney(String accountId, String to, BigDecimal amount, Currency currency) throws GDAXException, IOException { - return gdax().sendMoney(new GDAXSendMoneyRequest(to, amount, currency.getCurrencyCode()), apiKey, digest, nonceFactory, passphrase, + return gdax.sendMoney(new GDAXSendMoneyRequest(to, amount, currency.getCurrencyCode()), apiKey, digest, nonceFactory, passphrase, accountId); } public GDAXWithdrawCryptoResponse withdrawCrypto(String address, BigDecimal amount, Currency currency) throws GDAXException, IOException { - return gdax().withdrawCrypto(apiKey, digest, nonceFactory, passphrase, new GDAXWithdrawFundsRequest(amount, currency.getCurrencyCode(), address)); + return gdax.withdrawCrypto(apiKey, digest, nonceFactory, passphrase, new GDAXWithdrawFundsRequest(amount, currency.getCurrencyCode(), address)); } public List ledger(String accountId, Integer startingOrderId) throws IOException { - return gdax().ledger(apiKey, digest, nonceFactory, passphrase, accountId, startingOrderId); + return gdax.ledger(apiKey, digest, nonceFactory, passphrase, accountId, startingOrderId); } /** * @return the report id */ public String requestNewReport(GDAX.GDAXReportRequest reportRequest) throws IOException { - final Map response = gdax().createReport(apiKey, digest, nonceFactory, passphrase, reportRequest); + Map response = gdax.createReport(apiKey, digest, nonceFactory, passphrase, reportRequest); return response.get("id").toString(); } public List report(String reportId) throws IOException { - return gdax().getReport(apiKey, digest, nonceFactory, passphrase, reportId); + return gdax.getReport(apiKey, digest, nonceFactory, passphrase, reportId); } public GDAXCoinbaseAccount[] getCoinbaseAccounts() throws IOException { - return gdax().getGDAXAccounts(apiKey, digest, nonceFactory, passphrase); + return gdax.getGDAXAccounts(apiKey, digest, nonceFactory, passphrase); } public GDAXCoinbaseAccountAddress getCoinbaseAccountAddress(String accountId) throws IOException { - return gdax().getGDAXAccountAddress(apiKey, digest, nonceFactory, passphrase, accountId); + return gdax.getGDAXAccountAddress(apiKey, digest, nonceFactory, passphrase, accountId); } public GDAXWebsocketAuthData getWebsocketAuthData() throws GDAXException, IOException { diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java index e27cf7411..03eeb9e3c 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXBaseService.java @@ -15,7 +15,7 @@ public class GDAXBaseService extends BaseExchangeService implements BaseService { - private final GDAX gdax; + protected final GDAX gdax; protected final ParamsDigest digest; protected final String apiKey; @@ -42,8 +42,4 @@ protected ExchangeException handleError(GDAXException exception) { return new ExchangeException(exception); } } - - protected GDAX gdax() { - return gdax; - } } diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java index fbbfad06d..39001da79 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXMarketDataServiceRaw.java @@ -27,9 +27,9 @@ public GDAXProductTicker getGDAXProductTicker(CurrencyPair currencyPair) throws return null; } try { - final GDAXProductTicker tickerReturn = this.gdax().getProductTicker(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); + GDAXProductTicker tickerReturn = this.gdax.getProductTicker(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); return tickerReturn; - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } @@ -40,9 +40,9 @@ public GDAXProductStats getGDAXProductStats(CurrencyPair currencyPair) throws IO return null; } try { - final GDAXProductStats statsReturn = this.gdax().getProductStats(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); + GDAXProductStats statsReturn = this.gdax.getProductStats(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); return statsReturn; - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } @@ -54,9 +54,9 @@ public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair) throws } try { - final GDAXProductBook book = this.gdax().getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), "1"); + GDAXProductBook book = this.gdax.getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), "1"); return book; - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } @@ -64,10 +64,10 @@ public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair) throws public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair, int level) throws IOException { try { - final GDAXProductBook book = this.gdax().getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), + GDAXProductBook book = this.gdax.getProductOrderBook(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode(), String.valueOf(level)); return book; - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } @@ -75,9 +75,9 @@ public GDAXProductBook getGDAXProductOrderBook(CurrencyPair currencyPair, int le public GDAXTrade[] getGDAXTrades(CurrencyPair currencyPair) throws IOException { try { - return this.gdax().getTrades(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); + return this.gdax.getTrades(currencyPair.base.getCurrencyCode(), currencyPair.counter.getCurrencyCode()); - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } @@ -99,8 +99,8 @@ public boolean checkProductExists(CurrencyPair currencyPair) { public GDAXProduct[] getGDAXProducts() throws IOException { try { - return gdax().getProducts(); - } catch (final GDAXException e){ + return gdax.getProducts(); + } catch (GDAXException e){ throw handleError(e); } } diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java index dd9a74b02..2f227148a 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeService.java @@ -7,7 +7,6 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.*; -import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.exceptions.FundsExceededException; import org.knowm.xchange.gdax.GDAXAdapters; import org.knowm.xchange.gdax.dto.trade.GDAXFill; @@ -21,8 +20,6 @@ import org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair; import org.knowm.xchange.service.trade.params.orders.OpenOrdersParams; -import si.mazi.rescu.HttpStatusExceptionSupport; - public class GDAXTradeService extends GDAXTradeServiceRaw implements TradeService { public GDAXTradeService(Exchange exchange) { @@ -101,21 +98,7 @@ public Collection getOrder(String... orderIds) throws IOException { Collection orders = new ArrayList<>(orderIds.length); for (String orderId : orderIds) { - try { - final GDAXOrder order = super.getOrder(orderId); - orders.add(GDAXAdapters.adaptOrder(order)); - } catch (final ExchangeException e) { - // We get 404 for cancelled orders. This is a bit of a pain.... - if ( e.getCause() instanceof HttpStatusExceptionSupport && ((HttpStatusExceptionSupport)e.getCause()).getHttpStatusCode() == 404) { - // We can't actually tell, if we get a 404, whether it was a market or limit order, or - // whether it was a bid or an ask and so on. This makes things very tricky. Let's - // put a take in the ground and say you get get neither, and lots of nulls. At least - // the caller gets a consistent behaviour they can code to. - orders.add(new Order(null, null, null, orderId, null, null, null, Order.OrderStatus.CANCELED) { }); - } else { - throw e; - } - } + orders.add(GDAXAdapters.adaptOrder(super.getOrder(orderId))); } return orders; diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java index b5a3d53aa..43620e728 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java @@ -32,8 +32,8 @@ public GDAXTradeServiceRaw(Exchange exchange) { public GDAXOrder[] getGDAXOpenOrders() throws IOException { try { - return gdax().getListOrders(apiKey, digest, nonceFactory, passphrase, "open"); - } catch (final GDAXException e) { + return gdax.getListOrders(apiKey, digest, nonceFactory, passphrase, "open"); + } catch (GDAXException e) { throw handleError(e); } } @@ -63,8 +63,8 @@ public GDAXFill[] getGDAXFills(TradeHistoryParams tradeHistoryParams) throws IOE } } try { - return gdax().getFills(apiKey, digest, nonceFactory, passphrase, startingOrderId, orderId, productId); - } catch (final GDAXException e) { + return gdax.getFills(apiKey, digest, nonceFactory, passphrase, startingOrderId, orderId, productId); + } catch (GDAXException e) { throw handleError(e); } } @@ -75,9 +75,9 @@ public GDAXIdResponse placeGDAXLimitOrder(LimitOrder limitOrder) throws IOExcept String productId = toProductId(limitOrder.getCurrencyPair()); try { - return gdax().placeLimitOrder(new GDAXPlaceOrder(limitOrder.getOriginalAmount(), limitOrder.getLimitPrice(), side, productId, "limit", limitOrder.getOrderFlags()), + return gdax.placeLimitOrder(new GDAXPlaceOrder(limitOrder.getOriginalAmount(), limitOrder.getLimitPrice(), side, productId, "limit", limitOrder.getOrderFlags()), apiKey, digest, nonceFactory, passphrase); - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } @@ -88,38 +88,33 @@ public GDAXIdResponse placeGDAXMarketOrder(MarketOrder marketOrder) throws IOExc String productId = toProductId(marketOrder.getCurrencyPair()); try { - return gdax().placeMarketOrder(new GDAXPlaceOrder(marketOrder.getOriginalAmount(), null, side, productId, "market", marketOrder.getOrderFlags + return gdax.placeMarketOrder(new GDAXPlaceOrder(marketOrder.getOriginalAmount(), null, side, productId, "market", marketOrder.getOrderFlags ()), apiKey, digest, nonceFactory, passphrase); - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } -<<<<<<< HEAD public GDAXIdResponse placeGDAXStopOrder(StopOrder stopOrder) throws IOException { -======= - - public GDAXIdResponse placeGDAXStopOrder(MarketOrder stopOrder) throws IOException { ->>>>>>> 6c9fc5236... Fixing some issues with getOrder on GDAX. Specifically: String side = side(stopOrder.getType()); String productId = toProductId(stopOrder.getCurrencyPair()); try { - return gdax().placeStopOrder(new GDAXPlaceOrder(stopOrder.getOriginalAmount(), stopOrder.getAveragePrice(), side, productId, "stop", stopOrder.getOrderFlags + return gdax.placeStopOrder(new GDAXPlaceOrder(stopOrder.getOriginalAmount(), stopOrder.getAveragePrice(), side, productId, "stop", stopOrder.getOrderFlags ()), apiKey, digest, nonceFactory, passphrase); - } catch (final GDAXException e) { + } catch (GDAXException e) { throw handleError(e); } } - + public boolean cancelGDAXOrder(String id) throws IOException { try { - gdax().cancelOrder(id, apiKey, digest, nonceFactory, passphrase); - } catch (final GDAXException e) { + gdax.cancelOrder(id, apiKey, digest, nonceFactory, passphrase); + } catch (GDAXException e) { throw handleError(e); } return true; @@ -128,8 +123,8 @@ public boolean cancelGDAXOrder(String id) throws IOException { public GDAXOrder getOrder(String id) throws IOException { try { - return gdax().getOrder(id, apiKey, digest, nonceFactory, passphrase); - } catch (final GDAXException e) { + return gdax.getOrder(id, apiKey, digest, nonceFactory, passphrase); + } catch (GDAXException e) { throw handleError(e); } } diff --git a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java index 0fd9841e7..fdba6d656 100644 --- a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java +++ b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java @@ -118,16 +118,10 @@ public void testOrderStatusMarketOrderFilled() throws IOException { assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.FILLED); assertThat(order.getId()).isEqualTo(gdaxOrder.getId()); assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); -<<<<<<< HEAD - assertThat(order.getOriginalAmount().equals(new BigDecimal("1.00000000"))).isTrue(); - assertThat(order.getCumulativeAmount()).isEqualTo(new BigDecimal("0.01291771")); - assertThat(order.getRemainingAmount()).isEqualTo(new BigDecimal("1.0").subtract(new BigDecimal("0.01291771"))); - assertThat(order.getFee()).isEqualTo(new BigDecimal("0.0249376391550000")); -======= assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("1.00000000")); assertThat(order.getCumulativeAmount()).isEqualByComparingTo(new BigDecimal("0.01291771")); assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("1.0").subtract(new BigDecimal("0.01291771"))); ->>>>>>> 6c9fc5236... Fixing some issues with getOrder on GDAX. Specifically: + assertThat(order.getFee()).isEqualTo(new BigDecimal("0.0249376391550000")); assertThat(MarketOrder.class.isAssignableFrom(order.getClass())).isTrue(); assertThat(order.getType()).isEqualTo(OrderType.BID); assertThat(order.getTimestamp()).isEqualTo(new Date(1481227745508L)); @@ -151,16 +145,10 @@ public void testOrderStatusLimitOrderFilled() throws IOException { assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.FILLED); assertThat(order.getId()).isEqualTo("b2cdd7fe-1f4a-495e-8b96-7a4be368f43c"); assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); -<<<<<<< HEAD - assertThat(order.getOriginalAmount().equals(new BigDecimal("0.07060351"))).isTrue(); - assertThat(order.getCumulativeAmount()).isEqualTo(new BigDecimal("0.07060351")); - assertThat(order.getRemainingAmount()).isEqualTo(new BigDecimal("0.00000000")); - assertThat(order.getFee()).isEqualTo(new BigDecimal("2.6256545174247500")); -======= assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); assertThat(order.getCumulativeAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("0.00000000")); ->>>>>>> 6c9fc5236... Fixing some issues with getOrder on GDAX. Specifically: + assertThat(order.getFee()).isEqualTo(new BigDecimal("2.6256545174247500")); assertThat(LimitOrder.class.isAssignableFrom(order.getClass())).isTrue(); assertThat(order.getType()).isEqualTo(OrderType.ASK); assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); diff --git a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java deleted file mode 100644 index d95ffc4f8..000000000 --- a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/service/GDAXTradeServiceTest.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.knowm.xchange.gdax.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.when; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyString; - -import java.io.IOException; -import java.util.Collection; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.knowm.xchange.Exchange; -import org.knowm.xchange.ExchangeSpecification; -import org.knowm.xchange.dto.Order; -import org.knowm.xchange.gdax.GDAX; -import org.knowm.xchange.gdax.GDAXAdapters; -import org.knowm.xchange.gdax.dto.GDAXException; -import org.knowm.xchange.gdax.dto.trade.GDAXOrder; -import org.knowm.xchange.service.trade.TradeService; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; - -import si.mazi.rescu.ParamsDigest; -import si.mazi.rescu.SynchronizedValueFactory; - -/** - * Tests for {@link GDAXTradeServiceRaw}. - */ -@RunWith(PowerMockRunner.class) -@PrepareForTest(GDAXAdapters.class) -public class GDAXTradeServiceTest { - - private static final String ORDER_ID = "Whatevs"; - - @Mock private Exchange mockExchange; - @Mock private ExchangeSpecification mockExchangeSpecification; - @Mock private GDAX mockGdax; - @Mock private GDAXOrder mockGdaxOrder; - @Mock private Order mockOrder; - - private TradeService service; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - when(mockExchange.getExchangeSpecification()).thenReturn(mockExchangeSpecification); - service = new GDAXTradeService(mockExchange) { - @Override - protected GDAX gdax() { - return mockGdax; - } - }; - } - - /** - * See The GDAX API. 404 is returned if an order was cancelled. - * @throws IOException - */ - @SuppressWarnings("unchecked") - @Test - public void testGetOrder404() throws IOException { - - final GDAXException fourOhFour = new GDAXException("Not found"); - fourOhFour.setHttpStatusCode(404); - - when(mockGdax.getOrder(eq(ORDER_ID), anyString(), any(ParamsDigest.class), - any(SynchronizedValueFactory.class), anyString())).thenThrow(fourOhFour); - - final Collection orders = service.getOrder(ORDER_ID); - - assertEquals(1, orders.size()); - final Order order = orders.iterator().next(); - - assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.CANCELED); - assertThat(order.getId()).isEqualTo(ORDER_ID); - } - - - /** - * Make sure we handle non 404 cases correctly. - */ - @SuppressWarnings("unchecked") - @Test - public void testGetOrder200() throws IOException { - - PowerMockito.mockStatic(GDAXAdapters.class); - - when(mockGdax.getOrder(eq(ORDER_ID), anyString(), any(ParamsDigest.class), - any(SynchronizedValueFactory.class), anyString())).thenReturn(mockGdaxOrder); - - PowerMockito.when(GDAXAdapters.adaptOrder(mockGdaxOrder)).thenReturn(mockOrder); - - final Collection orders = service.getOrder(ORDER_ID); - - assertEquals(1, orders.size()); - Assert.assertSame(mockOrder, orders.iterator().next()); - } -} \ No newline at end of file From 9b3d297cc69e5e5042fafd6c4047c091e213fe13 Mon Sep 17 00:00:00 2001 From: Graham Crockford Date: Fri, 9 Feb 2018 15:59:07 +0000 Subject: [PATCH 022/117] Add UNKNOWN order type and return it when we can't be sure. --- .../java/org/knowm/xchange/dto/Order.java | 7 +++++- .../org/knowm/xchange/gdax/GDAXAdapters.java | 23 +++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java b/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java index 1a41c8c6d..9c73fd551 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java +++ b/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java @@ -86,7 +86,12 @@ public enum OrderStatus { /** * Order has expired it's time to live or trading session and been removed from order book */ - EXPIRED + EXPIRED, + /** + * The exchange returned a state which is not in the exchange's API documentation. + * The state of the order cannot be confirmed. + */ + UNKNOWN } public interface IOrderFlags { diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java index dea28d8ef..b4f499a07 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java @@ -181,8 +181,6 @@ public static Order adaptOrder(GDAXOrder order) { Date createdAt = parseDate(order.getCreatedAt()); - Order returnValue; - OrderStatus orderStatus = adaptOrderStatus(order); final BigDecimal averagePrice; @@ -193,7 +191,7 @@ public static Order adaptOrder(GDAXOrder order) { } if(order.getType().equals("market")) { - returnValue = new MarketOrder( + return new MarketOrder( type, order.getSize(), currencyPair, @@ -205,7 +203,7 @@ public static Order adaptOrder(GDAXOrder order) { orderStatus ); } else if(order.getType().equals("limit")) { - returnValue = new LimitOrder( + return new LimitOrder( type, order.getSize(), currencyPair, @@ -216,11 +214,9 @@ public static Order adaptOrder(GDAXOrder order) { order.getFilledSize(), order.getFillFees(), orderStatus); - } else { - return null; } - return returnValue; + return null; } @@ -246,12 +242,15 @@ public static OrderStatus adaptOrderStatus(GDAXOrder order) { if(order.getStatus().equals("done") || order.getStatus().equals("settled")) { - if(order.getDoneReason().equals("filled")) + if(order.getDoneReason().equals("filled")) { return OrderStatus.FILLED; + } - return null; // FIXME could be STOPPED perhaps. GDAX documentation doesn't really cover the possible - // values of done_reason so will need to run some tests with different order types - // to determine which is which. We can't return null! + // Could possibly be STOPPED, but this isn't covered by the GDAX API docs, + // and in any case, neither getOpenOrders not getOrder are currently + // returning stop orders so it's hard to tell. This will have to do for + // now. + return OrderStatus.UNKNOWN; } if(order.getFilledSize().signum() == 0) @@ -261,7 +260,7 @@ public static OrderStatus adaptOrderStatus(GDAXOrder order) { && order.getSize().compareTo(order.getFilledSize()) < 0) return OrderStatus.PARTIALLY_FILLED; - return null; // FIXME probably need a better response than this. + return OrderStatus.UNKNOWN; } public static UserTrades adaptTradeHistory(GDAXFill[] coinbaseExFills) { From 6e7113bd5965381f039d62c0c26ad8096cf970e3 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 12:13:00 -0600 Subject: [PATCH 023/117] [bitmex] update rate limits to match exchange documentation --- xchange-bitmex/src/main/resources/bitmex.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xchange-bitmex/src/main/resources/bitmex.json b/xchange-bitmex/src/main/resources/bitmex.json index fcb74acce..7dbeb460a 100755 --- a/xchange-bitmex/src/main/resources/bitmex.json +++ b/xchange-bitmex/src/main/resources/bitmex.json @@ -98,9 +98,16 @@ "public_rate_limits": [ { "calls": 1, - "time_span": 6, + "time_span": 2, "time_unit": "seconds" } ], - "share_rate_limits": false + "private_rate_limits": [ + { + "calls": 1, + "time_span": 2, + "time_unit": "seconds" + } + ], + "share_rate_limits": true } From dd197b7ab8639bf6d6ecb91e01c1616da5a19b08 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 12:46:24 -0600 Subject: [PATCH 024/117] [bitmex] implement placeMarketOrder --- .../java/org/knowm/xchange/bitmex/Bitmex.java | 18 +++++++++++++----- .../bitmex/service/BitmexTradeService.java | 4 +++- .../bitmex/service/BitmexTradeServiceRaw.java | 6 ++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index bea15f929..0a3bca198 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -1,15 +1,12 @@ package org.knowm.xchange.bitmex; import java.io.IOException; +import java.math.BigDecimal; import java.util.Date; import java.util.List; import javax.annotation.Nullable; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; +import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import org.knowm.xchange.bitmex.dto.account.BitmexAccount; @@ -110,4 +107,15 @@ List getOrders(@HeaderParam("api-key") String apiKey, @Nullable @QueryParam("reverse") Boolean reverse, @Nullable @QueryParam("startTime") Date startTime, @Nullable @QueryParam("endTime") Date endTime); + + @POST + @Path("order") + BitmexPrivateOrder placeOrder(@HeaderParam("api-key") String apiKey, + @HeaderParam("api-nonce") SynchronizedValueFactory nonce, + @HeaderParam("api-signature") ParamsDigest paramsDigest, + @FormParam("symbol") String symbol, + @FormParam("orderQty") int orderQuantity, + @FormParam("price") BigDecimal price, + @Nullable @FormParam("ordType") String orderType, + @Nullable @FormParam("execInst") String executionInstructions); } \ No newline at end of file diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 28dd131d2..620b5b24a 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -65,7 +65,9 @@ public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { @Override public String placeMarketOrder(MarketOrder marketOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); + String symbol = marketOrder.getCurrencyPair().base.getCurrencyCode() + marketOrder.getCurrencyPair().counter.getCurrencyCode(); + BitmexPrivateOrder order = placeMarketOrder(symbol, marketOrder.getOriginalAmount(), null); + return order.getId(); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index 6d44f244c..d31343a10 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -1,6 +1,7 @@ package org.knowm.xchange.bitmex.service; import java.io.IOException; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -56,4 +57,9 @@ public List getBitmexOrders(String symbol, String filter) th public List getBitmexOrders() throws IOException { return getBitmexOrders(null, null); } + + public BitmexPrivateOrder placeMarketOrder(String symbol, BigDecimal orderQuantity, String executionInstructions) { + return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), + null, "Market", executionInstructions); + } } From 598edd1178e735bc1ec50af02eee40023b538a9c Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 19:48:26 +0000 Subject: [PATCH 025/117] [bitfinex] metadata - added missing market --- xchange-bitfinex/src/main/resources/bitfinex.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xchange-bitfinex/src/main/resources/bitfinex.json b/xchange-bitfinex/src/main/resources/bitfinex.json index 1cd560a35..dd8659246 100644 --- a/xchange-bitfinex/src/main/resources/bitfinex.json +++ b/xchange-bitfinex/src/main/resources/bitfinex.json @@ -4,6 +4,10 @@ "price_scale": 2, "min_amount": 0.01000000 }, + "BTG/USD": { + "price_scale": 2, + "min_amount": 0.01000000 + }, "BTC/EUR": { "price_scale": 2, "min_amount": 0.01000000 From f3d255be47bd62b7ea30031f6b2dd67789c5f2d8 Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 19:48:52 +0000 Subject: [PATCH 026/117] [hitbtc] metadata - added missing min amount --- xchange-hitbtc/src/main/resources/hitbtc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xchange-hitbtc/src/main/resources/hitbtc.json b/xchange-hitbtc/src/main/resources/hitbtc.json index 35391c353..e7451bcdc 100644 --- a/xchange-hitbtc/src/main/resources/hitbtc.json +++ b/xchange-hitbtc/src/main/resources/hitbtc.json @@ -22,7 +22,8 @@ "price_scale": 8 }, "BCH/BTC": { - "price_scale": 8 + "price_scale": 8, + "min_amount": 0.001 }, "BCH/ETH": { "price_scale": 8 From e17ebee82b81a61d21f9181f4550845c3c919e05 Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 19:49:09 +0000 Subject: [PATCH 027/117] [lakebtc] metadata - added missing currencies --- xchange-lakebtc/src/main/resources/lakebtc.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xchange-lakebtc/src/main/resources/lakebtc.json b/xchange-lakebtc/src/main/resources/lakebtc.json index 69060ff30..1b6a8131f 100644 --- a/xchange-lakebtc/src/main/resources/lakebtc.json +++ b/xchange-lakebtc/src/main/resources/lakebtc.json @@ -7,5 +7,15 @@ "price_scale": 4 } }, - "currencies": {} + "currencies": { + "USD": { + "scale": 2 + }, + "GBP": { + "scale": 2 + }, + "EUR": { + "scale": 2 + } + } } From 0f0de234fc4b2fa9efd5553b95fd5efc60ca2aac Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 19:49:22 +0000 Subject: [PATCH 028/117] [livecoin] metadata - added missing currencies --- xchange-livecoin/src/main/resources/livecoin.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xchange-livecoin/src/main/resources/livecoin.json b/xchange-livecoin/src/main/resources/livecoin.json index 8cd608520..98307f0ca 100644 --- a/xchange-livecoin/src/main/resources/livecoin.json +++ b/xchange-livecoin/src/main/resources/livecoin.json @@ -349,6 +349,15 @@ "LTC": { "scale": 8 }, + "BCH": { + "scale": 8 + }, + "OMG": { + "scale": 8 + }, + "KICK": { + "scale": 8 + }, "SYS": {}, "STEEM": {}, "ATX": {}, From d3c6ff9f4dfd12657de7f54d7db104acdb79310a Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 19:49:50 +0000 Subject: [PATCH 029/117] [poloniex] metadata - fixed some min amounts --- xchange-poloniex/src/main/resources/poloniex.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xchange-poloniex/src/main/resources/poloniex.json b/xchange-poloniex/src/main/resources/poloniex.json index 24a5da8d8..e15822cde 100644 --- a/xchange-poloniex/src/main/resources/poloniex.json +++ b/xchange-poloniex/src/main/resources/poloniex.json @@ -1,5 +1,9 @@ { "currency_pairs": { + "BCH/BTC": { + "min_amount": 0.0001, + "price_scale": 8 + }, "STEEM/BTC": { "min_amount": 0.00000001, "trading_fee": 0.0025, @@ -116,7 +120,7 @@ "price_scale": 8 }, "LSK/BTC": { - "min_amount": 0.00000001, + "min_amount": 0.0001, "trading_fee": 0.0025, "price_scale": 8 }, @@ -341,7 +345,7 @@ "price_scale": 8 }, "LSK/ETH": { - "min_amount": 0.00000001, + "min_amount": 0.0001, "trading_fee": 0.0025, "price_scale": 8 }, @@ -371,7 +375,7 @@ "price_scale": 8 }, "XMR/BTC": { - "min_amount": 0.00000001, + "min_amount": 0.0001, "trading_fee": 0.0025, "price_scale": 8 }, From 7caaa31b1b7819eee0ce2156aaaf3e4dc7177aec Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 19:50:12 +0000 Subject: [PATCH 030/117] [quadrigia] metadata - fixed some min amounts --- xchange-quadrigacx/src/main/resources/quadrigacx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-quadrigacx/src/main/resources/quadrigacx.json b/xchange-quadrigacx/src/main/resources/quadrigacx.json index 0106fdb39..ac1865672 100644 --- a/xchange-quadrigacx/src/main/resources/quadrigacx.json +++ b/xchange-quadrigacx/src/main/resources/quadrigacx.json @@ -18,7 +18,7 @@ }, "BCH/BTC": { "price_scale": 8, - "min_amount": 0.00000001 + "min_amount": 0.01 }, "BTG/BTC": { "price_scale": 8, From a373e4c221dc52765760ca38b73e6db56ec401d5 Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 20:03:09 +0000 Subject: [PATCH 031/117] [cexio] metadata - fixed min amounts for BCH markets (and removed pointless trailing zeros) --- xchange-cexio/src/main/resources/cexio.json | 68 ++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/xchange-cexio/src/main/resources/cexio.json b/xchange-cexio/src/main/resources/cexio.json index 5e88bdfdb..885486385 100644 --- a/xchange-cexio/src/main/resources/cexio.json +++ b/xchange-cexio/src/main/resources/cexio.json @@ -3,152 +3,152 @@ "BTC/USD": { "price_scale": 1, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.01 }, "BTC/EUR": { "price_scale": 1, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.01 }, "BTC/GBP": { "price_scale": 1, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.01 }, "BTC/RUB": { "price_scale": 1, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.01 }, "ETH/USD": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.500000000 + "min_amount": 0.5 }, "ETH/EUR": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.500000000 + "min_amount": 0.5 }, "ETH/GBP": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.100000000 + "min_amount": 0.1 }, "ETH/BTC": { "price_scale": 6, "trading_fee": 0.0015, - "min_amount": 0.500000000 + "min_amount": 0.5 }, "BCH/USD": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.0100000000 + "min_amount": 0.1 }, "BCH/EUR": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.0100000000 + "min_amount": 0.1 }, "BCH/GBP": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.1 }, "BCH/BTC": { "price_scale": 6, "trading_fee": 0.0015, - "min_amount": 0.100000000 + "min_amount": 0.1 }, "BTG/USD": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.0100000000 + "min_amount": 0.01 }, "BTG/EUR": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.01 }, "BTG/BTC": { "price_scale": 6, "trading_fee": 0.0015, - "min_amount": 0.100000000 + "min_amount": 0.1 }, "DASH/USD": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.0100000000 + "min_amount": 0.01 }, "DASH/EUR": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.01 }, "DASH/GBP": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.100000000 + "min_amount": 0.1 }, "DASH/BTC": { "price_scale": 6, "trading_fee": 0.0015, - "min_amount": 0.100000000 + "min_amount": 0.1 }, "XRP/USD": { "price_scale": 4, "trading_fee": 0.0015, - "min_amount": 10.000000 + "min_amount": 10 }, "XRP/EUR": { "price_scale": 4, "trading_fee": 0.0015, - "min_amount": 10.000000 + "min_amount": 10 }, "XRP/BTC": { "price_scale": 8, "trading_fee": 0.0015, - "min_amount": 40.000000 + "min_amount": 40 }, "XLM/USD": { "price_scale": 4, "trading_fee": 0.0015, - "min_amount": 10.000000 + "min_amount": 10 }, "XLM/EUR": { "price_scale": 4, "trading_fee": 0.0015, - "min_amount": 10.000000 + "min_amount": 10 }, "XLM/BTC": { "price_scale": 8, "trading_fee": 0.0015, - "min_amount": 40.000000 + "min_amount": 40 }, "ZEC/USD": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.0100000000 + "min_amount": 0.01 }, "ZEC/EUR": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.010000000 + "min_amount": 0.01 }, "ZEC/GBP": { "price_scale": 2, "trading_fee": 0.0015, - "min_amount": 0.100000000 + "min_amount": 0.1 }, "ZEC/BTC": { "price_scale": 6, "trading_fee": 0.0015, - "min_amount": 0.100000000 + "min_amount": 0.1 }, "GHS/BTC": { "price_scale": 8, "trading_fee": 0.0015, - "min_amount": 1.000000000 + "min_amount": 1 } }, "currencies": { @@ -184,19 +184,19 @@ }, "USD": { "scale": 2, - "withdrawal_fee": 3.80 + "withdrawal_fee": 3.8 }, "EUR": { "scale": 2, - "withdrawal_fee": 3.50 + "withdrawal_fee": 3.5 }, "GBP": { "scale": 2, - "withdrawal_fee": 2.90 + "withdrawal_fee": 2.9 }, "RUB": { "scale": 2, - "withdrawal_fee": 30 + "withdrawal_fee": 3 } }, "private_rate_limits": [ From cd51e614ee2db37224c4df2d424f0a1a8f823e5c Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 14:10:48 -0600 Subject: [PATCH 032/117] [bitmex] implement placeLimitOrder --- .../org/knowm/xchange/bitmex/service/BitmexTradeService.java | 4 +++- .../knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 620b5b24a..7720cf0f5 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -72,7 +72,9 @@ public String placeMarketOrder(MarketOrder marketOrder) throws IOException { @Override public String placeLimitOrder(LimitOrder limitOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); + String symbol = limitOrder.getCurrencyPair().base.getCurrencyCode() + limitOrder.getCurrencyPair().counter.getCurrencyCode(); + BitmexPrivateOrder order = placeLimitOrder(symbol, limitOrder.getOriginalAmount(), limitOrder.getLimitPrice(), null); + return order.getId(); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index d31343a10..a42c45a08 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -62,4 +62,9 @@ public BitmexPrivateOrder placeMarketOrder(String symbol, BigDecimal orderQuanti return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), null, "Market", executionInstructions); } + + public BitmexPrivateOrder placeLimitOrder(String symbol, BigDecimal orderQuantity, BigDecimal price, String executionInstructions) { + return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), + price, "Limit", executionInstructions); + } } From cf5be3a37fb9e848cb79a461cbb10b6dc53a57d8 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 14:28:42 -0600 Subject: [PATCH 033/117] [bitmex] implement placeStopOrder --- .../src/main/java/org/knowm/xchange/bitmex/Bitmex.java | 1 + .../knowm/xchange/bitmex/service/BitmexTradeService.java | 4 +++- .../xchange/bitmex/service/BitmexTradeServiceRaw.java | 9 +++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index 0a3bca198..eda37d76b 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -116,6 +116,7 @@ BitmexPrivateOrder placeOrder(@HeaderParam("api-key") String apiKey, @FormParam("symbol") String symbol, @FormParam("orderQty") int orderQuantity, @FormParam("price") BigDecimal price, + @Nullable @FormParam("stopPx") BigDecimal stopPrice, @Nullable @FormParam("ordType") String orderType, @Nullable @FormParam("execInst") String executionInstructions); } \ No newline at end of file diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 7720cf0f5..32f039f1f 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -79,7 +79,9 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { @Override public String placeStopOrder(StopOrder stopOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); + String symbol = stopOrder.getCurrencyPair().base.getCurrencyCode() + stopOrder.getCurrencyPair().counter.getCurrencyCode(); + BitmexPrivateOrder order = placeStopOrder(symbol, stopOrder.getOriginalAmount(), stopOrder.getStopPrice(), null); + return order.getId(); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index a42c45a08..6a5942cbd 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -60,11 +60,16 @@ public List getBitmexOrders() throws IOException { public BitmexPrivateOrder placeMarketOrder(String symbol, BigDecimal orderQuantity, String executionInstructions) { return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), - null, "Market", executionInstructions); + null, null, "Market", executionInstructions); } public BitmexPrivateOrder placeLimitOrder(String symbol, BigDecimal orderQuantity, BigDecimal price, String executionInstructions) { return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), - price, "Limit", executionInstructions); + price, null, "Limit", executionInstructions); + } + + public BitmexPrivateOrder placeStopOrder(String symbol, BigDecimal orderQuantity, BigDecimal stopPrice, String executionInstructions) { + return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), + null, stopPrice, "Stop", executionInstructions); } } From c51c886d3e4e19296219ccc0f6da4134572aa644 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Thu, 8 Feb 2018 16:15:14 -0600 Subject: [PATCH 034/117] [bitmex] implement getOpenOrders --- .../xchange/bitmex/service/BitmexTradeService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 9969e7cea..9e0968570 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -54,7 +54,15 @@ public OpenOrders getOpenOrders() throws IOException { @Override public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); + List limitOrders = new ArrayList<>(); + + for (LimitOrder order : getOpenOrders().getOpenOrders()) { + if (params.accept(order)) { + limitOrders.add(order); + } + } + + return new OpenOrders(limitOrders); } @Override From b0ca880f4b768064a40a901f0aa4ae4b50617b82 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Thu, 8 Feb 2018 17:49:23 -0600 Subject: [PATCH 035/117] [bitmex] make sure digest signs url-escaped string --- .../org/knowm/xchange/bitmex/service/BitmexDigest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java index d9f3caeb6..43dabe2ad 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexDigest.java @@ -3,7 +3,6 @@ import java.util.Base64; import javax.ws.rs.HeaderParam; -import javax.ws.rs.QueryParam; import org.apache.commons.codec.binary.Hex; import org.knowm.xchange.service.BaseParamsDigest; @@ -37,11 +36,8 @@ public static BitmexDigest createInstance(String secretKeyBase64) { public String digestParams(RestInvocation restInvocation) { String nonce = restInvocation.getParamValue(HeaderParam.class, "api-nonce").toString(); - - String params = restInvocation.getParamsMap().get(QueryParam.class).toString(); - String query = params.isEmpty() ? "" : "?" + params; - - String payload = restInvocation.getHttpMethod() + "/" + restInvocation.getPath() + query + nonce + restInvocation.getRequestBody(); + String path = restInvocation.getInvocationUrl().split(restInvocation.getBaseUrl())[1]; + String payload = restInvocation.getHttpMethod() + "/" + path + nonce + restInvocation.getRequestBody(); return new String(Hex.encodeHex(getMac().doFinal(payload.getBytes()))); } From aa6c411dc0536aa282ccf8ab3bcc519e3328e867 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Thu, 8 Feb 2018 17:49:54 -0600 Subject: [PATCH 036/117] [bitmex] implement getOrder --- .../bitmex/service/BitmexTradeService.java | 21 +++++++++++++++---- .../bitmex/service/BitmexTradeServiceRaw.java | 8 +++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 9e0968570..28dd131d2 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -1,9 +1,7 @@ package org.knowm.xchange.bitmex.service; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; +import java.util.*; import org.knowm.xchange.Exchange; import org.knowm.xchange.bitmex.dto.marketdata.BitmexPrivateOrder; @@ -107,6 +105,21 @@ public OpenOrdersParams createOpenOrdersParams() { @Override public Collection getOrder(String... orderIds) throws IOException { - throw new NotYetImplementedForExchangeException(); + + String filter = "{\"orderID\": [\"" + String.join("\",\"", orderIds) + "\"]}"; + + List privateOrders = getBitmexOrders(null, filter); + + Set orders = new HashSet<>(); + + for (BitmexPrivateOrder privateOrder : privateOrders) { + Order.OrderType type = privateOrder.getSide() == BitmexSide.BUY ? Order.OrderType.BID : Order.OrderType.ASK; + CurrencyPair pair = new CurrencyPair(privateOrder.getCurrency(), privateOrder.getSettleCurrency()); + + orders.add(new LimitOrder(type, privateOrder.getVolume(), pair, privateOrder.getId(), privateOrder.getTimestamp(), + privateOrder.getPrice())); + } + + return orders; } } diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index ccd25c4e2..6d44f244c 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -41,15 +41,19 @@ public List getBitmexPositions(String symbol) throws IOException } } - public List getBitmexOrders() throws IOException { + public List getBitmexOrders(String symbol, String filter) throws IOException { ArrayList orders = new ArrayList<>(); for (int i = 0; orders.size() % 500 == 0; i++) { List orderResponse = bitmex.getOrders(apiKey, exchange.getNonceFactory(), signatureCreator, - null, null, 500, i * 500, true, null, null); + symbol, filter, 500, i * 500, true, null, null); orders.addAll(orderResponse); } return orders; } + + public List getBitmexOrders() throws IOException { + return getBitmexOrders(null, null); + } } From 39bad6a7b03f77a4d8ec6653ffff906591319e08 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 12:13:00 -0600 Subject: [PATCH 037/117] [bitmex] update rate limits to match exchange documentation --- xchange-bitmex/src/main/resources/bitmex.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xchange-bitmex/src/main/resources/bitmex.json b/xchange-bitmex/src/main/resources/bitmex.json index fcb74acce..7dbeb460a 100755 --- a/xchange-bitmex/src/main/resources/bitmex.json +++ b/xchange-bitmex/src/main/resources/bitmex.json @@ -98,9 +98,16 @@ "public_rate_limits": [ { "calls": 1, - "time_span": 6, + "time_span": 2, "time_unit": "seconds" } ], - "share_rate_limits": false + "private_rate_limits": [ + { + "calls": 1, + "time_span": 2, + "time_unit": "seconds" + } + ], + "share_rate_limits": true } From 71529ed3f02f2f74c632bb41a048944a49d92ace Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 12:46:24 -0600 Subject: [PATCH 038/117] [bitmex] implement placeMarketOrder --- .../java/org/knowm/xchange/bitmex/Bitmex.java | 18 +++++++++++++----- .../bitmex/service/BitmexTradeService.java | 4 +++- .../bitmex/service/BitmexTradeServiceRaw.java | 6 ++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index bea15f929..0a3bca198 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -1,15 +1,12 @@ package org.knowm.xchange.bitmex; import java.io.IOException; +import java.math.BigDecimal; import java.util.Date; import java.util.List; import javax.annotation.Nullable; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; +import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import org.knowm.xchange.bitmex.dto.account.BitmexAccount; @@ -110,4 +107,15 @@ List getOrders(@HeaderParam("api-key") String apiKey, @Nullable @QueryParam("reverse") Boolean reverse, @Nullable @QueryParam("startTime") Date startTime, @Nullable @QueryParam("endTime") Date endTime); + + @POST + @Path("order") + BitmexPrivateOrder placeOrder(@HeaderParam("api-key") String apiKey, + @HeaderParam("api-nonce") SynchronizedValueFactory nonce, + @HeaderParam("api-signature") ParamsDigest paramsDigest, + @FormParam("symbol") String symbol, + @FormParam("orderQty") int orderQuantity, + @FormParam("price") BigDecimal price, + @Nullable @FormParam("ordType") String orderType, + @Nullable @FormParam("execInst") String executionInstructions); } \ No newline at end of file diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 28dd131d2..620b5b24a 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -65,7 +65,9 @@ public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { @Override public String placeMarketOrder(MarketOrder marketOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); + String symbol = marketOrder.getCurrencyPair().base.getCurrencyCode() + marketOrder.getCurrencyPair().counter.getCurrencyCode(); + BitmexPrivateOrder order = placeMarketOrder(symbol, marketOrder.getOriginalAmount(), null); + return order.getId(); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index 6d44f244c..d31343a10 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -1,6 +1,7 @@ package org.knowm.xchange.bitmex.service; import java.io.IOException; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -56,4 +57,9 @@ public List getBitmexOrders(String symbol, String filter) th public List getBitmexOrders() throws IOException { return getBitmexOrders(null, null); } + + public BitmexPrivateOrder placeMarketOrder(String symbol, BigDecimal orderQuantity, String executionInstructions) { + return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), + null, "Market", executionInstructions); + } } From b1b61f6b3a6c2c94b42b60057de17582e8ad52d4 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 14:10:48 -0600 Subject: [PATCH 039/117] [bitmex] implement placeLimitOrder --- .../org/knowm/xchange/bitmex/service/BitmexTradeService.java | 4 +++- .../knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 620b5b24a..7720cf0f5 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -72,7 +72,9 @@ public String placeMarketOrder(MarketOrder marketOrder) throws IOException { @Override public String placeLimitOrder(LimitOrder limitOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); + String symbol = limitOrder.getCurrencyPair().base.getCurrencyCode() + limitOrder.getCurrencyPair().counter.getCurrencyCode(); + BitmexPrivateOrder order = placeLimitOrder(symbol, limitOrder.getOriginalAmount(), limitOrder.getLimitPrice(), null); + return order.getId(); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index d31343a10..a42c45a08 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -62,4 +62,9 @@ public BitmexPrivateOrder placeMarketOrder(String symbol, BigDecimal orderQuanti return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), null, "Market", executionInstructions); } + + public BitmexPrivateOrder placeLimitOrder(String symbol, BigDecimal orderQuantity, BigDecimal price, String executionInstructions) { + return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), + price, "Limit", executionInstructions); + } } From fd456a50b2cb99cc589f94e7e91f833344bc68db Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 14:28:42 -0600 Subject: [PATCH 040/117] [bitmex] implement placeStopOrder --- .../src/main/java/org/knowm/xchange/bitmex/Bitmex.java | 1 + .../knowm/xchange/bitmex/service/BitmexTradeService.java | 4 +++- .../xchange/bitmex/service/BitmexTradeServiceRaw.java | 9 +++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index 0a3bca198..eda37d76b 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -116,6 +116,7 @@ BitmexPrivateOrder placeOrder(@HeaderParam("api-key") String apiKey, @FormParam("symbol") String symbol, @FormParam("orderQty") int orderQuantity, @FormParam("price") BigDecimal price, + @Nullable @FormParam("stopPx") BigDecimal stopPrice, @Nullable @FormParam("ordType") String orderType, @Nullable @FormParam("execInst") String executionInstructions); } \ No newline at end of file diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 7720cf0f5..32f039f1f 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -79,7 +79,9 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { @Override public String placeStopOrder(StopOrder stopOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); + String symbol = stopOrder.getCurrencyPair().base.getCurrencyCode() + stopOrder.getCurrencyPair().counter.getCurrencyCode(); + BitmexPrivateOrder order = placeStopOrder(symbol, stopOrder.getOriginalAmount(), stopOrder.getStopPrice(), null); + return order.getId(); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index a42c45a08..6a5942cbd 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -60,11 +60,16 @@ public List getBitmexOrders() throws IOException { public BitmexPrivateOrder placeMarketOrder(String symbol, BigDecimal orderQuantity, String executionInstructions) { return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), - null, "Market", executionInstructions); + null, null, "Market", executionInstructions); } public BitmexPrivateOrder placeLimitOrder(String symbol, BigDecimal orderQuantity, BigDecimal price, String executionInstructions) { return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), - price, "Limit", executionInstructions); + price, null, "Limit", executionInstructions); + } + + public BitmexPrivateOrder placeStopOrder(String symbol, BigDecimal orderQuantity, BigDecimal stopPrice, String executionInstructions) { + return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), + null, stopPrice, "Stop", executionInstructions); } } From cd35ad8db5b6a643e055aa222c871981da9e0336 Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 20:40:50 +0000 Subject: [PATCH 041/117] [gatecoin] metadata - fixed price scale and added min amount --- xchange-gatecoin/src/main/resources/gatecoin.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xchange-gatecoin/src/main/resources/gatecoin.json b/xchange-gatecoin/src/main/resources/gatecoin.json index f3fcb5769..2a65d4e6c 100644 --- a/xchange-gatecoin/src/main/resources/gatecoin.json +++ b/xchange-gatecoin/src/main/resources/gatecoin.json @@ -22,7 +22,8 @@ "price_scale": 8 }, "BCH/BTC": { - "price_scale": 8 + "price_scale": 5, + "min_amount": 0.001 }, "LTC/BTC": { "price_scale": 8 From bc5bc487368b098f045a366dbb6f845c34f01dc9 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 15:13:25 -0600 Subject: [PATCH 042/117] [bitmex] implement cancelOrder --- .../src/main/java/org/knowm/xchange/bitmex/Bitmex.java | 7 +++++++ .../knowm/xchange/bitmex/service/BitmexTradeService.java | 2 +- .../xchange/bitmex/service/BitmexTradeServiceRaw.java | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index eda37d76b..2cd5618bd 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -119,4 +119,11 @@ BitmexPrivateOrder placeOrder(@HeaderParam("api-key") String apiKey, @Nullable @FormParam("stopPx") BigDecimal stopPrice, @Nullable @FormParam("ordType") String orderType, @Nullable @FormParam("execInst") String executionInstructions); + + @DELETE + @Path("order") + List cancelOrder(@HeaderParam("api-key") String apiKey, + @HeaderParam("api-nonce") SynchronizedValueFactory nonce, + @HeaderParam("api-signature") ParamsDigest paramsDigest, + @FormParam("orderID") String orderID); } \ No newline at end of file diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java index 32f039f1f..4d29747d0 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeService.java @@ -86,7 +86,7 @@ public String placeStopOrder(StopOrder stopOrder) throws IOException { @Override public boolean cancelOrder(String orderId) throws IOException { - throw new NotYetImplementedForExchangeException(); + return cancelBitmexOrder(orderId); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java index 6a5942cbd..2a2444faa 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexTradeServiceRaw.java @@ -72,4 +72,9 @@ public BitmexPrivateOrder placeStopOrder(String symbol, BigDecimal orderQuantity return bitmex.placeOrder(apiKey, exchange.getNonceFactory(), signatureCreator, symbol, orderQuantity.intValue(), null, stopPrice, "Stop", executionInstructions); } + + public boolean cancelBitmexOrder(String orderID) { + List orders = bitmex.cancelOrder(apiKey, exchange.getNonceFactory(), signatureCreator, orderID); + return orders.get(0).getId().equals(orderID); + } } From b0dd6f13c62f06297ae239f0df8bc17e8ed5d5b6 Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 22:56:14 +0000 Subject: [PATCH 043/117] [cexio] metadata - fixed min amount --- xchange-cexio/src/main/resources/cexio.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-cexio/src/main/resources/cexio.json b/xchange-cexio/src/main/resources/cexio.json index 885486385..e23ff7229 100644 --- a/xchange-cexio/src/main/resources/cexio.json +++ b/xchange-cexio/src/main/resources/cexio.json @@ -103,7 +103,7 @@ "XRP/EUR": { "price_scale": 4, "trading_fee": 0.0015, - "min_amount": 10 + "min_amount": 40 }, "XRP/BTC": { "price_scale": 8, From 7f563b5ad18594a1850ea7dbf541e5428eabf040 Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 22:59:58 +0000 Subject: [PATCH 044/117] [cexio] metadata - fixed min amount (reverting https://github.com/npomfret/XChange/commit/bbbe4494c2d3e99140d8be155e40de311bc4206e) --- xchange-cexio/src/main/resources/cexio.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-cexio/src/main/resources/cexio.json b/xchange-cexio/src/main/resources/cexio.json index e23ff7229..1f5fcbdd4 100644 --- a/xchange-cexio/src/main/resources/cexio.json +++ b/xchange-cexio/src/main/resources/cexio.json @@ -98,7 +98,7 @@ "XRP/USD": { "price_scale": 4, "trading_fee": 0.0015, - "min_amount": 10 + "min_amount": 40 }, "XRP/EUR": { "price_scale": 4, From ed01139dd1bd6c09b05a752e5d559986480a9742 Mon Sep 17 00:00:00 2001 From: npomfret Date: Fri, 9 Feb 2018 23:29:13 +0000 Subject: [PATCH 045/117] [quadrigia] metadata - fixed min amount for LTC/BTC --- xchange-quadrigacx/src/main/resources/quadrigacx.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xchange-quadrigacx/src/main/resources/quadrigacx.json b/xchange-quadrigacx/src/main/resources/quadrigacx.json index ac1865672..350ecc9b8 100644 --- a/xchange-quadrigacx/src/main/resources/quadrigacx.json +++ b/xchange-quadrigacx/src/main/resources/quadrigacx.json @@ -6,11 +6,11 @@ }, "BTC/USD": { "price_scale": 2, - "min_amount": 0.00500000 + "min_amount": 0.005 }, "ETH/BTC": { "price_scale": 8, - "min_amount": 0.00000100 + "min_amount": 0.000001 }, "ETH/CAD": { "price_scale": 2, @@ -26,7 +26,7 @@ }, "LTC/BTC": { "price_scale": 8, - "min_amount": 0.00000001 + "min_amount": 0.01 } }, "currencies": { From 2e9250a2557bacb075d7c05154b0d78d91a82ab7 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 17:53:50 -0600 Subject: [PATCH 046/117] [bitmex] implement requestDepositAddress --- .../src/main/java/org/knowm/xchange/bitmex/Bitmex.java | 7 +++++++ .../xchange/bitmex/service/BitmexAccountService.java | 2 +- .../xchange/bitmex/service/BitmexAccountServiceRaw.java | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index 2cd5618bd..aaed623b5 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -126,4 +126,11 @@ List cancelOrder(@HeaderParam("api-key") String apiKey, @HeaderParam("api-nonce") SynchronizedValueFactory nonce, @HeaderParam("api-signature") ParamsDigest paramsDigest, @FormParam("orderID") String orderID); + + @GET + @Path("user/depositAddress") + String getDepositAddress(@HeaderParam("api-key") String apiKey, + @HeaderParam("api-nonce") SynchronizedValueFactory nonce, + @HeaderParam("api-signature") ParamsDigest paramsDigest, + @QueryParam("currency") String currency); } \ No newline at end of file diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java index ed4484a41..be1e71b4e 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java @@ -44,7 +44,7 @@ public String withdrawFunds(WithdrawFundsParams params) throws IOException { @Override public String requestDepositAddress(Currency currency, String... args) throws IOException { - throw new NotYetImplementedForExchangeException(); + return requestDepositAddress(currency.getCurrencyCode()); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java index fa8991bdb..5a2531c59 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java @@ -81,4 +81,12 @@ public List getBitmexMarginAccountsStatus() throws IOExcept } } + public String requestDepositAddress(String currency) throws IOException { + try { + return bitmex.getDepositAddress(apiKey, exchange.getNonceFactory(), signatureCreator, currency); + } catch (BitmexException e) { + throw handleError(e); + } + } + } From 323966d77f1c5e9ce4e03b6664a8032da1aab769 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 9 Feb 2018 18:08:24 -0600 Subject: [PATCH 047/117] [bitmex] implement withdrawFunds --- .../src/main/java/org/knowm/xchange/bitmex/Bitmex.java | 9 +++++++++ .../xchange/bitmex/service/BitmexAccountService.java | 2 +- .../bitmex/service/BitmexAccountServiceRaw.java | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index aaed623b5..06dd04b1d 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -133,4 +133,13 @@ String getDepositAddress(@HeaderParam("api-key") String apiKey, @HeaderParam("api-nonce") SynchronizedValueFactory nonce, @HeaderParam("api-signature") ParamsDigest paramsDigest, @QueryParam("currency") String currency); + + @POST + @Path("user/requestWithdrawal") + BitmexWalletTransaction withdrawFunds(@HeaderParam("api-key") String apiKey, + @HeaderParam("api-nonce") SynchronizedValueFactory nonce, + @HeaderParam("api-signature") ParamsDigest paramsDigest, + @FormParam("currency") String currency, + @FormParam("amount") BigDecimal amount, + @FormParam("address") String address); } \ No newline at end of file diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java index be1e71b4e..a58fd77fb 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java @@ -34,7 +34,7 @@ public AccountInfo getAccountInfo() throws IOException { @Override public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException { - throw new NotYetImplementedForExchangeException(); + return withdrawFunds(currency.getCurrencyCode(), amount, address); } @Override diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java index 5a2531c59..470fc787a 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java @@ -1,6 +1,7 @@ package org.knowm.xchange.bitmex.service; import java.io.IOException; +import java.math.BigDecimal; import java.util.List; import org.knowm.xchange.Exchange; @@ -89,4 +90,13 @@ public String requestDepositAddress(String currency) throws IOException { } } + public String withdrawFunds(String currency, BigDecimal amount, String address) throws IOException { + try { + BitmexWalletTransaction transaction = bitmex.withdrawFunds(apiKey, exchange.getNonceFactory(), signatureCreator, currency, amount, address); + return transaction.getTransactID(); + } catch (BitmexException e) { + throw handleError(e); + } + } + } From 3e171b6fc944eed2dac8c0faa81b148f2b9da3bf Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sat, 10 Feb 2018 01:18:02 +0100 Subject: [PATCH 048/117] core: add PARTIALLY_CANCELED to OrderStatus enum an option in Bibox exchange --- xchange-core/src/main/java/org/knowm/xchange/dto/Order.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java b/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java index 1a41c8c6d..e943e4097 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java +++ b/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java @@ -63,6 +63,10 @@ public enum OrderStatus { * Waiting to be removed from order book at exchange */ PENDING_CANCEL, + /** + * Order was partially canceled at exchange + */ + PARTIALLY_CANCELED, /** * Removed from order book at exchange */ From 10844ccd11226bed653fc6d20c1441e5150b9280 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sat, 10 Feb 2018 01:23:02 +0100 Subject: [PATCH 049/117] [Bibox] implement TradeService.getOpenOrders() call --- .../xchange/bibox/BiboxAuthenticated.java | 13 + .../xchange/bibox/dto/BiboxAdapters.java | 22 ++ .../bibox/dto/trade/BiboxAccountType.java | 13 +- .../bibox/dto/trade/BiboxOpenOrder.java | 288 ++++++++++++++++++ .../bibox/dto/trade/BiboxOpenOrders.java | 106 +++++++ .../trade/BiboxOrderPendingListCommand.java | 13 + .../BiboxOrderPendingListCommandBody.java | 80 +++++ .../bibox/dto/trade/BiboxOrderSide.java | 26 +- .../bibox/dto/trade/BiboxOrderStatus.java | 53 ++++ .../bibox/dto/trade/BiboxOrderType.java | 14 + .../bibox/service/BiboxTradeService.java | 4 +- .../bibox/service/BiboxTradeServiceRaw.java | 9 + .../dto/trade/BiboxTradeUnmarshalTest.java | 62 ++++ .../resources/trade/example-open-orders.json | 45 +++ 14 files changed, 742 insertions(+), 6 deletions(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrder.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrders.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommand.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommandBody.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderStatus.java create mode 100644 xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java create mode 100644 xchange-bibox/src/test/resources/trade/example-open-orders.json diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index b2af5087c..9f3fd32d8 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -11,6 +11,7 @@ import org.knowm.xchange.bibox.dto.BiboxSingleResponse; import org.knowm.xchange.bibox.dto.account.BiboxCoin; +import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrders; import si.mazi.rescu.ParamsDigest; @@ -61,4 +62,16 @@ BiboxSingleResponse cancelTrade( @FormParam(FORM_CMDS) String cmds, @FormParam(FORM_APIKEY) String apiKey, @FormParam(FORM_SIGNATURE) ParamsDigest signature); + + /** + * Obtain open order list + * + * @return open orders + */ + @POST + @Path("orderpending") + BiboxSingleResponse orderPendingList( + @FormParam(FORM_CMDS) String cmds, + @FormParam(FORM_APIKEY) String apiKey, + @FormParam(FORM_SIGNATURE) ParamsDigest signature); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index 0f691c2f9..d9a792e01 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -6,6 +6,8 @@ import org.knowm.xchange.bibox.dto.account.BiboxCoin; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrder; +import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrders; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBookEntry; import org.knowm.xchange.currency.Currency; @@ -17,6 +19,7 @@ import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.OpenOrders; /** * @author odrotleff @@ -68,4 +71,23 @@ public static LimitOrder adaptOrderBookOrder(BiboxOrderBookEntry entry, OrderTyp .originalAmount(entry.getVolume()) .build(); } + + public static OpenOrders adaptOpenOrders(BiboxOpenOrders biboxOpenOrders) { + return new OpenOrders(biboxOpenOrders.getItems().stream() + .map(BiboxAdapters::adaptLimitOpenOrder) + .collect(Collectors.toList())); + } + + private static LimitOrder adaptLimitOpenOrder(BiboxOpenOrder biboxOrder) { + CurrencyPair currencyPair = new CurrencyPair(biboxOrder.getCoinSymbol(), biboxOrder.getCurrencySymbol()); + return new LimitOrder.Builder(biboxOrder.getOrderSide().getOrderType(), currencyPair) + .id(String.valueOf(biboxOrder.getId())) + .timestamp(new Date(biboxOrder.getCreatedAt())) + .limitPrice(biboxOrder.getPrice()) + .originalAmount(biboxOrder.getAmount()) + .cumulativeAmount(biboxOrder.getDealAmount()) + .remainingAmount(biboxOrder.getUnexecuted()) + .orderStatus(biboxOrder.getStatus().getOrderStatus()) + .build(); + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java index 354c185ee..13134514a 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxAccountType.java @@ -6,7 +6,7 @@ public enum BiboxAccountType { REGULAR(0), MARGIN(1); - + private int accountType; private BiboxAccountType(int accountType) { @@ -16,4 +16,15 @@ private BiboxAccountType(int accountType) { public int asInt() { return accountType; } + + public static BiboxAccountType fromInt(int accountType) { + switch (accountType) { + case 0: + return REGULAR; + case 1: + return MARGIN; + default: + throw new RuntimeException("Unexpected Bibox account type!"); + } + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrder.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrder.java new file mode 100644 index 000000000..8bab91397 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrder.java @@ -0,0 +1,288 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * @author odrotleff + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({"id", "createdAt", "account_type", "coin_symbol", "currency_symbol", "order_side", "order_type", "price", "amount", "money", + "deal_amount", "deal_percent", "status", "unexecuted"}) +public class BiboxOpenOrder { + + @JsonProperty("id") + private long id; + @JsonProperty("createdAt") + private long createdAt; + @JsonProperty("account_type") + private BiboxAccountType accountType; + @JsonProperty("coin_symbol") + private String coinSymbol; + @JsonProperty("currency_symbol") + private String currencySymbol; + @JsonProperty("order_side") + private BiboxOrderSide orderSide; + @JsonProperty("order_type") + private BiboxOrderType orderType; + @JsonProperty("price") + private BigDecimal price; + @JsonProperty("amount") + private BigDecimal amount; + @JsonProperty("money") + private BigDecimal money; + @JsonProperty("deal_amount") + private BigDecimal dealAmount; + @JsonProperty("deal_percent") + private String dealPercent; + @JsonProperty("status") + private BiboxOrderStatus status; + @JsonProperty("unexecuted") + private BigDecimal unexecuted; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * @return The id + */ + @JsonProperty("id") + public long getId() { + return id; + } + + /** + * @param id The id + */ + @JsonProperty("id") + public void setId(long id) { + this.id = id; + } + + /** + * @return The createdAt + */ + @JsonProperty("createdAt") + public long getCreatedAt() { + return createdAt; + } + + /** + * @param createdAt The createdAt + */ + @JsonProperty("createdAt") + public void setCreatedAt(long createdAt) { + this.createdAt = createdAt; + } + + /** + * @return The accountType + */ + @JsonProperty("account_type") + public BiboxAccountType getAccountType() { + return accountType; + } + + /** + * @param accountType The account_type + */ + @JsonProperty("account_type") + public void setAccountType(BiboxAccountType accountType) { + this.accountType = accountType; + } + + /** + * @return The coinSymbol + */ + @JsonProperty("coin_symbol") + public String getCoinSymbol() { + return coinSymbol; + } + + /** + * @param coinSymbol The coin_symbol + */ + @JsonProperty("coin_symbol") + public void setCoinSymbol(String coinSymbol) { + this.coinSymbol = coinSymbol; + } + + /** + * @return The currencySymbol + */ + @JsonProperty("currency_symbol") + public String getCurrencySymbol() { + return currencySymbol; + } + + /** + * @param currencySymbol The currency_symbol + */ + @JsonProperty("currency_symbol") + public void setCurrencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + } + + /** + * @return The orderSide + */ + @JsonProperty("order_side") + public BiboxOrderSide getOrderSide() { + return orderSide; + } + + /** + * @param orderSide The order_side + */ + @JsonProperty("order_side") + public void setOrderSide(BiboxOrderSide orderSide) { + this.orderSide = orderSide; + } + + /** + * @return The orderType + */ + @JsonProperty("order_type") + public BiboxOrderType getOrderType() { + return orderType; + } + + /** + * @param orderType The order_type + */ + @JsonProperty("order_type") + public void setOrderType(BiboxOrderType orderType) { + this.orderType = orderType; + } + + /** + * @return The price + */ + @JsonProperty("price") + public BigDecimal getPrice() { + return price; + } + + /** + * @param price The price + */ + @JsonProperty("price") + public void setPrice(BigDecimal price) { + this.price = price; + } + + /** + * @return The amount + */ + @JsonProperty("amount") + public BigDecimal getAmount() { + return amount; + } + + /** + * @param amount The amount + */ + @JsonProperty("amount") + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + /** + * @return The money + */ + @JsonProperty("money") + public BigDecimal getMoney() { + return money; + } + + /** + * @param money The money + */ + @JsonProperty("money") + public void setMoney(BigDecimal money) { + this.money = money; + } + + /** + * @return The dealAmount + */ + @JsonProperty("deal_amount") + public BigDecimal getDealAmount() { + return dealAmount; + } + + /** + * @param dealAmount The deal_amount + */ + @JsonProperty("deal_amount") + public void setDealAmount(BigDecimal dealAmount) { + this.dealAmount = dealAmount; + } + + /** + * @return The dealPercent + */ + @JsonProperty("deal_percent") + public String getDealPercent() { + return dealPercent; + } + + /** + * @param dealPercent The deal_percent + */ + @JsonProperty("deal_percent") + public void setDealPercent(String dealPercent) { + this.dealPercent = dealPercent; + } + + /** + * @return The status + */ + @JsonProperty("status") + public BiboxOrderStatus getStatus() { + return status; + } + + /** + * @param status The status + */ + @JsonProperty("status") + public void setStatus(BiboxOrderStatus status) { + this.status = status; + } + + /** + * @return The unexecuted + */ + @JsonProperty("unexecuted") + public BigDecimal getUnexecuted() { + return unexecuted; + } + + /** + * @param unexecuted The unexecuted + */ + @JsonProperty("unexecuted") + public void setUnexecuted(BigDecimal unexecuted) { + this.unexecuted = unexecuted; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrders.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrders.java new file mode 100644 index 000000000..0395cc2d9 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrders.java @@ -0,0 +1,106 @@ +package org.knowm.xchange.bibox.dto.trade; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * @author odrotleff + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "count", + "page", + "items" +}) +public class BiboxOpenOrders { + + @JsonProperty("count") + private Integer count; + @JsonProperty("page") + private Integer page; + @JsonProperty("items") + private List items = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * + * @return + * The count + */ + @JsonProperty("count") + public Integer getCount() { + return count; + } + + /** + * + * @param count + * The count + */ + @JsonProperty("count") + public void setCount(Integer count) { + this.count = count; + } + + /** + * + * @return + * The page + */ + @JsonProperty("page") + public Integer getPage() { + return page; + } + + /** + * + * @param page + * The page + */ + @JsonProperty("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * + * @return + * The items + */ + @JsonProperty("items") + public List getItems() { + return items; + } + + /** + * + * @param items + * The items + */ + @JsonProperty("items") + public void setItems(List items) { + this.items = items; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommand.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommand.java new file mode 100644 index 000000000..bb44adf1d --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommand.java @@ -0,0 +1,13 @@ +package org.knowm.xchange.bibox.dto.trade; + +import org.knowm.xchange.bibox.dto.BiboxCommand; + +/** + * @author odrotleff + */ +public class BiboxOrderPendingListCommand extends BiboxCommand { + + public BiboxOrderPendingListCommand(BiboxOrderPendingListCommandBody body) { + super("orderpending/orderPendingList", body); + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommandBody.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommandBody.java new file mode 100644 index 000000000..078a7942a --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderPendingListCommandBody.java @@ -0,0 +1,80 @@ +package org.knowm.xchange.bibox.dto.trade; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * @author odrotleff + */ +public class BiboxOrderPendingListCommandBody { + + /** + * the currency pair + */ + private String pair; + + @JsonProperty("account_type") + private BiboxAccountType accountType; + + private int page; + + private int size; + + /** + * the base currency + */ + @JsonProperty("coin_symbol") + private String coinSymbol; + + /** + * the counter currency + */ + @JsonProperty("currency_symbol") + private String currencySymbol; + + @JsonProperty("order_side") + private BiboxOrderSide orderSide; + + public BiboxOrderPendingListCommandBody(int page, int size) { + this(null, null, page, size, null, null, null); + } + + public BiboxOrderPendingListCommandBody(String pair, BiboxAccountType accountType, int page, int size, String coinSymbol, String currencySymbol, + BiboxOrderSide orderSide) { + super(); + this.pair = pair; + this.accountType = accountType; + this.page = page; + this.size = size; + this.coinSymbol = coinSymbol; + this.currencySymbol = currencySymbol; + this.orderSide = orderSide; + } + + public String getPair() { + return pair; + } + + public BiboxAccountType getAccountType() { + return accountType; + } + + public int getPage() { + return page; + } + + public int getSize() { + return size; + } + + public String getCoinSymbol() { + return coinSymbol; + } + + public String getCurrencySymbol() { + return currencySymbol; + } + + public BiboxOrderSide getOrderSide() { + return orderSide; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java index 2aa6dbc23..6fe92f3d0 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderSide.java @@ -3,23 +3,31 @@ import org.knowm.xchange.dto.Order.OrderType; import org.knowm.xchange.exceptions.ExchangeException; +import com.fasterxml.jackson.annotation.JsonCreator; + /** * @author odrotleff */ public enum BiboxOrderSide { - BID(1), - ASK(2); + BID(1, OrderType.BID), + ASK(2, OrderType.ASK); private int orderSide; + private OrderType orderType; - private BiboxOrderSide(int orderSide) { + private BiboxOrderSide(int orderSide, OrderType orderType) { this.orderSide = orderSide; + this.orderType = orderType; } public int asInt() { return orderSide; } + public OrderType getOrderType() { + return orderType; + } + public static BiboxOrderSide fromOrderType(OrderType orderType) { switch (orderType) { case BID: @@ -30,4 +38,16 @@ public static BiboxOrderSide fromOrderType(OrderType orderType) { throw new ExchangeException("Order type " + orderType + " unsupported."); } } + + @JsonCreator + public static BiboxOrderSide fromInt(int orderSide) { + switch (orderSide) { + case 1: + return BID; + case 2: + return ASK; + default: + throw new ExchangeException("Unexpected Bibox order side."); + } + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderStatus.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderStatus.java new file mode 100644 index 000000000..d97138d73 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderStatus.java @@ -0,0 +1,53 @@ +package org.knowm.xchange.bibox.dto.trade; + +import org.knowm.xchange.dto.Order.OrderStatus; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * @author odrotleff + */ +public enum BiboxOrderStatus { + PENDING(1, OrderStatus.NEW), + PART_COMPLETED(2, OrderStatus.PARTIALLY_FILLED), + COMPLETED(3, OrderStatus.FILLED), + PART_CANCELED(4, OrderStatus.PARTIALLY_CANCELED), + CANCELLED(5, OrderStatus.CANCELED), + CANCELLING(6, OrderStatus.PENDING_CANCEL); + + private int orderStatus; + private OrderStatus xchangeStatus; + + private BiboxOrderStatus(int orderStatus, OrderStatus xchangeStatus) { + this.orderStatus = orderStatus; + this.xchangeStatus = xchangeStatus; + } + + public int asInt() { + return orderStatus; + } + + public OrderStatus getOrderStatus() { + return xchangeStatus; + } + + @JsonCreator + public static BiboxOrderStatus fromInt(int orderStatus) { + switch (orderStatus) { + case 1: + return PENDING; + case 2: + return PART_COMPLETED; + case 3: + return COMPLETED; + case 4: + return PART_CANCELED; + case 5: + return CANCELLED; + case 6: + return CANCELLING; + default: + throw new RuntimeException("Unexpected Bibox order status!"); + } + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java index ad36db4d1..2b5edafc7 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderType.java @@ -1,5 +1,7 @@ package org.knowm.xchange.bibox.dto.trade; +import com.fasterxml.jackson.annotation.JsonCreator; + /** * @author odrotleff */ @@ -16,4 +18,16 @@ private BiboxOrderType(int orderType) { public int asInt() { return orderType; } + + @JsonCreator + public static BiboxOrderType fromInt(int orderType) { + switch (orderType) { + case 1: + return MARKET_ORDER; + case 2: + return LIMIT_ORDER; + default: + throw new RuntimeException("Unexpected Bibox order type!"); + } + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index 5fdba7188..ca509b721 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -4,6 +4,7 @@ import java.util.Collection; import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.dto.BiboxAdapters; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; @@ -26,8 +27,7 @@ public BiboxTradeService(Exchange exchange) { @Override public OpenOrders getOpenOrders() throws IOException { - // TODO Auto-generated method stub - return null; + return BiboxAdapters.adaptOpenOrders(getBiboxOpenOrders()); } @Override diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java index 7486b2980..7ae37d4cd 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java @@ -7,6 +7,9 @@ import org.knowm.xchange.bibox.dto.BiboxCommands; import org.knowm.xchange.bibox.dto.trade.BiboxAccountType; import org.knowm.xchange.bibox.dto.trade.BiboxCancelTradeCommand; +import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrders; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommand; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommandBody; import org.knowm.xchange.bibox.dto.trade.BiboxOrderSide; import org.knowm.xchange.bibox.dto.trade.BiboxOrderType; import org.knowm.xchange.bibox.dto.trade.BiboxTradeCommand; @@ -38,4 +41,10 @@ public void cancelBiboxOrder(String orderId) { BiboxCancelTradeCommand cmd = new BiboxCancelTradeCommand(new BigInteger(orderId)); bibox.cancelTrade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); } + + public BiboxOpenOrders getBiboxOpenOrders() { + BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, Integer.MAX_VALUE); // wonder if this actually works + BiboxOrderPendingListCommand cmd = new BiboxOrderPendingListCommand(body); + return bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + } } diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java new file mode 100644 index 000000000..47b379ac3 --- /dev/null +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java @@ -0,0 +1,62 @@ +package org.knowm.xchange.bibox.dto.trade; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import java.math.BigDecimal; + +import org.junit.Test; +import org.knowm.xchange.bibox.BiboxTestUtils; +import org.knowm.xchange.bibox.dto.BiboxSingleResponse; + +import com.fasterxml.jackson.core.type.TypeReference; + +/** + * Test Trade JSON parsing + * + * @author odrotleff + */ +public class BiboxTradeUnmarshalTest { + + @Test + public void testOpenOrdersUnmarshal() throws IOException { + + BiboxSingleResponse response = + BiboxTestUtils.getResponse(new TypeReference>() {}, + "/trade/example-open-orders.json"); + assertThat(response.get().getCmd()).isEqualTo("orderpending/orderPendingList"); + + BiboxOpenOrders orders = response.get().getResult(); + assertThat(orders.getItems()).hasSize(2); + + BiboxOpenOrder first = orders.getItems().get(0); + assertThat(first.getId()).isEqualTo(242640813L); + assertThat(first.getCreatedAt()).isEqualTo(1518218031000L); + assertThat(first.getAccountType()).isEqualTo(BiboxAccountType.REGULAR); + assertThat(first.getCoinSymbol()).isEqualTo("ETC"); + assertThat(first.getCurrencySymbol()).isEqualTo("ETH"); + assertThat(first.getOrderSide()).isEqualTo(BiboxOrderSide.ASK); + assertThat(first.getOrderType()).isEqualTo(BiboxOrderType.LIMIT_ORDER); + assertThat(first.getPrice()).isEqualTo(new BigDecimal("1.00000000")); + assertThat(first.getAmount()).isEqualTo(new BigDecimal("0.0400")); + assertThat(first.getMoney()).isEqualTo(new BigDecimal("0.04000000")); + assertThat(first.getDealAmount()).isEqualTo(new BigDecimal("0.0000")); + assertThat(first.getUnexecuted()).isEqualTo(new BigDecimal("0.0400")); + assertThat(first.getStatus()).isEqualTo(BiboxOrderStatus.PENDING); + + BiboxOpenOrder second = orders.getItems().get(1); + assertThat(second.getId()).isEqualTo(242640017L); + assertThat(second.getCreatedAt()).isEqualTo(1518218019000L); + assertThat(second.getAccountType()).isEqualTo(BiboxAccountType.REGULAR); + assertThat(second.getCoinSymbol()).isEqualTo("ETC"); + assertThat(second.getCurrencySymbol()).isEqualTo("ETH"); + assertThat(second.getOrderSide()).isEqualTo(BiboxOrderSide.ASK); + assertThat(second.getOrderType()).isEqualTo(BiboxOrderType.LIMIT_ORDER); + assertThat(second.getPrice()).isEqualTo(new BigDecimal("1.00000000")); + assertThat(second.getAmount()).isEqualTo(new BigDecimal("0.1000")); + assertThat(second.getMoney()).isEqualTo(new BigDecimal("0.10000000")); + assertThat(second.getDealAmount()).isEqualTo(new BigDecimal("0.0000")); + assertThat(second.getUnexecuted()).isEqualTo(new BigDecimal("0.1000")); + assertThat(second.getStatus()).isEqualTo(BiboxOrderStatus.PENDING); + } +} diff --git a/xchange-bibox/src/test/resources/trade/example-open-orders.json b/xchange-bibox/src/test/resources/trade/example-open-orders.json new file mode 100644 index 000000000..22b688519 --- /dev/null +++ b/xchange-bibox/src/test/resources/trade/example-open-orders.json @@ -0,0 +1,45 @@ +{ + "result":[ + { + "result":{ + "count":2, + "page":1, + "items":[ + { + "id":242640813, + "createdAt":1518218031000, + "account_type":0, + "coin_symbol":"ETC", + "currency_symbol":"ETH", + "order_side":2, + "order_type":2, + "price":"1.00000000", + "amount":"0.0400", + "money":"0.04000000", + "deal_amount":"0.0000", + "deal_percent":"0.00%", + "status":1, + "unexecuted":"0.0400" + }, + { + "id":242640017, + "createdAt":1518218019000, + "account_type":0, + "coin_symbol":"ETC", + "currency_symbol":"ETH", + "order_side":2, + "order_type":2, + "price":"1.00000000", + "amount":"0.1000", + "money":"0.10000000", + "deal_amount":"0.0000", + "deal_percent":"0.00%", + "status":1, + "unexecuted":"0.1000" + } + ] + }, + "cmd":"orderpending/orderPendingList" + } + ] +} \ No newline at end of file From 28e79c1f5f58c3a4bf8e16d6a0d4848442382b87 Mon Sep 17 00:00:00 2001 From: bharris Date: Sat, 10 Feb 2018 15:20:28 -0800 Subject: [PATCH 050/117] [abucoins] Fixing name in pom which was cut-n-paste from another module. --- xchange-abucoins/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-abucoins/pom.xml b/xchange-abucoins/pom.xml index b037cc7e2..a8e1b7186 100644 --- a/xchange-abucoins/pom.xml +++ b/xchange-abucoins/pom.xml @@ -11,7 +11,7 @@ xchange-abucoins - XChange Cex.io + XChange Abucoins XChange implementation for the Abucoins Exchange http://knowm.org/open-source/xchange/ From 8059edd020f7290230fd6e7dc0ff956a3d0c5e39 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sat, 10 Feb 2018 23:15:37 +0100 Subject: [PATCH 051/117] [Bibox] implement retrieving all markets (used for metadata later) --- .../java/org/knowm/xchange/bibox/Bibox.java | 15 + .../bibox/dto/marketdata/BiboxMarket.java | 323 ++++++++++++++++++ .../service/BiboxMarketDataServiceRaw.java | 11 + .../BiboxMarketdataUnmarshalTest.java | 45 +++ .../marketdata/example-all-markets.json | 41 +++ 5 files changed, 435 insertions(+) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarket.java create mode 100644 xchange-bibox/src/test/resources/marketdata/example-all-markets.json diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java index 9298414c6..8b9844333 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java @@ -1,6 +1,7 @@ package org.knowm.xchange.bibox; import java.io.IOException; +import java.util.List; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -9,6 +10,7 @@ import javax.ws.rs.core.MediaType; import org.knowm.xchange.bibox.dto.BiboxResponse; +import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; @@ -41,4 +43,17 @@ BiboxResponse orderBook( @QueryParam("cmd") String cmd, @QueryParam("pair") String pair, @QueryParam("size") Integer size) throws IOException, BiboxException; + + /** + * Retrieves all tickers. + * + * @param cmd always "marketAll" + * @return + * @throws IOException + * @throws BiboxException + */ + @GET + @Path("mdata") + BiboxResponse> marketAll(@QueryParam("cmd") String cmd) + throws IOException, BiboxException; } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarket.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarket.java new file mode 100644 index 000000000..4e7100389 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarket.java @@ -0,0 +1,323 @@ +package org.knowm.xchange.bibox.dto.marketdata; + +import java.math.BigDecimal; + +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * @author odrotleff + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "id", + "coin_symbol", + "currency_symbol", + "last", + "high", + "low", + "change", + "percent", + "vol24H", + "amount", + "last_cny", + "high_cny", + "low_cny", + "last_usd", + "high_usd", + "low_usd" +}) +public class BiboxMarket { + + @JsonProperty("id") + private long id; + @JsonProperty("coin_symbol") + private String coinSymbol; + @JsonProperty("currency_symbol") + private String currencySymbol; + @JsonProperty("last") + private BigDecimal last; + @JsonProperty("high") + private BigDecimal high; + @JsonProperty("low") + private BigDecimal low; + @JsonProperty("change") + private BigDecimal change; + @JsonProperty("percent") + private String percent; + @JsonProperty("vol24H") + private BigDecimal vol24H; + @JsonProperty("amount") + private BigDecimal amount; + @JsonProperty("last_cny") + private BigDecimal lastCny; + @JsonProperty("high_cny") + private BigDecimal highCny; + @JsonProperty("low_cny") + private BigDecimal lowCny; + @JsonProperty("last_usd") + private BigDecimal lastUsd; + @JsonProperty("high_usd") + private BigDecimal highUsd; + @JsonProperty("low_usd") + private BigDecimal lowUsd; + + /** + * @return The id + */ + @JsonProperty("id") + public long getId() { + return id; + } + + /** + * @param id The id + */ + @JsonProperty("id") + public void setId(long id) { + this.id = id; + } + + /** + * @return The coinSymbol + */ + @JsonProperty("coin_symbol") + public String getCoinSymbol() { + return coinSymbol; + } + + /** + * @param coinSymbol The coin_symbol + */ + @JsonProperty("coin_symbol") + public void setCoinSymbol(String coinSymbol) { + this.coinSymbol = coinSymbol; + } + + /** + * @return The currencySymbol + */ + @JsonProperty("currency_symbol") + public String getCurrencySymbol() { + return currencySymbol; + } + + /** + * @param currencySymbol The currency_symbol + */ + @JsonProperty("currency_symbol") + public void setCurrencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + } + + /** + * @return The last + */ + @JsonProperty("last") + public BigDecimal getLast() { + return last; + } + + /** + * @param last The last + */ + @JsonProperty("last") + public void setLast(BigDecimal last) { + this.last = last; + } + + /** + * @return The high + */ + @JsonProperty("high") + public BigDecimal getHigh() { + return high; + } + + /** + * @param high The high + */ + @JsonProperty("high") + public void setHigh(BigDecimal high) { + this.high = high; + } + + /** + * @return The low + */ + @JsonProperty("low") + public BigDecimal getLow() { + return low; + } + + /** + * @param low The low + */ + @JsonProperty("low") + public void setLow(BigDecimal low) { + this.low = low; + } + + /** + * @return The change + */ + @JsonProperty("change") + public BigDecimal getChange() { + return change; + } + + /** + * @param change The change + */ + @JsonProperty("change") + public void setChange(BigDecimal change) { + this.change = change; + } + + /** + * @return The percent + */ + @JsonProperty("percent") + public String getPercent() { + return percent; + } + + /** + * @param percent The percent + */ + @JsonProperty("percent") + public void setPercent(String percent) { + this.percent = percent; + } + + /** + * @return The vol24H + */ + @JsonProperty("vol24H") + public BigDecimal getVol24H() { + return vol24H; + } + + /** + * @param vol24H The vol24H + */ + @JsonProperty("vol24H") + public void setVol24H(BigDecimal vol24H) { + this.vol24H = vol24H; + } + + /** + * @return The amount + */ + @JsonProperty("amount") + public BigDecimal getAmount() { + return amount; + } + + /** + * @param amount The amount + */ + @JsonProperty("amount") + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + /** + * @return The lastCny + */ + @JsonProperty("last_cny") + public BigDecimal getLastCny() { + return lastCny; + } + + /** + * @param lastCny The last_cny + */ + @JsonProperty("last_cny") + public void setLastCny(BigDecimal lastCny) { + this.lastCny = lastCny; + } + + /** + * @return The highCny + */ + @JsonProperty("high_cny") + public BigDecimal getHighCny() { + return highCny; + } + + /** + * @param highCny The high_cny + */ + @JsonProperty("high_cny") + public void setHighCny(BigDecimal highCny) { + this.highCny = highCny; + } + + /** + * @return The lowCny + */ + @JsonProperty("low_cny") + public BigDecimal getLowCny() { + return lowCny; + } + + /** + * @param lowCny The low_cny + */ + @JsonProperty("low_cny") + public void setLowCny(BigDecimal lowCny) { + this.lowCny = lowCny; + } + + /** + * @return The lastUsd + */ + @JsonProperty("last_usd") + public BigDecimal getLastUsd() { + return lastUsd; + } + + /** + * @param lastUsd The last_usd + */ + @JsonProperty("last_usd") + public void setLastUsd(BigDecimal lastUsd) { + this.lastUsd = lastUsd; + } + + /** + * @return The highUsd + */ + @JsonProperty("high_usd") + public BigDecimal getHighUsd() { + return highUsd; + } + + /** + * @param highUsd The high_usd + */ + @JsonProperty("high_usd") + public void setHighUsd(BigDecimal highUsd) { + this.highUsd = highUsd; + } + + /** + * @return The lowUsd + */ + @JsonProperty("low_usd") + public BigDecimal getLowUsd() { + return lowUsd; + } + + /** + * @param lowUsd The low_usd + */ + @JsonProperty("low_usd") + public void setLowUsd(BigDecimal lowUsd) { + this.lowUsd = lowUsd; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java index 7ed40ef3b..d857c3200 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -3,10 +3,12 @@ import static org.knowm.xchange.bibox.dto.BiboxAdapters.toBiboxPair; import java.io.IOException; +import java.util.List; import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.BiboxException; import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import org.knowm.xchange.currency.CurrencyPair; @@ -16,6 +18,7 @@ public class BiboxMarketDataServiceRaw extends BiboxBaseService { private static final String TICKER_CMD = "ticker"; private static final String DEPTH_CMD = "depth"; + private static final String ALL_TICKERS_CMD = "marketAll"; protected BiboxMarketDataServiceRaw(Exchange exchange) { super(exchange); @@ -36,4 +39,12 @@ public BiboxOrderBook getBiboxOrderBook(CurrencyPair currencyPair, Integer depth throw new ExchangeException(e.getMessage()); } } + + public List getAllBiboxTickers() throws IOException { + try { + return bibox.marketAll(ALL_TICKERS_CMD).getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } + } } diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java index d57270559..5a7d20533 100644 --- a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/marketdata/BiboxMarketdataUnmarshalTest.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.math.BigDecimal; +import java.util.List; import org.junit.Test; import org.knowm.xchange.bibox.BiboxTestUtils; @@ -55,4 +56,48 @@ public void testOrderBookUnmarshal() throws IOException { assertThat(orderBook.getBids().get(0).getPrice()).isEqualTo(BigDecimal.valueOf(0.00010179)); assertThat(orderBook.getBids().get(0).getVolume()).isEqualTo(BigDecimal.valueOf(127.7667)); } + + @Test + public void testAllMarketsUnmarshal() throws IOException { + BiboxResponse> response = BiboxTestUtils.getResponse( + new TypeReference>>() {}, "/marketdata/example-all-markets.json"); + assertThat(response.getCmd()).isEqualTo("marketAll"); + + List markets = response.getResult(); + assertThat(markets).hasSize(2); + + BiboxMarket first = markets.get(0); + assertThat(first.getId()).isEqualTo(1); + assertThat(first.getCoinSymbol()).isEqualTo("BIX"); + assertThat(first.getCurrencySymbol()).isEqualTo("BTC"); + assertThat(first.getLast()).isEqualTo(new BigDecimal("0.00010186")); + assertThat(first.getHigh()).isEqualTo(new BigDecimal("0.00012146")); + assertThat(first.getLow()).isEqualTo(new BigDecimal("0.00009950")); + assertThat(first.getChange()).isEqualTo(new BigDecimal("-0.00001812")); + assertThat(first.getVol24H()).isEqualTo(new BigDecimal("6511185")); + assertThat(first.getAmount()).isEqualTo(new BigDecimal("706.60")); + assertThat(first.getLastCny()).isEqualTo(new BigDecimal("5.25")); + assertThat(first.getHighCny()).isEqualTo(new BigDecimal("6.26")); + assertThat(first.getLowCny()).isEqualTo(new BigDecimal("5.13")); + assertThat(first.getLastUsd()).isEqualTo(new BigDecimal("0.83")); + assertThat(first.getHighUsd()).isEqualTo(new BigDecimal("0.99")); + assertThat(first.getLowUsd()).isEqualTo(new BigDecimal("0.81")); + + BiboxMarket second = markets.get(1); + assertThat(second.getId()).isEqualTo(2); + assertThat(second.getCoinSymbol()).isEqualTo("BIX"); + assertThat(second.getCurrencySymbol()).isEqualTo("ETH"); + assertThat(second.getLast()).isEqualTo(new BigDecimal("0.00100755")); + assertThat(second.getHigh()).isEqualTo(new BigDecimal("0.00124305")); + assertThat(second.getLow()).isEqualTo(new BigDecimal("0.00095500")); + assertThat(second.getChange()).isEqualTo(new BigDecimal("-0.00019295")); + assertThat(second.getVol24H()).isEqualTo(new BigDecimal("6359569")); + assertThat(second.getAmount()).isEqualTo(new BigDecimal("6835.14")); + assertThat(second.getLastCny()).isEqualTo(new BigDecimal("5.25")); + assertThat(second.getHighCny()).isEqualTo(new BigDecimal("6.48")); + assertThat(second.getLowCny()).isEqualTo(new BigDecimal("4.98")); + assertThat(second.getLastUsd()).isEqualTo(new BigDecimal("0.83")); + assertThat(second.getHighUsd()).isEqualTo(new BigDecimal("1.03")); + assertThat(second.getLowUsd()).isEqualTo(new BigDecimal("0.79")); + } } diff --git a/xchange-bibox/src/test/resources/marketdata/example-all-markets.json b/xchange-bibox/src/test/resources/marketdata/example-all-markets.json new file mode 100644 index 000000000..8299af71a --- /dev/null +++ b/xchange-bibox/src/test/resources/marketdata/example-all-markets.json @@ -0,0 +1,41 @@ +{ + "result":[ + { + "id":1, + "coin_symbol":"BIX", + "currency_symbol":"BTC", + "last":"0.00010186", + "high":"0.00012146", + "low":"0.00009950", + "change":"-0.00001812", + "percent":"-15.10%", + "vol24H":"6511185", + "amount":"706.60", + "last_cny":"5.25", + "high_cny":"6.26", + "low_cny":"5.13", + "last_usd":"0.83", + "high_usd":"0.99", + "low_usd":"0.81" + }, + { + "id":2, + "coin_symbol":"BIX", + "currency_symbol":"ETH", + "last":"0.00100755", + "high":"0.00124305", + "low":"0.00095500", + "change":"-0.00019295", + "percent":"-16.07%", + "vol24H":"6359569", + "amount":"6835.14", + "last_cny":"5.25", + "high_cny":"6.48", + "low_cny":"4.98", + "last_usd":"0.83", + "high_usd":"1.03", + "low_usd":"0.79" + } + ], + "cmd":"marketAll" +} \ No newline at end of file From 06101c40c76ad3615ab3f4b20bfb9befe960db22 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 00:29:40 +0100 Subject: [PATCH 052/117] [Bibox] implement remoteInit(), add static metadata Haven't looked that hard, but it looks like there is not a lot of info you can get via the API. --- .../knowm/xchange/bibox/BiboxExchange.java | 15 ++-- .../xchange/bibox/dto/BiboxAdapters.java | 15 +++- .../bibox/service/BiboxMarketDataService.java | 10 +++ .../service/BiboxMarketDataServiceRaw.java | 5 +- xchange-bibox/src/main/resources/bibox.json | 90 ++++++++++++++++++- 5 files changed, 124 insertions(+), 11 deletions(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java index 43cc7bbdf..e435bb517 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxExchange.java @@ -1,11 +1,14 @@ package org.knowm.xchange.bibox; +import java.io.IOException; + import org.knowm.xchange.BaseExchange; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeSpecification; import org.knowm.xchange.bibox.service.BiboxAccountService; import org.knowm.xchange.bibox.service.BiboxMarketDataService; import org.knowm.xchange.bibox.service.BiboxTradeService; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.utils.nonce.CurrentTimeNonceFactory; import si.mazi.rescu.SynchronizedValueFactory; @@ -16,7 +19,6 @@ public class BiboxExchange extends BaseExchange implements Exchange { @Override protected void initServices() { - this.marketDataService = new BiboxMarketDataService(this); this.accountService = new BiboxAccountService(this); this.tradeService = new BiboxTradeService(this); @@ -24,7 +26,6 @@ protected void initServices() { @Override public ExchangeSpecification getDefaultExchangeSpecification() { - ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); exchangeSpecification.setSslUri("https://api.bibox.com/"); exchangeSpecification.setHost("bibox.com"); @@ -37,13 +38,11 @@ public ExchangeSpecification getDefaultExchangeSpecification() { @Override public SynchronizedValueFactory getNonceFactory() { - return nonceFactory; } - // @Override - // public void remoteInit() throws IOException, ExchangeException { - // - // exchangeMetaData = ((BiboxMarketDataService) marketDataService).getMetadata(); - // } + @Override + public void remoteInit() throws IOException, ExchangeException { + exchangeMetaData = ((BiboxMarketDataService) marketDataService).getMetadata(); + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index d9a792e01..b9d5222f1 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -1,10 +1,13 @@ package org.knowm.xchange.bibox.dto; import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; import org.knowm.xchange.bibox.dto.account.BiboxCoin; +import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrder; import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrders; @@ -18,6 +21,8 @@ import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.dto.meta.CurrencyPairMetaData; +import org.knowm.xchange.dto.meta.ExchangeMetaData; import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.OpenOrders; @@ -77,7 +82,7 @@ public static OpenOrders adaptOpenOrders(BiboxOpenOrders biboxOpenOrders) { .map(BiboxAdapters::adaptLimitOpenOrder) .collect(Collectors.toList())); } - + private static LimitOrder adaptLimitOpenOrder(BiboxOpenOrder biboxOrder) { CurrencyPair currencyPair = new CurrencyPair(biboxOrder.getCoinSymbol(), biboxOrder.getCurrencySymbol()); return new LimitOrder.Builder(biboxOrder.getOrderSide().getOrderType(), currencyPair) @@ -90,4 +95,12 @@ private static LimitOrder adaptLimitOpenOrder(BiboxOpenOrder biboxOrder) { .orderStatus(biboxOrder.getStatus().getOrderStatus()) .build(); } + + public static ExchangeMetaData adaptMetadata(List markets) { + Map pairMeta = new HashMap<>(); + for (BiboxMarket biboxMarket : markets) { + pairMeta.put(new CurrencyPair(biboxMarket.getCoinSymbol(), biboxMarket.getCurrencySymbol()), new CurrencyPairMetaData(null, null, null, null)); + } + return new ExchangeMetaData(pairMeta, null, null, null, null); + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java index 63c25a82b..962857d5e 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java @@ -1,14 +1,17 @@ package org.knowm.xchange.bibox.service; import java.io.IOException; +import java.util.List; import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.marketdata.Trades; +import org.knowm.xchange.dto.meta.ExchangeMetaData; import org.knowm.xchange.service.marketdata.MarketDataService; /** @@ -18,6 +21,8 @@ *
    *
  • Provides access to various market data values
  • *
+ * + * @author odrotleff */ public class BiboxMarketDataService extends BiboxMarketDataServiceRaw implements MarketDataService { @@ -54,4 +59,9 @@ public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOExce // TODO Auto-generated method stub return null; } + + public ExchangeMetaData getMetadata() throws IOException { + List markets = getAllBiboxMarkets(); + return BiboxAdapters.adaptMetadata(markets); + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java index d857c3200..7884687e6 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -14,6 +14,9 @@ import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.exceptions.ExchangeException; +/** + * @author odrotleff + */ public class BiboxMarketDataServiceRaw extends BiboxBaseService { private static final String TICKER_CMD = "ticker"; @@ -40,7 +43,7 @@ public BiboxOrderBook getBiboxOrderBook(CurrencyPair currencyPair, Integer depth } } - public List getAllBiboxTickers() throws IOException { + public List getAllBiboxMarkets() throws IOException { try { return bibox.marketAll(ALL_TICKERS_CMD).getResult(); } catch (BiboxException e) { diff --git a/xchange-bibox/src/main/resources/bibox.json b/xchange-bibox/src/main/resources/bibox.json index 9e26dfeeb..1cdccfaf9 100644 --- a/xchange-bibox/src/main/resources/bibox.json +++ b/xchange-bibox/src/main/resources/bibox.json @@ -1 +1,89 @@ -{} \ No newline at end of file +{ + "currency_pairs" : { + "BIX/BTC" : { }, + "SBTC/BTC" : { }, + "WAX/ETH" : { }, + "SNOV/BTC" : { }, + "EOS/BTC" : { }, + "DTA/ETH" : { }, + "AWR/BTC" : { }, + "JNT/ETH" : { }, + "BCH/BTC" : { }, + "MANA/ETH" : { }, + "BLT/ETH" : { }, + "CAG/ETH" : { }, + "AIDOC/BTC" : { }, + "GTO/BTC" : { }, + "SXUT/BTC" : { }, + "BTC/USDT" : { }, + "TNB/ETH" : { }, + "CPC/BTC" : { }, + "GTC/BTC" : { }, + "SHOW/BTC" : { }, + "TNC/BTC" : { }, + "CPC/ETH" : { }, + "GTC/ETH" : { }, + "AMM/ETH" : { }, + "CMT/BTC" : { }, + "GNX/ETH" : { }, + "MOT/ETH" : { }, + "RDN/BTC" : { }, + "LTC/BTC" : { }, + "LEND/BTC" : { }, + "BTM/BTC" : { }, + "CZR/BTC" : { }, + "ETH/BTC" : { }, + "C20/ETH" : { }, + "ELF/ETH" : { }, + "BTC/DAI" : { }, + "PRA/ETH" : { }, + "BTO/ETH" : { }, + "DTA/BTC" : { }, + "AWR/ETH" : { }, + "JNT/BTC" : { }, + "TNB/BTC" : { }, + "BLT/BTC" : { }, + "BIX/ETH" : { }, + "CAG/BTC" : { }, + "SBTC/ETH" : { }, + "WAX/BTC" : { }, + "SXUT/ETH" : { }, + "SNOV/ETH" : { }, + "EOS/ETH" : { }, + "BCH/ETH" : { }, + "MANA/BTC" : { }, + "ITC/BTC" : { }, + "BIX/USDT" : { }, + "HPB/BTC" : { }, + "AIDOC/ETH" : { }, + "GTO/ETH" : { }, + "MKR/BTC" : { }, + "CAT/BTC" : { }, + "ETH/USDT" : { }, + "ETC/BTC" : { }, + "LTC/USDT" : { }, + "ITC/ETH" : { }, + "HPB/ETH" : { }, + "MKR/ETH" : { }, + "GNX/BTC" : { }, + "CAT/ETH" : { }, + "MOT/BTC" : { }, + "ETC/ETH" : { }, + "SHOW/ETH" : { }, + "EOS/USDT" : { }, + "AMM/BTC" : { }, + "CMT/ETH" : { }, + "C20/BTC" : { }, + "ELF/BTC" : { }, + "PRA/BTC" : { }, + "ETH/DAI" : { }, + "BTO/BTC" : { }, + "RDN/ETH" : { }, + "TNC/ETH" : { }, + "LTC/ETH" : { }, + "LEND/ETH" : { }, + "BTM/ETH" : { }, + "CZR/ETH" : { } + }, + "share_rate_limits" : false +} \ No newline at end of file From 4b2a3d3250b103da343cfc7d6ef886f031032d2a Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 00:54:59 +0100 Subject: [PATCH 053/117] [Bibox] add NotYetImplementedForExchangeExceptions To show what's still missing --- .../bibox/service/BiboxAccountService.java | 16 ++++------ .../bibox/service/BiboxMarketDataService.java | 4 +-- .../bibox/service/BiboxTradeService.java | 31 +++++++------------ 3 files changed, 19 insertions(+), 32 deletions(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java index 297082c6d..d2443976d 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java @@ -9,6 +9,7 @@ import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; import org.knowm.xchange.dto.account.FundingRecord; +import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.TradeHistoryParams; import org.knowm.xchange.service.trade.params.WithdrawFundsParams; @@ -30,31 +31,26 @@ public AccountInfo getAccountInfo() throws IOException { @Override public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public String withdrawFunds(WithdrawFundsParams params) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public String requestDepositAddress(Currency currency, String... args) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public TradeHistoryParams createFundingHistoryParams() { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public List getFundingHistory(TradeHistoryParams params) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java index 962857d5e..45843ebc8 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java @@ -12,6 +12,7 @@ import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.marketdata.Trades; import org.knowm.xchange.dto.meta.ExchangeMetaData; +import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.marketdata.MarketDataService; /** @@ -56,8 +57,7 @@ public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws @Override public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } public ExchangeMetaData getMetadata() throws IOException { diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index ca509b721..254289d2c 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -11,6 +11,7 @@ import org.knowm.xchange.dto.trade.OpenOrders; import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; +import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderParams; import org.knowm.xchange.service.trade.params.TradeHistoryParams; @@ -32,14 +33,12 @@ public OpenOrders getOpenOrders() throws IOException { @Override public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public String placeMarketOrder(MarketOrder marketOrder) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override @@ -55,49 +54,41 @@ public boolean cancelOrder(String orderId) throws IOException { @Override public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { - // TODO Auto-generated method stub - return false; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public TradeHistoryParams createTradeHistoryParams() { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public OpenOrdersParams createOpenOrdersParams() { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public void verifyOrder(MarketOrder marketOrder) { - // TODO Auto-generated method stub - + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public Collection getOrder(String... orderIds) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public String placeStopOrder(StopOrder arg0) throws IOException { - // TODO Auto-generated method stub - return null; + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } @Override public void verifyOrder(LimitOrder limitOrder) { - // TODO Auto-generated method stub - + throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } } From 09db518dd7badb7f91e5e590d9b4a62c95e52d84 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 01:48:18 +0100 Subject: [PATCH 054/117] [Bibox] Add examples for Bibox exchange --- xchange-examples/pom.xml | 6 ++ .../examples/bibox/BiboxExamplesUtils.java | 19 +++++ .../bibox/account/BiboxAccountDemo.java | 43 ++++++++++ .../bibox/marketdata/BiboxMarketDataDemo.java | 61 ++++++++++++++ .../examples/bibox/trade/BiboxTradeDemo.java | 82 +++++++++++++++++++ 5 files changed, 211 insertions(+) create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/BiboxExamplesUtils.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/account/BiboxAccountDemo.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/marketdata/BiboxMarketDataDemo.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/trade/BiboxTradeDemo.java diff --git a/xchange-examples/pom.xml b/xchange-examples/pom.xml index 337a5cdf4..4deccaece 100755 --- a/xchange-examples/pom.xml +++ b/xchange-examples/pom.xml @@ -56,6 +56,12 @@ xchange-wex ${project.version} + + + ${project.groupId} + xchange-bibox + ${project.version} + ${project.groupId} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/BiboxExamplesUtils.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/BiboxExamplesUtils.java new file mode 100644 index 000000000..c2b97b7db --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/BiboxExamplesUtils.java @@ -0,0 +1,19 @@ +package org.knowm.xchange.examples.bibox; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.bibox.BiboxExchange; + +public class BiboxExamplesUtils { + + public static Exchange getExchange() { + + ExchangeSpecification exSpec = new ExchangeSpecification(BiboxExchange.class); + exSpec.setApiKey("your-api-key"); + exSpec.setSecretKey("your-secret-key"); + + return ExchangeFactory.INSTANCE.createExchange(exSpec); + } + +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/account/BiboxAccountDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/account/BiboxAccountDemo.java new file mode 100644 index 000000000..ee09c5515 --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/account/BiboxAccountDemo.java @@ -0,0 +1,43 @@ +package org.knowm.xchange.examples.bibox.account; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.dto.account.BiboxCoin; +import org.knowm.xchange.bibox.service.BiboxAccountServiceRaw; +import org.knowm.xchange.currency.Currency; +import org.knowm.xchange.dto.account.Balance; +import org.knowm.xchange.examples.bibox.BiboxExamplesUtils; +import org.knowm.xchange.service.account.AccountService; + +public class BiboxAccountDemo { + + public static void main(String[] args) throws IOException { + + Exchange exchange = BiboxExamplesUtils.getExchange(); + + AccountService accountService = exchange.getAccountService(); + + generic(accountService); + raw((BiboxAccountServiceRaw) accountService); + } + + private static void generic(AccountService accountService) throws IOException { + + System.out.println("----------GENERIC---------"); + + Map balances = accountService.getAccountInfo().getWallet().getBalances(); + System.out.println(balances); + + } + + private static void raw(BiboxAccountServiceRaw accountService) throws IOException { + + System.out.println("------------RAW-----------"); + + List balances = accountService.getBiboxAccountInfo(); + System.out.println(balances); + } +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/marketdata/BiboxMarketDataDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/marketdata/BiboxMarketDataDemo.java new file mode 100644 index 000000000..3437f7cfe --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/marketdata/BiboxMarketDataDemo.java @@ -0,0 +1,61 @@ +package org.knowm.xchange.examples.bibox.marketdata; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.bibox.BiboxExchange; +import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; +import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; +import org.knowm.xchange.bibox.service.BiboxMarketDataServiceRaw; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.service.marketdata.MarketDataService; + +public class BiboxMarketDataDemo { + + private static final CurrencyPair PAIR = CurrencyPair.ETH_BTC; + static Exchange exchange; + + public static void main(String[] args) throws IOException { + + exchange = ExchangeFactory.INSTANCE.createExchange(BiboxExchange.class.getName()); + MarketDataService marketDataService = exchange.getMarketDataService(); + + System.out.println(Arrays.toString(exchange.getExchangeSymbols().toArray())); + + generic(marketDataService); + raw((BiboxMarketDataServiceRaw) marketDataService); + + } + + private static void generic(MarketDataService marketDataService) throws IOException { + + System.out.println("----------GENERIC---------"); + + System.out.println("Market data for " + PAIR + ":"); + Ticker ticker = marketDataService.getTicker(PAIR); + System.out.println(ticker); + + OrderBook orderBook = marketDataService.getOrderBook(PAIR); + System.out.println(orderBook); + } + + private static void raw(BiboxMarketDataServiceRaw marketDataService) throws IOException { + + System.out.println("------------RAW-----------"); + + BiboxTicker tickerResponse = marketDataService.getBiboxTicker(PAIR); + System.out.println(tickerResponse); + + List tickersResponse = marketDataService.getAllBiboxMarkets(); + System.out.println(tickersResponse); + + BiboxOrderBook orderBookResponse = marketDataService.getBiboxOrderBook(PAIR, 10); + System.out.println(orderBookResponse); + } +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/trade/BiboxTradeDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/trade/BiboxTradeDemo.java new file mode 100644 index 000000000..1c72e04f3 --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/bibox/trade/BiboxTradeDemo.java @@ -0,0 +1,82 @@ +package org.knowm.xchange.examples.bibox.trade; + +import java.io.IOException; +import java.math.BigDecimal; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.service.BiboxTradeServiceRaw; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.Order.OrderType; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.examples.bibox.BiboxExamplesUtils; +import org.knowm.xchange.service.trade.TradeService; + +public class BiboxTradeDemo { + + private static final LimitOrder LIMIT_ORDER = new LimitOrder.Builder(OrderType.ASK, CurrencyPair.ETC_ETH) + .limitPrice(new BigDecimal("100.0")) + .originalAmount(new BigDecimal(".1")) + .build(); + + public static void main(String[] args) throws IOException { + + Exchange exchange = BiboxExamplesUtils.getExchange(); + + TradeService tradeService = exchange.getTradeService(); + + generic(tradeService); + raw((BiboxTradeServiceRaw) tradeService); + + } + + private static void generic(TradeService tradeService) throws IOException { + try { + String uuid = tradeService.placeLimitOrder(LIMIT_ORDER); + System.out.println("Order successfully placed. ID=" + uuid); + + Thread.sleep(1000); // wait for order to propagate + + System.out.println(tradeService.getOpenOrders()); + + System.out.println("Attempting to cancel order " + uuid); + boolean cancelled = tradeService.cancelOrder(uuid); + + if (cancelled) { + System.out.println("Order successfully canceled."); + } else { + System.out.println("Order not successfully canceled."); + } + + Thread.sleep(1000); // wait for cancellation to propagate + + System.out.println(); + System.out.println(tradeService.getOpenOrders()); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static void raw(BiboxTradeServiceRaw tradeService) throws IOException { + try { + Integer orderId = tradeService.placeBiboxLimitOrder(LIMIT_ORDER); + System.out.println("Order successfully placed. ID=" + orderId); + + Thread.sleep(1000); // wait for order to propagate + + System.out.println(); + System.out.println(tradeService.getBiboxOpenOrders()); + + System.out.println("Attempting to cancel order " + orderId); + tradeService.cancelBiboxOrder(orderId.toString()); + + Thread.sleep(1000); // wait for cancellation to propagate + + System.out.println(); + System.out.println(tradeService.getBiboxOpenOrders()); + + } catch (Exception e) { + e.printStackTrace(); + } + } +} From 9a58c62ed859ae2144819beae6f4edb1571d85ab Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 02:21:07 +0100 Subject: [PATCH 055/117] [Bibox] Add Bibox module to parent pom --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index b1791285d..76e07f273 100755 --- a/pom.xml +++ b/pom.xml @@ -88,6 +88,7 @@ xchange-abucoins xchange-anx xchange-acx + xchange-bibox xchange-binance xchange-bitbay xchange-bitcoinaverage From 430b358a073d33e6e31e720c7443bdc9b190b452 Mon Sep 17 00:00:00 2001 From: Jim Northrup Date: Sun, 11 Feb 2018 08:25:00 +0700 Subject: [PATCH 056/117] bitmex: actually returns AccountInfo object with wallet and Balance as documented. there is a parmeter that cnanot be sent a null, so it was commented out. Bitmex only offers btc wallets. fixes #2264 kucoin: kucoin was reporting only available Balance, not total. fixes #2279 --- .../java/org/knowm/xchange/bitmex/Bitmex.java | 4 +- .../bitmex/service/BitmexAccountService.java | 91 ++--- .../service/BitmexAccountServiceRaw.java | 101 +++--- .../xchange/kucoin/dto/KucoinAdapters.java | 323 +++++++++--------- 4 files changed, 268 insertions(+), 251 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index 06dd04b1d..0ef138ddb 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -34,8 +34,8 @@ BitmexAccount getAccount(@HeaderParam("api-key") String apiKey, @HeaderParam("ap @GET @Path("user/wallet") - BitmexWallet getWallet(@HeaderParam("api-key") String apiKey, @HeaderParam("api-nonce") SynchronizedValueFactory nonce, @HeaderParam("api-signature") ParamsDigest paramsDigest, - @Nullable @QueryParam("currency") String currency) throws IOException; + BitmexWallet getWallet(@HeaderParam("api-key") String apiKey, @HeaderParam("api-nonce") SynchronizedValueFactory nonce, @HeaderParam("api-signature") ParamsDigest paramsDigest/*, + @Nullable @QueryParam("currency") String currency*/) throws IOException; // Get a history of all of your wallet transactions (deposits, withdrawals, PNL) @GET diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java index a58fd77fb..d343296e4 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountService.java @@ -6,9 +6,12 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.bitmex.dto.account.BitmexAccount; +import org.knowm.xchange.bitmex.dto.account.BitmexWallet; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; +import org.knowm.xchange.dto.account.Balance; import org.knowm.xchange.dto.account.FundingRecord; +import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.TradeHistoryParams; @@ -16,45 +19,53 @@ public class BitmexAccountService extends BitmexAccountServiceRaw implements AccountService { - /** - * Constructor - * - * @param exchange - */ - public BitmexAccountService(Exchange exchange) { - - super(exchange); - } - - @Override - public AccountInfo getAccountInfo() throws IOException { - BitmexAccount account = super.getBitmexAccountInfo(); - return new AccountInfo(account.getUsername()); - } - - @Override - public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException { - return withdrawFunds(currency.getCurrencyCode(), amount, address); - } - - @Override - public String withdrawFunds(WithdrawFundsParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public String requestDepositAddress(Currency currency, String... args) throws IOException { - return requestDepositAddress(currency.getCurrencyCode()); - } - - @Override - public TradeHistoryParams createFundingHistoryParams() { - throw new NotYetImplementedForExchangeException(); - } - - @Override - public List getFundingHistory(TradeHistoryParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); - } + /** + * Constructor + * + * @param exchange + */ + public BitmexAccountService(Exchange exchange) { + + super(exchange); + } + + @Override + public AccountInfo getAccountInfo() throws IOException { + BitmexAccount account = super.getBitmexAccountInfo(); + BitmexWallet bitmexWallet = getBitmexWallet(); + String username = account.getUsername(); + BigDecimal amount = bitmexWallet.getAmount(); + BigDecimal amt = amount.divide(BigDecimal.valueOf(100_000_000L)); + Balance balance = new Balance(Currency.BTC, amt); + Wallet wallet = new Wallet(Currency.BTC.getSymbol(), balance + ); + AccountInfo accountInfo = new AccountInfo(username, wallet); + return accountInfo; + } + + @Override + public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException { + return withdrawFunds(currency.getCurrencyCode(), amount, address); + } + + @Override + public String withdrawFunds(WithdrawFundsParams params) throws IOException { + throw new NotYetImplementedForExchangeException(); + } + + @Override + public String requestDepositAddress(Currency currency, String... args) throws IOException { + return requestDepositAddress(currency.getCurrencyCode()); + } + + @Override + public TradeHistoryParams createFundingHistoryParams() { + throw new NotYetImplementedForExchangeException(); + } + + @Override + public List getFundingHistory(TradeHistoryParams params) throws IOException { + throw new NotYetImplementedForExchangeException(); + } } diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java index 470fc787a..d486878de 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexAccountServiceRaw.java @@ -5,30 +5,33 @@ import java.util.List; import org.knowm.xchange.Exchange; +import org.knowm.xchange.bitmex.Bitmex; import org.knowm.xchange.bitmex.BitmexException; import org.knowm.xchange.bitmex.dto.account.BitmexAccount; import org.knowm.xchange.bitmex.dto.account.BitmexMarginAccount; import org.knowm.xchange.bitmex.dto.account.BitmexWallet; import org.knowm.xchange.bitmex.dto.account.BitmexWalletTransaction; import org.knowm.xchange.currency.Currency; +import org.knowm.xchange.dto.account.Balance; +import org.knowm.xchange.dto.account.Wallet; public class BitmexAccountServiceRaw extends BitmexBaseService { - String apiKey = exchange.getExchangeSpecification().getApiKey(); + String apiKey = exchange.getExchangeSpecification().getApiKey(); - /** - * Constructor - * - * @param exchange - */ + /** + * Constructor + * + * @param exchange + */ - public BitmexAccountServiceRaw(Exchange exchange) { + public BitmexAccountServiceRaw(Exchange exchange) { - super(exchange); + super(exchange); - } + } - public BitmexAccount getBitmexAccountInfo() throws IOException { + public BitmexAccount getBitmexAccountInfo() throws IOException { try { return bitmex.getAccount(apiKey, exchange.getNonceFactory(), signatureCreator); @@ -37,66 +40,66 @@ public BitmexAccount getBitmexAccountInfo() throws IOException { } } - public BitmexWallet getBitmexWallet(Currency ccy) throws IOException { + public BitmexWallet getBitmexWallet(Currency... ccy) throws IOException { try { - return bitmex.getWallet(apiKey, exchange.getNonceFactory(), signatureCreator, ccy.getCurrencyCode()); + return bitmex.getWallet(apiKey, exchange.getNonceFactory(), signatureCreator/*, ccy.length>0?ccy[0].getCurrencyCode():null*/); } catch (BitmexException e) { throw handleError(e); } } - public List getBitmexWalletHistory(Currency ccy) throws IOException { + public List getBitmexWalletHistory(Currency ccy) throws IOException { - try { - return bitmex.getWalletHistory(apiKey, exchange.getNonceFactory(), signatureCreator, ccy.getCurrencyCode()); - } catch (BitmexException e) { - throw handleError(e); + try { + return bitmex.getWalletHistory(apiKey, exchange.getNonceFactory(), signatureCreator, ccy.getCurrencyCode()); + } catch (BitmexException e) { + throw handleError(e); + } } - } - public List getBitmexWalletSummary(Currency ccy) throws IOException { + public List getBitmexWalletSummary(Currency ccy) throws IOException { - try { - return bitmex.getWalletSummary(apiKey, exchange.getNonceFactory(), signatureCreator, ccy.getCurrencyCode()); - } catch (BitmexException e) { - throw handleError(e); + try { + return bitmex.getWalletSummary(apiKey, exchange.getNonceFactory(), signatureCreator, ccy.getCurrencyCode()); + } catch (BitmexException e) { + throw handleError(e); + } } - } - public BitmexMarginAccount getBitmexMarginAccountStatus(Currency ccy) throws IOException { + public BitmexMarginAccount getBitmexMarginAccountStatus(Currency ccy) throws IOException { - try { - return bitmex.getMarginAccountStatus(apiKey, exchange.getNonceFactory(), signatureCreator, ccy.getCurrencyCode()); - } catch (BitmexException e) { - throw handleError(e); + try { + return bitmex.getMarginAccountStatus(apiKey, exchange.getNonceFactory(), signatureCreator, ccy.getCurrencyCode()); + } catch (BitmexException e) { + throw handleError(e); + } } - } - public List getBitmexMarginAccountsStatus() throws IOException { + public List getBitmexMarginAccountsStatus() throws IOException { - try { - return bitmex.getMarginAccountsStatus(apiKey, exchange.getNonceFactory(), signatureCreator); - } catch (BitmexException e) { - throw handleError(e); + try { + return bitmex.getMarginAccountsStatus(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitmexException e) { + throw handleError(e); + } } - } - public String requestDepositAddress(String currency) throws IOException { - try { - return bitmex.getDepositAddress(apiKey, exchange.getNonceFactory(), signatureCreator, currency); - } catch (BitmexException e) { - throw handleError(e); + public String requestDepositAddress(String currency) throws IOException { + try { + return bitmex.getDepositAddress(apiKey, exchange.getNonceFactory(), signatureCreator, currency); + } catch (BitmexException e) { + throw handleError(e); + } } - } - public String withdrawFunds(String currency, BigDecimal amount, String address) throws IOException { - try { - BitmexWalletTransaction transaction = bitmex.withdrawFunds(apiKey, exchange.getNonceFactory(), signatureCreator, currency, amount, address); - return transaction.getTransactID(); - } catch (BitmexException e) { - throw handleError(e); + public String withdrawFunds(String currency, BigDecimal amount, String address) throws IOException { + try { + BitmexWalletTransaction transaction = bitmex.withdrawFunds(apiKey, exchange.getNonceFactory(), signatureCreator, currency, amount, address); + return transaction.getTransactID(); + } catch (BitmexException e) { + throw handleError(e); + } } - } } diff --git a/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java b/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java index 8f4fdc798..b699b9de4 100644 --- a/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java +++ b/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java @@ -38,164 +38,167 @@ public class KucoinAdapters { - public static String adaptCurrencyPair(CurrencyPair pair) { - - return pair.base.getCurrencyCode() + "-" + pair.counter.getCurrencyCode(); - } - - public static Ticker adaptTicker(KucoinResponse tickResponse, CurrencyPair pair) { - - KucoinTicker kcTick = tickResponse.getData(); - return new Ticker.Builder() - .currencyPair(pair) - .bid(kcTick.getBuy()) - .ask(kcTick.getSell()) - .high(kcTick.getHigh()) - .low(kcTick.getLow()) - .last(kcTick.getLastDealPrice()) - .volume(kcTick.getVol()) - .quoteVolume(kcTick.getVolValue()) - .timestamp(new Date(kcTick.getDatetime())) - .build(); - } - - public static OrderBook adaptOrderBook(KucoinResponse response, - CurrencyPair currencyPair) { - - KucoinOrderBook kcOrders = response.getData(); - Date timestamp = new Date(response.getTimestamp()); - List asks = new LinkedList<>(); - kcOrders.getSell().stream() - .forEach(s -> asks.add(adaptLimitOrder(currencyPair, OrderType.ASK, s, timestamp))); - List bids = new LinkedList<>(); - kcOrders.getBuy().stream() - .forEach(s -> bids.add(adaptLimitOrder(currencyPair, OrderType.BID, s, timestamp))); - return new OrderBook(timestamp, asks, bids); - } - - public static Trade adaptTrade(KucoinDealOrder kucoinTrade, CurrencyPair currencyPair) { - - return new Trade(kucoinTrade.getOrderType().getOrderType(), - kucoinTrade.getAmount(), currencyPair, kucoinTrade.getPrice(), - new Date(kucoinTrade.getTimestamp()), null); - } - - private static LimitOrder adaptLimitOrder(CurrencyPair currencyPair, OrderType orderType, - List kucoinLimitOrder, Date timestamp) { - - return new LimitOrder(orderType, kucoinLimitOrder.get(1), currencyPair, null, timestamp, kucoinLimitOrder.get(0)); - } - - public static OpenOrders adaptActiveOrders(CurrencyPair currencyPair, KucoinActiveOrders data) { - - List openOrders = new LinkedList<>(); - data.getBuy().stream().forEach(order -> openOrders.add(adaptActiveOrder(currencyPair, order))); - data.getSell().stream().forEach(order -> openOrders.add(adaptActiveOrder(currencyPair, order))); - return new OpenOrders(openOrders); - } - - private static LimitOrder adaptActiveOrder(CurrencyPair currencyPair, KucoinActiveOrder order) { - - return new LimitOrder.Builder(order.getOrderType().getOrderType(), currencyPair) - .timestamp(order.getTimestamp()) - .id(order.getOrderOid()) - .limitPrice(order.getPrice()) - .originalAmount(order.getAmount()) // this might be the remaining amount, not sure - .cumulativeAmount(order.getDealAmount()) - .orderStatus(order.getDealAmount().compareTo(BigDecimal.ZERO) == 0 ? - OrderStatus.NEW : OrderStatus.PARTIALLY_FILLED) - .build(); - } - - public static UserTrades adaptUserTrades(List orders) { - - List trades = new LinkedList<>(); - orders.stream().forEach(order -> trades.add(adaptUserTrade(order))); - return new UserTrades(trades, TradeSortType.SortByTimestamp); - } - - private static UserTrade adaptUserTrade(KucoinDealtOrder order) { - - return new UserTrade.Builder() - .currencyPair(new CurrencyPair(order.getCoinType(), order.getCoinTypePair())) - .orderId(order.getOid()) - .originalAmount(order.getAmount()) - .price(order.getDealPrice()) - .timestamp(new Date(order.getCreatedAt())) - .type(order.getDirection().getOrderType()) - .feeAmount(order.getFee()) - .feeCurrency(order.getDirection().equals(KucoinOrderType.BUY) - ? new Currency(order.getCoinType()) : new Currency(order.getCoinTypePair())) - .build(); - } - - public static ExchangeMetaData adaptExchangeMetadata(List tickers, List coins) { - - Map coinMap = coins.stream().collect(Collectors.toMap(c -> c.getCoin(), c -> c)); - Map pairMeta = adaptCurrencyPairMap(tickers, coinMap); - Map coinMeta = adaptCurrencyMap(coins); - return new ExchangeMetaData(pairMeta, coinMeta, null, null, null); - } - - private static Map adaptCurrencyMap(List coins) { - - return coins.stream().collect(Collectors.toMap( - c -> new Currency(c.getCoin()), - c -> adaptCurrencyMetadata(c))); - } - - private static CurrencyMetaData adaptCurrencyMetadata(KucoinCoin coin) { - - // Unfortunately the scale for the wallet is not available in the API, take 8 by default - return new CurrencyMetaData(8, coin.getWithdrawMinFee()); - } - - private static Map adaptCurrencyPairMap( - List symbols, Map coins) { - - return symbols.stream().collect(Collectors.toMap( - t -> new CurrencyPair(t.getCoinType(), t.getCoinTypePair()), - t -> adaptCurrencyPairMetadata(t, coins.get(t.getCoinTypePair())))); - } - - private static CurrencyPairMetaData adaptCurrencyPairMetadata(KucoinTicker tick, KucoinCoin coin) { - - // trading scale is determined by the base currency's trade precision - return new CurrencyPairMetaData(tick.getFeeRate(), null, null, coin.getTradePrecision()); - } - - public static AccountInfo adaptAccountInfo( - - List balances) { - - return new AccountInfo(new Wallet(balances.stream() - .map(KucoinAdapters::adaptBalance) - .collect(Collectors.toList()))); - } - - private static Balance adaptBalance(KucoinCoinBalance balance) { - - return new Balance(new Currency(balance.getCoinType()), balance.getBalance()); - } - - public static List adaptFundingHistory(List records) { - - return records.stream().map(KucoinAdapters::adaptFundingRecord).collect(Collectors.toList()); - } - - private static FundingRecord adaptFundingRecord(KucoinWalletRecord record) { - - return new FundingRecord.Builder() - .setAmount(record.getAmount()) - .setAddress(record.getAddress()) - .setCurrency(new Currency(record.getCoinType())) - .setDate(new Date(record.getCreatedAt())) - .setFee(record.getFee()) - .setStatus(record.getStatus().getFundingRecordStatus()) - .setExternalId(record.getOuterWalletTxid()) - .setInternalId(record.getOid()) - .setDescription(record.getRemark()) - .setType(record.getType().getFundingRecordType()) - .build(); - } + public static String adaptCurrencyPair(CurrencyPair pair) { + + return pair.base.getCurrencyCode() + "-" + pair.counter.getCurrencyCode(); + } + + public static Ticker adaptTicker(KucoinResponse tickResponse, CurrencyPair pair) { + + KucoinTicker kcTick = tickResponse.getData(); + return new Ticker.Builder() + .currencyPair(pair) + .bid(kcTick.getBuy()) + .ask(kcTick.getSell()) + .high(kcTick.getHigh()) + .low(kcTick.getLow()) + .last(kcTick.getLastDealPrice()) + .volume(kcTick.getVol()) + .quoteVolume(kcTick.getVolValue()) + .timestamp(new Date(kcTick.getDatetime())) + .build(); + } + + public static OrderBook adaptOrderBook(KucoinResponse response, + CurrencyPair currencyPair) { + + KucoinOrderBook kcOrders = response.getData(); + Date timestamp = new Date(response.getTimestamp()); + List asks = new LinkedList<>(); + kcOrders.getSell().stream() + .forEach(s -> asks.add(adaptLimitOrder(currencyPair, OrderType.ASK, s, timestamp))); + List bids = new LinkedList<>(); + kcOrders.getBuy().stream() + .forEach(s -> bids.add(adaptLimitOrder(currencyPair, OrderType.BID, s, timestamp))); + return new OrderBook(timestamp, asks, bids); + } + + public static Trade adaptTrade(KucoinDealOrder kucoinTrade, CurrencyPair currencyPair) { + + return new Trade(kucoinTrade.getOrderType().getOrderType(), + kucoinTrade.getAmount(), currencyPair, kucoinTrade.getPrice(), + new Date(kucoinTrade.getTimestamp()), null); + } + + private static LimitOrder adaptLimitOrder(CurrencyPair currencyPair, OrderType orderType, + List kucoinLimitOrder, Date timestamp) { + + return new LimitOrder(orderType, kucoinLimitOrder.get(1), currencyPair, null, timestamp, kucoinLimitOrder.get(0)); + } + + public static OpenOrders adaptActiveOrders(CurrencyPair currencyPair, KucoinActiveOrders data) { + + List openOrders = new LinkedList<>(); + data.getBuy().stream().forEach(order -> openOrders.add(adaptActiveOrder(currencyPair, order))); + data.getSell().stream().forEach(order -> openOrders.add(adaptActiveOrder(currencyPair, order))); + return new OpenOrders(openOrders); + } + + private static LimitOrder adaptActiveOrder(CurrencyPair currencyPair, KucoinActiveOrder order) { + + return new LimitOrder.Builder(order.getOrderType().getOrderType(), currencyPair) + .timestamp(order.getTimestamp()) + .id(order.getOrderOid()) + .limitPrice(order.getPrice()) + .originalAmount(order.getAmount()) // this might be the remaining amount, not sure + .cumulativeAmount(order.getDealAmount()) + .orderStatus(order.getDealAmount().compareTo(BigDecimal.ZERO) == 0 ? + OrderStatus.NEW : OrderStatus.PARTIALLY_FILLED) + .build(); + } + + public static UserTrades adaptUserTrades(List orders) { + + List trades = new LinkedList<>(); + orders.stream().forEach(order -> trades.add(adaptUserTrade(order))); + return new UserTrades(trades, TradeSortType.SortByTimestamp); + } + + private static UserTrade adaptUserTrade(KucoinDealtOrder order) { + + return new UserTrade.Builder() + .currencyPair(new CurrencyPair(order.getCoinType(), order.getCoinTypePair())) + .orderId(order.getOid()) + .originalAmount(order.getAmount()) + .price(order.getDealPrice()) + .timestamp(new Date(order.getCreatedAt())) + .type(order.getDirection().getOrderType()) + .feeAmount(order.getFee()) + .feeCurrency(order.getDirection().equals(KucoinOrderType.BUY) + ? new Currency(order.getCoinType()) : new Currency(order.getCoinTypePair())) + .build(); + } + + public static ExchangeMetaData adaptExchangeMetadata(List tickers, List coins) { + + Map coinMap = coins.stream().collect(Collectors.toMap(c -> c.getCoin(), c -> c)); + Map pairMeta = adaptCurrencyPairMap(tickers, coinMap); + Map coinMeta = adaptCurrencyMap(coins); + return new ExchangeMetaData(pairMeta, coinMeta, null, null, null); + } + + private static Map adaptCurrencyMap(List coins) { + + return coins.stream().collect(Collectors.toMap( + c -> new Currency(c.getCoin()), + c -> adaptCurrencyMetadata(c))); + } + + private static CurrencyMetaData adaptCurrencyMetadata(KucoinCoin coin) { + + // Unfortunately the scale for the wallet is not available in the API, take 8 by default + return new CurrencyMetaData(8, coin.getWithdrawMinFee()); + } + + private static Map adaptCurrencyPairMap( + List symbols, Map coins) { + + return symbols.stream().collect(Collectors.toMap( + t -> new CurrencyPair(t.getCoinType(), t.getCoinTypePair()), + t -> adaptCurrencyPairMetadata(t, coins.get(t.getCoinTypePair())))); + } + + private static CurrencyPairMetaData adaptCurrencyPairMetadata(KucoinTicker tick, KucoinCoin coin) { + + // trading scale is determined by the base currency's trade precision + return new CurrencyPairMetaData(tick.getFeeRate(), null, null, coin.getTradePrecision()); + } + + public static AccountInfo adaptAccountInfo( + + List balances) { + + return new AccountInfo(new Wallet(balances.stream() + .map(KucoinAdapters::adaptBalance) + .collect(Collectors.toList()))); + } + + private static Balance adaptBalance(KucoinCoinBalance balance) { + + BigDecimal avail = balance.getBalance(); + BigDecimal freezeBalance = balance.getFreezeBalance(); + BigDecimal total = BigDecimal.ZERO.add(avail).add(freezeBalance); + return new Balance(new Currency(balance.getCoinType()), total, avail, freezeBalance); + } + + public static List adaptFundingHistory(List records) { + + return records.stream().map(KucoinAdapters::adaptFundingRecord).collect(Collectors.toList()); + } + + private static FundingRecord adaptFundingRecord(KucoinWalletRecord record) { + + return new FundingRecord.Builder() + .setAmount(record.getAmount()) + .setAddress(record.getAddress()) + .setCurrency(new Currency(record.getCoinType())) + .setDate(new Date(record.getCreatedAt())) + .setFee(record.getFee()) + .setStatus(record.getStatus().getFundingRecordStatus()) + .setExternalId(record.getOuterWalletTxid()) + .setInternalId(record.getOid()) + .setDescription(record.getRemark()) + .setType(record.getType().getFundingRecordType()) + .build(); + } } From 97d72e691e23bdf42e399ccc2721a5fad6b11b5a Mon Sep 17 00:00:00 2001 From: Graham Crockford Date: Sun, 11 Feb 2018 11:00:36 +0000 Subject: [PATCH 057/117] [gdax] Allow listing/checking open stop orders. Also introduces an API whereby these "non book" orders can be returned without breaking existing assumptions. --- .../knowm/xchange/dto/trade/OpenOrders.java | 49 +++++-- .../java/org/knowm/xchange/gdax/GDAX.java | 7 +- .../org/knowm/xchange/gdax/GDAXAdapters.java | 83 +++++++----- .../xchange/gdax/dto/trade/GDAXOrder.java | 22 ++- .../gdax/service/GDAXTradeServiceRaw.java | 2 +- .../knowm/xchange/gdax/GDAXAdaptersTest.java | 126 +++++++++++++++++- .../order/example-stop-order-filled.json | 21 +++ .../order/example-stop-order-new.json | 19 +++ .../order/example-stop-order-stopped.json | 19 +++ 9 files changed, 297 insertions(+), 51 deletions(-) create mode 100644 xchange-gdax/src/test/resources/order/example-stop-order-filled.json create mode 100644 xchange-gdax/src/test/resources/order/example-stop-order-new.json create mode 100644 xchange-gdax/src/test/resources/order/example-stop-order-stopped.json diff --git a/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java b/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java index b4fb903df..f2afbd0c9 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java +++ b/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java @@ -1,8 +1,11 @@ package org.knowm.xchange.dto.trade; import java.io.Serializable; +import java.util.Collections; import java.util.List; +import org.knowm.xchange.dto.Order; + /** *

* DTO representing open orders @@ -14,6 +17,7 @@ public final class OpenOrders implements Serializable { private final List openOrders; + private final List hiddenOrders; /** * Constructor @@ -21,30 +25,55 @@ public final class OpenOrders implements Serializable { * @param openOrders The list of open orders */ public OpenOrders(List openOrders) { + this.openOrders = openOrders; + this.hiddenOrders = Collections.emptyList(); + } + /** + * Constructor + * + * @param openOrders The list of open orders + * @param hiddenOrders The list of orders which are active but hidden from the order book. + */ + public OpenOrders(List openOrders, List hiddenOrders) { this.openOrders = openOrders; + this.hiddenOrders = hiddenOrders; } + /** + * @return Orders which are shown on the order book. + */ public List getOpenOrders() { - return openOrders; } + /** + * @return Orders which are not shown on the order book, such as untriggered stop orders. + */ + public List getHiddenOrders() { + return hiddenOrders; + } + @Override public String toString() { - StringBuilder sb = new StringBuilder(); - if (getOpenOrders().isEmpty()) { - sb.append("No open orders!"); + addToToString(sb, getOpenOrders(), "Open orders"); + addToToString(sb, getHiddenOrders(), "Hidden orders"); + return sb.toString(); + } + + private void addToToString(StringBuilder sb, List orders, String description) { + sb.append(description); + sb.append(": "); + if (orders.isEmpty()) { + sb.append("None\n"); } else { - sb.append("Open orders: \n"); - for (LimitOrder order : getOpenOrders()) { - sb.append("[order="); + sb.append("\n"); + for (Order order : orders) { + sb.append(" [order="); sb.append(order.toString()); sb.append("]\n"); } } - return sb.toString(); } - -} +} \ No newline at end of file diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java index 2b043a605..e7e16cc32 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAX.java @@ -79,6 +79,11 @@ GDAXTrade[] getTrades(@PathParam("baseCurrency") String baseCurrency, @PathParam GDAXAccount[] getAccounts(@HeaderParam("CB-ACCESS-KEY") String apiKey, @HeaderParam("CB-ACCESS-SIGN") ParamsDigest signer, @HeaderParam("CB-ACCESS-TIMESTAMP") SynchronizedValueFactory nonce, @HeaderParam("CB-ACCESS-PASSPHRASE") String passphrase) throws GDAXException, IOException; + @GET + @Path("orders") + GDAXOrder[] getListOrders(@HeaderParam("CB-ACCESS-KEY") String apiKey, @HeaderParam("CB-ACCESS-SIGN") ParamsDigest signer, + @HeaderParam("CB-ACCESS-TIMESTAMP") SynchronizedValueFactory nonce, @HeaderParam("CB-ACCESS-PASSPHRASE") String passphrase) throws GDAXException, IOException; + @GET @Path("orders?status={status}") GDAXOrder[] getListOrders(@HeaderParam("CB-ACCESS-KEY") String apiKey, @HeaderParam("CB-ACCESS-SIGN") ParamsDigest signer, @@ -98,7 +103,7 @@ GDAXIdResponse placeLimitOrder(GDAXPlaceOrder placeOrder, @HeaderParam("CB-ACCES GDAXIdResponse placeMarketOrder(GDAXPlaceOrder placeOrder, @HeaderParam("CB-ACCESS-KEY") String apiKey, @HeaderParam("CB-ACCESS-SIGN") ParamsDigest signer, @HeaderParam("CB-ACCESS-TIMESTAMP") SynchronizedValueFactory nonce, @HeaderParam("CB-ACCESS-PASSPHRASE") String passphrase) throws GDAXException, IOException; - + @POST @Path("orders") @Consumes(MediaType.APPLICATION_JSON) diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java index b4f499a07..13de827a3 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/GDAXAdapters.java @@ -33,10 +33,13 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Map; import java.util.TimeZone; +import java.util.stream.Collectors; +import java.util.stream.Stream; public class GDAXAdapters { @@ -153,26 +156,13 @@ public static Wallet adaptAccountInfo(GDAXAccount[] gdaxAccounts) { return new Wallet(gdaxAccounts[0].getProfile_id(), balances); } + @SuppressWarnings("unchecked") public static OpenOrders adaptOpenOrders(GDAXOrder[] coinbaseExOpenOrders) { - List orders = new ArrayList<>(coinbaseExOpenOrders.length); - - for (int i = 0; i < coinbaseExOpenOrders.length; i++) { - GDAXOrder order = coinbaseExOpenOrders[i]; - - OrderType type = order.getSide().equals("buy") ? OrderType.BID : OrderType.ASK; - CurrencyPair currencyPair = new CurrencyPair(order.getProductId().replace('-', '/')); - - Date createdAt = parseDate(order.getCreatedAt()); - - OrderStatus orderStatus = adaptOrderStatus(order); - - LimitOrder limitOrder = new LimitOrder(type, order.getSize(), currencyPair, - order.getId(), createdAt, order.getPrice(), order.getPrice(), order.getFilledSize(),order.getFillFees(), orderStatus); - - orders.add(limitOrder); - } - - return new OpenOrders(orders); + Stream orders = Arrays.asList(coinbaseExOpenOrders).stream().map(GDAXAdapters::adaptOrder); + Map> twoTypes = orders.collect(Collectors.partitioningBy(t -> t instanceof LimitOrder)); + @SuppressWarnings("rawtypes") + List limitOrders = twoTypes.get(true); + return new OpenOrders(limitOrders, twoTypes.get(false)); } public static Order adaptOrder(GDAXOrder order) { @@ -203,17 +193,30 @@ public static Order adaptOrder(GDAXOrder order) { orderStatus ); } else if(order.getType().equals("limit")) { - return new LimitOrder( - type, - order.getSize(), - currencyPair, - order.getId(), - createdAt, - order.getPrice(), - averagePrice, - order.getFilledSize(), - order.getFillFees(), - orderStatus); + if (order.getStop() == null) { + return new LimitOrder( + type, + order.getSize(), + currencyPair, + order.getId(), + createdAt, + order.getPrice(), + averagePrice, + order.getFilledSize(), + order.getFillFees(), + orderStatus); + } else { + return new StopOrder( + type, + order.getSize(), + currencyPair, + order.getId(), + createdAt, + order.getStopPrice(), + averagePrice, + order.getFilledSize(), + orderStatus); + } } return null; @@ -246,16 +249,26 @@ public static OrderStatus adaptOrderStatus(GDAXOrder order) { return OrderStatus.FILLED; } - // Could possibly be STOPPED, but this isn't covered by the GDAX API docs, - // and in any case, neither getOpenOrders not getOrder are currently - // returning stop orders so it's hard to tell. This will have to do for - // now. return OrderStatus.UNKNOWN; } - if(order.getFilledSize().signum() == 0) + + + if(order.getFilledSize().signum() == 0) { + + if(order.getStatus().equals("open") && order.getStop() != null) { + // This is a massive edge case of a stop triggering but not immediately + // fulfilling. STOPPED status is only currently used by the HitBTC and + // YoBit implementations and in both cases it looks like a + // misunderstanding and those should return CANCELLED. Should we just + // remove this status? + return OrderStatus.STOPPED; + } + return OrderStatus.NEW; + } + if(order.getFilledSize().compareTo(BigDecimal.ZERO) > 0 && order.getSize().compareTo(order.getFilledSize()) < 0) return OrderStatus.PARTIALLY_FILLED; diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/trade/GDAXOrder.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/trade/GDAXOrder.java index 498af65fe..e33601685 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/trade/GDAXOrder.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/dto/trade/GDAXOrder.java @@ -19,13 +19,16 @@ public class GDAXOrder { private final String type; private final String doneReason; private final BigDecimal executedvalue; + private final String stop; + private final BigDecimal stopPrice; public GDAXOrder(@JsonProperty("id") String id, @JsonProperty("price") BigDecimal price, @JsonProperty("size") BigDecimal size, @JsonProperty("product_id") String productId, @JsonProperty("side") String side, @JsonProperty("created_at") String createdAt, @JsonProperty("done_at") String doneAt, @JsonProperty("filled_size") BigDecimal filledSize, @JsonProperty("fill_fees") BigDecimal fillFees, @JsonProperty("status") String status, @JsonProperty("settled") boolean settled, @JsonProperty("type") String type, - @JsonProperty("done_reason") String doneReason, @JsonProperty("executed_value") BigDecimal executedValue) { + @JsonProperty("done_reason") String doneReason, @JsonProperty("executed_value") BigDecimal executedValue, + @JsonProperty("stop") String stop, @JsonProperty("stop_price") BigDecimal stopPrice) { this.id = id; this.price = price; this.size = size; @@ -40,6 +43,8 @@ public GDAXOrder(@JsonProperty("id") String id, @JsonProperty("price") BigDecima this.type = type; this.doneReason = doneReason; this.executedvalue = executedValue; + this.stop = stop; + this.stopPrice = stopPrice; } public String getId() { @@ -98,6 +103,14 @@ public BigDecimal getExecutedvalue() { return executedvalue; } + public String getStop() { + return stop; + } + + public BigDecimal getStopPrice() { + return stopPrice; + } + @Override public String toString() { StringBuilder builder = new StringBuilder(); @@ -123,8 +136,11 @@ public String toString() { builder.append(status); builder.append(", settled="); builder.append(settled); + builder.append(", stop="); + builder.append(stop); + builder.append(", stopPrice="); + builder.append(stopPrice); builder.append("]"); return builder.toString(); } - -} +} \ No newline at end of file diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java index 43620e728..fea60d536 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXTradeServiceRaw.java @@ -32,7 +32,7 @@ public GDAXTradeServiceRaw(Exchange exchange) { public GDAXOrder[] getGDAXOpenOrders() throws IOException { try { - return gdax.getListOrders(apiKey, digest, nonceFactory, passphrase, "open"); + return gdax.getListOrders(apiKey, digest, nonceFactory, passphrase); } catch (GDAXException e) { throw handleError(e); } diff --git a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java index fdba6d656..0082e5dc4 100644 --- a/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java +++ b/xchange-gdax/src/test/java/org/knowm/xchange/gdax/GDAXAdaptersTest.java @@ -4,12 +4,15 @@ import java.io.IOException; import java.io.InputStream; +import java.io.SequenceInputStream; import java.math.BigDecimal; import java.math.MathContext; +import java.nio.charset.StandardCharsets; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; +import org.apache.commons.io.IOUtils; import org.junit.Test; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order; @@ -17,12 +20,16 @@ import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrade; import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.gdax.dto.marketdata.GDAXProductStats; import org.knowm.xchange.gdax.dto.marketdata.GDAXProductTicker; import org.knowm.xchange.gdax.dto.trade.GDAXFill; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.knowm.xchange.gdax.dto.trade.GDAXOrder; @@ -195,10 +202,79 @@ public void testOrderStatusLimitOrderNew() throws IOException { assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); assertThat(order.getCumulativeAmount()).isEqualByComparingTo(BigDecimal.ZERO); assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("0.07060351")); + assertThat(order.getType()).isEqualTo(OrderType.ASK); + assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); + assertThat(order.getAveragePrice()).isEqualByComparingTo(BigDecimal.ZERO); + assertThat(LimitOrder.class.isAssignableFrom(order.getClass())).isTrue(); + LimitOrder limitOrder = (LimitOrder) order; + assertThat(limitOrder.getLimitPrice()).isEqualByComparingTo(new BigDecimal("14839.76")); + } + + @Test + public void testOrderStatusStopOrderNew() throws JsonParseException, JsonMappingException, IOException { + + final JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); + final ObjectMapper mapper = factory.createObjectMapper(); + + final InputStream is = getClass().getResourceAsStream("/order/example-stop-order-new.json"); + final GDAXOrder gdaxOrder = mapper.readValue(is, GDAXOrder.class); + + final Order order = GDAXAdapters.adaptOrder(gdaxOrder); + + assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.NEW); + assertThat(order.getId()).isEqualTo("853a9989-7dd9-40f8-9392-64237a9eccc4"); + assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_EUR)); + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.01")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(BigDecimal.ZERO); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("0.01")); assertThat(order.getType()).isEqualTo(OrderType.ASK); assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); assertThat(order.getAveragePrice()).isEqualByComparingTo(BigDecimal.ZERO); + + assertThat(StopOrder.class.isAssignableFrom(order.getClass())).isTrue(); + StopOrder stop = (StopOrder) order; + assertThat(stop.getStopPrice()).isEqualByComparingTo("6364.31"); + } + + @Test + public void testOrderStatusStopOrderStopped() throws JsonParseException, JsonMappingException, IOException { + + final JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); + final ObjectMapper mapper = factory.createObjectMapper(); + + final InputStream is = getClass().getResourceAsStream("/order/example-stop-order-stopped.json"); + final GDAXOrder gdaxOrder = mapper.readValue(is, GDAXOrder.class); + + final Order order = GDAXAdapters.adaptOrder(gdaxOrder); + + assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.STOPPED); + assertThat(order.getId()).isEqualTo("853a9989-7dd9-40f8-9392-64237a9eccc4"); + assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_EUR)); + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.01")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(BigDecimal.ZERO); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(new BigDecimal("0.01")); + assertThat(order.getType()).isEqualTo(OrderType.ASK); + assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); + assertThat(order.getAveragePrice()).isEqualByComparingTo(BigDecimal.ZERO); + + assertThat(StopOrder.class.isAssignableFrom(order.getClass())).isTrue(); + StopOrder stop = (StopOrder) order; + assertThat(stop.getStopPrice()).isEqualByComparingTo("6364.31"); + } + + @Test + public void testOrderStatusStopOrderFilled() throws JsonParseException, JsonMappingException, IOException { + + final JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); + final ObjectMapper mapper = factory.createObjectMapper(); + + final InputStream is = getClass().getResourceAsStream("/order/example-stop-order-filled.json"); + final GDAXOrder gdaxOrder = mapper.readValue(is, GDAXOrder.class); + + final Order order = GDAXAdapters.adaptOrder(gdaxOrder); + + assertStopOrderFilled(order); } @Test @@ -212,6 +288,55 @@ public void testOrderStatusLimitOrderPending() throws IOException { final Order order = GDAXAdapters.adaptOrder(gdaxOrder); + assertLimitOrderPending(order); + } + + @Test + public void testOrders() throws JsonParseException, JsonMappingException, IOException { + final JacksonObjectMapperFactory factory = new DefaultJacksonObjectMapperFactory(); + final ObjectMapper mapper = factory.createObjectMapper(); + + InputStream is = new SequenceInputStream( + IOUtils.toInputStream("[", StandardCharsets.UTF_8), + new SequenceInputStream( + getClass().getResourceAsStream("/order/example-limit-order-pending.json"), + new SequenceInputStream( + IOUtils.toInputStream(", ", StandardCharsets.UTF_8), + new SequenceInputStream( + getClass().getResourceAsStream("/order/example-stop-order-filled.json"), + IOUtils.toInputStream("]", StandardCharsets.UTF_8) + ) + ) + ) + ); + + final GDAXOrder[] gdaxOrders = mapper.readValue(is, GDAXOrder[].class); + + OpenOrders openOrders = GDAXAdapters.adaptOpenOrders(gdaxOrders); + + assertThat(openOrders.getOpenOrders()).hasSize(1); + assertThat(openOrders.getHiddenOrders()).hasSize(1); + assertStopOrderFilled(openOrders.getHiddenOrders().get(0)); + assertLimitOrderPending(openOrders.getOpenOrders().get(0)); + } + + private void assertStopOrderFilled(final Order order) { + assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.FILLED); + assertThat(order.getId()).isEqualTo("a9098e25-9d4d-4e2c-ab5e-8c057cc4cbee"); + assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_EUR)); + assertThat(order.getOriginalAmount()).isEqualByComparingTo(new BigDecimal("0.08871972")); + assertThat(order.getCumulativeAmount()).isEqualByComparingTo(new BigDecimal("0.08871972")); + assertThat(order.getRemainingAmount()).isEqualByComparingTo(BigDecimal.ZERO); + assertThat(order.getType()).isEqualTo(OrderType.BID); + assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); + assertThat(order.getAveragePrice()).isEqualByComparingTo(new BigDecimal("639.3107535312").divide(new BigDecimal("0.08871972"), new MathContext(8))); + + assertThat(StopOrder.class.isAssignableFrom(order.getClass())).isTrue(); + StopOrder stop = (StopOrder) order; + assertThat(stop.getStopPrice()).isEqualByComparingTo("7205"); + } + + private void assertLimitOrderPending(final Order order) { assertThat(order.getStatus()).isEqualTo(Order.OrderStatus.PENDING_NEW); assertThat(order.getId()).isEqualTo("b2cdd7fe-1f4a-495e-8b96-7a4be368f43c"); assertThat(order.getCurrencyPair()).isEqualTo((CurrencyPair.BTC_USD)); @@ -223,5 +348,4 @@ public void testOrderStatusLimitOrderPending() throws IOException { assertThat(order.getTimestamp()).isEqualTo(new Date(1515434144454L)); assertThat(order.getAveragePrice()).isEqualByComparingTo(BigDecimal.ZERO); } - } diff --git a/xchange-gdax/src/test/resources/order/example-stop-order-filled.json b/xchange-gdax/src/test/resources/order/example-stop-order-filled.json new file mode 100644 index 000000000..32488896d --- /dev/null +++ b/xchange-gdax/src/test/resources/order/example-stop-order-filled.json @@ -0,0 +1,21 @@ + { + "id": "a9098e25-9d4d-4e2c-ab5e-8c057cc4cbee", + "price": "7225.00000000", + "size": "0.08871972", + "product_id": "BTC-EUR", + "side": "buy", + "stp": "dc", + "type": "limit", + "time_in_force": "GTC", + "post_only": false, + "created_at": "2018-01-08T17:55:44.454112Z", + "done_at": "2018-02-10T00:47:38.259Z", + "done_reason": "filled", + "fill_fees": "1.5982768838280000", + "filled_size": "0.08871972", + "executed_value": "639.3107535312000000", + "status": "done", + "settled": true, + "stop": "entry", + "stop_price": "7205.00000000" + } \ No newline at end of file diff --git a/xchange-gdax/src/test/resources/order/example-stop-order-new.json b/xchange-gdax/src/test/resources/order/example-stop-order-new.json new file mode 100644 index 000000000..1c4cfb352 --- /dev/null +++ b/xchange-gdax/src/test/resources/order/example-stop-order-new.json @@ -0,0 +1,19 @@ + { + "id": "853a9989-7dd9-40f8-9392-64237a9eccc4", + "price": "6300.00000000", + "size": "0.01000000", + "product_id": "BTC-EUR", + "side": "sell", + "stp": "dc", + "type": "limit", + "time_in_force": "GTC", + "post_only": false, + "created_at": "2018-01-08T17:55:44.454112Z", + "fill_fees": "0.0000000000000000", + "filled_size": "0.00000000", + "executed_value": "0.0000000000000000", + "status": "active", + "settled": false, + "stop": "loss", + "stop_price": "6364.31000000" + } \ No newline at end of file diff --git a/xchange-gdax/src/test/resources/order/example-stop-order-stopped.json b/xchange-gdax/src/test/resources/order/example-stop-order-stopped.json new file mode 100644 index 000000000..17dc997b4 --- /dev/null +++ b/xchange-gdax/src/test/resources/order/example-stop-order-stopped.json @@ -0,0 +1,19 @@ + { + "id": "853a9989-7dd9-40f8-9392-64237a9eccc4", + "price": "6300.00000000", + "size": "0.01000000", + "product_id": "BTC-EUR", + "side": "sell", + "stp": "dc", + "type": "limit", + "time_in_force": "GTC", + "post_only": false, + "created_at": "2018-01-08T17:55:44.454112Z", + "fill_fees": "0.0000000000000000", + "filled_size": "0.00000000", + "executed_value": "0.0000000000000000", + "status": "open", + "settled": false, + "stop": "loss", + "stop_price": "6364.31000000" + } \ No newline at end of file From 82871e698db601cfadb2d4027f08cd00bcb56400 Mon Sep 17 00:00:00 2001 From: Graham Crockford Date: Sun, 11 Feb 2018 11:11:28 +0000 Subject: [PATCH 058/117] Tweak to correctly wildcard generic getter --- .../src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java b/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java index f2afbd0c9..fc27fc372 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java +++ b/xchange-core/src/main/java/org/knowm/xchange/dto/trade/OpenOrders.java @@ -17,7 +17,7 @@ public final class OpenOrders implements Serializable { private final List openOrders; - private final List hiddenOrders; + private final List hiddenOrders; /** * Constructor @@ -50,7 +50,7 @@ public List getOpenOrders() { /** * @return Orders which are not shown on the order book, such as untriggered stop orders. */ - public List getHiddenOrders() { + public List getHiddenOrders() { return hiddenOrders; } From d568b0a3fad9f834d22b721977f1bd4cb6c414ef Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 15:18:53 +0100 Subject: [PATCH 059/117] [Bibox] Implement cancelOrder() with CancelOrderParams --- .../knowm/xchange/bibox/service/BiboxTradeService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index 254289d2c..651c31993 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -11,8 +11,10 @@ import org.knowm.xchange.dto.trade.OpenOrders; import org.knowm.xchange.dto.trade.StopOrder; import org.knowm.xchange.dto.trade.UserTrades; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; +import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; import org.knowm.xchange.service.trade.params.CancelOrderParams; import org.knowm.xchange.service.trade.params.TradeHistoryParams; import org.knowm.xchange.service.trade.params.orders.OpenOrdersParams; @@ -54,7 +56,11 @@ public boolean cancelOrder(String orderId) throws IOException { @Override public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { - throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); + if (orderParams instanceof CancelOrderByIdParams) { + return cancelOrder(((CancelOrderByIdParams) orderParams).getOrderId()); + } else { + throw new ExchangeException("Need order ID for cancelling orders."); + } } @Override From 76bcd67f4d77876ee1c087e9bb246a526738a05e Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 20:55:03 +0100 Subject: [PATCH 060/117] [Bibox] Implement TradeService.getOrderHistory() call --- .../xchange/bibox/BiboxAuthenticated.java | 6 +-- .../xchange/bibox/dto/BiboxAdapters.java | 31 ++++++++++-- .../{BiboxOpenOrder.java => BiboxOrder.java} | 26 +++++++++- .../dto/trade/BiboxOrderHistoryCommand.java | 13 +++++ ...{BiboxOpenOrders.java => BiboxOrders.java} | 8 +-- .../bibox/service/BiboxTradeService.java | 2 +- .../bibox/service/BiboxTradeServiceRaw.java | 11 +++- .../dto/trade/BiboxTradeUnmarshalTest.java | 50 +++++++++++++++++-- .../trade/example-trade-history.json | 43 ++++++++++++++++ 9 files changed, 170 insertions(+), 20 deletions(-) rename xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/{BiboxOpenOrder.java => BiboxOrder.java} (89%) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderHistoryCommand.java rename xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/{BiboxOpenOrders.java => BiboxOrders.java} (86%) create mode 100644 xchange-bibox/src/test/resources/trade/example-trade-history.json diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index 9f3fd32d8..5306d312a 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -11,7 +11,7 @@ import org.knowm.xchange.bibox.dto.BiboxSingleResponse; import org.knowm.xchange.bibox.dto.account.BiboxCoin; -import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrders; +import org.knowm.xchange.bibox.dto.trade.BiboxOrders; import si.mazi.rescu.ParamsDigest; @@ -64,13 +64,13 @@ BiboxSingleResponse cancelTrade( @FormParam(FORM_SIGNATURE) ParamsDigest signature); /** - * Obtain open order list + * Obtain open order list / order history * * @return open orders */ @POST @Path("orderpending") - BiboxSingleResponse orderPendingList( + BiboxSingleResponse orderPendingList( @FormParam(FORM_CMDS) String cmds, @FormParam(FORM_APIKEY) String apiKey, @FormParam(FORM_SIGNATURE) ParamsDigest signature); diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index b9d5222f1..435f6f3c4 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -9,8 +9,8 @@ import org.knowm.xchange.bibox.dto.account.BiboxCoin; import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; -import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrder; -import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrders; +import org.knowm.xchange.bibox.dto.trade.BiboxOrder; +import org.knowm.xchange.bibox.dto.trade.BiboxOrders; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBookEntry; import org.knowm.xchange.currency.Currency; @@ -21,10 +21,13 @@ import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.dto.marketdata.Trades.TradeSortType; import org.knowm.xchange.dto.meta.CurrencyPairMetaData; import org.knowm.xchange.dto.meta.ExchangeMetaData; import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.UserTrade; +import org.knowm.xchange.dto.trade.UserTrades; /** * @author odrotleff @@ -77,13 +80,13 @@ public static LimitOrder adaptOrderBookOrder(BiboxOrderBookEntry entry, OrderTyp .build(); } - public static OpenOrders adaptOpenOrders(BiboxOpenOrders biboxOpenOrders) { + public static OpenOrders adaptOpenOrders(BiboxOrders biboxOpenOrders) { return new OpenOrders(biboxOpenOrders.getItems().stream() .map(BiboxAdapters::adaptLimitOpenOrder) .collect(Collectors.toList())); } - private static LimitOrder adaptLimitOpenOrder(BiboxOpenOrder biboxOrder) { + private static LimitOrder adaptLimitOpenOrder(BiboxOrder biboxOrder) { CurrencyPair currencyPair = new CurrencyPair(biboxOrder.getCoinSymbol(), biboxOrder.getCurrencySymbol()); return new LimitOrder.Builder(biboxOrder.getOrderSide().getOrderType(), currencyPair) .id(String.valueOf(biboxOrder.getId())) @@ -103,4 +106,24 @@ public static ExchangeMetaData adaptMetadata(List markets) { } return new ExchangeMetaData(pairMeta, null, null, null, null); } + + public static UserTrades adaptUserTrades(BiboxOrders biboxOrderHistory) { + List trades = biboxOrderHistory.getItems().stream() + .map(BiboxAdapters::adaptUserTrade) + .collect(Collectors.toList()); + return new UserTrades(trades, TradeSortType.SortByID); + } + + private static UserTrade adaptUserTrade(BiboxOrder order) { + return new UserTrade.Builder() + .id(Long.toString(order.getId())) + .currencyPair(new CurrencyPair(order.getCoinSymbol(), order.getCurrencySymbol())) + .price(order.getPrice()) + .originalAmount(order.getAmount()) + .timestamp(new Date(order.getCreatedAt())) + .type(order.getOrderSide().getOrderType()) + .feeCurrency(new Currency(order.getFeeSymbol())) + .feeAmount(order.getFee()) + .build(); + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrder.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrder.java similarity index 89% rename from xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrder.java rename to xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrder.java index 8bab91397..81ed02b3b 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrder.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrder.java @@ -18,7 +18,7 @@ @Generated("org.jsonschema2pojo") @JsonPropertyOrder({"id", "createdAt", "account_type", "coin_symbol", "currency_symbol", "order_side", "order_type", "price", "amount", "money", "deal_amount", "deal_percent", "status", "unexecuted"}) -public class BiboxOpenOrder { +public class BiboxOrder { @JsonProperty("id") private long id; @@ -48,6 +48,14 @@ public class BiboxOpenOrder { private BiboxOrderStatus status; @JsonProperty("unexecuted") private BigDecimal unexecuted; + /** + * only for order history + */ + @JsonProperty("fee") + private BigDecimal fee; + @JsonProperty("fee_symbol") + private String feeSymbol; + @JsonIgnore private Map additionalProperties = new HashMap(); @@ -275,6 +283,22 @@ public void setUnexecuted(BigDecimal unexecuted) { this.unexecuted = unexecuted; } + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public String getFeeSymbol() { + return feeSymbol; + } + + public void setFeeSymbol(String feeSymbol) { + this.feeSymbol = feeSymbol; + } + @JsonAnyGetter public Map getAdditionalProperties() { return this.additionalProperties; diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderHistoryCommand.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderHistoryCommand.java new file mode 100644 index 000000000..0cd15f968 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrderHistoryCommand.java @@ -0,0 +1,13 @@ +package org.knowm.xchange.bibox.dto.trade; + +import org.knowm.xchange.bibox.dto.BiboxCommand; + +/** + * @author odrotleff + */ +public class BiboxOrderHistoryCommand extends BiboxCommand { + + public BiboxOrderHistoryCommand(BiboxOrderPendingListCommandBody body) { + super("orderpending/orderHistoryList", body); + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrders.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrders.java similarity index 86% rename from xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrders.java rename to xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrders.java index 0395cc2d9..5f45f4522 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOpenOrders.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/trade/BiboxOrders.java @@ -22,14 +22,14 @@ "page", "items" }) -public class BiboxOpenOrders { +public class BiboxOrders { @JsonProperty("count") private Integer count; @JsonProperty("page") private Integer page; @JsonProperty("items") - private List items = new ArrayList(); + private List items = new ArrayList(); @JsonIgnore private Map additionalProperties = new HashMap(); @@ -79,7 +79,7 @@ public void setPage(Integer page) { * The items */ @JsonProperty("items") - public List getItems() { + public List getItems() { return items; } @@ -89,7 +89,7 @@ public List getItems() { * The items */ @JsonProperty("items") - public void setItems(List items) { + public void setItems(List items) { this.items = items; } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index 651c31993..9c97a7778 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -65,7 +65,7 @@ public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { - throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); + return BiboxAdapters.adaptUserTrades(getBiboxOrderHistory()); } @Override diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java index 7ae37d4cd..a659e286d 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java @@ -7,7 +7,8 @@ import org.knowm.xchange.bibox.dto.BiboxCommands; import org.knowm.xchange.bibox.dto.trade.BiboxAccountType; import org.knowm.xchange.bibox.dto.trade.BiboxCancelTradeCommand; -import org.knowm.xchange.bibox.dto.trade.BiboxOpenOrders; +import org.knowm.xchange.bibox.dto.trade.BiboxOrderHistoryCommand; +import org.knowm.xchange.bibox.dto.trade.BiboxOrders; import org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommand; import org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommandBody; import org.knowm.xchange.bibox.dto.trade.BiboxOrderSide; @@ -42,9 +43,15 @@ public void cancelBiboxOrder(String orderId) { bibox.cancelTrade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); } - public BiboxOpenOrders getBiboxOpenOrders() { + public BiboxOrders getBiboxOpenOrders() { BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, Integer.MAX_VALUE); // wonder if this actually works BiboxOrderPendingListCommand cmd = new BiboxOrderPendingListCommand(body); return bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); } + + public BiboxOrders getBiboxOrderHistory() { + BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, Integer.MAX_VALUE); // wonder if this actually works + BiboxOrderHistoryCommand cmd = new BiboxOrderHistoryCommand(body); + return bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + } } diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java index 47b379ac3..48693e8b7 100644 --- a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/dto/trade/BiboxTradeUnmarshalTest.java @@ -21,15 +21,15 @@ public class BiboxTradeUnmarshalTest { @Test public void testOpenOrdersUnmarshal() throws IOException { - BiboxSingleResponse response = - BiboxTestUtils.getResponse(new TypeReference>() {}, + BiboxSingleResponse response = + BiboxTestUtils.getResponse(new TypeReference>() {}, "/trade/example-open-orders.json"); assertThat(response.get().getCmd()).isEqualTo("orderpending/orderPendingList"); - BiboxOpenOrders orders = response.get().getResult(); + BiboxOrders orders = response.get().getResult(); assertThat(orders.getItems()).hasSize(2); - BiboxOpenOrder first = orders.getItems().get(0); + BiboxOrder first = orders.getItems().get(0); assertThat(first.getId()).isEqualTo(242640813L); assertThat(first.getCreatedAt()).isEqualTo(1518218031000L); assertThat(first.getAccountType()).isEqualTo(BiboxAccountType.REGULAR); @@ -44,7 +44,7 @@ public void testOpenOrdersUnmarshal() throws IOException { assertThat(first.getUnexecuted()).isEqualTo(new BigDecimal("0.0400")); assertThat(first.getStatus()).isEqualTo(BiboxOrderStatus.PENDING); - BiboxOpenOrder second = orders.getItems().get(1); + BiboxOrder second = orders.getItems().get(1); assertThat(second.getId()).isEqualTo(242640017L); assertThat(second.getCreatedAt()).isEqualTo(1518218019000L); assertThat(second.getAccountType()).isEqualTo(BiboxAccountType.REGULAR); @@ -59,4 +59,44 @@ public void testOpenOrdersUnmarshal() throws IOException { assertThat(second.getUnexecuted()).isEqualTo(new BigDecimal("0.1000")); assertThat(second.getStatus()).isEqualTo(BiboxOrderStatus.PENDING); } + + @Test + public void testTradeHistoryUnmarshal() throws IOException { + + BiboxSingleResponse response = + BiboxTestUtils.getResponse(new TypeReference>() {}, + "/trade/example-trade-history.json"); + assertThat(response.get().getCmd()).isEqualTo("orderpending/orderHistoryList"); + + BiboxOrders orders = response.get().getResult(); + assertThat(orders.getItems()).hasSize(2); + + BiboxOrder first = orders.getItems().get(0); + assertThat(first.getId()).isEqualTo(255925252L); + assertThat(first.getCreatedAt()).isEqualTo(1518127133000L); + assertThat(first.getAccountType()).isEqualTo(BiboxAccountType.REGULAR); + assertThat(first.getCoinSymbol()).isEqualTo("ETC"); + assertThat(first.getCurrencySymbol()).isEqualTo("ETH"); + assertThat(first.getOrderSide()).isEqualTo(BiboxOrderSide.ASK); + assertThat(first.getOrderType()).isEqualTo(BiboxOrderType.LIMIT_ORDER); + assertThat(first.getPrice()).isEqualTo(new BigDecimal("0.02641939")); + assertThat(first.getAmount()).isEqualTo(new BigDecimal("0.0474")); + assertThat(first.getMoney()).isEqualTo(new BigDecimal("0.00125227")); + assertThat(first.getFee()).isEqualTo(new BigDecimal("0.00000000")); + assertThat(first.getFeeSymbol()).isEqualTo("BIX"); + + BiboxOrder second = orders.getItems().get(1); + assertThat(second.getId()).isEqualTo(255924172L); + assertThat(second.getCreatedAt()).isEqualTo(1518127118000L); + assertThat(second.getAccountType()).isEqualTo(BiboxAccountType.REGULAR); + assertThat(second.getCoinSymbol()).isEqualTo("ETC"); + assertThat(second.getCurrencySymbol()).isEqualTo("ETH"); + assertThat(second.getOrderSide()).isEqualTo(BiboxOrderSide.ASK); + assertThat(second.getOrderType()).isEqualTo(BiboxOrderType.LIMIT_ORDER); + assertThat(second.getPrice()).isEqualTo(new BigDecimal("0.02691475")); + assertThat(second.getAmount()).isEqualTo(new BigDecimal("0.0542")); + assertThat(second.getMoney()).isEqualTo(new BigDecimal("0.00145877")); + assertThat(second.getFee()).isEqualTo(new BigDecimal("0.00000146")); + assertThat(second.getFeeSymbol()).isEqualTo("ETH"); + } } diff --git a/xchange-bibox/src/test/resources/trade/example-trade-history.json b/xchange-bibox/src/test/resources/trade/example-trade-history.json new file mode 100644 index 000000000..16af43cca --- /dev/null +++ b/xchange-bibox/src/test/resources/trade/example-trade-history.json @@ -0,0 +1,43 @@ +{ + "result":[ + { + "result":{ + "count":2, + "page":1, + "items":[ + { + "id":255925252, + "createdAt":1518127133000, + "account_type":0, + "coin_symbol":"ETC", + "currency_symbol":"ETH", + "order_side":2, + "order_type":2, + "price":"0.02641939", + "amount":"0.0474", + "money":"0.00125227", + "fee":"0.00000000", + "pay_bix":1, + "fee_symbol":"BIX" + }, + { + "id":255924172, + "createdAt":1518127118000, + "account_type":0, + "coin_symbol":"ETC", + "currency_symbol":"ETH", + "order_side":2, + "order_type":2, + "price":"0.02691475", + "amount":"0.0542", + "money":"0.00145877", + "fee":"0.00000146", + "pay_bix":0, + "fee_symbol":"ETH" + } + ] + }, + "cmd":"orderpending/orderHistoryList" + } + ] +} \ No newline at end of file From 745f26dde98602ad1ea938cbcfad0d3fbc81fe4f Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 20:58:14 +0100 Subject: [PATCH 061/117] [Bibox] forward getOpenOrders(OpenOrderParams) to getOpenOrders() --- .../java/org/knowm/xchange/bibox/service/BiboxTradeService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index 9c97a7778..d75fde614 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -35,7 +35,7 @@ public OpenOrders getOpenOrders() throws IOException { @Override public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { - throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); + return getOpenOrders(); } @Override From 12ccb7043a353f6429f3ec522b58bea82f0af839 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 21:07:49 +0100 Subject: [PATCH 062/117] [Bibox] implement TradeService.placeMarketOrder() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unfortunately, this is not testable right now. Returns a message that "暂不支持市价单", which according to Google Tranlate means "Temporarily not support market orders". --- .../xchange/bibox/service/BiboxTradeService.java | 2 +- .../bibox/service/BiboxTradeServiceRaw.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index d75fde614..237a730e7 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -40,7 +40,7 @@ public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { @Override public String placeMarketOrder(MarketOrder marketOrder) throws IOException { - throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); + return placeBiboxMarketOrder(marketOrder).toString(); } @Override diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java index a659e286d..cb40a15be 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java @@ -15,6 +15,7 @@ import org.knowm.xchange.bibox.dto.trade.BiboxOrderType; import org.knowm.xchange.bibox.dto.trade.BiboxTradeCommand; import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.MarketOrder; /** * @author odrotleff @@ -38,6 +39,19 @@ public Integer placeBiboxLimitOrder(LimitOrder limitOrder) { return bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); } + public Integer placeBiboxMarketOrder(MarketOrder marketOrder) { + BiboxTradeCommand cmd = new BiboxTradeCommand( + BiboxAdapters.toBiboxPair(marketOrder.getCurrencyPair()), + BiboxAccountType.REGULAR.asInt(), + BiboxOrderType.MARKET_ORDER.asInt(), + BiboxOrderSide.fromOrderType(marketOrder.getType()).asInt(), + true, + null, + marketOrder.getOriginalAmount(), + null); + return bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + } + public void cancelBiboxOrder(String orderId) { BiboxCancelTradeCommand cmd = new BiboxCancelTradeCommand(new BigInteger(orderId)); bibox.cancelTrade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); From 6fc02b6f44db5cb4ba2b2cc0b46d319155dd5c00 Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 21:28:18 +0100 Subject: [PATCH 063/117] [Bibox] Keep original TradeService.verifyOrder() methods --- .../knowm/xchange/bibox/service/BiboxTradeService.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index 237a730e7..099195746 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -78,11 +78,6 @@ public OpenOrdersParams createOpenOrdersParams() { throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } - @Override - public void verifyOrder(MarketOrder marketOrder) { - throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); - } - @Override public Collection getOrder(String... orderIds) throws IOException { throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); @@ -92,9 +87,4 @@ public Collection getOrder(String... orderIds) throws IOException { public String placeStopOrder(StopOrder arg0) throws IOException { throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } - - @Override - public void verifyOrder(LimitOrder limitOrder) { - throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); - } } From 93d26ab96a8f9688e4abfaddbc8da97c342f2370 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Mon, 12 Feb 2018 02:00:24 +0530 Subject: [PATCH 064/117] Minimum LTC order is 0.1. See http://support.anxintl.com/customer/en/portal/articles/2919892-are-there-minimum-order-limits- --- xchange-anx/src/main/resources/anxpro.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-anx/src/main/resources/anxpro.json b/xchange-anx/src/main/resources/anxpro.json index 25ba3c8ab..5c1d1cc90 100644 --- a/xchange-anx/src/main/resources/anxpro.json +++ b/xchange-anx/src/main/resources/anxpro.json @@ -99,7 +99,7 @@ "price_scale": 8 }, "LTC/BTC": { - "min_amount": 1.00000000, + "min_amount": 0.10000000, "max_amount": 10000000.00000000, "price_scale": 5 }, From 6d44d4c943f480a0bdb59f1848ee2ad4cdfa1c11 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Mon, 12 Feb 2018 02:05:51 +0530 Subject: [PATCH 065/117] Fixing other currency limits while at it. See http://support.anxintl.com/customer/en/portal/articles/2919892-are-there-minimum-order-limits- and https://anxpro.com/pages/fees --- xchange-anx/src/main/resources/anxpro.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xchange-anx/src/main/resources/anxpro.json b/xchange-anx/src/main/resources/anxpro.json index 5c1d1cc90..b2dbd0488 100644 --- a/xchange-anx/src/main/resources/anxpro.json +++ b/xchange-anx/src/main/resources/anxpro.json @@ -26,7 +26,7 @@ "price_scale": 5 }, "ETH/BTC": { - "min_amount": 0.01000000, + "min_amount": 0.00010000, "max_amount": 100000.00000000, "price_scale": 5 }, @@ -61,7 +61,7 @@ "price_scale": 5 }, "DOGE/BTC": { - "min_amount": 10000.00000000, + "min_amount": 5000.00000000, "max_amount": 10000000000.00000000, "price_scale": 8 }, @@ -136,7 +136,7 @@ "price_scale": 8 }, "XRP/BTC": { - "min_amount": 750.00000, + "min_amount": 100.00000, "max_amount": 100000.00000000, "price_scale": 8 } @@ -209,8 +209,8 @@ "scale": 8 } }, - "maker_trading_fee": 0.003, - "taker_trading_fee": 0.006, + "maker_trading_fee": 0.001, + "taker_trading_fee": 0.002, "private_rate_limits": [ { "calls": 30, From fb44c0e8ea474e1e50125217847bc156dca3f02b Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sun, 11 Feb 2018 22:20:54 +0100 Subject: [PATCH 066/117] [Bibox] implement AccountService.requestDepositAddress() --- .../xchange/bibox/BiboxAuthenticated.java | 12 +++++++++++ .../xchange/bibox/dto/BiboxCommands.java | 7 +++++++ .../BiboxDepositAddressCommandBody.java | 21 +++++++++++++++++++ .../bibox/service/BiboxAccountService.java | 2 +- .../bibox/service/BiboxAccountServiceRaw.java | 11 ++++++++++ 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxDepositAddressCommandBody.java diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index 5306d312a..4df94d366 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -39,6 +39,18 @@ BiboxSingleResponse> coinList( @FormParam(FORM_APIKEY) String apiKey, @FormParam(FORM_SIGNATURE) ParamsDigest signature); + /** + * Get deposit address for coin + * + * @return list of coins + */ + @POST + @Path("transfer") + BiboxSingleResponse depositAddress( + @FormParam(FORM_CMDS) String cmds, + @FormParam(FORM_APIKEY) String apiKey, + @FormParam(FORM_SIGNATURE) ParamsDigest signature); + /** * Create an order (market/limit) * diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java index 14d1e81ff..cb6985fd0 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java @@ -3,6 +3,8 @@ import java.util.ArrayList; import java.util.Arrays; +import org.knowm.xchange.bibox.dto.account.BiboxDepositAddressCommandBody; + import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -17,6 +19,11 @@ public class BiboxCommands extends ArrayList> { public static final BiboxCommands COIN_LIST_CMD = BiboxCommands.of(new BiboxCommand("transfer/coinList", new BiboxEmptyBody())); + + public static BiboxCommands depositAddressCommand(String coinSymbol) { + return BiboxCommands.of(new BiboxCommand("transfer/transferIn", + new BiboxDepositAddressCommandBody(coinSymbol))); + } private static final long serialVersionUID = 1L; diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxDepositAddressCommandBody.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxDepositAddressCommandBody.java new file mode 100644 index 000000000..20ea6cb0e --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/account/BiboxDepositAddressCommandBody.java @@ -0,0 +1,21 @@ +package org.knowm.xchange.bibox.dto.account; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class BiboxDepositAddressCommandBody { + @JsonProperty("coin_symbol") + String coinSymbol; + + public BiboxDepositAddressCommandBody(String coinSymbol) { + super(); + this.coinSymbol = coinSymbol; + } + + public String getCoinSymbol() { + return coinSymbol; + } + + public void setCoinSymbol(String coinSymbol) { + this.coinSymbol = coinSymbol; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java index d2443976d..915c79583 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountService.java @@ -41,7 +41,7 @@ public String withdrawFunds(WithdrawFundsParams params) throws IOException { @Override public String requestDepositAddress(Currency currency, String... args) throws IOException { - throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); + return requestBiboxDepositAddress(currency); } @Override diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java index 20a02ee44..fccb5842d 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java @@ -6,7 +6,9 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.BiboxException; +import org.knowm.xchange.bibox.dto.BiboxCommands; import org.knowm.xchange.bibox.dto.account.BiboxCoin; +import org.knowm.xchange.currency.Currency; import org.knowm.xchange.exceptions.ExchangeException; /** @@ -25,4 +27,13 @@ public List getBiboxAccountInfo() { throw new ExchangeException(e.getMessage()); } } + + public String requestBiboxDepositAddress(Currency currency) { + try { + return bibox.depositAddress(BiboxCommands.depositAddressCommand(currency.getCurrencyCode()).json(), + apiKey, signatureCreator).get().getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } + } } From f59c10429ed44fa08c7c17ecba250e465e97acd8 Mon Sep 17 00:00:00 2001 From: npomfret Date: Mon, 12 Feb 2018 13:37:53 +0000 Subject: [PATCH 067/117] [wex] implemented TradeHistoryParamOffset for getFundingHistory in order that all fundings can be got --- .../org/knowm/xchange/wex/v3/WexAdapters.java | 41 ++++++++++++++ .../wex/v3/service/WexAccountService.java | 53 ++++--------------- .../wex/v3/service/WexAccountServiceRaw.java | 9 ++-- 3 files changed, 56 insertions(+), 47 deletions(-) diff --git a/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/WexAdapters.java b/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/WexAdapters.java index 7202e5375..e0e41e94e 100644 --- a/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/WexAdapters.java +++ b/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/WexAdapters.java @@ -15,6 +15,7 @@ import org.knowm.xchange.dto.Order.OrderStatus; import org.knowm.xchange.dto.Order.OrderType; import org.knowm.xchange.dto.account.Balance; +import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.marketdata.Trade; @@ -39,6 +40,7 @@ import org.knowm.xchange.wex.v3.dto.trade.WexOrder; import org.knowm.xchange.wex.v3.dto.trade.WexOrderInfoResult; import org.knowm.xchange.wex.v3.dto.trade.WexTradeHistoryResult; +import org.knowm.xchange.wex.v3.dto.trade.WexTransHistoryResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -322,4 +324,43 @@ public static LimitOrder createLimitOrder(MarketOrder marketOrder, WexExchangeIn BigDecimal limitPrice = marketOrder.getType() == OrderType.BID ? wexPairInfo.getMaxPrice() : wexPairInfo.getMinPrice(); return LimitOrder.Builder.from(marketOrder).limitPrice(limitPrice).build(); } + + public static List adaptFundingRecords(Map map) { + List fundingRecords = new ArrayList<>(); + + for (Long key : map.keySet()) { + WexTransHistoryResult result = map.get(key); + + FundingRecord.Status status = FundingRecord.Status.COMPLETE; + + if (result.getStatus().equals(WexTransHistoryResult.Status.entered))//looks like the enum has the wrong name maybe? + status = FundingRecord.Status.FAILED; + else if (result.getStatus().equals(WexTransHistoryResult.Status.waiting)) + status = FundingRecord.Status.PROCESSING; + + FundingRecord.Type type;//todo + if (result.getType().equals(WexTransHistoryResult.Type.BTC_deposit)) + type = FundingRecord.Type.DEPOSIT; + else if (result.getType().equals(WexTransHistoryResult.Type.BTC_withdrawal)) + type = FundingRecord.Type.WITHDRAWAL; + else + continue; + + Date date = DateUtils.fromUnixTime(result.getTimestamp()); + fundingRecords.add(new FundingRecord( + null, + date, + Currency.getInstance(result.getCurrency()), + result.getAmount(), + String.valueOf(key), + null, + type, + status, + null, + null, + result.getDescription() + )); + } + return fundingRecords; + } } diff --git a/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountService.java b/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountService.java index 88d7b9b53..3db5b6353 100644 --- a/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountService.java +++ b/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountService.java @@ -2,8 +2,6 @@ import java.io.IOException; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; import java.util.List; import java.util.Map; @@ -14,9 +12,9 @@ import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.DefaultWithdrawFundsParams; +import org.knowm.xchange.service.trade.params.TradeHistoryParamOffset; import org.knowm.xchange.service.trade.params.TradeHistoryParams; import org.knowm.xchange.service.trade.params.WithdrawFundsParams; -import org.knowm.xchange.utils.DateUtils; import org.knowm.xchange.wex.v3.WexAdapters; import org.knowm.xchange.wex.v3.dto.account.WexAccountInfo; import org.knowm.xchange.wex.v3.dto.trade.WexTransHistoryResult; @@ -69,48 +67,15 @@ public TradeHistoryParams createFundingHistoryParams() { } @Override - public List getFundingHistory(TradeHistoryParams params) throws IOException { - Map map = transferHistory(); - - List fundingRecords = new ArrayList<>(); - - if (map == null) - return fundingRecords; - - for (Long key : map.keySet()) { - WexTransHistoryResult result = map.get(key); - - FundingRecord.Status status = FundingRecord.Status.COMPLETE; - - if (result.getStatus().equals(WexTransHistoryResult.Status.entered))//looks like the enum has the wrong name maybe? - status = FundingRecord.Status.FAILED; - else if (result.getStatus().equals(WexTransHistoryResult.Status.waiting)) - status = FundingRecord.Status.PROCESSING; - - FundingRecord.Type type;//todo - if (result.getType().equals(WexTransHistoryResult.Type.BTC_deposit)) - type = FundingRecord.Type.DEPOSIT; - else if (result.getType().equals(WexTransHistoryResult.Type.BTC_withdrawal)) - type = FundingRecord.Type.WITHDRAWAL; - else - continue; - - Date date = DateUtils.fromUnixTime(result.getTimestamp()); - fundingRecords.add(new FundingRecord( - null, - date, - Currency.getInstance(result.getCurrency()), - result.getAmount(), - String.valueOf(key), - null, - type, - status, - null, - null, - result.getDescription() - )); + public List getFundingHistory(TradeHistoryParams params) throws IOException { + Long offset = null; + if (params instanceof TradeHistoryParamOffset) { + offset = ((TradeHistoryParamOffset) params).getOffset(); } - return fundingRecords; + Map map = transferHistory(offset); + + return WexAdapters.adaptFundingRecords(map); } + } diff --git a/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountServiceRaw.java b/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountServiceRaw.java index c3db9e9e9..5f056fa88 100644 --- a/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountServiceRaw.java +++ b/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/service/WexAccountServiceRaw.java @@ -2,6 +2,7 @@ import java.io.IOException; import java.math.BigDecimal; +import java.util.Collections; import java.util.Map; import org.knowm.xchange.Exchange; @@ -51,11 +52,13 @@ public String withdraw(String currency, BigDecimal amount, String address) { return String.valueOf(info.getReturnValue().gettId()); } - public Map transferHistory() throws IOException { - WexTransHistoryReturn info = btce.TransHistory(apiKey, signatureCreator, exchange.getNonceFactory(), null, null, null, null, null, null, null); + public Map transferHistory(Long from) throws IOException { + WexTransHistoryReturn info = btce.TransHistory(apiKey, signatureCreator, exchange.getNonceFactory(), from, null, null, null, null, null, null); checkResult(info); - return info.getReturnValue(); + Map map = info.getReturnValue(); + + return map == null ? Collections.emptyMap() : map; } } From ed7f9d28369ef970e72b54f0d9988ddafe5c7897 Mon Sep 17 00:00:00 2001 From: bharris Date: Mon, 12 Feb 2018 10:40:09 -0800 Subject: [PATCH 068/117] [LakeBTC] Fixing ticker information based on real world data The documentation on LakeBTCs website doesn't seem to match real world data. Their documentation matches the XChange implementation, but then fails when running live against the servers. The changes I see are as follows: 1) I eliminated the object LakeBTCTickers and replaced it with a Map object. The example in their documentation shows USD and CNY. The LakeBTCTickers object was hardcoded to expect this output. In reality a large number of currency tickers are returned so a Map seemed a more natural fit and would be more future proof. 2) The structure of the keys themselves seems to have changed. Instead of 'USD' we see 'btcusd'. CNY doesn't seem to be returned anymore, I'd guess based off the data they've switched to HKD (returned as 'btchkd'). These changes at least get the ticker information coming in again. One change I'd propose. There's a bit of an impedance mismatch between the generic MarketData API and the LakeBTCMarketData API. MarketData provides a per-CurrencyPair API. LakeBTC returns all currency pairs at once. This means when using the MarketData API you'll be making multiple calls to LakeBTC per currency pair even though all can be retrieved in a single server call. I toyed around with caching the results and clearing them after a couple of seconds, but didn't want to get too far ahead of myself. If that approach is liked I'm happy to include it. --- .../org/knowm/xchange/lakebtc/LakeBTC.java | 5 +- .../xchange/lakebtc/LakeBTCAdapters.java | 9 + .../dto/marketdata/LakeBTCTickers.java | 40 ---- .../service/LakeBTCMarketDataService.java | 14 +- .../service/LakeBTCMarketDataServiceRaw.java | 5 +- .../xchange/lakebtc/LakeBTCAdapterTest.java | 24 +- .../marketdata/LakeBTCMarketDataJsonTest.java | 37 +-- .../marketdata/example-ticker-data.json | 214 ++++++++++++++++-- 8 files changed, 252 insertions(+), 96 deletions(-) delete mode 100644 xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCTickers.java diff --git a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTC.java b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTC.java index 5fa7a6213..a08b23211 100755 --- a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTC.java +++ b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTC.java @@ -1,6 +1,7 @@ package org.knowm.xchange.lakebtc; import java.io.IOException; +import java.util.Map; import java.util.Objects; import javax.ws.rs.GET; @@ -11,7 +12,7 @@ import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCOrderBook; -import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTickers; +import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTicker; import org.knowm.xchange.utils.jackson.CurrencyPairDeserializer; /** @@ -53,7 +54,7 @@ public String toString() { */ @GET @Path("ticker") - LakeBTCTickers getLakeBTCTickers() throws IOException; + Map getLakeBTCTickers() throws IOException; @GET @Path("bcorderbook?symbol={pair}") diff --git a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTCAdapters.java b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTCAdapters.java index 6bedbf021..550618586 100755 --- a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTCAdapters.java +++ b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTCAdapters.java @@ -146,4 +146,13 @@ public static AccountInfo adaptAccountInfo(LakeBTCAccount lakeBTCAccount) { return new AccountInfo(profile.getId(), new Wallet(usdBalance, btcBalance, cnyWBalance)); } + + /** + * Adapts a currency pair to the keys returned by the tickers map. + * @param currencyPair The currency pair to convert to LakeBTCs ticker keys + * @return A string suitable for looking up ticker information. + */ + public static String adaptCurrencyPair(CurrencyPair currencyPair) { + return currencyPair.base.getCurrencyCode().toLowerCase() + currencyPair.counter.getCurrencyCode().toLowerCase(); + } } diff --git a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCTickers.java b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCTickers.java deleted file mode 100644 index c6356733e..000000000 --- a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCTickers.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.knowm.xchange.lakebtc.dto.marketdata; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * @author kpysniak - */ -public class LakeBTCTickers { - - private final LakeBTCTicker usd; - private final LakeBTCTicker cny; - - /** - * Constructor - * - * @param usd - * @param cny - */ - public LakeBTCTickers(@JsonProperty("USD") LakeBTCTicker usd, @JsonProperty("CNY") LakeBTCTicker cny) { - - this.usd = usd; - this.cny = cny; - } - - public LakeBTCTicker getUsd() { - - return usd; - } - - public LakeBTCTicker getCny() { - - return cny; - } - - @Override - public String toString() { - - return "LakeBTCTickers{" + "usd=" + usd + ", cny=" + cny + '}'; - } -} diff --git a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataService.java b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataService.java index 7440af90f..c8dedcae6 100644 --- a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataService.java +++ b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataService.java @@ -1,6 +1,9 @@ package org.knowm.xchange.lakebtc.service; import java.io.IOException; +import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.CurrencyPair; @@ -11,7 +14,6 @@ import org.knowm.xchange.lakebtc.LakeBTCAdapters; import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCOrderBook; import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTicker; -import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTickers; import org.knowm.xchange.service.marketdata.MarketDataService; /** @@ -33,15 +35,11 @@ public LakeBTCMarketDataService(Exchange exchange) { public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException { LakeBTCTicker lakeBTCTicker; - LakeBTCTickers lakeBTCTickers = getLakeBTCTickers(); + Map lakeBTCTickers = getLakeBTCTickers(); - if (CurrencyPair.BTC_USD.equals(currencyPair)) { - lakeBTCTicker = lakeBTCTickers.getUsd(); - } else if (CurrencyPair.BTC_CNY.equals(currencyPair)) { - lakeBTCTicker = lakeBTCTickers.getCny(); - } else { + lakeBTCTicker = lakeBTCTickers.get( LakeBTCAdapters.adaptCurrencyPair(currencyPair)); + if ( lakeBTCTicker == null ) throw new NotAvailableFromExchangeException(); - } return LakeBTCAdapters.adaptTicker(lakeBTCTicker, currencyPair); } diff --git a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataServiceRaw.java b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataServiceRaw.java index df2de18c7..9cad95cb7 100644 --- a/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataServiceRaw.java +++ b/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/service/LakeBTCMarketDataServiceRaw.java @@ -1,12 +1,13 @@ package org.knowm.xchange.lakebtc.service; import java.io.IOException; +import java.util.Map; import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.lakebtc.LakeBTC; import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCOrderBook; -import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTickers; +import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTicker; /** * @author kpysniak @@ -22,7 +23,7 @@ protected LakeBTCMarketDataServiceRaw(Exchange exchange) { } - public LakeBTCTickers getLakeBTCTickers() throws IOException { + public Map getLakeBTCTickers() throws IOException { return lakeBTC.getLakeBTCTickers(); } diff --git a/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/LakeBTCAdapterTest.java b/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/LakeBTCAdapterTest.java index f87920643..50c506253 100644 --- a/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/LakeBTCAdapterTest.java +++ b/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/LakeBTCAdapterTest.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.List; +import java.util.Map; import org.junit.Test; import org.knowm.xchange.currency.CurrencyPair; @@ -14,13 +15,12 @@ import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCMarketDataJsonTest; import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCOrderBook; import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTicker; -import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTickers; import com.fasterxml.jackson.databind.ObjectMapper; public class LakeBTCAdapterTest { - @Test +@Test public void testAdaptTicker() throws IOException { // Read in the JSON from the example resources @@ -29,18 +29,18 @@ public void testAdaptTicker() throws IOException { // Use Jackson to parse it ObjectMapper mapper = new ObjectMapper(); - LakeBTCTickers tickers = mapper.readValue(is, LakeBTCTickers.class); + Map tickers = mapper.readValue(is, mapper.getTypeFactory().constructMapType(Map.class, String.class, LakeBTCTicker.class)); - LakeBTCTicker cnyTicker = tickers.getCny(); - Ticker adaptedTicker = LakeBTCAdapters.adaptTicker(cnyTicker, CurrencyPair.BTC_CNY); + LakeBTCTicker hkdTicker = tickers.get(LakeBTCAdapters.adaptCurrencyPair(CurrencyPair.BTC_HKD)); + Ticker adaptedTicker = LakeBTCAdapters.adaptTicker(hkdTicker, CurrencyPair.BTC_HKD); - assertThat(adaptedTicker.getAsk()).isEqualTo("3524.07"); - assertThat(adaptedTicker.getBid()).isEqualTo("3517.13"); - assertThat(adaptedTicker.getLow()).isEqualTo("3480.07"); - assertThat(adaptedTicker.getHigh()).isEqualTo("3584.97"); - assertThat(adaptedTicker.getLast()).isEqualTo("3524.07"); - assertThat(adaptedTicker.getVolume()).isEqualTo("5964.7677"); - assertThat(adaptedTicker.getCurrencyPair()).isEqualTo(CurrencyPair.BTC_CNY); + assertThat(adaptedTicker.getAsk()).isEqualTo("73039.54"); + assertThat(adaptedTicker.getBid()).isEqualTo("73039.54"); + assertThat(adaptedTicker.getLow()).isEqualTo("69830.0"); + assertThat(adaptedTicker.getHigh()).isEqualTo("71864.81"); + assertThat(adaptedTicker.getLast()).isEqualTo("71230.0"); + assertThat(adaptedTicker.getVolume()).isEqualTo("1.41627"); + assertThat(adaptedTicker.getCurrencyPair()).isEqualTo(CurrencyPair.BTC_HKD); } @Test diff --git a/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCMarketDataJsonTest.java b/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCMarketDataJsonTest.java index 3bc751d96..175e07848 100644 --- a/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCMarketDataJsonTest.java +++ b/xchange-lakebtc/src/test/java/org/knowm/xchange/lakebtc/dto/marketdata/LakeBTCMarketDataJsonTest.java @@ -5,8 +5,11 @@ import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; +import java.util.Map; import org.junit.Test; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.lakebtc.LakeBTCAdapters; import com.fasterxml.jackson.databind.ObjectMapper; @@ -21,23 +24,23 @@ public void testDeserializeTicker() throws IOException { // Use Jackson to parse it ObjectMapper mapper = new ObjectMapper(); - LakeBTCTickers tickers = mapper.readValue(is, LakeBTCTickers.class); - - LakeBTCTicker cnyTicker = tickers.getCny(); - assertThat(cnyTicker.getAsk()).isEqualTo("3524.07"); - assertThat(cnyTicker.getBid()).isEqualTo("3517.13"); - assertThat(cnyTicker.getLast()).isEqualTo("3524.07"); - assertThat(cnyTicker.getHigh()).isEqualTo("3584.97"); - assertThat(cnyTicker.getLow()).isEqualTo("3480.07"); - assertThat(cnyTicker.getVolume()).isEqualTo("5964.7677"); - - LakeBTCTicker usdTicker = tickers.getUsd(); - assertThat(usdTicker.getAsk()).isEqualTo("564.63"); - assertThat(usdTicker.getBid()).isEqualTo("564.63"); - assertThat(usdTicker.getLast()).isEqualTo("564.4"); - assertThat(usdTicker.getHigh()).isEqualTo("573.83"); - assertThat(usdTicker.getLow()).isEqualTo("557.7"); - assertThat(usdTicker.getVolume()).isEqualTo("3521.2782"); + Map tickers = mapper.readValue(is, mapper.getTypeFactory().constructMapType(Map.class, String.class, LakeBTCTicker.class)); + + LakeBTCTicker hkdTicker = tickers.get(LakeBTCAdapters.adaptCurrencyPair(CurrencyPair.BTC_HKD)); + assertThat(hkdTicker.getAsk()).isEqualTo("73039.54"); + assertThat(hkdTicker.getBid()).isEqualTo("73039.54"); + assertThat(hkdTicker.getLast()).isEqualTo("71230.0"); + assertThat(hkdTicker.getHigh()).isEqualTo("71864.81"); + assertThat(hkdTicker.getLow()).isEqualTo("69830.0"); + assertThat(hkdTicker.getVolume()).isEqualTo("1.41627"); + + LakeBTCTicker usdTicker = tickers.get(LakeBTCAdapters.adaptCurrencyPair(CurrencyPair.BTC_USD)); + assertThat(usdTicker.getAsk()).isEqualTo("9336.87"); + assertThat(usdTicker.getBid()).isEqualTo("9334.66"); + assertThat(usdTicker.getLast()).isEqualTo("9347.43"); + assertThat(usdTicker.getHigh()).isEqualTo("9477.63"); + assertThat(usdTicker.getLow()).isEqualTo("8653.83"); + assertThat(usdTicker.getVolume()).isEqualTo("2133.491461"); } diff --git a/xchange-lakebtc/src/test/resources/marketdata/example-ticker-data.json b/xchange-lakebtc/src/test/resources/marketdata/example-ticker-data.json index 64bd23111..016dbe524 100644 --- a/xchange-lakebtc/src/test/resources/marketdata/example-ticker-data.json +++ b/xchange-lakebtc/src/test/resources/marketdata/example-ticker-data.json @@ -1,18 +1,202 @@ { - "USD": { - "last": 564.4, - "bid": 564.63, - "ask": 564.63, - "high": 573.83, - "low": 557.7, - "volume": 3521.2782 - }, - "CNY": { - "last": 3524.07, - "bid": 3517.13, - "ask": 3524.07, - "high": 3584.97, - "low": 3480.07, - "volume": 5964.7677 + "btcusd":{ + "high":"9477.63", + "low":"8653.83", + "volume":"2133.491461", + "last":"9347.43", + "bid":"9334.66", + "ask":"9336.87" + }, + "btceur":{ + "high":"7713.0", + "low":"7060.13", + "volume":"224.794666", + "last":"7607.5", + "bid":"7594.09", + "ask":"7612.0" + }, + "btchkd":{ + "high":"71864.81", + "low":"69830.0", + "volume":"1.41627", + "last":"71230.0", + "bid":"73039.54", + "ask":"73039.54" + }, + "btcjpy":{ + "high":"1031835.0", + "low":"945985.0", + "volume":"83.777657", + "last":"1021013.0", + "bid":"1018504.0", + "ask":"1018933.0" + }, + "btcgbp":{ + "high":"6908.2", + "low":"6334.13", + "volume":"24.808166", + "last":"6843.61", + "bid":"6843.61", + "ask":"6863.84" + }, + "btcaud":{ + "high":"12085.35", + "low":"11167.13", + "volume":"19.556099", + "last":"11889.51", + "bid":"11911.76", + "ask":"11926.01" + }, + "btccad":{ + "high":"11908.09", + "low":"10914.14", + "volume":"82.940729", + "last":"11808.61", + "bid":"11787.8", + "ask":"11809.28" + }, + "btcsgd":{ + "high":"12526.59", + "low":"11555.09", + "volume":"9.901003", + "last":"12396.56", + "bid":"12354.42", + "ask":"12379.76" + }, + "btcchf":{ + "high":"8850.78", + "low":"8317.66", + "volume":"0.3661", + "last":"8746.72", + "bid":"8751.24", + "ask":"8779.46" + }, + "btcnzd":{ + "high":null, + "low":null, + "volume":null, + "last":"13500.0", + "bid":"12868.29", + "ask":"12921.22" + }, + "btcngn":{ + "high":null, + "low":null, + "volume":null, + "last":"600000.0", + "bid":null, + "ask":null + }, + "eurusd":{ + "high":"1.2387", + "low":"1.2196", + "volume":"57034.009629", + "last":"1.2292", + "bid":"1.2266", + "ask":"1.2292" + }, + "gbpusd":{ + "high":"1.3756", + "low":"1.3582", + "volume":"10002.886414", + "last":"1.3582", + "bid":"1.3603", + "ask":"1.3644" + }, + "usdjpy":{ + "high":"109.45", + "low":"107.91", + "volume":"69319.754929", + "last":"109.13", + "bid":"109.11", + "ask":"109.13" + }, + "usdhkd":{ + "high":"7.8908", + "low":"7.7877", + "volume":"12774.240934", + "last":"7.8146", + "bid":null, + "ask":"7.8227" + }, + "usdcad":{ + "high":"1.266", + "low":"1.2466", + "volume":"50799.1579", + "last":"1.266", + "bid":"1.2628", + "ask":"1.2648" + }, + "usdsgd":{ + "high":"1.3324", + "low":"1.3179", + "volume":"12240.4693", + "last":"1.3262", + "bid":"1.3235", + "ask":"1.3259" + }, + "audusd":{ + "high":"0.7902", + "low":"0.7787", + "volume":"42427.644181", + "last":"0.7818", + "bid":"0.7829", + "ask":"0.7839" + }, + "nzdusd":{ + "high":null, + "low":null, + "volume":null, + "last":"0.7328", + "bid":"0.7226", + "ask":"0.7254" + }, + "usdchf":{ + "high":"0.9414", + "low":"0.9391", + "volume":"1071.9367", + "last":"0.9402", + "bid":"0.9375", + "ask":"0.9403" + }, + "usdngn":{ + "high":null, + "low":null, + "volume":null, + "last":"200.0", + "bid":null, + "ask":null + }, + "ethbtc":{ + "high":"0.08", + "low":"0.0797", + "volume":null, + "last":"0.0797", + "bid":"0.0795", + "ask":"0.1199" + }, + "ltcbtc":{ + "high":null, + "low":null, + "volume":null, + "last":"0.0105", + "bid":"0.0105", + "ask":null + }, + "xrpbtc":{ + "high":"0.000146", + "low":"0.00013", + "volume":"1.369", + "last":"0.00013", + "bid":"0.0001", + "ask":"0.00013" + }, + "baceth":{ + "high":null, + "low":null, + "volume":null, + "last":"0.0001", + "bid":null, + "ask":null } } \ No newline at end of file From 3b2c30bbaa749ad4555c0cb12098e5e60ad4d3cb Mon Sep 17 00:00:00 2001 From: cacofish Date: Mon, 12 Feb 2018 11:58:47 -0800 Subject: [PATCH 069/117] Add withdraw support for gateio Add withdraw support for gateio --- .../xchange/gateio/GateioAuthenticated.java | 49 +++++++++++++------ .../dto/account/GateioDepositAddress.java | 47 ++++++++++++++++++ .../gateio/service/GateioAccountService.java | 12 ++--- .../service/GateioAccountServiceRaw.java | 25 +++++++++- 4 files changed, 109 insertions(+), 24 deletions(-) create mode 100644 xchange-gateio/src/main/java/org/knowm/xchange/gateio/dto/account/GateioDepositAddress.java diff --git a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/GateioAuthenticated.java b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/GateioAuthenticated.java index 1fcd1e56c..68fd7419d 100644 --- a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/GateioAuthenticated.java +++ b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/GateioAuthenticated.java @@ -2,7 +2,6 @@ import java.io.IOException; import java.math.BigDecimal; - import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; import javax.ws.rs.HeaderParam; @@ -10,14 +9,13 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; - import org.knowm.xchange.gateio.dto.GateioBaseResponse; +import org.knowm.xchange.gateio.dto.account.GateioDepositAddress; import org.knowm.xchange.gateio.dto.account.GateioFunds; import org.knowm.xchange.gateio.dto.trade.GateioOpenOrders; import org.knowm.xchange.gateio.dto.trade.GateioOrderStatus; import org.knowm.xchange.gateio.dto.trade.GateioPlaceOrderReturn; import org.knowm.xchange.gateio.dto.trade.GateioTradeHistoryReturn; - import si.mazi.rescu.ParamsDigest; import si.mazi.rescu.SynchronizedValueFactory; @@ -31,40 +29,61 @@ public interface GateioAuthenticated extends Gateio { GateioFunds getFunds(@HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; + @POST + @Path("private/depositAddress") + GateioDepositAddress getDepositAddress(@HeaderParam("KEY") String apiKey, + @HeaderParam("SIGN") ParamsDigest signer, @FormParam("currency") String currency) + throws IOException; + + @POST + @Path("private/withdraw") + GateioBaseResponse withdraw(@HeaderParam("KEY") String apiKey, + @HeaderParam("SIGN") ParamsDigest signer, @FormParam("currency") String currency, + @FormParam("amount") String amount, @FormParam("address") String address) throws IOException; + @POST @Path("private/cancelorder") - GateioBaseResponse cancelOrder(@FormParam("orderNumber") String orderNumber, @HeaderParam("KEY") String apiKey, - @HeaderParam("SIGN") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; + GateioBaseResponse cancelOrder(@FormParam("orderNumber") String orderNumber, + @HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, + @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; @POST @Path("private/cancelAllOrders") - GateioBaseResponse cancelAllOrders(@FormParam("type") String type, @FormParam("currencyPair") String currencyPair, @HeaderParam("KEY") String apiKey, - @HeaderParam("SIGN") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; + GateioBaseResponse cancelAllOrders(@FormParam("type") String type, + @FormParam("currencyPair") String currencyPair, @HeaderParam("KEY") String apiKey, + @HeaderParam("SIGN") ParamsDigest signer, + @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; @POST @Path("private/buy") - GateioPlaceOrderReturn buy(@FormParam("currencyPair") String currencyPair, @FormParam("rate") BigDecimal rate, - @FormParam("amount") BigDecimal amount, @HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, + GateioPlaceOrderReturn buy(@FormParam("currencyPair") String currencyPair, + @FormParam("rate") BigDecimal rate, @FormParam("amount") BigDecimal amount, + @HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; @POST @Path("private/sell") - GateioPlaceOrderReturn sell(@FormParam("currencyPair") String currencyPair, @FormParam("rate") BigDecimal rate, - @FormParam("amount") BigDecimal amount, @HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, + GateioPlaceOrderReturn sell(@FormParam("currencyPair") String currencyPair, + @FormParam("rate") BigDecimal rate, @FormParam("amount") BigDecimal amount, + @HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; @POST @Path("private/openOrders") - GateioOpenOrders getOpenOrders(@HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, + GateioOpenOrders getOpenOrders(@HeaderParam("KEY") String apiKey, + @HeaderParam("SIGN") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; @POST @Path("private/tradeHistory") - GateioTradeHistoryReturn getUserTradeHistory(@HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, - @FormParam("nonce") SynchronizedValueFactory nonce, @FormParam("pair") String pair) throws IOException; + GateioTradeHistoryReturn getUserTradeHistory(@HeaderParam("KEY") String apiKey, + @HeaderParam("SIGN") ParamsDigest signer, + @FormParam("nonce") SynchronizedValueFactory nonce, @FormParam("pair") String pair) + throws IOException; @POST @Path("private/getorder") - GateioOrderStatus getOrderStatus(@FormParam("order_id") String orderId, @HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, + GateioOrderStatus getOrderStatus(@FormParam("order_id") String orderId, + @HeaderParam("KEY") String apiKey, @HeaderParam("SIGN") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory nonce) throws IOException; } diff --git a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/dto/account/GateioDepositAddress.java b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/dto/account/GateioDepositAddress.java new file mode 100644 index 000000000..f8499b34a --- /dev/null +++ b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/dto/account/GateioDepositAddress.java @@ -0,0 +1,47 @@ +package org.knowm.xchange.gateio.dto.account; + +import org.knowm.xchange.gateio.dto.GateioBaseResponse; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GateioDepositAddress extends GateioBaseResponse { + + private final String baseAddress; + + private final String addressTag; + + /** + * Constructor + * + * @param theAvailable + * @param theLocked + */ + public GateioDepositAddress(@JsonProperty("addr") String addr, + @JsonProperty("result") boolean result, @JsonProperty("message") final String message) { + + super(result, message); + + String[] addressComponent = addr.split("/"); + this.baseAddress = addressComponent[0]; + if (addressComponent.length > 1) { + this.addressTag = addressComponent[1]; + } else { + this.addressTag = null; + } + } + + public String getBaseAddress() { + return baseAddress; + } + + public String getAddressTag() { + return addressTag; + } + + @Override + public String toString() { + + return "BTERDepositAddressReturn [baseAddress=" + baseAddress + ", addressTag=" + addressTag + + "]"; + } + +} diff --git a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountService.java b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountService.java index c4fab7ed2..c68948a26 100644 --- a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountService.java +++ b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountService.java @@ -3,7 +3,6 @@ import java.io.IOException; import java.math.BigDecimal; import java.util.List; - import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; @@ -35,21 +34,21 @@ public AccountInfo getAccountInfo() throws IOException { } @Override - public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException { + public String withdrawFunds(Currency currency, BigDecimal amount, String address) + throws IOException { throw new NotAvailableFromExchangeException(); } @Override - public String withdrawFunds( - WithdrawFundsParams params) throws IOException { + public String withdrawFunds(WithdrawFundsParams params) throws IOException { throw new NotAvailableFromExchangeException(); } @Override public String requestDepositAddress(Currency currency, String... args) throws IOException { - throw new NotAvailableFromExchangeException(); + return super.getGateioDepositAddress(currency).getBaseAddress(); } @Override @@ -58,8 +57,7 @@ public TradeHistoryParams createFundingHistoryParams() { } @Override - public List getFundingHistory( - TradeHistoryParams params) throws IOException { + public List getFundingHistory(TradeHistoryParams params) throws IOException { throw new NotYetImplementedForExchangeException(); } } diff --git a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountServiceRaw.java b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountServiceRaw.java index 91ba982a9..08151718d 100644 --- a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountServiceRaw.java +++ b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioAccountServiceRaw.java @@ -1,8 +1,11 @@ package org.knowm.xchange.gateio.service; import java.io.IOException; - +import java.math.BigDecimal; import org.knowm.xchange.Exchange; +import org.knowm.xchange.currency.Currency; +import org.knowm.xchange.gateio.dto.GateioBaseResponse; +import org.knowm.xchange.gateio.dto.account.GateioDepositAddress; import org.knowm.xchange.gateio.dto.account.GateioFunds; public class GateioAccountServiceRaw extends GateioBaseService { @@ -19,8 +22,26 @@ public GateioAccountServiceRaw(Exchange exchange) { public GateioFunds getGateioAccountInfo() throws IOException { - GateioFunds gateioFunds = bter.getFunds(exchange.getExchangeSpecification().getApiKey(), signatureCreator, exchange.getNonceFactory()); + GateioFunds gateioFunds = bter.getFunds(exchange.getExchangeSpecification().getApiKey(), + signatureCreator, exchange.getNonceFactory()); return handleResponse(gateioFunds); } + public GateioDepositAddress getGateioDepositAddress(Currency currency) throws IOException { + GateioDepositAddress depositAddress = + bter.getDepositAddress(exchange.getExchangeSpecification().getApiKey(), signatureCreator, + currency.getCurrencyCode()); + return depositAddress; + } + + public GateioBaseResponse withdraw(Currency currency, BigDecimal amount, String baseAddress, + String addressTag) throws IOException { + String withdrawAddress = baseAddress; + if (addressTag != null && addressTag.length() > 0) { + withdrawAddress = withdrawAddress + "/" + addressTag; + } + + return bter.withdraw(exchange.getExchangeSpecification().getApiKey(), signatureCreator, + currency.getCurrencyCode(), amount.toPlainString(), withdrawAddress); + } } From d400b1e3256da1a95eac50d270aeb52fe2c7ef13 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Tue, 13 Feb 2018 06:23:32 +0530 Subject: [PATCH 070/117] [Cex IO] Adding a remote init to get the correct minimumAmounts --- .../java/org/knowm/xchange/cexio/CexIO.java | 5 + .../knowm/xchange/cexio/CexIOExchange.java | 33 ++- .../xchange/cexio/dto/CexIOApiResponse.java | 34 +++ .../dto/marketdata/CexIOCurrencyLimits.java | 101 +++++++ .../service/CexIOMarketDataServiceRaw.java | 10 +- .../service/marketdata/RemoteInitTest.java | 49 +++ .../marketdata/sample_currency_limits.json | 278 ++++++++++++++++++ 7 files changed, 506 insertions(+), 4 deletions(-) create mode 100644 xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java create mode 100644 xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java create mode 100644 xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java create mode 100644 xchange-cexio/src/test/resources/marketdata/sample_currency_limits.json diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIO.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIO.java index 642e73236..32990e70e 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIO.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIO.java @@ -11,6 +11,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; import org.knowm.xchange.cexio.dto.marketdata.CexIODepth; import org.knowm.xchange.cexio.dto.marketdata.CexIOTicker; import org.knowm.xchange.cexio.dto.marketdata.CexIOTrade; @@ -39,4 +40,8 @@ public interface CexIO { CexIOTrade[] getTradesSince(@PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency, @DefaultValue("1") @FormParam("since") long since) throws IOException; + @GET + @Path("currency_limits") + CexIOCurrencyLimits getCurrencyLimits() throws IOException; + } diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOExchange.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOExchange.java index a6b04acd1..5f0099177 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOExchange.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOExchange.java @@ -3,13 +3,19 @@ import org.knowm.xchange.BaseExchange; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; import org.knowm.xchange.cexio.service.CexIOAccountService; import org.knowm.xchange.cexio.service.CexIOMarketDataService; import org.knowm.xchange.cexio.service.CexIOTradeService; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.meta.CurrencyPairMetaData; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.utils.nonce.AtomicLongIncrementalTime2014NonceFactory; - import si.mazi.rescu.SynchronizedValueFactory; +import java.io.IOException; +import java.util.Map; + public class CexIOExchange extends BaseExchange implements Exchange { private SynchronizedValueFactory nonceFactory = new AtomicLongIncrementalTime2014NonceFactory(); @@ -34,6 +40,31 @@ public ExchangeSpecification getDefaultExchangeSpecification() { return exchangeSpecification; } + @Override + public void remoteInit() throws IOException, ExchangeException { + logger.info("Attempting remoteInit for {}", getExchangeSpecification().getExchangeName()); + final CexIOCurrencyLimits currencyLimits = ((CexIOMarketDataService) this.marketDataService).getCurrencyLimits(); + //Working with the live map so the changes reflect + final Map currencyPairs = getExchangeMetaData().getCurrencyPairs(); + + for (CexIOCurrencyLimits.Pair pair : currencyLimits.getData().getPairs()) { + CurrencyPair currencyPair = new CurrencyPair(pair.getSymbol1(), pair.getSymbol2()); + CurrencyPairMetaData metaData = new CurrencyPairMetaData(null, pair.getMinLotSize(), + pair.getMaxLotSize(), null); + currencyPairs.merge(currencyPair, metaData, (oldMetaData, newMetaData) -> + new CurrencyPairMetaData( + // trading fee is not present in this response. using the previous values. + oldMetaData.getTradingFee(), + newMetaData.getMinimumAmount(), + // some maximumAmount's in the currency_limits api response are null - using the json values + newMetaData.getMaximumAmount() != null ? newMetaData.getMaximumAmount() : oldMetaData.getMaximumAmount(), + oldMetaData.getPriceScale() + ) + ); + } + logger.info("remoteInit successful for {}", getExchangeSpecification().getExchangeName()); + } + @Override public SynchronizedValueFactory getNonceFactory() { diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java new file mode 100644 index 000000000..cb3aaf7da --- /dev/null +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java @@ -0,0 +1,34 @@ +package org.knowm.xchange.cexio.dto; + +/** + * @author ujjwal on 13/02/18. + */ +public abstract class CexIOApiResponse { + private final String e; + private final Object data; + private final String ok; + private final String error; + + protected CexIOApiResponse(String e, Object data, String ok, String error) { + this.e = e; + this.data = data; + this.ok = ok; + this.error = error; + } + + public String getE() { + return e; + } + + public Object getData() { + return data; + } + + public String getOk() { + return ok; + } + + public String getError() { + return error; + } +} diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java new file mode 100644 index 000000000..3c0965d83 --- /dev/null +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java @@ -0,0 +1,101 @@ +package org.knowm.xchange.cexio.dto.marketdata; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.knowm.xchange.cexio.dto.CexIOApiResponse; +import org.knowm.xchange.currency.Currency; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author ujjwal on 13/02/18. + */ +public class CexIOCurrencyLimits extends CexIOApiResponse { + + public CexIOCurrencyLimits(@JsonProperty("e") final String e, @JsonProperty("data") final Data data, + @JsonProperty("ok") final String ok, @JsonProperty("error") final String error) { + super(e, data, ok, error); + } + + public Data getData() { + return (Data) super.getData(); + } + + public static class Data { + private final List pairs; + + public Data(@JsonProperty("pairs") List pairs) { + this.pairs = pairs; + } + + public List getPairs() { + return pairs; + } + } + + public static class Pair { + private final Currency symbol1; + private final Currency symbol2; + private final BigDecimal minLotSize; + private final BigDecimal minLotSizeS2; + private final BigDecimal maxLotSize; + private final BigDecimal minPrice; + private final BigDecimal maxPrice; + + public Pair(@JsonProperty("symbol1") Currency symbol1, @JsonProperty("symbol2") Currency symbol2, + @JsonProperty("minLotSize") BigDecimal minLotSize, + @JsonProperty("minLotSizeS2") BigDecimal minLotSizeS2, + @JsonProperty("maxLotSize") BigDecimal maxLotSize, + @JsonProperty("minPrice") BigDecimal minPrice, @JsonProperty("maxPrice") BigDecimal maxPrice) { + this.symbol1 = symbol1; + this.symbol2 = symbol2; + this.minLotSize = minLotSize; + this.minLotSizeS2 = minLotSizeS2; + this.maxLotSize = maxLotSize; + this.minPrice = minPrice; + this.maxPrice = maxPrice; + } + + public Currency getSymbol1() { + return symbol1; + } + + public Currency getSymbol2() { + return symbol2; + } + + public BigDecimal getMinLotSize() { + return minLotSize; + } + + public BigDecimal getMinLotSizeS2() { + return minLotSizeS2; + } + + public BigDecimal getMaxLotSize() { + return maxLotSize; + } + + public BigDecimal getMinPrice() { + return minPrice; + } + + public BigDecimal getMaxPrice() { + return maxPrice; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("Pair{"); + sb.append("symbol1=").append(symbol1); + sb.append(", symbol2=").append(symbol2); + sb.append(", minLotSize=").append(minLotSize); + sb.append(", minLotSizeS2=").append(minLotSizeS2); + sb.append(", maxLotSize=").append(maxLotSize); + sb.append(", minPrice=").append(minPrice); + sb.append(", maxPrice=").append(maxPrice); + sb.append('}'); + return sb.toString(); + } + } +} diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java index 13a7ba55b..8fdf89c64 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java @@ -1,16 +1,16 @@ package org.knowm.xchange.cexio.service; -import java.io.IOException; - import org.knowm.xchange.Exchange; import org.knowm.xchange.cexio.CexIO; +import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; import org.knowm.xchange.cexio.dto.marketdata.CexIODepth; import org.knowm.xchange.cexio.dto.marketdata.CexIOTicker; import org.knowm.xchange.cexio.dto.marketdata.CexIOTrade; import org.knowm.xchange.currency.CurrencyPair; - import si.mazi.rescu.RestProxyFactory; +import java.io.IOException; + /** * @author timmolter */ @@ -57,4 +57,8 @@ public CexIOTrade[] getCexIOTrades(CurrencyPair currencyPair, Long since) throws return trades; } + public CexIOCurrencyLimits getCurrencyLimits() throws IOException { + return cexio.getCurrencyLimits(); + } + } diff --git a/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java new file mode 100644 index 000000000..838cf26c5 --- /dev/null +++ b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java @@ -0,0 +1,49 @@ +package org.knowm.xchange.cexio.service.marketdata; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.Test; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.cexio.CexIOExchange; +import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; +import org.knowm.xchange.cexio.service.CexIOMarketDataService; + +import java.io.IOException; +import java.io.InputStream; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author ujjwal on 13/02/18. + */ +public class RemoteInitTest { + @Test + public void unitJsonMapperTest() throws IOException { + InputStream is = getClass().getResourceAsStream("/marketdata/sample_currency_limits.json"); + ObjectMapper mapper = new ObjectMapper(); + final CexIOCurrencyLimits cexIOCurrencyLimits = mapper.readValue(is, CexIOCurrencyLimits.class); + assertThat(cexIOCurrencyLimits).isNotNull(); + assertThat(cexIOCurrencyLimits.getData().getPairs().size()).isBetween(1, 30); + assertThat(cexIOCurrencyLimits.getData().getPairs()).allSatisfy(pair -> { + assertThat(pair.getSymbol1()).isNotNull(); + assertThat(pair.getSymbol2()).isNotNull(); + assertThat(pair.getMinLotSize()).isPositive(); + // we don't care about the other parameters for now. + }); + + } + + @Test + public void integrationTest() throws IOException { + final Exchange exchange = ExchangeFactory.INSTANCE.createExchange(CexIOExchange.class); + + assertThat(exchange).isNotNull(); + assertThat(exchange.getExchangeMetaData().getCurrencyPairs()).isNotEmpty(); + + final CexIOCurrencyLimits currencyLimits = ((CexIOMarketDataService) exchange.getMarketDataService()).getCurrencyLimits(); + assertThat(currencyLimits.getE()).isEqualToIgnoringCase("currency_limits"); + assertThat(currencyLimits.getError()).isNullOrEmpty(); + assertThat(currencyLimits.getOk()).isEqualToIgnoringCase("ok"); + + } +} diff --git a/xchange-cexio/src/test/resources/marketdata/sample_currency_limits.json b/xchange-cexio/src/test/resources/marketdata/sample_currency_limits.json new file mode 100644 index 000000000..89aaec2b1 --- /dev/null +++ b/xchange-cexio/src/test/resources/marketdata/sample_currency_limits.json @@ -0,0 +1,278 @@ +{ + "e": "currency_limits", + "ok": "ok", + "data": { + "pairs": [ + { + "symbol1": "BTC", + "symbol2": "USD", + "minLotSize": 0.002, + "minLotSizeS2": 20, + "maxLotSize": 30, + "minPrice": "1500", + "maxPrice": "35000" + }, + { + "symbol1": "ETH", + "symbol2": "USD", + "minLotSize": 0.05, + "minLotSizeS2": 20, + "maxLotSize": 1000, + "minPrice": "70", + "maxPrice": "4096" + }, + { + "symbol1": "BCH", + "symbol2": "USD", + "minLotSize": 0.02, + "minLotSizeS2": 20, + "maxLotSize": 30, + "minPrice": "150", + "maxPrice": "8192" + }, + { + "symbol1": "BTG", + "symbol2": "USD", + "minLotSize": 0.03, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "5", + "maxPrice": "2048" + }, + { + "symbol1": "DASH", + "symbol2": "USD", + "minLotSize": 0.03, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "100", + "maxPrice": "4096" + }, + { + "symbol1": "XRP", + "symbol2": "USD", + "minLotSize": 40, + "minLotSizeS2": 10, + "maxLotSize": null, + "minPrice": "0.05", + "maxPrice": "50" + }, + { + "symbol1": "XLM", + "symbol2": "USD", + "minLotSize": 70, + "minLotSizeS2": 10, + "maxLotSize": null, + "minPrice": "0.03", + "maxPrice": "50" + }, + { + "symbol1": "ZEC", + "symbol2": "USD", + "minLotSize": 0.07, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "50", + "maxPrice": "4096" + }, + { + "symbol1": "BTC", + "symbol2": "EUR", + "minLotSize": 0.002, + "minLotSizeS2": 20, + "maxLotSize": 30, + "minPrice": "1500", + "maxPrice": "35000" + }, + { + "symbol1": "ETH", + "symbol2": "EUR", + "minLotSize": 0.05, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "70", + "maxPrice": "4096" + }, + { + "symbol1": "BCH", + "symbol2": "EUR", + "minLotSize": 0.02, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "150", + "maxPrice": "8192" + }, + { + "symbol1": "BTG", + "symbol2": "EUR", + "minLotSize": 0.03, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "5", + "maxPrice": "2048" + }, + { + "symbol1": "DASH", + "symbol2": "EUR", + "minLotSize": 0.03, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "100", + "maxPrice": "4096" + }, + { + "symbol1": "XRP", + "symbol2": "EUR", + "minLotSize": 40, + "minLotSizeS2": 10, + "maxLotSize": null, + "minPrice": "0.05", + "maxPrice": "50" + }, + { + "symbol1": "XLM", + "symbol2": "EUR", + "minLotSize": 70, + "minLotSizeS2": 10, + "maxLotSize": null, + "minPrice": "0.03", + "maxPrice": "50" + }, + { + "symbol1": "ZEC", + "symbol2": "EUR", + "minLotSize": 0.07, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "50", + "maxPrice": "4096" + }, + { + "symbol1": "BTC", + "symbol2": "GBP", + "minLotSize": 0.002, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "1300", + "maxPrice": "30000" + }, + { + "symbol1": "ETH", + "symbol2": "GBP", + "minLotSize": 0.05, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "60", + "maxPrice": "5128" + }, + { + "symbol1": "BCH", + "symbol2": "GBP", + "minLotSize": 0.02, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "150", + "maxPrice": "8192" + }, + { + "symbol1": "DASH", + "symbol2": "GBP", + "minLotSize": 0.03, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "100", + "maxPrice": "4096" + }, + { + "symbol1": "ZEC", + "symbol2": "GBP", + "minLotSize": 0.07, + "minLotSizeS2": 20, + "maxLotSize": null, + "minPrice": "40", + "maxPrice": "4096" + }, + { + "symbol1": "BTC", + "symbol2": "RUB", + "minLotSize": 0.001, + "minLotSizeS2": 1000, + "maxLotSize": null, + "minPrice": "10000", + "maxPrice": "2000000" + }, + { + "symbol1": "ETH", + "symbol2": "BTC", + "minLotSize": 0.025, + "minLotSizeS2": 0.001, + "maxLotSize": 1000, + "minPrice": "0.025", + "maxPrice": "2" + }, + { + "symbol1": "BCH", + "symbol2": "BTC", + "minLotSize": 0.007, + "minLotSizeS2": 0.001, + "maxLotSize": 30, + "minPrice": "0.005", + "maxPrice": "2" + }, + { + "symbol1": "BTG", + "symbol2": "BTC", + "minLotSize": 0.01, + "minLotSizeS2": 0.001, + "maxLotSize": null, + "minPrice": "0.001", + "maxPrice": "2" + }, + { + "symbol1": "DASH", + "symbol2": "BTC", + "minLotSize": 0.015, + "minLotSizeS2": 0.001, + "maxLotSize": null, + "minPrice": "0.005", + "maxPrice": "2" + }, + { + "symbol1": "XRP", + "symbol2": "BTC", + "minLotSize": 40, + "minLotSizeS2": 0.001, + "maxLotSize": null, + "minPrice": "0.000003", + "maxPrice": "0.001" + }, + { + "symbol1": "XLM", + "symbol2": "BTC", + "minLotSize": 70, + "minLotSizeS2": 0.001, + "maxLotSize": null, + "minPrice": "0.000001", + "maxPrice": "0.0005" + }, + { + "symbol1": "ZEC", + "symbol2": "BTC", + "minLotSize": 0.03, + "minLotSizeS2": 0.001, + "maxLotSize": null, + "minPrice": "0.005", + "maxPrice": "2" + }, + { + "symbol1": "GHS", + "symbol2": "BTC", + "minLotSize": 100, + "minLotSizeS2": 0.00001, + "maxLotSize": null, + "minPrice": "0.000001", + "maxPrice": "0.01" + } + ] + } +} \ No newline at end of file From 9ae54ecbfe11cb4684c1b9529c5e4ad9ca282f35 Mon Sep 17 00:00:00 2001 From: Kevin Jannis Date: Tue, 13 Feb 2018 08:25:37 +0100 Subject: [PATCH 071/117] [BIBOX] Removed System.out.println() --- .../src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java | 1 - 1 file changed, 1 deletion(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index 435f6f3c4..771af3553 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -47,7 +47,6 @@ public static Ticker adaptTicker(BiboxTicker ticker, CurrencyPair currencyPair) public static AccountInfo adaptAccountInfo(List coins) { Wallet wallet = adaptWallet(coins); - System.out.println(wallet); return new AccountInfo(wallet); } From 5cbe486a6eabcf533b3e938079b3a5d03d4862f2 Mon Sep 17 00:00:00 2001 From: Thomas Diesler Date: Tue, 13 Feb 2018 15:59:50 +0100 Subject: [PATCH 072/117] [Binance] Initialize min/max quantity and tickSize properly resolves #2299 --- .../xchange/binance/BinanceExchange.java | 59 +++++++++++-------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceExchange.java b/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceExchange.java index 027f93f37..3729de524 100644 --- a/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceExchange.java +++ b/xchange-binance/src/main/java/org/knowm/xchange/binance/BinanceExchange.java @@ -7,7 +7,6 @@ import org.knowm.xchange.BaseExchange; import org.knowm.xchange.ExchangeSpecification; -import org.knowm.xchange.binance.dto.marketdata.BinancePrice; import org.knowm.xchange.binance.dto.meta.exchangeinfo.BinanceExchangeInfo; import org.knowm.xchange.binance.dto.meta.exchangeinfo.Filter; import org.knowm.xchange.binance.dto.meta.exchangeinfo.Symbol; @@ -29,6 +28,7 @@ public class BinanceExchange extends BaseExchange { private static final int DEFAULT_PRECISION = 8; private SynchronizedValueFactory nonceFactory = new AtomicLongCurrentTimeIncrementalNonceFactory(); + private BinanceExchangeInfo exchangeInfo; private Long deltaServerTime; @Override @@ -56,6 +56,10 @@ public ExchangeSpecification getDefaultExchangeSpecification() { return spec; } + public BinanceExchangeInfo getExchangeInfo() { + return exchangeInfo; + } + @Override public void remoteInit() { try { @@ -64,31 +68,38 @@ public void remoteInit() { Map currencies = exchangeMetaData.getCurrencies(); BinanceMarketDataService marketDataService = (BinanceMarketDataService) this.marketDataService; - BinanceExchangeInfo exchangeInfo = marketDataService.getExchangeInfo(); - Symbol[] symbols = exchangeInfo.getSymbols(); - - for (BinancePrice price : marketDataService.tickerAllPrices()) { - CurrencyPair pair = price.getCurrencyPair(); - currencyPairs.put(price.getCurrencyPair(), new CurrencyPairMetaData(BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, 8)); - - for (Symbol symbol : symbols) { - if (symbol.getSymbol().equals(pair.base.getCurrencyCode() + pair.counter.getCurrencyCode())) { - - int basePrecision = DEFAULT_PRECISION; - int counterPrecision = DEFAULT_PRECISION; - - Filter[] filters = symbol.getFilters(); - for (Filter filter : filters) { - if (filter.getFilterType().equals("PRICE_FILTER")) { - counterPrecision = numberOfDecimals(filter.getMinPrice()); - } else if (filter.getFilterType().equals("LOT_SIZE")) { - basePrecision = numberOfDecimals(filter.getMinQty()); - } + exchangeInfo = marketDataService.getExchangeInfo(); + + for (Symbol symbol : exchangeInfo.getSymbols()) { + + CurrencyPair pair = new CurrencyPair(symbol.getBaseAsset(), symbol.getQuoteAsset()); + CurrencyPairMetaData pairMetaData = currencyPairs.get(pair); + if (pairMetaData == null) { + BigDecimal tradingFee = BigDecimal.ZERO; + BigDecimal minAmount = BigDecimal.ZERO; + BigDecimal maxAmount = BigDecimal.ZERO; + Integer priceScale = DEFAULT_PRECISION; + for (Filter filter : symbol.getFilters()) { + if (filter.getFilterType().equals("PRICE_FILTER")) { + priceScale = numberOfDecimals(filter.getTickSize()); + } else if (filter.getFilterType().equals("LOT_SIZE")) { + minAmount = new BigDecimal(filter.getMinQty()); + maxAmount = new BigDecimal(filter.getMaxQty()); } - - currencies.put(pair.base, new CurrencyMetaData(basePrecision, BigDecimal.ZERO)); - currencies.put(pair.counter, new CurrencyMetaData(counterPrecision, BigDecimal.ZERO)); } + pairMetaData = new CurrencyPairMetaData(tradingFee, minAmount, maxAmount, priceScale); + currencyPairs.put(pair, pairMetaData); + } + + CurrencyMetaData baseMetaData = currencies.get(pair.base); + if (baseMetaData == null) { + Integer basePrecision = Integer.parseInt(symbol.getBaseAssetPrecision()); + currencies.put(pair.base, new CurrencyMetaData(basePrecision, BigDecimal.ZERO)); + } + CurrencyMetaData counterMetaData = currencies.get(pair.base); + if (counterMetaData == null) { + Integer counterPrecision = Integer.parseInt(symbol.getQuotePrecision()); + currencies.put(pair.counter, new CurrencyMetaData(counterPrecision, BigDecimal.ZERO)); } } } catch (Exception e) { From a08a38523943e268ec558e4c93e08f8220da8e5d Mon Sep 17 00:00:00 2001 From: Theofanis Pantelides Date: Tue, 13 Feb 2018 15:20:35 -0500 Subject: [PATCH 073/117] [Zaif] New Exchange, getDepth + Tests --- pom.xml | 1 + .../zaif/market/ZaifMarketDataDemo.java | 51 + xchange-zaif/api-specification.txt | 6 + xchange-zaif/pom.xml | 34 + .../java/org/knowm/xchange/zaif/Zaif.java | 29 + .../org/knowm/xchange/zaif/ZaifAdapters.java | 56 + .../org/knowm/xchange/zaif/ZaifExchange.java | 46 + .../knowm/xchange/zaif/dto/ZaifException.java | 11 + .../zaif/dto/marketdata/ZaifFullBook.java | 45 + .../zaif/dto/marketdata/ZaifFullBookTier.java | 32 + .../zaif/dto/marketdata/ZaifMarket.java | 26 + .../xchange/zaif/service/ZaifBaseService.java | 23 + .../zaif/service/ZaifMarketDataService.java | 42 + .../service/ZaifMarketDataServiceRaw.java | 48 + xchange-zaif/src/main/resources/zaif.json | 14 + .../knowm/xchange/zaif/ZaifAdaptersTest.java | 39 + .../knowm/xchange/zaif/ZaifExchangeTest.java | 25 + .../MarketDataFetchIntegration.java | 25 + .../marketdata/example-fullbook-data.json | 1206 +++++++++++++++++ 19 files changed, 1759 insertions(+) create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/zaif/market/ZaifMarketDataDemo.java create mode 100644 xchange-zaif/api-specification.txt create mode 100644 xchange-zaif/pom.xml create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/Zaif.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifAdapters.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifExchange.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/ZaifException.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBook.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBookTier.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifMarket.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifBaseService.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataService.java create mode 100644 xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataServiceRaw.java create mode 100644 xchange-zaif/src/main/resources/zaif.json create mode 100644 xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifAdaptersTest.java create mode 100644 xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifExchangeTest.java create mode 100644 xchange-zaif/src/test/java/org/knowm/xchange/zaif/marketdata/MarketDataFetchIntegration.java create mode 100644 xchange-zaif/src/test/resources/marketdata/example-fullbook-data.json diff --git a/pom.xml b/pom.xml index 76e07f273..1fb68786c 100755 --- a/pom.xml +++ b/pom.xml @@ -159,6 +159,7 @@ xchange-vircurex xchange-yobit xchange-wex + xchange-zaif diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/zaif/market/ZaifMarketDataDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/zaif/market/ZaifMarketDataDemo.java new file mode 100644 index 000000000..dfcc3071f --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/zaif/market/ZaifMarketDataDemo.java @@ -0,0 +1,51 @@ +package org.knowm.xchange.examples.zaif.market; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.service.marketdata.MarketDataService; +import org.knowm.xchange.zaif.ZaifExchange; +import org.knowm.xchange.zaif.dto.marketdata.ZaifFullBook; +import org.knowm.xchange.zaif.dto.marketdata.ZaifMarket; +import org.knowm.xchange.zaif.service.ZaifMarketDataServiceRaw; + +public class ZaifMarketDataDemo { + private static final CurrencyPair PAIR = CurrencyPair.BTC_JPY; + static Exchange exchange; + + public static void main(String[] args) throws IOException { + + exchange = ExchangeFactory.INSTANCE.createExchange(ZaifExchange.class.getName()); + MarketDataService marketDataService = exchange.getMarketDataService(); + + System.out.println(Arrays.toString(exchange.getExchangeSymbols().toArray())); + + generic(marketDataService); + raw((ZaifMarketDataServiceRaw) marketDataService); + + } + + private static void generic(MarketDataService marketDataService) throws IOException { + + System.out.println("----------GENERIC---------"); + + OrderBook orderBook = marketDataService.getOrderBook(PAIR); + System.out.println(orderBook); + } + + private static void raw(ZaifMarketDataServiceRaw marketDataService) throws IOException { + + System.out.println("------------RAW-----------"); + + List markets = marketDataService.getAllMarkets(); + System.out.println(markets); + + ZaifFullBook orderBookResponse = marketDataService.getZaifFullBook(PAIR); + System.out.println(orderBookResponse); + } +} diff --git a/xchange-zaif/api-specification.txt b/xchange-zaif/api-specification.txt new file mode 100644 index 000000000..2918b5034 --- /dev/null +++ b/xchange-zaif/api-specification.txt @@ -0,0 +1,6 @@ +Bibox Exchange API specification +================================ + +Documentation +------------- +https://corp.zaif.jp/api-docs/ \ No newline at end of file diff --git a/xchange-zaif/pom.xml b/xchange-zaif/pom.xml new file mode 100644 index 000000000..a13b205c6 --- /dev/null +++ b/xchange-zaif/pom.xml @@ -0,0 +1,34 @@ + + + 4.0.0 + + + org.knowm.xchange + xchange-parent + 4.3.4-SNAPSHOT + + + xchange-zaif + + XChange Zaif + XChange implementation for the Zaif Exchange + + http://knowm.org/open-source/xchange/ + 2012 + + + Knowm Inc. + http://knowm.org/open-source/xchange/ + + + + + + + org.knowm.xchange + xchange-core + 4.3.4-SNAPSHOT + + + diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/Zaif.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/Zaif.java new file mode 100644 index 000000000..262fa149d --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/Zaif.java @@ -0,0 +1,29 @@ +package org.knowm.xchange.zaif; + +import java.io.IOException; +import java.util.List; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.knowm.xchange.currency.Currency; +import org.knowm.xchange.zaif.dto.ZaifException; +import org.knowm.xchange.zaif.dto.marketdata.ZaifFullBook; +import org.knowm.xchange.zaif.dto.marketdata.ZaifMarket; + +@Path("/") +@Produces(MediaType.APPLICATION_JSON) +public interface Zaif { + + @GET + @Path("api/1/depth/{baseCurrency}_{targetCurrency}") + ZaifFullBook getDepth(@PathParam("baseCurrency") String baseCurrency, @PathParam("targetCurrency") String targetCurrency) throws ZaifException, + IOException; + + @GET + @Path("api/1/currency_pairs/all") + List getCurrencyPairs(); +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifAdapters.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifAdapters.java new file mode 100644 index 000000000..356c6df58 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifAdapters.java @@ -0,0 +1,56 @@ +package org.knowm.xchange.zaif; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.Order; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.dto.meta.CurrencyPairMetaData; +import org.knowm.xchange.dto.meta.ExchangeMetaData; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.zaif.dto.marketdata.ZaifFullBook; +import org.knowm.xchange.zaif.dto.marketdata.ZaifFullBookTier; +import org.knowm.xchange.zaif.dto.marketdata.ZaifMarket; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ZaifAdapters { + + private static Logger logger = LoggerFactory.getLogger(ZaifAdapters.class); + + public ZaifAdapters() { + + } + + public static OrderBook adaptOrderBook(ZaifFullBook book, CurrencyPair currencyPair) { + + List asks = toLimitOrderList(book.getAsks(), Order.OrderType.ASK, currencyPair); + List bids = toLimitOrderList(book.getBids(), Order.OrderType.BID, currencyPair); + + return new OrderBook(null, asks, bids); + } + + private static List toLimitOrderList(ZaifFullBookTier[] levels, Order.OrderType orderType, CurrencyPair currencyPair) { + + List allLevels = new ArrayList<>(); + + if (levels != null) { + for (ZaifFullBookTier tier : levels) { + allLevels.add(new LimitOrder(orderType, tier.getVolume(), currencyPair, "", null, tier.getPrice())); + } + } + + return allLevels; + } + + public static ExchangeMetaData adaptMetadata(List markets) { + Map pairMeta = new HashMap<>(); + for (ZaifMarket zaifMarket : markets) { + pairMeta.put(zaifMarket.getName(), new CurrencyPairMetaData(null, null, null, null)); + } + return new ExchangeMetaData(pairMeta, null, null, null, null); + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifExchange.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifExchange.java new file mode 100644 index 000000000..9fb85a477 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/ZaifExchange.java @@ -0,0 +1,46 @@ +package org.knowm.xchange.zaif; + +import java.io.IOException; + +import org.knowm.xchange.BaseExchange; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.exceptions.ExchangeException; +import org.knowm.xchange.utils.nonce.CurrentTimeNonceFactory; +import org.knowm.xchange.zaif.service.ZaifMarketDataService; + +import si.mazi.rescu.SynchronizedValueFactory; + +public class ZaifExchange extends BaseExchange implements Exchange { + + private SynchronizedValueFactory nonceFactory = new CurrentTimeNonceFactory(); + + @Override + protected void initServices() { + this.marketDataService = new ZaifMarketDataService(this); + //this.accountService = new BiboxAccountService(this); + //this.tradeService = new BiboxTradeService(this); + } + + @Override + public SynchronizedValueFactory getNonceFactory() { + return this.nonceFactory; + } + + @Override + public ExchangeSpecification getDefaultExchangeSpecification() { + + ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName()); + exchangeSpecification.setSslUri("https://api.zaif.jp/"); + exchangeSpecification.setHost("api.zaif.jp"); + exchangeSpecification.setPort(80); + exchangeSpecification.setExchangeName("Zaif"); + + return exchangeSpecification; + } + + @Override + public void remoteInit() throws IOException, ExchangeException { + exchangeMetaData = ((ZaifMarketDataService) marketDataService).getMetadata(); + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/ZaifException.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/ZaifException.java new file mode 100644 index 000000000..ed64e2ff1 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/ZaifException.java @@ -0,0 +1,11 @@ +package org.knowm.xchange.zaif.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import si.mazi.rescu.HttpStatusExceptionSupport; + +public class ZaifException extends HttpStatusExceptionSupport { + public ZaifException(@JsonProperty("error") String reason) { + super(reason); + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBook.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBook.java new file mode 100644 index 000000000..e643f8573 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBook.java @@ -0,0 +1,45 @@ +package org.knowm.xchange.zaif.dto.marketdata; + +import java.util.Arrays; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ZaifFullBook { + + private final ZaifFullBookTier[] bids; + private final ZaifFullBookTier[] asks; + + public ZaifFullBook(@JsonProperty("bids") Object[][] bids, @JsonProperty("asks") Object[][] asks) { + if (bids != null && bids.length > 0) { + this.bids = new ZaifFullBookTier[bids.length]; + + for (int i = 0; i < bids.length; i++) { + this.bids[i] = new ZaifFullBookTier(bids[i]); + } + } else { + this.bids = null; + } + + if (asks != null && asks.length > 0) { + this.asks = new ZaifFullBookTier[asks.length]; + for (int i = 0; i < asks.length; i++) { + this.asks[i] = new ZaifFullBookTier(asks[i]); + } + } else { + this.asks = null; + } + } + + public ZaifFullBookTier[] getBids() { + return this.bids; + } + + public ZaifFullBookTier[] getAsks() { + return this.asks; + } + + @Override + public String toString() { + return "ZaifFullBook [bids: " + Arrays.toString(this.getBids()) + ", asks: " + Arrays.toString(this.getAsks()) + "]"; + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBookTier.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBookTier.java new file mode 100644 index 000000000..9f9054959 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifFullBookTier.java @@ -0,0 +1,32 @@ +package org.knowm.xchange.zaif.dto.marketdata; + +import java.math.BigDecimal; + +import org.knowm.xchange.zaif.dto.ZaifException; + +public class ZaifFullBookTier { + private final BigDecimal price; + private final BigDecimal volume; + + public ZaifFullBookTier(Object[] tier) { + + if (tier != null && tier.length == 2) { + this.price = new BigDecimal(tier[0].toString()); + this.volume = new BigDecimal(tier[1].toString()); + } else + throw new ZaifException("Invalid Tier"); + } + + public BigDecimal getPrice() { + return this.price; + } + + public BigDecimal getVolume() { + return this.volume; + } + + @Override + public String toString() { + return "ZaifFullBookTier [price=" + price + ", volume=" + volume + "]"; + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifMarket.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifMarket.java new file mode 100644 index 000000000..6ce20a8c7 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/dto/marketdata/ZaifMarket.java @@ -0,0 +1,26 @@ +package org.knowm.xchange.zaif.dto.marketdata; + +import org.knowm.xchange.currency.CurrencyPair; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ZaifMarket { + + @JsonProperty("name") + private CurrencyPair name; + + @JsonProperty("name") + public CurrencyPair getName() { + return name; + } + + @JsonProperty("name") + public void setName(CurrencyPair name) { + this.name = name; + } + + @Override + public String toString() { + return "ZaifMarket [name = " + this.getName() + "]"; + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifBaseService.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifBaseService.java new file mode 100644 index 000000000..fe034eb05 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifBaseService.java @@ -0,0 +1,23 @@ +package org.knowm.xchange.zaif.service; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.service.BaseExchangeService; +import org.knowm.xchange.service.BaseService; +import org.knowm.xchange.zaif.Zaif; + +import si.mazi.rescu.RestProxyFactory; + +public class ZaifBaseService extends BaseExchangeService implements BaseService { + + protected final Zaif zaif; + + /** + * Constructor + * + * @param exchange + */ + protected ZaifBaseService(Exchange exchange) { + super(exchange); this.zaif = RestProxyFactory.createProxy(Zaif.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); + + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataService.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataService.java new file mode 100644 index 000000000..686493296 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataService.java @@ -0,0 +1,42 @@ +package org.knowm.xchange.zaif.service; + +import java.io.IOException; +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.dto.marketdata.Trades; +import org.knowm.xchange.dto.meta.ExchangeMetaData; +import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; +import org.knowm.xchange.service.marketdata.MarketDataService; +import org.knowm.xchange.zaif.ZaifAdapters; +import org.knowm.xchange.zaif.dto.marketdata.ZaifMarket; + +public class ZaifMarketDataService extends ZaifMarketDataServiceRaw implements MarketDataService { + + public ZaifMarketDataService(Exchange exchange) { + super(exchange); + } + + @Override + public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException { + throw new NotYetImplementedForExchangeException(); + } + + @Override + public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { + return ZaifAdapters.adaptOrderBook(this.getZaifFullBook(currencyPair), currencyPair); + } + + @Override + public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { + throw new NotYetImplementedForExchangeException(); + } + + public ExchangeMetaData getMetadata() throws IOException { + List markets = this.getAllMarkets(); + return ZaifAdapters.adaptMetadata(markets); + } +} diff --git a/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataServiceRaw.java b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataServiceRaw.java new file mode 100644 index 000000000..87e3cbef0 --- /dev/null +++ b/xchange-zaif/src/main/java/org/knowm/xchange/zaif/service/ZaifMarketDataServiceRaw.java @@ -0,0 +1,48 @@ +package org.knowm.xchange.zaif.service; + +import java.io.IOException; +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.exceptions.ExchangeException; +import org.knowm.xchange.zaif.dto.ZaifException; +import org.knowm.xchange.zaif.dto.marketdata.ZaifFullBook; +import org.knowm.xchange.zaif.dto.marketdata.ZaifMarket; + +public class ZaifMarketDataServiceRaw extends ZaifBaseService { + + protected ZaifMarketDataServiceRaw(Exchange exchange) { + super(exchange); + } + + public ZaifFullBook getZaifFullBook(CurrencyPair currencyPair) throws IOException { + try { + return this.zaif.getDepth(currencyPair.base.toString().toLowerCase(), currencyPair.counter.toString().toLowerCase()); + } catch (ZaifException e) { + throw new ExchangeException(e.getMessage()); + } + } + + public List getAllMarkets() { + try { + return this.zaif.getCurrencyPairs(); + } catch (ZaifException e) { + throw new ExchangeException(e.getMessage()); + } + } + + public boolean checkProductExists(CurrencyPair currencyPair) { + + boolean currencyPairSupported = false; + for (CurrencyPair cp : exchange.getExchangeSymbols()) { + if (cp.base.getCurrencyCode().equalsIgnoreCase(currencyPair.base.getCurrencyCode()) + && cp.counter.getCurrencyCode().equalsIgnoreCase(currencyPair.counter.getCurrencyCode())) { + currencyPairSupported = true; + break; + } + } + + return currencyPairSupported; + } +} diff --git a/xchange-zaif/src/main/resources/zaif.json b/xchange-zaif/src/main/resources/zaif.json new file mode 100644 index 000000000..3eda0a824 --- /dev/null +++ b/xchange-zaif/src/main/resources/zaif.json @@ -0,0 +1,14 @@ +{ + "currency_pairs": { + "ETH/JPY": { }, + "BCH/JPY": { }, + "ETH/BTC": { }, + "XCP/BTC": { }, + "XEM/JPY": { }, + "XCP/JPY": { }, + "XEM/BTC": { }, + "BCH/BTC": { }, + "BTC/JPY": { } + }, + "share_rate_limits": false +} \ No newline at end of file diff --git a/xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifAdaptersTest.java b/xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifAdaptersTest.java new file mode 100644 index 000000000..4304ee97f --- /dev/null +++ b/xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifAdaptersTest.java @@ -0,0 +1,39 @@ +package org.knowm.xchange.zaif; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import java.io.InputStream; + +import org.junit.Test; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.zaif.dto.marketdata.ZaifFullBook; + +import com.fasterxml.jackson.databind.ObjectMapper; + +public class ZaifAdaptersTest { + + @Test + public void testFullBookAdapter() throws IOException { + + // Read in the JSON from the example resources + InputStream is = ZaifAdaptersTest.class.getResourceAsStream("/marketdata/example-fullbook-data.json"); + + // Use Jackson to parse it + ObjectMapper mapper = new ObjectMapper(); + ZaifFullBook zaifFullBook = mapper.readValue(is, ZaifFullBook.class); + + OrderBook orderBook = ZaifAdapters.adaptOrderBook(zaifFullBook, CurrencyPair.BTC_JPY); + + assertThat(orderBook.getBids().get(0).getCurrencyPair()).isEqualTo(CurrencyPair.BTC_JPY); + + assertThat(orderBook.getBids().get(0).getLimitPrice()).isEqualTo("934920"); + assertThat(orderBook.getBids().get(0).getOriginalAmount()).isEqualTo("0.03"); + + assertThat(orderBook.getAsks().get(0).getLimitPrice()).isEqualTo("935355"); + assertThat(orderBook.getAsks().get(0).getOriginalAmount()).isEqualTo("0.02"); + + } + +} \ No newline at end of file diff --git a/xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifExchangeTest.java b/xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifExchangeTest.java new file mode 100644 index 000000000..eca2a9932 --- /dev/null +++ b/xchange-zaif/src/test/java/org/knowm/xchange/zaif/ZaifExchangeTest.java @@ -0,0 +1,25 @@ +package org.knowm.xchange.zaif; + +import org.junit.Assert; +import org.junit.Test; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.zaif.service.ZaifMarketDataServiceRaw; + +public class ZaifExchangeTest { + + @Test + public void shouldBeInstantiatedWithoutAnExceptionWhenUsingDefaultSpecification() { + ExchangeFactory.INSTANCE.createExchange(ZaifExchange.class.getCanonicalName()); + } + + @Test + public void shouldSupportBitCrystalOnlyByRemoteInit() { + + Exchange ex = ExchangeFactory.INSTANCE.createExchange(ZaifExchange.class.getCanonicalName()); + //ex.remoteInit(); + + Assert.assertTrue(((ZaifMarketDataServiceRaw) ex.getMarketDataService()).checkProductExists(new CurrencyPair("BITCRYSTALS/JPY"))); + } +} \ No newline at end of file diff --git a/xchange-zaif/src/test/java/org/knowm/xchange/zaif/marketdata/MarketDataFetchIntegration.java b/xchange-zaif/src/test/java/org/knowm/xchange/zaif/marketdata/MarketDataFetchIntegration.java new file mode 100644 index 000000000..b62a42dcb --- /dev/null +++ b/xchange-zaif/src/test/java/org/knowm/xchange/zaif/marketdata/MarketDataFetchIntegration.java @@ -0,0 +1,25 @@ +package org.knowm.xchange.zaif.marketdata; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.service.marketdata.MarketDataService; +import org.knowm.xchange.zaif.ZaifExchange; + +public class MarketDataFetchIntegration { + + @Test + public void depthFetchTest() throws Exception { + + Exchange exchange = ExchangeFactory.INSTANCE.createExchange(ZaifExchange.class.getName()); + MarketDataService marketDataService = exchange.getMarketDataService(); + + OrderBook orderBook = marketDataService.getOrderBook(CurrencyPair.BTC_JPY); + System.out.println(orderBook.toString()); + assertThat(orderBook).isNotNull(); + } +} diff --git a/xchange-zaif/src/test/resources/marketdata/example-fullbook-data.json b/xchange-zaif/src/test/resources/marketdata/example-fullbook-data.json new file mode 100644 index 000000000..982741963 --- /dev/null +++ b/xchange-zaif/src/test/resources/marketdata/example-fullbook-data.json @@ -0,0 +1,1206 @@ +{ + "asks": [ + [ + 935355, + 0.02 + ], + [ + 935410, + 0.05 + ], + [ + 935500, + 0.0071 + ], + [ + 935525, + 0.0511 + ], + [ + 935610, + 0.01 + ], + [ + 935615, + 0.0654 + ], + [ + 935690, + 0.04 + ], + [ + 935770, + 0.2 + ], + [ + 935975, + 0.1142 + ], + [ + 935985, + 0.2442 + ], + [ + 936000, + 0.4019 + ], + [ + 936050, + 0.0003 + ], + [ + 936185, + 0.14 + ], + [ + 936200, + 0.005 + ], + [ + 936420, + 0.0561 + ], + [ + 936475, + 0.0561 + ], + [ + 936495, + 0.0561 + ], + [ + 936500, + 0.0561 + ], + [ + 936505, + 0.01 + ], + [ + 936740, + 0.005 + ], + [ + 936745, + 0.001 + ], + [ + 936785, + 0.0288 + ], + [ + 936800, + 0.14 + ], + [ + 936960, + 0.0006 + ], + [ + 937000, + 3.706 + ], + [ + 937210, + 0.0073 + ], + [ + 937300, + 0.14 + ], + [ + 937335, + 0.0002 + ], + [ + 937405, + 0.14 + ], + [ + 937500, + 0.1015 + ], + [ + 937535, + 0.14 + ], + [ + 937640, + 0.0006 + ], + [ + 937855, + 0.0007 + ], + [ + 937875, + 0.0013 + ], + [ + 937980, + 0.5 + ], + [ + 937990, + 0.0037 + ], + [ + 937995, + 0.21 + ], + [ + 938000, + 1.2428 + ], + [ + 938055, + 0.0058 + ], + [ + 938060, + 0.0003 + ], + [ + 938140, + 0.0001 + ], + [ + 938170, + 0.14 + ], + [ + 938305, + 0.0025 + ], + [ + 938500, + 0.75 + ], + [ + 938735, + 0.0055 + ], + [ + 938800, + 0.017 + ], + [ + 938900, + 0.0112 + ], + [ + 938985, + 0.0374 + ], + [ + 938990, + 0.5 + ], + [ + 939000, + 0.7079 + ], + [ + 939050, + 0.001 + ], + [ + 939200, + 0.0019 + ], + [ + 939275, + 0.0376 + ], + [ + 939295, + 0.6621 + ], + [ + 939300, + 1.5 + ], + [ + 939315, + 0.001 + ], + [ + 939370, + 0.002 + ], + [ + 939760, + 0.0006 + ], + [ + 939910, + 0.1422 + ], + [ + 939955, + 0.0334 + ], + [ + 939970, + 0.0051 + ], + [ + 939985, + 0.0735 + ], + [ + 939990, + 0.6737 + ], + [ + 939995, + 1.752 + ], + [ + 940000, + 36.3796 + ], + [ + 940010, + 0.1146 + ], + [ + 940045, + 0.02 + ], + [ + 940295, + 0.14 + ], + [ + 940310, + 0.0457 + ], + [ + 940320, + 0.1759 + ], + [ + 940360, + 0.0011 + ], + [ + 940440, + 0.002 + ], + [ + 940500, + 0.0031 + ], + [ + 940755, + 0.14 + ], + [ + 941000, + 21.241 + ], + [ + 941110, + 0.0006 + ], + [ + 941140, + 0.001 + ], + [ + 941235, + 0.0069 + ], + [ + 941280, + 0.1255 + ], + [ + 941395, + 0.0313 + ], + [ + 941500, + 0.03 + ], + [ + 941655, + 0.1835 + ], + [ + 941890, + 0.0006 + ], + [ + 941990, + 0.0037 + ], + [ + 942000, + 1.9395 + ], + [ + 942005, + 0.02 + ], + [ + 942100, + 0.9246 + ], + [ + 942165, + 0.0074 + ], + [ + 942200, + 0.0004 + ], + [ + 942500, + 0.6057 + ], + [ + 942520, + 0.0101 + ], + [ + 942540, + 2.112 + ], + [ + 942580, + 0.026 + ], + [ + 942800, + 0.5 + ], + [ + 942950, + 0.1718 + ], + [ + 943000, + 1.9071 + ], + [ + 943100, + 0.0076 + ], + [ + 943500, + 0.4202 + ], + [ + 943615, + 0.0003 + ], + [ + 943700, + 0.0649 + ], + [ + 943995, + 4 + ], + [ + 944000, + 0.5936 + ], + [ + 944450, + 0.0902 + ], + [ + 944460, + 0.2 + ], + [ + 944680, + 0.7 + ], + [ + 944705, + 2 + ], + [ + 944900, + 0.03 + ], + [ + 944995, + 0.53 + ], + [ + 945000, + 22.2303 + ], + [ + 945500, + 0.0003 + ], + [ + 945990, + 0.0037 + ], + [ + 946000, + 0.114 + ], + [ + 946080, + 6.2 + ], + [ + 946100, + 0.0106 + ], + [ + 946160, + 0.0006 + ], + [ + 946300, + 0.6 + ], + [ + 946500, + 0.01 + ], + [ + 946900, + 0.1 + ], + [ + 947000, + 3.2457 + ], + [ + 947325, + 2.033 + ], + [ + 947395, + 0.0003 + ], + [ + 947400, + 0.1 + ], + [ + 947500, + 0.0067 + ], + [ + 947980, + 0.03 + ], + [ + 947990, + 0.0383 + ], + [ + 948000, + 11.847 + ], + [ + 948250, + 0.2239 + ], + [ + 948310, + 0.0006 + ], + [ + 948330, + 21.1209 + ], + [ + 948500, + 0.0127 + ], + [ + 948555, + 0.13 + ], + [ + 948600, + 0.04 + ], + [ + 948650, + 0.0607 + ], + [ + 948800, + 0.01 + ], + [ + 948805, + 0.0011 + ], + [ + 948900, + 3.5 + ], + [ + 948910, + 0.1 + ], + [ + 949000, + 0.2572 + ], + [ + 949100, + 0.9201 + ], + [ + 949280, + 1 + ], + [ + 949285, + 0.0003 + ], + [ + 949800, + 0.0171 + ], + [ + 949895, + 0.19 + ], + [ + 949900, + 0.0189 + ], + [ + 949980, + 0.8185 + ], + [ + 949990, + 0.5552 + ], + [ + 949995, + 0.901 + ], + [ + 950000, + 30.25 + ], + [ + 950100, + 0.0396 + ], + [ + 950470, + 0.0006 + ] + ], + "bids": [ + [ + 934920, + 0.03 + ], + [ + 934480, + 0.0691 + ], + [ + 934470, + 0.3237 + ], + [ + 934450, + 0.0003 + ], + [ + 934400, + 0.14 + ], + [ + 934395, + 0.02 + ], + [ + 934310, + 0.14 + ], + [ + 934290, + 0.0221 + ], + [ + 934280, + 0.0221 + ], + [ + 934270, + 0.155 + ], + [ + 934200, + 0.2525 + ], + [ + 934150, + 0.1975 + ], + [ + 934140, + 0.01 + ], + [ + 934135, + 0.0524 + ], + [ + 934030, + 0.0036 + ], + [ + 934020, + 0.01 + ], + [ + 934015, + 0.0109 + ], + [ + 934000, + 0.0071 + ], + [ + 933580, + 0.45 + ], + [ + 933545, + 0.0055 + ], + [ + 933535, + 0.0451 + ], + [ + 933500, + 0.6406 + ], + [ + 933450, + 0.2128 + ], + [ + 933385, + 0.0782 + ], + [ + 933200, + 0.01 + ], + [ + 933100, + 0.38 + ], + [ + 933000, + 0.4808 + ], + [ + 932850, + 0.28 + ], + [ + 932705, + 0.14 + ], + [ + 932365, + 0.02 + ], + [ + 932325, + 0.0003 + ], + [ + 932300, + 0.25 + ], + [ + 932275, + 0.11 + ], + [ + 932045, + 0.0075 + ], + [ + 932010, + 0.0037 + ], + [ + 932000, + 0.1583 + ], + [ + 931820, + 0.07 + ], + [ + 931800, + 0.0006 + ], + [ + 931645, + 0.1365 + ], + [ + 931625, + 0.14 + ], + [ + 931500, + 0.0326 + ], + [ + 931280, + 0.001 + ], + [ + 931035, + 0.3 + ], + [ + 931030, + 0.21 + ], + [ + 931000, + 0.0001 + ], + [ + 930995, + 1.02 + ], + [ + 930980, + 0.02 + ], + [ + 930975, + 0.01 + ], + [ + 930700, + 0.2035 + ], + [ + 930595, + 0.013 + ], + [ + 930540, + 0.0099 + ], + [ + 930260, + 0.14 + ], + [ + 930230, + 0.04 + ], + [ + 930040, + 0.7236 + ], + [ + 930030, + 0.04 + ], + [ + 930010, + 0.0037 + ], + [ + 930005, + 0.76 + ], + [ + 930000, + 1.5645 + ], + [ + 929785, + 0.0058 + ], + [ + 929745, + 0.11 + ], + [ + 929710, + 0.0006 + ], + [ + 929630, + 0.04 + ], + [ + 929280, + 0.0837 + ], + [ + 929250, + 2.1121 + ], + [ + 929000, + 0.002 + ], + [ + 928945, + 0.001 + ], + [ + 928830, + 0.04 + ], + [ + 928785, + 0.053 + ], + [ + 928230, + 0.03 + ], + [ + 928200, + 0.001 + ], + [ + 928100, + 1.3559 + ], + [ + 928010, + 0.5037 + ], + [ + 928005, + 1.5969 + ], + [ + 928000, + 1.054 + ], + [ + 927800, + 0.52 + ], + [ + 927735, + 0.015 + ], + [ + 927630, + 0.0006 + ], + [ + 927230, + 0.04 + ], + [ + 927200, + 0.25 + ], + [ + 927000, + 0.334 + ], + [ + 926900, + 0.002 + ], + [ + 926370, + 0.0651 + ], + [ + 926350, + 0.0219 + ], + [ + 926010, + 0.0037 + ], + [ + 926000, + 0.11 + ], + [ + 925955, + 0.0001 + ], + [ + 925925, + 2 + ], + [ + 925560, + 0.0006 + ], + [ + 925230, + 0.03 + ], + [ + 925165, + 0.004 + ], + [ + 925030, + 0.197 + ], + [ + 925005, + 0.3906 + ], + [ + 925000, + 7.1835 + ], + [ + 924980, + 0.03 + ], + [ + 924600, + 21.1209 + ], + [ + 924500, + 0.0111 + ], + [ + 924310, + 0.04 + ], + [ + 924200, + 0.01 + ], + [ + 924100, + 0.0092 + ], + [ + 924030, + 0.04 + ], + [ + 924005, + 4 + ], + [ + 924000, + 0.8635 + ], + [ + 923805, + 0.0001 + ], + [ + 923500, + 0.3868 + ], + [ + 923305, + 0.0909 + ], + [ + 923210, + 0.02 + ], + [ + 923005, + 0.9488 + ], + [ + 923000, + 0.7156 + ], + [ + 922985, + 0.006 + ], + [ + 922780, + 0.04 + ], + [ + 922680, + 0.0034 + ], + [ + 922660, + 0.14 + ], + [ + 922650, + 0.01 + ], + [ + 922640, + 0.01 + ], + [ + 922625, + 0.07 + ], + [ + 922500, + 0.3558 + ], + [ + 922295, + 0.0804 + ], + [ + 922180, + 0.5 + ], + [ + 922150, + 0.4 + ], + [ + 922000, + 4.5253 + ], + [ + 921980, + 0.03 + ], + [ + 921740, + 0.2626 + ], + [ + 921730, + 0.0255 + ], + [ + 921650, + 0.0025 + ], + [ + 921100, + 0.5 + ], + [ + 921010, + 0.05 + ], + [ + 921000, + 0.8648 + ], + [ + 920850, + 0.202 + ], + [ + 920545, + 0.397 + ], + [ + 920505, + 5 + ], + [ + 920500, + 1.53 + ], + [ + 920235, + 0.0227 + ], + [ + 920200, + 0.3479 + ], + [ + 920180, + 0.5 + ], + [ + 920095, + 0.0012 + ], + [ + 920055, + 0.0337 + ], + [ + 920050, + 0.34 + ], + [ + 920010, + 0.6805 + ], + [ + 920005, + 3.23 + ], + [ + 920000, + 25.7024 + ], + [ + 919975, + 0.5 + ], + [ + 919895, + 0.1765 + ], + [ + 919670, + 0.03 + ], + [ + 919605, + 0.0049 + ], + [ + 919500, + 5 + ], + [ + 919410, + 0.0006 + ], + [ + 919200, + 0.02 + ], + [ + 919080, + 0.0171 + ], + [ + 919000, + 5.2119 + ], + [ + 918890, + 0.4458 + ] + ] +} \ No newline at end of file From d04ac49619f171b63e4a5bb4cfb9acbabfd3a21d Mon Sep 17 00:00:00 2001 From: Theofanis Pantelides Date: Tue, 13 Feb 2018 15:40:50 -0500 Subject: [PATCH 074/117] [Zaif] Fixed Examples - Add Dependancy --- xchange-examples/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xchange-examples/pom.xml b/xchange-examples/pom.xml index 4deccaece..b5379d481 100755 --- a/xchange-examples/pom.xml +++ b/xchange-examples/pom.xml @@ -388,6 +388,11 @@ xchange-bitz ${project.version} + + ${project.groupId} + xchange-zaif + ${project.version} + From c2be3b708da05fc0b8ceba07d2749a2c3f99826d Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Wed, 14 Feb 2018 02:20:27 +0530 Subject: [PATCH 075/117] Addressing CR comments and reformatting code to align with Code-Style --- .../dto/marketdata/CexIOCurrencyLimits.java | 35 +++++++++---------- .../service/CexIOMarketDataServiceRaw.java | 5 +-- .../marketdata/RemoteInitIntegration.java | 31 ++++++++++++++++ .../service/marketdata/RemoteInitTest.java | 26 +++----------- 4 files changed, 56 insertions(+), 41 deletions(-) create mode 100644 xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitIntegration.java diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java index 3c0965d83..193e5e135 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java @@ -1,11 +1,12 @@ package org.knowm.xchange.cexio.dto.marketdata; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.math.BigDecimal; +import java.util.List; + import org.knowm.xchange.cexio.dto.CexIOApiResponse; import org.knowm.xchange.currency.Currency; -import java.math.BigDecimal; -import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; /** * @author ujjwal on 13/02/18. @@ -13,7 +14,7 @@ public class CexIOCurrencyLimits extends CexIOApiResponse { public CexIOCurrencyLimits(@JsonProperty("e") final String e, @JsonProperty("data") final Data data, - @JsonProperty("ok") final String ok, @JsonProperty("error") final String error) { + @JsonProperty("ok") final String ok, @JsonProperty("error") final String error) { super(e, data, ok, error); } @@ -43,10 +44,10 @@ public static class Pair { private final BigDecimal maxPrice; public Pair(@JsonProperty("symbol1") Currency symbol1, @JsonProperty("symbol2") Currency symbol2, - @JsonProperty("minLotSize") BigDecimal minLotSize, - @JsonProperty("minLotSizeS2") BigDecimal minLotSizeS2, - @JsonProperty("maxLotSize") BigDecimal maxLotSize, - @JsonProperty("minPrice") BigDecimal minPrice, @JsonProperty("maxPrice") BigDecimal maxPrice) { + @JsonProperty("minLotSize") BigDecimal minLotSize, + @JsonProperty("minLotSizeS2") BigDecimal minLotSizeS2, + @JsonProperty("maxLotSize") BigDecimal maxLotSize, + @JsonProperty("minPrice") BigDecimal minPrice, @JsonProperty("maxPrice") BigDecimal maxPrice) { this.symbol1 = symbol1; this.symbol2 = symbol2; this.minLotSize = minLotSize; @@ -86,16 +87,14 @@ public BigDecimal getMaxPrice() { @Override public String toString() { - final StringBuilder sb = new StringBuilder("Pair{"); - sb.append("symbol1=").append(symbol1); - sb.append(", symbol2=").append(symbol2); - sb.append(", minLotSize=").append(minLotSize); - sb.append(", minLotSizeS2=").append(minLotSizeS2); - sb.append(", maxLotSize=").append(maxLotSize); - sb.append(", minPrice=").append(minPrice); - sb.append(", maxPrice=").append(maxPrice); - sb.append('}'); - return sb.toString(); + return "Pair{" + "symbol1=" + symbol1 + + ", symbol2=" + symbol2 + + ", minLotSize=" + minLotSize + + ", minLotSizeS2=" + minLotSizeS2 + + ", maxLotSize=" + maxLotSize + + ", minPrice=" + minPrice + + ", maxPrice=" + maxPrice + + '}'; } } } diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java index 8fdf89c64..870938950 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOMarketDataServiceRaw.java @@ -1,5 +1,7 @@ package org.knowm.xchange.cexio.service; +import java.io.IOException; + import org.knowm.xchange.Exchange; import org.knowm.xchange.cexio.CexIO; import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; @@ -7,9 +9,8 @@ import org.knowm.xchange.cexio.dto.marketdata.CexIOTicker; import org.knowm.xchange.cexio.dto.marketdata.CexIOTrade; import org.knowm.xchange.currency.CurrencyPair; -import si.mazi.rescu.RestProxyFactory; -import java.io.IOException; +import si.mazi.rescu.RestProxyFactory; /** * @author timmolter diff --git a/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitIntegration.java b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitIntegration.java new file mode 100644 index 000000000..6f3b5010e --- /dev/null +++ b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitIntegration.java @@ -0,0 +1,31 @@ +package org.knowm.xchange.cexio.service.marketdata; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; + +import org.junit.Test; +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.cexio.CexIOExchange; +import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; +import org.knowm.xchange.cexio.service.CexIOMarketDataService; + +/** + * @author ujjwal on 14/02/18. + */ +public class RemoteInitIntegration { + @Test + public void integrationTest() throws IOException { + final Exchange exchange = ExchangeFactory.INSTANCE.createExchange(CexIOExchange.class); + + assertThat(exchange).isNotNull(); + assertThat(exchange.getExchangeMetaData().getCurrencyPairs()).isNotEmpty(); + + final CexIOCurrencyLimits currencyLimits = ((CexIOMarketDataService) exchange.getMarketDataService()).getCurrencyLimits(); + assertThat(currencyLimits.getE()).isEqualToIgnoringCase("currency_limits"); + assertThat(currencyLimits.getError()).isNullOrEmpty(); + assertThat(currencyLimits.getOk()).isEqualToIgnoringCase("ok"); + + } +} diff --git a/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java index 838cf26c5..3f43cfe4e 100644 --- a/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java +++ b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java @@ -1,17 +1,14 @@ package org.knowm.xchange.cexio.service.marketdata; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.junit.Test; -import org.knowm.xchange.Exchange; -import org.knowm.xchange.ExchangeFactory; -import org.knowm.xchange.cexio.CexIOExchange; -import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; -import org.knowm.xchange.cexio.service.CexIOMarketDataService; +import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.io.InputStream; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; +import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; + +import com.fasterxml.jackson.databind.ObjectMapper; /** * @author ujjwal on 13/02/18. @@ -33,17 +30,4 @@ public void unitJsonMapperTest() throws IOException { } - @Test - public void integrationTest() throws IOException { - final Exchange exchange = ExchangeFactory.INSTANCE.createExchange(CexIOExchange.class); - - assertThat(exchange).isNotNull(); - assertThat(exchange.getExchangeMetaData().getCurrencyPairs()).isNotEmpty(); - - final CexIOCurrencyLimits currencyLimits = ((CexIOMarketDataService) exchange.getMarketDataService()).getCurrencyLimits(); - assertThat(currencyLimits.getE()).isEqualToIgnoringCase("currency_limits"); - assertThat(currencyLimits.getError()).isNullOrEmpty(); - assertThat(currencyLimits.getOk()).isEqualToIgnoringCase("ok"); - - } } From 82c4f593b352ea961c25dcd745f4c5bcc84337c5 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Wed, 14 Feb 2018 03:14:53 +0530 Subject: [PATCH 076/117] [cexio] Implementation of get_myfee, Issue #2289 Also some renaming / moving around of test classes. --- .../xchange/cexio/CexIOAuthenticated.java | 5 ++ .../xchange/cexio/dto/CexIOApiResponse.java | 8 +-- .../cexio/dto/account/CexIOFeeInfo.java | 66 +++++++++++++++++++ .../dto/marketdata/CexIOCurrencyLimits.java | 6 +- .../cexio/service/CexIOAccountServiceRaw.java | 11 +++- .../cexio/dto/account/CexIOFeeInfoTest.java | 40 +++++++++++ .../marketdata/CexIOCurrencyLimitsTest.java} | 7 +- .../resources/account/sample_get_myfee.json | 30 +++++++++ 8 files changed, 158 insertions(+), 15 deletions(-) create mode 100644 xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfo.java create mode 100644 xchange-cexio/src/test/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfoTest.java rename xchange-cexio/src/test/java/org/knowm/xchange/cexio/{service/marketdata/RemoteInitTest.java => dto/marketdata/CexIOCurrencyLimitsTest.java} (81%) create mode 100644 xchange-cexio/src/test/resources/account/sample_get_myfee.json diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java index 65151a7e7..ceb891e61 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/CexIOAuthenticated.java @@ -20,6 +20,7 @@ import org.knowm.xchange.cexio.dto.PlaceOrderRequest; import org.knowm.xchange.cexio.dto.account.CexIOBalanceInfo; import org.knowm.xchange.cexio.dto.account.CexIOCryptoAddress; +import org.knowm.xchange.cexio.dto.account.CexIOFeeInfo; import org.knowm.xchange.cexio.dto.account.GHashIOHashrate; import org.knowm.xchange.cexio.dto.account.GHashIOWorkers; import org.knowm.xchange.cexio.dto.trade.CexIOArchivedOrder; @@ -35,6 +36,10 @@ @Consumes(MediaType.APPLICATION_JSON) public interface CexIOAuthenticated extends CexIO { + @POST + @Path("get_myfee") + CexIOFeeInfo getMyFee(@HeaderParam("signature") ParamsDigest signer, CexIORequest cexIORequest) throws IOException; + @POST @Path("balance/") CexIOBalanceInfo getBalance(@HeaderParam("signature") ParamsDigest signer, CexIORequest cexIORequest) throws IOException; diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java index cb3aaf7da..8959b05c2 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/CexIOApiResponse.java @@ -3,13 +3,13 @@ /** * @author ujjwal on 13/02/18. */ -public abstract class CexIOApiResponse { +public abstract class CexIOApiResponse { private final String e; - private final Object data; + private final T data; private final String ok; private final String error; - protected CexIOApiResponse(String e, Object data, String ok, String error) { + protected CexIOApiResponse(String e, T data, String ok, String error) { this.e = e; this.data = data; this.ok = ok; @@ -20,7 +20,7 @@ public String getE() { return e; } - public Object getData() { + public T getData() { return data; } diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfo.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfo.java new file mode 100644 index 000000000..271c49668 --- /dev/null +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfo.java @@ -0,0 +1,66 @@ +package org.knowm.xchange.cexio.dto.account; + +import java.math.BigDecimal; +import java.util.Map; + +import org.knowm.xchange.cexio.dto.CexIOApiResponse; +import org.knowm.xchange.currency.CurrencyPair; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.KeyDeserializer; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * @author ujjwal on 14/02/18. + */ +public class CexIOFeeInfo extends CexIOApiResponse> { + + public CexIOFeeInfo(@JsonProperty("e") String e, @JsonProperty("data") @JsonDeserialize(keyUsing = CurrencyPairKeyDeserializer.class) + Map data, + @JsonProperty("ok") + String ok, + @JsonProperty("error") String error) { + super(e, data, ok, error); + } + + public static class CurrencyPairKeyDeserializer extends KeyDeserializer { + @Override + public CurrencyPair deserializeKey(String value, DeserializationContext deserializationContext) { + String[] currencies = value.split(":"); + return new CurrencyPair(currencies[0], currencies[1]); + } + } + + public static class FeeDetails { + private final BigDecimal sell; + private final BigDecimal sellMaker; + private final BigDecimal buy; + private final BigDecimal buyMaker; + + public FeeDetails(@JsonProperty("sell") BigDecimal sell, @JsonProperty("sellMaker") BigDecimal sellMaker, @JsonProperty("buy") BigDecimal buy, + @JsonProperty("buyMaker") BigDecimal buyMaker) { + this.sell = sell; + this.sellMaker = sellMaker; + this.buy = buy; + this.buyMaker = buyMaker; + } + + public BigDecimal getSell() { + return sell; + } + + public BigDecimal getSellMaker() { + return sellMaker; + } + + public BigDecimal getBuy() { + return buy; + } + + public BigDecimal getBuyMaker() { + return buyMaker; + } + } +} diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java index 193e5e135..a37e99099 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimits.java @@ -11,17 +11,13 @@ /** * @author ujjwal on 13/02/18. */ -public class CexIOCurrencyLimits extends CexIOApiResponse { +public class CexIOCurrencyLimits extends CexIOApiResponse { public CexIOCurrencyLimits(@JsonProperty("e") final String e, @JsonProperty("data") final Data data, @JsonProperty("ok") final String ok, @JsonProperty("error") final String error) { super(e, data, ok, error); } - public Data getData() { - return (Data) super.getData(); - } - public static class Data { private final List pairs; diff --git a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOAccountServiceRaw.java b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOAccountServiceRaw.java index 40e644dd4..2b87ee36b 100644 --- a/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOAccountServiceRaw.java +++ b/xchange-cexio/src/main/java/org/knowm/xchange/cexio/service/CexIOAccountServiceRaw.java @@ -1,5 +1,7 @@ package org.knowm.xchange.cexio.service; +import static org.knowm.xchange.cexio.dto.account.CexIOFeeInfo.FeeDetails; + import java.io.IOException; import java.util.Map; @@ -10,6 +12,7 @@ import org.knowm.xchange.cexio.dto.account.CexIOCryptoAddress; import org.knowm.xchange.cexio.dto.account.GHashIOHashrate; import org.knowm.xchange.cexio.dto.account.GHashIOWorker; +import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.exceptions.ExchangeException; public class CexIOAccountServiceRaw extends CexIOBaseService { @@ -27,10 +30,10 @@ public CexIOBalanceInfo getCexIOAccountInfo() throws IOException { return info; } - + public CexIOCryptoAddress getCexIOCryptoAddress(String isoCode) throws IOException { CexIOCryptoAddress cryptoAddress = cexIOAuthenticated.getCryptoAddress(signatureCreator, new CexioCryptoAddressRequest(isoCode)); - if ( cryptoAddress.getOk().equals("ok")) + if (cryptoAddress.getOk().equals("ok")) return cryptoAddress; throw new ExchangeException(cryptoAddress.getE() + ": " + cryptoAddress.getError()); @@ -44,4 +47,8 @@ public Map getWorkers() throws IOException { return cexIOAuthenticated.getWorkers(signatureCreator).getWorkers(); } + public Map getMyFee() throws IOException { + return cexIOAuthenticated.getMyFee(signatureCreator, new CexIORequest()).getData(); + } + } diff --git a/xchange-cexio/src/test/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfoTest.java b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfoTest.java new file mode 100644 index 000000000..ad5b7ef47 --- /dev/null +++ b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/dto/account/CexIOFeeInfoTest.java @@ -0,0 +1,40 @@ +package org.knowm.xchange.cexio.dto.account; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.knowm.xchange.currency.Currency.GBP; +import static org.knowm.xchange.currency.Currency.ZEC; +import static org.knowm.xchange.currency.CurrencyPair.BCH_GBP; +import static org.knowm.xchange.currency.CurrencyPair.ETH_USD; +import static org.knowm.xchange.currency.CurrencyPair.ZEC_BTC; + +import java.io.IOException; +import java.io.InputStream; + +import org.junit.Test; +import org.knowm.xchange.currency.CurrencyPair; + +import com.fasterxml.jackson.databind.ObjectMapper; + +/** + * @author ujjwal on 14/02/18. + */ +public class CexIOFeeInfoTest { + @Test + public void jsonMapperTest() throws IOException { + InputStream is = getClass().getResourceAsStream("/account/sample_get_myfee.json"); + ObjectMapper mapper = new ObjectMapper(); + final CexIOFeeInfo cexIOFeeInfo = mapper.readValue(is, CexIOFeeInfo.class); + assertThat(cexIOFeeInfo).isNotNull(); + assertThat(cexIOFeeInfo.getE()).isEqualToIgnoringCase("get_myfee"); + assertThat(cexIOFeeInfo.getOk()).isEqualToIgnoringCase("ok"); + assertThat(cexIOFeeInfo.getData()).isNotEmpty() + .containsKeys(ETH_USD, BCH_GBP, ZEC_BTC, new CurrencyPair(ZEC, GBP)); + final CexIOFeeInfo.FeeDetails feeDetails = cexIOFeeInfo.getData().get(ETH_USD); + assertThat(feeDetails).isNotNull(); + assertThat(feeDetails.getBuy()).isNotNull(); + assertThat(feeDetails.getBuyMaker()).isNotNull(); + assertThat(feeDetails.getSell()).isNotNegative(); + assertThat(feeDetails.getSellMaker()).isNotNegative(); + } + +} diff --git a/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimitsTest.java similarity index 81% rename from xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java rename to xchange-cexio/src/test/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimitsTest.java index 3f43cfe4e..dcfbc25cd 100644 --- a/xchange-cexio/src/test/java/org/knowm/xchange/cexio/service/marketdata/RemoteInitTest.java +++ b/xchange-cexio/src/test/java/org/knowm/xchange/cexio/dto/marketdata/CexIOCurrencyLimitsTest.java @@ -1,4 +1,4 @@ -package org.knowm.xchange.cexio.service.marketdata; +package org.knowm.xchange.cexio.dto.marketdata; import static org.assertj.core.api.Assertions.assertThat; @@ -6,16 +6,15 @@ import java.io.InputStream; import org.junit.Test; -import org.knowm.xchange.cexio.dto.marketdata.CexIOCurrencyLimits; import com.fasterxml.jackson.databind.ObjectMapper; /** * @author ujjwal on 13/02/18. */ -public class RemoteInitTest { +public class CexIOCurrencyLimitsTest { @Test - public void unitJsonMapperTest() throws IOException { + public void jsonMapperTest() throws IOException { InputStream is = getClass().getResourceAsStream("/marketdata/sample_currency_limits.json"); ObjectMapper mapper = new ObjectMapper(); final CexIOCurrencyLimits cexIOCurrencyLimits = mapper.readValue(is, CexIOCurrencyLimits.class); diff --git a/xchange-cexio/src/test/resources/account/sample_get_myfee.json b/xchange-cexio/src/test/resources/account/sample_get_myfee.json new file mode 100644 index 000000000..c78733ff2 --- /dev/null +++ b/xchange-cexio/src/test/resources/account/sample_get_myfee.json @@ -0,0 +1,30 @@ +{ + "ok": "ok", + "e": "get_myfee", + "data": { + "ETH:USD": { + "sell": "0.15", + "buyMaker": "0", + "buy": "0.15", + "sellMaker": "0" + }, + "BCH:GBP": { + "sell": "0.15", + "buyMaker": "0", + "buy": "0.15", + "sellMaker": "0" + }, + "ZEC:BTC": { + "sell": "0.15", + "buyMaker": "0", + "buy": "0.15", + "sellMaker": "0" + }, + "ZEC:GBP": { + "sell": "0.15", + "buyMaker": "0", + "buy": "0.15", + "sellMaker": "0" + } + } +} \ No newline at end of file From 9127596072096238dd03aa14454880cf968357fc Mon Sep 17 00:00:00 2001 From: bharris Date: Wed, 14 Feb 2018 00:17:08 -0800 Subject: [PATCH 077/117] [abucoins] Improved abucoins AbucoinsAccount to AccountInfo mapping (adapting). Prior implementation created a Wallet for each AbucoinsAccount entry (with a single currency Balance in the wallet). Revised logic groups AbucoinsAccounts by their profileID. It then creates a wallet per profileID which has multiple balances. This seems more consistent with other exchanges. --- .../xchange/abucoins/AbucoinsAdapters.java | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java index 86270bea4..c816b1d7c 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java @@ -6,7 +6,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.StringTokenizer; import java.util.TimeZone; @@ -163,24 +165,36 @@ public static OrderBook adaptOrderBook(AbucoinsOrderBook abucoinsOrderBook, Curr } public static AccountInfo adaptAccountInfo(AbucoinsAccount[] accounts) { + // group account balances by profileID + Map> mapByProfileID = new HashMap<>(); + for ( AbucoinsAccount account : accounts ) { + List balances = mapByProfileID.get(account.getProfileID()); + if ( balances == null ) { + balances = new ArrayList<>(); + mapByProfileID.put(account.getProfileID(), balances); + } + balances.add( adaptBalance(account)); + } + + // create a wallet for each profileID List wallets = new ArrayList<>(); - for ( AbucoinsAccount account : accounts ) - wallets.add( adaptWallet(account)); + for ( Long profileID : mapByProfileID.keySet()) { + List balances = mapByProfileID.get(profileID); + wallets.add( new Wallet(String.valueOf(profileID), balances)); + } return new AccountInfo("", wallets); } /** - * Adapts AbucoinsBalanceInfo to Wallet + * Adapts AbucoinsAccount to a Balance * * @param account AbucoinsAccount balance * @return The account info */ - public static Wallet adaptWallet(AbucoinsAccount account) { + public static Balance adaptBalance(AbucoinsAccount account) { Currency currency = Currency.getInstance( account.getCurrency()); - List balances = Arrays.asList(new Balance[] { new Balance(currency, account.getBalance(), account.getAvailable(), account.getHold()) }); - - return new Wallet(account.getId(), String.valueOf(account.getProfileID()), balances); + return new Balance(currency, account.getBalance(), account.getAvailable(), account.getHold()); } public static List createOrders(CurrencyPair currencyPair, OrderType orderType, AbucoinsOrderBook.LimitOrder[] orders) { From 24c7b40f7a09808ac229775d7be28afddbc55fe4 Mon Sep 17 00:00:00 2001 From: bharris Date: Wed, 14 Feb 2018 01:09:44 -0800 Subject: [PATCH 078/117] [lakebtc] Updated examples to use Map replacing LateBTCTickers object. --- .../marketdata/LakeBTCTickersDemo.java | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/lakebtc/marketdata/LakeBTCTickersDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/lakebtc/marketdata/LakeBTCTickersDemo.java index fd79c6948..bb0bc110e 100755 --- a/xchange-examples/src/main/java/org/knowm/xchange/examples/lakebtc/marketdata/LakeBTCTickersDemo.java +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/lakebtc/marketdata/LakeBTCTickersDemo.java @@ -1,13 +1,15 @@ package org.knowm.xchange.examples.lakebtc.marketdata; import java.io.IOException; +import java.util.Map; import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.examples.lakebtc.LakeBTCExamplesUtils; -import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTickers; +import org.knowm.xchange.lakebtc.LakeBTCAdapters; +import org.knowm.xchange.lakebtc.dto.marketdata.LakeBTCTicker; import org.knowm.xchange.lakebtc.service.LakeBTCMarketDataServiceRaw; import org.knowm.xchange.service.marketdata.MarketDataService; @@ -29,38 +31,40 @@ private static void generic(Exchange lakebtcExchange) throws IOException { System.out.println("Ticker: " + ticker.toString()); System.out.println("Currency: " + Currency.USD); - System.out.println("Last: " + ticker.getLast().toString()); - System.out.println("Volume: " + ticker.getVolume().toString()); - System.out.println("High: " + ticker.getHigh().toString()); - System.out.println("Low: " + ticker.getLow().toString()); + System.out.println("Last: " + ticker.getLast()); + System.out.println("Volume: " + ticker.getVolume()); + System.out.println("High: " + ticker.getHigh()); + System.out.println("Low: " + ticker.getLow()); - ticker = marketDataService.getTicker(CurrencyPair.BTC_CNY); + ticker = marketDataService.getTicker(CurrencyPair.BTC_HKD); System.out.println("Ticker: " + ticker.toString()); - System.out.println("Currency: " + Currency.CNY); - System.out.println("Last: " + ticker.getLast().toString()); - System.out.println("Volume: " + ticker.getVolume().toString()); - System.out.println("High: " + ticker.getHigh().toString()); - System.out.println("Low: " + ticker.getLow().toString()); + System.out.println("Currency: " + Currency.HKD); + System.out.println("Last: " + ticker.getLast()); + System.out.println("Volume: " + ticker.getVolume()); + System.out.println("High: " + ticker.getHigh()); + System.out.println("Low: " + ticker.getLow()); } private static void raw(Exchange lakeBtcExchange) throws IOException { LakeBTCMarketDataServiceRaw marketDataService = (LakeBTCMarketDataServiceRaw) lakeBtcExchange.getMarketDataService(); - LakeBTCTickers tickers = marketDataService.getLakeBTCTickers(); + Map tickers = marketDataService.getLakeBTCTickers(); - System.out.println("Ticker: " + tickers.getCny().toString()); - System.out.println("Currency: " + Currency.CNY); - System.out.println("Last: " + tickers.getCny().getLast().toString()); - System.out.println("Volume: " + tickers.getCny().getVolume().toString()); - System.out.println("High: " + tickers.getCny().getHigh().toString()); - System.out.println("Low: " + tickers.getCny().getLow().toString()); + LakeBTCTicker hkd = tickers.get( LakeBTCAdapters.adaptCurrencyPair(CurrencyPair.BTC_HKD)); + System.out.println("Ticker: " + hkd); + System.out.println("Currency: " + Currency.HKD); + System.out.println("Last: " + hkd.getLast()); + System.out.println("Volume: " + hkd.getVolume()); + System.out.println("High: " + hkd.getHigh()); + System.out.println("Low: " + hkd.getLow()); - System.out.println("Ticker: " + tickers.getUsd().toString()); + LakeBTCTicker usd = tickers.get( LakeBTCAdapters.adaptCurrencyPair(CurrencyPair.BTC_USD)); + System.out.println("Ticker: " + usd); System.out.println("Currency: " + Currency.USD); - System.out.println("Last: " + tickers.getUsd().getLast().toString()); - System.out.println("Volume: " + tickers.getUsd().getVolume().toString()); - System.out.println("High: " + tickers.getUsd().getHigh().toString()); - System.out.println("Low: " + tickers.getUsd().getLow().toString()); + System.out.println("Last: " + usd.getLast()); + System.out.println("Volume: " + usd.getVolume()); + System.out.println("High: " + usd.getHigh()); + System.out.println("Low: " + usd.getLow()); } } From 69dda99bd4eb9ed627a1b8218253a8f060f7d2e7 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Wed, 14 Feb 2018 15:16:26 -0600 Subject: [PATCH 079/117] [bitmex] add pagination for getTrade requests with > 100 responses --- .../java/org/knowm/xchange/bitmex/Bitmex.java | 4 +++- .../knowm/xchange/bitmex/BitmexAdapters.java | 10 ++++---- .../service/BitmexMarketDataServiceRaw.java | 23 +++++++++++-------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java index 0ef138ddb..e8d39da3c 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/Bitmex.java @@ -61,7 +61,9 @@ List getMarginAccountsStatus(@HeaderParam("api-key") String @GET @Path("trade") - BitmexPublicTrade[] getTrades(@QueryParam("symbol") String currencyPair, @QueryParam("reverse") Boolean reverse) throws IOException; + BitmexPublicTrade[] getTrades(@QueryParam("symbol") String currencyPair, @QueryParam("reverse") Boolean reverse, + @Nullable @QueryParam("count") Integer count, + @Nullable @QueryParam("start") Integer start) throws IOException; @GET @Path("orderBook/L2") diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java index fe6966029..acc78b8f7 100644 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java @@ -67,14 +67,14 @@ public static OrdersContainer adaptOrders(List orders, Curren } - public static Trades adaptTrades(BitmexPublicTrade[] trades, CurrencyPair currencyPair) { + public static Trades adaptTrades(List trades, CurrencyPair currencyPair) { - List tradeList = new ArrayList<>(trades.length); - for (int i = 0; i < trades.length; i++) { - BitmexPublicTrade trade = trades[i]; + List tradeList = new ArrayList<>(trades.size()); + for (int i = 0; i < trades.size(); i++) { + BitmexPublicTrade trade = trades.get(i); tradeList.add(adaptTrade(trade, currencyPair)); } - long lastTid = trades.length > 0 ? (trades[0].getTime().getTime()) : 0; + long lastTid = trades.size() > 0 ? (trades.get(0).getTime().getTime()) : 0; // long lastTid = 0L; return new Trades(tradeList, lastTid, TradeSortType.SortByTimestamp); } diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexMarketDataServiceRaw.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexMarketDataServiceRaw.java index c4539c71e..8d01858c6 100755 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexMarketDataServiceRaw.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/service/BitmexMarketDataServiceRaw.java @@ -1,9 +1,7 @@ package org.knowm.xchange.bitmex.service; import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import org.knowm.xchange.Exchange; import org.knowm.xchange.bitmex.BitmexAdapters; @@ -60,17 +58,24 @@ public BitmexDepth getBitmexDepth(CurrencyPair pair, BitmexPrompt prompt, Object public Trades getBitmexTrades(CurrencyPair pair, BitmexPrompt prompt, Object... args) throws IOException { + List trades = new ArrayList<>(); + BitmexContract contract = new BitmexContract(pair, prompt); String bitmexSymbol = BitmexUtils.translateBitmexContract(contract); - BitmexPublicTrade[] result = bitmex.getTrades(bitmexSymbol, true); - if (pair != null && prompt != null) - return BitmexAdapters.adaptTrades(result, pair); + Integer limit = (Integer) args[0]; - // return result; - return null; + for (int i = 0; trades.size() + 500 <= limit; i++) { + BitmexPublicTrade[] result = bitmex.getTrades(bitmexSymbol, true, 500, i * 500); + trades.addAll(Arrays.asList(result)); + } - // return checkResult(result); + if (pair != null && prompt != null) { + List trimmed = trades.subList(0, Math.min(limit, trades.size())); + return BitmexAdapters.adaptTrades(trimmed, pair); + } + + return null; } public List getTicker(String symbol) throws IOException { From e0cb5617d1347a89303b08e2fda1aab38170354d Mon Sep 17 00:00:00 2001 From: bharris Date: Wed, 14 Feb 2018 14:09:30 -0800 Subject: [PATCH 080/117] [bitflyer] DateFormat it turns out aren't thread safe, so if you create a static instance, clone it per thread. --- .../main/java/org/knowm/xchange/bitflyer/BitflyerUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerUtils.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerUtils.java index fe74dbd65..94f8f610f 100755 --- a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerUtils.java +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerUtils.java @@ -20,7 +20,8 @@ private BitflyerUtils() { public static Date parseDate(final String date) { try { - return DATE_FORMAT.parse(date); + SimpleDateFormat threadSafeClone = (SimpleDateFormat) DATE_FORMAT.clone(); + return threadSafeClone.parse(date); } catch (final ParseException e) { throw new ExchangeException("Illegal date/time format: " + date, e); } From 90d3bf2a81f5163485fa9e86891c207b14516ce4 Mon Sep 17 00:00:00 2001 From: bharris Date: Wed, 14 Feb 2018 14:11:47 -0800 Subject: [PATCH 081/117] [bitflyer] Adding several missing api calls. --- .../org/knowm/xchange/bitflyer/Bitflyer.java | 77 +++++++++++-- .../xchange/bitflyer/BitflyerAdapters.java | 64 +++++++++++ .../bitflyer/dto/account/BitflyerAddress.java | 67 +++++++++++ .../dto/account/BitflyerBankAccount.java | 108 ++++++++++++++++++ .../account/BitflyerBaseHistoryResponse.java | 79 +++++++++++++ .../dto/account/BitflyerCoinHistory.java | 91 +++++++++++++++ .../account/BitflyerDepositOrWithdrawal.java | 29 +++++ .../dto/account/BitflyerWithdrawRequest.java | 66 +++++++++++ .../dto/account/BitflyerWithdrawResponse.java | 39 +++++++ .../service/BitflyerAccountService.java | 71 +++++++++++- .../service/BitflyerAccountServiceRaw.java | 84 +++++++++++++- .../service/BitflyerTradeHistoryParams.java | 31 +++++ 12 files changed, 787 insertions(+), 19 deletions(-) create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerAddress.java create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBankAccount.java create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBaseHistoryResponse.java create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerCoinHistory.java create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerDepositOrWithdrawal.java create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawRequest.java create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawResponse.java create mode 100644 xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerTradeHistoryParams.java diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/Bitflyer.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/Bitflyer.java index a0b57d61c..46d5cf835 100755 --- a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/Bitflyer.java +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/Bitflyer.java @@ -3,19 +3,27 @@ import java.io.IOException; import java.util.List; +import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; +import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import org.knowm.xchange.bitflyer.dto.BitflyerException; +import org.knowm.xchange.bitflyer.dto.account.BitflyerAddress; import org.knowm.xchange.bitflyer.dto.account.BitflyerBalance; +import org.knowm.xchange.bitflyer.dto.account.BitflyerBankAccount; +import org.knowm.xchange.bitflyer.dto.account.BitflyerDepositOrWithdrawal; +import org.knowm.xchange.bitflyer.dto.account.BitflyerCoinHistory; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginAccount; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginStatus; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginTransaction; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarket; +import org.knowm.xchange.bitflyer.dto.account.BitflyerWithdrawRequest; +import org.knowm.xchange.bitflyer.dto.account.BitflyerWithdrawResponse; import org.knowm.xchange.bitflyer.dto.marketdata.BitflyerOrderbook; import org.knowm.xchange.bitflyer.dto.marketdata.BitflyerTicker; import org.knowm.xchange.bitflyer.dto.trade.BitflyerExecution; @@ -65,13 +73,18 @@ public interface Bitflyer { @GET @Path("getexecutions") List getExecutions(@QueryParam("product_code") String productCode) throws IOException, BitflyerException; + + @GET + @Path("me/getpermissions") + List getPermissions(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; @GET - @Path("me/getpositions") - List getPositions(@HeaderParam(ACCESS_KEY) String apiKey, + @Path("/me/getbalance") + List getBalances(@HeaderParam(ACCESS_KEY) String apiKey, @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, - @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest, - @QueryParam("product_code") String productCode) throws IOException, BitflyerException; + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; @GET @Path("me/getcollateral") @@ -80,17 +93,65 @@ BitflyerMarginStatus getMarginStatus(@HeaderParam(ACCESS_KEY) String apiKey, @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; @GET - @Path("/me/getbalance") - List getBalances(@HeaderParam(ACCESS_KEY) String apiKey, + @Path("me/getcollateralaccounts") + List getMarginAccounts(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; + + @GET + @Path("me/getaddresses") + @Produces(MediaType.APPLICATION_JSON) + List getAddresses(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; + + @GET + @Path("me/getcoinins") + List getCoinIns(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; + + @GET + @Path("me/getcoinouts") + List getCoinOuts(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; + + @GET + @Path("me/getbankaccounts") + List getBankAccounts(@HeaderParam(ACCESS_KEY) String apiKey, @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; @GET - @Path("me/getcollateralaccounts") - List getMarginAccounts(@HeaderParam(ACCESS_KEY) String apiKey, + @Path("me/getdeposits") + List getCashDeposits(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; + + @POST + @Path("me/withdraw") + @Produces(MediaType.APPLICATION_JSON) + @Consumes(MediaType.APPLICATION_JSON) + BitflyerWithdrawResponse withdrawFunds(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest, + BitflyerWithdrawRequest body) throws IOException, BitflyerException; + + @GET + @Path("me/getwithdrawals") + List getWithdrawals(@HeaderParam(ACCESS_KEY) String apiKey, @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest) throws IOException, BitflyerException; + + @GET + @Path("me/getpositions") + List getPositions(@HeaderParam(ACCESS_KEY) String apiKey, + @HeaderParam(ACCESS_TIMESTAMP) SynchronizedValueFactory nonce, + @HeaderParam(ACCESS_SIGN) ParamsDigest paramsDigest, + @QueryParam("product_code") String productCode) throws IOException, BitflyerException; + @GET @Path("me/getcollateralhistory") List getMarginHistory(@HeaderParam(ACCESS_KEY) String apiKey, diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerAdapters.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerAdapters.java index 60d7d6d9e..150b2c4f0 100755 --- a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerAdapters.java +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerAdapters.java @@ -10,11 +10,14 @@ import java.util.regex.Pattern; import org.knowm.xchange.bitflyer.dto.account.BitflyerBalance; +import org.knowm.xchange.bitflyer.dto.account.BitflyerCoinHistory; +import org.knowm.xchange.bitflyer.dto.account.BitflyerDepositOrWithdrawal; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarket; import org.knowm.xchange.bitflyer.dto.marketdata.BitflyerTicker; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.account.Balance; +import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.meta.CurrencyMetaData; @@ -80,6 +83,67 @@ public static Ticker adaptTicker(BitflyerTicker ticker, CurrencyPair currencyPai return new Ticker.Builder().currencyPair(currencyPair).bid(bid).ask(ask).volume(volume).timestamp(timestamp).build(); } + + public static List adaptFundingRecordsFromCoinHistory(List coinHistory, FundingRecord.Type type) { + List retVal = new ArrayList<>(); + for ( BitflyerCoinHistory history : coinHistory ) + retVal.add( adaptFundingRecord(history, type)); + + return retVal; + } + + public static List adaptFundingRecordsFromDepositHistory(List depositWithdrawls, FundingRecord.Type type) { + List retVal = new ArrayList<>(); + for ( BitflyerDepositOrWithdrawal history : depositWithdrawls ) + retVal.add( adaptFundingRecord(history, type)); + + return retVal; + } + + public static FundingRecord adaptFundingRecord(BitflyerCoinHistory history, FundingRecord.Type type) { + return new FundingRecord.Builder() + .setDate(BitflyerUtils.parseDate( history.getEventDate())) + .setCurrency(new Currency(history.getCurrencyCode())) + .setAmount(history.getAmount()) + .setAddress(history.getAddress()) + .setInternalId(history.getID()) + .setExternalId(history.getOrderID()) + .setType(type) + .setStatus(adaptStatus(history.getStatus())) + .setBalance(history.getAmount()) + .setFee(add(history.getFee(),history.getAdditionalFee())) + .build(); + } + + public static FundingRecord adaptFundingRecord(BitflyerDepositOrWithdrawal history, FundingRecord.Type type) { + return new FundingRecord.Builder() + .setDate(BitflyerUtils.parseDate( history.getEventDate())) + .setCurrency(new Currency(history.getCurrencyCode())) + .setAmount(history.getAmount()) + .setInternalId(history.getID()) + .setExternalId(history.getOrderID()) + .setType(type) + .setStatus(adaptStatus(history.getStatus())) + .setBalance(history.getAmount()) + .build(); + } + + private static FundingRecord.Status adaptStatus(String status) { + if ( status.equals("COMPLETED")) + return FundingRecord.Status.COMPLETE; + if ( status.equals("PENDING")) + return FundingRecord.Status.PROCESSING; + + // ?? + return FundingRecord.Status.FAILED; + } + + private static BigDecimal add(BigDecimal a, BigDecimal b) { + BigDecimal a1 = a == null ? BigDecimal.ZERO : a; + BigDecimal b1 = b == null ? BigDecimal.ZERO : b; + + return a1.add(b1); + } public static void main(String[] args) { adaptCurrencyPair("BTC_JPY"); diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerAddress.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerAddress.java new file mode 100644 index 000000000..c89230710 --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerAddress.java @@ -0,0 +1,67 @@ +package org.knowm.xchange.bitflyer.dto.account; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * Object representing json returned from GET /v1/me/getaddresses + * + *

Example

+ * [ + * { + * "type": "NORMAL", + * "currency_code": "BTC", + * "address": "3AYrDq8zhF82NJ2ZaLwBMPmaNziaKPaxa7" + * }, + * { + * "type": "NORMAL", + * "currency_code": "ETH", + * "address": "0x7fbB2CC24a3C0cd3789a44e9073381Ca6470853f" + * } + * ] + * @author bryant_harris + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "type", + "currency_code", + "address" + }) +public class BitflyerAddress { + @JsonProperty("type") + private String type; + @JsonProperty("currency_code") + private String currencyCode; + @JsonProperty("address") + private String address; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currency_code) { + this.currencyCode = currency_code; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + @Override + public String toString() { + return "BitflyerAddress [type=" + type + ", currency_code=" + currencyCode + ", address=" + address + "]"; + } +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBankAccount.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBankAccount.java new file mode 100644 index 000000000..667c2c1b4 --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBankAccount.java @@ -0,0 +1,108 @@ +package org.knowm.xchange.bitflyer.dto.account; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object representing json returned from GET /v1/me/getbankaccounts + * + *

Example

+ * [ + * { + * "id": 3402, + * "is_verified": true, + * "bank_name": "Wells Fargo", + * "branch_name": "1231234123", + * "account_type": "Checking", + * "account_number": "1111111", + * "account_name": "Name on Account" + * } + * ] + * @author bryant_harris + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BitflyerBankAccount { + @JsonProperty("type") + Long id; + + @JsonProperty("is_verified") + boolean isVerified; + + @JsonProperty("bank_name") + String bankName; + + @JsonProperty("branch_name") + String branchName; + + @JsonProperty("account_type") + String accountType; + + @JsonProperty("account_number") + String accountNumber; + + @JsonProperty("account_name") + String accountName; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public boolean isVerified() { + return isVerified; + } + + public void setVerified(boolean isVerified) { + this.isVerified = isVerified; + } + + public String getBankName() { + return bankName; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + public String getBranchName() { + return branchName; + } + + public void setBranchName(String branchName) { + this.branchName = branchName; + } + + public String getAccountType() { + return accountType; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + @Override + public String toString() { + return "BitflyerBankAccount [id=" + id + ", isVerified=" + isVerified + ", bankName=" + bankName + ", branchName=" + + branchName + ", accountType=" + accountType + ", accountNumber=" + accountNumber + ", accountName=" + + accountName + "]"; + } +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBaseHistoryResponse.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBaseHistoryResponse.java new file mode 100644 index 000000000..c65002d43 --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerBaseHistoryResponse.java @@ -0,0 +1,79 @@ +package org.knowm.xchange.bitflyer.dto.account; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A base class for history related responses + * @author bryant_harris + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public abstract class BitflyerBaseHistoryResponse { + @JsonProperty("id") + String id; + + @JsonProperty("order_id") + String orderID; + + @JsonProperty("currency_code") + String currencyCode; + + @JsonProperty("amount") + BigDecimal amount; + + @JsonProperty("status") + String status; + + @JsonProperty("event_date") + String eventDate; + + public String getID() { + return id; + } + + public void setID(String id) { + this.id = id; + } + + public String getOrderID() { + return orderID; + } + + public void setOrderID(String orderID) { + this.orderID = orderID; + } + + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getEventDate() { + return eventDate; + } + + public void setEventDate(String eventDate) { + this.eventDate = eventDate; + } +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerCoinHistory.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerCoinHistory.java new file mode 100644 index 000000000..3a9869ab1 --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerCoinHistory.java @@ -0,0 +1,91 @@ +package org.knowm.xchange.bitflyer.dto.account; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object representing json returned from GET /v1/me/getcoinins or GET /v1/me/getcoinouts + * + *

Example getcoinins

+ *
{
+ *    "id": 100,
+ *    "order_id": "CDP20151227-024141-055555",
+ *    "currency_code": "BTC",
+ *    "amount": 0.00002,
+ *    "address": "1WriteySQufKZ2pVuM1oMhPrTtTVFq35j",
+ *    "tx_hash": "9f92ee65a176bb9545f7becb8706c50d07d4cee5ffca34d8be3ef11d411405ae",
+ *    "status": "COMPLETED",
+ *    "event_date": "2015-11-27T08:59:20.301"
+ *  }
+ * + *

Example getcoinouts

+ *
{
+ *     "id": 500,
+ *     "order_id": "CWD20151224-014040-077777",
+ *     "currency_code": "BTC",
+ *     "amount": 0.1234,
+ *     "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
+ *     "tx_hash": "724c07dfd4044abcb390b0412c3e707dd5c4f373f0a52b3bd295ce32b478c60a",
+ *     "fee": 0.0005,
+ *     "additional_fee": 0.0001,
+ *     "status": "COMPLETED",
+ *     "event_date": "2015-12-24T01:40:40.397"
+ *   }
+ + * @author bryant_harris + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BitflyerCoinHistory extends BitflyerBaseHistoryResponse { + @JsonProperty("address") + String address; + + @JsonProperty("fee") + BigDecimal fee; + + @JsonProperty("additional_fee") + BigDecimal additionalFee; + + @JsonProperty("tx_hash") + String txHash; + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public BigDecimal getAdditionalFee() { + return additionalFee; + } + + public void setAdditionalFee(BigDecimal additionalFee) { + this.additionalFee = additionalFee; + } + + public String getTxHash() { + return txHash; + } + + public void setTxHash(String txHash) { + this.txHash = txHash; + } + + @Override + public String toString() { + return "BitflyerCoinIn [id=" + id + ", orderID=" + orderID + ", currencyCode=" + currencyCode + ", amount=" + + amount + ", address=" + address + ", fee=" + fee + ", additionalFee=" + additionalFee + ", txHash=" + + txHash + ", status=" + status + ", eventDate=" + eventDate + "]"; + } +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerDepositOrWithdrawal.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerDepositOrWithdrawal.java new file mode 100644 index 000000000..fb9bf132a --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerDepositOrWithdrawal.java @@ -0,0 +1,29 @@ +package org.knowm.xchange.bitflyer.dto.account; + +import com.fasterxml.jackson.annotation.JsonInclude; + +/** + * Object representing json returned from GET /v1/me/getdeposits or GET /v1/me/getwithdrawals + * + *

Example

+ * [ + * { + * "id": 300, + * "order_id": "MDP20151014-101010-033333", + * "currency_code": "JPY", + * "amount": 10000, + * "status": "COMPLETED", + * "event_date": "2015-10-14T10:10:10.001" + * } + * ] + * @author bryant_harris + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class BitflyerDepositOrWithdrawal extends BitflyerBaseHistoryResponse { + + @Override + public String toString() { + return "BitflyerCashDeposit [id=" + id + ", orderID=" + orderID + ", currencyCode=" + currencyCode + ", amount=" + + amount + ", status=" + status + ", eventDate=" + eventDate + "]"; + } +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawRequest.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawRequest.java new file mode 100644 index 000000000..f3712e6cc --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawRequest.java @@ -0,0 +1,66 @@ +package org.knowm.xchange.bitflyer.dto.account; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * Object representing body of request POST /v1/me/withdraw + * + *

Example

+ * { + * "currency_code": "JPY", + * "bank_account_id": 1234, + * "amount": 12000 + * } + * @author bryant_harris + */ +public class BitflyerWithdrawRequest { + @JsonProperty("currency_code") + private String currencyCode; + + @JsonProperty("bank_account_id") + private String bankAccountID; + + @JsonProperty("amount") + private BigDecimal amount; + + public BitflyerWithdrawRequest(String currencyCode, String bankAccountID, BigDecimal amount) { + super(); + this.currencyCode = currencyCode; + this.bankAccountID = bankAccountID; + this.amount = amount; + } + + public String getCurrencyCode() { + return currencyCode; + } + + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + public String getBankAccountID() { + return bankAccountID; + } + + public void setBankAccountID(String bankAccountID) { + this.bankAccountID = bankAccountID; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + @Override + public String toString() { + return "BitflyerWithdrawRequest [currencyCode=" + currencyCode + ", bankAccountID=" + bankAccountID + ", amount=" + + amount + "]"; + } +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawResponse.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawResponse.java new file mode 100644 index 000000000..95c87d689 --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/dto/account/BitflyerWithdrawResponse.java @@ -0,0 +1,39 @@ +package org.knowm.xchange.bitflyer.dto.account; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * Object representing json returned from GET /v1/me/withdraw + * + *

Example

+ *
{
+ *   "message_id": "69476620-5056-4003-bcbe-42658a2b041b"
+ * }
+ * + * or + * + *
{
+ *   "status": -700,
+ *   "error_message": "This account has not yet been authenticated",
+ *   "data": null
+ * }
+ * @author bryant_harris + */ +public class BitflyerWithdrawResponse { + @JsonProperty("message_id") + String messageID; + + @JsonProperty("status") + Long status; + + @JsonProperty("error_message") + String errorMessage; + + @Override + public String toString() { + return "BitflyerWithdrawResponse [messageID=" + messageID + ", status=" + status + ", errorMessage=" + + errorMessage + "]"; + } +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountService.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountService.java index 4ad7b275f..b18ee3788 100755 --- a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountService.java +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountService.java @@ -2,13 +2,20 @@ import java.io.IOException; import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; import java.util.List; import org.knowm.xchange.Exchange; import org.knowm.xchange.bitflyer.BitflyerAdapters; +import org.knowm.xchange.bitflyer.dto.account.BitflyerAddress; +import org.knowm.xchange.bitflyer.dto.account.BitflyerCoinHistory; +import org.knowm.xchange.bitflyer.dto.account.BitflyerDepositOrWithdrawal; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; import org.knowm.xchange.dto.account.FundingRecord; +import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.TradeHistoryParams; @@ -41,16 +48,70 @@ public String withdrawFunds(WithdrawFundsParams params) throws IOException { @Override public String requestDepositAddress(Currency currency, String... args) throws IOException { - throw new NotYetImplementedForExchangeException(); + List addresses = getAddresses(); + for ( BitflyerAddress address : addresses ) { + if ( address.getCurrencyCode().equals(currency.getCurrencyCode())) + return address.getAddress(); + } + + throw new NotAvailableFromExchangeException(); } @Override public TradeHistoryParams createFundingHistoryParams() { - throw new NotYetImplementedForExchangeException(); + return new BitflyerTradeHistoryParams(); } @Override - public List getFundingHistory(TradeHistoryParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); + public List getFundingHistory(TradeHistoryParams param) throws IOException { + BitflyerTradeHistoryParams historyParms = (BitflyerTradeHistoryParams) (param instanceof BitflyerTradeHistoryParams ? createFundingHistoryParams() : param); + List coinsIn = getCoinIns(); + List coinsOut = getCoinOuts(); + List cashDeposits = getCashDeposits(); + List withdrawals = getWithdrawals(); + + List retVal = new ArrayList<>(); + List some; + some = BitflyerAdapters.adaptFundingRecordsFromCoinHistory(coinsIn, FundingRecord.Type.DEPOSIT); + cullNotWanted(some, historyParms); + retVal.addAll(some); + + some = BitflyerAdapters.adaptFundingRecordsFromCoinHistory(coinsOut, FundingRecord.Type.WITHDRAWAL); + cullNotWanted(some, historyParms); + retVal.addAll(some); + + some = BitflyerAdapters.adaptFundingRecordsFromDepositHistory(cashDeposits, FundingRecord.Type.DEPOSIT); + cullNotWanted(some, historyParms); + retVal.addAll(some); + + some = BitflyerAdapters.adaptFundingRecordsFromDepositHistory(withdrawals, FundingRecord.Type.WITHDRAWAL); + cullNotWanted(some, historyParms); + retVal.addAll(some); + + // interleave the records based on time, newest first + Collections.sort(retVal, (FundingRecord r1, FundingRecord r2)-> { + return r2.getDate().compareTo(r1.getDate()); + }); + + return retVal; + } + + private void cullNotWanted(List some, BitflyerTradeHistoryParams param) { + if ( param != null && param.getCurrencies() != null ) { + Iterator iter = some.iterator(); + while ( iter.hasNext() ) { + FundingRecord record = iter.next(); + if ( !isIn(record.getCurrency(), param.getCurrencies())) + iter.remove(); + } + } + } + + private boolean isIn(Currency currency, Currency[] currencies) { + for ( Currency cur : currencies ) + if ( cur.equals(currency)) + return true; + + return false; } -} \ No newline at end of file +} diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountServiceRaw.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountServiceRaw.java index 7976a7074..3905b6e0d 100755 --- a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountServiceRaw.java +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerAccountServiceRaw.java @@ -1,14 +1,21 @@ package org.knowm.xchange.bitflyer.service; import java.io.IOException; +import java.math.BigDecimal; import java.util.List; import org.knowm.xchange.Exchange; import org.knowm.xchange.bitflyer.dto.BitflyerException; +import org.knowm.xchange.bitflyer.dto.account.BitflyerAddress; import org.knowm.xchange.bitflyer.dto.account.BitflyerBalance; +import org.knowm.xchange.bitflyer.dto.account.BitflyerBankAccount; +import org.knowm.xchange.bitflyer.dto.account.BitflyerCoinHistory; +import org.knowm.xchange.bitflyer.dto.account.BitflyerDepositOrWithdrawal; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginAccount; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginStatus; import org.knowm.xchange.bitflyer.dto.account.BitflyerMarginTransaction; +import org.knowm.xchange.bitflyer.dto.account.BitflyerWithdrawRequest; +import org.knowm.xchange.bitflyer.dto.account.BitflyerWithdrawResponse; public class BitflyerAccountServiceRaw extends BitflyerBaseService { @@ -21,24 +28,81 @@ public BitflyerAccountServiceRaw(Exchange exchange) { super(exchange); } + + public List getPermissions() throws IOException { + try { + return bitflyer.getPermissions(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitflyerException e) { + throw handleError(e); + } + } + + public List getAddresses() throws IOException { + try { + return bitflyer.getAddresses(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitflyerException e) { + throw handleError(e); + } + } + + public List getCoinIns() throws IOException { + try { + return bitflyer.getCoinIns(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitflyerException e) { + throw handleError(e); + } + } - public BitflyerMarginStatus getBitflyerMarginStatus() throws IOException { + public List getCoinOuts() throws IOException { + try { + return bitflyer.getCoinOuts(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitflyerException e) { + throw handleError(e); + } + } + + public List getBankAccounts() throws IOException { + try { + return bitflyer.getBankAccounts(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitflyerException e) { + throw handleError(e); + } + } + public List getCashDeposits() throws IOException { try { - return bitflyer.getMarginStatus(apiKey, exchange.getNonceFactory(), signatureCreator); + return bitflyer.getCashDeposits(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitflyerException e) { + throw handleError(e); + } + } + + public BitflyerWithdrawResponse withdrawFunds(String currencyCode, String bankAccountID, BigDecimal amount) throws IOException { + try { + return bitflyer.withdrawFunds(apiKey, exchange.getNonceFactory(), signatureCreator, new BitflyerWithdrawRequest(currencyCode, bankAccountID, amount)); + } catch (BitflyerException e) { + throw handleError(e); + } + } + + public List getWithdrawals() throws IOException { + try { + return bitflyer.getWithdrawals(apiKey, exchange.getNonceFactory(), signatureCreator); } catch (BitflyerException e) { throw handleError(e); } } - public List getBitflyerBalances() throws IOException { + + public BitflyerMarginStatus getBitflyerMarginStatus() throws IOException { + try { - return bitflyer.getBalances(apiKey, exchange.getNonceFactory(), signatureCreator); + return bitflyer.getMarginStatus(apiKey, exchange.getNonceFactory(), signatureCreator); } catch (BitflyerException e) { throw handleError(e); } } - + public List getBitflyerMarginAccounts() throws IOException { try { @@ -47,7 +111,15 @@ public List getBitflyerMarginAccounts() throws IOExceptio throw handleError(e); } } - + + public List getBitflyerBalances() throws IOException { + try { + return bitflyer.getBalances(apiKey, exchange.getNonceFactory(), signatureCreator); + } catch (BitflyerException e) { + throw handleError(e); + } + } + public List getBitflyerMarginHistory() throws IOException { try { diff --git a/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerTradeHistoryParams.java b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerTradeHistoryParams.java new file mode 100644 index 000000000..ab04f8e6e --- /dev/null +++ b/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/service/BitflyerTradeHistoryParams.java @@ -0,0 +1,31 @@ +package org.knowm.xchange.bitflyer.service; + +import java.util.Arrays; + +import org.knowm.xchange.currency.Currency; +import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrencies; + +/** + * {@link TradeHistoryParam}. Allows filtering to just the provided set of currencies. + * If left null all currencies are included. + * @author bryant_harris + * + */ +public class BitflyerTradeHistoryParams implements TradeHistoryParamCurrencies { + Currency[] currencies; + + @Override + public void setCurrencies(Currency[] currencies) { + this.currencies = currencies; + } + + @Override + public Currency[] getCurrencies() { + return currencies; + } + + @Override + public String toString() { + return "BitflyerTradeHistoryParams [currencies=" + Arrays.toString(currencies) + "]"; + } +} From ec49773cde36519c5e427581c9ad4a2c2e7efe18 Mon Sep 17 00:00:00 2001 From: npomfret Date: Thu, 15 Feb 2018 16:36:44 +0000 Subject: [PATCH 082/117] Replaced calls to `new Currency(...` with `Currency.getInstance(...` --- .../java/org/knowm/xchange/anx/v2/ANXAdapters.java | 2 +- .../org/knowm/xchange/bibox/dto/BiboxAdapters.java | 2 +- .../java/org/knowm/xchange/bitmex/BitmexUtils.java | 8 ++++---- .../org/knowm/xchange/bitstamp/BitstampAdapters.java | 4 ++-- .../org/knowm/xchange/bittrex/BittrexAdapters.java | 4 ++-- .../org/knowm/xchange/bleutrade/BleutradeTestData.java | 2 +- .../service/BleutradeAccountServiceIntegration.java | 2 +- .../java/org/knowm/xchange/cexio/CexIOAdapters.java | 2 +- .../dto/marketdata/CoinMarketCapCurrency.java | 2 +- .../cryptofacilities/CryptoFacilitiesAdapters.java | 2 +- .../main/java/org/knowm/xchange/dsx/DSXAdapters.java | 2 +- .../examples/bitmex/dto/account/BitmexAccountDemo.java | 10 +++++----- .../gateio/service/GateioMarketDataServiceRaw.java | 4 ++-- .../org/knowm/xchange/gateio/GateioAdapterTest.java | 6 +++--- .../knowm/xchange/gdax/service/GDAXAccountService.java | 2 +- .../java/org/knowm/xchange/itbit/v1/ItBitAdapters.java | 2 +- .../java/org/knowm/xchange/kraken/KrakenUtils.java | 8 ++++---- .../org/knowm/xchange/kucoin/dto/KucoinAdapters.java | 8 ++++---- .../org/knowm/xchange/poloniex/PoloniexAdapters.java | 4 ++-- .../org/knowm/xchange/therock/TheRockAdapters.java | 2 +- .../org/knowm/xchange/vaultoro/VaultoroAdapters.java | 2 +- 21 files changed, 40 insertions(+), 40 deletions(-) diff --git a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXAdapters.java b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXAdapters.java index 3cb0003f5..83f306cfc 100644 --- a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXAdapters.java +++ b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXAdapters.java @@ -319,7 +319,7 @@ else if (entryType.equalsIgnoreCase("withdraw")) Date date = DateUtils.fromMillisUtc(rawDate + eightHours); ANXValue value = entry.getValue(); - Currency currency = new Currency(value.getCurrency()); + Currency currency = Currency.getInstance(value.getCurrency()); ANXValue balance = entry.getBalance(); return new FundingRecord( diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index 771af3553..dbd3ac04e 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -121,7 +121,7 @@ private static UserTrade adaptUserTrade(BiboxOrder order) { .originalAmount(order.getAmount()) .timestamp(new Date(order.getCreatedAt())) .type(order.getOrderSide().getOrderType()) - .feeCurrency(new Currency(order.getFeeSymbol())) + .feeCurrency(Currency.getInstance(order.getFeeSymbol())) .feeAmount(order.getFee()) .build(); } diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexUtils.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexUtils.java index ea24e9068..eceb3489a 100644 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexUtils.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexUtils.java @@ -74,22 +74,22 @@ public static CurrencyPair translateBitmexCurrencyPair(String currencyPairIn) { if (pair == null) { // bitmex can give short pairs back from open orders ? if (currencyPairIn.length() == 6) { - Currency base = new Currency(currencyPairIn.substring(0, 3)); + Currency base = Currency.getInstance(currencyPairIn.substring(0, 3)); if (base.getCommonlyUsedCurrency() != null) { base = base.getCommonlyUsedCurrency(); } - Currency counter = new Currency(currencyPairIn.substring(3, 6)); + Currency counter = Currency.getInstance(currencyPairIn.substring(3, 6)); if (counter.getCommonlyUsedCurrency() != null) { counter = counter.getCommonlyUsedCurrency(); } pair = new CurrencyPair(base, counter); } else if (currencyPairIn.length() == 7) { - Currency base = new Currency(currencyPairIn.substring(0, 4)); + Currency base = Currency.getInstance(currencyPairIn.substring(0, 4)); if (base.getCommonlyUsedCurrency() != null) { base = base.getCommonlyUsedCurrency(); } - Currency counter = new Currency(currencyPairIn.substring(4, 7)); + Currency counter = Currency.getInstance(currencyPairIn.substring(4, 7)); if (counter.getCommonlyUsedCurrency() != null) { counter = counter.getCommonlyUsedCurrency(); } diff --git a/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/BitstampAdapters.java b/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/BitstampAdapters.java index aaeab9578..3e96de300 100644 --- a/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/BitstampAdapters.java +++ b/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/BitstampAdapters.java @@ -60,7 +60,7 @@ public static AccountInfo adaptAccountInfo(BitstampBalance bitstampBalance, Stri // Adapt to XChange DTOs List balances = new ArrayList<>(); for (org.knowm.xchange.bitstamp.dto.account.BitstampBalance.Balance b : bitstampBalance.getBalances()) { - Balance xchangeBalance = new Balance(new Currency(b.getCurrency().toUpperCase()), b.getBalance(), b.getAvailable(), + Balance xchangeBalance = new Balance(Currency.getInstance(b.getCurrency().toUpperCase()), b.getBalance(), b.getAvailable(), b.getReserved(), ZERO, ZERO, b.getBalance().subtract(b.getAvailable()).subtract(b.getReserved()), ZERO); balances.add(xchangeBalance); } @@ -190,7 +190,7 @@ public static UserTrades adaptTradeHistory(BitstampUserTransaction[] bitstampUse } final CurrencyPair pair = new CurrencyPair(t.getBaseCurrency().toUpperCase(), t.getCounterCurrency().toUpperCase()); UserTrade trade = new UserTrade(orderType, t.getBaseAmount().abs(), pair, t.getPrice().abs(), t.getDatetime() - , Long.toString(tradeId), Long.toString(t.getOrderId()), t.getFee(), new Currency(t.getFeeCurrency().toUpperCase())); + , Long.toString(tradeId), Long.toString(t.getOrderId()), t.getFee(), Currency.getInstance(t.getFeeCurrency().toUpperCase())); trades.add(trade); } return new UserTrades(trades, lastTradeId, TradeSortType.SortByID); diff --git a/xchange-bittrex/src/main/java/org/knowm/xchange/bittrex/BittrexAdapters.java b/xchange-bittrex/src/main/java/org/knowm/xchange/bittrex/BittrexAdapters.java index 92a69d218..e0146c6bb 100644 --- a/xchange-bittrex/src/main/java/org/knowm/xchange/bittrex/BittrexAdapters.java +++ b/xchange-bittrex/src/main/java/org/knowm/xchange/bittrex/BittrexAdapters.java @@ -251,7 +251,7 @@ public static List adaptDepositRecords(List fundingRecords = new ArrayList<>(); for (BittrexDepositHistory f : bittrexFundingHistories) { if (f != null) { - fundingRecords.add(new FundingRecord(f.getCryptoAddress(), f.getLastUpdated(), new Currency(f.getCurrency()), + fundingRecords.add(new FundingRecord(f.getCryptoAddress(), f.getLastUpdated(), Currency.getInstance(f.getCurrency()), f.getAmount(), String.valueOf(f.getId()), f.getTxId(), FundingRecord.Type.DEPOSIT, FundingRecord.Status.COMPLETE, null, null, null)); } @@ -276,7 +276,7 @@ public static List adaptWithdrawalRecords(List balances = new ArrayList<>(); for (String ccyName : cexIOBalanceInfo.getBalances().keySet()) { CexIOBalance cexIOBalance = cexIOBalanceInfo.getBalances().get(ccyName); - balances.add(adaptBalance(new Currency(ccyName), cexIOBalance)); + balances.add(adaptBalance(Currency.getInstance(ccyName), cexIOBalance)); } return new Wallet(balances); diff --git a/xchange-coinmarketcap/src/main/java/org/knowm/xchange/coinmarketcap/dto/marketdata/CoinMarketCapCurrency.java b/xchange-coinmarketcap/src/main/java/org/knowm/xchange/coinmarketcap/dto/marketdata/CoinMarketCapCurrency.java index 3f6e11139..0e2c5b306 100644 --- a/xchange-coinmarketcap/src/main/java/org/knowm/xchange/coinmarketcap/dto/marketdata/CoinMarketCapCurrency.java +++ b/xchange-coinmarketcap/src/main/java/org/knowm/xchange/coinmarketcap/dto/marketdata/CoinMarketCapCurrency.java @@ -6,7 +6,7 @@ public class CoinMarketCapCurrency { Currency currency; public CoinMarketCapCurrency(String code) { - currency = new Currency(code); + currency = Currency.getInstance(code); } public Currency getCurrency() { diff --git a/xchange-cryptofacilities/src/main/java/org/knowm/xchange/cryptofacilities/CryptoFacilitiesAdapters.java b/xchange-cryptofacilities/src/main/java/org/knowm/xchange/cryptofacilities/CryptoFacilitiesAdapters.java index 2ddd75ab6..b003e0392 100644 --- a/xchange-cryptofacilities/src/main/java/org/knowm/xchange/cryptofacilities/CryptoFacilitiesAdapters.java +++ b/xchange-cryptofacilities/src/main/java/org/knowm/xchange/cryptofacilities/CryptoFacilitiesAdapters.java @@ -60,7 +60,7 @@ public static Ticker adaptTicker(CryptoFacilitiesTicker cryptoFacilitiesTicker, } public static Currency adaptCurrency(String code) { - return new Currency(code); + return Currency.getInstance(code); } public static AccountInfo adaptAccount(CryptoFacilitiesAccount cryptoFacilitiesAccount, String username) { diff --git a/xchange-dsx/src/main/java/org/knowm/xchange/dsx/DSXAdapters.java b/xchange-dsx/src/main/java/org/knowm/xchange/dsx/DSXAdapters.java index 6fb15e05f..135c03436 100644 --- a/xchange-dsx/src/main/java/org/knowm/xchange/dsx/DSXAdapters.java +++ b/xchange-dsx/src/main/java/org/knowm/xchange/dsx/DSXAdapters.java @@ -175,7 +175,7 @@ public static CurrencyPair adaptCurrencyPair(String dsxCurrencyPair) { } public static Currency adaptCurrency(String dsxCurrency) { - return new Currency(dsxCurrency.toUpperCase()); + return Currency.getInstance(dsxCurrency.toUpperCase()); } public static List adaptCurrencyPair(Iterable dsxPairs) { diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/bitmex/dto/account/BitmexAccountDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/bitmex/dto/account/BitmexAccountDemo.java index 48fbd997c..f3e9aed50 100755 --- a/xchange-examples/src/main/java/org/knowm/xchange/examples/bitmex/dto/account/BitmexAccountDemo.java +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/bitmex/dto/account/BitmexAccountDemo.java @@ -29,9 +29,9 @@ private static void marginInfo(AccountService accountService) throws IOException BitmexAccountServiceRaw accountServiceRaw = (BitmexAccountServiceRaw) accountService; BitmexAccount bitmexAccountInfo = accountServiceRaw.getBitmexAccountInfo(); System.out.println("Margin infos response: " + bitmexAccountInfo.toString()); - BitmexMarginAccount xBt = accountServiceRaw.getBitmexMarginAccountStatus(new Currency("XBt")); + BitmexMarginAccount xBt = accountServiceRaw.getBitmexMarginAccountStatus(Currency.getInstance("XBt")); System.out.println(xBt); - BitmexMarginAccount usd = accountServiceRaw.getBitmexMarginAccountStatus(new Currency("USD")); + BitmexMarginAccount usd = accountServiceRaw.getBitmexMarginAccountStatus(Currency.getInstance("USD")); System.out.println(usd); List bitmexMarginAccountsStatus = accountServiceRaw.getBitmexMarginAccountsStatus(); System.out.println(bitmexMarginAccountsStatus); @@ -39,12 +39,12 @@ private static void marginInfo(AccountService accountService) throws IOException private static void walletInfo(AccountService accountService) throws IOException { BitmexAccountServiceRaw accountServiceRaw = (BitmexAccountServiceRaw) accountService; - BitmexWallet xBt = accountServiceRaw.getBitmexWallet(new Currency("XBt")); + BitmexWallet xBt = accountServiceRaw.getBitmexWallet(Currency.getInstance("XBt")); System.out.println(xBt); - List walletHistory = accountServiceRaw.getBitmexWalletHistory(new Currency("XBt")); + List walletHistory = accountServiceRaw.getBitmexWalletHistory(Currency.getInstance("XBt")); System.out.println(walletHistory); - List bitmexWalletSummary = accountServiceRaw.getBitmexWalletSummary(new Currency("XBt")); + List bitmexWalletSummary = accountServiceRaw.getBitmexWalletSummary(Currency.getInstance("XBt")); System.out.println(bitmexWalletSummary); } diff --git a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioMarketDataServiceRaw.java b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioMarketDataServiceRaw.java index 2f9a7f235..94a28c214 100644 --- a/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioMarketDataServiceRaw.java +++ b/xchange-gateio/src/main/java/org/knowm/xchange/gateio/service/GateioMarketDataServiceRaw.java @@ -41,7 +41,7 @@ public Map getBTERTickers() throws IOException { Map adaptedTickers = new HashMap<>(gateioTickers.size()); gateioTickers.forEach((currencyPairString, gateioTicker) -> { String[] currencyPairStringSplit = currencyPairString.split("_"); - CurrencyPair currencyPair = new CurrencyPair(new Currency(currencyPairStringSplit[0].toUpperCase()), new Currency(currencyPairStringSplit[1].toUpperCase())); + CurrencyPair currencyPair = new CurrencyPair(Currency.getInstance(currencyPairStringSplit[0].toUpperCase()), Currency.getInstance(currencyPairStringSplit[1].toUpperCase())); adaptedTickers.put(currencyPair, GateioAdapters.adaptTicker(currencyPair, gateioTicker)); }); @@ -53,7 +53,7 @@ public Map getGateioDepths() throws IOException { Map adaptedDepths = new HashMap<>(depths.size()); depths.forEach((currencyPairString, gateioDepth) -> { String[] currencyPairStringSplit = currencyPairString.split("_"); - CurrencyPair currencyPair = new CurrencyPair(new Currency(currencyPairStringSplit[0].toUpperCase()), new Currency(currencyPairStringSplit[1].toUpperCase())); + CurrencyPair currencyPair = new CurrencyPair(Currency.getInstance(currencyPairStringSplit[0].toUpperCase()), Currency.getInstance(currencyPairStringSplit[1].toUpperCase())); adaptedDepths.put(currencyPair, gateioDepth); }); return adaptedDepths; diff --git a/xchange-gateio/src/test/java/org/knowm/xchange/gateio/GateioAdapterTest.java b/xchange-gateio/src/test/java/org/knowm/xchange/gateio/GateioAdapterTest.java index 60a53daa2..f54c29519 100644 --- a/xchange-gateio/src/test/java/org/knowm/xchange/gateio/GateioAdapterTest.java +++ b/xchange-gateio/src/test/java/org/knowm/xchange/gateio/GateioAdapterTest.java @@ -111,9 +111,9 @@ public void testAdaptAccountInfo() throws IOException { assertThat(wallet.getBalance(Currency.BTC).getFrozen()).isEqualTo(new BigDecimal("0.0002")); assertThat(wallet.getBalance(Currency.LTC).getAvailable()).isEqualTo(new BigDecimal("94.364")); assertThat(wallet.getBalance(Currency.LTC).getFrozen()).isEqualTo(BigDecimal.ZERO); - assertThat(wallet.getBalance(new Currency("YAC")).getFrozen()).isEqualTo(new BigDecimal("10.01")); - assertThat(wallet.getBalance(new Currency("YAC")).getTotal()).isEqualTo(new BigDecimal("10.01")); - assertThat(wallet.getBalance(new Currency("YAC")).getAvailable()).isEqualTo(BigDecimal.ZERO); + assertThat(wallet.getBalance(Currency.getInstance("YAC")).getFrozen()).isEqualTo(new BigDecimal("10.01")); + assertThat(wallet.getBalance(Currency.getInstance("YAC")).getTotal()).isEqualTo(new BigDecimal("10.01")); + assertThat(wallet.getBalance(Currency.getInstance("YAC")).getAvailable()).isEqualTo(BigDecimal.ZERO); } @Test diff --git a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountService.java b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountService.java index 602258304..9a102b12e 100644 --- a/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountService.java +++ b/xchange-gdax/src/main/java/org/knowm/xchange/gdax/service/GDAXAccountService.java @@ -82,7 +82,7 @@ public String requestDepositAddress(Currency currency, String... args) throws IO GDAXCoinbaseAccount depositAccount = null; for (GDAXCoinbaseAccount account : coinbaseAccounts) { - Currency accountCurrency = new Currency(account.getCurrency()); + Currency accountCurrency = Currency.getInstance(account.getCurrency()); if (account.isActive() && account.getType().equals("wallet") && accountCurrency.equals(currency)) { depositAccount = account; break; diff --git a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java index c1d2d6fbe..98b8532aa 100644 --- a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java +++ b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java @@ -207,7 +207,7 @@ public static UserTrades adaptTradeHistory(ItBitTradeHistory history) { CurrencyPair currencyPair = new CurrencyPair(instrument.substring(0, 3), instrument.substring(3, 6)); trades.add(new UserTrade(orderType, itBitTrade.getCurrency1Amount(), currencyPair, itBitTrade.getRate(), itBitTrade.getTimestamp(), null, - itBitTrade.getOrderId(), itBitTrade.getCommissionPaid(), new Currency(itBitTrade.getCommissionCurrency()))); + itBitTrade.getOrderId(), itBitTrade.getCommissionPaid(), Currency.getInstance(itBitTrade.getCommissionCurrency()))); } return new UserTrades(trades, TradeSortType.SortByTimestamp); diff --git a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenUtils.java b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenUtils.java index af5653a06..f589ad748 100644 --- a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenUtils.java +++ b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenUtils.java @@ -57,21 +57,21 @@ public static CurrencyPair translateKrakenCurrencyPair(String currencyPairIn) { if (pair == null) { // kraken can give short pairs back from open orders ? if (currencyPairIn.length() == 6) { - Currency base = new Currency(currencyPairIn.substring(0, 3)); + Currency base = Currency.getInstance(currencyPairIn.substring(0, 3)); if (base.getCommonlyUsedCurrency() != null) { base = base.getCommonlyUsedCurrency(); } - Currency counter = new Currency(currencyPairIn.substring(3, 6)); + Currency counter = Currency.getInstance(currencyPairIn.substring(3, 6)); if (counter.getCommonlyUsedCurrency() != null) { counter = counter.getCommonlyUsedCurrency(); } pair = new CurrencyPair(base, counter); } else if (currencyPairIn.length() == 7) { - Currency base = new Currency(currencyPairIn.substring(0, 4)); + Currency base = Currency.getInstance(currencyPairIn.substring(0, 4)); if (base.getCommonlyUsedCurrency() != null) { base = base.getCommonlyUsedCurrency(); } - Currency counter = new Currency(currencyPairIn.substring(4, 7)); + Currency counter = Currency.getInstance(currencyPairIn.substring(4, 7)); if (counter.getCommonlyUsedCurrency() != null) { counter = counter.getCommonlyUsedCurrency(); } diff --git a/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java b/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java index b699b9de4..ea6bd9be9 100644 --- a/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java +++ b/xchange-kucoin/src/main/java/org/knowm/xchange/kucoin/dto/KucoinAdapters.java @@ -125,7 +125,7 @@ private static UserTrade adaptUserTrade(KucoinDealtOrder order) { .type(order.getDirection().getOrderType()) .feeAmount(order.getFee()) .feeCurrency(order.getDirection().equals(KucoinOrderType.BUY) - ? new Currency(order.getCoinType()) : new Currency(order.getCoinTypePair())) + ? Currency.getInstance(order.getCoinType()) : Currency.getInstance(order.getCoinTypePair())) .build(); } @@ -140,7 +140,7 @@ public static ExchangeMetaData adaptExchangeMetadata(List tickers, private static Map adaptCurrencyMap(List coins) { return coins.stream().collect(Collectors.toMap( - c -> new Currency(c.getCoin()), + c -> Currency.getInstance(c.getCoin()), c -> adaptCurrencyMetadata(c))); } @@ -178,7 +178,7 @@ private static Balance adaptBalance(KucoinCoinBalance balance) { BigDecimal avail = balance.getBalance(); BigDecimal freezeBalance = balance.getFreezeBalance(); BigDecimal total = BigDecimal.ZERO.add(avail).add(freezeBalance); - return new Balance(new Currency(balance.getCoinType()), total, avail, freezeBalance); + return new Balance(Currency.getInstance(balance.getCoinType()), total, avail, freezeBalance); } public static List adaptFundingHistory(List records) { @@ -191,7 +191,7 @@ private static FundingRecord adaptFundingRecord(KucoinWalletRecord record) { return new FundingRecord.Builder() .setAmount(record.getAmount()) .setAddress(record.getAddress()) - .setCurrency(new Currency(record.getCoinType())) + .setCurrency(Currency.getInstance(record.getCoinType())) .setDate(new Date(record.getCreatedAt())) .setFee(record.getFee()) .setStatus(record.getStatus().getFundingRecordStatus()) diff --git a/xchange-poloniex/src/main/java/org/knowm/xchange/poloniex/PoloniexAdapters.java b/xchange-poloniex/src/main/java/org/knowm/xchange/poloniex/PoloniexAdapters.java index 37398a8ff..23329eeb6 100644 --- a/xchange-poloniex/src/main/java/org/knowm/xchange/poloniex/PoloniexAdapters.java +++ b/xchange-poloniex/src/main/java/org/knowm/xchange/poloniex/PoloniexAdapters.java @@ -228,7 +228,7 @@ public static ExchangeMetaData adaptToExchangeMetaData(Map adaptFundingRecords(PoloniexDepositsWithdrawalsResponse poloFundings) { final ArrayList fundingRecords = new ArrayList<>(); for (PoloniexDeposit d : poloFundings.getDeposits()) { - fundingRecords.add(new FundingRecord(d.getAddress(), d.getTimestamp(), new Currency(d.getCurrency()), + fundingRecords.add(new FundingRecord(d.getAddress(), d.getTimestamp(), Currency.getInstance(d.getCurrency()), d.getAmount(), null, d.getTxid(), DEPOSIT, FundingRecord.Status.resolveStatus(d.getStatus()), null, null, d.getStatus())); } for (PoloniexWithdrawal w : poloFundings.getWithdrawals()) { @@ -236,7 +236,7 @@ public static List adaptFundingRecords(PoloniexDepositsWithdrawal final String statusStr = statusParts[0]; final FundingRecord.Status status = FundingRecord.Status.resolveStatus(statusStr); final String externalId = statusParts.length == 1 ? null : statusParts[1]; - fundingRecords.add(new FundingRecord(w.getAddress(), w.getTimestamp(), new Currency(w.getCurrency()), + fundingRecords.add(new FundingRecord(w.getAddress(), w.getTimestamp(), Currency.getInstance(w.getCurrency()), w.getAmount(), String.valueOf(w.getWithdrawalNumber()), externalId, WITHDRAWAL, status, null, null, w.getStatus())); } return fundingRecords; diff --git a/xchange-therock/src/main/java/org/knowm/xchange/therock/TheRockAdapters.java b/xchange-therock/src/main/java/org/knowm/xchange/therock/TheRockAdapters.java index 077d133e0..f929ab5fd 100644 --- a/xchange-therock/src/main/java/org/knowm/xchange/therock/TheRockAdapters.java +++ b/xchange-therock/src/main/java/org/knowm/xchange/therock/TheRockAdapters.java @@ -97,7 +97,7 @@ public static UserTrade adaptUserTrade(TheRockUserTrade trade, CurrencyPair curr //return new UserTrade(trade.getSide() == Side.sell ? OrderType.ASK : BID, trade.getAmount(), currencyPair, trade.getPrice(), trade.getDate(), tradeId); return new UserTrade.Builder().id(tradeId).originalAmount(trade.getAmount()).currencyPair(currencyPair).price(trade.getPrice()) .timestamp(trade.getDate()).orderId(String.valueOf(trade.getOrderId())).type(trade.getSide() == Side.buy ? OrderType.BID : OrderType.ASK) - .feeAmount(trade.getFeeAmount()).feeCurrency(trade.getFeeCurrency() == null ? null : new Currency(trade.getFeeCurrency())).build(); + .feeAmount(trade.getFeeAmount()).feeCurrency(trade.getFeeCurrency() == null ? null : Currency.getInstance(trade.getFeeCurrency())).build(); } public static UserTrades adaptUserTrades(TheRockUserTrades trades, CurrencyPair currencyPair) throws com.fasterxml.jackson.databind.exc.InvalidFormatException { diff --git a/xchange-vaultoro/src/main/java/org/knowm/xchange/vaultoro/VaultoroAdapters.java b/xchange-vaultoro/src/main/java/org/knowm/xchange/vaultoro/VaultoroAdapters.java index d4a87864e..c8b9c974c 100644 --- a/xchange-vaultoro/src/main/java/org/knowm/xchange/vaultoro/VaultoroAdapters.java +++ b/xchange-vaultoro/src/main/java/org/knowm/xchange/vaultoro/VaultoroAdapters.java @@ -82,7 +82,7 @@ public static AccountInfo adaptVaultoroBalances(List vaultoroBa public static Balance adaptVaultoroBalance(VaultoroBalance vaultoroBalance) { - return new Balance(new Currency(vaultoroBalance.getCurrencyCode()), vaultoroBalance.getCash()); + return new Balance(Currency.getInstance(vaultoroBalance.getCurrencyCode()), vaultoroBalance.getCash()); } public static OpenOrders adaptVaultoroOpenOrders(Map> orders) { From d366a008c38aa7751599a280aef16ffb3f3c1e99 Mon Sep 17 00:00:00 2001 From: Rafal Krupinski Date: Thu, 15 Feb 2018 18:30:02 +0000 Subject: [PATCH 083/117] [core] Do not initialize Order fields in constructor --- .../src/main/java/org/knowm/xchange/dto/Order.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java b/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java index 98f33f6c0..0c73ab234 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java +++ b/xchange-core/src/main/java/org/knowm/xchange/dto/Order.java @@ -157,15 +157,7 @@ public interface IOrderFlags { * @param timestamp the absolute time for this order according to the exchange's server, null if not provided */ public Order(OrderType type, BigDecimal originalAmount, CurrencyPair currencyPair, String id, Date timestamp) { - - this.type = type; - this.originalAmount = originalAmount; - this.currencyPair = currencyPair; - this.id = id; - this.timestamp = timestamp; - this.averagePrice = BigDecimal.ZERO; - this.status = OrderStatus.PENDING_NEW; - this.cumulativeAmount = BigDecimal.ZERO; + this(type, originalAmount, currencyPair, id, timestamp, null, null, null, null); } /** From 77c6c73a99d3228f965227aed705985726c31dcb Mon Sep 17 00:00:00 2001 From: Rafal Krupinski Date: Thu, 15 Feb 2018 18:36:37 +0000 Subject: [PATCH 084/117] Move settings.xml for travis-ci to the main branch --- .travis.yml | 5 ++--- settings.xml => etc/settings.xml | 0 2 files changed, 2 insertions(+), 3 deletions(-) rename settings.xml => etc/settings.xml (100%) diff --git a/.travis.yml b/.travis.yml index afd0e74d8..9388c95e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,13 @@ language: java sudo: false -before_install: "git clone -b travis `git config --get remote.origin.url` target/travis" install: true script: " if [ ${TRAVIS_PULL_REQUEST} = 'false' ]; then - mvn clean deploy --batch-mode --settings target/travis/settings.xml; + mvn clean deploy --batch-mode --settings etc/settings.xml; else - mvn clean verify --batch-mode --settings target/travis/settings.xml; + mvn clean verify --batch-mode --settings etc/settings.xml; fi" jdk: diff --git a/settings.xml b/etc/settings.xml similarity index 100% rename from settings.xml rename to etc/settings.xml From c4973a3d6c18612be2140b03cc7c3526ac2b1855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herman=20Ofenb=C3=B6ck?= Date: Thu, 15 Feb 2018 20:09:55 +0100 Subject: [PATCH 085/117] [bitfinex] Adding withdrawal types missing from current API documentation. --- .../xchange/bitfinex/v1/BitfinexUtils.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java index 3b2048345..6cc43e128 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java @@ -29,7 +29,8 @@ public static String toPairString(CurrencyPair currencyPair) { } /** - * can be one of the following ['bitcoin', 'litecoin', 'ethereum', 'ethereumc', 'mastercoin', 'zcash', 'monero', 'wire', 'dash'] + * From the reference documentation for field withdraw_type (2018-02-14); + * can be one of the following ['bitcoin', 'litecoin', 'ethereum', 'ethereumc', 'mastercoin', 'zcash', 'monero', 'wire', 'dash', 'ripple', 'eos', 'neo', 'aventus', 'qtum', 'eidoo'] * * @param currency * @return @@ -52,8 +53,18 @@ public static String convertToBitfinexWithdrawalType(String currency) { return "mastercoin"; case "DASH": return "dash"; - case "TETHER": - return "tether"; + case "XRP": + return "ripple"; + case "EOS": + return "eos"; + case "NEO": + return "neo"; + case "AVT": + return "aventus"; + case "QTUM": + return "qtum"; + case "EDO": + return "eidoo"; default: throw new BitfinexException("Cannot determine withdrawal type."); } From d64fb924bcc1199aede116f2defad00e33cab309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herman=20Ofenb=C3=B6ck?= Date: Fri, 16 Feb 2018 09:44:45 +0100 Subject: [PATCH 086/117] [cord] Adding missing currency used in bitfinex withdrawals. --- .../src/main/java/org/knowm/xchange/currency/Currency.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xchange-core/src/main/java/org/knowm/xchange/currency/Currency.java b/xchange-core/src/main/java/org/knowm/xchange/currency/Currency.java index ce5ae2817..ff63190e4 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/currency/Currency.java +++ b/xchange-core/src/main/java/org/knowm/xchange/currency/Currency.java @@ -34,6 +34,7 @@ public class Currency implements Comparable, Serializable { public static final Currency ARS = createCurrency("ARS", "Argentine Peso", null); public static final Currency AUD = createCurrency("AUD", "Australian Dollar", null); public static final Currency AUR = createCurrency("AUR", "Auroracoin", null); + public static final Currency AVT = createCurrency("AVT", "Aventus", null); public static final Currency AWG = createCurrency("AWG", "Aruban Florin", null); public static final Currency AZN = createCurrency("AZN", "Azerbaijani Manat", null); public static final Currency BAM = createCurrency("BAM", "Bosnia-Herzegovina Convertible Mark", null); @@ -85,6 +86,7 @@ public class Currency implements Comparable, Serializable { public static final Currency DVC = createCurrency("DVC", "Devcoin", null); public static final Currency DRK = createCurrency("DRK", "Darkcoin", null); public static final Currency DZD = createCurrency("DZD", "Algerian Dinar", null); + public static final Currency EDO = createCurrency("EDO", "Eidoo", null); public static final Currency EEK = createCurrency("EEK", "Estonian Kroon", null); public static final Currency EGD = createCurrency("EGD", "egoldcoin", null); public static final Currency EGP = createCurrency("EGP", "Egyptian Pound", null); From 5aa9fd511c42026a137c5ecf29cee2c82aa35463 Mon Sep 17 00:00:00 2001 From: ww3456 Date: Sat, 17 Feb 2018 15:37:25 +0000 Subject: [PATCH 087/117] [OKEX/OkCoin] open order and trade history improvements --- .../knowm/xchange/okcoin/OkCoinAdapters.java | 20 ++--- .../knowm/xchange/okcoin/OkCoinDigest.java | 2 +- .../org/knowm/xchange/okcoin/OkCoinUtils.java | 17 +++- .../okcoin/dto/trade/OkCoinPriceLimit.java | 4 - .../dto/trade/OkCoinPriceLimitResult.java | 16 ---- .../okcoin/service/OkCoinTradeService.java | 78 +++++++++++-------- .../src/main/resources/okcoin_intl.json | 4 + 7 files changed, 72 insertions(+), 69 deletions(-) delete mode 100644 xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimitResult.java diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinAdapters.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinAdapters.java index 7617e060f..521c4d35d 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinAdapters.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinAdapters.java @@ -56,15 +56,6 @@ private OkCoinAdapters() { } - private static BigDecimal getOrZero(String key, Map map) { - - if (map != null && map.containsKey(key)) { - return map.get(key); - } else { - return BigDecimal.ZERO; - } - } - public static String adaptSymbol(CurrencyPair currencyPair) { return currencyPair.base.getCurrencyCode().toLowerCase() + "_" + currencyPair.counter.getCurrencyCode().toLowerCase(); @@ -134,7 +125,7 @@ public static AccountInfo adaptAccountInfo(OkCoinUserInfo userInfo) { builders.put(borrowed.getKey(), builder.borrowed(borrowed.getValue())); } - List wallet = new ArrayList(builders.size()); + List wallet = new ArrayList<>(builders.size()); for (Balance.Builder builder : builders.values()) { wallet.add(builder.build()); @@ -293,9 +284,12 @@ public static OrderStatus adaptOrderStatus(int status) { } private static UserTrade adaptTrade(OkCoinOrder order) { - - return new UserTrade(adaptOrderType(order.getType()), order.getDealAmount(), adaptSymbol(order.getSymbol()), order.getPrice(), - order.getCreateDate(), null, String.valueOf(order.getOrderId()), null, (Currency) null); + + // Order fill status is being adapted to a trade, there is no dedicated tradeId, so user orderId instead. + String tradeId, orderId; + tradeId = orderId = String.valueOf(order.getOrderId()); + return new UserTrade(adaptOrderType(order.getType()), order.getDealAmount(), adaptSymbol(order.getSymbol()), order.getAveragePrice(), + order.getCreateDate(), tradeId, orderId, null, null); } private static UserTrade adaptTradeFutures(OkCoinFuturesOrder order) { diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinDigest.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinDigest.java index 3dcec2e98..1a987f1cd 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinDigest.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinDigest.java @@ -40,7 +40,7 @@ public OkCoinDigest(String apikey, String secretKey) { try { md = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { - throw new RuntimeException("Problem instantiating message digest."); + throw new RuntimeException("Problem instantiating message digest.", e); } } diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinUtils.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinUtils.java index dd55ccb74..028ddfeec 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinUtils.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/OkCoinUtils.java @@ -21,9 +21,22 @@ public static Long toEpoch(Date dateTime, String timeZone) { } public static String getErrorMessage(int errorCode) { - + // https://www.okex.com/rest_request.html switch (errorCode) { - + case (1002): + return "The transaction amount exceed the balance"; + case (1003): + return "The transaction amount is less than the minimum requirement"; + case (1004): + return "The transaction amount is less than 0"; + case (1007): + return "No trading market information"; + case (1008): + return "No latest market information"; + case (1009): + return "No order"; + case (1010): + return "Different user of the cancelled order and the original order"; case (10000): return "Required field can not be null"; case (10001): diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimit.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimit.java index e3e5de6f1..6bf51e610 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimit.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimit.java @@ -1,7 +1,6 @@ package org.knowm.xchange.okcoin.dto.trade; import java.math.BigDecimal; -import java.util.Date; import com.fasterxml.jackson.annotation.JsonProperty; @@ -24,8 +23,6 @@ public OkCoinPriceLimit(@JsonProperty("high") final BigDecimal high,@JsonPropert } - - public BigDecimal getHigh() { return high; @@ -36,7 +33,6 @@ public BigDecimal getLow() { return low; } - @Override public String toString() { diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimitResult.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimitResult.java deleted file mode 100644 index 8258e2d10..000000000 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/dto/trade/OkCoinPriceLimitResult.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.knowm.xchange.okcoin.dto.trade; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OkCoinPriceLimitResult extends OkCoinErrorResult { - - private final OkCoinPriceLimit priceLimit; - - public OkCoinPriceLimitResult(@JsonProperty("result") final boolean result, @JsonProperty("error_code") final int errorCode, - @JsonProperty("priceLimit") final OkCoinPriceLimit priceLimit) { - - super(result, errorCode); - this.priceLimit = priceLimit; - } - -} diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java index 89f17b10b..d72f53989 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeService.java @@ -24,15 +24,15 @@ import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrencyPair; import org.knowm.xchange.service.trade.params.TradeHistoryParamPaging; import org.knowm.xchange.service.trade.params.TradeHistoryParams; +import org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair; +import org.knowm.xchange.service.trade.params.orders.OpenOrdersParamCurrencyPair; import org.knowm.xchange.service.trade.params.orders.OpenOrdersParams; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class OkCoinTradeService extends OkCoinTradeServiceRaw implements TradeService { - private static final OpenOrders noOpenOrders = new OpenOrders(Collections.emptyList()); + private static final String ORDER_STATUS_FILLED = "1"; - private final Logger log = LoggerFactory.getLogger(OkCoinTradeService.class); + private static final OpenOrders NO_OPEN_ORDERS = new OpenOrders(Collections. emptyList()); /** * Constructor @@ -50,26 +50,30 @@ public OpenOrders getOpenOrders() throws IOException { } @Override - public OpenOrders getOpenOrders( - OpenOrdersParams params) throws IOException { - // TODO use params to specify currency pair - List exchangeSymbols = exchange.getExchangeSymbols(); - - List orderResults = new ArrayList<>(exchangeSymbols.size()); + public OpenOrders getOpenOrders(OpenOrdersParams params) throws IOException { + List orderResults = new ArrayList<>(); - for (int i = 0; i < exchangeSymbols.size(); i++) { - CurrencyPair symbol = exchangeSymbols.get(i); - log.debug("Getting order: {}", symbol); + if (params instanceof OpenOrdersParamCurrencyPair) { + CurrencyPair symbol = ((OpenOrdersParamCurrencyPair) params).getCurrencyPair(); OkCoinOrderResult orderResult = getOrder(-1, OkCoinAdapters.adaptSymbol(symbol)); if (orderResult.getOrders().length > 0) { orderResults.add(orderResult); } + + } else { + List exchangeSymbols = exchange.getExchangeSymbols(); + for (int i = 0; i < exchangeSymbols.size(); i++) { + CurrencyPair symbol = exchangeSymbols.get(i); + OkCoinOrderResult orderResult = getOrder(-1, OkCoinAdapters.adaptSymbol(symbol)); + if (orderResult.getOrders().length > 0) { + orderResults.add(orderResult); + } + } } if (orderResults.size() <= 0) { - return noOpenOrders; + return NO_OPEN_ORDERS; } - return OkCoinAdapters.adaptOpenOrders(orderResults); } @@ -143,32 +147,41 @@ public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { } /** - * Required parameters {@link TradeHistoryParamPaging} Supported parameters {@link TradeHistoryParamCurrencyPair} + * OKEX does not support trade history in the usual way, it only provides a aggregated view on a per order basis of how much the order has been + * filled and the average price. Individual trade details are not available. As a consequence of this, the trades supplied by this method will use + * the order ID as their trade ID, and will be subject to being amended if a partially filled order if further filled. + *

+ * Supported parameters are {@link TradeHistoryParamCurrencyPair} and {@link TradeHistoryParamPaging}, if not supplied then the query will default to + * BTC/USD or BTC/CNY (depending on session configuration) and the last 200 trades. */ @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { + Integer pageLength = null, pageNumber = null; + if (params instanceof TradeHistoryParamPaging) { + TradeHistoryParamPaging paging = (TradeHistoryParamPaging) params; + pageLength = paging.getPageLength(); + pageNumber = paging.getPageNumber(); + } + if (pageNumber == null) { + pageNumber = 1; // pages start from 1 + } + if (pageLength == null) { + pageLength = 200; // 200 is the maximum number + } - TradeHistoryParamPaging paging = (TradeHistoryParamPaging) params; - Integer pageLength = paging.getPageLength(); - Integer pageNumber = paging.getPageNumber(); - - // pages supposedly start from 1 - ++pageNumber; - - CurrencyPair pair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair(); + CurrencyPair pair = null; + if(params instanceof TradeHistoryParamCurrencyPair) { + pair = ((TradeHistoryParamCurrencyPair) params).getCurrencyPair(); + } if (pair == null) { pair = useIntl ? CurrencyPair.BTC_USD : CurrencyPair.BTC_CNY; } - OkCoinOrderResult orderHistory = getOrderHistory(OkCoinAdapters.adaptSymbol(pair), "1", toString(pageNumber), toString(pageLength)); + OkCoinOrderResult orderHistory = getOrderHistory(OkCoinAdapters.adaptSymbol(pair), ORDER_STATUS_FILLED, pageNumber.toString(), + pageLength.toString()); return OkCoinAdapters.adaptTrades(orderHistory); } - private static String toString(Object o) { - - return o == null ? null : o.toString(); - } - @Override public TradeHistoryParams createTradeHistoryParams() { @@ -177,7 +190,7 @@ public TradeHistoryParams createTradeHistoryParams() { @Override public OpenOrdersParams createOpenOrdersParams() { - return null; + return new DefaultOpenOrdersParamCurrencyPair(); } public static class OkCoinTradeHistoryParams extends DefaultTradeHistoryParamPaging implements TradeHistoryParamCurrencyPair { @@ -207,8 +220,7 @@ public CurrencyPair getCurrencyPair() { } @Override - public Collection getOrder( - String... orderIds) throws IOException { + public Collection getOrder(String... orderIds) throws IOException { throw new NotYetImplementedForExchangeException(); } diff --git a/xchange-okcoin/src/main/resources/okcoin_intl.json b/xchange-okcoin/src/main/resources/okcoin_intl.json index 7abadf066..2b7b1bbb9 100644 --- a/xchange-okcoin/src/main/resources/okcoin_intl.json +++ b/xchange-okcoin/src/main/resources/okcoin_intl.json @@ -11,6 +11,10 @@ "ETH/USD": { "min_amount": 0.01, "price_scale": 2 + }, + "ETH/BTC": { + "min_amount": 0.01, + "price_scale": 8 } }, "currencies": {}, From 6d6a7f47e531fca20758c04166e2b97e0a84e1cc Mon Sep 17 00:00:00 2001 From: bharris Date: Sat, 17 Feb 2018 08:19:01 -0800 Subject: [PATCH 088/117] [core] Adding an exception to indicate that a given CurrencyPair is not valid. --- .../CurrencyPairNotValidException.java | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 xchange-core/src/main/java/org/knowm/xchange/exceptions/CurrencyPairNotValidException.java diff --git a/xchange-core/src/main/java/org/knowm/xchange/exceptions/CurrencyPairNotValidException.java b/xchange-core/src/main/java/org/knowm/xchange/exceptions/CurrencyPairNotValidException.java new file mode 100644 index 000000000..2faa83329 --- /dev/null +++ b/xchange-core/src/main/java/org/knowm/xchange/exceptions/CurrencyPairNotValidException.java @@ -0,0 +1,51 @@ +package org.knowm.xchange.exceptions; + +import org.knowm.xchange.currency.CurrencyPair; + +/** + * Exception indicating that a request was made with a {@link CurrencyPair} + * that is not supported on this exchange. + * @author bryant_harris + */ +public class CurrencyPairNotValidException extends ExchangeException { + private CurrencyPair currencyPair; + + public CurrencyPairNotValidException(String message, Throwable cause, CurrencyPair currencyPair) { + super(message, cause); + this.currencyPair = currencyPair; + } + + public CurrencyPairNotValidException(String message, Throwable cause) { + super(message, cause); + } + + public CurrencyPairNotValidException(String message) { + super(message); + } + + public CurrencyPairNotValidException(String message, CurrencyPair currencyPair) { + super(message); + this.currencyPair = currencyPair; + } + + public CurrencyPairNotValidException(Throwable cause) { + super(cause); + } + + public CurrencyPairNotValidException(Throwable cause, CurrencyPair currencyPair) { + super(currencyPair + " Is not valid for this exchange", cause); + this.currencyPair = currencyPair; + } + + public CurrencyPairNotValidException(CurrencyPair currencyPair) { + this(currencyPair + " Is not valid for this exchange"); + this.currencyPair = currencyPair; + } + + /** + * @return The currency pair that caused the exception. + */ + public CurrencyPair getCurrencyPair() { + return currencyPair; + } +} From 08be555a5f53278581a0a9fa70716ea7c9a5fcf2 Mon Sep 17 00:00:00 2001 From: bharris Date: Mon, 19 Feb 2018 11:28:04 -0800 Subject: [PATCH 089/117] [examples] Adding abucoins to samples project. --- xchange-examples/pom.xml | 6 ++ .../examples/abucoins/AbucoinsDemoUtils.java | 24 +++++++ .../abucoins/account/AccountInfoDemo.java | 31 ++++++++ .../abucoins/marketdata/DepthDemo.java | 36 ++++++++++ .../abucoins/marketdata/TickerDemo.java | 39 ++++++++++ .../abucoins/marketdata/TradesDemo.java | 32 +++++++++ .../examples/abucoins/trade/TradeDemo.java | 72 +++++++++++++++++++ 7 files changed, 240 insertions(+) create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/AbucoinsDemoUtils.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/account/AccountInfoDemo.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/DepthDemo.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TickerDemo.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TradesDemo.java create mode 100644 xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/trade/TradeDemo.java diff --git a/xchange-examples/pom.xml b/xchange-examples/pom.xml index b5379d481..9768e8629 100755 --- a/xchange-examples/pom.xml +++ b/xchange-examples/pom.xml @@ -331,6 +331,12 @@ ${project.groupId} xchange-dsx ${project.version} + + + + ${project.groupId} + xchange-abucoins + ${project.version} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/AbucoinsDemoUtils.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/AbucoinsDemoUtils.java new file mode 100644 index 000000000..5367b5c2d --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/AbucoinsDemoUtils.java @@ -0,0 +1,24 @@ +package org.knowm.xchange.examples.abucoins; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.abucoins.AbucoinsExchange; + +/** + * Author: bryant_harris + */ + +public class AbucoinsDemoUtils { + + public static Exchange createExchange() { + + ExchangeSpecification exSpec = new ExchangeSpecification(AbucoinsExchange.class); + exSpec.setSecretKey(""); + exSpec.setApiKey(""); + exSpec.setPassword(""); + + return ExchangeFactory.INSTANCE.createExchange(exSpec); + } + +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/account/AccountInfoDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/account/AccountInfoDemo.java new file mode 100644 index 000000000..71b4b0a77 --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/account/AccountInfoDemo.java @@ -0,0 +1,31 @@ +package org.knowm.xchange.examples.abucoins.account; + +import java.io.IOException; +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.dto.account.AccountInfo; +import org.knowm.xchange.dto.account.FundingRecord; +import org.knowm.xchange.examples.abucoins.AbucoinsDemoUtils; +import org.knowm.xchange.service.account.AccountService; + +/** + * Author: bryant_harris + */ + +public class AccountInfoDemo { + + public static void main(String[] args) throws IOException { + + Exchange exchange = AbucoinsDemoUtils.createExchange(); + AccountService accountService = exchange.getAccountService(); + + // Get the account information + AccountInfo accountInfo = accountService.getAccountInfo(); + System.out.println("AccountInfo as String: " + accountInfo.toString()); + + List funding = accountService.getFundingHistory(accountService.createFundingHistoryParams()); + System.out.println("Funding " + funding); + } + +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/DepthDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/DepthDemo.java new file mode 100644 index 000000000..0395801cf --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/DepthDemo.java @@ -0,0 +1,36 @@ +package org.knowm.xchange.examples.abucoins.marketdata; + +import java.io.IOException; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.abucoins.AbucoinsExchange; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; +import org.knowm.xchange.service.marketdata.MarketDataService; + +/** + * Author: bryant_harris + */ + +public class DepthDemo { + + public static void main(String[] args) throws IOException { + + // Use the factory to get Cex.IO exchange API using default settings + Exchange exchange = ExchangeFactory.INSTANCE.createExchange(AbucoinsExchange.class.getName()); + + // Interested in the public market data feed (no authentication) + MarketDataService marketDataService = exchange.getMarketDataService(); + + // Get the latest order book data for GHs/BTC + OrderBook orderBook = marketDataService.getOrderBook(CurrencyPair.BTC_USD); + + System.out.println("Current Order Book size for BTC/USD: " + (orderBook.getAsks().size() + orderBook.getBids().size())); + System.out.println("First Ask: " + orderBook.getAsks().get(0).toString()); + System.out.println("First Bid: " + orderBook.getBids().get(0).toString()); + System.out.println("Timestamp: " + orderBook.getTimeStamp().toString()); + // System.out.println(orderBook.toString()); + } + +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TickerDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TickerDemo.java new file mode 100644 index 000000000..66ddad48e --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TickerDemo.java @@ -0,0 +1,39 @@ +package org.knowm.xchange.examples.abucoins.marketdata; + +import java.io.IOException; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.abucoins.AbucoinsExchange; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.Ticker; +import org.knowm.xchange.service.marketdata.MarketDataService; + +/** + * Author: bryant_harris + */ + +public class TickerDemo { + + public static void main(String[] args) throws IOException { + + // Use the factory to get Cex.IO exchange API using default settings + Exchange exchange = ExchangeFactory.INSTANCE.createExchange(AbucoinsExchange.class.getName()); + + // Interested in the public market data feed (no authentication) + MarketDataService marketDataService = exchange.getMarketDataService(); + + // Get the latest ticker data showing BTC to USD + Ticker ticker = marketDataService.getTicker(CurrencyPair.BTC_USD); + + System.out.println("Pair: " + ticker.getCurrencyPair()); + System.out.println("Last: " + ticker.getLast()); + System.out.println("Volume: " + ticker.getVolume()); + System.out.println("High: " + ticker.getHigh()); + System.out.println("Low: " + ticker.getLow()); + System.out.println("Bid: " + ticker.getBid()); + System.out.println("Ask: " + ticker.getAsk()); + System.out.println("Timestamp: " + ticker.getTimestamp()); + } + +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TradesDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TradesDemo.java new file mode 100644 index 000000000..0cfd925dc --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/marketdata/TradesDemo.java @@ -0,0 +1,32 @@ +package org.knowm.xchange.examples.abucoins.marketdata; + +import java.io.IOException; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.ExchangeFactory; +import org.knowm.xchange.abucoins.AbucoinsExchange; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.Trades; +import org.knowm.xchange.service.marketdata.MarketDataService; + +/** + * Author: bryant_harris + */ + +public class TradesDemo { + + public static void main(String[] args) throws IOException { + + // Use the factory to get Cex.IO exchange API using default settings + Exchange exchange = ExchangeFactory.INSTANCE.createExchange(AbucoinsExchange.class.getName()); + + // Interested in the public market data feed (no authentication) + MarketDataService marketDataService = exchange.getMarketDataService(); + + // Get the latest trade data + Trades trades = marketDataService.getTrades(CurrencyPair.BTC_USD); + System.out.println("Trades Size= " + trades.getTrades().size()); + System.out.println(trades.toString()); + } + +} diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/trade/TradeDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/trade/TradeDemo.java new file mode 100644 index 000000000..163b174cf --- /dev/null +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/abucoins/trade/TradeDemo.java @@ -0,0 +1,72 @@ +package org.knowm.xchange.examples.abucoins.trade; + +import java.io.IOException; +import java.math.BigDecimal; +import java.util.List; + +import org.knowm.xchange.Exchange; +import org.knowm.xchange.cexio.dto.trade.CexIOOrder; +import org.knowm.xchange.cexio.service.CexIOTradeServiceRaw; +import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.Order; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.examples.abucoins.AbucoinsDemoUtils; +import org.knowm.xchange.exceptions.ExchangeException; +import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; +import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; +import org.knowm.xchange.service.trade.TradeService; + +/** + * Author: bryant_harris + */ + +public class TradeDemo { + + public static void main(String[] args) throws IOException { + + Exchange exchange = AbucoinsDemoUtils.createExchange(); + TradeService tradeService = exchange.getTradeService(); + + generic(tradeService); + raw((CexIOTradeServiceRaw) tradeService); + + } + + private static void generic( + TradeService tradeService) throws NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException { + + printOpenOrders(tradeService); + + // place a limit buy order + LimitOrder limitOrder = new LimitOrder(Order.OrderType.BID, BigDecimal.ONE, CurrencyPair.BTC_USD, "", null, + new BigDecimal("100")); + System.out.println("Trying to place: " + limitOrder); + String orderId = "0"; + try { + orderId = tradeService.placeLimitOrder(limitOrder); + System.out.println("New Limit Order ID: " + orderId); + } catch (ExchangeException e) { + System.out.println(e); + } + printOpenOrders(tradeService); + + // Cancel the added order + boolean cancelResult = tradeService.cancelOrder(orderId); + System.out.println("Canceling order id=" + orderId + " returned " + cancelResult); + + printOpenOrders(tradeService); + } + + private static void raw(CexIOTradeServiceRaw tradeService) throws IOException { + + List openOrders = tradeService.getCexIOOpenOrders(new CurrencyPair("NMC", "BTC")); + System.out.println(openOrders); + } + + private static void printOpenOrders(TradeService tradeService) throws IOException { + + OpenOrders openOrders = tradeService.getOpenOrders(); + System.out.println(openOrders.toString()); + } +} From e039cfcfe673cea38972ad74c8c782511a164b2d Mon Sep 17 00:00:00 2001 From: bharris Date: Mon, 19 Feb 2018 11:44:57 -0800 Subject: [PATCH 090/117] [abucoins] API was updated on abucoins, adding new methods Also replacing deprecated calls with current naming convetion. Also, ran into a situation where a value that was modeled as an enum was returned with a new value that I hadn't seen in the documentation. This causes the mapping to fail during the json marshalling. To improve the failure behavior in this case, I internally switched the field to be a String so that json parsing would succeed. I do however continue to use the enum at the Pojo API level, it just treats strings it doesn't recognized as 'unknown'. This seems like more desirable behavior as the API continues to work, it may just be that your status isn't mapped to a known value. If you aren't using the status, has no impact, if you need the status, then there's a raw method for obtaining the string value. It made debugging much easier. --- .../xchange/abucoins/AbucoinsAdapters.java | 67 +++++++++- .../abucoins/AbucoinsAuthenticated.java | 23 ++-- .../dto/account/AbucoinsDepositHistory.java | 54 ++++++++ .../dto/account/AbucoinsDepositsHistory.java | 51 +++++++ .../abucoins/dto/account/AbucoinsHistory.java | 125 ++++++++++++++++++ .../account/AbucoinsWithdrawalHistory.java | 54 ++++++++ .../account/AbucoinsWithdrawalsHistory.java | 51 +++++++ .../abucoins/dto/trade/AbucoinsOrder.java | 61 +++++++-- .../service/AbucoinsAccountService.java | 37 ++++-- .../service/AbucoinsAccountServiceRaw.java | 62 +++++++-- .../service/AbucoinsTradeHistoryParams.java | 13 ++ 11 files changed, 558 insertions(+), 40 deletions(-) create mode 100644 xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositHistory.java create mode 100644 xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositsHistory.java create mode 100644 xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsHistory.java create mode 100644 xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalHistory.java create mode 100644 xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalsHistory.java create mode 100644 xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeHistoryParams.java diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java index c816b1d7c..341fbd0fa 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java @@ -4,19 +4,20 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.StringTokenizer; import java.util.TimeZone; import org.knowm.xchange.abucoins.dto.AbucoinsCreateLimitOrderRequest; import org.knowm.xchange.abucoins.dto.AbucoinsCreateMarketOrderRequest; -import org.knowm.xchange.abucoins.dto.AbucoinsCryptoWithdrawalRequest; import org.knowm.xchange.abucoins.dto.account.AbucoinsAccount; +import org.knowm.xchange.abucoins.dto.account.AbucoinsDepositHistory; +import org.knowm.xchange.abucoins.dto.account.AbucoinsDepositsHistory; +import org.knowm.xchange.abucoins.dto.account.AbucoinsHistory; +import org.knowm.xchange.abucoins.dto.account.AbucoinsWithdrawalHistory; +import org.knowm.xchange.abucoins.dto.account.AbucoinsWithdrawalsHistory; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsOrderBook; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsTicker; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsTrade; @@ -28,6 +29,7 @@ import org.knowm.xchange.dto.Order.OrderType; import org.knowm.xchange.dto.account.AccountInfo; import org.knowm.xchange.dto.account.Balance; +import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.dto.account.Wallet; import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; @@ -37,7 +39,6 @@ import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; import org.knowm.xchange.dto.trade.OpenOrders; -import org.knowm.xchange.service.trade.params.DefaultWithdrawFundsParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -337,6 +338,62 @@ public static AbucoinsCreateLimitOrderRequest adaptAbucoinsCreateLimitOrderReque null); } + public static List adaptFundingRecordsFromDepositsHistory(AbucoinsDepositsHistory history) { + List retVal = new ArrayList<>(); + for ( AbucoinsDepositHistory h : history.getHistory() ) + retVal.add( adaptFundingRecord(h)); + return retVal; + } + + public static List adaptFundingRecords(AbucoinsWithdrawalsHistory history) { + List retVal = new ArrayList<>(); + for ( AbucoinsWithdrawalHistory h : history.getHistory() ) + retVal.add( adaptFundingRecord(h)); + return retVal; + } + + public static FundingRecord adaptFundingRecord(AbucoinsDepositHistory history) { + return fundingRecordBuilder(history) + .setExternalId(history.getDepositID()) + .setInternalId(history.getDepositID()) + .setType(FundingRecord.Type.DEPOSIT) + .build(); + } + + public static FundingRecord adaptFundingRecord(AbucoinsWithdrawalHistory history) { + return fundingRecordBuilder(history) + .setExternalId(history.getWithdrawID()) + .setInternalId(history.getWithdrawID()) + .setType(FundingRecord.Type.WITHDRAWAL) + .build(); + } + + static FundingRecord.Builder fundingRecordBuilder(AbucoinsHistory history) { + return new FundingRecord.Builder() + .setDescription(history.getUrl()) + .setAmount(history.getAmount()) + .setCurrency(Currency.getInstance(history.getCurrency())) + .setDate( parseDate(history.getDate())) + .setFee(history.getFee()) + .setStatus(adaptFundingStatus(history.getStatus())); + } + + public static FundingRecord.Status adaptFundingStatus(AbucoinsHistory.Status abucoinsStatus) { + switch ( abucoinsStatus ) { + case unknown: // reminder unknown is our own placeholder for cases where we cannot parse the status + + default: + case awaitingEmailConfirmation: + case pending: + return FundingRecord.Status.PROCESSING; + + case sent: + case complete: + case completed: + return FundingRecord.Status.COMPLETE; + } + } + public static String[] adaptToSetOfIDs(String resp) { return resp.replaceAll("[\\[\\\"\\] ]", "").split(","); } diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAuthenticated.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAuthenticated.java index 050cbbb4c..82e4d2b7a 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAuthenticated.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAuthenticated.java @@ -19,8 +19,10 @@ import org.knowm.xchange.abucoins.dto.account.AbucoinsAccounts; import org.knowm.xchange.abucoins.dto.account.AbucoinsCryptoDeposit; import org.knowm.xchange.abucoins.dto.account.AbucoinsCryptoWithdrawal; +import org.knowm.xchange.abucoins.dto.account.AbucoinsDepositsHistory; import org.knowm.xchange.abucoins.dto.account.AbucoinsFills; import org.knowm.xchange.abucoins.dto.account.AbucoinsPaymentMethods; +import org.knowm.xchange.abucoins.dto.account.AbucoinsWithdrawalsHistory; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsCreateOrderResponse; import org.knowm.xchange.abucoins.dto.trade.AbucoinsOrder; import org.knowm.xchange.abucoins.dto.trade.AbucoinsOrders; @@ -29,7 +31,6 @@ @Path("/") @Produces(MediaType.APPLICATION_JSON) -@Consumes(MediaType.APPLICATION_JSON) public interface AbucoinsAuthenticated extends Abucoins { @GET @Path("accounts") @@ -65,6 +66,7 @@ public interface AbucoinsAuthenticated extends Abucoins { @POST @Path("orders") + @Consumes(MediaType.APPLICATION_JSON) AbucoinsCreateOrderResponse createOrder(@HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp, AbucoinsBaseCreateOrderRequest req) throws IOException; @DELETE @@ -84,18 +86,23 @@ public interface AbucoinsAuthenticated extends Abucoins { @GET @Path("fills") - @Produces(MediaType.APPLICATION_JSON) AbucoinsFills getFills(@HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp) throws IOException; @POST - @Path("withdrawals/crypto") - @Produces(MediaType.APPLICATION_JSON) + @Path("withdrawals/make") @Consumes(MediaType.APPLICATION_JSON) - AbucoinsCryptoWithdrawal cryptoWithdrawal(AbucoinsCryptoWithdrawalRequest cryptoWithdrawalRequest, @HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp) throws IOException; + AbucoinsCryptoWithdrawal withdrawalsMake(AbucoinsCryptoWithdrawalRequest cryptoWithdrawalRequest, @HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp) throws IOException; + + @GET + @Path("withdrawals/history") + AbucoinsWithdrawalsHistory withdrawalsHistory(@HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp) throws IOException; @POST - @Path("deposits/crypto") - @Produces(MediaType.APPLICATION_JSON) + @Path("deposits/make") @Consumes(MediaType.APPLICATION_JSON) - AbucoinsCryptoDeposit cryptoDeposit(AbucoinsCryptoDepositRequest cryptoRequest, @HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp) throws IOException; + AbucoinsCryptoDeposit depositsMake(AbucoinsCryptoDepositRequest cryptoRequest, @HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp) throws IOException; + + @GET + @Path("deposits/history") + AbucoinsDepositsHistory depositsHistory(@HeaderParam("AC-ACCESS-KEY") String accessKey, @HeaderParam("AC-ACCESS-SIGN") ParamsDigest sign, @HeaderParam("AC-ACCESS-PASSPHRASE") String passphrase, @HeaderParam("AC-ACCESS-TIMESTAMP") String timestamp) throws IOException; } diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositHistory.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositHistory.java new file mode 100644 index 000000000..0e8097677 --- /dev/null +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositHistory.java @@ -0,0 +1,54 @@ +package org.knowm.xchange.abucoins.dto.account; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + *

POJO representing the output JSON for the Abucoins + * GET /deposits/history endpoint.

+ * + * Example:

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
FieldDescription
deposit_idDeposit transaction ID
currencyDeposit currency
dateDate of deposit
amountDeposit amount
feeDeposit fee
statusDeposit status
urlblockchain explorer url (null if not available)
+ * @author bryant_harris + * + */ +public class AbucoinsDepositHistory extends AbucoinsHistory { + /** Deposit transaction ID */ + String depositID; + + public AbucoinsDepositHistory(@JsonProperty("deposit_id") String depositID, + @JsonProperty("currency") String currency, + @JsonProperty("date") String date, + @JsonProperty("amount") BigDecimal amount, + @JsonProperty("fee") BigDecimal fee, + @JsonProperty("status") String status, + @JsonProperty("url") String url, + @JsonProperty("message") String message) { + super(currency, date, amount, fee, status, url, message); + this.depositID = depositID; + } + + public String getDepositID() { + return depositID; + } + + @Override + public String toString() { + return "AbucoinsDepositHistory [depositID=" + depositID + ", currency=" + currency + ", date=" + date + ", amount=" + + amount + ", fee=" + fee + ", status=" + status + ", url=" + url + ", message=" + message + "]"; + } +} diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositsHistory.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositsHistory.java new file mode 100644 index 000000000..43e6d69ee --- /dev/null +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsDepositsHistory.java @@ -0,0 +1,51 @@ +package org.knowm.xchange.abucoins.dto.account; + +import org.knowm.xchange.abucoins.service.AbucoinsArrayOrMessageDeserializer; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + *

POJO representing the output JSON for the Abucoins + * GET /deposits/historycrypto endpoint.

+ * + * Example:

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
FieldDescription
deposit_idDeposit transaction ID
currencyDeposit currency
dateDate of deposit
amountDeposit amount
feeDeposit fee
statusDeposit status
urlblockchain explorer url (null if not available)
+ * @author bryant_harris + * + */ +@JsonDeserialize(using = AbucoinsDepositsHistory.AbucoinsDepositsHistoryDeserializer.class) +public class AbucoinsDepositsHistory { + AbucoinsDepositHistory[] history; + + public AbucoinsDepositsHistory(AbucoinsDepositHistory[] history) { + this.history = history; + } + + public AbucoinsDepositHistory[] getHistory() { + return history; + } + + /** + * Deserializer handles the success case (array json) as well as the error case + * (json object with message field). + * @author bryant_harris + */ + static class AbucoinsDepositsHistoryDeserializer extends AbucoinsArrayOrMessageDeserializer { + public AbucoinsDepositsHistoryDeserializer() { + super(AbucoinsDepositHistory.class, AbucoinsDepositsHistory.class); + } + } +} diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsHistory.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsHistory.java new file mode 100644 index 000000000..48e247c3e --- /dev/null +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsHistory.java @@ -0,0 +1,125 @@ +package org.knowm.xchange.abucoins.dto.account; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for the the history related API calls (withdrawals and deposits) + * + * @author bryant_harris + * + */ +public abstract class AbucoinsHistory { + /** Deposit currency */ + String currency; + + /** Date of deposit */ + String date; + + /** Deposit amount */ + BigDecimal amount; + + /** Deposit fee */ + BigDecimal fee; + + // Not directly storing status as a Status enum, doing so introduces + // risk of a parsing error due to a new, unrecognized status. + /** Deposit status */ + String status; + + /** blockchain explorer url (null if not available) */ + String url; + + /** Error codes */ + String message; + + public AbucoinsHistory(@JsonProperty("currency") String currency, + @JsonProperty("date") String date, + @JsonProperty("amount") BigDecimal amount, + @JsonProperty("fee") BigDecimal fee, + @JsonProperty("status") String status, + @JsonProperty("url") String url, + @JsonProperty("message") String message) { + this.currency = currency; + this.date = date; + this.amount = amount; + this.fee = fee; + this.status = status; + this.url = url; + this.message = message; + } + + public String getCurrency() { + return currency; + } + + public String getDate() { + return date; + } + + public BigDecimal getAmount() { + return amount; + } + + public BigDecimal getFee() { + return fee; + } + + public Status getStatus() { + return Status.fromString(status); + } + + /** + * Returns the raw string value of the status, useful if + * it's a newer status type + * @return + */ + public String getStatusRaw() { + return status; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public enum Status { + /** Deposit wait for email confirmation */ + awaitingEmailConfirmation, + + /** Deposit is pending */ + pending, + + /** Deposit is completed (documentation lists complete, api seems to return completed */ + complete, completed, + + /** Deposit was sent */ + sent, + + unknown; // we can't parse it + + public static Status fromString(String s) { + try { + return Status.valueOf(s); + } + catch (Exception e) { + if ( s.equals("awaiting-email-onfirmation")) + return awaitingEmailConfirmation; + } + + return unknown; + } + } +} diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalHistory.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalHistory.java new file mode 100644 index 000000000..b98872043 --- /dev/null +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalHistory.java @@ -0,0 +1,54 @@ +package org.knowm.xchange.abucoins.dto.account; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + *

POJO representing the output JSON for the Abucoins + * GET /withdrawals/history endpoint.

+ * + * Example:

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
FieldDescription
withdraw_idWithdraw transaction ID
currencyWithdraw currency
dateDate of withdraw
amountWithdraw amount
feeWithdraw fee
statusWithdraw status
urlblockchain explorer url (null if not available)
+ * @author bryant_harris + * + */ +public class AbucoinsWithdrawalHistory extends AbucoinsHistory { + /** Deposit transaction ID */ + String withdrawID; + + public AbucoinsWithdrawalHistory(@JsonProperty("withdraw_id") String withdrawID, + @JsonProperty("currency") String currency, + @JsonProperty("date") String date, + @JsonProperty("amount") BigDecimal amount, + @JsonProperty("fee") BigDecimal fee, + @JsonProperty("status") String status, + @JsonProperty("url") String url, + @JsonProperty("message") String message) { + super(currency, date, amount, fee, status, url, message); + this.withdrawID = withdrawID; + } + + public String getWithdrawID() { + return withdrawID; + } + + @Override + public String toString() { + return "AbucoinsDepositHistory [withdrawID=" + withdrawID + ", currency=" + currency + ", date=" + date + ", amount=" + + amount + ", fee=" + fee + ", status=" + status + ", url=" + url + ", message=" + message + "]"; + } +} diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalsHistory.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalsHistory.java new file mode 100644 index 000000000..175475da7 --- /dev/null +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/account/AbucoinsWithdrawalsHistory.java @@ -0,0 +1,51 @@ +package org.knowm.xchange.abucoins.dto.account; + +import org.knowm.xchange.abucoins.service.AbucoinsArrayOrMessageDeserializer; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + *

POJO representing the output JSON for the Abucoins + * GET /withdrawals/history endpoint.

+ * + * Example:

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
FieldDescription
withdraw_idWithdraw transaction ID
currencyWithdraw currency
dateDate of withdraw
amountWithdraw amount
feeWithdraw fee
statusWithdraw status
urlblockchain explorer url (null if not available)
+ * @author bryant_harris + * + */ +@JsonDeserialize(using = AbucoinsWithdrawalsHistory.AbucoinsWithdrawalsHistoryDeserializer.class) +public class AbucoinsWithdrawalsHistory { + AbucoinsWithdrawalHistory[] history; + + public AbucoinsWithdrawalsHistory(AbucoinsWithdrawalHistory[] history) { + this.history = history; + } + + public AbucoinsWithdrawalHistory[] getHistory() { + return history; + } + + /** + * Deserializer handles the success case (array json) as well as the error case + * (json object with message field). + * @author bryant_harris + */ + static class AbucoinsWithdrawalsHistoryDeserializer extends AbucoinsArrayOrMessageDeserializer { + public AbucoinsWithdrawalsHistoryDeserializer() { + super(AbucoinsWithdrawalHistory.class, AbucoinsWithdrawalsHistory.class); + } + } +} diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java index b22c2b0fc..dc687847b 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java @@ -50,11 +50,11 @@ public class AbucoinsOrder { String productID; Side side; Type type; - TimeInForce timeInForce; + String timeInForce; boolean postOnly; String createdAt; BigDecimal filledSize; - Status status; + String status; boolean settled; String message; @@ -64,11 +64,11 @@ public AbucoinsOrder(@JsonProperty("id") String id, @JsonProperty("product_id") String productID, @JsonProperty("side") Side side, @JsonProperty("type") Type type, - @JsonProperty("time_in_force") TimeInForce timeInForce, + @JsonProperty("time_in_force") String timeInForce, @JsonProperty("post_only") boolean postOnly, @JsonProperty("created_at") String createdAt, @JsonProperty("filled_size") BigDecimal filledSize, - @JsonProperty("status") Status status, + @JsonProperty("status") String status, @JsonProperty("settled") boolean settled, @JsonProperty("message") String message) { this.id = id; @@ -109,9 +109,19 @@ public Side getSide() { public Type getType() { return type; } + + /** + * Returns the raw time in force string, we obtain the time in force as a string in case new + * status are added. We don't want the new string causing the json to fail to + * parse. + * @return the raw time in force string + */ + public String getTimeInForceRaw() { + return timeInForce; + } public TimeInForce getTimeInForce() { - return timeInForce; + return TimeInForce.fromString(timeInForce); } public boolean isPostOnly() { @@ -125,9 +135,19 @@ public String getCreatedAt() { public BigDecimal getFilledSize() { return filledSize; } + + /** + * Returns the raw status string, we obtain the status as a string in case new + * status are added. We don't want the new string causing the json to fail to + * parse. + * @return the raw status string + */ + public String getStatusRaw() { + return status; + } public Status getStatus() { - return status; + return Status.fromString(status); } public boolean isSettled() { @@ -155,7 +175,18 @@ public enum Type { } public enum TimeInForce { - GTC, GTT, IOC, FOK; + GTC, GTT, IOC, FOK, + + Unknown; // added by us to avoid a string parsing error occurs. + + public static TimeInForce fromString(String s) { + try { + return TimeInForce.valueOf(s); + } + catch (Exception e) { + return Unknown; + } + } public String toDescription() { switch (this) { @@ -170,12 +201,26 @@ public String toDescription() { case FOK: return "Fill or kill"; + + case Unknown: + return "An unrecognized time in force value was returned"; } return ""; // dead code path } } public enum Status { - pending, open, done, rejected; + pending, open, done, rejected, + + unknown; // added by us to avoid a string parsing error occurs. + + public static Status fromString(String s) { + try { + return Status.valueOf(s); + } + catch (Exception e) { + return unknown; + } + } } } diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java index e0f155804..69642b527 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java @@ -2,6 +2,8 @@ import java.io.IOException; import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.knowm.xchange.Exchange; @@ -11,9 +13,12 @@ import org.knowm.xchange.abucoins.dto.account.AbucoinsAccount; import org.knowm.xchange.abucoins.dto.account.AbucoinsCryptoDeposit; import org.knowm.xchange.abucoins.dto.account.AbucoinsCryptoWithdrawal; +import org.knowm.xchange.abucoins.dto.account.AbucoinsDepositsHistory; +import org.knowm.xchange.abucoins.dto.account.AbucoinsWithdrawalsHistory; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.dto.account.AccountInfo; import org.knowm.xchange.dto.account.FundingRecord; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; @@ -43,9 +48,9 @@ public AccountInfo getAccountInfo() throws IOException { @Override public String requestDepositAddress(Currency currency, String... arguments) throws IOException { String method = abucoinsPaymentMethodForCurrency(currency.getCurrencyCode()); - AbucoinsCryptoDeposit cryptoDeposit = abucoinsCryptoDeposit(new AbucoinsCryptoDepositRequest(currency.getCurrencyCode(), method)); + AbucoinsCryptoDeposit cryptoDeposit = abucoinsDepositMake(new AbucoinsCryptoDepositRequest(currency.getCurrencyCode(), method)); if ( cryptoDeposit.getMessage() != null ) - throw new IOException(cryptoDeposit.getMessage()); + throw new ExchangeException(cryptoDeposit.getMessage()); return cryptoDeposit.getAddress(); } @@ -56,7 +61,7 @@ public String withdrawFunds(WithdrawFundsParams params) throws IOException { DefaultWithdrawFundsParams defParams = (DefaultWithdrawFundsParams) params; String method = abucoinsPaymentMethodForCurrency(defParams.currency.getCurrencyCode()); - AbucoinsCryptoWithdrawal withdrawal = abucoinsWithdraw( new AbucoinsCryptoWithdrawalRequest(defParams.amount, + AbucoinsCryptoWithdrawal withdrawal = abucoinsWithdrawalsMake( new AbucoinsCryptoWithdrawalRequest(defParams.amount, defParams.currency.getCurrencyCode(), method, defParams.address, @@ -67,21 +72,37 @@ public String withdrawFunds(WithdrawFundsParams params) throws IOException { if ( params == null ) throw new IllegalArgumentException("Requires a DefaultWithdrawFundsParams object to describe the withdrawal"); - throw new IOException("Abucoins only understands DefaultWithdrawFundsParams not " + params.getClass().getName()); + throw new IllegalArgumentException("Abucoins only understands DefaultWithdrawFundsParams not " + params.getClass().getName()); } @Override public String withdrawFunds(Currency currency, BigDecimal amount, String address) throws IOException { return withdrawFunds(new DefaultWithdrawFundsParams(address, currency, amount)); } - + @Override public TradeHistoryParams createFundingHistoryParams() { - throw new NotAvailableFromExchangeException(); + return new AbucoinsTradeHistoryParams(); } @Override - public List getFundingHistory(TradeHistoryParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); + public List getFundingHistory(TradeHistoryParams param) throws IOException { + AbucoinsDepositsHistory depositHistory = abucoinsDepositHistory(); + AbucoinsWithdrawalsHistory withdrawHistory = abucoinsWithdrawalsHistory(); + + List retVal = new ArrayList<>(); + List some; + some = AbucoinsAdapters.adaptFundingRecordsFromDepositsHistory(depositHistory); + retVal.addAll(some); + + some = AbucoinsAdapters.adaptFundingRecords(withdrawHistory); + retVal.addAll(some); + + // interleave the records based on time, newest first + Collections.sort(retVal, (FundingRecord r1, FundingRecord r2)-> { + return r2.getDate().compareTo(r1.getDate()); + }); + + return retVal; } } diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountServiceRaw.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountServiceRaw.java index 0acbe33fa..d05b0f5fd 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountServiceRaw.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountServiceRaw.java @@ -9,8 +9,10 @@ import org.knowm.xchange.abucoins.dto.account.AbucoinsAccounts; import org.knowm.xchange.abucoins.dto.account.AbucoinsCryptoDeposit; import org.knowm.xchange.abucoins.dto.account.AbucoinsCryptoWithdrawal; +import org.knowm.xchange.abucoins.dto.account.AbucoinsDepositsHistory; import org.knowm.xchange.abucoins.dto.account.AbucoinsPaymentMethod; import org.knowm.xchange.abucoins.dto.account.AbucoinsPaymentMethods; +import org.knowm.xchange.abucoins.dto.account.AbucoinsWithdrawalsHistory; import org.knowm.xchange.exceptions.ExchangeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -23,8 +25,10 @@ *

  • {@link #getAbucoinsAccounts GET /accounts}
  • *
  • {@link #getAbucoinsAccount(String) GET /accounts/<account-id>}
  • *
  • {@link #getPaymentMethods() GET /payment-methods}
  • - *
  • {@link #abucoinsWithdraw POST withdrawals/crypto}
  • - *
  • {@link #abucoinsCryptoDeposit POST deposits/crypto}
  • + *
  • {@link #abucoinsWithdrawalsMake POST withdrawals/make}
  • + *
  • {@link #abucoinsWithdrawalsHistory POST withdrawals/history}
  • + *
  • {@link #abucoinsDepositMake POST deposits/make}
  • + *
  • {@link #abucoinsDepositHistory POST deposits/history}
  • *
      * @author bryant_harris */ @@ -91,26 +95,62 @@ public AbucoinsPaymentMethod[] getPaymentMethods() throws IOException { * @return * @throws IOException */ - public AbucoinsCryptoWithdrawal abucoinsWithdraw(AbucoinsCryptoWithdrawalRequest withdrawRequest) throws IOException { - return abucoinsAuthenticated.cryptoWithdrawal(withdrawRequest, + public AbucoinsCryptoWithdrawal abucoinsWithdrawalsMake(AbucoinsCryptoWithdrawalRequest withdrawRequest) throws IOException { + return abucoinsAuthenticated.withdrawalsMake(withdrawRequest, exchange.getExchangeSpecification().getApiKey(), signatureCreator, exchange.getExchangeSpecification().getPassword(), timestamp()); } + + /** + * Corresponds to GET withdrawals/history + * @param cryptoRequest + * @return + * @throws IOException + */ + public AbucoinsWithdrawalsHistory abucoinsWithdrawalsHistory() throws IOException { + AbucoinsWithdrawalsHistory history = abucoinsAuthenticated.withdrawalsHistory( + exchange.getExchangeSpecification().getApiKey(), + signatureCreator, + exchange.getExchangeSpecification().getPassword(), + timestamp()); + if ( history.getHistory().length > 0 && history.getHistory()[0].getMessage() != null ) + throw new ExchangeException(history.getHistory()[0].getMessage()); + + return history; + } /** - * Corresponds to POST deposits/crypto + * Corresponds to POST deposits/make + * @param cryptoRequest + * @return + * @throws IOException + */ + public AbucoinsCryptoDeposit abucoinsDepositMake(AbucoinsCryptoDepositRequest cryptoRequest) throws IOException { + return abucoinsAuthenticated.depositsMake(cryptoRequest, + exchange.getExchangeSpecification().getApiKey(), + signatureCreator, + exchange.getExchangeSpecification().getPassword(), + timestamp()); + } + + /** + * Corresponds to GET deposits/history * @param cryptoRequest * @return * @throws IOException */ - public AbucoinsCryptoDeposit abucoinsCryptoDeposit(AbucoinsCryptoDepositRequest cryptoRequest) throws IOException { - return abucoinsAuthenticated.cryptoDeposit(cryptoRequest, - exchange.getExchangeSpecification().getApiKey(), - signatureCreator, - exchange.getExchangeSpecification().getPassword(), - timestamp()); + public AbucoinsDepositsHistory abucoinsDepositHistory() throws IOException { + AbucoinsDepositsHistory history = abucoinsAuthenticated.depositsHistory( + exchange.getExchangeSpecification().getApiKey(), + signatureCreator, + exchange.getExchangeSpecification().getPassword(), + timestamp()); + if ( history.getHistory().length > 0 && history.getHistory()[0].getMessage() != null ) + throw new ExchangeException(history.getHistory()[0].getMessage()); + + return history; } /** diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeHistoryParams.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeHistoryParams.java new file mode 100644 index 000000000..3bb9c4eff --- /dev/null +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeHistoryParams.java @@ -0,0 +1,13 @@ +package org.knowm.xchange.abucoins.service; + +import org.knowm.xchange.service.trade.params.TradeHistoryParams; + +/** + * Trade history parameters (when paging is fleshed out this will have + * fields). + * @author bryant_harris + * + */ +public class AbucoinsTradeHistoryParams implements TradeHistoryParams { + +} From 31900283213eb13267471b3b5cf989a947c0ff10 Mon Sep 17 00:00:00 2001 From: bharris Date: Mon, 19 Feb 2018 11:52:11 -0800 Subject: [PATCH 091/117] [abucoins] Adding 'closed' for status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I haven't seen this in the documentation, but have received it back as part of API responses. Here's what Abucoins told me about the status. "it’s mean that your order can be partially fulfilled but it’s closed" --- .../java/org/knowm/xchange/abucoins/AbucoinsAdapters.java | 5 +++++ .../org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java index 341fbd0fa..45e20760b 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java @@ -298,6 +298,11 @@ public static OrderStatus adaptOrderStatus(AbucoinsOrder.Status status) { case done: return OrderStatus.FILLED; + + case closed: + // from chatting with Abucoins when describing closed + // "it’s mean that your order can be partially fulfilled but it’s closed" + return OrderStatus.PARTIALLY_FILLED; case rejected: return OrderStatus.REJECTED; diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java index dc687847b..8cb2108fc 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/trade/AbucoinsOrder.java @@ -210,7 +210,7 @@ public String toDescription() { } public enum Status { - pending, open, done, rejected, + pending, open, done, closed, rejected, unknown; // added by us to avoid a string parsing error occurs. From 5091f9afb44ce5e115bcc26714b6fdaadf44acdb Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Tue, 20 Feb 2018 00:07:03 +0100 Subject: [PATCH 092/117] [Bibox] retrieve all order books --- .../java/org/knowm/xchange/bibox/Bibox.java | 16 ++++++++++++++ .../xchange/bibox/BiboxAuthenticated.java | 4 ---- .../xchange/bibox/dto/BiboxAdapters.java | 11 ++++++++++ .../xchange/bibox/dto/BiboxCommands.java | 7 +++++++ .../bibox/dto/BiboxMultipleResponses.java | 13 +++++------- .../dto/marketdata/BiboxOrderBookCommand.java | 11 ++++++++++ .../marketdata/BiboxOrderBookCommandBody.java | 21 +++++++++++++++++++ .../bibox/service/BiboxMarketDataService.java | 9 ++++++++ .../service/BiboxMarketDataServiceRaw.java | 19 +++++++++++++++++ .../MarketDataServiceIntegration.java | 12 +++++++++++ 10 files changed, 111 insertions(+), 12 deletions(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommand.java create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommandBody.java diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java index 8b9844333..0833ab812 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java @@ -3,12 +3,15 @@ import java.io.IOException; import java.util.List; +import javax.ws.rs.FormParam; import javax.ws.rs.GET; +import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import org.knowm.xchange.bibox.dto.BiboxMultipleResponses; import org.knowm.xchange.bibox.dto.BiboxResponse; import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; @@ -21,6 +24,10 @@ @Produces(MediaType.APPLICATION_JSON) public interface Bibox { + static final String FORM_CMDS = "cmds"; + static final String FORM_APIKEY = "apikey"; + static final String FORM_SIGNATURE = "sign"; + @GET @Path("mdata") BiboxResponse mdata( @@ -56,4 +63,13 @@ BiboxResponse orderBook( @Path("mdata") BiboxResponse> marketAll(@QueryParam("cmd") String cmd) throws IOException, BiboxException; + + /** + * Retrieve all order books. + * + * @return list of order books + */ + @POST + @Path("mdata") + BiboxMultipleResponses allOrderBooks(@FormParam(FORM_CMDS) String cmds); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index 4df94d366..73872af4f 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -23,10 +23,6 @@ @Produces(MediaType.APPLICATION_JSON) public interface BiboxAuthenticated extends Bibox { - static final String FORM_CMDS = "cmds"; - static final String FORM_APIKEY = "apikey"; - static final String FORM_SIGNATURE = "sign"; - /** * Retrieve balances of the account * diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java index dbd3ac04e..44a106a2b 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxAdapters.java @@ -38,6 +38,11 @@ public static String toBiboxPair(CurrencyPair pair) { return pair.base.getCurrencyCode() + "_" + pair.counter.getCurrencyCode(); } + + private static CurrencyPair adaptCurrencyPair(String biboxPair) { + String[] split = biboxPair.split("_"); + return new CurrencyPair(split[0], split[1]); + } public static Ticker adaptTicker(BiboxTicker ticker, CurrencyPair currencyPair) { return new Ticker.Builder().currencyPair(currencyPair).ask(ticker.getSell()) @@ -125,4 +130,10 @@ private static UserTrade adaptUserTrade(BiboxOrder order) { .feeAmount(order.getFee()) .build(); } + + public static List adaptAllOrderBooks(List biboxOrderBooks) { + return biboxOrderBooks.stream() + .map(ob -> BiboxAdapters.adaptOrderBook(ob, adaptCurrencyPair(ob.getPair()))) + .collect(Collectors.toList()); + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java index cb6985fd0..41181e76c 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxCommands.java @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.knowm.xchange.bibox.dto.account.BiboxDepositAddressCommandBody; @@ -30,6 +31,12 @@ public static BiboxCommands depositAddressCommand(String coinSymbol) { private BiboxCommands() { super(); } + + public static BiboxCommands of(List> commands) { + BiboxCommands cmds = new BiboxCommands(); + cmds.addAll(commands); + return cmds; + } public static BiboxCommands of(BiboxCommand... commands) { BiboxCommands cmds = new BiboxCommands(); diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java index b2aa8e22c..1c1f9d963 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java @@ -6,22 +6,19 @@ * Result of batched calls (all POST requests) * * @author odrotleff + * @param */ -public class BiboxMultipleResponses { +public class BiboxMultipleResponses { - private List> result; - - public BiboxResponse getFirst() { - return result.get(0); - } + private List> result; public BiboxMultipleResponses() {} - public List> getResult() { + public List> getResult() { return result; } - public void setResult(List> result) { + public void setResult(List> result) { this.result = result; } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommand.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommand.java new file mode 100644 index 000000000..44cc19ebe --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommand.java @@ -0,0 +1,11 @@ +package org.knowm.xchange.bibox.dto.marketdata; + +import org.knowm.xchange.bibox.dto.BiboxCommand; + +public class BiboxOrderBookCommand extends BiboxCommand{ + + public BiboxOrderBookCommand(String pair, Integer size) { + super("api/depth", new BiboxOrderBookCommandBody(pair, size)); + } + +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommandBody.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommandBody.java new file mode 100644 index 000000000..dc16e1b72 --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/marketdata/BiboxOrderBookCommandBody.java @@ -0,0 +1,21 @@ +package org.knowm.xchange.bibox.dto.marketdata; + +/** + * @author odrotleff + */ +public class BiboxOrderBookCommandBody { + private String pair; + private Integer size; + + public BiboxOrderBookCommandBody(String pair, Integer size) { + super(); + this.pair = pair; + this.size = size; + } + public String getPair() { + return pair; + } + public Integer getSize() { + return size; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java index 45843ebc8..de1ba66df 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java @@ -55,6 +55,15 @@ public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws return BiboxAdapters.adaptOrderBook(biboxOrderBook, currencyPair); } + public List getAllOrderBooks(Integer depth) throws IOException { + + if (depth == null) { + depth = 200; + } + List biboxOrderBooks = getAllBiboxOrderBooks(depth); + return BiboxAdapters.adaptAllOrderBooks(biboxOrderBooks); + } + @Override public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java index 7884687e6..58d93ed5d 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -4,11 +4,16 @@ import java.io.IOException; import java.util.List; +import java.util.stream.Collectors; import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.BiboxException; import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.bibox.dto.BiboxCommand; +import org.knowm.xchange.bibox.dto.BiboxCommands; +import org.knowm.xchange.bibox.dto.BiboxResponse; import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; +import org.knowm.xchange.bibox.dto.marketdata.BiboxOrderBookCommand; import org.knowm.xchange.bibox.dto.marketdata.BiboxTicker; import org.knowm.xchange.bibox.dto.trade.BiboxOrderBook; import org.knowm.xchange.currency.CurrencyPair; @@ -50,4 +55,18 @@ public List getAllBiboxMarkets() throws IOException { throw new ExchangeException(e.getMessage()); } } + + public List getAllBiboxOrderBooks(Integer depth) { + try { + List> allCommands = exchange.getExchangeSymbols().stream() + .map(BiboxAdapters::toBiboxPair) + .map(pair -> new BiboxOrderBookCommand(pair, depth)) + .collect(Collectors.toList()); + return bibox.allOrderBooks(BiboxCommands.of(allCommands).json()).getResult().stream() + .map(BiboxResponse::getResult) + .collect(Collectors.toList()); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } + } } diff --git a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java index 76802e524..7e3e87bf3 100644 --- a/xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java +++ b/xchange-bibox/src/test/java/org/knowm/xchange/bibox/service/marketdata/MarketDataServiceIntegration.java @@ -2,11 +2,15 @@ import static org.assertj.core.api.Assertions.assertThat; +import java.util.List; + import org.junit.Test; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeFactory; import org.knowm.xchange.bibox.BiboxExchange; +import org.knowm.xchange.bibox.service.BiboxMarketDataService; import org.knowm.xchange.currency.CurrencyPair; +import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.service.marketdata.MarketDataService; @@ -23,4 +27,12 @@ public void testGetTicker() throws Exception { assertThat(ticker.getAsk()).isGreaterThan(ticker.getBid()); assertThat(ticker.getHigh()).isGreaterThan(ticker.getLow()); } + + @Test + public void testGetAllOrderBooks() throws Exception { + + BiboxMarketDataService marketDataService = (BiboxMarketDataService) BIBOX.getMarketDataService(); + List orderBooks = marketDataService.getAllOrderBooks(200); + assertThat(orderBooks.size()).isGreaterThan(20); + } } From a8e77958c687b953e5b262a0c2fcd7e4f445b020 Mon Sep 17 00:00:00 2001 From: bharris Date: Mon, 19 Feb 2018 18:29:36 -0800 Subject: [PATCH 093/117] [abucoins] Switching to builder from Constructor Just makes it easier to visually tell what's being set to what when compared with the Constructor style approach. --- .../xchange/abucoins/AbucoinsAdapters.java | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java index 45e20760b..ec4865ad6 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java @@ -211,8 +211,13 @@ public static List createOrders(CurrencyPair currencyPair, OrderType } public static LimitOrder createOrder(CurrencyPair currencyPair, AbucoinsOrderBook.LimitOrder priceAndAmount, OrderType orderType) { - - return new LimitOrder(orderType, priceAndAmount.getSize(), currencyPair, "", null, priceAndAmount.getPrice()); //?? + return new LimitOrder.Builder(orderType, currencyPair) + .averagePrice(priceAndAmount.getPrice()) + .cumulativeAmount( priceAndAmount.getSize()) + .limitPrice(priceAndAmount.getPrice()) + .orderStatus(OrderStatus.NEW) + .originalAmount(priceAndAmount.getSize()) + .build(); } public static OpenOrders adaptOpenOrders(AbucoinsOrder[] orders) { @@ -239,25 +244,28 @@ public static Order adaptOrder(AbucoinsOrder order) { } public static LimitOrder adaptLimitOrder(AbucoinsOrder order) { - return new LimitOrder( adaptOrderType(order.getSide()), - order.getSize(), - order.getFilledSize(), - adaptCurrencyPair( order.getProductID() ), - order.getId(), - parseDate( order.getCreatedAt() ), - order.getPrice()); + return new LimitOrder.Builder(adaptOrderType(order.getSide()), adaptCurrencyPair( order.getProductID() )) + .averagePrice(order.getPrice()) + .cumulativeAmount(order.getFilledSize()) + .id(order.getId()) + .limitPrice(order.getPrice()) + .orderStatus(adaptOrderStatus(order.getStatus())) + .originalAmount(order.getSize()) + .remainingAmount(order.getFilledSize().subtract(order.getSize())) + .timestamp(parseDate(order.getCreatedAt())) + .build(); } public static MarketOrder adaptMarketOrder(AbucoinsOrder order) { - return new MarketOrder( adaptOrderType(order.getSide()), - order.getSize(), - adaptCurrencyPair( order.getProductID() ), - order.getId(), - parseDate( order.getCreatedAt() ), - order.getPrice(), - order.getFilledSize(), - null, - adaptOrderStatus(order.getStatus())); + return new MarketOrder.Builder(adaptOrderType(order.getSide()), adaptCurrencyPair( order.getProductID() )) + .averagePrice(order.getPrice()) + .cumulativeAmount(order.getFilledSize()) + .id(order.getId()) + .orderStatus(adaptOrderStatus(order.getStatus())) + .originalAmount(order.getSize()) + .remainingAmount(order.getFilledSize().subtract(order.getSize())) + .timestamp(parseDate(order.getCreatedAt())) + .build(); } public static OrderType adaptOrderType(AbucoinsOrder.Side side) { From 732fc6e56499535eb8c5b894e187a91bf9496c3d Mon Sep 17 00:00:00 2001 From: bharris Date: Mon, 19 Feb 2018 22:43:20 -0800 Subject: [PATCH 094/117] [abucoins] removing 'catch-all' Exception One method was catching any exceptions and wrapping them as IOExceptions (even if the original exception was an IOException). Just simplified it to let the Exceptions propagate with out interrupting them. Also, switched to the preferred IOException in a couple other places. --- .../abucoins/service/AbucoinsMarketDataService.java | 8 ++------ .../xchange/abucoins/service/AbucoinsTradeService.java | 5 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataService.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataService.java index de980854d..49e65c70a 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataService.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataService.java @@ -10,6 +10,7 @@ import org.knowm.xchange.dto.marketdata.OrderBook; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.dto.marketdata.Trades; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.service.marketdata.MarketDataService; /** @@ -27,12 +28,7 @@ public AbucoinsMarketDataService(Exchange exchange) { @Override public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException { - try { - return AbucoinsAdapters.adaptTicker(getAbucoinsTicker(AbucoinsAdapters.adaptCurrencyPairToProductID(currencyPair)), currencyPair); - } - catch (Exception e) { - throw new IOException("Unable to get ticker for " + currencyPair, e); - } + return AbucoinsAdapters.adaptTicker(getAbucoinsTicker(AbucoinsAdapters.adaptCurrencyPairToProductID(currencyPair)), currencyPair); } @Override diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java index a1fe647ee..a483bb2e0 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java @@ -14,6 +14,7 @@ import org.knowm.xchange.abucoins.dto.trade.AbucoinsOrder; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.*; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByCurrencyPair; @@ -62,7 +63,7 @@ public String placeMarketOrder(MarketOrder marketOrder) throws IOException { AbucoinsCreateMarketOrderRequest req = AbucoinsAdapters.adaptAbucoinsCreateMarketOrderRequest(marketOrder); AbucoinsCreateOrderResponse resp = createAbucoinsOrder(req); if ( resp.getMessage() != null ) - throw new IOException(resp.getMessage()); + throw new ExchangeException(resp.getMessage()); return resp.getId(); } @@ -71,7 +72,7 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { AbucoinsCreateLimitOrderRequest req = AbucoinsAdapters.adaptAbucoinsCreateLimitOrderRequest(limitOrder); AbucoinsCreateOrderResponse resp = createAbucoinsOrder(req); if ( resp.getMessage() != null ) - throw new IOException(resp.getMessage()); + throw new ExchangeException(resp.getMessage()); return resp.getId(); } From 820f05f191cf39e05b0597ef06cb4726979229d4 Mon Sep 17 00:00:00 2001 From: cacofish Date: Mon, 19 Feb 2018 23:12:09 -0800 Subject: [PATCH 095/117] Expose okcoin api from account service raw Expose okcoin api from account service raw --- .../service/OkCoinAccountServiceRaw.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinAccountServiceRaw.java b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinAccountServiceRaw.java index 77e4704b6..f4cc22704 100644 --- a/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinAccountServiceRaw.java +++ b/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinAccountServiceRaw.java @@ -41,18 +41,26 @@ public OkCoinFuturesUserInfoCross getFutureUserInfo() throws IOException { public OKCoinWithdraw withdraw(String currencySymbol, String withdrawAddress, BigDecimal amount, String target) throws IOException { String fee = null; if (target.equals("address")) { //External address - if (currencySymbol.startsWith("btc")) fee = "0.002"; - else if (currencySymbol.startsWith("ltc")) fee = "0.001"; - else if (currencySymbol.startsWith("eth")) fee = "0.01"; - else throw new IllegalArgumentException("Unsupported withdraw currency"); + if (currencySymbol.startsWith("btc")) + fee = "0.002"; + else if (currencySymbol.startsWith("ltc")) + fee = "0.001"; + else if (currencySymbol.startsWith("eth")) + fee = "0.01"; + else + throw new IllegalArgumentException("Unsupported withdraw currency"); } else if (target.equals("okex") || target.equals("okcn") || target.equals("okcom")) { //Internal address fee = "0"; } else { throw new IllegalArgumentException("Unsupported withdraw target"); } - OKCoinWithdraw withdrawResult = okCoin.withdraw(exchange.getExchangeSpecification().getApiKey(), currencySymbol, - signatureCreator, fee, tradepwd, withdrawAddress, amount.toString(), target); + return withdraw(currencySymbol, withdrawAddress, amount, target, fee); + } + + public OKCoinWithdraw withdraw(String currencySymbol, String withdrawAddress, BigDecimal amount, String target, String fee) throws IOException { + OKCoinWithdraw withdrawResult = okCoin.withdraw(exchange.getExchangeSpecification().getApiKey(), currencySymbol, signatureCreator, fee, tradepwd, + withdrawAddress, amount.toString(), target); return returnOrThrow(withdrawResult); } From 6982f61c40a876aab888dab7132985f2a2cfed6c Mon Sep 17 00:00:00 2001 From: bharris Date: Mon, 19 Feb 2018 23:28:29 -0800 Subject: [PATCH 096/117] [abucoins] Adding support for GET /products/ticker Abucoins added a ticker API call to fetch all tickers at once, adding that support to the raw marketdata service. --- .../org/knowm/xchange/abucoins/Abucoins.java | 5 ++ .../xchange/abucoins/AbucoinsAdapters.java | 31 ++++++--- .../dto/marketdata/AbucoinsFullTicker.java | 68 +++++++++++++++++++ .../service/AbucoinsMarketDataServiceRaw.java | 14 ++++ 4 files changed, 108 insertions(+), 10 deletions(-) create mode 100644 xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/marketdata/AbucoinsFullTicker.java diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/Abucoins.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/Abucoins.java index 78b206e3e..64fbe689f 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/Abucoins.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/Abucoins.java @@ -9,6 +9,7 @@ import javax.ws.rs.core.MediaType; import org.knowm.xchange.abucoins.dto.AbucoinsServerTime; +import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsFullTicker; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsHistoricRates; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsOrderBook; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsProduct; @@ -41,6 +42,10 @@ public interface Abucoins { @GET @Path("products/{product-id}/book?level={level}") AbucoinsOrderBook getBook(@PathParam("product-id") String product_id, @PathParam("level") String level) throws IOException; + + @GET + @Path("products/ticker") + AbucoinsFullTicker[] getTicker() throws IOException; @GET @Path("products/{product-id}/ticker") diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java index ec4865ad6..ac9c61f46 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/AbucoinsAdapters.java @@ -18,6 +18,7 @@ import org.knowm.xchange.abucoins.dto.account.AbucoinsHistory; import org.knowm.xchange.abucoins.dto.account.AbucoinsWithdrawalHistory; import org.knowm.xchange.abucoins.dto.account.AbucoinsWithdrawalsHistory; +import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsFullTicker; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsOrderBook; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsTicker; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsTrade; @@ -148,6 +149,16 @@ public static Ticker adaptTicker(AbucoinsTicker ticker, CurrencyPair currencyPai return new Ticker.Builder().currencyPair(currencyPair).last(last).bid(bid).ask(ask).volume(volume).timestamp(timestamp) .build(); } + + /** + * Adapts a AbucoinsFullTicker to a Ticker Object + * + * @param ticker The exchange specific ticker + * @return The ticker + */ + public static Ticker adaptTicker(AbucoinsFullTicker ticker) { + return adaptTicker(ticker, adaptCurrencyPair(ticker.getProductID())); + } /** * Adapts Cex.IO Depth to OrderBook Object @@ -212,12 +223,12 @@ public static List createOrders(CurrencyPair currencyPair, OrderType public static LimitOrder createOrder(CurrencyPair currencyPair, AbucoinsOrderBook.LimitOrder priceAndAmount, OrderType orderType) { return new LimitOrder.Builder(orderType, currencyPair) - .averagePrice(priceAndAmount.getPrice()) - .cumulativeAmount( priceAndAmount.getSize()) - .limitPrice(priceAndAmount.getPrice()) - .orderStatus(OrderStatus.NEW) - .originalAmount(priceAndAmount.getSize()) - .build(); + .averagePrice(priceAndAmount.getPrice()) + .cumulativeAmount( priceAndAmount.getSize()) + .limitPrice(priceAndAmount.getPrice()) + .orderStatus(OrderStatus.NEW) + .originalAmount(priceAndAmount.getSize()) + .build(); } public static OpenOrders adaptOpenOrders(AbucoinsOrder[] orders) { @@ -257,14 +268,14 @@ public static LimitOrder adaptLimitOrder(AbucoinsOrder order) { } public static MarketOrder adaptMarketOrder(AbucoinsOrder order) { - return new MarketOrder.Builder(adaptOrderType(order.getSide()), adaptCurrencyPair( order.getProductID() )) + return ((MarketOrder.Builder) new MarketOrder.Builder(adaptOrderType(order.getSide()), adaptCurrencyPair( order.getProductID() )) .averagePrice(order.getPrice()) .cumulativeAmount(order.getFilledSize()) .id(order.getId()) .orderStatus(adaptOrderStatus(order.getStatus())) .originalAmount(order.getSize()) .remainingAmount(order.getFilledSize().subtract(order.getSize())) - .timestamp(parseDate(order.getCreatedAt())) + .timestamp(parseDate(order.getCreatedAt()))) .build(); } @@ -308,8 +319,8 @@ public static OrderStatus adaptOrderStatus(AbucoinsOrder.Status status) { return OrderStatus.FILLED; case closed: - // from chatting with Abucoins when describing closed - // "it’s mean that your order can be partially fulfilled but it’s closed" + // from chatting with Abucoins when describing closed + // "it’s mean that your order can be partially fulfilled but it’s closed" return OrderStatus.PARTIALLY_FILLED; case rejected: diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/marketdata/AbucoinsFullTicker.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/marketdata/AbucoinsFullTicker.java new file mode 100644 index 000000000..b596e7434 --- /dev/null +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/dto/marketdata/AbucoinsFullTicker.java @@ -0,0 +1,68 @@ +package org.knowm.xchange.abucoins.dto.marketdata; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + *

      POJO representing the output JSON for the Abucoins + * GET /products/ticker endpoint.

      + * + *

      This is essentially the {@link AbucoinsTicker} object + * plus a product ID.

      + * Example: + *
      + * {
      + *     "product_id":"ETH-BTC",
      + *     "trade_id": "553612",
      + *     "price": "14160.85",
      + *     "size": "0.00053",
      + *     "bid": "14140.00000000",
      + *     "ask": "14181.70000000",
      + *     "volume": "1.09596639",
      + *     "time": "2017-09-21T10:26:58Z"
      + * }
      + * 
      + * @author bryant_harris + */ +public class AbucoinsFullTicker extends AbucoinsTicker { + /** identifier of the market */ + String productID; + + /** + * Constructor + * + * + * @param productID identifier of the market + * @param tradeID identifier of the last trade + * @param price last price + * @param size size of the last trade + * @param bid the best bid + * @param ask the best ask + * @param volume 24 hour volume + * @param time time in UTC + */ + public AbucoinsFullTicker( + @JsonProperty("product_id") String productID, + @JsonProperty("trade_id") String tradeID, + @JsonProperty("price") BigDecimal price, + @JsonProperty("size") BigDecimal size, + @JsonProperty("bid") BigDecimal bid, + @JsonProperty("ask") BigDecimal ask, + @JsonProperty("volume") BigDecimal volume, + @JsonProperty("time") String time) { + super(tradeID, price, size, bid, ask, volume, time); + this.productID = productID; + } + + /** identifier of the market */ + public String getProductID() { + return productID; + } + + @Override + public String toString() { + return "AbucoinsFullTicker [productID=" + productID + ", tradeID=" + tradeID + ", price=" + price + ", size=" + size + + ", bid=" + bid + ", ask=" + ask + ", volume=" + volume + ", time=" + time + "]"; + } +} diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataServiceRaw.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataServiceRaw.java index 6dc1c56db..b85842943 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataServiceRaw.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsMarketDataServiceRaw.java @@ -7,6 +7,7 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.abucoins.dto.AbucoinsServerTime; +import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsFullTicker; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsHistoricRate; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsHistoricRates; import org.knowm.xchange.abucoins.dto.marketdata.AbucoinsOrderBook; @@ -27,6 +28,7 @@ *
    1. {@link #getAbucoinsProduct() GET /products/{product-id}}
    2. *
    3. {@link #getAbucoinsOrderBook GET /products/{product-id}/book}
    4. *
    5. {@link #getAbucoinsOrderBook(String, AbucoinsOrderBookLevel) GET /products/{product-id}/book?level={level}}
    6. + *
    7. {@link #getAbucoinsTickers GET /products/ticker}
    8. *
    9. {@link #getAbucoinsTicker GET /products/{product-id}/ticker}
    10. *
    11. {@link #getAbucoinsTrades(String) GET /products/{product-id}/trades}
    12. *
    13. {@link #getAbucoinsHistoricRates GET /products/{product-id}/candles?granularity=[granularity]&start=[UTC time of start]&end=[UTC time of end]}
    14. @@ -88,6 +90,18 @@ public AbucoinsOrderBook getAbucoinsOrderBook(String productID) throws IOExcepti public AbucoinsOrderBook getAbucoinsOrderBook(String productID, AbucoinsOrderBookLevel level) throws IOException { return abucoins.getBook(productID, level.name()); } + + /** + * Corresponds to GET /products/ticker + * @return + * @throws IOException + */ + public AbucoinsFullTicker[] getAbucoinsTickers() throws IOException { + + AbucoinsFullTicker[] abucoinsTickers = abucoins.getTicker(); + + return abucoinsTickers; + } /** * Corresponds to GET /products/{product-id}/ticker From 102c8c8112705be3d081706fa47f8d1baea37367 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Wed, 21 Feb 2018 04:11:27 +0530 Subject: [PATCH 097/117] [bitfinex] bugfixes - Actually throw an ExchangeException, instead of just returning a 0 id in case of an error in the withdrawal response. - Adding an undocumented, but tested to be working bgold 'type' for BTG - variable name spelling error withdrawRepsonse => withdrawResponse --- .../org/knowm/xchange/bitfinex/v1/BitfinexUtils.java | 2 ++ .../v1/service/BitfinexAccountServiceRaw.java | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java index 6cc43e128..b455a20df 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java @@ -65,6 +65,8 @@ public static String convertToBitfinexWithdrawalType(String currency) { return "qtum"; case "EDO": return "eidoo"; + case "BTG": + return "bgold"; default: throw new BitfinexException("Cannot determine withdrawal type."); } diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java index fe29c861e..27c32a763 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java @@ -69,9 +69,12 @@ public String withdraw(String withdrawType, String walletSelected, BigDecimal am public String withdraw(String withdrawType, String walletSelected, BigDecimal amount, String address, String paymentId) throws IOException { - BitfinexWithdrawalResponse[] withdrawRepsonse = bitfinex.withdraw(apiKey, payloadCreator, signatureCreator, new BitfinexWithdrawalRequest( + BitfinexWithdrawalResponse[] withdrawResponse = bitfinex.withdraw(apiKey, payloadCreator, signatureCreator, new BitfinexWithdrawalRequest( String.valueOf(exchange.getNonceFactory().createValue()), withdrawType, walletSelected, amount, address, paymentId)); - return withdrawRepsonse[0].getWithdrawalId(); + if ("error".equalsIgnoreCase(withdrawResponse[0].getStatus())) { + throw new ExchangeException(withdrawResponse[0].getMessage()); + } + return withdrawResponse[0].getWithdrawalId(); } public BitfinexDepositAddressResponse requestDepositAddressRaw(String currency) throws IOException { @@ -84,9 +87,11 @@ public BitfinexDepositAddressResponse requestDepositAddressRaw(String currency) } else if (currency.equalsIgnoreCase("ETH")) { type = "ethereum"; } else if (currency.equalsIgnoreCase("IOT")) { - type = "iota"; + type = "iota"; } else if (currency.equalsIgnoreCase("BCH")) { type = "bcash"; + } else if (currency.equalsIgnoreCase("BTG")) { + type = "bgold"; } BitfinexDepositAddressResponse requestDepositAddressResponse = bitfinex.requestDeposit(apiKey, payloadCreator, signatureCreator, From a9284bb2470db81ba2813ab361af3f6f4616a48e Mon Sep 17 00:00:00 2001 From: npomfret Date: Wed, 21 Feb 2018 13:52:26 +0000 Subject: [PATCH 098/117] [itbit] fixed trade history so that multiple fills for a single order are grouped together into a single trade with a volume weighted price and a summed fee; fixed adaptation of XBT currency to BTC --- xchange-itbit/pom.xml | 5 + .../knowm/xchange/itbit/v1/ItBitAdapters.java | 96 ++++++++++++++----- 2 files changed, 76 insertions(+), 25 deletions(-) diff --git a/xchange-itbit/pom.xml b/xchange-itbit/pom.xml index e7ecc7006..7debca179 100644 --- a/xchange-itbit/pom.xml +++ b/xchange-itbit/pom.xml @@ -30,6 +30,11 @@ 4.3.4-SNAPSHOT + + com.google.guava + guava + 19.0 + diff --git a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java index 98b8532aa..da6e98dff 100644 --- a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java +++ b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java @@ -1,6 +1,20 @@ package org.knowm.xchange.itbit.v1; -import com.fasterxml.jackson.databind.exc.InvalidFormatException; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import org.knowm.xchange.currency.Currency; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order.OrderType; @@ -27,20 +41,9 @@ import org.knowm.xchange.itbit.v1.dto.trade.ItBitUserTrade; import org.knowm.xchange.utils.DateUtils; -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.text.DateFormat; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.TimeZone; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import com.fasterxml.jackson.databind.exc.InvalidFormatException; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; public final class ItBitAdapters { @@ -96,7 +99,7 @@ private static Date parseDate(String date) { return parse; } - public static Trades adaptTrades(ItBitTrades trades, CurrencyPair currencyPair) throws com.fasterxml.jackson.databind.exc.InvalidFormatException { + public static Trades adaptTrades(ItBitTrades trades, CurrencyPair currencyPair) throws InvalidFormatException { List tradesList = new ArrayList<>(trades.getCount()); long lastTradeId = 0; @@ -110,7 +113,7 @@ public static Trades adaptTrades(ItBitTrades trades, CurrencyPair currencyPair) return new Trades(tradesList, lastTradeId, TradeSortType.SortByID); } - public static Trade adaptTrade(ItBitTrade trade, CurrencyPair currencyPair) throws com.fasterxml.jackson.databind.exc.InvalidFormatException { + public static Trade adaptTrade(ItBitTrade trade, CurrencyPair currencyPair) throws InvalidFormatException { String timestamp = trade.getTimestamp(); //matcher instantiated each time for adaptTrade to be thread-safe @@ -141,7 +144,7 @@ public static List adaptOrders(List orders, CurrencyPa } private static LimitOrder adaptOrder(BigDecimal amount, BigDecimal price, CurrencyPair currencyPair, String orderId, OrderType orderType, - Date timestamp) { + Date timestamp) { return new LimitOrder(orderType, amount, currencyPair, orderId, timestamp, price); } @@ -162,7 +165,7 @@ public static AccountInfo adaptAccountInfo(ItBitAccountInfoReturn[] info) { for (int j = 0; j < balances.length; j++) { ItBitAccountBalance itBitAccountBalance = balances[j]; - Currency currency = Currency.getInstance(itBitAccountBalance.getCurrency()); + Currency currency = adaptCcy(itBitAccountBalance.getCurrency()); Balance balance = new Balance(currency, itBitAccountBalance.getTotalBalance(), itBitAccountBalance.getAvailableBalance()); walletContent.add(balance); } @@ -198,21 +201,64 @@ public static OpenOrders adaptPrivateOrders(ItBitOrder[] orders) { public static UserTrades adaptTradeHistory(ItBitTradeHistory history) { List itBitTrades = history.getTradingHistory(); - List trades = new ArrayList<>(itBitTrades.size()); + ListMultimap tradesByOrderId = ArrayListMultimap.create(); for (ItBitUserTrade itBitTrade : itBitTrades) { - String instrument = itBitTrade.getInstrument(); + tradesByOrderId.put(itBitTrade.getOrderId(), itBitTrade); + } + + List trades = new ArrayList<>(); + + for (String orderId : tradesByOrderId.keySet()) { + BigDecimal totalValue = BigDecimal.ZERO; + BigDecimal totalQuantity = BigDecimal.ZERO; + BigDecimal totalFee = BigDecimal.ZERO; + for (ItBitUserTrade trade : tradesByOrderId.get(orderId)) {//can have multiple trades for same order, so add them all up here to get the average price and total fee + totalValue = totalValue.add(trade.getCurrency1Amount().multiply(trade.getRate())); + totalQuantity = totalQuantity.add(trade.getCurrency1Amount()); + totalFee = totalFee.add(trade.getCommissionPaid()); + } + + BigDecimal volumeWeightedAveragePrice = totalValue.divide(totalQuantity, 8, BigDecimal.ROUND_HALF_UP); + + ItBitUserTrade itBitTrade = tradesByOrderId.get(orderId).get(0); OrderType orderType = itBitTrade.getDirection().equals(ItBitUserTrade.Direction.buy) ? OrderType.BID : OrderType.ASK; - CurrencyPair currencyPair = new CurrencyPair(instrument.substring(0, 3), instrument.substring(3, 6)); - trades.add(new UserTrade(orderType, itBitTrade.getCurrency1Amount(), currencyPair, itBitTrade.getRate(), itBitTrade.getTimestamp(), null, - itBitTrade.getOrderId(), itBitTrade.getCommissionPaid(), Currency.getInstance(itBitTrade.getCommissionCurrency()))); + CurrencyPair currencyPair = adaptCcyPair(itBitTrade.getInstrument()); + Currency feeCcy = adaptCcy(itBitTrade.getCommissionCurrency()); + + UserTrade userTrade = new UserTrade( + orderType, + totalQuantity, + currencyPair, + volumeWeightedAveragePrice, + itBitTrade.getTimestamp(), + orderId,//itbit doesn't have trade ids, so we use the order id instead + orderId, + totalFee, + feeCcy + ); + + trades.add(userTrade); } return new UserTrades(trades, TradeSortType.SortByTimestamp); } + public static CurrencyPair adaptCcyPair(String instrument) { + Currency base = adaptCcy(instrument.substring(0, 3)); + Currency counter = adaptCcy(instrument.substring(3, 6)); + return new CurrencyPair(base, counter); + } + + public static Currency adaptCcy(String ccy) { + if (ccy.toUpperCase().equals("XBT")) + return Currency.BTC; + + return Currency.getInstance(ccy); + } + public static Ticker adaptTicker(CurrencyPair currencyPair, ItBitTicker itBitTicker) { BigDecimal bid = itBitTicker.getBid(); @@ -260,7 +306,7 @@ public static FundingRecord adapt(ItBitFunding itBitFunding) { if (itBitFunding.status.equals("completed")) status = FundingRecord.Status.COMPLETE; - Currency currency = Currency.getInstance(itBitFunding.currency); + Currency currency = adaptCcy(itBitFunding.currency); return new FundingRecord( itBitFunding.destinationAddress, From 220ff175fd62f10640af614b4ddd3a7534d71568 Mon Sep 17 00:00:00 2001 From: npomfret Date: Thu, 22 Feb 2018 10:11:01 +0000 Subject: [PATCH 099/117] [itbit] added some guards in getTradeHistory to prevent class cast exceptions --- .../itbit/v1/service/ItBitTradeService.java | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/service/ItBitTradeService.java b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/service/ItBitTradeService.java index 4df86e685..336123878 100644 --- a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/service/ItBitTradeService.java +++ b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/service/ItBitTradeService.java @@ -97,14 +97,35 @@ public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { - Integer page = ((TradeHistoryParamPaging) params).getPageNumber(); - if (page != null) { - ++page; + Integer page = 0; + Integer pageLength = 50; + if (params instanceof TradeHistoryParamPaging) { + TradeHistoryParamPaging paramPaging = (TradeHistoryParamPaging) params; + page = paramPaging.getPageNumber(); + pageLength = paramPaging.getPageLength(); } - ItBitTradeHistory userTradeHistory = getUserTradeHistory(((TradeHistoryParamTransactionId) params).getTransactionId(), page, - ((TradeHistoryParamPaging) params).getPageLength(), ((TradeHistoryParamsTimeSpan) params).getStartTime(), - ((TradeHistoryParamsTimeSpan) params).getEndTime()); + String transactionId = null; + if (params instanceof TradeHistoryParamTransactionId) { + transactionId = ((TradeHistoryParamTransactionId) params).getTransactionId(); + } + + Date startTime = null; + Date endTime = null; + if (params instanceof TradeHistoryParamsTimeSpan) { + TradeHistoryParamsTimeSpan tradeHistoryParamsTimeSpan = (TradeHistoryParamsTimeSpan) params; + startTime = tradeHistoryParamsTimeSpan.getStartTime(); + endTime = tradeHistoryParamsTimeSpan.getEndTime(); + } + + ItBitTradeHistory userTradeHistory = getUserTradeHistory( + transactionId, + page, + pageLength, + startTime, + endTime + ); + return ItBitAdapters.adaptTradeHistory(userTradeHistory); } From e187a5360e063208421cb1d5b2d8fed80fe0574e Mon Sep 17 00:00:00 2001 From: npomfret Date: Thu, 22 Feb 2018 15:59:15 +0000 Subject: [PATCH 100/117] [coinmate] support for more "statuses" in funding --- .../knowm/xchange/coinmate/CoinmateAdapters.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/xchange-coinmate/src/main/java/org/knowm/xchange/coinmate/CoinmateAdapters.java b/xchange-coinmate/src/main/java/org/knowm/xchange/coinmate/CoinmateAdapters.java index d0af26032..e520613f5 100644 --- a/xchange-coinmate/src/main/java/org/knowm/xchange/coinmate/CoinmateAdapters.java +++ b/xchange-coinmate/src/main/java/org/knowm/xchange/coinmate/CoinmateAdapters.java @@ -23,11 +23,6 @@ */ package org.knowm.xchange.coinmate; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - import org.knowm.xchange.coinmate.dto.account.CoinmateBalance; import org.knowm.xchange.coinmate.dto.account.CoinmateBalanceData; import org.knowm.xchange.coinmate.dto.marketdata.CoinmateOrderBook; @@ -54,6 +49,11 @@ import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.service.trade.params.TradeHistoryParamsSorted; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + /** * @author Martin Stachon */ @@ -181,10 +181,14 @@ public static List adaptFundingHistory(CoinmateTransactionHistory continue; } - switch (entry.getStatus()) { + switch (entry.getStatus().toUpperCase()) { + case "OK": case "COMPLETED": status = FundingRecord.Status.COMPLETE; break; + case "SENT": + case "CREATED": + case "WAITING": case "PENDING": status = FundingRecord.Status.PROCESSING; break; From befbd5769318b7323100f2beec1677f90d4c2a3e Mon Sep 17 00:00:00 2001 From: cyril Date: Thu, 22 Feb 2018 20:38:23 +0100 Subject: [PATCH 101/117] can now parse exponential notation --- .../main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java b/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java index ec3eb7921..bfe584803 100644 --- a/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java +++ b/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java @@ -175,7 +175,7 @@ else if (typeName.equals("MARKET_BUY")) remainingQuantity, new CurrencyPair(ccyA, ccyB), map.get("id").toString(), - DateUtils.fromUnixTime(Long.valueOf(map.get("issueTime").toString())), + DateUtils.fromUnixTime(Double.valueOf(map.get("issueTime").toString()).longValue()), new BigDecimal(map.get("price").toString()), null, null, From cdab1ad670ace2e5a08d653b6e15dec4574ffd8b Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Fri, 23 Feb 2018 03:50:37 +0530 Subject: [PATCH 102/117] [bitfinex] a better remoteInit --- .../knowm/xchange/bitfinex/v1/Bitfinex.java | 6 + .../xchange/bitfinex/v1/BitfinexAdapters.java | 143 +++++++++++++----- .../bitfinex/v1/BitfinexAuthenticated.java | 6 + .../xchange/bitfinex/v1/BitfinexExchange.java | 14 ++ .../xchange/bitfinex/v1/BitfinexUtils.java | 4 +- .../account/BitfinexAccountFeesResponse.java | 24 +++ .../dto/marketdata/BitfinexSymbolDetail.java | 89 +++++++++++ .../v1/service/BitfinexAccountService.java | 60 ++++++-- .../v1/service/BitfinexAccountServiceRaw.java | 6 + .../service/BitfinexMarketDataServiceRaw.java | 5 + 10 files changed, 308 insertions(+), 49 deletions(-) create mode 100644 xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/account/BitfinexAccountFeesResponse.java create mode 100644 xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/marketdata/BitfinexSymbolDetail.java diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/Bitfinex.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/Bitfinex.java index 12c6ee7fe..690fd19ed 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/Bitfinex.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/Bitfinex.java @@ -1,6 +1,7 @@ package org.knowm.xchange.bitfinex.v1; import java.io.IOException; +import java.util.List; import java.util.Set; import javax.ws.rs.GET; @@ -14,6 +15,7 @@ import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexDepth; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexLend; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexLendDepth; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexSymbolDetail; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexTicker; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexTrade; @@ -52,4 +54,8 @@ BitfinexLend[] getLends(@PathParam("currency") String currency, @QueryParam("tim @Path("symbols") Set getSymbols() throws IOException, BitfinexException; + @GET + @Path("symbols_details") + List getSymbolsDetails() throws IOException, BitfinexException; + } diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAdapters.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAdapters.java index a9a2b08fc..e729257f4 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAdapters.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAdapters.java @@ -1,8 +1,24 @@ package org.knowm.xchange.bitfinex.v1; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexAccountFeesResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexBalancesResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexDepositWithdrawalHistoryResponse; -import org.knowm.xchange.bitfinex.v1.dto.marketdata.*; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexDepth; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexLendLevel; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexLevel; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexSymbolDetail; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexTicker; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexTrade; +import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexAccountInfosResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexOrderStatusResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexTradeResponse; import org.knowm.xchange.currency.Currency; @@ -20,15 +36,16 @@ import org.knowm.xchange.dto.meta.CurrencyMetaData; import org.knowm.xchange.dto.meta.CurrencyPairMetaData; import org.knowm.xchange.dto.meta.ExchangeMetaData; -import org.knowm.xchange.dto.trade.*; +import org.knowm.xchange.dto.trade.FixedRateLoanOrder; +import org.knowm.xchange.dto.trade.FloatingRateLoanOrder; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.UserTrade; +import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.utils.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.math.BigDecimal; -import java.util.*; -import java.util.Map.Entry; - public final class BitfinexAdapters { public static final Logger log = LoggerFactory.getLogger(BitfinexAdapters.class); @@ -108,34 +125,6 @@ public static OrdersContainer adaptOrders(BitfinexLevel[] bitfinexLevels, Curren return new OrdersContainer(maxTimestampInMillis, limitOrders); } - public static class OrdersContainer { - - private final long timestamp; - private final List limitOrders; - - /** - * Constructor - * - * @param timestamp - * @param limitOrders - */ - public OrdersContainer(long timestamp, List limitOrders) { - - this.timestamp = timestamp; - this.limitOrders = limitOrders; - } - - public long getTimestamp() { - - return timestamp; - } - - public List getLimitOrders() { - - return limitOrders; - } - } - public static LimitOrder adaptOrder(BigDecimal originalAmount, BigDecimal price, CurrencyPair currencyPair, OrderType orderType, Date timestamp) { return new LimitOrder(orderType, originalAmount, currencyPair, "", timestamp, price); @@ -338,6 +327,64 @@ public static ExchangeMetaData adaptMetaData(List currencyPairs, E return metaData; } + /** + * Flipped order of arguments to avoid type-erasure clash with {@link #adaptMetaData(List, ExchangeMetaData)} + * + * @param exchangeMetaData + * @param symbolDetails + * @return + */ + public static ExchangeMetaData adaptMetaData(ExchangeMetaData exchangeMetaData, List symbolDetails) { + final Map currencyPairs = exchangeMetaData.getCurrencyPairs(); + symbolDetails.parallelStream() + .forEach(bitfinexSymbolDetail -> { + final CurrencyPair currencyPair = adaptCurrencyPair(bitfinexSymbolDetail.getPair()); + if (currencyPairs.get(currencyPair) == null) { + CurrencyPairMetaData newMetaData = new CurrencyPairMetaData(null, bitfinexSymbolDetail.getMinimum_order_size(), + bitfinexSymbolDetail.getMaximum_order_size(), bitfinexSymbolDetail.getPrice_precision()); + currencyPairs.put(currencyPair, newMetaData); + } else { + CurrencyPairMetaData oldMetaData = currencyPairs.get(currencyPair); + CurrencyPairMetaData newMetaData = new CurrencyPairMetaData(oldMetaData.getTradingFee(), bitfinexSymbolDetail.getMinimum_order_size(), + bitfinexSymbolDetail.getMaximum_order_size(), bitfinexSymbolDetail.getPrice_precision()); + currencyPairs.put(currencyPair, newMetaData); + } + } + ); + return exchangeMetaData; + } + + public static ExchangeMetaData adaptMetaData(BitfinexAccountFeesResponse accountFeesResponse, ExchangeMetaData metaData) { + Map currencies = metaData.getCurrencies(); + final Map withdrawFees = accountFeesResponse.getWithdraw(); + withdrawFees.forEach((currency, withdrawalFee) -> { + if (currencies.get(currency) == null) { + CurrencyMetaData currencyMetaData = new CurrencyMetaData(0, withdrawalFee); + currencies.put(currency, currencyMetaData); + } else { + final CurrencyMetaData oldMetaData = currencies.get(currency); + CurrencyMetaData newMetaData = new CurrencyMetaData(oldMetaData.getScale(), withdrawalFee); + currencies.put(currency, newMetaData); + } + }); + return metaData; + } + + public static ExchangeMetaData adaptMetaData(BitfinexAccountInfosResponse[] bitfinexAccountInfos, ExchangeMetaData exchangeMetaData) { + final Map currencyPairs = exchangeMetaData.getCurrencyPairs(); + + // lets go with the assumption that the trading fees are common across all trading pairs for now. + // also setting the taker_fee as the trading_fee for now. + final CurrencyPairMetaData metaData = new CurrencyPairMetaData(bitfinexAccountInfos[0].getTakerFees(), null, null, null); + currencyPairs.keySet().parallelStream() + .forEach(currencyPair -> currencyPairs.merge(currencyPair, metaData, + (oldMetaData, newMetaData) -> new CurrencyPairMetaData(newMetaData.getTradingFee(), oldMetaData.getMinimumAmount(), oldMetaData.getMaximumAmount(), + oldMetaData.getPriceScale())) + ); + + return exchangeMetaData; + } + public static List adaptFundingHistory(BitfinexDepositWithdrawalHistoryResponse[] bitfinexDepositWithdrawalHistoryResponses) { final List fundingRecords = new ArrayList<>(); for (BitfinexDepositWithdrawalHistoryResponse responseEntry : bitfinexDepositWithdrawalHistoryResponses) { @@ -356,4 +403,32 @@ public static List adaptFundingHistory(BitfinexDepositWithdrawalH } return fundingRecords; } + + public static class OrdersContainer { + + private final long timestamp; + private final List limitOrders; + + /** + * Constructor + * + * @param timestamp + * @param limitOrders + */ + public OrdersContainer(long timestamp, List limitOrders) { + + this.timestamp = timestamp; + this.limitOrders = limitOrders; + } + + public long getTimestamp() { + + return timestamp; + } + + public List getLimitOrders() { + + return limitOrders; + } + } } diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAuthenticated.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAuthenticated.java index 804d1bf82..257e18378 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAuthenticated.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexAuthenticated.java @@ -10,6 +10,7 @@ import javax.ws.rs.core.MediaType; import org.knowm.xchange.bitfinex.v1.dto.BitfinexException; +import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexAccountFeesResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexBalancesRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexBalancesResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexDepositAddressRequest; @@ -56,6 +57,11 @@ public interface BitfinexAuthenticated extends Bitfinex { BitfinexAccountInfosResponse[] accountInfos(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNonceOnlyRequest accountInfosRequest) throws IOException, BitfinexException; + @POST + @Path("account_fees") + BitfinexAccountFeesResponse accountFees(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, + @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNonceOnlyRequest accountInfosRequest) throws IOException; + @POST @Path("order/new") BitfinexOrderStatusResponse newOrder(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java index 221e620ba..1db915c9c 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java @@ -6,6 +6,9 @@ import org.knowm.xchange.BaseExchange; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeSpecification; +import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexAccountFeesResponse; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexSymbolDetail; +import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexAccountInfosResponse; import org.knowm.xchange.bitfinex.v1.service.BitfinexAccountService; import org.knowm.xchange.bitfinex.v1.service.BitfinexMarketDataService; import org.knowm.xchange.bitfinex.v1.service.BitfinexMarketDataServiceRaw; @@ -53,6 +56,17 @@ public void remoteInit() throws IOException, ExchangeException { List currencyPairs = dataService.getExchangeSymbols(); exchangeMetaData = BitfinexAdapters.adaptMetaData(currencyPairs, exchangeMetaData); + final List symbolDetails = dataService.getSymbolDetails(); + exchangeMetaData = BitfinexAdapters.adaptMetaData(exchangeMetaData, symbolDetails); + + BitfinexAccountService accountService = (BitfinexAccountService) this.accountService; + final BitfinexAccountFeesResponse accountFees = accountService.getAccountFees(); + exchangeMetaData = BitfinexAdapters.adaptMetaData(accountFees, exchangeMetaData); + + BitfinexTradeService tradeService = (BitfinexTradeService) this.tradeService; + final BitfinexAccountInfosResponse[] bitfinexAccountInfos = tradeService.getBitfinexAccountInfos(); + + exchangeMetaData = BitfinexAdapters.adaptMetaData(bitfinexAccountInfos, exchangeMetaData); } } diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java index b455a20df..20ed2bb08 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java @@ -65,8 +65,8 @@ public static String convertToBitfinexWithdrawalType(String currency) { return "qtum"; case "EDO": return "eidoo"; - case "BTG": - return "bgold"; + case "BTG": + return "bgold"; default: throw new BitfinexException("Cannot determine withdrawal type."); } diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/account/BitfinexAccountFeesResponse.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/account/BitfinexAccountFeesResponse.java new file mode 100644 index 000000000..342946830 --- /dev/null +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/account/BitfinexAccountFeesResponse.java @@ -0,0 +1,24 @@ +package org.knowm.xchange.bitfinex.v1.dto.account; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +import org.knowm.xchange.currency.Currency; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * @author ujjwal on 23/02/18. + */ +public class BitfinexAccountFeesResponse { + private final Map withdraw; + + public BitfinexAccountFeesResponse(@JsonProperty("withdraw") final Map withdraw) { + this.withdraw = new HashMap<>(withdraw); + } + + public Map getWithdraw() { + return withdraw; + } +} diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/marketdata/BitfinexSymbolDetail.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/marketdata/BitfinexSymbolDetail.java new file mode 100644 index 000000000..d2a98a72a --- /dev/null +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/dto/marketdata/BitfinexSymbolDetail.java @@ -0,0 +1,89 @@ +package org.knowm.xchange.bitfinex.v1.dto.marketdata; + +import java.math.BigDecimal; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * [ + * { + * "pair": "btcusd", + * "price_precision": 5, + * "initial_margin": "30.0", + * "minimum_margin": "15.0", + * "maximum_order_size": "2000.0", + * "minimum_order_size": "0.002", + * "expiration": "NA", + * "margin": true + * }, + * { + * "pair": "ltcusd", + * "price_precision": 5, + * "initial_margin": "30.0", + * "minimum_margin": "15.0", + * "maximum_order_size": "5000.0", + * "minimum_order_size": "0.08", + * "expiration": "NA", + * "margin": true + * }, + * ... + * ] + * + * @author ujjwal on 23/02/18. + */ +public class BitfinexSymbolDetail { + private final String pair; + private final int price_precision; + private final BigDecimal initial_margin; + private final BigDecimal minimum_margin; + private final BigDecimal maximum_order_size; + private final BigDecimal minimum_order_size; + private final String expiration; + private final boolean margin; + + public BitfinexSymbolDetail(@JsonProperty("pair") String pair, @JsonProperty("price_precision") int price_precision, + @JsonProperty("initial_margin") BigDecimal initial_margin, @JsonProperty("minimum_margin") BigDecimal minimum_margin, + @JsonProperty("maximum_order_size") BigDecimal maximum_order_size, @JsonProperty("minimum_order_size") BigDecimal minimum_order_size, + @JsonProperty("expiration") String expiration, @JsonProperty("margin") boolean margin) { + this.pair = pair; + this.price_precision = price_precision; + this.initial_margin = initial_margin; + this.minimum_margin = minimum_margin; + this.maximum_order_size = maximum_order_size; + this.minimum_order_size = minimum_order_size; + this.expiration = expiration; + this.margin = margin; + } + + public String getPair() { + return pair; + } + + public int getPrice_precision() { + return price_precision; + } + + public BigDecimal getInitial_margin() { + return initial_margin; + } + + public BigDecimal getMinimum_margin() { + return minimum_margin; + } + + public BigDecimal getMaximum_order_size() { + return maximum_order_size; + } + + public BigDecimal getMinimum_order_size() { + return minimum_order_size; + } + + public String getExpiration() { + return expiration; + } + + public boolean isMargin() { + return margin; + } +} diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountService.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountService.java index 51148e7a1..c50027fb6 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountService.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountService.java @@ -1,5 +1,10 @@ package org.knowm.xchange.bitfinex.v1.service; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + import org.knowm.xchange.Exchange; import org.knowm.xchange.bitfinex.v1.BitfinexAdapters; import org.knowm.xchange.bitfinex.v1.BitfinexUtils; @@ -9,12 +14,14 @@ import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.service.account.AccountService; -import org.knowm.xchange.service.trade.params.*; - -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; +import org.knowm.xchange.service.trade.params.DefaultTradeHistoryParamsTimeSpan; +import org.knowm.xchange.service.trade.params.DefaultWithdrawFundsParams; +import org.knowm.xchange.service.trade.params.RippleWithdrawFundsParams; +import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrency; +import org.knowm.xchange.service.trade.params.TradeHistoryParamLimit; +import org.knowm.xchange.service.trade.params.TradeHistoryParams; +import org.knowm.xchange.service.trade.params.TradeHistoryParamsTimeSpan; +import org.knowm.xchange.service.trade.params.WithdrawFundsParams; public class BitfinexAccountService extends BitfinexAccountServiceRaw implements AccountService { @@ -56,8 +63,35 @@ public String withdrawFunds(Currency currency, BigDecimal amount, String address return withdraw(type, walletSelected, amount, address); } + /** + * Used for XRP withdrawals + * + * @param currency + * @param amount + * @param address + * @param tag + * @return + * @throws IOException + */ + public String withdrawFunds(Currency currency, BigDecimal amount, String address, String tag) throws IOException { + //determine withdrawal type + String type = BitfinexUtils.convertToBitfinexWithdrawalType(currency.toString()); + //Bitfinex withdeawal can be from different type of wallets * + // we have to use one of these for now: Exchange - + //to be able to withdraw instantly after trading for example + //The wallet to withdraw from, can be “trading”, “exchange”, or “deposit”. + String walletSelected = "exchange"; + //We have to convert XChange currencies to Bitfinex currencies: can be “bitcoin”, “litecoin” or “ether” or “tether” or “wire”. + return withdraw(type, walletSelected, amount, address, tag); + } + @Override public String withdrawFunds(WithdrawFundsParams params) throws IOException { + if (params instanceof RippleWithdrawFundsParams) { + RippleWithdrawFundsParams rippleWithdrawFundsParams = (RippleWithdrawFundsParams) params; + return withdrawFunds(rippleWithdrawFundsParams.currency, rippleWithdrawFundsParams.amount, rippleWithdrawFundsParams.address, + rippleWithdrawFundsParams.tag); + } if (params instanceof DefaultWithdrawFundsParams) { DefaultWithdrawFundsParams defaultParams = (DefaultWithdrawFundsParams) params; return withdrawFunds(defaultParams.currency, defaultParams.amount, defaultParams.address); @@ -115,24 +149,24 @@ public BitfinexFundingHistoryParams(final Date startTime, final Date endTime, fi this.currency = currency; } - @Override - public void setCurrency(Currency currency) { - this.currency = currency; - } - @Override public Currency getCurrency() { return this.currency; } @Override - public void setLimit(Integer limit) { - this.limit = limit; + public void setCurrency(Currency currency) { + this.currency = currency; } @Override public Integer getLimit() { return this.limit; } + + @Override + public void setLimit(Integer limit) { + this.limit = limit; + } } } diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java index 27c32a763..33e7f2948 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexAccountServiceRaw.java @@ -6,6 +6,7 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.bitfinex.v1.dto.BitfinexException; +import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexAccountFeesResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexBalancesRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexBalancesResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexDepositAddressRequest; @@ -16,6 +17,7 @@ import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexMarginInfosResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexWithdrawalRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexWithdrawalResponse; +import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexNonceOnlyRequest; import org.knowm.xchange.exceptions.ExchangeException; public class BitfinexAccountServiceRaw extends BitfinexBaseService { @@ -106,4 +108,8 @@ public BitfinexDepositAddressResponse requestDepositAddressRaw(String currency) } } + public BitfinexAccountFeesResponse getAccountFees() throws IOException { + return bitfinex.accountFees(apiKey, payloadCreator, signatureCreator, + new BitfinexNonceOnlyRequest("/v1/account_fees", String.valueOf(exchange.getNonceFactory().createValue()))); + } } diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexMarketDataServiceRaw.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexMarketDataServiceRaw.java index 28b2d6d6d..f95390389 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexMarketDataServiceRaw.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/service/BitfinexMarketDataServiceRaw.java @@ -11,6 +11,7 @@ import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexDepth; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexLend; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexLendDepth; +import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexSymbolDetail; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexTicker; import org.knowm.xchange.bitfinex.v1.dto.marketdata.BitfinexTrade; import org.knowm.xchange.currency.CurrencyPair; @@ -108,4 +109,8 @@ public List getExchangeSymbols() throws IOException { } return currencyPairs; } + + public List getSymbolDetails() throws IOException { + return bitfinex.getSymbolsDetails(); + } } From d577b95c3f7fe344f0fbec6304e83b249732340d Mon Sep 17 00:00:00 2001 From: cyril Date: Fri, 23 Feb 2018 14:31:45 +0100 Subject: [PATCH 103/117] can now fetch a selection of order books --- .../main/java/org/knowm/xchange/bibox/Bibox.java | 7 ++++--- .../bibox/service/BiboxMarketDataService.java | 11 ++++++++--- .../bibox/service/BiboxMarketDataServiceRaw.java | 13 +++++++++---- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java index 0833ab812..6e14263db 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/Bibox.java @@ -65,11 +65,12 @@ BiboxResponse> marketAll(@QueryParam("cmd") String cmd) throws IOException, BiboxException; /** - * Retrieve all order books. - * + * Retrieve order books. + * + * @param cmds contains information about the list of order books to fetch. * @return list of order books */ @POST @Path("mdata") - BiboxMultipleResponses allOrderBooks(@FormParam(FORM_CMDS) String cmds); + BiboxMultipleResponses orderBooks(@FormParam(FORM_CMDS) String cmds); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java index de1ba66df..374b1d37f 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataService.java @@ -1,6 +1,7 @@ package org.knowm.xchange.bibox.service; import java.io.IOException; +import java.util.Collection; import java.util.List; import org.knowm.xchange.Exchange; @@ -55,17 +56,21 @@ public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws return BiboxAdapters.adaptOrderBook(biboxOrderBook, currencyPair); } - public List getAllOrderBooks(Integer depth) throws IOException { + public List getAllOrderBooks(Integer depth) { + return getOrderBooks(depth, exchange.getExchangeSymbols()); + } + + public List getOrderBooks(Integer depth, Collection currencyPairs) { if (depth == null) { depth = 200; } - List biboxOrderBooks = getAllBiboxOrderBooks(depth); + List biboxOrderBooks = getBiboxOrderBooks(depth, currencyPairs); return BiboxAdapters.adaptAllOrderBooks(biboxOrderBooks); } @Override - public Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException { + public Trades getTrades(CurrencyPair currencyPair, Object... args) { throw new NotYetImplementedForExchangeException("This operation is not yet implemented for this exchange"); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java index 58d93ed5d..c92aaa905 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -3,7 +3,10 @@ import static org.knowm.xchange.bibox.dto.BiboxAdapters.toBiboxPair; import java.io.IOException; +import java.util.Collection; +import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; import org.knowm.xchange.Exchange; @@ -55,18 +58,20 @@ public List getAllBiboxMarkets() throws IOException { throw new ExchangeException(e.getMessage()); } } - - public List getAllBiboxOrderBooks(Integer depth) { + + public List getBiboxOrderBooks(Integer depth, Collection currencyPairs) { try { - List> allCommands = exchange.getExchangeSymbols().stream() + List> allCommands = new HashSet<>(currencyPairs).stream() + .filter(Objects::nonNull) .map(BiboxAdapters::toBiboxPair) .map(pair -> new BiboxOrderBookCommand(pair, depth)) .collect(Collectors.toList()); - return bibox.allOrderBooks(BiboxCommands.of(allCommands).json()).getResult().stream() + return bibox.orderBooks(BiboxCommands.of(allCommands).json()).getResult().stream() .map(BiboxResponse::getResult) .collect(Collectors.toList()); } catch (BiboxException e) { throw new ExchangeException(e.getMessage()); } } + } From a8df2844f37a771e374b9582c3c8f1d7d08eb753 Mon Sep 17 00:00:00 2001 From: cyril Date: Fri, 23 Feb 2018 14:40:30 +0100 Subject: [PATCH 104/117] small optim --- .../knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java index c92aaa905..48db44b30 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -61,7 +61,8 @@ public List getAllBiboxMarkets() throws IOException { public List getBiboxOrderBooks(Integer depth, Collection currencyPairs) { try { - List> allCommands = new HashSet<>(currencyPairs).stream() + List> allCommands = currencyPairs.stream() + .distinct() .filter(Objects::nonNull) .map(BiboxAdapters::toBiboxPair) .map(pair -> new BiboxOrderBookCommand(pair, depth)) From 66fe7dc6801eabeb00d2b70a1701cf3190ebae47 Mon Sep 17 00:00:00 2001 From: bharris Date: Fri, 23 Feb 2018 13:27:59 -0800 Subject: [PATCH 105/117] [abucoins] Abucoins doesn't support stop orders --- .../xchange/abucoins/service/AbucoinsAccountService.java | 2 -- .../xchange/abucoins/service/AbucoinsTradeService.java | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java index 69642b527..95db54b2c 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsAccountService.java @@ -19,8 +19,6 @@ import org.knowm.xchange.dto.account.AccountInfo; import org.knowm.xchange.dto.account.FundingRecord; import org.knowm.xchange.exceptions.ExchangeException; -import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; -import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.DefaultWithdrawFundsParams; import org.knowm.xchange.service.trade.params.TradeHistoryParams; diff --git a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java index a483bb2e0..ccf56c05f 100644 --- a/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java +++ b/xchange-abucoins/src/main/java/org/knowm/xchange/abucoins/service/AbucoinsTradeService.java @@ -15,6 +15,7 @@ import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.*; import org.knowm.xchange.exceptions.ExchangeException; +import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByCurrencyPair; @@ -78,7 +79,7 @@ public String placeLimitOrder(LimitOrder limitOrder) throws IOException { @Override public String placeStopOrder(StopOrder stopOrder) throws IOException { - throw new NotYetImplementedForExchangeException(); + throw new NotAvailableFromExchangeException(); } @Override @@ -101,12 +102,12 @@ public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { - throw new NotYetImplementedForExchangeException(); + throw new NotAvailableFromExchangeException(); } @Override public TradeHistoryParams createTradeHistoryParams() { - throw new NotYetImplementedForExchangeException(); + return new AbucoinsTradeHistoryParams(); } @Override From a82ae1f4c96329a8118e3b59bb952a0f54066fe0 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Sat, 24 Feb 2018 03:21:44 +0530 Subject: [PATCH 106/117] [ANXPRO] Adding Ripple withdrawal method + converting the int to BigInteger the amount_int parameter actually gets created by multiplying the exact amount with 1000000000, so flows out of range in int, for large number of XRP. --- .../java/org/knowm/xchange/anx/v2/ANXV2.java | 11 ++++++- .../anx/v2/service/ANXAccountService.java | 30 ++++++++++++++++++- .../anx/v2/service/ANXAccountServiceRaw.java | 15 +++++++++- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXV2.java b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXV2.java index 874b8d1fd..f6f4ae1f7 100644 --- a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXV2.java +++ b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXV2.java @@ -2,6 +2,7 @@ import java.io.IOException; import java.math.BigDecimal; +import java.math.BigInteger; import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; @@ -90,9 +91,17 @@ ANXBitcoinDepositAddressWrapper requestDepositAddress(@HeaderParam("Rest-Key") S @Consumes(MediaType.APPLICATION_FORM_URLENCODED) ANXWithdrawalResponseWrapper withdrawBtc(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, @FormParam("nonce") SynchronizedValueFactory nonce, @PathParam("currency") String currency, @FormParam("address") String address, - @FormParam("amount_int") int amount, @FormParam("fee_int") int fee, @FormParam("no_instant") boolean noInstant, + @FormParam("amount_int") BigInteger amount, @FormParam("fee_int") int fee, @FormParam("no_instant") boolean noInstant, @FormParam("green") boolean green) throws ANXException, IOException; + @POST + @Path("money/{currency}/send_simple") + @Consumes(MediaType.APPLICATION_FORM_URLENCODED) + ANXWithdrawalResponseWrapper withdrawXrp(@HeaderParam("Rest-Key") String apiKey, @HeaderParam("Rest-Sign") ParamsDigest postBodySignatureCreator, + @FormParam("nonce") SynchronizedValueFactory nonce, @PathParam("currency") String currency, @FormParam("address") String address, + @FormParam("amount_int") BigInteger amount, @FormParam("fee_int") int fee, @FormParam("no_instant") boolean noInstant, + @FormParam("green") boolean green, @FormParam("destinationTag") String destinationTag) throws ANXException, IOException; + // Trade API @POST @Path("{baseCurrency}{counterCurrency}/money/orders") diff --git a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountService.java b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountService.java index 90c3f008c..5d1882a47 100644 --- a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountService.java +++ b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountService.java @@ -18,6 +18,7 @@ import org.knowm.xchange.exceptions.NotAvailableFromExchangeException; import org.knowm.xchange.service.account.AccountService; import org.knowm.xchange.service.trade.params.DefaultWithdrawFundsParams; +import org.knowm.xchange.service.trade.params.RippleWithdrawFundsParams; import org.knowm.xchange.service.trade.params.TradeHistoryParamCurrency; import org.knowm.xchange.service.trade.params.TradeHistoryParamPaging; import org.knowm.xchange.service.trade.params.TradeHistoryParams; @@ -56,10 +57,32 @@ public String withdrawFunds(Currency currency, BigDecimal amount, String address } if (address == null) { - throw new IllegalArgumentException("Amount cannot be null"); + throw new IllegalArgumentException("Address cannot be null"); } ANXWithdrawalResponseWrapper wrapper = anxWithdrawFunds(currency.toString(), amount, address); + return handleWithdrawalResponse(wrapper); + } + + public String withdrawFunds(Currency currency, BigDecimal amount, String address, String tag) throws IOException { + + if (amount.scale() > ANXUtils.VOLUME_AND_AMOUNT_MAX_SCALE) { + throw new IllegalArgumentException("Amount scale exceed " + ANXUtils.VOLUME_AND_AMOUNT_MAX_SCALE); + } + + if (address == null) { + throw new IllegalArgumentException("Address cannot be null"); + } + + if (tag == null) { + throw new IllegalArgumentException("destinationTag cannot be null"); + } + + ANXWithdrawalResponseWrapper wrapper = anxWithdrawFunds(currency.toString(), amount, address, tag); + return handleWithdrawalResponse(wrapper); + } + + private String handleWithdrawalResponse(ANXWithdrawalResponseWrapper wrapper) { ANXWithdrawalResponse response = wrapper.getAnxWithdrawalResponse(); //eg: { "result": "error", "data": { "message": "min size, params, or available funds problem." }} @@ -75,6 +98,11 @@ public String withdrawFunds(Currency currency, BigDecimal amount, String address @Override public String withdrawFunds(WithdrawFundsParams params) throws IOException { + if (params instanceof RippleWithdrawFundsParams) { + RippleWithdrawFundsParams rippleWithdrawFundsParams = (RippleWithdrawFundsParams) params; + return withdrawFunds(rippleWithdrawFundsParams.currency, rippleWithdrawFundsParams.amount, rippleWithdrawFundsParams.address, + rippleWithdrawFundsParams.tag); + } if (params instanceof DefaultWithdrawFundsParams) { DefaultWithdrawFundsParams defaultParams = (DefaultWithdrawFundsParams) params; return withdrawFunds(defaultParams.currency, defaultParams.amount, defaultParams.address); diff --git a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountServiceRaw.java b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountServiceRaw.java index 669f38adf..eeeda54b8 100644 --- a/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountServiceRaw.java +++ b/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXAccountServiceRaw.java @@ -66,7 +66,7 @@ public ANXWithdrawalResponseWrapper anxWithdrawFunds(String currency, BigDecimal try { ANXWithdrawalResponseWrapper anxWithdrawalResponseWrapper = anxV2.withdrawBtc(exchange.getExchangeSpecification().getApiKey(), signatureCreator, exchange.getNonceFactory(), currency, address, - amount.multiply(new BigDecimal(ANXUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR_2)).intValue(), 1, false, false); + amount.multiply(new BigDecimal(ANXUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR_2)).toBigIntegerExact(), 1, false, false); return anxWithdrawalResponseWrapper; } catch (ANXException e) { throw handleError(e); @@ -75,6 +75,19 @@ public ANXWithdrawalResponseWrapper anxWithdrawFunds(String currency, BigDecimal } } + public ANXWithdrawalResponseWrapper anxWithdrawFunds(String currency, BigDecimal amount, String address, String destinationTag) + throws IOException { + try { + ANXWithdrawalResponseWrapper anxWithdrawalResponseWrapper = anxV2.withdrawXrp(exchange.getExchangeSpecification().getApiKey(), signatureCreator, + exchange.getNonceFactory(), currency, address, + amount.multiply(new BigDecimal(ANXUtils.BTC_VOLUME_AND_AMOUNT_INT_2_DECIMAL_FACTOR_2)).toBigIntegerExact(), 1, false, false, destinationTag); + return anxWithdrawalResponseWrapper; + } catch (ANXException e) { + throw handleError(e); + } catch (HttpStatusIOException e) { + throw handleHttpError(e); + } + } public ANXBitcoinDepositAddress anxRequestDepositAddress(String currency) throws IOException { try { From 6d650c2e56aa498a86fd1b608a3e4b9b22365c1e Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sat, 24 Feb 2018 13:19:26 +0100 Subject: [PATCH 107/117] [Bibox] Cancel multiple orders in one call --- .../org/knowm/xchange/bibox/BiboxAuthenticated.java | 13 +++++++++++++ .../xchange/bibox/service/BiboxTradeService.java | 6 ++++++ .../xchange/bibox/service/BiboxTradeServiceRaw.java | 11 +++++++++++ 3 files changed, 30 insertions(+) diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java index 73872af4f..27fab90fe 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/BiboxAuthenticated.java @@ -9,6 +9,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import org.knowm.xchange.bibox.dto.BiboxMultipleResponses; import org.knowm.xchange.bibox.dto.BiboxSingleResponse; import org.knowm.xchange.bibox.dto.account.BiboxCoin; import org.knowm.xchange.bibox.dto.trade.BiboxOrders; @@ -82,4 +83,16 @@ BiboxSingleResponse orderPendingList( @FormParam(FORM_CMDS) String cmds, @FormParam(FORM_APIKEY) String apiKey, @FormParam(FORM_SIGNATURE) ParamsDigest signature); + + /** + * Cancel multiple orders + * + * @return multiple times chinese for "cancelled", useless + */ + @POST + @Path("orderpending") + BiboxMultipleResponses cancelTrades( + @FormParam(FORM_CMDS) String cmds, + @FormParam(FORM_APIKEY) String apiKey, + @FormParam(FORM_SIGNATURE) ParamsDigest signature); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java index 099195746..060579af8 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeService.java @@ -2,6 +2,7 @@ import java.io.IOException; import java.util.Collection; +import java.util.List; import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.dto.BiboxAdapters; @@ -54,6 +55,11 @@ public boolean cancelOrder(String orderId) throws IOException { return true; } + public boolean cancelOrders(List orderIds) throws IOException { + cancelBiboxOrders(orderIds); + return true; + } + @Override public boolean cancelOrder(CancelOrderParams orderParams) throws IOException { if (orderParams instanceof CancelOrderByIdParams) { diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java index cb40a15be..acd82b70d 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java @@ -1,9 +1,12 @@ package org.knowm.xchange.bibox.service; import java.math.BigInteger; +import java.util.List; +import java.util.stream.Collectors; import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.dto.BiboxAdapters; +import org.knowm.xchange.bibox.dto.BiboxCommand; import org.knowm.xchange.bibox.dto.BiboxCommands; import org.knowm.xchange.bibox.dto.trade.BiboxAccountType; import org.knowm.xchange.bibox.dto.trade.BiboxCancelTradeCommand; @@ -68,4 +71,12 @@ public BiboxOrders getBiboxOrderHistory() { BiboxOrderHistoryCommand cmd = new BiboxOrderHistoryCommand(body); return bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); } + + public void cancelBiboxOrders(List orderIds) { + List> cmds = orderIds.stream() + .map(BigInteger::new) + .map(BiboxCancelTradeCommand::new) + .collect(Collectors.toList()); + bibox.cancelTrades(BiboxCommands.of(cmds).json(), apiKey, signatureCreator); + } } From a87f4db763c6346b16dd84ec8fad779d5e6b160d Mon Sep 17 00:00:00 2001 From: Oliver Drotleff Date: Sat, 24 Feb 2018 21:13:43 +0100 Subject: [PATCH 108/117] [Bibox] Improve exception handling Handle more than just HTTP errors. Bibox' exceptions are kind of useless, since they're in Chinese, but Google Translate works good enough. One could make a map of codes with English translations, but that would be too much work for now. --- .../knowm/xchange/bibox/dto/BiboxError.java | 26 +++++ .../bibox/dto/BiboxMultipleResponses.java | 14 +-- .../xchange/bibox/dto/BiboxResponse.java | 18 ++- .../bibox/dto/BiboxSingleResponse.java | 16 +-- .../bibox/service/BiboxAccountServiceRaw.java | 10 +- .../bibox/service/BiboxBaseService.java | 8 ++ .../service/BiboxMarketDataServiceRaw.java | 17 ++- .../bibox/service/BiboxTradeServiceRaw.java | 104 ++++++++++++------ 8 files changed, 142 insertions(+), 71 deletions(-) create mode 100644 xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxError.java diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxError.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxError.java new file mode 100644 index 000000000..fff5f6fba --- /dev/null +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxError.java @@ -0,0 +1,26 @@ +package org.knowm.xchange.bibox.dto; + +public class BiboxError { + private int code; + private String msg; + + public BiboxError() { + // TODO Default Constructor for Jackson + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } +} diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java index 1c1f9d963..f36a94eda 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxMultipleResponses.java @@ -8,17 +8,5 @@ * @author odrotleff * @param */ -public class BiboxMultipleResponses { - - private List> result; - - public BiboxMultipleResponses() {} - - public List> getResult() { - return result; - } - - public void setResult(List> result) { - this.result = result; - } +public class BiboxMultipleResponses extends BiboxResponse>> { } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java index 19a99b43b..282675e26 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxResponse.java @@ -3,24 +3,36 @@ /** * General Bibox response * - * @param Result type + * @param Result type * * @author odrotleff */ public class BiboxResponse { - private T result; - private String cmd; + protected T result; + protected String cmd; + protected BiboxError error = null; public T getResult() { return result; } + public void setResult(T result) { this.result = result; } + public String getCmd() { return cmd; } + public void setCmd(String cmd) { this.cmd = cmd; } + + public BiboxError getError() { + return error; + } + + public void setError(BiboxError error) { + this.error = error; + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java index 00eafdca6..d0f8df7ee 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/dto/BiboxSingleResponse.java @@ -1,27 +1,13 @@ package org.knowm.xchange.bibox.dto; -import java.util.List; - /** * Result of batched calls with just one call (which happens most of the time) * * @author odrotleff */ -public class BiboxSingleResponse { - - private List> result; +public class BiboxSingleResponse extends BiboxMultipleResponses { public BiboxResponse get() { return result.get(0); } - - public BiboxSingleResponse() {} - - public List> getResult() { - return result; - } - - public void setResult(List> result) { - this.result = result; - } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java index fccb5842d..11552fe9d 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxAccountServiceRaw.java @@ -7,6 +7,7 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.BiboxException; import org.knowm.xchange.bibox.dto.BiboxCommands; +import org.knowm.xchange.bibox.dto.BiboxSingleResponse; import org.knowm.xchange.bibox.dto.account.BiboxCoin; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.exceptions.ExchangeException; @@ -22,7 +23,9 @@ protected BiboxAccountServiceRaw(Exchange exchange) { public List getBiboxAccountInfo() { try { - return bibox.coinList(COIN_LIST_CMD.json(), apiKey, signatureCreator).get().getResult(); + BiboxSingleResponse> response = bibox.coinList(COIN_LIST_CMD.json(), apiKey, signatureCreator); + throwErrors(response); + return response.get().getResult(); } catch (BiboxException e) { throw new ExchangeException(e.getMessage()); } @@ -30,8 +33,9 @@ public List getBiboxAccountInfo() { public String requestBiboxDepositAddress(Currency currency) { try { - return bibox.depositAddress(BiboxCommands.depositAddressCommand(currency.getCurrencyCode()).json(), - apiKey, signatureCreator).get().getResult(); + BiboxSingleResponse response = bibox.depositAddress(BiboxCommands.depositAddressCommand(currency.getCurrencyCode()).json(), apiKey, signatureCreator); + throwErrors(response); + return response.get().getResult(); } catch (BiboxException e) { throw new ExchangeException(e.getMessage()); } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java index 462fd242e..e6fd9e44e 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxBaseService.java @@ -2,6 +2,8 @@ import org.knowm.xchange.Exchange; import org.knowm.xchange.bibox.BiboxAuthenticated; +import org.knowm.xchange.bibox.dto.BiboxResponse; +import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.service.BaseExchangeService; import org.knowm.xchange.service.BaseService; @@ -25,4 +27,10 @@ protected BiboxBaseService(Exchange exchange) { this.apiKey = exchange.getExchangeSpecification().getApiKey(); this.signatureCreator = BiboxDigest.createInstance(exchange.getExchangeSpecification().getSecretKey()); } + + protected static void throwErrors(BiboxResponse response) { + if (response.getError() != null) { + throw new ExchangeException(response.getError().getCode() + ": " + response.getError().getMsg()); + } + } } diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java index 58d93ed5d..4746ce752 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxMarketDataServiceRaw.java @@ -11,6 +11,7 @@ import org.knowm.xchange.bibox.dto.BiboxAdapters; import org.knowm.xchange.bibox.dto.BiboxCommand; import org.knowm.xchange.bibox.dto.BiboxCommands; +import org.knowm.xchange.bibox.dto.BiboxMultipleResponses; import org.knowm.xchange.bibox.dto.BiboxResponse; import org.knowm.xchange.bibox.dto.marketdata.BiboxMarket; import org.knowm.xchange.bibox.dto.marketdata.BiboxOrderBookCommand; @@ -34,7 +35,9 @@ protected BiboxMarketDataServiceRaw(Exchange exchange) { public BiboxTicker getBiboxTicker(CurrencyPair currencyPair) throws IOException { try { - return bibox.mdata(TICKER_CMD, toBiboxPair(currencyPair)).getResult(); + BiboxResponse response = bibox.mdata(TICKER_CMD, toBiboxPair(currencyPair)); + throwErrors(response); + return response.getResult(); } catch (BiboxException e) { throw new ExchangeException(e.getMessage()); } @@ -42,7 +45,9 @@ public BiboxTicker getBiboxTicker(CurrencyPair currencyPair) throws IOException public BiboxOrderBook getBiboxOrderBook(CurrencyPair currencyPair, Integer depth) throws IOException { try { - return bibox.orderBook(DEPTH_CMD, BiboxAdapters.toBiboxPair(currencyPair), depth).getResult(); + BiboxResponse response = bibox.orderBook(DEPTH_CMD, BiboxAdapters.toBiboxPair(currencyPair), depth); + throwErrors(response); + return response.getResult(); } catch (BiboxException e) { throw new ExchangeException(e.getMessage()); } @@ -50,7 +55,9 @@ public BiboxOrderBook getBiboxOrderBook(CurrencyPair currencyPair, Integer depth public List getAllBiboxMarkets() throws IOException { try { - return bibox.marketAll(ALL_TICKERS_CMD).getResult(); + BiboxResponse> response = bibox.marketAll(ALL_TICKERS_CMD); + throwErrors(response); + return response.getResult(); } catch (BiboxException e) { throw new ExchangeException(e.getMessage()); } @@ -62,7 +69,9 @@ public List getAllBiboxOrderBooks(Integer depth) { .map(BiboxAdapters::toBiboxPair) .map(pair -> new BiboxOrderBookCommand(pair, depth)) .collect(Collectors.toList()); - return bibox.allOrderBooks(BiboxCommands.of(allCommands).json()).getResult().stream() + BiboxMultipleResponses response = bibox.allOrderBooks(BiboxCommands.of(allCommands).json()); + throwErrors(response); + return response.getResult().stream() .map(BiboxResponse::getResult) .collect(Collectors.toList()); } catch (BiboxException e) { diff --git a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java index acd82b70d..c6db78ec9 100644 --- a/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java +++ b/xchange-bibox/src/main/java/org/knowm/xchange/bibox/service/BiboxTradeServiceRaw.java @@ -5,9 +5,12 @@ import java.util.stream.Collectors; import org.knowm.xchange.Exchange; +import org.knowm.xchange.bibox.BiboxException; import org.knowm.xchange.bibox.dto.BiboxAdapters; import org.knowm.xchange.bibox.dto.BiboxCommand; import org.knowm.xchange.bibox.dto.BiboxCommands; +import org.knowm.xchange.bibox.dto.BiboxMultipleResponses; +import org.knowm.xchange.bibox.dto.BiboxSingleResponse; import org.knowm.xchange.bibox.dto.trade.BiboxAccountType; import org.knowm.xchange.bibox.dto.trade.BiboxCancelTradeCommand; import org.knowm.xchange.bibox.dto.trade.BiboxOrderHistoryCommand; @@ -19,6 +22,7 @@ import org.knowm.xchange.bibox.dto.trade.BiboxTradeCommand; import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.MarketOrder; +import org.knowm.xchange.exceptions.ExchangeException; /** * @author odrotleff @@ -30,53 +34,87 @@ protected BiboxTradeServiceRaw(Exchange exchange) { } public Integer placeBiboxLimitOrder(LimitOrder limitOrder) { - BiboxTradeCommand cmd = new BiboxTradeCommand( - BiboxAdapters.toBiboxPair(limitOrder.getCurrencyPair()), - BiboxAccountType.REGULAR.asInt(), - BiboxOrderType.LIMIT_ORDER.asInt(), - BiboxOrderSide.fromOrderType(limitOrder.getType()).asInt(), - true, - limitOrder.getLimitPrice(), - limitOrder.getOriginalAmount(), - null); - return bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + try { + BiboxTradeCommand cmd = new BiboxTradeCommand( + BiboxAdapters.toBiboxPair(limitOrder.getCurrencyPair()), + BiboxAccountType.REGULAR.asInt(), + BiboxOrderType.LIMIT_ORDER.asInt(), + BiboxOrderSide.fromOrderType(limitOrder.getType()).asInt(), + true, + limitOrder.getLimitPrice(), + limitOrder.getOriginalAmount(), + null); + BiboxSingleResponse response = bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); + throwErrors(response); + return response.get().getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } } public Integer placeBiboxMarketOrder(MarketOrder marketOrder) { - BiboxTradeCommand cmd = new BiboxTradeCommand( - BiboxAdapters.toBiboxPair(marketOrder.getCurrencyPair()), - BiboxAccountType.REGULAR.asInt(), - BiboxOrderType.MARKET_ORDER.asInt(), - BiboxOrderSide.fromOrderType(marketOrder.getType()).asInt(), - true, - null, - marketOrder.getOriginalAmount(), - null); - return bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + try { + BiboxTradeCommand cmd = new BiboxTradeCommand( + BiboxAdapters.toBiboxPair(marketOrder.getCurrencyPair()), + BiboxAccountType.REGULAR.asInt(), + BiboxOrderType.MARKET_ORDER.asInt(), + BiboxOrderSide.fromOrderType(marketOrder.getType()).asInt(), + true, + null, + marketOrder.getOriginalAmount(), + null); + BiboxSingleResponse response = bibox.trade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); + throwErrors(response); + return response.get().getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } } public void cancelBiboxOrder(String orderId) { - BiboxCancelTradeCommand cmd = new BiboxCancelTradeCommand(new BigInteger(orderId)); - bibox.cancelTrade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); + try { + BiboxCancelTradeCommand cmd = new BiboxCancelTradeCommand(new BigInteger(orderId)); + BiboxSingleResponse response = bibox.cancelTrade(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); + throwErrors(response); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } } public BiboxOrders getBiboxOpenOrders() { - BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, Integer.MAX_VALUE); // wonder if this actually works - BiboxOrderPendingListCommand cmd = new BiboxOrderPendingListCommand(body); - return bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + try { + BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, Integer.MAX_VALUE); // wonder if this actually works + BiboxOrderPendingListCommand cmd = new BiboxOrderPendingListCommand(body); + BiboxSingleResponse response = bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); + throwErrors(response); + return response.get().getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } } public BiboxOrders getBiboxOrderHistory() { - BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, Integer.MAX_VALUE); // wonder if this actually works - BiboxOrderHistoryCommand cmd = new BiboxOrderHistoryCommand(body); - return bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator).get().getResult(); + try { + BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, Integer.MAX_VALUE); // wonder if this actually works + BiboxOrderHistoryCommand cmd = new BiboxOrderHistoryCommand(body); + BiboxSingleResponse response = bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator); + throwErrors(response); + return response.get().getResult(); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } } public void cancelBiboxOrders(List orderIds) { - List> cmds = orderIds.stream() - .map(BigInteger::new) - .map(BiboxCancelTradeCommand::new) - .collect(Collectors.toList()); - bibox.cancelTrades(BiboxCommands.of(cmds).json(), apiKey, signatureCreator); + try { + List> cmds = orderIds.stream() + .map(BigInteger::new) + .map(BiboxCancelTradeCommand::new) + .collect(Collectors.toList()); + BiboxMultipleResponses response = bibox.cancelTrades(BiboxCommands.of(cmds).json(), apiKey, signatureCreator); + throwErrors(response); + } catch (BiboxException e) { + throw new ExchangeException(e.getMessage()); + } } } From 81afd3e72c16b46536edd160447e08e55ed71fe3 Mon Sep 17 00:00:00 2001 From: Ujjwal Kabra Date: Sun, 25 Feb 2018 01:47:48 +0530 Subject: [PATCH 109/117] [bitfinex] Part of remoteInit is authenticated only. --- .../xchange/bitfinex/v1/BitfinexExchange.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java index 1db915c9c..9402895b9 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexExchange.java @@ -59,14 +59,17 @@ public void remoteInit() throws IOException, ExchangeException { final List symbolDetails = dataService.getSymbolDetails(); exchangeMetaData = BitfinexAdapters.adaptMetaData(exchangeMetaData, symbolDetails); - BitfinexAccountService accountService = (BitfinexAccountService) this.accountService; - final BitfinexAccountFeesResponse accountFees = accountService.getAccountFees(); - exchangeMetaData = BitfinexAdapters.adaptMetaData(accountFees, exchangeMetaData); + if (exchangeSpecification.getApiKey() != null && exchangeSpecification.getSecretKey() != null) { + // Additional remoteInit configuration for authenticated instances + BitfinexAccountService accountService = (BitfinexAccountService) this.accountService; + final BitfinexAccountFeesResponse accountFees = accountService.getAccountFees(); + exchangeMetaData = BitfinexAdapters.adaptMetaData(accountFees, exchangeMetaData); - BitfinexTradeService tradeService = (BitfinexTradeService) this.tradeService; - final BitfinexAccountInfosResponse[] bitfinexAccountInfos = tradeService.getBitfinexAccountInfos(); + BitfinexTradeService tradeService = (BitfinexTradeService) this.tradeService; + final BitfinexAccountInfosResponse[] bitfinexAccountInfos = tradeService.getBitfinexAccountInfos(); - exchangeMetaData = BitfinexAdapters.adaptMetaData(bitfinexAccountInfos, exchangeMetaData); + exchangeMetaData = BitfinexAdapters.adaptMetaData(bitfinexAccountInfos, exchangeMetaData); + } } } From 06715cfdadef06542a09ab40fbd35932e633deb4 Mon Sep 17 00:00:00 2001 From: cyril Date: Sun, 25 Feb 2018 12:01:46 +0100 Subject: [PATCH 110/117] fixed NPE (product.getMinLimitQuantity()) + code cleaning --- .../xchange/livecoin/LivecoinAdapters.java | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java b/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java index bfe584803..0329b32cf 100644 --- a/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java +++ b/xchange-livecoin/src/main/java/org/knowm/xchange/livecoin/LivecoinAdapters.java @@ -64,9 +64,7 @@ public static OrderBook adaptOrderBook(LivecoinOrderBook book, CurrencyPair curr private static List toLimitOrderList(LivecoinAsksBidsData[] levels, OrderType orderType, CurrencyPair currencyPair) { List allLevels = new ArrayList<>(levels.length); - for (int i = 0; i < levels.length; i++) { - LivecoinAsksBidsData ask = levels[i]; - + for (LivecoinAsksBidsData ask : levels) { allLevels.add(new LimitOrder(orderType, ask.getQuantity(), currencyPair, "0", null, ask.getRate())); } @@ -91,7 +89,8 @@ public static ExchangeMetaData adaptToExchangeMetaData(ExchangeMetaData exchange Map currencyPairs = exchangeMetaData.getCurrencyPairs(); Map currencies = exchangeMetaData.getCurrencies(); for (LivecoinRestriction product : products) { - BigDecimal minSize = product.getMinLimitQuantity().setScale(product.getPriceScale(), BigDecimal.ROUND_UNNECESSARY); + BigDecimal minSize = product.getMinLimitQuantity() == null ? BigDecimal.ZERO : product.getMinLimitQuantity(); + minSize = minSize.setScale(product.getPriceScale(), BigDecimal.ROUND_UNNECESSARY); CurrencyPair pair = adaptCurrencyPair(product); @@ -118,11 +117,8 @@ public static Trades adaptTrades(LivecoinTrade[] nativeTrades, CurrencyPair curr List trades = new ArrayList<>(nativeTrades.length); - for (int i = 0; i < nativeTrades.length; i++) { - LivecoinTrade trade = nativeTrades[i]; - + for (LivecoinTrade trade : nativeTrades) { OrderType type = trade.getType().equals("SELL") ? OrderType.BID : OrderType.ASK; - Trade t = new Trade(type, trade.getQuantity(), currencyPair, trade.getPrice(), parseDate(trade.getTime()), String.valueOf(trade.getId())); trades.add(t); } @@ -131,7 +127,7 @@ public static Trades adaptTrades(LivecoinTrade[] nativeTrades, CurrencyPair curr } private static Date parseDate(Long rawDateLong) { - return new Date((long) rawDateLong * 1000); + return new Date(rawDateLong * 1000); } public static Ticker adaptTicker(LivecoinTicker ticker, CurrencyPair currencyPair) { @@ -149,16 +145,22 @@ public static LimitOrder adaptOpenOrder(Map map) { String typeName = map.get("type").toString(); OrderType type; - if (typeName.equals("MARKET_SELL")) - type = OrderType.ASK; - else if (typeName.equals("LIMIT_SELL")) - type = OrderType.ASK; - else if (typeName.equals("LIMIT_BUY")) - type = OrderType.BID; - else if (typeName.equals("MARKET_BUY")) - type = OrderType.BID; - else - throw new IllegalStateException("Don't understand " + map); + switch (typeName) { + case "MARKET_SELL": + type = OrderType.ASK; + break; + case "LIMIT_SELL": + type = OrderType.ASK; + break; + case "LIMIT_BUY": + type = OrderType.BID; + break; + case "MARKET_BUY": + type = OrderType.BID; + break; + default: + throw new IllegalStateException("Don't understand " + map); + } String ccyPair = map.get("currencyPair").toString(); String[] pair = ccyPair.split("/"); From 08a0bc03e8de956c6a1308deed1d18ad8207d5a0 Mon Sep 17 00:00:00 2001 From: cyril Date: Sun, 25 Feb 2018 12:34:39 +0100 Subject: [PATCH 111/117] fixed wrong cumulative amount calculation --- .../main/java/org/knowm/xchange/liqui/LiquiAdapters.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xchange-liqui/src/main/java/org/knowm/xchange/liqui/LiquiAdapters.java b/xchange-liqui/src/main/java/org/knowm/xchange/liqui/LiquiAdapters.java index a4e7f28bc..8952abe80 100644 --- a/xchange-liqui/src/main/java/org/knowm/xchange/liqui/LiquiAdapters.java +++ b/xchange-liqui/src/main/java/org/knowm/xchange/liqui/LiquiAdapters.java @@ -158,7 +158,7 @@ public static UserTrade adaptTrade(final LiquiUserTrade liquiTrade, final Long t final OrderType orderType = adaptOrderType(liquiTrade.getType()); final BigDecimal originalAmount = liquiTrade.getAmount(); final CurrencyPair pair = liquiTrade.getPair(); - final Date timestamp = new Date((long) (liquiTrade.getTimestamp() * 1000L)); + final Date timestamp = new Date(liquiTrade.getTimestamp() * 1000L); final BigDecimal price = liquiTrade.getRate(); return new UserTrade(orderType, originalAmount, pair, price, timestamp, String.valueOf(tradeId), @@ -168,10 +168,10 @@ public static UserTrade adaptTrade(final LiquiUserTrade liquiTrade, final Long t public static Order adaptOrderInfo(final LiquiOrderInfo info) { final OrderType orderType = adaptOrderType(info.getType()); final CurrencyPair pair = info.getPair(); - final BigDecimal amount = info.getAmount(); + final BigDecimal amount = info.getStartAmount().subtract(info.getAmount()); final BigDecimal startAmount = info.getStartAmount(); final BigDecimal rate = info.getRate(); - final Date timestamp = new Date((long) (info.getTimestampCreated() * 1000L)); + final Date timestamp = new Date(info.getTimestampCreated() * 1000L); return new LimitOrder(orderType, startAmount, amount, pair, "", timestamp, rate); } From 52715750bdf7c2d3621a71e3fb8a78e1ea0c6336 Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Mon, 22 Jan 2018 14:00:22 -0600 Subject: [PATCH 112/117] [itbit] fix trade tid to matchNumber --- .../org/knowm/xchange/itbit/v1/ItBitAdapters.java | 14 +++++++------- .../itbit/v1/dto/marketdata/ItBitTrade.java | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java index da6e98dff..74332a4ca 100644 --- a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java +++ b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/ItBitAdapters.java @@ -102,15 +102,15 @@ private static Date parseDate(String date) { public static Trades adaptTrades(ItBitTrades trades, CurrencyPair currencyPair) throws InvalidFormatException { List tradesList = new ArrayList<>(trades.getCount()); - long lastTradeId = 0; + long lastMatchNumber = 0; for (int i = 0; i < trades.getCount(); i++) { ItBitTrade trade = trades.getTrades()[i]; - long tradeId = trade.getTid(); - if (tradeId > lastTradeId) - lastTradeId = tradeId; + long matchNumber = trade.getMatchNumber(); + if (matchNumber > lastMatchNumber) + lastMatchNumber = matchNumber; tradesList.add(adaptTrade(trade, currencyPair)); } - return new Trades(tradesList, lastTradeId, TradeSortType.SortByID); + return new Trades(tradesList, lastMatchNumber, TradeSortType.SortByID); } public static Trade adaptTrade(ItBitTrade trade, CurrencyPair currencyPair) throws InvalidFormatException { @@ -123,9 +123,9 @@ public static Trade adaptTrade(ItBitTrade trade, CurrencyPair currencyPair) thro timestamp = matcher.group(1) + "Z"; } Date date = DateUtils.fromISODateString(timestamp); - final String tradeId = String.valueOf(trade.getTid()); + final String matchNumber = String.valueOf(trade.getMatchNumber()); - return new Trade(null, trade.getAmount(), currencyPair, trade.getPrice(), date, tradeId); + return new Trade(null, trade.getAmount(), currencyPair, trade.getPrice(), date, matchNumber); } public static List adaptOrders(List orders, CurrencyPair currencyPair, OrderType orderType) { diff --git a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/dto/marketdata/ItBitTrade.java b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/dto/marketdata/ItBitTrade.java index 57573d71c..20e8d9150 100644 --- a/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/dto/marketdata/ItBitTrade.java +++ b/xchange-itbit/src/main/java/org/knowm/xchange/itbit/v1/dto/marketdata/ItBitTrade.java @@ -9,15 +9,15 @@ public class ItBitTrade { private final BigDecimal amount; private final String timestamp; private final BigDecimal price; - private final long tid; + private final long matchNumber; public ItBitTrade(@JsonProperty("amount") BigDecimal amount, @JsonProperty("timestamp") String timestamp, @JsonProperty("price") BigDecimal price, - @JsonProperty("tid") long tid) { + @JsonProperty("matchNumber") long matchNumber) { this.amount = amount; this.timestamp = timestamp; this.price = price; - this.tid = tid; + this.matchNumber = matchNumber; } public BigDecimal getAmount() { @@ -35,9 +35,9 @@ public BigDecimal getPrice() { return price; } - public long getTid() { + public long getMatchNumber() { - return tid; + return matchNumber; } @Override @@ -50,8 +50,8 @@ public String toString() { builder.append(timestamp); builder.append(", price="); builder.append(price); - builder.append(", tid="); - builder.append(tid); + builder.append(", matchNumber="); + builder.append(matchNumber); builder.append("]"); return builder.toString(); } From 022ef715ac9ee090077ad0a6e19cda40cca6c053 Mon Sep 17 00:00:00 2001 From: npomfret Date: Tue, 27 Feb 2018 11:27:22 +0000 Subject: [PATCH 113/117] improved toString for LimitOrder --- .../main/java/org/knowm/xchange/dto/trade/LimitOrder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xchange-core/src/main/java/org/knowm/xchange/dto/trade/LimitOrder.java b/xchange-core/src/main/java/org/knowm/xchange/dto/trade/LimitOrder.java index 46f63482c..24490eb22 100644 --- a/xchange-core/src/main/java/org/knowm/xchange/dto/trade/LimitOrder.java +++ b/xchange-core/src/main/java/org/knowm/xchange/dto/trade/LimitOrder.java @@ -82,8 +82,11 @@ public BigDecimal getLimitPrice() { @Override public String toString() { + return "LimitOrder [limitPrice=" + printLimitPrice() + ", " + super.toString() + "]"; + } - return "LimitOrder [limitPrice=" + limitPrice + ", " + super.toString() + "]"; + private String printLimitPrice() { + return limitPrice == null ? null : limitPrice.toPlainString(); } @Override From 53b9fd48382dbe7915160d8a1ddb9e9ce9e9540a Mon Sep 17 00:00:00 2001 From: npomfret Date: Tue, 27 Feb 2018 12:07:04 +0000 Subject: [PATCH 114/117] [quoine] added cumulativeAmount to open orders --- .../src/main/java/org/knowm/xchange/quoine/QuoineAdapters.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xchange-quoine/src/main/java/org/knowm/xchange/quoine/QuoineAdapters.java b/xchange-quoine/src/main/java/org/knowm/xchange/quoine/QuoineAdapters.java index 5fd8e5a54..c43b45986 100644 --- a/xchange-quoine/src/main/java/org/knowm/xchange/quoine/QuoineAdapters.java +++ b/xchange-quoine/src/main/java/org/knowm/xchange/quoine/QuoineAdapters.java @@ -132,7 +132,7 @@ public static OpenOrders adapteOpenOrders(QuoineOrdersList quoineOrdersList) { // Timestamp Date timestamp = new Date(model.getCreatedAt().longValue() * 1000L); - LimitOrder limitOrder = new LimitOrder(orderType, model.getQuantity(), currencyPair, model.getId(), timestamp, model.getPrice()); + LimitOrder limitOrder = new LimitOrder(orderType, model.getQuantity(), model.getFilledQuantity(), currencyPair, model.getId(), timestamp, model.getPrice()); openOrders.add(limitOrder); } From 1688b043db26e8a70d6e067b502302a597959878 Mon Sep 17 00:00:00 2001 From: npomfret Date: Tue, 27 Feb 2018 12:17:14 +0000 Subject: [PATCH 115/117] [kraken] fixed timestamp parse for open orders --- .../main/java/org/knowm/xchange/kraken/KrakenAdapters.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java index 7f373a704..9fdaa5e25 100644 --- a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java +++ b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java @@ -119,13 +119,16 @@ public static Order adaptOrder(String orderId, KrakenOrder krakenOrder) { orderStatus = OrderStatus.PARTIALLY_FILLED; } + Double time = krakenOrder.getOpenTimestamp() * 1000;//eg: "opentm":1519731205.9987 + Date timestamp = new Date(time.longValue()); + if(krakenOrder.getOrderDescription().getOrderType().equals(KrakenOrderType.LIMIT)) return new LimitOrder( orderType, krakenOrder.getVolume(), currencyPair, orderId, - new Date(new Double(krakenOrder.getOpenTimestamp()).longValue()), + timestamp, krakenOrder.getOrderDescription().getPrice(), krakenOrder.getPrice(), krakenOrder.getVolumeExecuted(), @@ -139,7 +142,7 @@ public static Order adaptOrder(String orderId, KrakenOrder krakenOrder) { krakenOrder.getVolume(), currencyPair, orderId, - new Date(new Double(krakenOrder.getOpenTimestamp()).longValue()), + timestamp, krakenOrder.getPrice(), krakenOrder.getVolumeExecuted(), krakenOrder.getFee(), From 78a0312b5b85123b6f95a417195f4a4b1b9a14cd Mon Sep 17 00:00:00 2001 From: npomfret Date: Tue, 27 Feb 2018 12:18:39 +0000 Subject: [PATCH 116/117] [kraken] just a reformat (no functional change) --- .../knowm/xchange/kraken/KrakenAdapters.java | 74 ++++++++++--------- .../kraken/service/KrakenBaseService.java | 17 +++-- .../kraken/service/KrakenTradeService.java | 10 +-- .../kraken/service/KrakenTradeServiceRaw.java | 12 +-- 4 files changed, 63 insertions(+), 50 deletions(-) diff --git a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java index 9fdaa5e25..3bcbfb08a 100644 --- a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java +++ b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/KrakenAdapters.java @@ -28,7 +28,11 @@ import org.knowm.xchange.dto.meta.CurrencyMetaData; import org.knowm.xchange.dto.meta.CurrencyPairMetaData; import org.knowm.xchange.dto.meta.ExchangeMetaData; -import org.knowm.xchange.dto.trade.*; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.MarketOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.UserTrade; +import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.kraken.dto.account.KrakenDepositAddress; import org.knowm.xchange.kraken.dto.account.KrakenLedger; @@ -38,7 +42,14 @@ import org.knowm.xchange.kraken.dto.marketdata.KrakenPublicOrder; import org.knowm.xchange.kraken.dto.marketdata.KrakenPublicTrade; import org.knowm.xchange.kraken.dto.marketdata.KrakenTicker; -import org.knowm.xchange.kraken.dto.trade.*; +import org.knowm.xchange.kraken.dto.trade.KrakenOrder; +import org.knowm.xchange.kraken.dto.trade.KrakenOrderDescription; +import org.knowm.xchange.kraken.dto.trade.KrakenOrderResponse; +import org.knowm.xchange.kraken.dto.trade.KrakenOrderStatus; +import org.knowm.xchange.kraken.dto.trade.KrakenOrderType; +import org.knowm.xchange.kraken.dto.trade.KrakenTrade; +import org.knowm.xchange.kraken.dto.trade.KrakenType; +import org.knowm.xchange.kraken.dto.trade.KrakenUserTrade; public class KrakenAdapters { @@ -94,13 +105,13 @@ public List getLimitOrders() { } } - public static List adaptOrders(Map krakenOrdersMap) { + public static List adaptOrders(Map krakenOrdersMap) { return krakenOrdersMap - .entrySet() - .stream() - .map(krakenOrderEntry -> adaptOrder(krakenOrderEntry.getKey(),krakenOrderEntry.getValue())) - .collect(Collectors.toList()); + .entrySet() + .stream() + .map(krakenOrderEntry -> adaptOrder(krakenOrderEntry.getKey(), krakenOrderEntry.getValue())) + .collect(Collectors.toList()); } @@ -115,44 +126,42 @@ public static Order adaptOrder(String orderId, KrakenOrder krakenOrder) { BigDecimal fee = krakenOrder.getFee(); if (orderStatus == OrderStatus.NEW && filledAmount.compareTo(BigDecimal.ZERO) > 0 - && filledAmount.compareTo(originalAmount) < 0) { + && filledAmount.compareTo(originalAmount) < 0) { orderStatus = OrderStatus.PARTIALLY_FILLED; } Double time = krakenOrder.getOpenTimestamp() * 1000;//eg: "opentm":1519731205.9987 Date timestamp = new Date(time.longValue()); - if(krakenOrder.getOrderDescription().getOrderType().equals(KrakenOrderType.LIMIT)) + if (krakenOrder.getOrderDescription().getOrderType().equals(KrakenOrderType.LIMIT)) return new LimitOrder( - orderType, - krakenOrder.getVolume(), - currencyPair, - orderId, - timestamp, - krakenOrder.getOrderDescription().getPrice(), - krakenOrder.getPrice(), - krakenOrder.getVolumeExecuted(), - krakenOrder.getFee(), - adaptOrderStatus(krakenOrder.getStatus()) + orderType, + krakenOrder.getVolume(), + currencyPair, + orderId, + timestamp, + krakenOrder.getOrderDescription().getPrice(), + krakenOrder.getPrice(), + krakenOrder.getVolumeExecuted(), + krakenOrder.getFee(), + adaptOrderStatus(krakenOrder.getStatus()) ); - if(krakenOrder.getOrderDescription().getOrderType().equals(KrakenOrderType.MARKET)) + if (krakenOrder.getOrderDescription().getOrderType().equals(KrakenOrderType.MARKET)) return new MarketOrder( - orderType, - krakenOrder.getVolume(), - currencyPair, - orderId, - timestamp, - krakenOrder.getPrice(), - krakenOrder.getVolumeExecuted(), - krakenOrder.getFee(), - orderStatus + orderType, + krakenOrder.getVolume(), + currencyPair, + orderId, + timestamp, + krakenOrder.getPrice(), + krakenOrder.getVolumeExecuted(), + krakenOrder.getFee(), + orderStatus ); - throw new NotYetImplementedForExchangeException(); - } public static LimitOrder adaptOrder(KrakenPublicOrder order, OrderType orderType, CurrencyPair currencyPair) { @@ -242,13 +251,12 @@ public static OpenOrders adaptOpenOrders(Map krakenOrders) continue; } - limitOrders.add((LimitOrder) adaptOrder(krakenOrderEntry.getKey(), krakenOrder)); + limitOrders.add((LimitOrder) adaptOrder(krakenOrderEntry.getKey(), krakenOrder)); } return new OpenOrders(limitOrders); } - public static UserTrades adaptTradesHistory(Map krakenTrades) { List trades = new ArrayList<>(); diff --git a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenBaseService.java b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenBaseService.java index e6b0d618b..49c4b60c7 100644 --- a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenBaseService.java +++ b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenBaseService.java @@ -1,10 +1,18 @@ package org.knowm.xchange.kraken.service; +import java.io.IOException; +import java.util.Arrays; +import java.util.Set; + import org.knowm.xchange.Exchange; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order.IOrderFlags; -import org.knowm.xchange.exceptions.*; +import org.knowm.xchange.exceptions.ExchangeException; +import org.knowm.xchange.exceptions.FrequencyLimitExceededException; +import org.knowm.xchange.exceptions.FundsExceededException; +import org.knowm.xchange.exceptions.NonceException; +import org.knowm.xchange.exceptions.RateLimitExceededException; import org.knowm.xchange.kraken.KrakenAuthenticated; import org.knowm.xchange.kraken.KrakenUtils; import org.knowm.xchange.kraken.dto.KrakenResult; @@ -15,13 +23,10 @@ import org.knowm.xchange.kraken.dto.trade.KrakenOrderFlags; import org.knowm.xchange.service.BaseExchangeService; import org.knowm.xchange.service.BaseService; + import si.mazi.rescu.ParamsDigest; import si.mazi.rescu.RestProxyFactory; -import java.io.IOException; -import java.util.Arrays; -import java.util.Set; - public class KrakenBaseService extends BaseExchangeService implements BaseService { protected KrakenAuthenticated kraken; @@ -72,7 +77,7 @@ protected R checkResult(KrakenResult krakenResult) { } else if ("EOrder:Insufficient funds".equals(error)) { throw new FundsExceededException(error); } - if("EAPI:Rate limit exceeded".equals(error)) { + if ("EAPI:Rate limit exceeded".equals(error)) { throw new RateLimitExceededException(error); } diff --git a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeService.java b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeService.java index f4fbd6d49..bb1718451 100644 --- a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeService.java +++ b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeService.java @@ -1,18 +1,18 @@ package org.knowm.xchange.kraken.service; import java.io.IOException; -import java.util.ArrayList; import java.util.Collection; -import java.util.List; -import java.util.Map; import org.knowm.xchange.Exchange; import org.knowm.xchange.dto.Order; -import org.knowm.xchange.dto.trade.*; +import org.knowm.xchange.dto.trade.LimitOrder; +import org.knowm.xchange.dto.trade.MarketOrder; +import org.knowm.xchange.dto.trade.OpenOrders; +import org.knowm.xchange.dto.trade.StopOrder; +import org.knowm.xchange.dto.trade.UserTrades; import org.knowm.xchange.exceptions.ExchangeException; import org.knowm.xchange.exceptions.NotYetImplementedForExchangeException; import org.knowm.xchange.kraken.KrakenAdapters; -import org.knowm.xchange.kraken.dto.trade.KrakenOrder; import org.knowm.xchange.service.trade.TradeService; import org.knowm.xchange.service.trade.params.CancelOrderByIdParams; import org.knowm.xchange.service.trade.params.CancelOrderParams; diff --git a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeServiceRaw.java b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeServiceRaw.java index 0d5b899b4..0625bdb38 100644 --- a/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeServiceRaw.java +++ b/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenTradeServiceRaw.java @@ -189,12 +189,12 @@ protected Map getOrders(String... orderIds) throws IOExcept String orderIdsString = String.join(",", orderIds); KrakenQueryOrderResult krakenOrderResult = kraken.queryOrders( - false, - null, - orderIdsString, - exchange.getExchangeSpecification().getApiKey(), - signatureCreator, - exchange.getNonceFactory()); + false, + null, + orderIdsString, + exchange.getExchangeSpecification().getApiKey(), + signatureCreator, + exchange.getNonceFactory()); return checkResult(krakenOrderResult); } From e73469886de850ce42c8e6013dda0edbaa74cebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herman=20Ofenb=C3=B6ck?= Date: Tue, 27 Feb 2018 20:28:03 +0100 Subject: [PATCH 117/117] [bitfinex] Adding bitcoin cash as withdrawal type. --- .../java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java index 20ed2bb08..9186024b6 100644 --- a/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java +++ b/xchange-bitfinex/src/main/java/org/knowm/xchange/bitfinex/v1/BitfinexUtils.java @@ -32,6 +32,9 @@ public static String toPairString(CurrencyPair currencyPair) { * From the reference documentation for field withdraw_type (2018-02-14); * can be one of the following ['bitcoin', 'litecoin', 'ethereum', 'ethereumc', 'mastercoin', 'zcash', 'monero', 'wire', 'dash', 'ripple', 'eos', 'neo', 'aventus', 'qtum', 'eidoo'] * + * From customer support via email on 2018-02-27; + * "... After discussing with our developers, you can use API to withdraw BCH and withdraw_type is bcash. ..." + * * @param currency * @return */ @@ -67,6 +70,8 @@ public static String convertToBitfinexWithdrawalType(String currency) { return "eidoo"; case "BTG": return "bgold"; + case "BCH": + return "bcash"; default: throw new BitfinexException("Cannot determine withdrawal type."); }