-
Notifications
You must be signed in to change notification settings - Fork 151
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
exchange.market_order requires a price ? #52
Comments
This is likely because Such an implementation would be as simple as: get current orderbook, get price quote for desired volume, place limit order at that price. Here's where it would go: gryphon/gryphon/lib/exchange/exchange_api_wrapper.pyx Lines 112 to 116 in 8963d07
|
Thanks I ll have a look at that eventually, I'm in need of more order types and need to understand this part better... |
Hmmm, I might be wrong but it looks like even if the exchange integration has different order methods following the api_wrapper design, it will not be called by the coordinator ? Looks like both market_order() and limit_order() from the exchange are calling the place_order() from the exchange api integration : Maybe this needs some careful api changes if one is to implement more order types (market without price, stop loss are the ones I'm missing currently...) |
This might also be an opportunity to check and get closer to what ccxt does : https://github.com/ccxt/ccxt/blob/master/python/ccxt/base/exchange.py#L1608 |
I was wondering what was the logic behind requiring a price for a market order here :
https://github.com/garethdmm/gryphon/blob/master/gryphon/execution/harness/exchange_coordinator.pyx#L247
As far as I understand, market orders take the current market price, so requiring one in the API is useless/confusing...
The text was updated successfully, but these errors were encountered: