Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #55 from verata-veritatis/fix_attribute_error_kwargs
Browse files Browse the repository at this point in the history
fix AttributeError when kwargs not passed
  • Loading branch information
dextertd authored Oct 7, 2021
2 parents 893a0f9 + 38f0dc6 commit dd69592
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.1] - 2021-10-07
### Modified
- Fixed methods like `query_symbol()` (which have no API parameters) not working following the spot update

## [1.3.0] - 2021-09-24
### Added
- Implemented the Spot API in `HTTP`
Expand Down
9 changes: 6 additions & 3 deletions pybit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from json.decoder import JSONDecodeError

# Versioning.
VERSION = '1.3.0'
VERSION = '1.3.1'


class HTTP:
Expand Down Expand Up @@ -1695,12 +1695,15 @@ def _submit_request(self, method=None, path=None, query=None, auth=False):
"""

# Store original recv_window.
recv_window = self.recv_window
if query is None:
query = {}

# Remove internal spot arg
query.pop('spot', '')

# Store original recv_window.
recv_window = self.recv_window

# Bug fix: change floating whole numbers to integers to prevent
# auth signature errors.
if query is not None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='pybit',
version='1.3.0',
version='1.3.1',
description='Python3 Bybit HTTP/WebSocket API Connector',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit dd69592

Please sign in to comment.