Skip to main content

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

FieldTypeDescription
sstringSymbol/Trading pair
amnumberAmount/Quantity
prnumberPrice
otstringOrder type ("buy" or "sell")
oistringOrder ID
exstringExchange name
tsnumberTimestamp (Unix timestamp)
uistringUser ID (may be empty)
bsstringBase symbol (may be empty)
qsstringQuote symbol (may be empty)
sostringSource type ("future", "spot", etc.)