danpaquin / coinbasepro-python

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

time_in_force='FOK' not working #377

Closed powertradercrypto closed 5 years ago

powertradercrypto commented 5 years ago

auth_client.place_limit_order(product_id=coins[coinselector], side='buy', price=buy_price, size=buy_size,time_in_force='FOK')

will not place an order but

auth_client.place_limit_order(product_id=coins[coinselector], side='buy', price=buy_price, size=buy_size)

will place an order

noah222 commented 5 years ago

It will only place the order if the order price matches the current price specified, else it is KILLED. so It will fill at the price you are sending only if there is enough volume to fill the order. And it will be immediately filled as a taker order. And killed means it is not posted. So it will only post if it can be filled by orders on the orderbook at that millisecond.

powertradercrypto commented 5 years ago

Ok thanks, I misunderstood how FOK worked

noah222 commented 5 years ago

It's basically a way to buy a certain amount but not buy any if you can't get the whole amount you want to buy.

powertradercrypto commented 5 years ago

Yeah i thought it meant the order would just stay open unless fully filled... would be way better

noah222 commented 5 years ago

that's Good til cancelled

On Sun, Aug 25, 2019 at 5:17 PM powertradercrypto notifications@github.com wrote:

Yeah i thought it meant the order would just stay open unless fully filled... would be way better

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danpaquin/coinbasepro-python/issues/377?email_source=notifications&email_token=AJ6RVIKEHZUUAD5N3445IS3QGLZFRA5CNFSM4IPGWSZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5C34OQ#issuecomment-524664378, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ6RVIPMA5HENS36VLRRUI3QGLZFRANCNFSM4IPGWSZA .

powertradercrypto commented 5 years ago

Yeah but that allows for partial fills

noah222 commented 5 years ago

I see partial fills as a good thing. it requires a bit more technical set-up to track what happened, but the flexibility is worth it. You could try FOC without a price, I'm not sure what happens in that case. It seems like it would fill just like a market order.

On Sun, Aug 25, 2019 at 5:21 PM powertradercrypto notifications@github.com wrote:

Yeah but that allows for partial fills

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danpaquin/coinbasepro-python/issues/377?email_source=notifications&email_token=AJ6RVIPTZVUBCDMFQ5NAFDDQGLZUBA5CNFSM4IPGWSZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5C37FQ#issuecomment-524664726, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ6RVIJ6W2SLWKW3ISTPMRDQGLZUBANCNFSM4IPGWSZA .