Skip to content

Instantly share code, notes, and snippets.

View thaaddeus's full-sized avatar
🎯
Focusing

Thaddeus thaaddeus

🎯
Focusing
View GitHub Profile
https://zoom.us/j/97222830064?pwd=U1d1cGIvUXVWR2RESjV3bnhMeDhIQT09#success
# pip install tardis-client
import asyncio
from tardis_client import TardisClient, Channel
tardis_client = TardisClient(api_key="YOUR_API_KEY")
async def replay():
messages = tardis_client.replay(
exchange="binance-futures",
from_date="2020-10-01",
const { streamNormalized, normalizeLiquidations } = require('tardis-dev')
async function monitorBitMEXLiquidations() {
const bitmexLiquidations = streamNormalized(
{
exchange: 'bitmex',
symbols: ['XBTUSD', 'ETHUSD']
},
normalizeLiquidations
)
@thaaddeus
thaaddeus / liquidations_monitor.js
Last active May 11, 2023 20:23
liquidations_monitor.js
const { streamNormalized, normalizeLiquidations, combine } = require('tardis-dev')
// let's monitor BTC perpetuals swaps only
const monitoredExchanges = [
{ id: 'ftx', symbols: ['BTC-PERP'] },
{ id: 'bitmex', symbols: ['XBTUSD'] },
{ id: 'deribit', symbols: ['BTC-PERPETUAL'] },
{ id: 'binance-futures', symbols: ['BTCUSDT'] },
{ id: 'binance-delivery', symbols: ['BTCUSD_PERP'] },
{ id: 'bitfinex-derivatives', symbols: ['BTCF0:USTF0'] },
@thaaddeus
thaaddeus / liquidations_monitor.ts
Last active June 5, 2023 12:18
Liquidations monitor
import { streamNormalized, normalizeLiquidations, combine, Liquidation } from 'tardis-dev'
// let's monitor BTC perpetuals swaps only
const monitoredExchanges = [
{ id: 'ftx', symbols: ['BTC-PERP'] },
{ id: 'bitmex', symbols: ['XBTUSD'] },
{ id: 'deribit', symbols: ['BTC-PERPETUAL'] },
{ id: 'binance-futures', symbols: ['BTCUSDT'] },
{ id: 'binance-delivery', symbols: ['BTCUSD_PERP'] },
{ id: 'bitfinex-derivatives', symbols: ['BTCF0:USTF0'] },