Skip to content

Commit

Permalink
Release v1.1.3 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidMkCb authored Feb 13, 2024
1 parent 63610a0 commit f72bf34
Show file tree
Hide file tree
Showing 17 changed files with 154 additions and 133 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [1.1.3] - 2024-FEB-13

### Added
- Full MyPy annotations with return types for function definitions

## [1.1.2] - 2024-FEB-9

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Welcome to the official Coinbase Advanced API Python SDK. This python project was created to allow coders to easily plug into the [Coinbase Advanced API](https://docs.cloud.coinbase.com/advanced-trade-api/docs/welcome).
This SDK also supports easy connection to the [Coinbase Advanced Trade WebSocket API](https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-overview).

For thorough documentation of all available functions, refer to the following link: https://coinbase.github.io/coinbase-advanced-py/
For thorough documentation of all available functions, refer to the following link: https://coinbase.github.io/coinbase-advanced-py

## Installation

Expand Down
2 changes: 1 addition & 1 deletion coinbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.2"
__version__ = "1.1.3"
8 changes: 4 additions & 4 deletions coinbase/jwt_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from coinbase.constants import BASE_URL, REST_SERVICE, WS_SERVICE


def build_jwt(key_var, secret_var, service, uri=None):
def build_jwt(key_var, secret_var, service, uri=None) -> str:
"""
:meta private:
"""
Expand Down Expand Up @@ -44,7 +44,7 @@ def build_jwt(key_var, secret_var, service, uri=None):
return jwt_token


def build_rest_jwt(uri, key_var, secret_var):
def build_rest_jwt(uri, key_var, secret_var) -> str:
"""
**Build REST JWT**
__________
Expand All @@ -64,7 +64,7 @@ def build_rest_jwt(uri, key_var, secret_var):
return build_jwt(key_var, secret_var, REST_SERVICE, uri=uri)


def build_ws_jwt(key_var, secret_var):
def build_ws_jwt(key_var, secret_var) -> str:
"""
**Build WebSocket JWT**
__________
Expand All @@ -83,7 +83,7 @@ def build_ws_jwt(key_var, secret_var):
return build_jwt(key_var, secret_var, WS_SERVICE)


def format_jwt_uri(method, path):
def format_jwt_uri(method, path) -> str:
"""
**Format JWT URI**
__________
Expand Down
6 changes: 3 additions & 3 deletions coinbase/rest/accounts.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from typing import Optional
from typing import Any, Dict, Optional

from coinbase.constants import API_PREFIX


def get_accounts(
self, limit: Optional[int] = None, cursor: Optional[str] = None, **kwargs
):
) -> Dict[str, Any]:
"""
**List Accounts**
_________________
Expand All @@ -28,7 +28,7 @@ def get_accounts(
return self.get(endpoint, params=params, **kwargs)


def get_account(self, account_uuid: str, **kwargs):
def get_account(self, account_uuid: str, **kwargs) -> Dict[str, Any]:
"""
**Get Account**
Expand Down
4 changes: 3 additions & 1 deletion coinbase/rest/common.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from typing import Any, Dict

from coinbase.constants import API_PREFIX


def get_unix_time(self, **kwargs):
def get_unix_time(self, **kwargs) -> Dict[str, Any]:
"""
**Get UNIX Time**
_________________
Expand Down
8 changes: 4 additions & 4 deletions coinbase/rest/convert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional
from typing import Any, Dict, Optional

from coinbase.constants import API_PREFIX

Expand All @@ -11,7 +11,7 @@ def create_convert_quote(
user_incentive_id: Optional[str] = None,
code_val: Optional[str] = None,
**kwargs,
):
) -> Dict[str, Any]:
"""
**Create Convert Quote**
________________________
Expand Down Expand Up @@ -54,7 +54,7 @@ def create_convert_quote(

def get_convert_trade(
self, trade_id: str, from_account: str, to_account: str, **kwargs
):
) -> Dict[str, Any]:
"""
**Get Convert Trade**
_____________________
Expand Down Expand Up @@ -83,7 +83,7 @@ def get_convert_trade(

def commit_convert_trade(
self, trade_id: str, from_account: str, to_account: str, **kwargs
):
) -> Dict[str, Any]:
"""
**Commit Convert Trade**
________________________
Expand Down
4 changes: 2 additions & 2 deletions coinbase/rest/fees.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional
from typing import Any, Dict, Optional

from coinbase.constants import API_PREFIX

Expand All @@ -8,7 +8,7 @@ def get_transaction_summary(
product_type: Optional[str] = None,
contract_expiry_type: Optional[str] = None,
**kwargs,
):
) -> Dict[str, Any]:
"""
**Get Transactions Summary**
_____________________________
Expand Down
14 changes: 8 additions & 6 deletions coinbase/rest/futures.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from typing import Any, Dict

from coinbase.constants import API_PREFIX


def get_futures_balance_summary(self, **kwargs):
def get_futures_balance_summary(self, **kwargs) -> Dict[str, Any]:
"""
**Get Futures Balance Summary**
_______________________________
Expand All @@ -24,7 +26,7 @@ def get_futures_balance_summary(self, **kwargs):
return self.get(endpoint, **kwargs)


def list_futures_positions(self, **kwargs):
def list_futures_positions(self, **kwargs) -> Dict[str, Any]:
"""
**List Futures Positions**
__________________________
Expand All @@ -47,7 +49,7 @@ def list_futures_positions(self, **kwargs):
return self.get(endpoint, **kwargs)


def get_futures_position(self, product_id: str, **kwargs):
def get_futures_position(self, product_id: str, **kwargs) -> Dict[str, Any]:
"""
**Get Futures Position**
_________________________
Expand All @@ -70,7 +72,7 @@ def get_futures_position(self, product_id: str, **kwargs):
return self.get(endpoint, **kwargs)


def schedule_futures_sweep(self, usd_amount: str, **kwargs):
def schedule_futures_sweep(self, usd_amount: str, **kwargs) -> Dict[str, Any]:
"""
**Schedule Futures Sweep**
__________________________
Expand All @@ -95,7 +97,7 @@ def schedule_futures_sweep(self, usd_amount: str, **kwargs):
return self.post(endpoint, data=data, **kwargs)


def list_futures_sweeps(self, **kwargs):
def list_futures_sweeps(self, **kwargs) -> Dict[str, Any]:
"""
**List Futures Sweeps**
_______________________
Expand All @@ -118,7 +120,7 @@ def list_futures_sweeps(self, **kwargs):
return self.get(endpoint, **kwargs)


def cancel_pending_futures_sweep(self, **kwargs):
def cancel_pending_futures_sweep(self, **kwargs) -> Dict[str, Any]:
"""
**Cancel Pending Futures Sweep**
________________________________
Expand Down
6 changes: 3 additions & 3 deletions coinbase/rest/market_data.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from typing import Optional
from typing import Any, Dict, Optional

from coinbase.constants import API_PREFIX


def get_candles(
self, product_id: str, start: str, end: str, granularity: str, **kwargs
):
) -> Dict[str, Any]:
"""
**Get Product Candles**
__________
Expand Down Expand Up @@ -41,7 +41,7 @@ def get_market_trades(
start: Optional[str] = None,
end: Optional[str] = None,
**kwargs,
):
) -> Dict[str, Any]:
"""
**Get Market Trades**
_____________________
Expand Down
Loading

0 comments on commit f72bf34

Please sign in to comment.