Last active
September 21, 2021 04:54
-
-
Save normanlmfung/211fe6116117a04d5b5bca16ba43888f to your computer and use it in GitHub Desktop.
ccxt.binance.load_markets retrieve perpetuals
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' | |
param = { | |
'apiKey' : apiKey, | |
'secret' : secret | |
} | |
exchange = binanceperps(param) | |
markets = exchange.load_markets() | |
print(markets["BTC/USDT"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment