Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __rmul__(self, other: float) -> Quantity:
return Quantity(instrument=self, size=other)
def __truediv__(self, other):
if isinstance(other, Instrument):
return TradingPair(self, other)
def __str__(self):
return str(self.symbol)
def __repr__(self):
return str(self)
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
def __truediv__(self, other):
if isinstance(other, Instrument):
return TradingPair(self, other)
def __str__(self):
return str(self.symbol)
def __repr__(self):
return str(self)
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
if isinstance(other, Instrument):
return TradingPair(self, other)
def __str__(self):
return str(self.symbol)
def __repr__(self):
return str(self)
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
def __truediv__(self, other):
if isinstance(other, Instrument):
return TradingPair(self, other)
def __str__(self):
return str(self.symbol)
def __repr__(self):
return str(self)
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
return str(self.symbol)
def __repr__(self):
return str(self)
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
return Quantity(instrument=self, size=other)
def __truediv__(self, other):
if isinstance(other, Instrument):
return TradingPair(self, other)
def __str__(self):
return str(self.symbol)
def __repr__(self):
return str(self)
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
def __repr__(self):
return str(self)
# Crypto-currency
BTC = Instrument('BTC', 8, 'Bitcoin')
ETH = Instrument('ETH', 8, 'Ethereum')
BCH = Instrument('BCH', 8, 'Bitcoin Cash')
LTC = Instrument('LTC', 2, 'Litecoin')
XRP = Instrument('XRP', 2, 'XRP')
# Fiat Currency
USD = Instrument('USD', 2, 'U.S. Dollar')
EUR = Instrument('EUR', 2, 'Euro')
# Hard Currency
GOLD = Instrument('XAU', 1, 'Gold')
def __truediv__(self, other):
if isinstance(other, Instrument):
return TradingPair(self, other)