Trade Market Information

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)'.

  • AmountLabel([ market ])

Returns the amount label as string.

Return Type: String

BaseCurrency

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

  • BaseCurrency([ market ])

Returns the base currency as string.

Return Type: String

ContractName

Gets the contract name of the market.

  • ContractName([ market ])

Returns the contract name of the market.

Return Type: String

ContractValue

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

  • 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.

  • 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.

  • MakersFee([ market ])

Returns makers fee of the market.

Return Type: Number

MarketType

Gets the market type enumeration of the market.

  • 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.

  • 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.

  • ParseTradeAmount(market, price, amount)

Returns the trade amount adjusted for exchange specifications.

Return Type: Number

ParseTradePrice

Parses the trade price to exchange specifications.

  • ParseTradePrice(market, price)

Returns the trade price adjusted for exchange specifications.

Return Type: Number

ProfitLabel

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

  • 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'.

  • QuoteCurrency([ market ])

Returns the quote currency as string.

Return Type: String

SetFee

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

  • SetFee(percentage, [ market ])

Return Type: Void

TakersFee

Gets takers fee of the market.

  • TakersFee([ market ])

Returns takers fee of the market.

Return Type: Number

TradeMarketContainer

Retrieves all the information on the trade market.

  • 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'.

  • UnderlyingAsset([ market ])

Returns the underlying assets as string.

Return Type: String

UsedMargin

Calculates the used margin for a specific position.

  • UsedMargin(market, price, amount, leverage)

Returns the amount in the underlying currency value.

Return Type: Number

Last updated