Firetron's QuoteDecimals
stableDescription
Returns the number of decimal places supported by the QuoteCurrency.
Custom Command Dependencies:
Firetron’s CountDecimals
HaasScript
-- ============================================================================
-- Firetron's QuoteDecimals
--
-- Returns the number of decimal places supported by the QuoteCurrency.
--
-- Custom Command Dependencies:
-- Firetron's CountDecimals
--
-- Discord: @FiretronP75
-- ============================================================================
-- ========================================================
-- Definition
-- ========================================================
DefineCommand('QuoteDecimals', 'Returns the number of decimal places supported by the QuoteCurrency.')
-- ========================================================
-- Parameters
-- ========================================================
local market = DefineParameter(StringType, 'market', 'The market.', false, PriceMarket(), 'InputAccountMarket, InputMarket, PriceMarket')
-- ========================================================
-- Output
-- ========================================================
local truncated = ParseTradePrice(market, 1111.111111111111)
local output = CC_CountDecimals(truncated)
DefineOutput(NumberType, output, 'the number of decimal places supported by the QuoteCurrency')
1 Comment
Sign in to leave a comment.
Thank you for your help on this pshai