Skip to content

hoony2520/BinanceApiSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BinanceApiSample

Binance Websocket Api Examples

Sample test code run
node ./examples/wsFetchTicker.js

Sample Output

Received: '{"e":"24hrTicker","E":1529302335315,"s":"BTCUSDT","p":"-92.33000000","P":"-1.418","w":"6477.58235133","x":"6511.45000000","c":"6419.12000000","Q":"0.08948500","b":"6419.13000000","B":"0.03000000","a":"6420.99000000","A":"0.00159900","o":"6511.45000000","h":"6589.03000000","l":"6380.00000000","v":"21998.95152500","q":"142500020.14607986","O":1529215935317,"C":1529302335317,"F":51615611,"L":51754094,"n":138484}'

--- Description of Payload Response Parameters ---

{
"e": "24hrTicker", // Event type
"E": 123456789, // Event time
"s": "BTCUSDT", // Symbol
"p": "0.0015", // Price change
"P": "250.00", // Price change percent
"w": "0.0018", // Weighted average price
"x": "0.0009", // Previous day's close price
"c": "0.0025", // Current day's close price
"Q": "10", // Close trade's quantity
"b": "0.0024", // Best bid price
"B": "10", // Best bid quantity
"a": "0.0026", // Best ask price
"A": "100", // Best ask quantity
"o": "0.0010", // Open price
"h": "0.0025", // High price
"l": "0.0010", // Low price
"v": "10000", // Total traded base asset volume
"q": "18", // Total traded quote asset volume
"O": 0, // Statistics open time
"C": 86400000, // Statistics close time
"F": 0, // First trade ID
"L": 18150, // Last trade Id
"n": 18151 // Total number of trades
}

About

Binance Websocket Api Examples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published