INNER CODE UNIT · Python
get_timestamp
kdmukai/gdax_bot · gdax_bot.py:18
def get_timestamp():
ts = time.time()
return datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')
"""
Basic Coinbase Pro DCA buy/sell bot that executes a market order.
* CB Pro does not incentivize maker vs taker trading unless you trade over $50k in
a 30 day period (0.25% taker, 0.15% maker). Current fees are 0.50% if you make
less than $10k worth of trades over the last 30 days. Drops to 0.35% if you're
above $10k but below $50k in trades.
* Market orders can be issued for as little as $5 of value versus limit orders which
must be 0.001 BTC (e.g. $50 min if btc is at $50k). BTC-denominated market
orders must be at least 0.0001 BTC.
This is meant to be run as a crontab to make regular buys/sells on a set schedule.
"""
parser = argparse.ArgumentParser(