public class CoinfloorStreamingExchangeService extends BaseWebSocketExchangeService implements StreamingExchangeService
consumerEventQueue, reconnectService
exchange
Constructor and Description |
---|
CoinfloorStreamingExchangeService(Exchange exchange,
CoinfloorStreamingConfiguration exchangeStreamingConfiguration)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
authenticate() |
CoinfloorExchangeEvent |
cancelOrder(int orderID)
Cancel an order Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
checkNextSystemEvent() |
void |
connect()
Opens the connection to the upstream server for this instance.
|
CoinfloorExchangeEvent |
estimateMarketOrder(MarketOrder order)
Estimate the results of a market order Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
getBalances()
Get user's balances Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
AccountInfo |
getCachedAccountInfo()
Retrieves cached AccountInfo.
|
OrderBook |
getCachedOrderBook()
Retrieves cached OrderBook.
|
Ticker |
getCachedTicker()
Retrieves cached Ticker.
|
Trades |
getCachedTrades()
Retrieves cached Trades.
|
CoinfloorExchangeEvent |
getNextEvent()
Returns next event in consumer event queue, then removes it.
|
CoinfloorExchangeEvent |
getNextSystemEvent() |
CoinfloorExchangeEvent |
getOrders()
Get user's open orders Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
getTradeVolume(String currency)
Get past 30-day trade volume Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
placeOrder(Order order)
Place an order Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
unwatchOrders(String tradableIdentifier,
String tradingCurrency)
Stop watching the orderbook Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
unwatchTicker(String tradableIdentifier,
String tradingCurrency)
Stop watching the ticker feed Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
watchOrders(String tradableIdentifier,
String tradingCurrency)
Watch the orderbook Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
CoinfloorExchangeEvent |
watchTicker(String tradableIdentifier,
String tradingCurrency)
Watch the ticker feed Upon receipt of response, a CoinfloorExchangeEvent with payload Map
|
checkNextEvent, countEventsAvailable, disconnect, getWebSocketStatus, internalConnect, send
getExchangeSymbols, verifyOrder, verifyOrder, verifyOrder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countEventsAvailable, disconnect, getWebSocketStatus, send
public CoinfloorStreamingExchangeService(Exchange exchange, CoinfloorStreamingConfiguration exchangeStreamingConfiguration)
exchange
- exchangeStreamingConfiguration
- public void connect()
StreamingExchangeService
Opens the connection to the upstream server for this instance.
connect
in interface StreamingExchangeService
public void authenticate()
public CoinfloorExchangeEvent getBalances()
public CoinfloorExchangeEvent getOrders()
public CoinfloorExchangeEvent placeOrder(Order order)
public CoinfloorExchangeEvent cancelOrder(int orderID)
public CoinfloorExchangeEvent getTradeVolume(String currency)
public CoinfloorExchangeEvent estimateMarketOrder(MarketOrder order)
public CoinfloorExchangeEvent watchOrders(String tradableIdentifier, String tradingCurrency)
public CoinfloorExchangeEvent unwatchOrders(String tradableIdentifier, String tradingCurrency)
public CoinfloorExchangeEvent watchTicker(String tradableIdentifier, String tradingCurrency)
public CoinfloorExchangeEvent unwatchTicker(String tradableIdentifier, String tradingCurrency)
public AccountInfo getCachedAccountInfo()
ExchangeException
- if getBalances() method has not been called, or data not recieved yet.public OrderBook getCachedOrderBook()
ExchangeException
- if watchOrders() method has not been called, or data not recieved yet.public Trades getCachedTrades()
ExchangeException
- if watchOrders() method has not been called, or no trades have occurred yet.public Ticker getCachedTicker()
ExchangeException
- if watchTicker() method has not been called, or no ticker data has been recieved.public CoinfloorExchangeEvent getNextEvent() throws InterruptedException
StreamingExchangeService
Returns next event in consumer event queue, then removes it.
getNextEvent
in interface StreamingExchangeService
getNextEvent
in class BaseWebSocketExchangeService
InterruptedException
public CoinfloorExchangeEvent getNextSystemEvent() throws InterruptedException
InterruptedException
public CoinfloorExchangeEvent checkNextSystemEvent() throws InterruptedException
InterruptedException
Copyright © 2012–2016 Xeiam, LLC. All rights reserved.