Skip to content

Instantly share code, notes, and snippets.

@LevSiemens
LevSiemens / bitmex_historical_data.py
Created October 5, 2021 15:54
Python BitMeX Fetcher
import bitmex
import time, sqlite3, datetime, math
# Task:
# Create a DB and fetch candles from 2015-09-25T12:01:00.000Z and add it into DB
client = bitmex.bitmex(test=False)
dbconn = sqlite3.connect('XBTUSD.db')
cursor = dbconn.cursor()
# Creates a DB