Gryphon Trading Framework 0.12 Documentation¶
Gryphon is an open source software platform for building and running algorithmic trading strategies in cryptocurrency markets. It has traded billions in volume to date.
This documentation should tell you everything you need to know about Gryphon.
Gryphon is both a software library that can be integrated into other projects, and an application suite for running trading strategies and operating a trading business. How you use Gryphon depends on your goals.
This documentation is primarily for users wanting to use gryphon to run their own trading business, but the API documentation in particular will be relevant to all users.
Here is a simple, one-way arbitrage strategy built on gryphon.
from gryphon.execution.strategies.base import Strategy from gryphon.lib import arbitrage as arb class SuperSimpleArb(Strategy): def tick(self, open_orders): cross = arb.detect_directional_cross( self.harness.gemini_btc_usd.get_orderbook(), self.harness.coinbase_btc_usd.get_orderbook(), ) executable_volume = arb.get_executable_volume( cross, self.harness.coinbase_btc_usd.get_balance(), self.harness.gemini_btc_usd.get_balance(), ) if cross and executable_volume: self.harness.gemini_btc_usd.market_order(executable_volume, 'BID') self.harness.coinbase_btc_usd.market_order(executable_volume, 'ASK')
A near-cousin to this strategy ships built-in to the framework at
gryphon.execution.strategies.builtin.simple_arb and can be run on an appropriate installation with the command:
gryphon-exec strategy simple_arb --builtin --execute
There are a few ways to get help with Gryphon:
- Using Gryphon for Trading
- Writing Strategies
- Exchange Integrations
- Advanced Engine Features
- Ledger Maintenance
- Dashboard Server
- Gryphon Data Service (GDS)
- Business Management Features
- Contributing to Gryphon
- Python Style Guide
- Environment Variable Reference
- Reading List