rango-basic-sdk 0.0.2__py3-none-any.whl → 0.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rango_basic_sdk/__init__.py +1 -1
- rango_basic_sdk/client.py +13 -11
- rango_basic_sdk/models.py +817 -897
- {rango_basic_sdk-0.0.2.dist-info → rango_basic_sdk-0.0.4.dist-info}/METADATA +27 -5
- rango_basic_sdk-0.0.4.dist-info/RECORD +8 -0
- rango_basic_sdk-0.0.2.dist-info/RECORD +0 -8
- {rango_basic_sdk-0.0.2.dist-info → rango_basic_sdk-0.0.4.dist-info}/WHEEL +0 -0
- {rango_basic_sdk-0.0.2.dist-info → rango_basic_sdk-0.0.4.dist-info}/licenses/LICENSE +0 -0
rango_basic_sdk/__init__.py
CHANGED
rango_basic_sdk/client.py
CHANGED
|
@@ -12,7 +12,7 @@ import logging
|
|
|
12
12
|
from . import models
|
|
13
13
|
|
|
14
14
|
# First ``servers`` URL from the OpenAPI document (``None`` if the spec defines none).
|
|
15
|
-
DEFAULT_SERVER_URL: Optional[str] = "https://api.rango.exchange"
|
|
15
|
+
DEFAULT_SERVER_URL: Optional[str] = "https://public-api.rango.exchange"
|
|
16
16
|
|
|
17
17
|
_log = logging.getLogger(__name__)
|
|
18
18
|
_MAX_HTTP_DEBUG_BODY = 16_384
|
|
@@ -589,7 +589,7 @@ class RoutingOperations:
|
|
|
589
589
|
|
|
590
590
|
Examples:
|
|
591
591
|
with Client(api_key='c6381a79-2817-4602-83bf-6a641a409e32') as client:
|
|
592
|
-
result = client.routing.quote(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=
|
|
592
|
+
result = client.routing.quote(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=10000000000000000, slippage=3.5)
|
|
593
593
|
print(result)
|
|
594
594
|
"""
|
|
595
595
|
url = f"/basic/quote"
|
|
@@ -713,7 +713,7 @@ class TransactionOperations:
|
|
|
713
713
|
|
|
714
714
|
Examples:
|
|
715
715
|
with Client(api_key='c6381a79-2817-4602-83bf-6a641a409e32') as client:
|
|
716
|
-
result = client.transaction.report_tx(body=models.BasicApiReportTransactionRequest(request_id="688b308e-a06b-4a4e-a837-220d458b8642"
|
|
716
|
+
result = client.transaction.report_tx(body=models.BasicApiReportTransactionRequest(event_type=models.BasicApiReportTransactionRequestEventType.USER_REJECT, request_id="688b308e-a06b-4a4e-a837-220d458b8642"))
|
|
717
717
|
print(result)
|
|
718
718
|
"""
|
|
719
719
|
url = f"/basic/report-tx"
|
|
@@ -872,9 +872,10 @@ class TransactionOperations:
|
|
|
872
872
|
contract_call (Optional[bool]): set this parameter to `true` if you wants to
|
|
873
873
|
send transactions through a contract Wire
|
|
874
874
|
name ``contractCall`` (query).
|
|
875
|
-
referrer_fee (Optional[float]): Referrer fee in percent Wire name
|
|
875
|
+
referrer_fee (Optional[float]): Referrer fee in percent, e.g. 0.3 Wire name
|
|
876
876
|
``referrerFee`` (query).
|
|
877
|
-
referrer_address (Optional[str]): Referrer wallet address
|
|
877
|
+
referrer_address (Optional[str]): Referrer wallet address on source asset
|
|
878
|
+
(from) blockchain Wire name
|
|
878
879
|
``referrerAddress`` (query).
|
|
879
880
|
referrer_code (Optional[str]): Referrer code Wire name ``referrerCode``
|
|
880
881
|
(query).
|
|
@@ -905,7 +906,7 @@ class TransactionOperations:
|
|
|
905
906
|
|
|
906
907
|
Examples:
|
|
907
908
|
with Client(api_key='c6381a79-2817-4602-83bf-6a641a409e32') as client:
|
|
908
|
-
result = client.transaction.swap(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=
|
|
909
|
+
result = client.transaction.swap(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=10000000000000000, slippage=3.5, from_address="0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88", to_address="0x6f33bb1763eebead07cf8815a62fcd7b30311fa3", disable_estimate=False, infinite_approve=False)
|
|
909
910
|
print(result)
|
|
910
911
|
"""
|
|
911
912
|
url = f"/basic/swap"
|
|
@@ -1543,7 +1544,7 @@ class AsyncRoutingOperations:
|
|
|
1543
1544
|
|
|
1544
1545
|
Examples:
|
|
1545
1546
|
async with AsyncClient(api_key='c6381a79-2817-4602-83bf-6a641a409e32') as client:
|
|
1546
|
-
result = await client.routing.quote(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=
|
|
1547
|
+
result = await client.routing.quote(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=10000000000000000, slippage=3.5)
|
|
1547
1548
|
print(result)
|
|
1548
1549
|
"""
|
|
1549
1550
|
url = f"/basic/quote"
|
|
@@ -1667,7 +1668,7 @@ class AsyncTransactionOperations:
|
|
|
1667
1668
|
|
|
1668
1669
|
Examples:
|
|
1669
1670
|
async with AsyncClient(api_key='c6381a79-2817-4602-83bf-6a641a409e32') as client:
|
|
1670
|
-
result = await client.transaction.report_tx(body=models.BasicApiReportTransactionRequest(request_id="688b308e-a06b-4a4e-a837-220d458b8642"
|
|
1671
|
+
result = await client.transaction.report_tx(body=models.BasicApiReportTransactionRequest(event_type=models.BasicApiReportTransactionRequestEventType.USER_REJECT, request_id="688b308e-a06b-4a4e-a837-220d458b8642"))
|
|
1671
1672
|
print(result)
|
|
1672
1673
|
"""
|
|
1673
1674
|
url = f"/basic/report-tx"
|
|
@@ -1826,9 +1827,10 @@ class AsyncTransactionOperations:
|
|
|
1826
1827
|
contract_call (Optional[bool]): set this parameter to `true` if you wants to
|
|
1827
1828
|
send transactions through a contract Wire
|
|
1828
1829
|
name ``contractCall`` (query).
|
|
1829
|
-
referrer_fee (Optional[float]): Referrer fee in percent Wire name
|
|
1830
|
+
referrer_fee (Optional[float]): Referrer fee in percent, e.g. 0.3 Wire name
|
|
1830
1831
|
``referrerFee`` (query).
|
|
1831
|
-
referrer_address (Optional[str]): Referrer wallet address
|
|
1832
|
+
referrer_address (Optional[str]): Referrer wallet address on source asset
|
|
1833
|
+
(from) blockchain Wire name
|
|
1832
1834
|
``referrerAddress`` (query).
|
|
1833
1835
|
referrer_code (Optional[str]): Referrer code Wire name ``referrerCode``
|
|
1834
1836
|
(query).
|
|
@@ -1859,7 +1861,7 @@ class AsyncTransactionOperations:
|
|
|
1859
1861
|
|
|
1860
1862
|
Examples:
|
|
1861
1863
|
async with AsyncClient(api_key='c6381a79-2817-4602-83bf-6a641a409e32') as client:
|
|
1862
|
-
result = await client.transaction.swap(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=
|
|
1864
|
+
result = await client.transaction.swap(from_="BSC.BNB", to="AVAX_CCHAIN.USDT.E--0xc7198437980c041c805a1edcba50c1ce5db95118", amount=10000000000000000, slippage=3.5, from_address="0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88", to_address="0x6f33bb1763eebead07cf8815a62fcd7b30311fa3", disable_estimate=False, infinite_approve=False)
|
|
1863
1865
|
print(result)
|
|
1864
1866
|
"""
|
|
1865
1867
|
url = f"/basic/swap"
|