類似的套利在銀行的外匯交易很常見,通常就是在客戶買進外匯時,做一個反向部位來套利。
國外網友已經開發了一個類似的 Python 程式來執行跨交易所套利,前提是你必須在這些交易所都有帳戶,並且能瞬間即時執行交易,因為套利機會通常是稍縱即逝。
程式目前自動套利交易只支援兩家交易所
- Bitstamp (USD)
- Paymium (EUR)
如果我們將設定檔案 config.py 設定為:
- 鎖定 6% 獲利以上的交易
- 執行部位小於 2 BTC 大於 0.01 BTC
執行之後就會顯示當時可以套利的機會點:
2018-02-09 18:03:34,738 [INFO] profit: 1051.17 USD with volume: 2.00 BTC - buy at 8490.0000 (KrakenUSD) sell at 8765.1039 (GDAXEUR) ~6.19%
2 BTC 用美元買進 $8490 用歐元賣出 $8765.1039 --> 套利美元 1051.17 USD 獲利率約 6.19%
https://github.com/jdlin/bitcoin-arbitrage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018-02-09 18:03:33,099 [INFO] profit: 1114.14 USD with volume: 2.00 BTC - buy at 8850.0000 (BitFlyerUSD) sell at 8850.7922 (GDAXEUR) ~6.29% | |
2018-02-09 18:03:33,253 [INFO] profit: 1037.15 USD with volume: 2.00 BTC - buy at 8359.0000 (BitfinexUSD) sell at 8765.1039 (GDAXEUR) ~6.20% | |
2018-02-09 18:03:33,359 [INFO] profit: 1057.70 USD with volume: 2.00 BTC - buy at 8318.0100 (GDAXUSD) sell at 8800.5195 (BitfinexEUR) ~6.36% | |
2018-02-09 18:03:33,570 [INFO] profit: 1123.64 USD with volume: 2.00 BTC - buy at 8318.0100 (GDAXUSD) sell at 8765.1039 (GDAXEUR) ~6.75% | |
2018-02-09 18:03:33,916 [INFO] profit: 1065.19 USD with volume: 2.00 BTC - buy at 8450.0000 (GeminiUSD) sell at 8765.1039 (GDAXEUR) ~6.30% | |
2018-02-09 18:03:34,738 [INFO] profit: 1051.17 USD with volume: 2.00 BTC - buy at 8490.0000 (KrakenUSD) sell at 8765.1039 (GDAXEUR) ~6.19% |
沒有留言:
張貼留言