sFOX API
Sign InOpen Account
Connect API
Connect API
  • Introduction
    • Welcome
    • Getting Started
    • Resources
      • Terminology
      • Systems & Operations
      • Integration Options
    • Guides
      • End User Onboarding & KYC
        • Individuals
        • Businesses
        • Enhanced Due Diligence
  • REST API
    • REST Endpoints
    • Authentication
    • End Users
      • Create End User Account
      • Request Verification Code
      • Confirm Verification Code
      • Create User Auth Token(s)
      • Get End User(s)
      • Get EDD Requests
      • Get EDD Prompts
      • Create EDD Responses
        • Uploading Files as Responses
      • Submit Documents
      • Deactivate User
    • Payments
      • Create Bank Account (Plaid)
      • Create Bank Account
      • Get Bank Account
      • Get Plaid Processors
      • Amend Plaid Processors
      • Verify Bank Account
      • Delete Bank Account
      • Get Wire Instructions
      • Get ACH Agreement Status
      • Request ACH Onboarding
      • Get ACH Deposit Limit
    • Withdrawals
      • Confirm Withdrawal
      • Resend Confirmation Code
      • Cancel Withdrawal
    • Transfers
      • Create Transfer
      • Confirm Transfer
      • Resend Confirmation Code
      • Cancel Transfer
      • Get Transfer Permissions
      • Get Transfer History
    • Monetization
      • Create Setting
      • Update Setting
      • Delete Setting
      • Get Settings
      • Get Permissions
      • Get Monetization History
  • WebSocket API
    • Connecting
    • Authentication
    • Subscribing & Unsubscribing
    • Message Format
    • End Users
      • Onboarding
      • Balances
      • Orders
      • Trades
    • Market Data
      • Order Book
      • Trades
      • Ticker
  • Single Sign-On
    • Overview
      • IdP Initiated SSO
    • IdP Data
    • SAML Response Data
  • Errors
    • Error Codes
Powered by GitBook
On this page
  1. WebSocket API

Authentication

The sFOX WebSocket feeds described in this document require authentication.

The authentication command should be JSON with the following properties using your Enterprise Partner Bearer Token as the apiKey.

Property
Type
Command

type

string

"authenticate"

apiKey

string

"<YOUR-API-KEY>"

enterprise

boolean

true

const authMessage = {
   type: 'authenticate',
   apiKey: '<API_KEY>',
   enterprise: true
}
ws.send(JSON.stringify(authMessage))
auth_message={
  "type": "authenticate",
  "apiKey": "<API KEY>",
  "enterprise": True
}

await ws.send(json_dumps(auth_message))

Success

{
  "type": "success",
  "sequence": 2,
  "timestamp": 1649898453577592461,
  "payload": {
    "action": "authenticate"
  },
  "action": "authenticate"
}

Failure

{
  "type": "error",
  "sequence": 2,
  "timestamp": 1649898453577592461,
  "payload": {
    "action": "authenticate"
  },
  "action": "authenticate"
}

PreviousConnectingNextSubscribing & Unsubscribing

Last updated 11 months ago