API Reference

/public/currencies

Used to get the open and available trading markets at Braziliex along with other meta data.

Request:
https://braziliex.com/api/v1/public/currencies

Response:
{
      "btc":{
            "name":"Bitcoin",
            "txWithdrawalFee":0.0005,
            "txWithdrawalPercentageFee":0,
            "minConf":3,
            "minAmountTrade":0.0001,
            "decimal":8,
            "active":1
      },
      "ltc":{
            "name":"Litecoin",
            "txWithdrawalFee":0.001,
            "txWithdrawalPercentageFee":0,
            "minConf":3,
            "minAmountTrade":0.001,
            "decimal":8,
            "active":1
      }
}

/public/ticker

Used to get the last 24 hour summary of all active exchanges.

Request:
https://braziliex.com/api/v1/public/ticker

Response:
{
      "ltc_btc":{
            "active":1,
            "market":"ltc_btc",
            "last":"0.01522764",
            "percentChange":"-0.13",
            "baseVolume":"0.035",
            "quoteVolume":"0.001",
            "highestBid":"0.01529496",
            "lowestAsk":"0.01386210",
            "baseVolume24":"0.057",
            "quoteVolume24":"0.001",
            "highestBid24":"0.01540520",
            "lowestAsk24":"0.01200000"
      },
      "eth_btc":{
            "active":1,
            "market":"eth_btc",
            "last":"0.05903881",
            "percentChange":"0.00",
            "baseVolume":"0.050",
            "quoteVolume":"0.003",
            "highestBid":"0.05870032",
            "lowestAsk":"0.05347429",
            "baseVolume24":"0.065",
            "quoteVolume24":"0.004",
            "highestBid24":"0.06037500",
            "lowestAsk24":"0.05646708"
      }
}

/public/ticker/{market}

Used to get the current tick values for a market.

Parameters (method: GET)
parammarket
descrequired a string literal for the market (ex: ltc_btc)

Request:
https://braziliex.com/api/v1/public/ticker/ltc_btc

Response:
{
      "active":1,
      "market":"ltc_btc",
      "last":"0.01522764",
      "percentChange":"-0.13",
      "baseVolume":"0.035",
      "quoteVolume":"0.001",
      "highestBid":"0.01529496",
      "lowestAsk":"0.01386210",
      "baseVolume24":"0.057",
      "quoteVolume24":"0.001",
      "highestBid24":"0.01540520",
      "lowestAsk24":"0.01200000"
}

/public/orderbook/{market}

Used to get retrieve the orderbook for a given market.

Parameters (method: GET)
parammarket
descrequired a string literal for the market (ex: ltc_btc)

Request:
https://braziliex.com/api/v1/public/orderbook/ltc_btc

Response:
{
      "asks":[
            {
                  "price":0.01524794,
                  "amount":0.00247
            },
            {
                  "price":0.0152677,
                  "amount":0.00184
            }
      ],
      "bids":[
            {
                  "price":0.01520678,
                  "amount":0.00257
            },
            {
                  "price":0.01495989,
                  "amount":0.00181
            }
      ]
}

/public/tradehistory/{market}

Used to get retrieve the last 15 trades.

Parameters (method: GET)
parammarket
descrequired a string literal for the market (ex: ltc_btc, eth_btc, dash_btc, eth_brl, btc_brl, eth_brl)

Request:
https://braziliex.com/api/v1/public/tradehistory/ltc_btc

Response:
[
      {
            "type":"sell",
            "price":"0.04829300",
            "date_exec":"2017-05-11 20:41:01",
            "amount":"0.00194000",
            "total":"0.00009369"
      },
      {
            "type":"sell",
            "price":"0.04829300",
            "date_exec":"2017-05-11 20:41:00",
            "amount":"0.00628000",
            "total":"0.00030328"
      },
      {
            "type":"buy",
            "price":"0.04829206",
            "date_exec":"2017-05-11 20:40:44",
            "amount":"0.00743000",
            "total":"0.00035881"
      }
]


PRIVATE API

To use the private API, you will need to create an API key.

All calls to the trading API are sent via HTTP POST to https://braziliex.com/api/v1/private and must contain the following headers:

Key: Your API key.
Sign: The query's POST data signed by your key's "secret" according to the HMAC-SHA512 method.

Additionally, all queries must include a "nonce" POST parameter.
The nonce parameter is an integer which must always be greater than the previous nonce used.

Balance

Returns all of your available balances.

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commandbalance

Response:
{
      "balance":{
            "xmr":"0.05098750",
            "brl":"8.80300000",
            "ltc":"0.46302787",
            "eth":"0.02021000",
            "btc":"0.01043479",
            "dash":"0.01899750"
      }
}

Complete balance

