Skip to content

Fix client.request mutable defaults causing invalid signatures - #16

Open
khangah wants to merge 1 commit into
Tabdeal-Exchange:masterfrom
khangah:fix/request-mutable-defaults
Open

Fix client.request mutable defaults causing invalid signatures#16
khangah wants to merge 1 commit into
Tabdeal-Exchange:masterfrom
khangah:fix/request-mutable-defaults

Conversation

@khangah

@khangah khangah commented Aug 8, 2026

Copy link
Copy Markdown

client.request is using mutable defaults for data and headers that affect the next request. If data is not replaced when the next client.request is called, it uses the previous request data, resulting in an invalid signature.

This code reproduces the issue:

client = Spot(api_key, api_secret)
print(client.account())
try:
    print(client.account()) # This function call will always fail with Invalid Signature
except Exception as e:
    print(e)

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.

1 participant