Closed dgunay closed 3 years ago
Ooh! I didn't realize they had different minimum order sizes for market buys. That's a game changer at today's btc price!
Just ran a test:
auth_client.place_market_order(product_id='BTC-USD', side='buy', funds='0.50')
{'message': 'funds is too small. Minimum size is 5.00000000'}
DCAing in at as little as $5 a time is awesome. And CB Pro's fees don't favor makers so there's no reason to do the limit order complications anymore (back in the GDAX days that fee structure must have favored makers?).
I'll take a look at your market order code, though it may be simpler for me to just implement it myself. I do like that you used the more up to date python type hints. I need to start getting in that habit.
The AWS region addition makes sense to me (originally I think SNS must have been restricted to that us-east-1 region; can't think of any other reason why I had it hard-coded).
Also note that a change from the pip install gdax
dependency is getting updated to cbpro
.
Confirmed that a $5 market order works against the live prod market. Fee is the same flat 0.5% as any other order.
{'id': 'xxxxxxxxxxxxxxxxxxxxxxxx',
'product_id': 'BTC-USD',
'profile_id': 'xxxxxxxxxxxxxxxxxxxxxxxx',
'side': 'buy',
'funds': '4.9751243700000000',
'specified_funds': '5.0000000000000000',
'type': 'market',
'post_only': False,
'created_at': '2021-02-11T15:38:34.350418Z',
'done_at': '2021-02-11T15:38:34.371Z',
'done_reason': 'filled',
'fill_fees': '0.0248734782450000',
'filled_size': '0.00010395',
'executed_value': '4.9746956490000000',
'status': 'done',
'settled': True}
Thanks for testing it out (with actual $$$ no less)!
Also note that a change from the pip install gdax dependency is getting updated to cbpro.
I was wondering why the API seemed different than some of the docs I was reading, no wonder 😩.
Can you grab the latest from master
and re-submit your AWS region change? I ended up implementing the change to market orders myself and it seems to be in good shape. But I'd still love to have your contribution.
Sure thing.
Closing, AWS region changes are now in this PR: https://github.com/kdmukai/gdax_bot/pull/7
Hi - thanks for making this script, it's really cool and I'm in the process of setting it up for personal use. One obstacle I've encountered is that Coinbase has significantly higher minimum order sizes for limit orders instead of market orders. I also don't care too much about slippage and more about being able to DCA at the finest amounts possible, so I tried to implement market orders. This is still WIP and I'm not positive it works yet because the sandbox doesn't have a lot of order activity on it.
I also made the AWS region a parameter in the config file.
Again, due to the magnitude of this change feel absolutely free not to use it, just thought I'd give back in case you do want to merge it in when it's ready.