Skip to content

Instantly share code, notes, and snippets.

@moondancecrypto
moondancecrypto / binance_fetch_pastdata_single.py
Created August 23, 2020 14:15
A script to fetch OHLCV data from Binance.
import sys
import time
import dateparser
import pytz
import json
import csv
from datetime import datetime
from binance.client import Client
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#%%
import glob
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
sns.set_style('whitegrid')
sns.set_context("paper", 1.5, {"lines.linewidth": 4})
#%%
@moondancecrypto
moondancecrypto / fetch_BTCMOVE.py
Last active May 1, 2022 06:36
A script to fetch OHLCV data for FTX MOVE daily contracts (e.g. BTC-MOVE-0815)
import os
import sys
argvs = sys.argv
from datetime import datetime, timedelta, timezone
import json
import pytz
import pandas as pd
import ciso8601
# For FtxClient ----------------------------------------