Niza Global - API Docs
  • Introduction
  • General
  • Authentication
  • PUBLIC ENDPOINTS
    • Markets
    • Tickers
    • OHLC Data
    • Order Book
    • Historical Trades
  • AUTHENTICATED ENDPOINTS
    • Balances
      • (Deprecated) Trade Wallet
      • Spot Wallet
    • Orders
      • Create Order
      • Cancel Order
      • Open Orders
      • Closed Orders
      • Get Order
    • Trades
      • Trades History
      • Get Trade
  • Websocket API 1.0
    • Overview
    • Connection Details
    • WebSocket Authentication
    • Public Channels
      • Ticker Information
      • OHLC
      • Recent Trades
      • Orderbook
    • Private Channels
      • Order Executed
      • Trade Executed
Powered by GitBook
On this page
  • Subscribe with Pusher
  • Subscribe Request Payload
  • Examples
  • Payload
  • Example of the Payload
  1. Websocket API 1.0
  2. Public Channels

Orderbook

Order book feed for a currency pair.

The order-book channel generates a book event when a order is added, updated, deleted from the orderbook.

When subscribing, the pair should be set in alphanumeric format only. Do not use separators between the base and quote asset. The correct format for NIZA/USDT to be set in a channel name is NIZAUSDT.

Subscribe with Pusher

var channel = pusher.subscribe("order-book.{pair}");

Subscribe Request Payload

{
   "event": "pusher:subscribe",
   "data": {
       "channel": "order-book.{pair}"
   }
}

Examples

Pusher
var channel = pusher.subscribe("order-book.NIZAUSDT");
WebSocket API in Javascript
const message = {
        event: "pusher:subscribe",
        data: {
            channel: "order-book.NIZAUSDT"
        }
    };
socket.send(JSON.stringify(message));

Payload

Name
Type
Description

channel

string

The name of the channel

type

string

Type of the event

data

array

The payload of trade data

data.asks

string

Sell order data. Empty array if order side is Buy

data.asks.price

decimal

Order price

data.asks.qty

decimal

Order volume

data.bids

object

Buy order data. Empty array if the order side is sell.

data.bids.price

decimal

Order price

data.bids.qty

decimal

Order Volume

data.symbol

string

Example: "NIZA/USDT" The symbol of the currency pair.

Example of the Payload

{
    "channel":"book",
    "type":"update",
    "data":{
        "asks":[],
        "bids":{
            "price":"0.00013180",
            "qty":"854921.09000000"
        },
        "symbol":"NIZA/USDT"
    }
}

PreviousRecent TradesNextPrivate Channels

Last updated 8 months ago