public interface MtGoxAPI
| Modifier and Type | Interface and Description |
|---|---|
static class |
MtGoxAPI.OrderType |
| Modifier and Type | Method and Description |
|---|---|
OrderCancelResult |
cancelOrder(MtGoxAPI.OrderType orderType,
java.lang.String orderRef)
Cancel an existing order.
|
OrderCancelResult |
cancelOrder(Order order) |
AccountInfo |
getAccountInfo()
Get private information about the currently logged-in account
|
java.util.List<Depth> |
getAllDepthSince(long timestamp)
Get all depth events since a particular time (or whenever this api object
was created)
|
java.util.List<Trade> |
getAllTradesSince(long timestamp)
Get all trade events since a particular time (or whenever this api object
was created)
|
java.util.Currency |
getBaseCurrency() |
CurrencyInfo |
getCurrencyInfo(java.util.Currency currency)
Get MtGox special information about a currency.
|
CurrencyInfo |
getCurrencyInfo(java.lang.String currencyCode)
Get MtGox special information about a currency.
|
java.util.List<Depth> |
getDepthHistory()
Get all depth events since this api object was created
|
FullDepth |
getFullDepth()
Get the market full depth from the MtGox exchange
|
Order[] |
getOpenOrders()
A private function that requires credentials.
|
OrderResult |
getOrderResult(MtGoxAPI.OrderType orderType,
java.lang.String orderRef)
Return the result of an order request
|
Ticker |
getTicker()
Request the current ticker from MtGox
|
java.util.List<Ticker> |
getTickerHistory()
Get all ticker events since this api object was created
|
java.util.List<Trade> |
getTradeHistory()
Get all trade events since this api object was created
|
java.lang.String |
placeMarketOrder(MtGoxAPI.OrderType orderType,
MtGoxBitcoin volume)
Place a bitcoin order at market price.
|
java.lang.String |
placeOrder(MtGoxAPI.OrderType orderType,
MtGoxFiatCurrency price,
MtGoxBitcoin volume)
Place a bitcoin order at a particular price
|
SendBitcoinsTransaction |
sendBitcoins(java.lang.String destinationAddress,
MtGoxBitcoin bitcoins,
MtGoxBitcoin fee,
boolean isNoInstant,
boolean isGreen)
Send bitcoins from your MtGox account balance to a bitcoin address.
|
void |
shutdown()
Shutdown the api threads and close any open websockets.
|
java.util.Currency getBaseCurrency()
FullDepth getFullDepth() throws java.lang.Exception
java.lang.ExceptionOrder[] getOpenOrders() throws java.lang.Exception
java.lang.ExceptionOrderResult getOrderResult(MtGoxAPI.OrderType orderType, java.lang.String orderRef) throws java.lang.Exception
orderType - Bid or AskorderRef - The reference string that was returned when the order
was
pleacedjava.lang.Exceptionjava.util.List<Depth> getAllDepthSince(long timestamp)
timestamp - The java timestamp to return events since.java.util.List<Trade> getAllTradesSince(long timestamp)
timestamp - The java timestamp to return trades since.java.util.List<Depth> getDepthHistory()
java.util.List<Ticker> getTickerHistory()
java.util.List<Trade> getTradeHistory()
Ticker getTicker() throws java.lang.Exception
java.lang.Exceptionjava.lang.String placeMarketOrder(MtGoxAPI.OrderType orderType, MtGoxBitcoin volume) throws java.lang.Exception
orderType - Bid or Askvolume - The volume of bitcoinsjava.lang.Exceptionjava.lang.String placeOrder(MtGoxAPI.OrderType orderType, MtGoxFiatCurrency price, MtGoxBitcoin volume) throws java.lang.Exception
orderType - Bid or Askprice - The price in the base currency of this api instancevolume - The volume of bitcoinsjava.lang.ExceptionAccountInfo getAccountInfo() throws java.lang.Exception
java.lang.ExceptionCurrencyInfo getCurrencyInfo(java.util.Currency currency) throws java.lang.Exception
currency - The java currencyjava.lang.ExceptionCurrencyInfo getCurrencyInfo(java.lang.String currencyCode) throws java.lang.Exception
currencyCode - The currency codejava.lang.ExceptionOrderCancelResult cancelOrder(MtGoxAPI.OrderType orderType, java.lang.String orderRef) throws java.lang.Exception
orderType - Bid or AskorderRef - The reference string that was returned when the order
was
placedjava.lang.ExceptionOrderCancelResult cancelOrder(Order order) throws java.lang.Exception
java.lang.ExceptionSendBitcoinsTransaction sendBitcoins(java.lang.String destinationAddress, MtGoxBitcoin bitcoins, MtGoxBitcoin fee, boolean isNoInstant, boolean isGreen) throws java.lang.Exception
destinationAddress - The destination bitcoin address that should
receive the fundsbitcoins - The amount of bitcoins to transfer from your
MtGox accountfee - The fee you would like to pay the networkisNoInstant - If true, use the bitcoin blockchain, even if
the receiving address is on MtGoxisGreen - If true, use a greenaddress
https://en.bitcoin.it/wiki/GreenAddressjava.lang.Exceptionvoid shutdown()
Copyright © 2013. All Rights Reserved.