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

Method handle_builder_fee_approval

python/ccxt/async_support/lighter.py:596–611  ·  view source on GitHub ↗
(self, accountIndex: float, apiKeyIndex: float)

Source from the content-addressed store, hash-verified

594 return self.json(decTxInfo)
595
596 async def handle_builder_fee_approval(self, accountIndex: float, apiKeyIndex: float):
597 buildFee = self.safe_bool(self.options, 'builderFee', True)
598 if not buildFee:
599 return False
600 approvedBuilderFee = self.safe_bool(self.options, 'approvedBuilderFee', False)
601 if approvedBuilderFee:
602 return True
603 try:
604 builder = self.safe_integer(self.options, 'integratorAccountIndex', 718718)
605 takerFeeRate = self.safe_integer(self.options, 'integratorTakerFee', 1000)
606 makerFeeRate = self.safe_integer(self.options, 'integratorMakerFee', 1000)
607 await self.approve_builder_fee(builder, takerFeeRate, makerFeeRate, accountIndex, apiKeyIndex)
608 self.options['approvedBuilderFee'] = True
609 except Exception as e:
610 self.options['builderFee'] = False
611 return True
612
613 async def approve_builder_fee(self, builder: float, takerFeeRate: float, makerFeeRate: float, accountIndex: float, apiKeyIndex: float, params: object = {}):
614 strAccountIndex = self.number_to_string(accountIndex)

Callers 3

load_accountMethod · 0.95
change_api_keyMethod · 0.95

Calls 3

approve_builder_feeMethod · 0.95
safe_boolMethod · 0.80
safe_integerMethod · 0.80

Tested by

no test coverage detected