MCPcopy Create free account
hub / github.com/ccxt/ccxt / set_ref

Method set_ref

python/ccxt/hyperliquid.py:1700–1721  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1698 return self.sign_user_signed_action(messageTypes, message)
1699
1700 def set_ref(self):
1701 if self.safe_bool(self.options, 'refSet', False):
1702 return True
1703 self.options['refSet'] = True
1704 action = {
1705 'type': 'setReferrer',
1706 'code': self.safe_string(self.options, 'ref', 'CCXT1'),
1707 }
1708 nonce = self.milliseconds()
1709 signature = self.sign_l1_action(action, nonce)
1710 request = {
1711 'action': action,
1712 'nonce': nonce,
1713 'signature': signature,
1714 }
1715 response = None
1716 try:
1717 response = self.privatePostExchange(request)
1718 return response
1719 except Exception as e:
1720 response = None # ignore self
1721 return response
1722
1723 def approve_builder_fee(self, builder: str, maxFeeRate: str):
1724 nonce = self.milliseconds()

Callers 1

initialize_clientMethod · 0.95

Calls 5

sign_l1_actionMethod · 0.95
safe_boolMethod · 0.80
safe_stringMethod · 0.80
privatePostExchangeMethod · 0.65
millisecondsMethod · 0.45

Tested by

no test coverage detected