garethdmm / gryphon

Powerful, proven, and extensible framework for building trading strategies at any frequency, with a focus on crypto currencies. Battle-tested with billions traded.
http://www.gryphonframework.org
Other
1.06k stars 150 forks source link

Bitfinex #24

Closed mattstone closed 5 years ago

mattstone commented 5 years ago

I'm trying to use Bitfinex (BTCUSD) and and striking this issue:

(venv) zen:gryphon matt$ gryphon-exec initialize-ledger BITFINEX_BTC_USD Could not initialize BITFINEX_BTC_USD, for an unexpected reason.

I can see that this page says BITFINEX is supported => https://gryphon.readthedocs.io/en/latest/exchange_integrations.html#supported-exchange-list

However, this page does not mention BITFINEX in the config examples => https://gryphon.readthedocs.io/en/latest/environment.html#environment-exchanges

I've downloaded the source and I can see gryphon-master/gryphon/lib/exchange/bitfinex_btc_usd.py exists

I've tried different permutations of the below, but suspect I am missing the correct key names.

BITFINEX_BTC_USD_API_KEY_ID=[my key id] BITFINEX_BTC_USD_API_KEY=[my api key] BITFINEX_BTC_USD_API_SECRET=[my secret]

I've tried the debugging steps as per the previous ticket, but I don't think it even got that far as it fails the

if configuration: test on line 45 of ..lib/exchange/bitfinex_btc_usd.py

Thanks again for this project, really enjoying playing around with this.

mattstone commented 5 years ago

..er.. it may also be that Bitfinex is down for maintenance for the next 7 hours!

asmodehn commented 5 years ago

KEY_ID doesnt seem needed ? From what I gather, it looks like authentication happens there: https://github.com/garethdmm/gryphon/blob/master/gryphon/lib/exchange/bitfinex_btc_usd.py#L114

garethdmm commented 5 years ago

@asmodehn is correct here, the only two key ID's you need for bitfinex are API_KEY and API_SECRET.

The Bitfinex integration is less current than the other big exchanges, so the presence of an actual bug here is more likely than in other integrations. Tinker stopped trading with them after the 2016 exchange hack, so the integration hasn't been kept up much since then. @mattstone if the issue is still there after bitfinex comes back up, the next thing I'd try is installing from source (download the zip, unzip it, and run pip install -e [zip directory]), and then start throwing some debug statements in the initialize ledger script at gryphon/execution/controllers/initialize_ledgers.py and bitfinex wrapper to see if you can get more visibility into the error.

mattstone commented 5 years ago

Thanks @asmodehn & @garethdmm - I've already downloaded the source and will do some digging. I'll close this for now.