Skip to main content
An API Key is required to connect to the WebSocket for real-time updates and to register or cancel a heartbeat. Otherwise, you do NOT need an API Key to use the SX Bet API — all standard requests in this document can be made without one. A baseline rate limiter applies to all requests regardless of API key.

Generating API Key

  1. Visit sx.bet and register/login to your account. You can connect your MetaMask wallet, or login using your Fortmatic email address.
  2. If using MetaMask, sign the Signature Request.
  3. Click the Account tab on the top navigation bar.
  4. Click the Overview tab on the account navigation bar.
  5. You will see an API Credentials card. Click GENERATE API KEY NOW. An API Key will be displayed.
  6. The API Key generated will not be displayed again, so please copy and save this key for future use.
If you lose your key, you can generate a new one by following the same steps. Any previous keys used will be unauthorized if you generate a new key.

Usage

curl --location --request GET 'https://api.sx.bet/user/token' \
--header 'X-Api-Key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
Pass your API Key in the X-Api-Key header. The above fetches a realtime token used to authenticate WebSocket connections. Once your API Key is generated (see above), you must add it as a HTTP Header with the name: X-Api-Key.