Skip to content

Commit 2b0a376

Browse files
committed
updated endpoints and baseurl
1 parent 7570fc5 commit 2b0a376

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

cngn_manager/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
__title__ = "cngn_manager"
1111
__description__ = "Python HTTP for Humans."
1212
__url__ = "https://docs.cngn.co"
13-
__version__ = "1.0.0"
13+
__version__ = "1.0.1"
1414
__author__ = "Emmanuel Onyo"
1515
__author_email__ = "[email protected]"
1616
__license__ = "MIT License"

cngn_manager/main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"""
2525

2626
class CNGnManager:
27-
API_URL = "https://staging.api.wrapcbdc.com"
27+
API_URL = "https://api.cngn.co"
2828
API_CURRENT_VERSION = "v1"
2929

3030
def __init__(self, api_key: str, private_key: str, encryption_key: str):
@@ -91,8 +91,8 @@ def _handle_unexpected_error(self, error: Exception) -> Dict[str, Any]:
9191
def get_balance(self) -> str:
9292
return self.__make_calls("GET", "/balance")
9393

94-
def get_transaction_history(self) -> str:
95-
return self.__make_calls("GET", "/transactions")
94+
def get_transaction_history(self, page: int = 1, limit: int = 10 ) -> str:
95+
return self.__make_calls("GET", f"/transactions?page{page}&limit={limit}")
9696

9797
def withdraw(self, data: dict) -> str:
9898
return self.__make_calls("POST", "/withdraw", data)
@@ -109,3 +109,6 @@ def update_external_accounts(self, data: dict) -> str:
109109
def get_banks(self):
110110
return self.__make_calls("GET", "/banks")
111111

112+
def swap_asset(self, data: dict) -> str:
113+
return self.__make_calls("POST", "/swap", data)
114+

0 commit comments

Comments
 (0)