danpaquin / coinbasepro-python

The unofficial Python client for the Coinbase Pro API
MIT License
1.82k stars 731 forks source link

Trailing Stop - Dynamically updating existing positions #467

Closed KitHaywood closed 2 years ago

KitHaywood commented 2 years ago

Hi There,

Is it possible to create a position -

auth_client.buy(price='100.00', #USD
               size='0.01', #BTC
               order_type='limit',
               product_id='BTC-USD')

And then somehow update that position with a trailing stop at user-defined intervals?

Mat-C-uk commented 2 years ago

I would track it in python and when the actual sell or buy needs to execute, call the sub with the buy or sell in.

Mat

Matthew Carpenter 07715370228

From: KitHaywood @.> Date: Monday, 16 May 2022 at 19:14 To: danpaquin/coinbasepro-python @.> Cc: Subscribed @.***> Subject: [danpaquin/coinbasepro-python] Trailing Stop - Dynamically updating existing positions (Issue #467)

Hi There,

Is it possible to create a position -

auth_client.buy(price='100.00', #USD

           size='0.01', #BTC

           order_type='limit',

           product_id='BTC-USD')

And then somehow update that position with a trailing stop at user-defined intervals?

— Reply to this email directly, view it on GitHubhttps://github.com/danpaquin/coinbasepro-python/issues/467, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGGID4DGAC34A7RSAFDJYNLVKKF6VANCNFSM5WCKJRWQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

KitHaywood commented 2 years ago

Sweet understood - was a long shot - thank you