API for Developers

The Bitfxt API gives you the ability to:

Access current and historic market data

Submit trade orders and view order status

Market Data

Market data API calls can be accessed by anyone without authentication.

GET /ticker

Returns the latest ticker indicators for all available pairs.

Request Example

https://www.bitfxt.com/api/v1/ticker

Response Example

{
  "BTC_NGN":{
    "last_price": 4265455,
    "quote_volume": 154,
    "base_volume": 40
  },
  "BTC_USDT":{
    "last_price": 12457,
    "quote_volume": 654,
    "base_volume": 73
  }
}

GET /orderbook

Returns a list of the top 100 bids and asks in the order book. Ask orders are sorted by price ascending. Bid orders are sorted by price descending.

Request Example

https://www.bitfxt.com/api/v1/orderbook?pair=BTC_NGN

Arguments

pair string required Currency pair e.g. BTC_NGN

Response Example

{
  "bids":[
    {
      "quantity": 0.12,
      "price": 4265455
    },
    {
      "quantity": 0.5,
      "price": 4264357
    }
  ],
  "asks":[
    {
      "quantity": 0.5,
      "price": 4263524
    },
    {
      "quantity": 0.5,
      "price": 4263534
    }
  ]
}

GET /tradehistory

Returns a list of the most recent trades. At most 100 results are returned per call.

Request Example

https://www.bitfxt.com/api/v1/tradehistory?pair=BTC_NGN

Arguments

pair string required Currency pair e.g. BTC_NGN

Response Example

{
  "trades":[
    {
      "quantity":2,
      "price":4263531,
      "timestamp":1562923503,
      "type":"buy"
    },
    {
      "quantity":4,
      "price":4263535,
      "timestamp":1562923505,
      "type":"sell"
    }
  ]
}

Authentication

Some API calls require your application to authenticate itself. This is done using an API key associated with your account. You can create an API key by visiting the API Keys section on the settings page.

An API key consists of an id and a secret. For example: Lc6VeVmXhQVPgPQ (key id) and GXK5-klvyEZLWcDIKQqTbErZfd35qvdR (key secret).

Accounts

GET /getbalance

Return all wallet balances.

Request Example

https://www.bitfxt.com/api/v1/getbalance

Arguments

api_key string required API key e.g. Lc6VeVmXhQVPgPQ
secret_key string required API secret key e.g. GXK5-klvyEZLWcDIKQqTbErZfd35qvdR

Response Example

{
  "BTC": "0.0152",
  "NGN": "520457"
}

Orders

POST /createorder

Create a new trade order.

Request Example

https://www.bitfxt.com/api/v1/createorder

Arguments

api_key string required API key e.g. Lc6VeVmXhQVPgPQ
secret_key string required API secret key e.g. GXK5-klvyEZLWcDIKQqTbErZfd35qvdR
type string required "BUY" for buy order or "SELL" for sell order
amount string required Amount of bitcoin to buy or sell e.g. "0.1234"
price string required Limit price for an order e.g. "4263524"

Response Example

{
  "order_id": "B9531568746328"
}

GET /orderstatus

Create a new trade order.

Request Example

https://www.bitfxt.com/api/v1/orderstatus

Arguments

api_key string required API key e.g. Lc6VeVmXhQVPgPQ
secret_key string required API secret key e.g. GXK5-klvyEZLWcDIKQqTbErZfd35qvdR
order_id string required Order ID e.g. B9531568746328

Response Example

{
  "order_id": "B9531568746328",
  "type": "BUY",
  "status": "FILLED",
  "amount": "0.5",
  "price": "4263524",
  "executed_amt": "0.5",
  "trades" : [
    {
      "amount" : "0.3",
      "price" : "4263524"
    },
    {
      "amount" : "0.2",
      "price" : "4263513"
    }
  ]
}

POST /cancelorder

Request to cancel an order.

Request Example

https://www.bitfxt.com/api/v1/cancelorder

Arguments

api_key string required API key e.g. Lc6VeVmXhQVPgPQ
secret_key string required API secret key e.g. GXK5-klvyEZLWcDIKQqTbErZfd35qvdR
order_id string required Currency order_id e.g. B9531568746584

Response Example

{
  "success": true
}

Websocket

The websocket API provides streaming access to market data. It is more efficient and provides lower latency information than repeatedly polling the orderbook and recent trades.

liquidity_socket   = io.connect( 'wss://www.bitfxt.com:8080',{transports:['websocket'], upgrade: false}, {'force new connection': true} );

var pair_room = 'BTC_NGN'
liquidity_socket.emit('room', pair_room);

Orde Book

Returns the order book for a given market.

Request Example

liquidity_socket.on('order_book', function(res){
			
);

Response Example

{"asks":{"7000.00":"0.4000","7100.00":"23.2400"},"bids":{"6000.00":"0.5000","5950.00":"2.4500"}}

Trade History

Returns the trade history for a given market.

Request Example

liquidity_socket.on('history', function(res){
			
);

Response Example

[{"quantity":"0.01116918","price":"3250000.00000000","timestamp":1571048968,"type":"sell"},
{"quantity":"0.01116918","price":"3250000.00000000","timestamp":1571048968,"type":"buy"}]

Ticker

Returns summary information for each currency pair listed on the exchange.

Request Example

liquidity_socket.on('ticker', function(res){
			
);

Response Example

{"BTC_NGN":{"last_price":"2600000.00","quote_volume":"12.54","base_volume":"56948.12"},
"BXT_BTC":{"last_price":"0.00001300","quote_volume":"215.54","base_volume":"2154.54"}
phone

Call:+2348090660713

location

Address: Bitfxt , Plot 8 The Providence house , Admiralty way Lekki Phase I, Lekki ,Lagos , Nigeria-4000103