Trades
Subscription Instructions
Feed Name
Value
Description
Example Code
const WebSocket = require('ws')
const ws = new WebSocket('wss://ws.sfox.com/ws')
ws.on('open', function() {
const authMessage = {
type: 'authenticate',
apiKey: `${process.env.ENTERPRISE_API_KEY}`,
enterprise: 'true'
}
ws.send(JSON.stringify(authMessage))
})
// After successful authentication, subscribe to trades feed
const subscribeMsg = {
type: 'subscribe',
feeds: ['private.enterprise.users.trades']
}
ws.send(JSON.stringify(subscribeMsg))Last updated