File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed
Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -79,23 +79,25 @@ print(balance)
7979#### Get Transaction History
8080
8181``` python
82- transactions = manager.get_transaction_history()
82+ page = 1
83+ limit = 10
84+ transactions = manager.get_transaction_history(page, limit)
8385print (transactions)
8486
8587```
8688
8789#### Withdraw from chains
8890
8991``` python
90- swap_params = {
92+ withdraw_params = {
9193 " amount" : 100 ,
9294 " address" : " 0x1234..." ,
9395 " network" : Network.BSC ,
9496 " shouldSaveAddress" : True
9597}
9698
97- swap_result = manager.withdraw(swap_params )
98- print (swap_result )
99+ withdraw_result = manager.withdraw(withdraw_params )
100+ print (withdraw_result )
99101
100102```
101103
@@ -120,14 +122,30 @@ NOTE: to get bank codes please use the getBanks method to fetch the list of bank
120122
121123``` python
122124mint_params = {
123- " provider" : ProviderType.KORAPAY
125+ " provider" : ProviderType.KORAPAY ,
126+ " bank_code" : ' 011'
124127}
125128
126129virtual_account = manager.create_virtual_account(mint_params)
127130print (virtual_account)
128131
129132```
133+ NOTE: before creating the virtual account you need to have updated your BVN on the dashboard
134+
135+ #### Swap Asset
130136
137+ ``` python
138+ swap_data = {
139+ " destinationNetwork" : Network.BSC ,
140+ " destinationAddress" : ' 0x123...' ,
141+ " originNetwork" : Network.ETH ,
142+ " callbackUrl" : ' https://your-callback-url.com' // optional
143+ }
144+
145+ swap_result = manager.swap_asset(swap_data)
146+ print (swap_result)
147+
148+ ```
131149NOTE: before creating the virtual account you need to have updated your BVN on the dashboard
132150
133151
Original file line number Diff line number Diff line change 1010__title__ = "cngn_manager"
1111__description__ = "Python HTTP for Humans."
1212__url__ = "https://docs.cngn.co"
13- __version__ = "1.0.1 "
13+ __version__ = "1.0.2 "
1414__author__ = "Emmanuel Onyo"
1515__author_email__ = "[email protected] " 1616__license__ = "MIT License"
You can’t perform that action at this time.
0 commit comments