Skip to content

Instantly share code, notes, and snippets.

@the023
the023 / tradewatcher.html
Last active July 26, 2019 13:09
Trade Watcher using bitfinex Websocket
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Big Trades</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script type="text/javascript">
/**
* Display Big trades on bitfinex
@the023
the023 / coinstatusmine.html
Created February 23, 2018 23:35
Multi trading view, dirty code
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CStatus FNX</title>
<meta name="description" content="CStatus Bitfinex">
<meta name="author" content="Tt">
import pandas as pd
import matplotlib.pyplot as plt
import ccxt
ex = ccxt.gdax()
def builddfclose(ex,pair,name,column='all'):
# call api
resp = ex.fetch_ohlcv(symbol=pair, timeframe='1h')
# build full df
import pandas as pd
import matplotlib.pyplot as plt
import ccxt
ex = ccxt.gdax()
response = ex.fetch_ohlcv(symbol='BTC/USD', timeframe='1h')
columns = ['mts', 'open', 'high', 'low', 'close', 'volume']
df = pd.DataFrame(response, columns=columns).set_index('mts')
df.plot()
plt.show()
"""
Chart arbitrage of a currency between different exchanges
"""
import pandas as pd
import sys
import matplotlib.pyplot as plt
from time import sleep
import datetime
import ccxt
""" Chart Live percentage change of ticker price for multiple currencies since start
updated every 10 secondes
"""
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import style
import pandas as pd
import sys
from time import sleep
""" Chart of ohlcv and more for multi cryptos
- get exchange api data using ccxt (past and live)
- chart closing price percentage, volume + ohlcv
- store data in dfpairs = { pair = dataframe( o h l c v * microstimestamp ), ... }
Todo:
- free memory
- volume
- split charts
"""
@the023
the023 / cw_ohcl_histo.py
Last active December 7, 2017 21:20
chart %price and average volume for different cryptos
""" Get chart of multiple coins, in percent
use Cryptowatch API (watch for allowance and cost)
v.06 add switch to display volume. Add grid
v.05 fix date bug
v.04 adding volume + bar
see : https://screenshots.firefox.com/GJhtEVQxkRtJ47MW/null (wrong)
"""
import datetime
import requests
import json
from time import sleep
import ccxt
""" Display price ticker from multiple exchanges and pairs
Comparison with first exchange (bitfinex otherwise kraken for EUR)
Check ccxt doc for echanges and pairs name
Requirement : https://github.com/ccxt/ccxt
v0.03 correct percent bug
@the023
the023 / CryptoIntroduction.md
Last active October 16, 2017 16:01
CryptoIntroduction

Introduction to Cryptocurrencies

Notes from crypto noob - Improvements welcome - October 2017

A few definitions

Blockchain :

  • A blockchain is a continuously growing list of records, called blocks, which are linked and secured using cryptography
  • By design, blockchains are inherently resistant to modification of the data.
  • A blockchain can serve as "an open, distributed ledger that can record transactions between two parties efficiently and in a verifiable and permanent way.