public interface CampBX
Modifier and Type | Interface and Description |
---|---|
static class |
CampBX.AdvTradeMode |
static class |
CampBX.DarkPool |
static class |
CampBX.FillType |
static class |
CampBX.MarketPrice |
static class |
CampBX.OrderType |
static class |
CampBX.TradeMode |
Modifier and Type | Method and Description |
---|---|
CampBXResponse |
getDepositAddress(String user,
String password)
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
|
MyFunds |
getMyFunds(String user,
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.
|
MyOpenOrders |
getOpenOrders(String user,
String password)
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.
|
CampBXOrderBook |
getOrderBook() |
CampBXTicker |
getTicker() |
CampBXResponse |
tradeAdvancedEnter(String user,
String password,
CampBX.AdvTradeMode mode,
BigDecimal quantity,
BigDecimal price,
CampBX.FillType fillType,
CampBX.DarkPool darkPool,
String expiry)
An API call to place an advanced order can be made in following format:
|
CampBXResponse |
tradeAdvancedMarketEnter(String user,
String password,
CampBX.AdvTradeMode mode,
BigDecimal quantity,
CampBX.MarketPrice market,
CampBX.FillType fillType,
CampBX.DarkPool darkPool,
String expiry) |
CampBXResponse |
tradeCancel(String user,
String password,
CampBX.OrderType type,
Long orderId)
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.
|
CampBXResponse |
tradeEnter(String user,
String password,
CampBX.TradeMode mode,
BigDecimal quantity,
BigDecimal price)
An API call to placing an order can be made in following format:
|
CampBXResponse |
withdrawBtc(String user,
String password,
String btcToAddress,
BigDecimal amount)
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
|
CampBXOrderBook getOrderBook() throws IOException
IOException
CampBXTicker getTicker() throws IOException
IOException
MyOpenOrders getOpenOrders(String user, String password) throws IOException
IOException
MyFunds getMyFunds(String user, String password) throws IOException
IOException
CampBXResponse tradeEnter(String user, String password, CampBX.TradeMode mode, BigDecimal quantity, BigDecimal price) throws IOException
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.
IOException
CampBXResponse tradeAdvancedEnter(@Nonnull String user, @Nonnull String password, @Nonnull CampBX.AdvTradeMode mode, @Nonnull BigDecimal quantity, @Nonnull BigDecimal price, CampBX.FillType fillType, CampBX.DarkPool darkPool, String expiry) throws IOException
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.
IOException
CampBXResponse tradeAdvancedMarketEnter(@Nonnull String user, @Nonnull String password, @Nonnull CampBX.AdvTradeMode mode, @Nonnull BigDecimal quantity, @Nonnull CampBX.MarketPrice market, CampBX.FillType fillType, CampBX.DarkPool darkPool, String expiry) throws IOException
IOException
CampBXResponse tradeCancel(String user, String password, CampBX.OrderType type, Long orderId) throws IOException
https://CampBX.com/api/tradecancel.php POST: user=USERNAME pass=PASSWORD Type=Buy OrderID=NUMERIC_IDOR
https://CampBX.com/api/tradecancel.php POST: user=USERNAME pass=PASSWORD Type=Sell OrderID=NUMERIC_IDPlease 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.
IOException
CampBXResponse getDepositAddress(String user, String password) throws IOException
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.
IOException
CampBXResponse withdrawBtc(String user, String password, String btcToAddress, BigDecimal amount) throws IOException
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.
IOException
Copyright © 2012–2016 Xeiam, LLC. All rights reserved.