public class MtGox extends java.lang.Object implements TradeInterface
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buyBTC(double amount)
Sells BTC at market price
|
double[] |
getBalance()
Returns an array with the user's balance in different currencies.
|
java.lang.String |
getLag()
Returns the lag of the trading engine.
|
double |
getLastPrice(java.lang.String currency) |
double |
getLastPriceEUR()
Returns an array with the last price in USD and EUR.
|
double |
getLastPriceUSD()
Returns an array with the last price in USD and EUR.
|
java.lang.String |
placeOrder(java.lang.String type,
long amount_int) |
java.lang.String |
query(java.lang.String path,
java.util.HashMap<java.lang.String,java.lang.String> args) |
java.lang.String |
sellBTC(double amount)
Sells BTC at market price
|
void |
setPrintHTTPResponse(boolean resp) |
java.lang.String |
withdrawBTC(double amount,
java.lang.String dest_address)
Withdraws an amount of BTC from the user's mtg account to a BTC address.
|
public MtGox(ApiKeys keys)
public void setPrintHTTPResponse(boolean resp)
public java.lang.String getLag()
TradeInterface
getLag
in interface TradeInterface
public java.lang.String withdrawBTC(double amount, java.lang.String dest_address)
TradeInterface
withdrawBTC
in interface TradeInterface
amount
- the amount of BTC to withdraw (min 0.1)dest_address
- the address of the BTC walletpublic java.lang.String sellBTC(double amount)
TradeInterface
sellBTC
in interface TradeInterface
amount
- the amount of BTC to sell (min 0.1)public java.lang.String buyBTC(double amount)
TradeInterface
buyBTC
in interface TradeInterface
amount
- the amount of BTC to buy (min 0.1)public java.lang.String placeOrder(java.lang.String type, long amount_int)
public double[] getBalance()
TradeInterface
getBalance
in interface TradeInterface
public double getLastPriceUSD()
TradeInterface
getLastPriceUSD
in interface TradeInterface
public double getLastPriceEUR()
TradeInterface
getLastPriceEUR
in interface TradeInterface
public java.lang.String query(java.lang.String path, java.util.HashMap<java.lang.String,java.lang.String> args)
public double getLastPrice(java.lang.String currency)