Originally posted by **YVINEE** October 15, 2024
Hi,
To be compatible with the bitget API v2, there is a little change to do.
Indeed, we have already the possibility to set the websocket url to 'wss://ws.bitget.com/v2/ws/private' in this way:
```
websocket_client = BitgetWsClient(ws_url='wss://ws.bitget.com/v2/ws/private',
api_key=json_config['apiKey'],
api_secret=json_config['secret'],
passphrase=json_config['password'],
verbose=True) \
.error_listener(handel_error) \
.build()
channels = [SubscribeReq('SPOT', 'orders', coin + 'USDT')]
```
The only problem is when we subscribe SPOT is transformed in spot (lowercase) which generate the error 30016 Param error.
Could you change the line :
`chanel.inst_type = str(chanel.inst_type).lower()`
by
`chanel.inst_type = str(chanel.inst_type)`
in the file stream.py in order to solve this problem.
Thanks,
Yann
Discussed in https://github.com/cuongitl/python-bitget/discussions/28