Giter Site home page Giter Site logo

Comments (4)

greenfield-br avatar greenfield-br commented on September 2, 2024 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.

naman-doshi avatar naman-doshi commented on September 2, 2024 2

I have the same issue. Any thoughts on how to fix it?

from dydx-v3-python.

saleh-mir avatar saleh-mir commented on September 2, 2024

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.

saleh-mir avatar saleh-mir commented on September 2, 2024

@greenfield-br god bless you! That was it

from dydx-v3-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.