Skip to content

Conversation

@zeroaddresss
Copy link
Contributor

Problem

The TESTNET_CONFIG uses an incorrect WebSocket URL for private streams:

  • Current: wss://starknet.sepolia.extended.exchange/stream.extended.exchange/v1
  • Should be: wss://api.starknet.sepolia.extended.exchange/stream.extended.exchange/v1 (source: Extended API docs)

This causes HTTP 401 Unauthorized errors when connecting to private WebSocket streams (e.g., account updates) on testnet.

Solution

Add the api. prefix to the testnet WebSocket URL to match the Extended API documentation

Testing

Tested on Starknet Sepolia testnet:

Before fix:

stream_client.subscribe_to_account_updates(api_key)
# Result: HTTP 401 Unauthorized

After fix:
stream_client.subscribe_to_account_updates(api_key)
# Result: Connection successful, receiving events

@alexex10
Copy link
Contributor

alexex10 commented Nov 1, 2025

hey @zeroaddresss , appreciate the fix! 🤦 pls fix the formatting and we are good to merge.

@zeroaddresss
Copy link
Contributor Author

hey @zeroaddresss , appreciate the fix! 🤦 pls fix the formatting and we are good to merge.

done, it was just the LSP autoformatting on-save.
fixed it now :)

@alexex10 alexex10 merged commit 17f4959 into x10xchange:starknet Nov 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants