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

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

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

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

ContractName

Gets the contract name of the market.

  • ContractName([ market ])

Returns the contract name of the market.

Return Type: String

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

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

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

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

Parameter Name

Parameter Type

Required

Suggested

market

String

True

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

price

Number

True

BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices

amount

Number

True

-

logWarning

Boolean

False

-

MakersFee

Gets makers fee of the market.

  • MakersFee([ market ])

Returns makers fee of the market.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

MarketType

Gets the market type enumeration of the market.

  • MarketType([ market ])

Returns SpotTrading, MarginTrading or LeverageTrading.

Return Type: Enum

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

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

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

price

Number

False

BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices

ParseTradeAmount

Parses the trade amount to exchange specifications.

  • ParseTradeAmount(market, price, amount)

Returns the trade amount adjusted for exchange specifications.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

True

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

price

Number

True

BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices

amount

Number

True

-

ParseTradePrice

Parses the trade price to exchange specifications.

  • ParseTradePrice(market, price)

Returns the trade price adjusted for exchange specifications.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

True

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

price

Number

True

BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices

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

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

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

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

SetFee

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

  • SetFee(percentage, [ market ])

Return Type: Void

Parameter Name

Parameter Type

Required

Suggested

percentage

Number

True

Input, Number, SessionGet

market

String

False

InputAccount, InputAccountMarket, InputMarket, AccountGuid

TakersFee

Gets takers fee of the market.

  • TakersFee([ market ])

Returns takers fee of the market.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

TradeMarketContainer

Retrieves all the information on the trade market.

  • TradeMarketContainer([ market ])

Returns the market information on an array.

Return Type: Dynamic

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

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

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

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

Parameter Name

Parameter Type

Required

Suggested

market

String

True

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

price

Number

True

BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices

amount

Number

True

-

leverage

Number

True

Input, Number, Leverage

Last updated