Comments (4)
hi there. i had it and solved it. the problem is that when you sell, size should be positive, not negative,
the ORDER_BUY_SIDE, ORDER_SELL_SIDE makes up for the signal in size.
that is confusing at first, because when you get the account/openpositions/market data, selling side come as negative.
so, don rely on negative sizes for expressing selling, only for interpreting them.
best regards to all the community.
from dydx-v3-python.
I have the same issue. Any thoughts on how to fix it?
from dydx-v3-python.
I have the same problem but not always. I'm not sure what is causing it. Here's my error's traceback:
562, in submit_order
res = self.client.private.create_order(
File "/opt/homebrew/lib/python3.9/site-packages/dydx3/modules/private.py", line 571, in create_order
order_signature = order_to_sign.sign(self.stark_private_key)
File "/opt/homebrew/lib/python3.9/site-packages/dydx3/starkex/signable.py", line 32, in sign
r, s = sign(self.hash, int(private_key_hex, 16))
File "/opt/homebrew/lib/python3.9/site-packages/dydx3/starkex/signable.py", line 27, in hash
self._hash = self._calculate_hash()
File "/opt/homebrew/lib/python3.9/site-packages/dydx3/starkex/order.py", line 168, in _calculate_hash
get_hash(
File "/opt/homebrew/lib/python3.9/site-packages/dydx3/starkex/starkex_resources/proxy.py", line 39, in get_hash
return py_pedersen_hash(*elements)
File "/opt/homebrew/lib/python3.9/site-packages/dydx3/starkex/starkex_resources/python_signature.py", line 251, in py_pedersen_hash
return pedersen_hash_as_point(*elements)[0]
File "/opt/homebrew/lib/python3.9/site-packages/dydx3/starkex/starkex_resources/python_signature.py", line 261, in pedersen_hash_as_point
assert 0 <= x < FIELD_PRIME
AssertionError
[UPDATE]: It works fine with buy/entry orders, but I get the error with sell/closing orders.
from dydx-v3-python.
@greenfield-br god bless you! That was it
from dydx-v3-python.
Related Issues (20)
- get_orders DOES NOT WORK FOR FILLED! HOT 1
- order submission gets an error: Invalid signature for order. HOT 5
- OHLC on DYDX does not match "current price".
- "STOP_MARKET" order ?.
- ImportError: cannot import name 'getargspec' from 'inspect' HOT 3
- {"msg":"Unauthorized"} + limitFee scale of 6 HOT 1
- HTTP 401 on https://api.stage.dydx.exchange/v3/fills?xxxx=yyyy
- Cancel order failing with authorization issues
- Error using the example order.py HOT 1
- Onboarding on Sepolia failes HOT 6
- WebSocket : OrderBook : Data sent is pre-maching-engine data, yielding "invalid" order books
- Python-only onboarding fails at source_client.eth.transfer_token with ERC20: transfer amount exceeds balance
- On opening some trades: 'NoneType' object is not subscriptable HOT 1
- Error: Incorrect padding
- There is not enough liquidity to fill this market order, please try a smaller order amount.
- JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- DydxApiError: DydxApiError(status_code=400, response={'errors': [{'msg': 'Order expiration cannot be less than 1 minute(s) in the future'}]})
- '[Errno 111] Connection refused' when trying to 'get_markets()'
- Can't Close Positions when Margin Utilization Gets Too High
- Request to add a limit on how often the websocket interface can fetch public data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dydx-v3-python.