Skip to content

Instantly share code, notes, and snippets.

View rhettre's full-sized avatar

Rhett Reisman rhettre

View GitHub Profile
@rhettre
rhettre / ftx-limit-orders.py
Created July 28, 2022 13:40
FTX Limit Orders
import ftx
import json
YOUR_API_KEY = ""
YOUR_API_SECRET = ""
#change SYMBOL to 'ETH/USD' for ETH (etc)
SYMBOL = 'BTC/USD'
#Change USD_AMOUNT to dollar/fiat amount you want to buy/sell
USD_AMOUNT = 20
#change ORDER_TYPE to 'sell' for sells or 'buy' for buys
@rhettre
rhettre / cbpro-deposits.py
Created July 28, 2022 03:14
Coinbase Pro Deposit USD from Linked Bank Account
import json
import cbpro
my_key = ''
my_secret = ''
my_passphrase = ''
bank_id = ''
def _depositBTC(deposit_amount, cb_key, cb_secret, cb_password, bank_id):
auth_client = cbpro.AuthenticatedClient(cb_key, cb_secret, cb_password)
@rhettre
rhettre / cbpro-get-bank-id.py
Created July 28, 2022 03:13
Get Connected Bank Account IDs (For Deposits)
import json
import cbpro
my_key = ""
my_secret = ""
my_passphrase = ""
def _getBankID(my_key, my_secret, my_passphrase):
auth_client = cbpro.AuthenticatedClient(my_key, my_secret, my_passphrase)
payment_methods = auth_client.get_payment_methods()
@rhettre
rhettre / History|-21d5ac07|entries.json
Last active February 22, 2024 03:12
VS Code Settings
{"version":1,"resource":"file:///Users/rhettre/GitHub/coinbase-advancedtrade-python/coinbase_advanced_trader/strategies/limit_order_strategies.py","entries":[{"id":"Olyr.py","timestamp":1696175884711},{"id":"aSDe.py","timestamp":1696175914650},{"id":"naK6.py","timestamp":1696182219868},{"id":"KWFG.py","timestamp":1696182416911}]}
@rhettre
rhettre / cbpro-limit-order.py
Last active July 28, 2022 03:12
Coinbase Pro Limit Orders
import cbpro
import json
#Insert your API key, secret, and passphrase from Coinbase Pro
my_key = ""
my_secret = ""
my_passphrase = ""
auth_client = cbpro.AuthenticatedClient(my_key, my_secret, my_passphrase)
#Replace symbol with whatever currencypair you want to trade - list of currency pairs available on Notion
@rhettre
rhettre / cbpro-market-order.py
Last active July 28, 2022 03:12
Coinbase Pro Market Orders
import cbpro
import json
#Insert your API key, secret, and passphrase from Coinbase Pro
my_key = ""
my_secret = ""
my_passphrase = ""
#Replace symbol with whatever currencypair you want to trade - list of currency pairs available on Notion
symbol = "BTC-USD"
@rhettre
rhettre / gemini-dca-on-steroids.py
Created July 28, 2022 00:44
InvestAnswers DCA Steroids ATH Script
import json
import gemini
import requests
GEMINI_PUBLIC_KEY = ""
GEMINI_PRIVATE_KEY = ""
symbol = "BTCUSD"
tick_size = 8
quote_currency_price_increment = 2
buy_amount = 100
@rhettre
rhettre / gemini-sandbox.py
Created July 28, 2022 00:41
Connect to Sandbox - Buy Demo
import json
import gemini
#you need sandbox public keys / private keys
#you can view your trades at https://exchange.sandbox.gemini.com/
public_key = ""
private_key = ""
symbol = "BTCUSD"
tick_size = 8
@rhettre
rhettre / gemini-buy-fear-sell-greed.py
Created July 28, 2022 00:40
Buy Bitcoin Fear and Sell Bitcoin Greed Index
import json
import gemini
import requests
public_key=""
private_key=""
#Fear and Greed indicator: Set to True if you want to include Fear and Greed data
INCLUDE_FEAR_AND_GREED = True
#If the Fear and Greed indicator is below FEAR_FLOOR, multiply amount purchased by FEAR_MULTIPLIER
@rhettre
rhettre / gemini-buy-dips.py
Created July 28, 2022 00:32
Automatically Buy Dips with Low Limit Orders
import json
import gemini
public_key = ""
private_key = ""
symbol = "BTCUSD"
tick_size = 8
quote_currency_price_increment = 2
#update symbol based on what crypto/fiat pair you want to buy. Default is BTCUSD, change to BTCEUR for Euros or ETHUSD for Ethereum (for example) - see all possibilities down in symbols and minimums link
#update tick_size and quote_currency_price_increment based on what crypto-pair you are buying. BTC is 8 - in the doc it says 1e-8 you want the number after e-. Or in the case of .01 you want 2 (because .01 is 1e-2)