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

Method fetch_nonce

python/ccxt/lighter.py:812–826  ·  view source on GitHub ↗
(self, accountIndex, apiKeyIndex, params={})

Source from the content-addressed store, hash-verified

810 return orders
811
812 def fetch_nonce(self, accountIndex, apiKeyIndex, params={}):
813 if (accountIndex is None) or (apiKeyIndex is None):
814 raise ArgumentsRequired(self.id + ' fetchNonce() requires accountIndex and apiKeyIndex.')
815 if 'nonce' in params:
816 return self.safe_integer(params, 'nonce')
817 nonceInOptions = self.safe_integer(self.options, 'nonce')
818 if nonceInOptions is not None:
819 return nonceInOptions
820 # avoid skipNonce for l1 operations
821 skipNonce = True
822 skipNonce, params = self.handle_option_and_params(params, 'fetchNonce', 'skipNonce', True)
823 if skipNonce:
824 return self.milliseconds()
825 response = self.publicGetNextNonce({'account_index': accountIndex, 'api_key_index': apiKeyIndex})
826 return self.safe_integer(response, 'nonce')
827
828 def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
829 """

Callers 12

create_sub_accountMethod · 0.95
approve_builder_feeMethod · 0.95
change_api_keyMethod · 0.95
create_orderMethod · 0.95
edit_orderMethod · 0.95
transferMethod · 0.95
withdrawMethod · 0.95
cancel_orderMethod · 0.95
cancel_all_ordersMethod · 0.95
set_marginMethod · 0.95

Calls 5

ArgumentsRequiredClass · 0.90
safe_integerMethod · 0.80
publicGetNextNonceMethod · 0.65
millisecondsMethod · 0.45

Tested by

no test coverage detected