drift-labs / driftpy

python sdk to interact with drift v2
https://drift-2.gitbook.io/driftpy-for-dummies/
58 stars 39 forks source link

transaction has not been signed correctly #102

Open kirito-cwx opened 7 months ago

kirito-cwx commented 7 months ago

I can place order to a delegated account ,but came across the following error when cancel the order, anyone ever met with this or have ideas about this error? raise AttributeError("transaction has not been signed correctly") AttributeError: transaction has not been signed correctly

await drift_client.cancel_order(order_id=2)

0xbigz commented 7 months ago

you need to pass the authority of the account the delegate is running on to driftClient

if delegate key is Y and delegated account is X authority here should be X

example here: https://github.com/drift-labs/driftpy/blob/d167ce1c252def9c992fc9a5ee76f3a12c4773f2/examples/limit_order_grid.py#L248