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

Method create_vault

python/ccxt/hyperliquid.py:2732–2768  ·  view source on GitHub ↗

creates a value :param str name: The name of the vault :param str description: The description of the vault :param number initialUsd: The initialUsd of the vault :param dict [params]: extra parameters specific to the exchange API endpoint :returns dic

(self, name: str, description: str, initialUsd: int, params={})

Source from the content-addressed store, hash-verified

2730 return self.parse_orders(statuses)
2731
2732 def create_vault(self, name: str, description: str, initialUsd: int, params={}):
2733 """
2734 creates a value
2735 :param str name: The name of the vault
2736 :param str description: The description of the vault
2737 :param number initialUsd: The initialUsd of the vault
2738 :param dict [params]: extra parameters specific to the exchange API endpoint
2739 :returns dict: the api result
2740 """
2741 self.check_required_credentials()
2742 self.load_markets()
2743 nonce = self.milliseconds()
2744 request = {
2745 'nonce': nonce,
2746 }
2747 usd = self.parse_to_int(Precise.string_mul(self.number_to_string(initialUsd), '1000000'))
2748 action = {
2749 'type': 'createVault',
2750 'name': name,
2751 'description': description,
2752 'initialUsd': usd,
2753 'nonce': nonce,
2754 }
2755 signature = self.sign_l1_action(action, nonce)
2756 request['action'] = action
2757 request['signature'] = signature
2758 response = self.privatePostExchange(self.extend(request, params))
2759 #
2760 # {
2761 # "status": "ok",
2762 # "response": {
2763 # "type": "createVault",
2764 # "data": "0x04fddcbc9ce80219301bd16f18491bedf2a8c2b8"
2765 # }
2766 # }
2767 #
2768 return response
2769
2770 def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2771 """

Callers

nothing calls this directly

Calls 8

sign_l1_actionMethod · 0.95
parse_to_intMethod · 0.80
string_mulMethod · 0.80
privatePostExchangeMethod · 0.65
load_marketsMethod · 0.45
millisecondsMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected