This file contains hidden or 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 cProfile | |
from pstats import Stats, SortKey | |
import random | |
import hashlib | |
import time | |
def _perf_test_A(): | |
for i in range(1000000): | |
i = random.randint(0, 100) | |
# _perf_test_B(i) |
This file contains hidden or 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
from datetime import datetime, date | |
import numpy as np | |
from numpy.random.mtrand import f | |
import pandas as pd | |
import cProfile | |
from pstats import SortKey, Stats | |
from pandas.core.frame import DataFrame | |
''' |
This file contains hidden or 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 | |
from typing import Dict | |
class binanceperps(ccxt.binance): | |
def describe(self) -> Dict: | |
description = super().describe() | |
description["options"]["defaultType"] = "future" | |
return description | |
apiKey = 'lala' | |
secret = 'lala' |
This file contains hidden or 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
{ | |
‘percentage’: True, | |
‘feeSide’: ‘get’, | |
‘tierBased’: False, | |
‘taker’: 0.0005, | |
‘maker’: 0.0001, | |
‘precision’: { | |
‘base’: 8, | |
‘quote’: 8, | |
‘amount’: 0, |
This file contains hidden or 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
{ | |
‘percentage’: True, | |
‘feeSide’: ‘get’, | |
‘tierBased’: False, | |
‘taker’: 0.0004, | |
‘maker’: 0.0002, | |
‘precision’: {‘base’: 8, ‘quote’: 8, ‘amount’: 3, ‘price’: 2}, | |
‘limits’: {‘amount’: {‘min’: 0.001, ‘max’: 1000.0}, | |
‘price’: {‘min’: 556.72, ‘max’: 4529764.0}, ‘cost’: {‘min’: 5.0, ‘max’: None}, | |
‘market’: {‘min’: 0.001, ‘max’: 100.0}}, |
This file contains hidden or 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
{ | |
'percentage': True, | |
'feeSide': 'get', | |
'tierBased': False, | |
'taker': 0.0005, | |
'maker': 0.0001, | |
'precision': { | |
'base': 8, | |
'quote': 8, | |
'amount': 0, |
This file contains hidden or 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
from typing import Dict | |
from dotmap import DotMap | |
import ccxt | |
class binanceperps(ccxt.binance): | |
def describe(self) -> Dict: | |
description = super().describe() | |
description["options"]["defaultType"] = "future" | |
return description |
This file contains hidden or 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 sys | |
import time | |
import traceback | |
from datetime import datetime | |
from typing import Any, Dict, List | |
from gizmo.datetime_gizmo import timer | |
class PosPnl(object): | |
def __init__(self, ticker) -> None: |
This file contains hidden or 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 arrow | |
from datetime import datetime | |
from typing import Dict, List | |
from gizmo.datetime_gizmo import timer | |
from src.mds.ccxt.ftx import CasinoFtx | |
from gizmo import pnl_gizmo | |
apiKey = 'lalala' | |
secret = 'lalala' |
This file contains hidden or 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
# https://huobiapi.github.io/docs/dm/v1/en/#query-history-transactions-via-multiple-fields | |
import re | |
import hmac | |
import base64 | |
import requests | |
import hashlib | |
import urllib.parse as _urlencode | |
import datetime | |
import json | |
import collections |
OlderNewer