Stream Reference
Fast API provides multiple data streams for various exchange data:
- L2 Order Book Data
- Trade Events
- Per Account Order Events
Book Ticker
Schema | Frequency | Description |
---|---|---|
{symbol}@bookTicker | Real-time | Real time updates to the best bid/ask price for an order book. |
Try It
btcusd@bookTicker
disconnected
Code
Field | Type | Description |
---|---|---|
u | number | Update ID |
E | number | Event time (nanoseconds) |
s | string | Symbol |
b | string | Best bid price |
B | string | Best bid quantity |
a | string | Best ask price |
A | string | Best ask quantity |
L2 Partial Depth Streams
Schema | Frequency | Description |
---|---|---|
{symbol}@depth5 | Periodic (1s) | Periodic snapshot of the top 5 levels once per second |
{symbol}@depth10 | Periodic (1s) | Top 10 levels |
{symbol}@depth20 | Periodic (1s) | Top 20 levels |
{symbol}@depth5@100ms | Periodic (100ms) | Top 5 levels every 100 milliseconds |
{symbol}@depth10@100ms | Periodic (100ms) | Top 10 levels |
{symbol}@depth20@100ms | Periodic (100ms) | Top 20 levels |
Try It
btcusd@depth10@100ms
disconnected
Code
Field | Type | Description |
---|---|---|
lastUpdateId | number | Last update ID |
bids | array | Array of [price, quantity] |
asks | array | Array of [price, quantity] |
L2 Differential Depth Streams
Schema | Frequency | Description |
---|---|---|
{symbol}@depth | Periodic (1s) | List of all changed price levels in the last second |
{symbol}@depth@100ms | Periodic (100ms) | In the last 100 milliseconds |
Try It
btcusd@depth@100ms
disconnected
Quantity zero indicates price level removal.
Code
Field | Type | Description |
---|---|---|
e | string | Event type ("depthUpdate") |
E | number | Event time (nanoseconds) |
s | string | Symbol |
U | number | First update ID in this event |
u | number | Last update ID in this event |
b | array | Bid updates [price, quantity] |
a | array | Ask updates [price, quantity] |
Trade Stream
Schema | Frequency | Description |
---|---|---|
{symbol}@trade | Real-time | Real time trade executions |
Try It
btcusd@trade
disconnected
Code
Field | Type | Description |
---|---|---|
E | number | Event time |
s | string | Symbol |
t | number | Trade ID |
p | string | Price |
q | string | Quantity |
i | number | Order ID |
T | number | Trade time |
m | boolean | Is buyer the maker |
S | string | Side ("BUY" or "SELL") |
Order Events
Requires an authenticated session
Schema | Frequency | Description |
---|---|---|
orders@account | Real-time | Real time order activity for the account associated with the authenticated API key |
orders@session | Real-time | Real time order activity for the authenticated API key |
Code
Field | Type | Description |
---|---|---|
E | number | Event time |
s | string | Symbol |
i | number | Order ID |
c | string | Client Order ID |
S | string | Side, BUY / SELL |
o | string | Type, LIMIT / MARKET |
X | string | Status, NEW / FILLED / PARTIALLY_FILLED / CANCELED / REJECTED |
p | string | Order price |
q | string | Original quantity |
z | string | Remaining quantity |
Z | string | Executed quantity |
L | string | Last execution price |
t | number | Trade ID |
r | string | Rejection reason |
T | number | Update time |
Last modified on