Skip to content

Instantly share code, notes, and snippets.

@IperGiove
IperGiove / test_gpt_binance.py
Created January 14, 2023 16:02
testing gpt to create a script to trade with binance
import typing
from binance.client import Client
import talib
def connect_to_binance(api_key: str, api_secret: str) -> Client:
"""
Connects to the Binance API using the provided API key and secret.
Returns a Binance client object.
"""
return Client(api_key, api_secret)
@IperGiove
IperGiove / test_rate_limit.py
Created July 25, 2023 15:44
Test the rate limit of MEXC
import hmac
import hashlib
import time
import httpx
import pprint
import datetime
pp = pprint.PrettyPrinter(indent=4)
def create_message() -> str:
@IperGiove
IperGiove / baseline.py
Created January 9, 2024 23:05
baseline stable-baseline3 & backtesting.py
import pandas as pd
from backtesting import Backtest, Strategy
from gymnasium import spaces, Env
from stable_baselines3 import PPO
import numpy as np
class periodicStrategy(Strategy):
def init(self):
print(f"Start with equity={self.equity:.2f}")
@IperGiove
IperGiove / oss_vs_routescan_labelling.py
Created June 13, 2024 12:50
find a single address in Routescan and OSS label DB
from time import perf_counter
import numpy as np
DB = {
"oss": [
{
"name": "dapp1",
"blockchain": [
{
"address": "0x1",