Skip to content

Commit

Permalink
fix(python): fix sdk_version str
Browse files Browse the repository at this point in the history
  • Loading branch information
ISAAC-XXYYZZ committed Dec 10, 2024
1 parent 7cdd835 commit 732d2c8
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def example():
)

# Retrieve API secret information from environment variables
key = os.getenv("API_KEY")
secret = os.getenv("API_SECRET")
passphrase = os.getenv("API_PASSPHRASE")
key = os.getenv("API_KEY", "")
secret = os.getenv("API_SECRET", "")
passphrase = os.getenv("API_PASSPHRASE", "")

# Set specific options, others will fall back to default values
http_transport_option = (
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def example():
)

# Retrieve API secret information from environment variables
key = os.getenv("API_KEY")
secret = os.getenv("API_SECRET")
passphrase = os.getenv("API_PASSPHRASE")
key = os.getenv("API_KEY", "")
secret = os.getenv("API_SECRET", "")
passphrase = os.getenv("API_PASSPHRASE", "")

# Set specific options, others will fall back to default values
http_transport_option = (
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/example/example_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def rest_example():
)

# Retrieve API secret information from environment variables
key = os.getenv("API_KEY")
secret = os.getenv("API_SECRET")
passphrase = os.getenv("API_PASSPHRASE")
key = os.getenv("API_KEY", "")
secret = os.getenv("API_SECRET", "")
passphrase = os.getenv("API_PASSPHRASE", "")

# Optional: Retrieve broker secret information from environment variables; applicable for broker API only
broker_name = os.getenv("BROKER_NAME")
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/example/example_get_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def example():
)

# Retrieve API secret information from environment variables
key = os.getenv("API_KEY")
secret = os.getenv("API_SECRET")
passphrase = os.getenv("API_PASSPHRASE")
key = os.getenv("API_KEY", "")
secret = os.getenv("API_SECRET", "")
passphrase = os.getenv("API_PASSPHRASE", "")

# Set specific options, others will fall back to default values
http_transport_option = (
Expand Down
6 changes: 3 additions & 3 deletions sdk/python/example/example_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def ws_example():
)

# Retrieve API secret information from environment variables
key = os.getenv("API_KEY")
secret = os.getenv("API_SECRET")
passphrase = os.getenv("API_PASSPHRASE")
key = os.getenv("API_KEY", "")
secret = os.getenv("API_SECRET", "")
passphrase = os.getenv("API_PASSPHRASE", "")

# Set specific options, others will fall back to default values
ws_client_option = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from ..util.sub import SubInfo

class DefaultWsService(WebSocketService):
def __init__(self, client_option: ClientOption, domain: DomainType, private: bool):
self.token_transport = DefaultTransport(client_option)
def __init__(self, client_option: ClientOption, domain: DomainType, private: bool, sdk_version:str):
self.token_transport = DefaultTransport(client_option, sdk_version)
ws_option = client_option.websocket_client_option

self.client = WebSocketClient(DefaultWsTokenProvider(self.token_transport, domain, private), ws_option)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from kucoin_universal_sdk.model.common import RestResponse
from kucoin_universal_sdk.model.constants import DomainType
from .default_transport import DefaultTransport
from ..interfaces.websocket import WsToken
from ..interfaces.websocket import WsToken, WsTokenProvider

PATH_PRIVATE = "/api/v1/bullet-private"
PATH_PUBLIC = "/api/v1/bullet-public"


class DefaultWsTokenProvider:
class DefaultWsTokenProvider(WsTokenProvider):
def __init__(self, transport: DefaultTransport, domain: DomainType, private: bool):
self.transport = transport
self.domain = domain
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="kucoin-universal-sdk",
version="0.1.0a1",
version="0.1.0a2",
description="Official KuCoin Universal SDK",
author="KuCoin",
author_email="api@kucoin.com",
Expand Down

0 comments on commit 732d2c8

Please sign in to comment.