Comments (4)
This is likely because market_order(mode, volume)
doesn't have a reasonable default implementation in ExchangeAPIWrapper
yet. Individual integrations can override it if their exchange does have a market order order type, but we just haven't coded the default such that it'll work on any exchange.
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
from gryphon.
Thanks I ll have a look at that eventually, I'm in need of more order types and need to understand this part better...
from gryphon.
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 :
https://github.com/garethdmm/gryphon/blob/master/gryphon/execution/harness/exchange_coordinator.pyx#L355
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...)
from gryphon.
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
from gryphon.
Related Issues (20)
- Bitstamp : subaccount API invalid signature HOT 3
- The homepage readme "gryphon-exe" is a typo? HOT 2
- Document sim_exchange HOT 1
- Strategy: Auditing cancels orders ? HOT 1
- Running [strat_name].py leads to .config file not being found. Original fix did not resolve this HOT 2
- Looking for feedback: Strategies and Strategy Ledgers are not intuitive to users HOT 1
- Add support for BitMex exchange. HOT 1
- Keeping track of dependencies HOT 2
- Running a strategy from a Jupyter Notebook HOT 1
- 'module' object has no attribute 'Money' HOT 4
- Setting up Data Service HOWTO HOT 1
- AttributeError: type object 'IOLoop' has no attribute 'initialized' HOT 2
- Slack invite link is down HOT 6
- AttributeError: 'NoneType' object has no attribute '_instantiate_plugins' HOT 2
- How to use ohlc bar data ? if I want TA indicator in my strategy? HOT 1
- What was the main idea to synchronize exchange rate of fiat-currencies?
- Migrate database cannot import name escape_sequence
- ERROR:gryphon.execution.live_runner:[UnmappedInstanceError] Class '__builtin__.NoneType' is not mapped
- ImportError: cannot import name ESDIRK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gryphon.