hyperliquid 0.4.68__tar.gz → 0.4.70__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/PKG-INFO +1 -1
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/pyproject.toml +1 -1
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/__init__.py +1 -1
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/__init__.py +1 -1
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/exchange.py +1 -1
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/hyperliquid.py +65 -24
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/exchange.py +1 -1
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/types.py +1 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/hyperliquid.py +65 -24
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/pro/__init__.py +1 -1
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/.gitignore +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/README.md +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/abstract/hyperliquid.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/prediction_exchange.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/throttler.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/cache.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/client.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/functions.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/future.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/order_book.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/order_book_side.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/decimal_to_precision.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/errors.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/msgpack.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/order_router.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/base/precise.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/pro/hyperliquid.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/README.md +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/amino/amino_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/cosmos/base/v1beta1/coin_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/cosmos/crypto/multisig/v1beta1/multisig_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/cosmos/crypto/secp256k1/keys_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/cosmos/msg/v1/msg_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/cosmos/tx/signing/v1beta1/signing_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/cosmos/tx/v1beta1/tx_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/cosmos_proto/cosmos_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/accountplus/tx_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/block_rate_limit_config_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/clob_pair_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/equity_tier_limit_config_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/liquidations_config_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/liquidations_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/matches_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/order_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/order_removals_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/clob/tx_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/sending/transfer_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/sending/tx_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/subaccounts/asset_position_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/subaccounts/perpetual_position_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/dydxprotocol/subaccounts/subaccount_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/gogoproto/gogo_pb2.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/dydx_v4_client/registry.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/ethabi/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/ethabi/abi.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/ethabi/typed_data.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/keccak/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/keccak/keccak.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/lighter_client/signer.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/cairo/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/cairo/felt.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/ccxt_utils.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/common.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/constants.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/hash/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/hash/address.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/hash/poseidon.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/hash/selector.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/hash/utils.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/models/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/models/typed_data.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/utils/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starknet/utils/typed_data.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starkware/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starkware/crypto/__init__.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starkware/crypto/fast_pedersen_hash.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starkware/crypto/math_utils.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starkware/crypto/rfc6979.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starkware/crypto/signature.py +0 -0
- {hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/starkware/crypto/utils.py +0 -0
|
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
|
26
26
|
|
|
27
27
|
# ----------------------------------------------------------------------------
|
|
28
28
|
|
|
29
|
-
__version__ = '4.5.
|
|
29
|
+
__version__ = '4.5.96'
|
|
30
30
|
|
|
31
31
|
# ----------------------------------------------------------------------------
|
|
32
32
|
|
|
@@ -1863,7 +1863,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
1863
1863
|
self.options['refSet'] = True
|
|
1864
1864
|
action = {
|
|
1865
1865
|
'type': 'setReferrer',
|
|
1866
|
-
'code': self.safe_string(self.options, 'ref', '
|
|
1866
|
+
'code': self.safe_string(self.options, 'ref', 'HLPY'),
|
|
1867
1867
|
}
|
|
1868
1868
|
nonce = self.incrementing_nonce()
|
|
1869
1869
|
signature = self.sign_l1_action(action, nonce)
|
|
@@ -1927,7 +1927,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
1927
1927
|
if approvedBuilderFee:
|
|
1928
1928
|
return True # skip if builder fee is already approved
|
|
1929
1929
|
try:
|
|
1930
|
-
builder = self.safe_string(self.options, 'builder', '
|
|
1930
|
+
builder = self.safe_string(self.options, 'builder', '0x126CcC52EdF7AEB3c48Ab3564F5F3256EA4bc3D8')
|
|
1931
1931
|
# when the user disables the builder fee (builderFee = false) we still approve and attach the builder,
|
|
1932
1932
|
# but with a 0% fee rate, so orders remain attributed to the builder for statistics purposes only and the user is not charged
|
|
1933
1933
|
maxFeeRate = self.safe_string(self.options, 'feeRate', '0.01%')
|
|
@@ -2122,6 +2122,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2122
2122
|
:param float [params.trailingPercent]: *swap only* the percent to trail away from the best mark price, the order is sent as a native trailing stop that executes as a market order
|
|
2123
2123
|
:param float [params.trailingAmount]: *swap only* the quote amount to trail away from the best mark price, the order is sent as a native trailing stop that executes as a market order
|
|
2124
2124
|
:param float [params.trailingTriggerPrice]: *swap only* the mark price at which a trailing order starts tracking, tracking starts immediately if omitted
|
|
2125
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2125
2126
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2126
2127
|
"""
|
|
2127
2128
|
if self.markets is None:
|
|
@@ -2195,12 +2196,15 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2195
2196
|
}
|
|
2196
2197
|
if trailingTriggerPrice is not None:
|
|
2197
2198
|
action['activationPx'] = self.price_to_precision(symbol, trailingTriggerPrice)
|
|
2198
|
-
|
|
2199
|
+
expiresAfter = self.safe_integer(paramsVault, 'expiresAfter')
|
|
2200
|
+
signature = self.sign_l1_action(action, nonce, vaultAddress, expiresAfter)
|
|
2199
2201
|
request = {
|
|
2200
2202
|
'action': action,
|
|
2201
2203
|
'nonce': nonce,
|
|
2202
2204
|
'signature': signature,
|
|
2203
2205
|
}
|
|
2206
|
+
if expiresAfter is not None:
|
|
2207
|
+
request['expiresAfter'] = expiresAfter
|
|
2204
2208
|
if vaultAddress is not None:
|
|
2205
2209
|
request['vaultAddress'] = vaultAddress
|
|
2206
2210
|
return request
|
|
@@ -2215,7 +2219,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2215
2219
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2216
2220
|
:param bool [params.randomize]: whether to randomize the time intervals of the TWAP order slices(default is False, meaning equal intervals)
|
|
2217
2221
|
:param bool [params.reduceOnly]: True or False whether the order is reduce-only
|
|
2218
|
-
:param int [params.expiresAfter]:
|
|
2222
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2219
2223
|
:param str [params.vaultAddress]: the vault address for order
|
|
2220
2224
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2221
2225
|
"""
|
|
@@ -2242,18 +2246,18 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2242
2246
|
'type': 'twapOrder',
|
|
2243
2247
|
'twap': orderObj,
|
|
2244
2248
|
}
|
|
2245
|
-
|
|
2249
|
+
expiresAfter = self.safe_integer(paramsVault, 'expiresAfter')
|
|
2250
|
+
signature = self.sign_l1_action(orderAction, nonce, vaultAddress, expiresAfter)
|
|
2246
2251
|
request = {
|
|
2247
2252
|
'action': orderAction,
|
|
2248
2253
|
'nonce': nonce,
|
|
2249
2254
|
'signature': signature,
|
|
2250
2255
|
# 'vaultAddress': vaultAddress,
|
|
2251
2256
|
}
|
|
2252
|
-
if vaultAddress is not None:
|
|
2253
|
-
request['vaultAddress'] = vaultAddress
|
|
2254
|
-
expiresAfter = self.safe_integer(paramsVault, 'expiresAfter')
|
|
2255
2257
|
if expiresAfter is not None:
|
|
2256
2258
|
request['expiresAfter'] = expiresAfter
|
|
2259
|
+
if vaultAddress is not None:
|
|
2260
|
+
request['vaultAddress'] = vaultAddress
|
|
2257
2261
|
response = await self.privatePostExchange(request)
|
|
2258
2262
|
# {
|
|
2259
2263
|
# "status":"ok",
|
|
@@ -2285,6 +2289,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2285
2289
|
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2286
2290
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2287
2291
|
:param int [params.priorityFee]: the order priority fee rate in units of 1e-8(10000 = 1 bp) applied to the whole request, only when every order is IOC(market orders included) or every order is post-only and not reduce-only, paid in HYPE from the undelegated staking balance
|
|
2292
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2288
2293
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2289
2294
|
"""
|
|
2290
2295
|
if self.markets is None:
|
|
@@ -2508,20 +2513,23 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2508
2513
|
'grouping': groupingValue,
|
|
2509
2514
|
}
|
|
2510
2515
|
if self.safe_bool(self.options, 'approvedBuilderFee', False):
|
|
2511
|
-
builder = '
|
|
2516
|
+
builder = '0x126CcC52EdF7AEB3c48Ab3564F5F3256EA4bc3D8'
|
|
2512
2517
|
wallet = self.safe_string_lower(self.options, 'builder', builder.lower())
|
|
2513
2518
|
# when builderFee is disabled the builder is still attached but with a 0% fee (f = 0), for statistics purposes only
|
|
2514
2519
|
feeInt = self.safe_integer(self.options, 'feeInt', 10)
|
|
2515
2520
|
if not self.safe_bool(self.options, 'builderFee', True):
|
|
2516
2521
|
feeInt = 0
|
|
2517
2522
|
orderAction['builder'] = {'b': wallet, 'f': feeInt}
|
|
2518
|
-
|
|
2523
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2524
|
+
signature = self.sign_l1_action(orderAction, nonce, vaultAddress, expiresAfter)
|
|
2519
2525
|
request = {
|
|
2520
2526
|
'action': orderAction,
|
|
2521
2527
|
'nonce': nonce,
|
|
2522
2528
|
'signature': signature,
|
|
2523
2529
|
# 'vaultAddress': vaultAddress,
|
|
2524
2530
|
}
|
|
2531
|
+
if expiresAfter is not None:
|
|
2532
|
+
request['expiresAfter'] = expiresAfter
|
|
2525
2533
|
if vaultAddress is not None:
|
|
2526
2534
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2527
2535
|
request['vaultAddress'] = vaultAddress
|
|
@@ -2542,6 +2550,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2542
2550
|
:param str [params.subAccountAddress]: sub account user address
|
|
2543
2551
|
:param boolean [params.twap]: whether the order to cancel is a twap order,(default is False)
|
|
2544
2552
|
:param boolean [params.fast]: whether to send the cancel with the fast flag, rejected for trigger orders, prioritized in the mempool in a future network upgrade,(default is False)
|
|
2553
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2545
2554
|
:returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2546
2555
|
"""
|
|
2547
2556
|
if self.safe_bool(params, 'twap', False):
|
|
@@ -2564,6 +2573,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2564
2573
|
:param str [params.vaultAddress]: the vault address
|
|
2565
2574
|
:param str [params.subAccountAddress]: sub account user address
|
|
2566
2575
|
:param boolean [params.fast]: whether to send the cancel with the fast flag, rejected for trigger orders, prioritized in the mempool in a future network upgrade,(default is False)
|
|
2576
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2567
2577
|
:returns dict: an list of `order structures <https://docs.ccxt.com/?id=order-structure>`
|
|
2568
2578
|
"""
|
|
2569
2579
|
self.check_required_credentials()
|
|
@@ -2608,7 +2618,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2608
2618
|
:param str id: order id
|
|
2609
2619
|
:param str symbol: unified symbol of the market the order was made in
|
|
2610
2620
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2611
|
-
:param int [params.expiresAfter]:
|
|
2621
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2612
2622
|
:param str [params.vaultAddress]: the vault address for order
|
|
2613
2623
|
:returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2614
2624
|
"""
|
|
@@ -2626,20 +2636,19 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2626
2636
|
't': self.parse_to_numeric(id),
|
|
2627
2637
|
}
|
|
2628
2638
|
nonce = self.incrementing_nonce()
|
|
2629
|
-
|
|
2639
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2640
|
+
signature = self.sign_l1_action(action, nonce, vaultAddress, expiresAfter)
|
|
2630
2641
|
request = {
|
|
2631
2642
|
'action': action,
|
|
2632
2643
|
'nonce': nonce,
|
|
2633
2644
|
'signature': signature,
|
|
2634
2645
|
# 'vaultAddress': vaultAddress,
|
|
2635
2646
|
}
|
|
2647
|
+
if expiresAfter is not None:
|
|
2648
|
+
request['expiresAfter'] = expiresAfter
|
|
2636
2649
|
if vaultAddress is not None:
|
|
2637
2650
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2638
2651
|
request['vaultAddress'] = vaultAddress
|
|
2639
|
-
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2640
|
-
if expiresAfter is not None:
|
|
2641
|
-
request['expiresAfter'] = expiresAfter
|
|
2642
|
-
params2 = self.omit(params2, 'expiresAfter')
|
|
2643
2652
|
response = await self.privatePostExchange(request)
|
|
2644
2653
|
#
|
|
2645
2654
|
# {
|
|
@@ -2707,9 +2716,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2707
2716
|
vaultAddress = None
|
|
2708
2717
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'cancelOrders', 'vaultAddress', 'subAccountAddress')
|
|
2709
2718
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
2710
|
-
|
|
2719
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2720
|
+
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress, expiresAfter)
|
|
2711
2721
|
request['action'] = cancelAction
|
|
2712
2722
|
request['signature'] = signature
|
|
2723
|
+
if expiresAfter is not None:
|
|
2724
|
+
request['expiresAfter'] = expiresAfter
|
|
2713
2725
|
if vaultAddress is not None:
|
|
2714
2726
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2715
2727
|
request['vaultAddress'] = vaultAddress
|
|
@@ -2727,6 +2739,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2727
2739
|
:param str [params.vaultAddress]: the vault address
|
|
2728
2740
|
:param str [params.subAccountAddress]: sub account user address
|
|
2729
2741
|
:param boolean [params.fast]: whether to send the cancel with the fast flag, rejected for trigger orders, prioritized in the mempool in a future network upgrade,(default is False)
|
|
2742
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2730
2743
|
:returns dict: an list of `order structures <https://docs.ccxt.com/?id=order-structure>`
|
|
2731
2744
|
"""
|
|
2732
2745
|
self.check_required_credentials()
|
|
@@ -2770,9 +2783,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2770
2783
|
cancelAction['f'] = True
|
|
2771
2784
|
vaultAddressOption = self.handle_option_string_and_params_2(params, 'cancelOrdersForSymbols', 'vaultAddress', 'subAccountAddress')[0]
|
|
2772
2785
|
vaultAddress = self.format_vault_address(vaultAddressOption)
|
|
2773
|
-
|
|
2786
|
+
expiresAfter = self.safe_integer(params, 'expiresAfter')
|
|
2787
|
+
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress, expiresAfter)
|
|
2774
2788
|
request['action'] = cancelAction
|
|
2775
2789
|
request['signature'] = signature
|
|
2790
|
+
if expiresAfter is not None:
|
|
2791
|
+
request['expiresAfter'] = expiresAfter
|
|
2776
2792
|
if vaultAddress is not None:
|
|
2777
2793
|
request['vaultAddress'] = vaultAddress
|
|
2778
2794
|
response = await self.privatePostExchange(request)
|
|
@@ -2798,6 +2814,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2798
2814
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2799
2815
|
:param str [params.vaultAddress]: the vault address
|
|
2800
2816
|
:param str [params.subAccountAddress]: sub account user address
|
|
2817
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2801
2818
|
:returns dict: the api result
|
|
2802
2819
|
"""
|
|
2803
2820
|
self.check_required_credentials()
|
|
@@ -2817,9 +2834,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2817
2834
|
vaultAddress = None
|
|
2818
2835
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'cancelAllOrdersAfter', 'vaultAddress', 'subAccountAddress')
|
|
2819
2836
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
2820
|
-
|
|
2837
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2838
|
+
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress, expiresAfter)
|
|
2821
2839
|
request['action'] = cancelAction
|
|
2822
2840
|
request['signature'] = signature
|
|
2841
|
+
if expiresAfter is not None:
|
|
2842
|
+
request['expiresAfter'] = expiresAfter
|
|
2823
2843
|
if vaultAddress is not None:
|
|
2824
2844
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2825
2845
|
request['vaultAddress'] = vaultAddress
|
|
@@ -2936,13 +2956,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2936
2956
|
vaultAddress = None
|
|
2937
2957
|
vaultAddress, params2 = self.handle_option_string_and_params(params2, 'editOrder', 'vaultAddress')
|
|
2938
2958
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
2939
|
-
|
|
2959
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2960
|
+
signature = self.sign_l1_action(modifyAction, nonce, vaultAddress, expiresAfter)
|
|
2940
2961
|
request = {
|
|
2941
2962
|
'action': modifyAction,
|
|
2942
2963
|
'nonce': nonce,
|
|
2943
2964
|
'signature': signature,
|
|
2944
2965
|
# 'vaultAddress': vaultAddress,
|
|
2945
2966
|
}
|
|
2967
|
+
if expiresAfter is not None:
|
|
2968
|
+
request['expiresAfter'] = expiresAfter
|
|
2946
2969
|
if vaultAddress is not None:
|
|
2947
2970
|
request['vaultAddress'] = vaultAddress
|
|
2948
2971
|
return request
|
|
@@ -2967,6 +2990,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2967
2990
|
:param str [params.clientOrderId]: client order id,(optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
2968
2991
|
:param str [params.vaultAddress]: the vault address for order
|
|
2969
2992
|
:param str [params.subAccountAddress]: sub account user address
|
|
2993
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2970
2994
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2971
2995
|
"""
|
|
2972
2996
|
if self.markets is None:
|
|
@@ -2986,6 +3010,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2986
3010
|
|
|
2987
3011
|
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2988
3012
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
3013
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2989
3014
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2990
3015
|
"""
|
|
2991
3016
|
if self.markets is None:
|
|
@@ -4029,6 +4054,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4029
4054
|
:param str [params.leverage]: the rate of leverage, is required if setting trade mode(symbol)
|
|
4030
4055
|
:param str [params.vaultAddress]: the vault address
|
|
4031
4056
|
:param str [params.subAccountAddress]: sub account user address
|
|
4057
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4032
4058
|
:returns dict: response from the exchange
|
|
4033
4059
|
"""
|
|
4034
4060
|
if symbol is None:
|
|
@@ -4052,13 +4078,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4052
4078
|
vaultAddress = None
|
|
4053
4079
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'setMarginMode', 'vaultAddress', 'subAccountAddress')
|
|
4054
4080
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
4055
|
-
|
|
4081
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
4082
|
+
signature = self.sign_l1_action(updateAction, nonce, vaultAddress, expiresAfter)
|
|
4056
4083
|
request = {
|
|
4057
4084
|
'action': updateAction,
|
|
4058
4085
|
'nonce': nonce,
|
|
4059
4086
|
'signature': signature,
|
|
4060
4087
|
# 'vaultAddress': vaultAddress,
|
|
4061
4088
|
}
|
|
4089
|
+
if expiresAfter is not None:
|
|
4090
|
+
request['expiresAfter'] = expiresAfter
|
|
4062
4091
|
if vaultAddress is not None:
|
|
4063
4092
|
request['vaultAddress'] = vaultAddress
|
|
4064
4093
|
response = await self.privatePostExchange(request)
|
|
@@ -4237,6 +4266,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4237
4266
|
:param str symbol: unified market symbol
|
|
4238
4267
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
4239
4268
|
:param str [params.marginMode]: margin mode must be either [isolated, cross], default is cross
|
|
4269
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4240
4270
|
:returns dict: response from the exchange
|
|
4241
4271
|
"""
|
|
4242
4272
|
if symbol is None:
|
|
@@ -4258,13 +4288,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4258
4288
|
vaultAddress = None
|
|
4259
4289
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'setLeverage', 'vaultAddress', 'subAccountAddress')
|
|
4260
4290
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
4261
|
-
|
|
4291
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
4292
|
+
signature = self.sign_l1_action(updateAction, nonce, vaultAddress, expiresAfter)
|
|
4262
4293
|
request = {
|
|
4263
4294
|
'action': updateAction,
|
|
4264
4295
|
'nonce': nonce,
|
|
4265
4296
|
'signature': signature,
|
|
4266
4297
|
# 'vaultAddress': vaultAddress,
|
|
4267
4298
|
}
|
|
4299
|
+
if expiresAfter is not None:
|
|
4300
|
+
request['expiresAfter'] = expiresAfter
|
|
4268
4301
|
if vaultAddress is not None:
|
|
4269
4302
|
params2 = self.omit(params2, 'vaultAddress')
|
|
4270
4303
|
request['vaultAddress'] = vaultAddress
|
|
@@ -4290,6 +4323,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4290
4323
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
4291
4324
|
:param str [params.vaultAddress]: the vault address
|
|
4292
4325
|
:param str [params.subAccountAddress]: sub account user address
|
|
4326
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4293
4327
|
:returns dict: a `margin structure <https://docs.ccxt.com/?id=margin-structure>`
|
|
4294
4328
|
"""
|
|
4295
4329
|
return await self.modify_margin_helper(symbol, amount, 'add', params)
|
|
@@ -4305,6 +4339,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4305
4339
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
4306
4340
|
:param str [params.vaultAddress]: the vault address
|
|
4307
4341
|
:param str [params.subAccountAddress]: sub account user address
|
|
4342
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4308
4343
|
:returns dict: a `margin structure <https://docs.ccxt.com/?id=margin-structure>`
|
|
4309
4344
|
"""
|
|
4310
4345
|
return await self.modify_margin_helper(symbol, amount, 'reduce', params)
|
|
@@ -4325,13 +4360,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4325
4360
|
}
|
|
4326
4361
|
vaultAddressOption = self.handle_option_string_and_params_2(params, 'modifyMargin', 'vaultAddress', 'subAccountAddress')[0]
|
|
4327
4362
|
vaultAddress = self.format_vault_address(vaultAddressOption)
|
|
4328
|
-
|
|
4363
|
+
expiresAfter = self.safe_integer(params, 'expiresAfter')
|
|
4364
|
+
signature = self.sign_l1_action(updateAction, nonce, vaultAddress, expiresAfter)
|
|
4329
4365
|
request = {
|
|
4330
4366
|
'action': updateAction,
|
|
4331
4367
|
'nonce': nonce,
|
|
4332
4368
|
'signature': signature,
|
|
4333
4369
|
# 'vaultAddress': vaultAddress,
|
|
4334
4370
|
}
|
|
4371
|
+
if expiresAfter is not None:
|
|
4372
|
+
request['expiresAfter'] = expiresAfter
|
|
4335
4373
|
if vaultAddress is not None:
|
|
4336
4374
|
request['vaultAddress'] = vaultAddress
|
|
4337
4375
|
response = await self.privatePostExchange(request)
|
|
@@ -6043,9 +6081,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
6043
6081
|
'side': side,
|
|
6044
6082
|
'amount': amount,
|
|
6045
6083
|
'price': price,
|
|
6046
|
-
'params': params2,
|
|
6084
|
+
'params': self.omit(params2, 'expiresAfter'),
|
|
6047
6085
|
}
|
|
6048
6086
|
globalParams = {}
|
|
6087
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
6088
|
+
if expiresAfter is not None:
|
|
6089
|
+
globalParams['expiresAfter'] = expiresAfter
|
|
6049
6090
|
if vaultAddress is not None:
|
|
6050
6091
|
globalParams['vaultAddress'] = vaultAddress
|
|
6051
6092
|
if id is not None:
|
|
@@ -1862,7 +1862,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
1862
1862
|
self.options['refSet'] = True
|
|
1863
1863
|
action = {
|
|
1864
1864
|
'type': 'setReferrer',
|
|
1865
|
-
'code': self.safe_string(self.options, 'ref', '
|
|
1865
|
+
'code': self.safe_string(self.options, 'ref', 'HLPY'),
|
|
1866
1866
|
}
|
|
1867
1867
|
nonce = self.incrementing_nonce()
|
|
1868
1868
|
signature = self.sign_l1_action(action, nonce)
|
|
@@ -1926,7 +1926,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
1926
1926
|
if approvedBuilderFee:
|
|
1927
1927
|
return True # skip if builder fee is already approved
|
|
1928
1928
|
try:
|
|
1929
|
-
builder = self.safe_string(self.options, 'builder', '
|
|
1929
|
+
builder = self.safe_string(self.options, 'builder', '0x126CcC52EdF7AEB3c48Ab3564F5F3256EA4bc3D8')
|
|
1930
1930
|
# when the user disables the builder fee (builderFee = false) we still approve and attach the builder,
|
|
1931
1931
|
# but with a 0% fee rate, so orders remain attributed to the builder for statistics purposes only and the user is not charged
|
|
1932
1932
|
maxFeeRate = self.safe_string(self.options, 'feeRate', '0.01%')
|
|
@@ -2121,6 +2121,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2121
2121
|
:param float [params.trailingPercent]: *swap only* the percent to trail away from the best mark price, the order is sent as a native trailing stop that executes as a market order
|
|
2122
2122
|
:param float [params.trailingAmount]: *swap only* the quote amount to trail away from the best mark price, the order is sent as a native trailing stop that executes as a market order
|
|
2123
2123
|
:param float [params.trailingTriggerPrice]: *swap only* the mark price at which a trailing order starts tracking, tracking starts immediately if omitted
|
|
2124
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2124
2125
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2125
2126
|
"""
|
|
2126
2127
|
if self.markets is None:
|
|
@@ -2194,12 +2195,15 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2194
2195
|
}
|
|
2195
2196
|
if trailingTriggerPrice is not None:
|
|
2196
2197
|
action['activationPx'] = self.price_to_precision(symbol, trailingTriggerPrice)
|
|
2197
|
-
|
|
2198
|
+
expiresAfter = self.safe_integer(paramsVault, 'expiresAfter')
|
|
2199
|
+
signature = self.sign_l1_action(action, nonce, vaultAddress, expiresAfter)
|
|
2198
2200
|
request = {
|
|
2199
2201
|
'action': action,
|
|
2200
2202
|
'nonce': nonce,
|
|
2201
2203
|
'signature': signature,
|
|
2202
2204
|
}
|
|
2205
|
+
if expiresAfter is not None:
|
|
2206
|
+
request['expiresAfter'] = expiresAfter
|
|
2203
2207
|
if vaultAddress is not None:
|
|
2204
2208
|
request['vaultAddress'] = vaultAddress
|
|
2205
2209
|
return request
|
|
@@ -2214,7 +2218,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2214
2218
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2215
2219
|
:param bool [params.randomize]: whether to randomize the time intervals of the TWAP order slices(default is False, meaning equal intervals)
|
|
2216
2220
|
:param bool [params.reduceOnly]: True or False whether the order is reduce-only
|
|
2217
|
-
:param int [params.expiresAfter]:
|
|
2221
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2218
2222
|
:param str [params.vaultAddress]: the vault address for order
|
|
2219
2223
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2220
2224
|
"""
|
|
@@ -2241,18 +2245,18 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2241
2245
|
'type': 'twapOrder',
|
|
2242
2246
|
'twap': orderObj,
|
|
2243
2247
|
}
|
|
2244
|
-
|
|
2248
|
+
expiresAfter = self.safe_integer(paramsVault, 'expiresAfter')
|
|
2249
|
+
signature = self.sign_l1_action(orderAction, nonce, vaultAddress, expiresAfter)
|
|
2245
2250
|
request = {
|
|
2246
2251
|
'action': orderAction,
|
|
2247
2252
|
'nonce': nonce,
|
|
2248
2253
|
'signature': signature,
|
|
2249
2254
|
# 'vaultAddress': vaultAddress,
|
|
2250
2255
|
}
|
|
2251
|
-
if vaultAddress is not None:
|
|
2252
|
-
request['vaultAddress'] = vaultAddress
|
|
2253
|
-
expiresAfter = self.safe_integer(paramsVault, 'expiresAfter')
|
|
2254
2256
|
if expiresAfter is not None:
|
|
2255
2257
|
request['expiresAfter'] = expiresAfter
|
|
2258
|
+
if vaultAddress is not None:
|
|
2259
|
+
request['vaultAddress'] = vaultAddress
|
|
2256
2260
|
response = self.privatePostExchange(request)
|
|
2257
2261
|
# {
|
|
2258
2262
|
# "status":"ok",
|
|
@@ -2284,6 +2288,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2284
2288
|
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2285
2289
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2286
2290
|
:param int [params.priorityFee]: the order priority fee rate in units of 1e-8(10000 = 1 bp) applied to the whole request, only when every order is IOC(market orders included) or every order is post-only and not reduce-only, paid in HYPE from the undelegated staking balance
|
|
2291
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2287
2292
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2288
2293
|
"""
|
|
2289
2294
|
if self.markets is None:
|
|
@@ -2507,20 +2512,23 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2507
2512
|
'grouping': groupingValue,
|
|
2508
2513
|
}
|
|
2509
2514
|
if self.safe_bool(self.options, 'approvedBuilderFee', False):
|
|
2510
|
-
builder = '
|
|
2515
|
+
builder = '0x126CcC52EdF7AEB3c48Ab3564F5F3256EA4bc3D8'
|
|
2511
2516
|
wallet = self.safe_string_lower(self.options, 'builder', builder.lower())
|
|
2512
2517
|
# when builderFee is disabled the builder is still attached but with a 0% fee (f = 0), for statistics purposes only
|
|
2513
2518
|
feeInt = self.safe_integer(self.options, 'feeInt', 10)
|
|
2514
2519
|
if not self.safe_bool(self.options, 'builderFee', True):
|
|
2515
2520
|
feeInt = 0
|
|
2516
2521
|
orderAction['builder'] = {'b': wallet, 'f': feeInt}
|
|
2517
|
-
|
|
2522
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2523
|
+
signature = self.sign_l1_action(orderAction, nonce, vaultAddress, expiresAfter)
|
|
2518
2524
|
request = {
|
|
2519
2525
|
'action': orderAction,
|
|
2520
2526
|
'nonce': nonce,
|
|
2521
2527
|
'signature': signature,
|
|
2522
2528
|
# 'vaultAddress': vaultAddress,
|
|
2523
2529
|
}
|
|
2530
|
+
if expiresAfter is not None:
|
|
2531
|
+
request['expiresAfter'] = expiresAfter
|
|
2524
2532
|
if vaultAddress is not None:
|
|
2525
2533
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2526
2534
|
request['vaultAddress'] = vaultAddress
|
|
@@ -2541,6 +2549,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2541
2549
|
:param str [params.subAccountAddress]: sub account user address
|
|
2542
2550
|
:param boolean [params.twap]: whether the order to cancel is a twap order,(default is False)
|
|
2543
2551
|
:param boolean [params.fast]: whether to send the cancel with the fast flag, rejected for trigger orders, prioritized in the mempool in a future network upgrade,(default is False)
|
|
2552
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2544
2553
|
:returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2545
2554
|
"""
|
|
2546
2555
|
if self.safe_bool(params, 'twap', False):
|
|
@@ -2563,6 +2572,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2563
2572
|
:param str [params.vaultAddress]: the vault address
|
|
2564
2573
|
:param str [params.subAccountAddress]: sub account user address
|
|
2565
2574
|
:param boolean [params.fast]: whether to send the cancel with the fast flag, rejected for trigger orders, prioritized in the mempool in a future network upgrade,(default is False)
|
|
2575
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2566
2576
|
:returns dict: an list of `order structures <https://docs.ccxt.com/?id=order-structure>`
|
|
2567
2577
|
"""
|
|
2568
2578
|
self.check_required_credentials()
|
|
@@ -2607,7 +2617,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2607
2617
|
:param str id: order id
|
|
2608
2618
|
:param str symbol: unified symbol of the market the order was made in
|
|
2609
2619
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2610
|
-
:param int [params.expiresAfter]:
|
|
2620
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2611
2621
|
:param str [params.vaultAddress]: the vault address for order
|
|
2612
2622
|
:returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2613
2623
|
"""
|
|
@@ -2625,20 +2635,19 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2625
2635
|
't': self.parse_to_numeric(id),
|
|
2626
2636
|
}
|
|
2627
2637
|
nonce = self.incrementing_nonce()
|
|
2628
|
-
|
|
2638
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2639
|
+
signature = self.sign_l1_action(action, nonce, vaultAddress, expiresAfter)
|
|
2629
2640
|
request = {
|
|
2630
2641
|
'action': action,
|
|
2631
2642
|
'nonce': nonce,
|
|
2632
2643
|
'signature': signature,
|
|
2633
2644
|
# 'vaultAddress': vaultAddress,
|
|
2634
2645
|
}
|
|
2646
|
+
if expiresAfter is not None:
|
|
2647
|
+
request['expiresAfter'] = expiresAfter
|
|
2635
2648
|
if vaultAddress is not None:
|
|
2636
2649
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2637
2650
|
request['vaultAddress'] = vaultAddress
|
|
2638
|
-
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2639
|
-
if expiresAfter is not None:
|
|
2640
|
-
request['expiresAfter'] = expiresAfter
|
|
2641
|
-
params2 = self.omit(params2, 'expiresAfter')
|
|
2642
2651
|
response = self.privatePostExchange(request)
|
|
2643
2652
|
#
|
|
2644
2653
|
# {
|
|
@@ -2706,9 +2715,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2706
2715
|
vaultAddress = None
|
|
2707
2716
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'cancelOrders', 'vaultAddress', 'subAccountAddress')
|
|
2708
2717
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
2709
|
-
|
|
2718
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2719
|
+
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress, expiresAfter)
|
|
2710
2720
|
request['action'] = cancelAction
|
|
2711
2721
|
request['signature'] = signature
|
|
2722
|
+
if expiresAfter is not None:
|
|
2723
|
+
request['expiresAfter'] = expiresAfter
|
|
2712
2724
|
if vaultAddress is not None:
|
|
2713
2725
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2714
2726
|
request['vaultAddress'] = vaultAddress
|
|
@@ -2726,6 +2738,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2726
2738
|
:param str [params.vaultAddress]: the vault address
|
|
2727
2739
|
:param str [params.subAccountAddress]: sub account user address
|
|
2728
2740
|
:param boolean [params.fast]: whether to send the cancel with the fast flag, rejected for trigger orders, prioritized in the mempool in a future network upgrade,(default is False)
|
|
2741
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2729
2742
|
:returns dict: an list of `order structures <https://docs.ccxt.com/?id=order-structure>`
|
|
2730
2743
|
"""
|
|
2731
2744
|
self.check_required_credentials()
|
|
@@ -2769,9 +2782,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2769
2782
|
cancelAction['f'] = True
|
|
2770
2783
|
vaultAddressOption = self.handle_option_string_and_params_2(params, 'cancelOrdersForSymbols', 'vaultAddress', 'subAccountAddress')[0]
|
|
2771
2784
|
vaultAddress = self.format_vault_address(vaultAddressOption)
|
|
2772
|
-
|
|
2785
|
+
expiresAfter = self.safe_integer(params, 'expiresAfter')
|
|
2786
|
+
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress, expiresAfter)
|
|
2773
2787
|
request['action'] = cancelAction
|
|
2774
2788
|
request['signature'] = signature
|
|
2789
|
+
if expiresAfter is not None:
|
|
2790
|
+
request['expiresAfter'] = expiresAfter
|
|
2775
2791
|
if vaultAddress is not None:
|
|
2776
2792
|
request['vaultAddress'] = vaultAddress
|
|
2777
2793
|
response = self.privatePostExchange(request)
|
|
@@ -2797,6 +2813,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2797
2813
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
2798
2814
|
:param str [params.vaultAddress]: the vault address
|
|
2799
2815
|
:param str [params.subAccountAddress]: sub account user address
|
|
2816
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2800
2817
|
:returns dict: the api result
|
|
2801
2818
|
"""
|
|
2802
2819
|
self.check_required_credentials()
|
|
@@ -2816,9 +2833,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2816
2833
|
vaultAddress = None
|
|
2817
2834
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'cancelAllOrdersAfter', 'vaultAddress', 'subAccountAddress')
|
|
2818
2835
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
2819
|
-
|
|
2836
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2837
|
+
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress, expiresAfter)
|
|
2820
2838
|
request['action'] = cancelAction
|
|
2821
2839
|
request['signature'] = signature
|
|
2840
|
+
if expiresAfter is not None:
|
|
2841
|
+
request['expiresAfter'] = expiresAfter
|
|
2822
2842
|
if vaultAddress is not None:
|
|
2823
2843
|
params2 = self.omit(params2, 'vaultAddress')
|
|
2824
2844
|
request['vaultAddress'] = vaultAddress
|
|
@@ -2935,13 +2955,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2935
2955
|
vaultAddress = None
|
|
2936
2956
|
vaultAddress, params2 = self.handle_option_string_and_params(params2, 'editOrder', 'vaultAddress')
|
|
2937
2957
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
2938
|
-
|
|
2958
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
2959
|
+
signature = self.sign_l1_action(modifyAction, nonce, vaultAddress, expiresAfter)
|
|
2939
2960
|
request = {
|
|
2940
2961
|
'action': modifyAction,
|
|
2941
2962
|
'nonce': nonce,
|
|
2942
2963
|
'signature': signature,
|
|
2943
2964
|
# 'vaultAddress': vaultAddress,
|
|
2944
2965
|
}
|
|
2966
|
+
if expiresAfter is not None:
|
|
2967
|
+
request['expiresAfter'] = expiresAfter
|
|
2945
2968
|
if vaultAddress is not None:
|
|
2946
2969
|
request['vaultAddress'] = vaultAddress
|
|
2947
2970
|
return request
|
|
@@ -2966,6 +2989,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2966
2989
|
:param str [params.clientOrderId]: client order id,(optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
2967
2990
|
:param str [params.vaultAddress]: the vault address for order
|
|
2968
2991
|
:param str [params.subAccountAddress]: sub account user address
|
|
2992
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2969
2993
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2970
2994
|
"""
|
|
2971
2995
|
if self.markets is None:
|
|
@@ -2985,6 +3009,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
2985
3009
|
|
|
2986
3010
|
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2987
3011
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
3012
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
2988
3013
|
:returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>`
|
|
2989
3014
|
"""
|
|
2990
3015
|
if self.markets is None:
|
|
@@ -4028,6 +4053,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4028
4053
|
:param str [params.leverage]: the rate of leverage, is required if setting trade mode(symbol)
|
|
4029
4054
|
:param str [params.vaultAddress]: the vault address
|
|
4030
4055
|
:param str [params.subAccountAddress]: sub account user address
|
|
4056
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4031
4057
|
:returns dict: response from the exchange
|
|
4032
4058
|
"""
|
|
4033
4059
|
if symbol is None:
|
|
@@ -4051,13 +4077,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4051
4077
|
vaultAddress = None
|
|
4052
4078
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'setMarginMode', 'vaultAddress', 'subAccountAddress')
|
|
4053
4079
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
4054
|
-
|
|
4080
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
4081
|
+
signature = self.sign_l1_action(updateAction, nonce, vaultAddress, expiresAfter)
|
|
4055
4082
|
request = {
|
|
4056
4083
|
'action': updateAction,
|
|
4057
4084
|
'nonce': nonce,
|
|
4058
4085
|
'signature': signature,
|
|
4059
4086
|
# 'vaultAddress': vaultAddress,
|
|
4060
4087
|
}
|
|
4088
|
+
if expiresAfter is not None:
|
|
4089
|
+
request['expiresAfter'] = expiresAfter
|
|
4061
4090
|
if vaultAddress is not None:
|
|
4062
4091
|
request['vaultAddress'] = vaultAddress
|
|
4063
4092
|
response = self.privatePostExchange(request)
|
|
@@ -4236,6 +4265,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4236
4265
|
:param str symbol: unified market symbol
|
|
4237
4266
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
4238
4267
|
:param str [params.marginMode]: margin mode must be either [isolated, cross], default is cross
|
|
4268
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4239
4269
|
:returns dict: response from the exchange
|
|
4240
4270
|
"""
|
|
4241
4271
|
if symbol is None:
|
|
@@ -4257,13 +4287,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4257
4287
|
vaultAddress = None
|
|
4258
4288
|
vaultAddress, params2 = self.handle_option_string_and_params_2(params2, 'setLeverage', 'vaultAddress', 'subAccountAddress')
|
|
4259
4289
|
vaultAddress = self.format_vault_address(vaultAddress)
|
|
4260
|
-
|
|
4290
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
4291
|
+
signature = self.sign_l1_action(updateAction, nonce, vaultAddress, expiresAfter)
|
|
4261
4292
|
request = {
|
|
4262
4293
|
'action': updateAction,
|
|
4263
4294
|
'nonce': nonce,
|
|
4264
4295
|
'signature': signature,
|
|
4265
4296
|
# 'vaultAddress': vaultAddress,
|
|
4266
4297
|
}
|
|
4298
|
+
if expiresAfter is not None:
|
|
4299
|
+
request['expiresAfter'] = expiresAfter
|
|
4267
4300
|
if vaultAddress is not None:
|
|
4268
4301
|
params2 = self.omit(params2, 'vaultAddress')
|
|
4269
4302
|
request['vaultAddress'] = vaultAddress
|
|
@@ -4289,6 +4322,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4289
4322
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
4290
4323
|
:param str [params.vaultAddress]: the vault address
|
|
4291
4324
|
:param str [params.subAccountAddress]: sub account user address
|
|
4325
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4292
4326
|
:returns dict: a `margin structure <https://docs.ccxt.com/?id=margin-structure>`
|
|
4293
4327
|
"""
|
|
4294
4328
|
return self.modify_margin_helper(symbol, amount, 'add', params)
|
|
@@ -4304,6 +4338,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4304
4338
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
4305
4339
|
:param str [params.vaultAddress]: the vault address
|
|
4306
4340
|
:param str [params.subAccountAddress]: sub account user address
|
|
4341
|
+
:param int [params.expiresAfter]: timestamp in ms after which the request is rejected by the exchange
|
|
4307
4342
|
:returns dict: a `margin structure <https://docs.ccxt.com/?id=margin-structure>`
|
|
4308
4343
|
"""
|
|
4309
4344
|
return self.modify_margin_helper(symbol, amount, 'reduce', params)
|
|
@@ -4324,13 +4359,16 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
4324
4359
|
}
|
|
4325
4360
|
vaultAddressOption = self.handle_option_string_and_params_2(params, 'modifyMargin', 'vaultAddress', 'subAccountAddress')[0]
|
|
4326
4361
|
vaultAddress = self.format_vault_address(vaultAddressOption)
|
|
4327
|
-
|
|
4362
|
+
expiresAfter = self.safe_integer(params, 'expiresAfter')
|
|
4363
|
+
signature = self.sign_l1_action(updateAction, nonce, vaultAddress, expiresAfter)
|
|
4328
4364
|
request = {
|
|
4329
4365
|
'action': updateAction,
|
|
4330
4366
|
'nonce': nonce,
|
|
4331
4367
|
'signature': signature,
|
|
4332
4368
|
# 'vaultAddress': vaultAddress,
|
|
4333
4369
|
}
|
|
4370
|
+
if expiresAfter is not None:
|
|
4371
|
+
request['expiresAfter'] = expiresAfter
|
|
4334
4372
|
if vaultAddress is not None:
|
|
4335
4373
|
request['vaultAddress'] = vaultAddress
|
|
4336
4374
|
response = self.privatePostExchange(request)
|
|
@@ -6042,9 +6080,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
|
6042
6080
|
'side': side,
|
|
6043
6081
|
'amount': amount,
|
|
6044
6082
|
'price': price,
|
|
6045
|
-
'params': params2,
|
|
6083
|
+
'params': self.omit(params2, 'expiresAfter'),
|
|
6046
6084
|
}
|
|
6047
6085
|
globalParams = {}
|
|
6086
|
+
expiresAfter = self.safe_integer(params2, 'expiresAfter')
|
|
6087
|
+
if expiresAfter is not None:
|
|
6088
|
+
globalParams['expiresAfter'] = expiresAfter
|
|
6048
6089
|
if vaultAddress is not None:
|
|
6049
6090
|
globalParams['vaultAddress'] = vaultAddress
|
|
6050
6091
|
if id is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/throttler.py
RENAMED
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/__init__.py
RENAMED
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/cache.py
RENAMED
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/client.py
RENAMED
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/functions.py
RENAMED
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/future.py
RENAMED
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/async_support/base/ws/order_book.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/README.md
RENAMED
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/ethabi/abi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperliquid-0.4.68 → hyperliquid-0.4.70}/src/hyperliquid/ccxt/static_dependencies/keccak/keccak.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|