Returns all of your balances, including available balance, balance on orders, and the estimated BTC value of your balance.

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commandcomplete_balance

Response:
{
      "btc":{
            "under_confirmation":"0.00000000",
            "available":"0.01043479",
            "total":"0.01043479",
            "max_dialy_withdrawal_btc_value":"1.27754711",
            "on_order":"0.00000000",
            "btc_value":"0.01043479",
            "max_available_order":"0.01040877",
            "max_available_withdrawal":"0.00993479",
            "withdrawal_last24":"0.00000000",
            "withdrawal_last24_btc_value":"0.00000000",
            "total_withdrawal_last24_btc_value":0,
            "max_withdrawal_available_btc_value":"1.27754711",
            "last":1,
            "max_withdrawal_btc_value":"1.27754711",
            "max_withdrawal_this_cur":"1.27754711",
            "txWithdrawalPercentageFee":0,
            "txWithdrawalFee":0.0005
      },
      "dash":{
            "under_confirmation":"0.00000000",
            "available":"0.01899750",
            "total":"0.01899750",
            "max_dialy_withdrawal_btc_value":"1.27754711",
            "on_order":"0.00000000",
            "btc_value":"0.00119081",
            "max_available_order":"0.01895012",
            "max_available_withdrawal":"0.00899750",
            "withdrawal_last24":"0.00000000",
            "withdrawal_last24_btc_value":"0.00000000",
            "total_withdrawal_last24_btc_value":0,
            "max_withdrawal_available_btc_value":"1.27754711",
            "last":"0.06268235",
            "max_withdrawal_btc_value":"1.27754711",
            "max_withdrawal_this_cur":"20.38128930",
            "txWithdrawalPercentageFee":0,
            "txWithdrawalFee":0.01
      }
}

Open orders

Returns your open orders for a given market, specified by the "market" POST parameter, example: "ltc_btc"

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commandopen_orders
marketexample: ltc_btc

Response:
{
      "order_open":[
            {
                  "order_number":"590c6433f07a035dae8f4db1",
                  "type":"sell",
                  "market":"xmr_btc",
                  "price":"0.02500000",
                  "amount":"0.01000000",
                  "total":"0.00025000",
                  "progress":"0.0000",
                  "date":"2017-04-05 11:38:27"
            }
      ],
      "total":1,
      "total_pages":1,
      "page":1
}

Trade history

Returns your trade history for a given market, specified by the "market" POST parameter.

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commandtrade_history
marketexample: ltc_btc

Response:
{
      "trade_history":[
            {
                  "order_number":"58ee441d05f8233fadabfb07",
                  "type":"buy",
                  "market":"ltc_btc",
                  "price":"0.01000000",
                  "amount":"0.00200000",
                  "total":"0.00002000",
                  "progress":"1.0000",
                  "date":"2017-03-12 15:13:33"
            },
            {
                  "order_number":"58ee43ce05f8233fadabfae3",
                  "type":"buy",
                  "market":"ltc_btc",
                  "price":"0.01000000",
                  "amount":"0.00200000",
                  "total":"0.00002000",
                  "progress":"1.0000",
                  "date":"2017-03-12 15:12:14"
            }
      ],
      "total":2,
      "total_pages":1,
      "page":1
}

Deposit address

Used to get a deposit address by "market".

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commanddeposit_address
currencyexample: eth

Response:
{
      "success":1,
      "currency":"btc",
      "deposit_address":"127esw1hxAkzDTbf5bswED4TGNVJQAcDKD",
      "payment_id":null
}

Sell

Places a sell order in a given market.

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commandsell
amountexample: 1.202231
priceexample: 2.2382
marketexample: xmr_btc

Response:
{
      "success":1,
      "message":" ##RESERVED FOR ORDER / SELL / XMR_BTC / AMOUNT: 0.01 XMR / PRICE: 0.017 BTC / TOTAL: 0.00017000 BTC / FEE: 0.00002500 XMR ",
      "order_number":"590b962ba5b98335965fa0a8"
}

Buy

Places a buy order in a given market.

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commandbuy
amountexample: 1.202231
priceexample: 2.2382
marketexample: eth_brl

Response:
{
      "success":1,
      "message":" ##RESERVED FOR ORDER / BUY / XMR_BTC / AMOUNT: 0.005 XMR / PRICE: 0.017 BTC / TOTAL: 0.00008500 BTC / FEE: 0.00000021 BTC ",
      "order_number":"590b962ba5b98335965fa0c0"
}

Cancel order

Cancels an order you have placed in a given market.

Request:
https://braziliex.com/api/v1/private

Parameters (method: POST)
commandcancel_order
order_numberexample: 1.202231
marketexample: eth_btc

Response:
{
      "success":1,
      "message":"the order has been scheduled to be canceled"
}