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. Private Channels

Order Executed

Order status update feed

PreviousPrivate ChannelsNextTrade Executed

Last updated 7 months ago

The executions channel streams order status and execution events for this account.

This channel contains account specific data, an authentication token is required in the request. Follow this how to get an authentication token.

Subscribe with Pusher

var channel = pusher.subscribe("private-order-executed.{userId}");

Subscribe Request Payload

{
   "event": "pusher:subscribe",
   "data": {
       "auth": "cd02139a35ead0a82ef6:672560a4d0f83cf5053cf509157ee24009c674188b58b71dd2f98647d9cab1df",
       "channel": "private-order-executed.{userId}"
   }
}

Examples

Pusher
var channel = pusher.subscribe("private-order-executed.{userId}");
WebSocket API in Javascript
const message = {
        event: "pusher:subscribe",
        "data": {
            "auth": "cd02139a35ead0a82ef6:672560a4d0f83cf5053cf509157ee24009c674188b58b71dd2f98647d9cab1df",
            "channel": "private-order-executed.1"
         }
    };
socket.send(JSON.stringify(message));

Payload

Name
Type
Description

id

integer

Unique identifier for the order.

user_id

integer

ID of the user who placed the order.

transaction_id

string

Unique transaction identifier for the order.

status

string

Current status of the order (e.g., "closed").

open_time

float

Timestamp when the order was opened (in Unix time).

close_time

float

Timestamp when the order was closed (in Unix time).

expire_time

float

Expiry time of the order (set to 0 if not applicable).

reason

string or null

Reason for the order closure, if applicable (null in this case).

pair

string

Asset pair involved in the trade (e.g., "NIZAUSDT").

type

string

Type of order (e.g., "buy").

order_type

string

The type of order (e.g., "limit").

description

object

Detailed description of the order.

description.pair

string

Asset pair being traded (e.g., "NIZAUSDT").

description.type

string

Type of order (e.g., "buy").

description.close

string

Closing details, empty in this case.

description.order

string

Full description of the order (e.g., "buy 100.00000000 NIZAUSDT @ limit").

description.price

string

Price at which the order was executed.

description.leverage

string

Leverage used in the trade (e.g., "none").

description.orderType

string

Type of order (e.g., "limit").

description.secondaryPrice

string or null

Secondary price, if applicable (null in this case).

volume.amount

string

Volume of the asset being traded (e.g., "100.00000000").

volume.currency

string

The asset being traded (e.g., "NIZA").

volume_executed.amount

string

Amount of the asset that was executed (e.g., "100.00000000").

volume_executed.currency

string

Currency of the executed volume (e.g., "NIZA").

fee.amount

string

Fee charged for the trade (e.g., "1.00000000").

fee.currency

string

Currency in which the fee is paid (e.g., "NIZA").

price.amount

string

Price at which the asset was traded (e.g., "100.00000000").

price.currency

string

Currency of the price (e.g., "USDT").

secondary_price

string or null

Secondary price, if applicable (null in this case).

limit_price

string or null

Limit price, if applicable (null in this case).

cost.amount

string

Total cost of the order (e.g., "10000.00000000").

cost.currency

string

Currency in which the cost is calculated (e.g., "USDT").

integer

Unique identifier of the asset pair.

string

Name of the asset pair (e.g., "NIZAUSDT").

asset_pair.display_name

string

Display name of the asset pair (e.g., "NIZA/USDT").

asset_pair.base_name

string

The base asset of the pair (e.g., "NIZA").

asset_pair.quote_name

string

The quote asset of the pair (e.g., "USDT").

trigger_conditions

string

Conditions that trigger the trade (e.g., "--").

trades

array

List of trades related to this order.

trades[0].id

integer

Unique identifier for the trade.

trades[0].timestamp

string

Timestamp of the trade (e.g., "2024-09-18 23:31:27").

trades[0].type

string

Type of trade (e.g., "buy").

trades[0].volume.amount

string

Volume traded (e.g., "100.00000000").

trades[0].volume.currency

string

Currency of the volume (e.g., "NIZA").

trades[0].price.amount

string

Price at which the trade occurred (e.g., "100.00000000").

trades[0].price.currency

string

Currency pair of the trade (e.g., "NIZA/USDT").

trades[0].cost.amount

string

Total cost of the trade (e.g., "10000.00000000").

trades[0].cost.currency

string

Currency of the cost (e.g., "USDT").

trades[0].fee.amount

string

Fee charged for the trade (e.g., "1.00000000").

trades[0].fee.currency

string

Currency of the fee (e.g., "NIZA").

trades[0].transaction_id

string

Unique transaction ID of the trade (e.g., "TJ6TZ7-RMUVA-BFLC44").

socket

string or null

Socket connection details, if applicable (null in this case).

Example of the Payload

{
   "id": 196857,
   "user_id": 4,
   "transaction_id": "OXUSHG-ND5YU-NJ6ILZ",
   "status": "closed",
   "open_time": "1726695085.0000",
   "close_time": "1726695087.6582",
   "expire_time": "0.0000",
   "reason": null,
   "pair": "NIZAUSDT",
   "type": "sell",
   "order_type": "limit",
   "description": {
       "pair": "NIZAUSDT",
       "type": "sell",
       "close": "",
       "order": "sell 100.00000000 NIZAUSDT @ limit",
       "price": "100.00000000",
       "leverage": "none",
       "orderType": "limit",
       "secondaryPrice": null
   },
   "volume": {
       "amount": "100.00000000",
       "currency": "NIZA"
   },
   "volume_executed": {
       "amount": "100.00000000",
       "currency": "NIZA"
   },
   "fee": {
       "amount": "100.00000000",
       "currency": "USDT"
   },
   "price": {
       "amount": "100.00000000",
       "currency": "USDT"
   },
   "secondary_price": null,
   "limit_price": null,
   "cost": {
       "amount": "10000.00000000",
       "currency": "USDT"
   },
   "asset_pair": {
       "id": 685,
       "name": "NIZAUSDT",
       "display_name": "NIZA\/USDT",
       "base_name": "NIZA",
       "quote_name": "USDT"
   },
   "trigger_conditions": "--",
   "trades": [
       {
           "id": 156391,
           "timestamp": "2024-09-18 23:31:27",
           "type": "sell",
           "volume": {
               "amount": "100.00000000",
               "currency": "NIZA"
           },
           "price": {
               "amount": "100.00000000",
               "currency": "NIZA\/USDT"
           },
           "cost": {
               "amount": "10000.00000000",
               "currency": "USDT"
           },
           "fee": {
               "amount": "100.00000000",
               "currency": "NIZA"
           },
           "transaction_id": "TGZA3R-ZVETW-RUIYAO"
       }
   ]
}

documentation
asset_pair.id
asset_pair.name