○ All returns this release are in JSON format.
○ The api for this release is located in https://bleutrade.com/api/v2/
The example below was written in PHP to be the most common programming language used for these purposes.
○ Code for use in public functions:
$uri = 'https://bleutrade.com/api/v2/public/getmarkets';
$ch = curl_init($uri);
$execResult = curl_exec($ch);
$obj = json_decode($execResult);
○ Authentication code for private functions:
$apikey = 'YOUR_API_KEY';
$apisecret = 'YOUR_API_SECRET';
$nonce = time();
$uri = 'https://bleutrade.com/api/v2/account/getbalances?apikey='.$apikey.'&nonce='.$nonce;
$sign = hash_hmac('sha512',$uri,$apisecret);
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign)); // you can add the signature at the end of the uri if you prefer: &apisign=...
$execResult = curl_exec($ch);
$obj = json_decode($execResult);
nonce is a number that should never be repeated and always greater than the previous number. Is used to increase your safety, is optional, but if it is first used, it becomes mandatory. Max = 2147483647.
You can generate your keys on this page: API KEYS
Get a list of all coins traded.
{
"success" : true,
"message" : "",
"result" : [{
"Currency" : "BTC",
"CurrencyLong" : "Bitcoin",
"MinConfirmation" : 2,
"TxFee" : 0.00080000,
"IsActive" : true,
"CoinType" : "BITCOIN",
"MaintenanceMode" : false
}, {
"Currency" : "LTC",
"CurrencyLong" : "Litecoin",
"MinConfirmation" : 4,
"TxFee" : 0.02000000,
"IsActive" : true,
"CoinType" : "BITCOIN",
"MaintenanceMode" : false
}
]
}
Get the list of all pairs traded.
{
"success" : true,
"message" : "",
"result" : [{
"MarketCurrency" : "DOGE",
"BaseCurrency" : "BTC",
"MarketCurrencyLong" : "Dogecoin",
"BaseCurrencyLong" : "Bitcoin",
"MinTradeSize" : 0.10000000,
"MarketName" : "DOGE_BTC",
"IsActive" : true,
}, {
"MarketCurrency" : "ETH",
"BaseCurrency" : "BTC",
"MarketCurrencyLong" : "Ethereum",
"BaseCurrencyLong" : "Bitcoin",
"MinTradeSize" : 0.00000001,
"MarketName" : "ETH_BTC",
"IsActive" : true,
}
]
}
Used to get the current tick values for a market.
Required parameters:
market (or markets) (ex.: /public/getticker?market=ETH_BTC or /public/getticker?market=ETH_BTC,HTML5_DOGE,DOGE_LTC)
{
"success" : true,
"message" : "",
"result" : {
"Bid" : 0.00055355,
"Ask" : 0.00075145,
"Last" : 0.00073200
}
}
Used to get the last 24 hour summary of all active markets.
{
"success" : true,
"message" : "",
"result" : [{
"MarketCurrency" : "Ethereum",
"BaseCurrency" : "Bitcoin",
"MarketName" : "ETH_BTC",
"PrevDay" : 0.00095000,
"High" : 0.00105000,
"Low" : 0.00086000,
"Last" : 0.00101977,
"Average" : 0.00103455,
"Volume" : 2450.97496015,
"BaseVolume" : 2.40781647,
"TimeStamp" : "2014-07-29 11:19:30",
"Bid" : 0.00100000,
"Ask" : 0.00101977,
"IsActive" : true
}, {
"MarketCurrency" : "Litecoin",
"BaseCurrency" : "Bitcoin",
"MarketName" : "LTC_BTC",
"PrevDay" : 0.00095000,
"High" : 0.01333000,
"Low" : 0.01167001,
"Last" : 0.01333000,
"Average" : 0.01235000,
"Volume" : 14.46077245,
"BaseVolume" : 0.18765956,
"TimeStamp" : "2014-07-29 11:48:02",
"Bid" : 0.01268311,
"Ask" : 0.01333000,
"IsActive" : true
}
]
}
Used to get the last 24 hour summary of specific market.
Required parameters:
market (ex.: /public/getmarketsummary?market=ETH_BTC)
{
"success" : true,
"message" : "",
"result" : [{
"MarketCurrency" : "Ethereum",
"BaseCurrency" : "Bitcoin",
"MarketName" : "ETH_BTC",
"PrevDay" : 0.00095000,
"High" : 0.00105000,
"Low" : 0.00086000,
"Last" : 0.00101977,
"Average" : 0.00103544,
"Volume" : 2450.97496015,
"BaseVolume" : 2.40781647,
"TimeStamp" : "2014-07-29 11:19:30",
"Bid" : 0.00100000,
"Ask" : 0.00101977,
"IsActive" : true
}
]
}
Loads the book offers specific market.
Required parameters:
market
type (BUY, SELL, ALL)
depth (optional, default is 20)
{
"success" : true,
"message" : "",
"result" : {
"buy" : [{
"Quantity" : 4.99400000,
"Rate" : 3.00650900
}, {
"Quantity" : 50.00000000,
"Rate" : 3.50000000
}
],
"sell" : [{
"Quantity" : 12.44147454,
"Rate" : 5.13540000
}, {
"Quantity" : 100.00000000,
"Rate" : 6.25500000
}, {
"Quantity" : 30.00000000,
"Rate" : 6.75500001
}, {
"Quantity" : 13.49989999,
"Rate" : 6.76260099
}
]
}
}
Obtains historical trades of a specific market.
Required parameters:
market
count (optional, default: 20, max: 200)
{
"success" : true,
"message" : "",
"result" : [{
"TimeStamp" : "2014-07-29 18:08:00",
"Quantity" : 654971.69417461,
"Price" : 0.00000055,
"Total" : 0.360234432,
"OrderType" : "BUY"
}, {
"TimeStamp" : "2014-07-29 18:12:35",
"Quantity" : 120.00000000,
"Price" : 0.00006600,
"Total" : 0.360234432,
"OrderType" : "BUY"
}
]
}
Obtains candles format historical trades of a specific market.
Required parameters:
market
period (15m, 20m, 30m, 1h, 2h, 3h, 4h, 6h, 8h, 12h, 1d)
count (default: 1000, max: 999999)
lasthours (default: 24, max: 2160)
{
"success":"true",
"message":"",
"result":[{
"TimeStamp":"2014-07-31 10:15:00",
"Open":"0.00000048",
"High":"0.00000050",
"Low":"0.00000048",
"Close":"0.00000049",
"Volume":"594804.73036048",
"BaseVolume":"0.11510368"
},{
"TimeStamp":"2014-07-31 10:00:00",
"Open":"0.00000037",
"High":"0.00000048",
"Low":"0.00000035",
"Close":"0.00000048",
"Volume":"623490.14936407",
"BaseVolume":"0.13101303"
}
]
}
Use to send BUY or SELL orders
Required parameters:
market
rate
quantity
comments (optional, up to 128 characters)
{
"success" : true,
"message" : "",
"result" : {
"orderid" : "65498"
}
}
Use to cancel an order
Required parameters:
orderid
{
"success" : true,
"message" : "",
"result" : ""
}
Use to list your open orders
{
"success" : true,
"message" : "",
"result" : [{
"OrderId" : "65489",
"Exchange" : "LTC_BTC",
"Type" : "BUY",
"Quantity" : 20.00000000,
"QuantityRemaining" : 5.00000000,
"QuantityBaseTraded" : "0.16549400",
"Price" : 0.01268311,
"Status" : "OPEN",
"Created" : "2014-08-03 13:55:20",
"Comments" : "My optional comment, eg function id #123"
}, {
"OrderId" : "65724",
"Exchange" : "DOGE_BTC",
"Type" : "SELL",
"Quantity" : 150491.98700000,
"QuantityRemaining" : 795.00000000,
"QuantityBaseTraded" : "0.04349400",
"Price" : 0.00000055,
"Status" : "OPEN",
"Created" : "2014-07-29 18:45:17",
"Comments" : "Function #123 Connect #456"
}
]
}
Use to get the balance of all your coins
Required parameters:
currencies (optional, default=ALL) eg.: /account/getbalances?currencies=DOGE;BTC
{
"success" : true,
"message" : "",
"result" : [{
"Currency" : "DOGE",
"Balance" : 0.00000000,
"Available" : 0.00000000,
"Pending" : 0.00000000,
"CryptoAddress" : "DBSwFELQiVrwxFtyHpVHbgVrNJXwb3hoXL",
"IsActive" : true
}, {
"Currency" : "BTC",
"Balance" : 15.49843675,
"Available" : 13.98901996,
"Pending" : 0.00000000,
"CryptoAddress" : "1NKh9X1z4Q4AbBnEgNiKU177GMyeQUexC9",
"IsActive" : true
}
]
}
Use to get the balance of a specific currency
Required parameters:
currency
{
"success" : true,
"message" : "",
"result" : {
"Currency" : "BTC",
"Balance" : 15.49843675,
"Available" : 13.98901996,
"Pending" : 0.00000000,
"CryptoAddress" : "1NKh9X1z4Q4AbBnEgNiKU177GMyeQUexC9",
"IsActive" : true
}
}
Use to get the deposit address of specific coin.
Required parameters:
currency
{
"success" : true,
"message" : "",
"result" : {
"Currency" : "BTC",
"Address" : "1NKh9X1z4Q4AbBnEgNiKU177GMyeQUexC9"
}
}
Use to withdraw their currencies to another wallet.
Required parameters:
currency
quantity
address
comments (optional, up to 128 characters)
{
"success" : true,
"message" : "OK",
"result" : ""
}
Use to get the data given order
Required parameters:
orderid
{
"success" : true,
"message" : "",
"result" : {
"OrderId" : "65489",
"Exchange" : "LTC_BTC",
"Type" : "BUY",
"Quantity" : 20.00000000,
"QuantityRemaining" : 5.00000000,
"QuantityBaseTraded" : "0.16549400",
"Price" : 0.01268311,
"Status" : "OPEN",
"Created" : "2014-08-03 13:55:20",
"Comments" : "My optional comment, eg function id #123"
}
}
Use to list your orders
Required parameters:
market (DIVIDEND_DIVISOR or ALL)
orderstatus (ALL, OK, OPEN, CANCELED)
ordertype (ALL, BUY, SELL)
depth (optional, default is 500, max is 20000)
{
"success" : true,
"message" : "",
"result" : [{
"OrderId" : "65489",
"Exchange" : "LTC_BTC",
"Type" : "BUY",
"Quantity" : 20.00000000,
"QuantityRemaining" : 5.00000000,
"QuantityBaseTraded" : "0.16549400",
"Price" : 0.01268311,
"Status" : "OPEN",
"Created" : "2014-08-03 13:55:20",
"Comments" : "My optional comment, eg function id #123"
}, {
"OrderId" : "78462",
"Exchange" : "LTC_BTC",
"Type" : "SELL",
"Quantity" : 100.00000000,
"QuantityRemaining" : 55.00000000,
"QuantityBaseTraded" : "0.54778995",
"Price" : 0.01217311,
"Status" : "OPEN",
"Created" : "2014-10-13 11:16:39",
"Comments" : "Function #123 Connect #456"
}]
}
Use for historical trades of a given order.
Required parameters:
orderid
{
"success" : true,
"message" : "",
"result" : [{
"TimeStamp" : "2014-07-30 23:20:37",
"OrderType" : "BUY",
"Quantity" : 250.00000000,
"Price" : 0.10140005,
}, {
"TimeStamp" : "2014-07-30 23:25:12",
"OrderType" : "BUY",
"Quantity" : 750.00000000,
"Price" : 0.11230001,
}
]
}
Use for historical deposits and received direct transfers.
{
"success" : true,
"message" : "",
"result" : [{
"Id" : "48664938",
"TimeStamp" : "2015-05-13 08:23:15",
"Coin" : "BTC",
"Amount" : 0.75470000,
"Label" : "Transfer from user Fromuser"
}, {
"Id" : "44933431",
"TimeStamp" : "2015-05-13 07:15:23",
"Coin" : "DOGE",
"Amount" : 1000.00000000,
"Label" : "Deposit in address Youraddress"
}
]
}
Use for historical withdraw and sent direct transfers.
{
"success" : true,
"message" : "",
"result" : [
{
"Id" : "44933431",
"TimeStamp" : "2015-05-13 07:15:23",
"Coin" : "LTC",
"Amount" : -0.10000000,
"Label" : "Withdraw: 0.99000000 to address Anotheraddress; fee 0.01000000",
"TransactionId" : "c396228895f8976e3810286c1537bddd4a45bb37d214c0e2b29496a4dee9a09b"
}
]
}