Trade Market Information

AmountCurrency

Gets the amount label. For reflection, in case the market is Bitstamp BTC/USDit will return 'BTC'. When we are on BitMEX XBT/USD (XBTUSD), it will return 'contract(s)'.

Syntax: AmountCurrency([ market ])

Returns the amount label as string.

Return type: String

AmountDecimals

Returns a number of how many decimals is allowed for order amounts.

Syntax: AmountDecimals([ market ], [ amount ])

Returns the allowed decimal count.

Return type: Number

AmountLabel

Gets the amount label. For reflection, in case the market is Bitstamp BTC/USDit will return 'BTC'. When we are on BitMEX XBT/USD (XBTUSD), it will return 'contract(s)'.

Syntax: AmountLabel([ market ])

Returns the amount label as string.

Return type: String

AmountStep

Returns the minimum allowed trade amount step for market.

Syntax: AmountStep([ market ])

Returns the trade amount step size.

Return type: Number

BaseCurrency

Returns the base currency of the market. For reflection, in case we are on Bitstamp BTC/USD it will return 'BTC'.

Syntax: BaseCurrency([ market ])

Returns the base currency as string.

Return type: String

ContractName

Gets the contract name of the market.

Syntax: ContractName([ market ])

Returns the contract name of the market.

Return type: String

ContractValue

Gets the value of a single contract, defined in their denomination.

Syntax: ContractValue([ market ])

Returns the value of a single contract, defined in their denomination.

Return type: Number

IsTradeAmountEnough

Gets whether or not the trade amount is high enough for exchange limits.

Syntax: IsTradeAmountEnough(market, price, amount, [ logWarning ])

Returns whether or not the trade amount is high enough for exchange limits.

Return type: Boolean

MakersFee

Gets makers fee of the market.

Syntax: MakersFee([ market ])

Returns makers fee of the market.

Return type: Number

MarketType

Gets the market type enumeration of the market.

Syntax: MarketType([ market ])

Returns SpotTrading, MarginTrading or LeverageTrading.

Return type: Enum

MinimumTradeAmount

Calculates the minimum trade amount on a certain price while keeping exchange specifications in consideration.

Syntax: MinimumTradeAmount([ market ], [ price ])

Returns the minimum trade amount taking the decimal count, minimum amount and volume into account.

Return type: Number

ParseTradeAmount

Parses the trade amount to exchange specifications.

Syntax: ParseTradeAmount(market, price, amount)

Returns the trade amount adjusted for exchange specifications.

Return type: Number

ParseTradePrice

Parses the trade price to exchange specifications.

Syntax: ParseTradePrice(market, price)

Returns the trade price adjusted for exchange specifications.

Return type: Number

PriceDecimals

Returns a number of how many decimals is allowed for order prices.

Syntax: PriceDecimals([ market ], [ price ])

Returns the allowed decimal count.

Return type: Number

PriceStep

Returns the minimum allowed price step for market.

Syntax: PriceStep([ market ])

Returns the price step size.

Return type: Number

ProfitCurrency

Returns the profit label. For reflection, in case the market is Bitstamp BTC/USD it will return 'USD'. When we are on BitMEX XBT/USD (XBTUSD), it will return 'XBT'.

Syntax: ProfitCurrency([ market ])

Returns the profit label as string.

Return type: String

ProfitLabel

Returns the profit label. For reflection, in case the market is Bitstamp BTC/USD it will return 'USD'. When we are on BitMEX XBT/USD (XBTUSD), it will return 'XBT'.

Syntax: ProfitLabel([ market ])

Returns the profit label as string.

Return type: String

QuoteCurrency

Returns the quote currency of the market. For reflection, in case we are on Bitstamp BTC/USD it will return 'USD'.

Syntax: QuoteCurrency([ market ])

Returns the quote currency as string.

Return type: String

QuoteDecimals

Returns a number of how many decimals is allowed for order prices.

Syntax: QuoteDecimals([ market ], [ price ])

Returns the allowed decimal count.

Return type: Number

QuoteStep

Returns the minimum allowed price step for market.

Syntax: QuoteStep([ market ])

Returns the price step size.

Return type: Number

SetFee

Saves a custom fee percentage which is used in back tests and returned by Fee().

Syntax: SetFee(percentage, [ market ])

Return type: Void

TakersFee

Gets takers fee of the market.

Syntax: TakersFee([ market ])

Returns takers fee of the market.

Return type: Number

TradeMarketContainer

Retrieves all the information on the trade market.

Syntax: TradeMarketContainer([ market ])

Returns the market information on an array.

Return type: Dynamic

UnderlyingAsset

Returns the underlying assets of the market. For reflection, in case we are on Bitstamp BTC/USD it will return 'BTC'. When we are on BitMEX XBT/USD (XBTUSD), it will return 'XBT'.

Syntax: UnderlyingAsset([ market ])

Returns the underlying assets as string.

Return type: String

UsedMargin

Calculates the used margin for a specific position.

Syntax: UsedMargin(market, price, amount, leverage)

Returns the amount in the underlying currency value.

Return type: Number

Last updated