Fala pessoal, segue a lib usada no
www.centralbit.com.br, nada mais é o que a extração das api´s das exchanges nacionais para arrays em PHP
quem quiser usar fique a vontade
att
//@AHGB
/* ================================
Biblioteca PHP de Api´s das exchanges brasileiras usada na centralbit www.centralbit.com.br
Elaborada por Arthur H G Bonora - www.bonora.com.br
Blog: www.arthurbonora.com.br
=================================== */
// cotações
//basebit
$q_bas = curl_init('http://www.basebit.com.br/quote-BTC_BRL');
curl_setopt($q_bas, CURLOPT_RETURNTRANSFER, 1);
$json_q_bas = curl_exec($q_bas);
curl_close($q_bas);
$decode_q_bas = json_decode($json_q_bas, true);
$bas_last = number_format ($decode_q_bas[result][last],'2', ',', '');
$bas_hight = number_format ($decode_q_bas[result][high],'2', ',', '');
$bas_low = number_format ($decode_q_bas[result][low],'2', ',', '');
$bas_volume = number_format ($decode_q_bas[result][volume],'2', ',', '');
//mercado bitcoin
$q_mbi = curl_init('https://www.mercadobitcoin.net/api/ticker/');
curl_setopt($q_mbi, CURLOPT_RETURNTRANSFER, 1);
$json_q_mbi = curl_exec($q_mbi);
curl_close($q_mbi);
$decode_q_mbi = json_decode($json_q_mbi, true);
$mbi_last = number_format ($decode_q_mbi[ticker][last],'2', ',', '');
$mbi_hight = number_format ($decode_q_mbi[ticker][high],'2', ',', '');
$mbi_low = number_format ($decode_q_mbi[ticker][low],'2', ',', '');
$mbi_buy = number_format ($decode_q_mbi[ticker][buy],'2', ',', '');
$mbi_sell = number_format ($decode_q_mbi[ticker][sell],'2', ',', '');
$mbi_volume = number_format ($decode_q_mbi[ticker][vol],'2', ',', '');
//bitcointoyou
$q_b2u = curl_init('https://www.bitcointoyou.com/api/ticker.aspx');
curl_setopt($q_b2u, CURLOPT_RETURNTRANSFER, 1);
$json_q_b2u = curl_exec($q_b2u);
curl_close($q_b2u);
$decode_q_b2u = json_decode($json_q_b2u, true);
$b2u_last = number_format ($decode_q_b2u[ticker][last],'2', ',', '');
$b2u_hight = number_format ($decode_q_b2u[ticker][high],'2', ',', '');
$b2u_low = number_format ($decode_q_b2u[ticker][low],'2', ',', '');
$b2u_buy = number_format ($decode_q_b2u[ticker][buy],'2', ',', '');
$b2u_sell = number_format ($decode_q_b2u[ticker][sell],'2', ',', '');
$b2u_volume = number_format ($decode_q_b2u[ticker][vol],'2', ',', '');
//bitinvest
$q_biv = curl_init('https://api.bitinvest.com.br/exchange/ticker?subscription-key=045303bd555f450096142fb1f8d822be');
curl_setopt($q_biv, CURLOPT_RETURNTRANSFER, 1);
$json_q_biv = curl_exec($q_biv);
curl_close($q_biv);
$decode_q_biv = json_decode($json_q_biv, true);
$biv_last = number_format ($decode_q_biv[last],'2', ',', '');
$biv_hight = number_format ($decode_q_biv[high],'2', ',', '');
$biv_low = number_format ($decode_q_biv[low],'2', ',', '');
$biv_volume = number_format ($decode_q_biv[volume],'2', ',', '');
//foxbit
$q_fox = curl_init('https://api.blinktrade.com/api/v1/BRL/ticker?crypto_currency=BTC');
curl_setopt($q_fox, CURLOPT_RETURNTRANSFER, 1);
$json_q_fox = curl_exec($q_fox);
curl_close($q_fox);
$decode_q_fox = json_decode($json_q_fox, true);
$fox_last = number_format ($decode_q_fox[last],'2', ',', '');
$fox_hight = number_format ($decode_q_fox[high],'2', ',', '');
$fox_low = number_format ($decode_q_fox[low],'2', ',', '');
$fox_buy = number_format ($decode_q_fox[buy],'2', ',', '');
$fox_sell = number_format ($decode_q_fox[sell],'2', ',', '');
$fox_volume = number_format ($decode_q_fox[vol],'2', ',', '');
//fiat
$q_fiat = curl_init('http://api.promasters.net.br/cotacao/v1/valores');
curl_setopt($q_fiat, CURLOPT_RETURNTRANSFER, 1);
$json_q_fiat = curl_exec($q_fiat);
curl_close($q_fiat);
$decode_q_fiat = json_decode($json_q_fiat, true);
$fiat_usd = number_format ($decode_q_fiat[valores][USD],'2', ',', '');
$fiat_eur = number_format ($decode_q_fiat[valores][EUR][valor],'2', ',', '');
//bitstamp
$q_bts = curl_init('https://www.bitstamp.net/api/ticker/');
curl_setopt($q_bts, CURLOPT_RETURNTRANSFER, 1);
$json_q_bts = curl_exec($q_bts);
curl_close($q_bts);
$decode_q_bts = json_decode($json_q_bts, true);
$bts_last = number_format ($decode_q_bts[last],'2', ',', '');
$bts_hight = number_format ($decode_q_bts[high],'2', ',', '');
$bts_low = number_format ($decode_q_bts[low],'2', ',', '');
$bts_hight = number_format ($decode_q_bts[bid],'2', ',', '');
$bts_low = number_format ($decode_q_bts[ask],'2', ',', '');
$bts_volume = number_format ($decode_q_bts[volume],'2', ',', '');
//bitfinex
$q_btx = curl_init('https://api.bitfinex.com/v1/pubticker/btcusd');
curl_setopt($q_btx, CURLOPT_RETURNTRANSFER, 1);
$json_q_btx = curl_exec($q_btx);
curl_close($q_btx);
$decode_q_btx = json_decode($json_q_btx, true);
$btx_last = number_format ($decode_q_btx[last_price],'2', ',', '');
$btx_hight = number_format ($decode_q_btx[high],'2', ',', '');
$btx_low = number_format ($decode_q_btx[low],'2', ',', '');
$btx_hight = number_format ($decode_q_btx[bid],'2', ',', '');
$btx_low = number_format ($decode_q_btx[ask],'2', ',', '');
$btx_volume = number_format ($decode_q_btx[volume],'2', ',', '');
//coindesk índice
$q_bpi = curl_init('https://api.coindesk.com/v1/bpi/currentprice.json');
curl_setopt($q_bpi, CURLOPT_RETURNTRANSFER, 1);
$json_q_bpi = curl_exec($q_bpi);
curl_close($q_bpi);
$decode_q_bpi = json_decode($json_q_bpi, true);
$bpi_usd = number_format ($decode_q_bpi[bpi][USD][rate],'2', ',', '');
$bpi_gbp = number_format ($decode_q_bpi[bpi][GBP][rate],'2', ',', '');
$bpi_eur = number_format ($decode_q_bpi[bpi][EUR][rate],'2', ',', '');
// books
//basebit
$b_bas = curl_init('http://www.basebit.com.br/book-BTC_BRL');
curl_setopt($b_bas, CURLOPT_RETURNTRANSFER, 1);
$json_b_bas = curl_exec($b_bas);
curl_close($b_bas);
$decode_b_bas = json_decode($json_b_bas, true);
$bas_book_ask[0] = number_format ($decode_b_bas[result][asks][0][quantity],'5', ',', '');
$bas_book_ask[1] = number_format ($decode_b_bas[result][asks][0][price],'2', ',', '');
$bas_book_ask[2] = number_format ($decode_b_bas[result][asks][1][quantity],'5', ',', '');
$bas_book_ask[3] = number_format ($decode_b_bas[result][asks][1][price],'2', ',', '');
$bas_book_ask[4] = number_format ($decode_b_bas[result][asks][2][quantity],'5', ',', '');
$bas_book_ask[5] = number_format ($decode_b_bas[result][asks][2][price],'2', ',', '');
$bas_book_ask[6] = number_format ($decode_b_bas[result][asks][3][quantity],'5', ',', '');
$bas_book_ask[7] = number_format ($decode_b_bas[result][asks][3][price],'2', ',', '');
$bas_book_ask[8] = number_format ($decode_b_bas[result][asks][4][quantity],'5', ',', '');
$bas_book_ask[9] = number_format ($decode_b_bas[result][asks][4][price],'2', ',', '');
$bas_book_ask[10] = number_format ($decode_b_bas[result][asks][5][quantity],'5', ',', '');
$bas_book_ask[11] = number_format ($decode_b_bas[result][asks][5][price],'2', ',', '');
$bas_book_ask[12] = number_format ($decode_b_bas[result][asks][6][quantity],'5', ',', '');
$bas_book_ask[13] = number_format ($decode_b_bas[result][asks][6][price],'2', ',', '');
$bas_book_ask[14] = number_format ($decode_b_bas[result][asks][7][quantity],'5', ',', '');
$bas_book_ask[15] = number_format ($decode_b_bas[result][asks][7][price],'2', ',', '');
$bas_book_ask[16] = number_format ($decode_b_bas[result][asks][8][quantity],'5', ',', '');
$bas_book_ask[17] = number_format ($decode_b_bas[result][asks][8][price],'2', ',', '');
$bas_book_ask[18] = number_format ($decode_b_bas[result][asks][9][quantity],'5', ',', '');
$bas_book_ask[19] = number_format ($decode_b_bas[result][asks][9][price],'2', ',', '');
$bas_book_bid[0] = number_format ($decode_b_bas[result][bids][0][quantity],'5', ',', '');
$bas_book_bid[1] = number_format ($decode_b_bas[result][bids][0][price],'2', ',', '');
$bas_book_bid[2] = number_format ($decode_b_bas[result][bids][1][quantity],'5', ',', '');
$bas_book_bid[3] = number_format ($decode_b_bas[result][bids][1][price],'2', ',', '');
$bas_book_bid[4] = number_format ($decode_b_bas[result][bids][2][quantity],'5', ',', '');
$bas_book_bid[5] = number_format ($decode_b_bas[result][bids][2][price],'2', ',', '');
$bas_book_bid[6] = number_format ($decode_b_bas[result][bids][3][quantity],'5', ',', '');
$bas_book_bid[7] = number_format ($decode_b_bas[result][bids][3][price],'2', ',', '');
$bas_book_bid[8] = number_format ($decode_b_bas[result][bids][4][quantity],'5', ',', '');
$bas_book_bid[9] = number_format ($decode_b_bas[result][bids][4][price],'2', ',', '');
$bas_book_bid[10] = number_format ($decode_b_bas[result][bids][5][quantity],'5', ',', '');
$bas_book_bid[11] = number_format ($decode_b_bas[result][bids][5][price],'2', ',', '');
$bas_book_bid[12] = number_format ($decode_b_bas[result][bids][6][quantity],'5', ',', '');
$bas_book_bid[13] = number_format ($decode_b_bas[result][bids][6][price],'2', ',', '');
$bas_book_bid[14] = number_format ($decode_b_bas[result][bids][7][quantity],'5', ',', '');
$bas_book_bid[15] = number_format ($decode_b_bas[result][bids][7][price],'2', ',', '');
$bas_book_bid[16] = number_format ($decode_b_bas[result][bids][8][quantity],'5', ',', '');
$bas_book_bid[17] = number_format ($decode_b_bas[result][bids][8][price],'2', ',', '');
$bas_book_bid[18] = number_format ($decode_b_bas[result][bids][9][quantity],'5', ',', '');
$bas_book_bid[19] = number_format ($decode_b_bas[result][bids][9][price],'2', ',', '');
//bitcointoyou
$b_b2u = curl_init('https://www.bitcointoyou.com/api/orderbook.aspx');
curl_setopt($b_b2u, CURLOPT_RETURNTRANSFER, 1);
$json_b_b2u = curl_exec($b_b2u);
curl_close($b_b2u);
$decode_b_b2u = json_decode($json_b_b2u, true);
$b2u_book_ask[0] = number_format ($decode_b_b2u[asks][0][1],'5', ',', '');
$b2u_book_ask[1] = number_format ($decode_b_b2u[asks][0][0],'2', ',', '');
$b2u_book_ask[2] = number_format ($decode_b_b2u[asks][1][1],'5', ',', '');
$b2u_book_ask[3] = number_format ($decode_b_b2u[asks][1][0],'2', ',', '');
$b2u_book_ask[4] = number_format ($decode_b_b2u[asks][2][1],'5', ',', '');
$b2u_book_ask[5] = number_format ($decode_b_b2u[asks][2][0],'2', ',', '');
$b2u_book_ask[6] = number_format ($decode_b_b2u[asks][3][1],'5', ',', '');
$b2u_book_ask[7] = number_format ($decode_b_b2u[asks][3][0],'2', ',', '');
$b2u_book_ask[8] = number_format ($decode_b_b2u[asks][4][1],'5', ',', '');
$b2u_book_ask[9] = number_format ($decode_b_b2u[asks][4][0],'2', ',', '');
$b2u_book_ask[10] = number_format ($decode_b_b2u[asks][5][1],'5', ',', '');
$b2u_book_ask[11] = number_format ($decode_b_b2u[asks][5][0],'2', ',', '');
$b2u_book_ask[12] = number_format ($decode_b_b2u[asks][6][1],'5', ',', '');
$b2u_book_ask[13] = number_format ($decode_b_b2u[asks][6][0],'2', ',', '');
$b2u_book_ask[14] = number_format ($decode_b_b2u[asks][7][1],'5', ',', '');
$b2u_book_ask[15] = number_format ($decode_b_b2u[asks][7][0],'2', ',', '');
$b2u_book_ask[16] = number_format ($decode_b_b2u[asks][8][1],'5', ',', '');
$b2u_book_ask[17] = number_format ($decode_b_b2u[asks][8][0],'2', ',', '');
$b2u_book_ask[18] = number_format ($decode_b_b2u[asks][9][1],'5', ',', '');
$b2u_book_ask[19] = number_format ($decode_b_b2u[asks][9][0],'2', ',', '');
$b2u_book_bid[0] = number_format ($decode_b_b2u[bids][0][1],'5', ',', '');
$b2u_book_bid[1] = number_format ($decode_b_b2u[bids][0][0],'2', ',', '');
$b2u_book_bid[2] = number_format ($decode_b_b2u[bids][1][1],'5', ',', '');
$b2u_book_bid[3] = number_format ($decode_b_b2u[bids][1][0],'2', ',', '');
$b2u_book_bid[4] = number_format ($decode_b_b2u[bids][2][1],'5', ',', '');
$b2u_book_bid[5] = number_format ($decode_b_b2u[bids][2][0],'2', ',', '');
$b2u_book_bid[6] = number_format ($decode_b_b2u[bids][3][1],'5', ',', '');
$b2u_book_bid[7] = number_format ($decode_b_b2u[bids][3][0],'2', ',', '');
$b2u_book_bid[8] = number_format ($decode_b_b2u[bids][4][1],'5', ',', '');
$b2u_book_bid[9] = number_format ($decode_b_b2u[bids][4][0],'2', ',', '');
$b2u_book_bid[10] = number_format ($decode_b_b2u[bids][5][1],'5', ',', '');
$b2u_book_bid[11] = number_format ($decode_b_b2u[bids][5][0],'2', ',', '');
$b2u_book_bid[12] = number_format ($decode_b_b2u[bids][6][1],'5', ',', '');
$b2u_book_bid[13] = number_format ($decode_b_b2u[bids][6][0],'2', ',', '');
$b2u_book_bid[14] = number_format ($decode_b_b2u[bids][7][1],'5', ',', '');
$b2u_book_bid[15] = number_format ($decode_b_b2u[bids][7][0],'2', ',', '');
$b2u_book_bid[16] = number_format ($decode_b_b2u[bids][8][1],'5', ',', '');
$b2u_book_bid[17] = number_format ($decode_b_b2u[bids][8][0],'2', ',', '');
$b2u_book_bid[18] = number_format ($decode_b_b2u[bids][9][1],'5', ',', '');
$b2u_book_bid[19] = number_format ($decode_b_b2u[bids][9][0],'2', ',', '');
//mercado bitcoin
$b_mbi = curl_init('https://www.mercadobitcoin.net/api/orderbook/');
curl_setopt($b_mbi, CURLOPT_RETURNTRANSFER, 1);
$json_b_mbi = curl_exec($b_mbi);
curl_close($b_mbi);
$decode_b_mbi = json_decode($json_b_mbi, true);
$mbi_book_ask[0] = number_format ($decode_b_mbi[asks][0][1],'5', ',', '');
$mbi_book_ask[1] = number_format ($decode_b_mbi[asks][0][0],'2', ',', '');
$mbi_book_ask[2] = number_format ($decode_b_mbi[asks][1][1],'5', ',', '');
$mbi_book_ask[3] = number_format ($decode_b_mbi[asks][1][0],'2', ',', '');
$mbi_book_ask[4] = number_format ($decode_b_mbi[asks][2][1],'5', ',', '');
$mbi_book_ask[5] = number_format ($decode_b_mbi[asks][2][0],'2', ',', '');
$mbi_book_ask[6] = number_format ($decode_b_mbi[asks][3][1],'5', ',', '');
$mbi_book_ask[7] = number_format ($decode_b_mbi[asks][3][0],'2', ',', '');
$mbi_book_ask[8] = number_format ($decode_b_mbi[asks][4][1],'5', ',', '');
$mbi_book_ask[9] = number_format ($decode_b_mbi[asks][4][0],'2', ',', '');
$mbi_book_ask[10] = number_format ($decode_b_mbi[asks][5][1],'5', ',', '');
$mbi_book_ask[11] = number_format ($decode_b_mbi[asks][5][0],'2', ',', '');
$mbi_book_ask[12] = number_format ($decode_b_mbi[asks][6][1],'5', ',', '');
$mbi_book_ask[13] = number_format ($decode_b_mbi[asks][6][0],'2', ',', '');
$mbi_book_ask[14] = number_format ($decode_b_mbi[asks][7][1],'5', ',', '');
$mbi_book_ask[15] = number_format ($decode_b_mbi[asks][7][0],'2', ',', '');
$mbi_book_ask[16] = number_format ($decode_b_mbi[asks][8][1],'5', ',', '');
$mbi_book_ask[17] = number_format ($decode_b_mbi[asks][8][0],'2', ',', '');
$mbi_book_ask[18] = number_format ($decode_b_mbi[asks][9][1],'5', ',', '');
$mbi_book_ask[19] = number_format ($decode_b_mbi[asks][9][0],'2', ',', '');
$mbi_book_bid[0] = number_format ($decode_b_mbi[bids][0][1],'5', ',', '');
$mbi_book_bid[1] = number_format ($decode_b_mbi[bids][0][0],'2', ',', '');
$mbi_book_bid[2] = number_format ($decode_b_mbi[bids][1][1],'5', ',', '');
$mbi_book_bid[3] = number_format ($decode_b_mbi[bids][1][0],'2', ',', '');
$mbi_book_bid[4] = number_format ($decode_b_mbi[bids][2][1],'5', ',', '');
$mbi_book_bid[5] = number_format ($decode_b_mbi[bids][2][0],'2', ',', '');
$mbi_book_bid[6] = number_format ($decode_b_mbi[bids][3][1],'5', ',', '');
$mbi_book_bid[7] = number_format ($decode_b_mbi[bids][3][0],'2', ',', '');
$mbi_book_bid[8] = number_format ($decode_b_mbi[bids][4][1],'5', ',', '');
$mbi_book_bid[9] = number_format ($decode_b_mbi[bids][4][0],'2', ',', '');
$mbi_book_bid[10] = number_format ($decode_b_mbi[bids][5][1],'5', ',', '');
$mbi_book_bid[11] = number_format ($decode_b_mbi[bids][5][0],'2', ',', '');
$mbi_book_bid[12] = number_format ($decode_b_mbi[bids][6][1],'5', ',', '');
$mbi_book_bid[13] = number_format ($decode_b_mbi[bids][6][0],'2', ',', '');
$mbi_book_bid[14] = number_format ($decode_b_mbi[bids][7][1],'5', ',', '');
$mbi_book_bid[15] = number_format ($decode_b_mbi[bids][7][0],'2', ',', '');
$mbi_book_bid[16] = number_format ($decode_b_mbi[bids][8][1],'5', ',', '');
$mbi_book_bid[17] = number_format ($decode_b_mbi[bids][8][0],'2', ',', '');
$mbi_book_bid[18] = number_format ($decode_b_mbi[bids][9][1],'5', ',', '');
$mbi_book_bid[19] = number_format ($decode_b_mbi[bids][9][0],'2', ',', '');
//bitinvest
$b_biv = curl_init('https://api.bitinvest.com.br/exchange/orderbook?subscription-key=045303bd555f450096142fb1f8d822be');
curl_setopt($b_biv, CURLOPT_RETURNTRANSFER, 1);
$json_b_biv = curl_exec($b_biv);
curl_close($b_biv);
$decode_b_biv = json_decode($json_b_biv, true);
$biv_book_ask[0] = number_format ($decode_b_biv[asks][0][1],'5', ',', '');
$biv_book_ask[1] = number_format ($decode_b_biv[asks][0][0],'2', ',', '');
$biv_book_ask[2] = number_format ($decode_b_biv[asks][1][1],'5', ',', '');
$biv_book_ask[3] = number_format ($decode_b_biv[asks][1][0],'2', ',', '');
$biv_book_ask[4] = number_format ($decode_b_biv[asks][2][1],'5', ',', '');
$biv_book_ask[5] = number_format ($decode_b_biv[asks][2][0],'2', ',', '');
$biv_book_ask[6] = number_format ($decode_b_biv[asks][3][1],'5', ',', '');
$biv_book_ask[7] = number_format ($decode_b_biv[asks][3][0],'2', ',', '');
$biv_book_ask[8] = number_format ($decode_b_biv[asks][4][1],'5', ',', '');
$biv_book_ask[9] = number_format ($decode_b_biv[asks][4][0],'2', ',', '');
$biv_book_ask[10] = number_format ($decode_b_biv[asks][5][1],'5', ',', '');
$biv_book_ask[11] = number_format ($decode_b_biv[asks][5][0],'2', ',', '');
$biv_book_ask[12] = number_format ($decode_b_biv[asks][6][1],'5', ',', '');
$biv_book_ask[13] = number_format ($decode_b_biv[asks][6][0],'2', ',', '');
$biv_book_ask[14] = number_format ($decode_b_biv[asks][7][1],'5', ',', '');
$biv_book_ask[15] = number_format ($decode_b_biv[asks][7][0],'2', ',', '');
$biv_book_ask[16] = number_format ($decode_b_biv[asks][8][1],'5', ',', '');
$biv_book_ask[17] = number_format ($decode_b_biv[asks][8][0],'2', ',', '');
$biv_book_ask[18] = number_format ($decode_b_biv[asks][9][1],'5', ',', '');
$biv_book_ask[19] = number_format ($decode_b_biv[asks][9][0],'2', ',', '');
$biv_book_bid[0] = number_format ($decode_b_biv[bids][0][1],'5', ',', '');
$biv_book_bid[1] = number_format ($decode_b_biv[bids][0][0],'2', ',', '');
$biv_book_bid[2] = number_format ($decode_b_biv[bids][1][1],'5', ',', '');
$biv_book_bid[3] = number_format ($decode_b_biv[bids][1][0],'2', ',', '');
$biv_book_bid[4] = number_format ($decode_b_biv[bids][2][1],'5', ',', '');
$biv_book_bid[5] = number_format ($decode_b_biv[bids][2][0],'2', ',', '');
$biv_book_bid[6] = number_format ($decode_b_biv[bids][3][1],'5', ',', '');
$biv_book_bid[7] = number_format ($decode_b_biv[bids][3][0],'2', ',', '');
$biv_book_bid[8] = number_format ($decode_b_biv[bids][4][1],'5', ',', '');
$biv_book_bid[9] = number_format ($decode_b_biv[bids][4][0],'2', ',', '');
$biv_book_bid[10] = number_format ($decode_b_biv[bids][5][1],'5', ',', '');
$biv_book_bid[11] = number_format ($decode_b_biv[bids][5][0],'2', ',', '');
$biv_book_bid[12] = number_format ($decode_b_biv[bids][6][1],'5', ',', '');
$biv_book_bid[13] = number_format ($decode_b_biv[bids][6][0],'2', ',', '');
$biv_book_bid[14] = number_format ($decode_b_biv[bids][7][1],'5', ',', '');
$biv_book_bid[15] = number_format ($decode_b_biv[bids][7][0],'2', ',', '');
$biv_book_bid[16] = number_format ($decode_b_biv[bids][8][1],'5', ',', '');
$biv_book_bid[17] = number_format ($decode_b_biv[bids][8][0],'2', ',', '');
$biv_book_bid[18] = number_format ($decode_b_biv[bids][9][1],'5', ',', '');
$biv_book_bid[19] = number_format ($decode_b_biv[bids][9][0],'2', ',', '');
//foxbit
$b_fox = curl_init('https://api.blinktrade.com/api/v1/BRL/orderbook?crypto_currency=BTC');
curl_setopt($b_fox, CURLOPT_RETURNTRANSFER, 1);
$json_b_fox = curl_exec($b_fox);
curl_close($b_fox);
$decode_b_fox = json_decode($json_b_fox, true);
$fox_book_ask[0] = number_format ($decode_b_fox[asks][0][1],'5', ',', '');
$fox_book_ask[1] = number_format ($decode_b_fox[asks][0][0],'2', ',', '');
$fox_book_ask[2] = number_format ($decode_b_fox[asks][1][1],'5', ',', '');
$fox_book_ask[3] = number_format ($decode_b_fox[asks][1][0],'2', ',', '');
$fox_book_ask[4] = number_format ($decode_b_fox[asks][2][1],'5', ',', '');
$fox_book_ask[5] = number_format ($decode_b_fox[asks][2][0],'2', ',', '');
$fox_book_ask[6] = number_format ($decode_b_fox[asks][3][1],'5', ',', '');
$fox_book_ask[7] = number_format ($decode_b_fox[asks][3][0],'2', ',', '');
$fox_book_ask[8] = number_format ($decode_b_fox[asks][4][1],'5', ',', '');
$fox_book_ask[9] = number_format ($decode_b_fox[asks][4][0],'2', ',', '');
$fox_book_ask[10] = number_format ($decode_b_fox[asks][5][1],'5', ',', '');
$fox_book_ask[11] = number_format ($decode_b_fox[asks][5][0],'2', ',', '');
$fox_book_ask[12] = number_format ($decode_b_fox[asks][6][1],'5', ',', '');
$fox_book_ask[13] = number_format ($decode_b_fox[asks][6][0],'2', ',', '');
$fox_book_ask[14] = number_format ($decode_b_fox[asks][7][1],'5', ',', '');
$fox_book_ask[15] = number_format ($decode_b_fox[asks][7][0],'2', ',', '');
$fox_book_ask[16] = number_format ($decode_b_fox[asks][8][1],'5', ',', '');
$fox_book_ask[17] = number_format ($decode_b_fox[asks][8][0],'2', ',', '');
$fox_book_ask[18] = number_format ($decode_b_fox[asks][9][1],'5', ',', '');
$fox_book_ask[19] = number_format ($decode_b_fox[asks][9][0],'2', ',', '');
$fox_book_bid[0] = number_format ($decode_b_fox[bids][0][1],'5', ',', '');
$fox_book_bid[1] = number_format ($decode_b_fox[bids][0][0],'2', ',', '');
$fox_book_bid[2] = number_format ($decode_b_fox[bids][1][1],'5', ',', '');
$fox_book_bid[3] = number_format ($decode_b_fox[bids][1][0],'2', ',', '');
$fox_book_bid[4] = number_format ($decode_b_fox[bids][2][1],'5', ',', '');
$fox_book_bid[5] = number_format ($decode_b_fox[bids][2][0],'2', ',', '');
$fox_book_bid[6] = number_format ($decode_b_fox[bids][3][1],'5', ',', '');
$fox_book_bid[7] = number_format ($decode_b_fox[bids][3][0],'2', ',', '');
$fox_book_bid[8] = number_format ($decode_b_fox[bids][4][1],'5', ',', '');
$fox_book_bid[9] = number_format ($decode_b_fox[bids][4][0],'2', ',', '');
$fox_book_bid[10] = number_format ($decode_b_fox[bids][5][1],'5', ',', '');
$fox_book_bid[11] = number_format ($decode_b_fox[bids][5][0],'2', ',', '');
$fox_book_bid[12] = number_format ($decode_b_fox[bids][6][1],'5', ',', '');
$fox_book_bid[13] = number_format ($decode_b_fox[bids][6][0],'2', ',', '');
$fox_book_bid[14] = number_format ($decode_b_fox[bids][7][1],'5', ',', '');
$fox_book_bid[15] = number_format ($decode_b_fox[bids][7][0],'2', ',', '');
$fox_book_bid[16] = number_format ($decode_b_fox[bids][8][1],'5', ',', '');
$fox_book_bid[17] = number_format ($decode_b_fox[bids][8][0],'2', ',', '');
$fox_book_bid[18] = number_format ($decode_b_fox[bids][9][1],'5', ',', '');
$fox_book_bid[19] = number_format ($decode_b_fox[bids][9][0],'2', ',', '');
?>