NATS Integration Guide - Order Stream
Overview
This document provides instructions for integrating with our Live trade API using webhook to receive real-time order messages.
Webhook Setup
To receive order messages, you need to set up a webhook endpoint that can accept HTTP POST requests. The webhook should be capable of processing JSON payloads.
Message Schema
Order Message
{
"s": "PTBUSDT",
"am": 2386,
"pr": 0.0617369,
"ot": "sell",
"oi": "xxxxxxxxxxxxxxxxxxxxxxxx",
"ex": "binance",
"ts": 1756961631,
"bs": "PTB",
"qs": "USDT",
"so": "future"
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
s | string | Symbol/Trading pair |
am | number | Amount/Quantity |
pr | number | Price |
ot | string | Order type ("buy" or "sell") |
oi | string | Order ID |
ex | string | Exchange name |
ts | number | Timestamp (Unix timestamp) |
ui | string | User ID (may be empty) |
bs | string | Base symbol (may be empty) |
qs | string | Quote symbol (may be empty) |
so | string | Source type ("future", "spot", etc.) |