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

Trade Executed

Own trades executed feed

PreviousOrder Executed

Last updated 8 months ago

The executions channel streams trades 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-trade-executed.{userId}");

Subscribe Request Payload

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

Examples

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

Payload

Name
Type
Description

id

integer

Unique identifier for the trade.

timestamp

string

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

type

string

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

order_id

integer

Unique identifier for the related order (e.g., 196857).

order_type

string

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

pair_id

integer

Unique identifier of the asset pair (e.g., 685).

pair

string

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

volume.amount

string

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

volume.currency

string

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

price.amount

string

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

price.currency

string

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

cost.amount

string

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

cost.currency

string

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

fee.amount

string

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

fee.currency

string

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

transaction_id

string

Unique transaction identifier for the trade.

leverage

string or null

Leverage used in the trade, if applicable (null in this case).

Example of the Payload

{
   "id": 156391,
   "timestamp": "2024-09-18 23:31:27",
   "type": "sell",
   "order_id": 196857,
   "order_type": "limit",
   "pair_id": 685,
   "pair": "NIZA\/USDT",
   "volume": {
       "amount": "100.00000000",
       "currency": "NIZA"
   },
   "price": {
       "amount": "100.00000000",
       "currency": "NIZA\/USDT"
   },
   "cost": {
       "amount": "10000.00000000",
       "currency": "USDT"
   },
   "fee": {
       "amount": "100.00000000",
       "currency": "USDT"
   },
   "transaction_id": "TGZA3R-ZVETW-RUIYAO",
   "leverage": null
}

documentation