dydx-python icon indicating copy to clipboard operation
dydx-python copied to clipboard

Place_Order Issue

Open ghost opened this issue 5 years ago • 1 comments

Python Installation: 3.6.0

Error message when attempting to submit an order.

`

created_order = client.place_order( ... market=consts.PAIR_PBTC_USDC, ... side=consts.SIDE_BUY, ... amount=utils.btc_to_sats(.1), ... price=Decimal('72.34'), ... fillOrKill=False, ... postOnly=False) Traceback (most recent call last): File "", line 7, in File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\dydx\client.py", line 658, in place_order 'order': order_api_request File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\dydx\client.py", line 57, in _post return self._request('post', *args, **kwargs) File "C:\Users\admin\AppData\Local\Programs\Python\Python36\lib\site-packages\dydx\client.py", line 50, in _request raise DydxAPIError(response) dydx.exceptions.DydxAPIError: DydxAPIError(status_code=400)(response={'errors': [{'param': '_error', 'msg': 'Invalid value(s)', 'nestedErrors': [{'location': 'body', 'param': 'order.baseMarket', 'msg': 'Invalid value'}, {'location': 'body', 'param': 'order.quoteMarket', 'msg': 'Invalid value'}, {'location': 'body', 'param': 'order.amount', 'value': '10000000.0', 'msg': 'Invalid value'}, {'location': 'body', 'param': 'order.makerAccountNumber', 'msg': 'Invalid value'}, {'location': 'body', 'param': 'order.makerAccountOwner', 'msg': 'Invalid value'}, {'location': 'body', 'param': 'order.makerAccountOwner', 'msg': 'Invalid value'}, {'location': 'body', 'param': 'order.amount', 'value': '10000000.0', 'msg': 'Invalid value'}]}]})

`

ghost avatar May 26 '20 22:05 ghost

Have you fixed it?

alexberdreal avatar Oct 07 '21 20:10 alexberdreal