This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ccxt | |
exchange = 'mexc' | |
if exchange == 'binance': | |
client = ccxt.binance() | |
elif exchange == 'coinbase': | |
client = ccxt.coinbase() | |
elif exchange == 'bitfinex': | |
client = ccxt.bitfinex() | |
elif exchange == 'okx': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import requests | |
from web3 import Web3 | |
infura_url = 'https://eth.llamarpc.com' | |
web3 = Web3(Web3.HTTPProvider(infura_url)) | |
bitquery_api = '<bitquery_api>' | |
api_url = "https://graphql.bitquery.io/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import datetime | |
import json | |
import sys | |
import time | |
import pytz | |
from autobahn.asyncio.websocket import WebSocketClientFactory, WebSocketClientProtocol | |
if len(sys.argv) > 1 and sys.argv[1].lower() == 'spot': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script gets all Binance futures tickers, it tries to match the spot tickers against the | |
futures tickers. | |
The resulted TradingView list consists of ALL futures + their spot equivalents, | |
any other spot ticker (like $PYR) is not included. | |
This is useful for: | |
- Quickly highlight spot/futures premium, price difference | |
- Quickly switch from spot to futures chart to spot differences, for instance if futures had a massive wick that does not exist | |
in spot, then you may no longer be interested in the setup anymore as it is not clear to define when the liquidity is swept or not. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
How to pop a message box without blocking the script. It's running in the background, so it may not be in best practices | |
but it works which is what I wanted. | |
""" | |
import threading | |
import time | |
import tkinter as tk | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder