Skip to content

Instantly share code, notes, and snippets.

View rhettre's full-sized avatar

Rhett Reisman rhettre

View GitHub Profile
@rhettre
rhettre / gemini-buy.py
Last active August 1, 2022 02:38
Buy Bitcoin from Gemini
import json
import gemini
public_key = ""
private_key = ""
symbol = "BTCUSD"
tick_size = 8
quote_currency_price_increment = 2
buy_amount = 20
#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
@rhettre
rhettre / gemini-withdrawal.py
Last active September 2, 2022 15:39
Withdraw From Gemini to One Address
import json
import gemini
import random
import math
public_key = ""
private_key = ""
coin_to_withdrawal="BTC"
trader = gemini.PrivateClient(public_key, private_key)
@rhettre
rhettre / gemini-gusd-to-usd.py
Created July 28, 2022 00:14
Convert GUSD to USD (For Automating Deposits)
import json
import gemini
public_key = ''
private_key = ''
#This function converts all your GUSD to USD
def _convertGUSDtoUSD(pub_key, priv_key):
gusd_balance = 0
trader = gemini.PrivateClient(pub_key, priv_key)
@rhettre
rhettre / gemini-bat-to-btc.py
Created July 28, 2022 00:16
Convert BAT to BTC - Gemini
import json
import gemini
from math import floor
public_key = ""
private_key = ""
symbol = 'BATBTC'
tick_size = 6
quote_currency_price_increment = 8
#update symbol based on what crypto/fiat pair you want to buy. Default is BATBTC, change to BATETH for ETH or BATUSD for USD (for example) - see all possibilities down in symbols and minimums link
@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)
@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-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-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 / 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 / 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