Skip to content

Instantly share code, notes, and snippets.

View 00_pybotters_mongodb.py
import asyncio
from typing import Any, Dict
import motor.motor_asyncio
import pybotters
class BybitMongoDB:
def __init__(self):
client = motor.motor_asyncio.AsyncIOMotorClient()
@MtkN1
MtkN1 / bybit_futures_symbol_names.py
Last active May 3, 2021
Bybit Futures Symbol Names
View bybit_futures_symbol_names.py
import http.client
import json
import urllib.request
resp: http.client.HTTPResponse
with urllib.request.urlopen('https://api.bybit.com/v2/public/symbols') as resp:
data = json.loads(resp.read().decode())
print(*filter(lambda x: all([x['name'] != x['alias'], x['status'] == 'Trading']), data['result']), sep='\n\n')
@MtkN1
MtkN1 / cryptocurrency-exchange-fees-jp.md
Last active May 2, 2021
暗号資産🇯🇵取引所の現物手数料まとめ
View cryptocurrency-exchange-fees-jp.md

Bitcoin

🏦 Exchange 💱 Trading Fee 📤 Withdrawal Fee 📝 memo
bitFlyer 0.15 ~ 0.01 % 0.0004 BTC
Liquid 0.0 % 0.0007 BTC
bitbank -0.02 / 0.12 % 0.0006 BTC 💱 Maker / Taker
SBIVCTrade 0.0 % 0.0 BTC
GMOcoin -0.01 / 0.05 % 0.0 BTC 💱 Maker / Taker
HuobiJapan 0.1 ~ 0.008 % /
0.1 ~ 0.024 %
0.0005 BTC 💱 Maker / Taker
View pybybit.py
import hashlib
import hmac
import json
import time
import urllib.parse
from threading import Thread
from collections import deque
from requests import Request, Session
from requests.exceptions import HTTPError
View Apr-21-bot.py
import http.client
import json
import time
import urllib.request
def main() -> None:
print('絶対に負けないbotを起動しました...Ctrl+Cで終了')
while True:
print('売買判断...')
@MtkN1
MtkN1 / bar.py
Created Mar 13, 2021
Note Preview Sample
View bar.py
msg = 'bar'
print(f'hello, {msg}!')
@MtkN1
MtkN1 / try_pybybit.py
Last active Aug 10, 2020
Try PyBybit
View try_pybybit.py
# pybybitのインポート
import pybybit
# (当説明スクリプト上で使うインポート)
from pprint import pp
import time
# API情報を入力
apis = [
View gmocoiner_usage.py
import json
from gmocoiner import GMOCoin
if __name__ == '__main__':
api_key = 'YOUR_API_KEY'
secret = 'YOUR_SECRET_KEY'
gmo = GMOCoin(api_key, secret, late_limit=True, logger=None)
View sample_pybybit.py
import json
import time
# ①クラスをインポートする
from pybybit import Bybit
if __name__ == '__main__':
# ②インスタンスを生成、パラメーターを設定する
bybit = Bybit(api_key='xxxx',
secret='yyyy', symbol='BTCUSD', ws=True, test=True)