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"
}

GATEWAY API

To use the gateway 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/gateway 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.

The payment gateway will cost 1% of the total amount deposited and confirmed on blockchain. Additionally, it will be charged 1 BRZX per generated address.

As for promotional purpose, Braziliex will not charge fees for generating new addresses

Get new address

Get a new address

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

Parameters (method: POST)
commandget_new_address
id_orderexample: order_1234
labelexample: nome do produto ou serviço
currencyexample: btc

Response:
{
      "address":"5E1ErD78TKuu93dDPzf7pqTuBohj8jVtYc"
}

Get new payment

Get a new address and convert to fiat

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

Parameters (method: POST)
commandget_new_payment
id_orderexample: order_1234
labelexample: nome do produto ou serviço
currencyexample: btc
convert_to_valueexample: 30.00
convert_to_currencyexample: brl

Response:
{
      "success":1,
      "address":"5E1ErD78TKuu93dDPzf7pqTuBohj8jVtYc",
      "name":"Nome do Cliente",
      "value":0.00129387,
      "currency":"btc",
      "original_value":30,
      "original_currency":"brl"
}

List addresses

List all addresses

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

Parameters (method: POST)
commandlist_addresses
currencyexample: btc

Response:
[
      {
            "address":"5E1ErD78TKuu93dDPzf7pqTuBohj8jVtYc",
             label:"order_1234"
      }
]

Get transactions by label

Search for deposits on specific label

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

Parameters (method: POST)
commandget_transaction_by_label
labelexample: order_1234

Response:
[
      {
            "address":"5E1ErD78TKuu93dDPzf7pqTuBohj8jVtYc",
            "currency":"btc",
            "label":"order_1234",
            "deposits":[
                  {
                        "txid":"640171a39c00351b792266bb7d034acc7725945be07eed1997b17cc2f4c2684d",
                        "confirmations":1,
                        "value":0.014
                  },
                  "value_on_blockchain":0.014
            }
      ]
}
]

Get transactions by address

Search for deposits on specific address

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

Parameters (method: POST)
commandget_transaction_by_address
addressexample: 5E1ErD78TKuu93dDPzf7pqTuBohj8jVtYc

Response:
[
      {
            "address":"5E1ErD78TKuu93dDPzf7pqTuBohj8jVtYc",
            "currency":"btc",
            "label":"order_1234",
            "deposits":[
                  {
                        "txid":"640171a39c00351b792266bb7d034acc7725945be07eed1997b17cc2f4c2684d",
                        "confirmations":1,
                        "value":0,
                        "value_on_blockchain":0.014
                  }
            ]
      }
]

Get transactions by TxID

Search for TxID

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

Parameters (method: POST)
commandget_transaction_by_txid
txidexample: 640171a39c00351b792266bb7d034acc7725945be07eed1997b17cc2f4c2684d

Response:
[
      {
            "address":"5E1ErD78TKuu93dDPzf7pqTuBohj8jVtYc",
            "currency":"btc",
            "label":"order_1234",
            "deposits":[
                  {
                        "txid":"640171a39c00351b792266bb7d034acc7725945be07eed1997b17cc2f4c2684d",
                        "confirmations":1,
                        "value":0,
                        "value_on_blockchain":0.014
                  }
            ]
      }
]