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

Method set_ref

python/ccxt/async_support/hyperliquid.py:1701–1722  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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