Miscellaneous

Miscellaneous constants used in the Frontend SDK

UI

  • UNDER_MAINTENANCE: A boolean flag indicating whether the application is currently under maintenance. Default value is false.

Blockchain Constants

  • AddressZero: Represents the zero address (0x0000000000000000000000000000000000000000).

  • MAX_UINT256: The largest possible value for a 256-bit unsigned integer in Ethereum smart contracts. Default value is BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").

Transaction Dismissal

  • DEFAULT_TXN_DISMISS_MS: Default time in milliseconds before automatically dismissing a transaction notification popup. Default value is 25000.

  • L2_TXN_DISMISS_MS: Specific dismissal time for Layer 2 transaction popups. Default value is 5000.

Global Constants

  • DEFAULT_PRECISION: Default number of decimal places used for displaying numerical values, unless otherwise specified. Default value is 2.

  • GLOBAL_MULTI_ACCOUNTABLE_PAUSED: A boolean flag indicating whether MultiAccount functionality is paused. Default value is false.

  • MARKET_PRICE_COEFFICIENT: A numerical coefficient used to calculate the slippage, in case autoSlippage isn't available. Default value is 1.07.

Order Deadlines

  • MARKET_ORDER_DEADLINE: The maximum duration for a market order to remain valid before being considered expired. Default value is 300 seconds (5 minutes).

  • LIMIT_ORDER_DEADLINE: The maximum duration for a limit order to remain valid. Default value is 311040120 seconds (10 years).

Leverage Values

  • MAX_LEVERAGE_VALUE: The maximum leverage that can be applied in trading. Default value is 40.

  • MIN_LEVERAGE_VALUE: The minimum leverage. Default value is 1.

Slippage

  • DEFAULT_SLIPPAGE: Default slippage value used in transactions. Default value is 10.

Position Handling

  • TIME_TO_WAIT_POSITION_RECEIVE: Time to wait for a position to be received. Default value is 100 milliseconds.

  • MAX_PENDINGS_POSITIONS_NUMBER: The maximum number of pending positions that can exist simultaneously, used to limit open orders or transactions. Default value is 10.

History Display

  • BALANCE_HISTORY_ITEMS_NUMBER: Specifies the number of items to display in balance history or transaction history views. Default value is 10.

Contract Hashes

  • CLOSE_QUOTE_HASH_CONTRACT: The hash of the contract used to close quotes. Default value is "0x501e891f".

  • CANCEL_CLOSE_QUOTE_HASH_CONTRACT: The hash of the contract used to cancel the closing of quotes. Default value is "0xa63b9363".

Last updated