Last active
June 28, 2022 01:36
-
-
Save MtkN1/46011c0389cdb74bcca30cfc26568529 to your computer and use it in GitHub Desktop.
Bybit Futures Symbol Names
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 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') |
ワンライナー
curl -sL https://gist.github.com/MtkN1/46011c0389cdb74bcca30cfc26568529/raw/5990f75ad631613056b8ed008c6f62c07884039a/bybit_futures_symbol_names.py | python3
今現在の結果
{'name': 'BTCUSDU21', 'alias': 'BTCUSD0924', 'status': 'Trading', 'base_currency': 'BTC', 'quote_currency': 'USD', 'price_scale': 2, 'taker_fee': '0.00075', 'maker_fee': '-0.00025', 'leverage_filter': {'min_leverage': 1, 'max_leverage': 100, 'leverage_step': '0.01'}, 'price_filter': {'min_price': '0.5', 'max_price': '999999.5', 'tick_size': '0.5'}, 'lot_size_filter': {'max_trading_qty': 1000000, 'min_trading_qty': 1, 'qty_step': 1}}
{'name': 'BTCUSDM21', 'alias': 'BTCUSD0625', 'status': 'Trading', 'base_currency': 'BTC', 'quote_currency': 'USD', 'price_scale': 2, 'taker_fee': '0.00075', 'maker_fee': '-0.00025', 'leverage_filter': {'min_leverage': 1, 'max_leverage': 100, 'leverage_step': '0.01'}, 'price_filter': {'min_price': '0.5', 'max_price': '999999.5', 'tick_size': '0.5'}, 'lot_size_filter': {'max_trading_qty': 1000000, 'min_trading_qty': 1, 'qty_step': 1}}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
表示結果の
name
を他のAPIパラメーターsymbol
に指定する