LogoLogo
Back to HaasOnline.comSwitch to Trade Platform
3.x
3.x
  • Welcome
  • Getting Started
    • Using Local API Server
    • Authentication
    • Response
      • Error Codes
  • HaasScript
    • Using HaasScript
      • HaasScript Facts
      • Charting
      • Order Handling
      • Interval
      • Input Fields
      • Positions Handling
        • Fee correction
      • Position Information
      • Memory Management
      • Optimizations
      • Signal Handling
      • Trading
    • Script Editor
      • Syntax
      • Parameters
      • Interaction
    • Visual Editor
      • Blocks
      • Parameters
      • Flow Control
      • Interaction
    • Custom Commands
    • Tutorials
      • Trade Bot Guide
        • Creating A Trade Bot
          • Visual Editor Guide
          • Script Editor Guide
          • Custom Containers
        • Customizing Indicators
        • Customizing Safeties
        • Customizing Insurances
        • Creating Easy Indicators
      • Unmanaged Trading Guide
        • Executing Orders
        • Managing Orders
        • Managing Positions
        • Managing Wallet
      • Script Editor
        • Classes
        • MadHatter BBands
        • Percentage Price Change
      • Visual Editor
        • Importing Scripts
        • SmoothRSI
        • Scalper Bot
    • Commands
      • Array Helpers
      • Charting
      • Constants
      • Custom Commands Helpers
      • Easy Indicators
      • Easy Insurances
      • Easy Safeties
      • Equations
      • Flow Control
      • Input Fields
      • Input Settings
      • Mathematical
      • Memory Helpers
      • Miscellaneous
      • Order Handling
      • Order Information
      • Position Information
      • Position Prices
      • Price Data
      • Price Market Information
      • Profit Information
      • Settings
      • Signal Helpers
      • String Helpers
      • Technical Analysis
      • Technical Analysis Helpers
      • Time Information
      • Trade Actions (Managed)
      • Trade Actions (Unmanaged)
      • Trade Bot
      • Trade Market Information
      • Wallet
  • API Endpoints
    • Software API
    • Market Data API
    • Account Data API
    • Trade Data API
    • Advanced Order API
    • Trade Bot API
    • Custom Trade Bot API
    • ENUMS
    • Data Objects
  • Examples
    • Script Bots (C#)
      • Scalper Trade Bot
      • Flash Crash Trade Bot
    • Script Indicators (C#)
      • Indicator Script
      • Technical Analysis Library
    • Pshai Scripts (C#)
      • BBands Ext
      • BBands Ext v2
      • Chaikin A/D Line
      • Calibrator
      • Pshai's RVI
    • Scripted Driver
  • Other Resources
    • YouTube
    • Guides & Tutorials
    • Questions & Answers
    • Community Projects
  • Need Help?
    • Ask on Discord
    • Submit Support Ticket
Powered by GitBook
On this page
  • AverageCandleSize
  • AverageOrderbookSpread
  • CreateMarket
  • GetLastTrades
  • GetOrderbook
  • GetOrderbookAsk
  • GetOrderbookBid
  • LastTradesSentiment
  • OrderbookSentiment
  • PriceLevel

Was this helpful?

  1. HaasScript
  2. Commands

Price Market Information

AverageCandleSize

Calculates the average candle body size of the last 50 minutes.

  • AverageCandleSize([ market ])

Returns the average candle body size.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

AverageOrderbookSpread

Calculates the average orderbook bid/ask spread of the last 50 minutes.

  • AverageOrderbookSpread([ market ])

Returns the average orderbook bid/ask spread.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

CreateMarket

Creates a market string that can be used for a variety of commands.

  • CreateMarket([ priceSource ], [ baseCurrency ], [ quoteCurrency ], [ contractName ])

Returns the market string.

Return Type: String

Parameter Name

Parameter Type

Required

Suggested

priceSource

String

False

Text, Input, SessionGet, Load

baseCurrency

String

False

Text, Input, SessionGet, Load

quoteCurrency

String

False

Text, Input, SessionGet, Load

contractName

String

False

Text, Input, SessionGet, Load

GetLastTrades

Gets a list of the last trades.

  • GetLastTrades([ depth ], [ market ])

Returns the last trades. Array format: [[price, amount, isBuy?, unix], ... ].

Return Type: ListNumbers

Parameter Name

Parameter Type

Required

Suggested

depth

Number

False

Input, Number, SessionGet

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

GetOrderbook

Gets the orderbook on a specific market.

  • GetOrderbook([ market ])

Returns a collection with 4 arrays.

Return Type: ListNumbers

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

GetOrderbookAsk

Gets a list of the orderbook ask records.

  • GetOrderbookAsk([ market ])

Returns an array of bid prices and order sizes. Output format: [[price, amount], [price, amount] ...].

Return Type: Dynamic

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

GetOrderbookBid

Gets a list of the orderbook bid records.

  • GetOrderbookBid([ market ])

Returns an array of bid prices and order sizes. Output format: [[price, amount], [price, amount] ...].

Return Type: Dynamic

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

LastTradesSentiment

Calculates the last trades sentiment as a number.

  • LastTradesSentiment([ market ])

Returns the last trades sentiment. 0.5 is the default, idle value.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

OrderbookSentiment

Calculates the orderbook sentiment as a number.

  • OrderbookSentiment([ market ])

Returns the orderbook sentiment. 0.5 is the default, idle value.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

market

String

False

InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket

PriceLevel

Determines the price level. For example. 123456 will return 10000. 123 will return 100.

  • PriceLevel(price)

Returns the price level.

Return Type: Number

Parameter Name

Parameter Type

Required

Suggested

price

Number

True

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

PreviousPrice DataNextProfit Information

Last updated 4 years ago

Was this helpful?