-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid signature when creating orders in negative risk market #79
Comments
I had the same question, how can I resolve this question? |
@zlandme I actually figured this out, the official example doesn't include this, but in recent versions you need to actually pass a parameter to the function if it's negative risk market or not. Here is an example: ord = client.create_order(OrderArgs(
price=args.price,
size=args.size,
side=args.side,
token_id=args.token_id,
expiration=args.expiration
), PartialCreateOrderOptions(
neg_risk=args.neg_risk
))
resp = client.post_order(ord, order_type) |
@dmitry-dzyuba-uinno YEAH, you are right, It solved the problem of wrong signature, but I got a new problem, when I create_and_post order, it give me error "PolyApiException[status_code=400, error_message={'error': 'not enough balance / allowance'}]", I have done the approve, and there are funds in my account, and I can get the fund with my address in the collateral contract address. how can I resolve this question? |
I'm having the same problem: |
Have you tried setting the token allowances as described in the read me? This script fixed it for me. I had to make some changes to get it to run though. |
Got this working with help from Isulls50 on Discord. |
Who solve the problem with - "py_clob_client.exceptions.PolyApiException: PolyApiException[status_code=400, error_message={'error': 'not enough balance / allowance'}]"? I try to sell my positions but gett error |
same as ben0x01 |
Bro, sometimes the library is stupid :D But maybe u don't have approve. Check it and if u will have problem, give any time and restart! |
hi i have the same probleme but how do you import the "PartialCreateOrderOptions" Thanks a lot |
You will likely get a quicker response on Discord https://discord.com/channels/710897173927297116/782024576275447848 |
I used this PartialCreateOrderOptions but i am still getting the same invalid signature error. I am trying on Amoy(Polygon Testnet). I am using following Code: chain_id=80002 order_args = OrderArgs( GTC Orderresp = client.post_order(signed_order, OrderType.GTC) |
@gaurav-gupta ,Yes I also met this problem after adding the PartialCreateOrderOptions |
Overview
When trying to create an order in negative risk market, it gives me an error "invalid signature", creating orders for non-negative risk markets works fine.
Code sample
Response
I was initially using version v0.11.0, but it's same on v0.16.0
The text was updated successfully, but these errors were encountered: