pyCryptomusAPI 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {pyCryptomusAPI-0.1.0/pyCryptomusAPI.egg-info → pycryptomusapi-0.1.1}/PKG-INFO +11 -2
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI/api.py +5 -69
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI/version.py +1 -1
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1/pyCryptomusAPI.egg-info}/PKG-INFO +11 -2
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/LICENSE +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/MANIFEST.in +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/README.md +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI/__init__.py +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI/cryto_types.py +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI/tests.py +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI.egg-info/SOURCES.txt +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI.egg-info/dependency_links.txt +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/pyCryptomusAPI.egg-info/top_level.txt +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/setup.cfg +0 -0
- {pyCryptomusAPI-0.1.0 → pycryptomusapi-0.1.1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pyCryptomusAPI
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Python implementation of Cryptomus (https://cryptomus.com) pubilc API
|
|
5
5
|
Home-page: https://github.com/Badiboy/pyCryptomusAPI
|
|
6
6
|
Author: Badiboy
|
|
@@ -12,6 +12,15 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
12
|
Requires: requests
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: classifier
|
|
17
|
+
Dynamic: description
|
|
18
|
+
Dynamic: description-content-type
|
|
19
|
+
Dynamic: home-page
|
|
20
|
+
Dynamic: keywords
|
|
21
|
+
Dynamic: license
|
|
22
|
+
Dynamic: requires
|
|
23
|
+
Dynamic: summary
|
|
15
24
|
|
|
16
25
|
[](https://pypi.python.org/pypi/pyCryptomusAPI)
|
|
17
26
|
[](https://pypi.python.org/pypi/pyCryptomusAPI)
|
|
@@ -24,7 +24,8 @@ class pyCryptomusAPI:
|
|
|
24
24
|
|
|
25
25
|
def __init__(self,
|
|
26
26
|
merchant_uuid, payment_api_key = None, payout_api_key = None,
|
|
27
|
-
print_errors = False, timeout = None, add_request_params = None
|
|
27
|
+
print_errors = False, timeout = None, add_request_params = None,
|
|
28
|
+
api_url = API_URL):
|
|
28
29
|
"""
|
|
29
30
|
Create the pyCryptomusAPI instance.
|
|
30
31
|
|
|
@@ -34,6 +35,7 @@ class pyCryptomusAPI:
|
|
|
34
35
|
:param print_errors: (Optional) Print dumps on request errors
|
|
35
36
|
:param timeout: (Optional) Request timeout
|
|
36
37
|
:param add_request_params: (List, Optional) Additional request parameters to pass with API calls
|
|
38
|
+
:param api_url: (Optional) Use custom API endpoint URL
|
|
37
39
|
"""
|
|
38
40
|
self.merchant_uuid = merchant_uuid
|
|
39
41
|
self.payment_api_key = payment_api_key
|
|
@@ -41,6 +43,7 @@ class pyCryptomusAPI:
|
|
|
41
43
|
self.print_errors = print_errors
|
|
42
44
|
self.timeout = timeout
|
|
43
45
|
self.add_request_params = add_request_params
|
|
46
|
+
self.api_url = api_url
|
|
44
47
|
if (not self.payment_api_key) and (not self.payout_api_key):
|
|
45
48
|
raise Exception("You must specify at least one API key.")
|
|
46
49
|
|
|
@@ -82,7 +85,7 @@ class pyCryptomusAPI:
|
|
|
82
85
|
"sign": sign,
|
|
83
86
|
"Content-Type": "application/json",
|
|
84
87
|
}
|
|
85
|
-
base_resp = requests.post(
|
|
88
|
+
base_resp = requests.post(self.api_url + method_url, data=pre_sign, headers=headers, timeout=self.timeout)
|
|
86
89
|
resp = base_resp.json()
|
|
87
90
|
except ValueError as ve:
|
|
88
91
|
code = base_resp.status_code if base_resp else -2
|
|
@@ -440,73 +443,6 @@ class pyCryptomusAPI:
|
|
|
440
443
|
resp = self.__request(method, 1).get("result")
|
|
441
444
|
return [Service.de_json(i) for i in resp]
|
|
442
445
|
|
|
443
|
-
"""
|
|
444
|
-
Request
|
|
445
|
-
Query parameters
|
|
446
|
-
NAME PARAMETER TYPE DEFAULT VALUE DEFINITION
|
|
447
|
-
amount* string Payout amount
|
|
448
|
-
currency* string
|
|
449
|
-
Currency code for the payout
|
|
450
|
-
If Currency if fiat, the to_currency parameter is required.
|
|
451
|
-
order_id*
|
|
452
|
-
string
|
|
453
|
-
min:1
|
|
454
|
-
max:100
|
|
455
|
-
alpha_dash
|
|
456
|
-
Order ID in your system
|
|
457
|
-
The parameter should be a string consisting of alphabetic characters, numbers, underscores, and dashes. It should not contain any spaces or special characters.
|
|
458
|
-
The order_id must be unique within the merchant payouts
|
|
459
|
-
When we find an existing payout with order_id, we return its details, a new payout will not be created.
|
|
460
|
-
address* string The address of the wallet to which the withdrawal will be made
|
|
461
|
-
is_subtract* boolean
|
|
462
|
-
Defines where the withdrawal fee will be deducted
|
|
463
|
-
true - from your balance
|
|
464
|
-
false - from payout amount, the payout amount will be decreased
|
|
465
|
-
network* string
|
|
466
|
-
Blockchain network code
|
|
467
|
-
Not required when the currency/to_currency is a cryptocurrency and has only one network, for example BTC
|
|
468
|
-
url_callback URL to which webhooks with payout status will be sent
|
|
469
|
-
to_currency Cryptocurrency code in which the payout will be made. It is used when the currency parameter is fiat. See examples below
|
|
470
|
-
course_source string
|
|
471
|
-
Available values
|
|
472
|
-
-
|
|
473
|
-
Binance
|
|
474
|
-
-
|
|
475
|
-
BinanceP2p
|
|
476
|
-
-
|
|
477
|
-
Exmo
|
|
478
|
-
-
|
|
479
|
-
Kucoin
|
|
480
|
-
-
|
|
481
|
-
Garantexio
|
|
482
|
-
Value from merchant's settings
|
|
483
|
-
The service from which the exchange rates are taken for conversion in the invoice.
|
|
484
|
-
The parameter is applied only if the currency is fiat, otherwise the default value is taken from the merchant's settings.
|
|
485
|
-
from_currency string null Allows to automatically convert the withdrawal amount and use the from_currency balance. Only USDT is available.
|
|
486
|
-
priority
|
|
487
|
-
string
|
|
488
|
-
min: 4
|
|
489
|
-
max: 11
|
|
490
|
-
Available values
|
|
491
|
-
-
|
|
492
|
-
recommended
|
|
493
|
-
-
|
|
494
|
-
economy
|
|
495
|
-
-
|
|
496
|
-
high
|
|
497
|
-
-
|
|
498
|
-
highest
|
|
499
|
-
recommended
|
|
500
|
-
The parameter for selecting the withdrawal priority. The cost of the withdrawal fee depends on the selected parameter.
|
|
501
|
-
This parameter is applied only in case of using the BTC, ETH, POLYGON, and BSC networks.
|
|
502
|
-
memo
|
|
503
|
-
string
|
|
504
|
-
min: 1
|
|
505
|
-
max: 30
|
|
506
|
-
Additional identifier for TON, used to specify a particular recipient or target
|
|
507
|
-
* - mandatory parameter
|
|
508
|
-
"""
|
|
509
|
-
|
|
510
446
|
def create_payout(self,
|
|
511
447
|
amount, currency, order_id, address, is_subtract, network,
|
|
512
448
|
url_callback = None, to_currency = None, course_source = None,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pyCryptomusAPI
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Python implementation of Cryptomus (https://cryptomus.com) pubilc API
|
|
5
5
|
Home-page: https://github.com/Badiboy/pyCryptomusAPI
|
|
6
6
|
Author: Badiboy
|
|
@@ -12,6 +12,15 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
12
|
Requires: requests
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: classifier
|
|
17
|
+
Dynamic: description
|
|
18
|
+
Dynamic: description-content-type
|
|
19
|
+
Dynamic: home-page
|
|
20
|
+
Dynamic: keywords
|
|
21
|
+
Dynamic: license
|
|
22
|
+
Dynamic: requires
|
|
23
|
+
Dynamic: summary
|
|
15
24
|
|
|
16
25
|
[](https://pypi.python.org/pypi/pyCryptomusAPI)
|
|
17
26
|
[](https://pypi.python.org/pypi/pyCryptomusAPI)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|