Skip to content

Commit 639e5d7

Browse files
authored
order query params for rest calls, updates documentation link of readme
2 parents cf6da92 + 0fbc69a commit 639e5d7

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pip install cryptomarket
1111
```
1212
# Documentation
1313

14-
[The api documentation](https://api.exchange.cryptomkt.com/)
14+
This sdk makes use of the [api version 2](https://api.exchange.cryptomkt.com/v2) of cryptomarket
1515

1616

1717
# Quick Start

cryptomarket/args.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ def __init__(self):
6161
self.the_dict = dict()
6262

6363
def build(self):
64-
return self.the_dict.copy()
64+
orderedDict = dict()
65+
for parameter in sorted(self.the_dict):
66+
orderedDict[parameter] = self.the_dict[parameter]
67+
return orderedDict
6568

6669
def addList(self, key, val:List[str]):
6770
if val is not None:

cryptomarket/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ def get_estimate_withdraw_fee(self, currency: str, amount: str) -> str:
12341234
.. code-block:: python
12351235
"0.0008"
12361236
"""
1237-
params = args.DictBuilder().currency(currency).amount(amount).build()
1237+
params = args.DictBuilder().amount(amount).currency(currency).build()
12381238
return self._get(endpoint='account/crypto/estimate-withdraw', params=params)['fee']
12391239

12401240

cryptomarket/hmac.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def __call__(self, r):
2020
msg += "?" + url.query
2121
if r.body:
2222
msg += r.body
23-
2423
signature = hmac.new(self.password.encode(), msg.encode(), hashlib.sha256).hexdigest()
2524
authstr = "HS256 " + b64encode(
2625
b':'.join((self.username.encode(), timestamp.encode(), signature.encode()))).decode().strip()

tests/rest/test_trading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_successfull_call(self): # create order should work properly
100100
symbol='EOSETH',
101101
side=args.SIDE.SELL,
102102
quantity='0.01',
103-
order_type=args.ORDER_TYPE.LIMIT,
103+
# order_type=args.ORDER_TYPE.LIMIT,
104104
client_order_id=client_order_id,
105105
price='1000')
106106
if not good_order(order): self.fail("not good order")

0 commit comments

Comments
 (0)