LogoLogo
Back to HaasOnline.comSwitch to Developer API
4.x
4.x
  • Welcome
  • TradeServer Cloud
    • Overview
    • Security
    • Troubleshooting
  • TradeServer Enterprise
    • Overview
    • Updates
    • Security
    • Installation
      • Windows
      • MacOS
      • Linux
    • Configuration
      • License Key
      • Login credentials
      • Hosting
        • Linux VPS Hosting
    • Special features
      • Price history
      • Backups
      • Machine Learning
        • Built-in Machine Learning
        • Custom Machine Learning
      • Scripted Exchange API (Coming Soon)
      • Local API (Coming Soon)
    • Troubleshooting
  • Interface
    • General Interface
      • Left Menu
      • Upper Right Items
        • Account data
        • Execute trade
        • AI Chatbots
          • Chatbot Julia
          • Chatbot David
          • Chatbot Thomas
        • Notifications
        • Menu
          • Exchange accounts
          • Settings
          • License information
          • Change Logs
          • Logout
      • Status bar
        • Price tickers
    • Dashboard
    • Bots
      • Bot management
      • Bot templates
    • HaasScript
      • Web Editor
      • Backtest Lab
        • Lab test setup
      • Backtest History
      • Manage Scripts
      • Manage Signals
    • Tools
      • Marketview
      • Market intelligence
      • Exchange profiler
      • Markets explorer
      • News
    • Finance
      • Portfolio
      • External Wallet
  • Haasscript
    • About
      • Change Log
    • Tutorials
      • Bot building
        • Trade-bot building
        • Visual bot building
        • Scripted bot building
      • Usage
        • HaasScript
          • Interval
          • Markets
          • Input Fields
          • Memory Management
          • Signal Handling
          • Position Information
          • Positions Handling
            • Fee correction
          • Order Handling
          • Trading
          • Charting
          • Optimizations
        • Visual Editor
          • Blocks
          • Parameters
          • Flow Control
          • Interaction
        • Script Editor
          • Classes
        • Managed Trading
        • Unmanaged Trading
    • Commands
      • Trade Bots
        • TradeBot Containers
        • Easy Indicators
        • Easy Safeties
        • Easy Insurances
      • Helpers
        • Array Helpers
        • Custom Command Helpers
        • Enumerations
        • Equations
        • Mathematical
        • Memory Helpers
        • Signal Helpers
        • String Helpers
        • Miscellaneous
        • Technical Analysis Helpers
      • Input data
        • Bot Settings
        • Input fields
        • Price Market Information
        • Script Settings
        • Time Information
        • Trade Market Information
      • Prices
      • Technical Analysis
      • Charting
      • Trading
        • Managed Trade Commands
        • Unmanaged Trade Commands
        • Order Information
        • Order Handeling
        • Position Information
        • Position Price Information
        • Profit Information
        • Wallet Information
      • Social Media
    • Built-in Bots
      • Version 3 bots
        • C# Scripted Bot
        • Email bot
        • Trendline Bot
        • Triangle Arbitrage Bot
      • Accumulation Bot
      • Enhanced RSI bot
      • FlashCrash (Grid) Bot
      • Crypto Index Bot
      • Intellibot Alice
      • Inter Exchange Arbitrage Bot
      • MadHatter Bot
      • Market Making Bot
      • Order Bot
      • PingPong Bot
      • Scalper bot
      • Zone-Recovery Bot
    • Community Bots
      • Simple Grid Bot (SPOT)
      • Simple Grid Bot (FUTURES)
      • Simple Market Maker (SPOT)
      • Simple Market Maker (FUTURES)
  • Usage
    • First Usage
    • Setup Exchange
      • Adding an API to the Platform
      • Binance
      • Binance US
      • Bit2me
      • Bitfinex
      • Bitget
      • BitMEX
      • ❌Bitpanda
      • Bitstamp
      • ❌Bittrex
      • Bybit
      • ❌Cex.IO (Legacy API)
      • ❌Coinbase
      • ❌Crypto.com
      • Deribit
      • Gemini
      • Gleec
      • ❌HitBTC
      • Huobi
      • ❌Ionomy
      • Kraken
      • Kraken Futures
      • KuCoin
      • KuCoin Futures
      • LBank
      • ❌OKCoin
      • OKX
      • OKX-Futures
      • OKX-Swap
      • Phemex
      • Poloniex
      • Poloniex Futures
      • WooX
    • Setup Telegram Notification Bot
    • Setup Discord Notification Bot
    • Use Signals
  • 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
  • LastBuyTradesCommand
  • LastSellTradesCommand
  • LastTradesSentiment
  • OrderbookSentiment
  • PriceLevel

Was this helpful?

  1. Haasscript
  2. Commands
  3. Input data

Price Market Information

AverageCandleSize

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

Syntax: AverageCandleSize([ market ])

Returns the average candle body size.

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

AverageOrderbookSpread

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

Syntax: AverageOrderbookSpread([ market ])

Returns the average orderbook bid/ask spread.

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

CreateMarket

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

Syntax: CreateMarket([ priceSource ], [ baseCurrency ], [ quoteCurrency ], [ contractName ])

Returns the market string.

Return type: String

Parameter Name
Parameter Type
Required
Suggestions

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.

Syntax: GetLastTrades([ depth ], [ market ])

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

Return type: ListNumbers

Parameter Name
Parameter Type
Required
Suggestions

depth

Number

False

Input,Number,SessionGet

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

GetOrderbook

Gets the orderbook on a specific market.

Syntax: GetOrderbook([ market ])

Returns a collection with 4 arrays.

Return type: ListNumbers

Parameter Name
Parameter Type
Required
Suggestions

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

GetOrderbookAsk

Gets a list of the orderbook ask records.

Syntax: 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
Suggestions

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

GetOrderbookBid

Gets a list of the orderbook bid records.

Syntax: 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
Suggestions

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

LastBuyTradesCommand

Returns all last selling orders

Syntax: LastBuyTradesCommand([ Seconds back ], [ market ])

Returns the buying trading volume

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

Seconds back

Number

False

Input,Number,SessionGet

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

LastSellTradesCommand

Returns all last selling orders

Syntax: LastSellTradesCommand([ Seconds back ], [ market ])

Returns the selling trading volume

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

Seconds back

Number

False

Input,Number,SessionGet

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

LastTradesSentiment

Calculates the last trades sentiment as a number.

Syntax: LastTradesSentiment([ market ])

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

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

OrderbookSentiment

Calculates the orderbook sentiment as a number.

Syntax: OrderbookSentiment([ market ])

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

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

market

String

False

InputAccountMarket,InputMarket,InputPriceSourceMarket,PriceMarket

PriceLevel

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

Syntax: PriceLevel(price)

Returns the price level.

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

price

Number

True

GetBuyPrices,GetSellPrices,GetOpenPrices,GetHighPrices,GetLowPrices,GetClosePrices,GetHighLowPrices,GetHighLowClosePrices,GetOpenClosePrices,GetOpenHighLowClosePrices,GetBodyHighPrices,GetBodyLowPrices

PreviousInput fieldsNextScript Settings

Last updated 1 year ago

Was this helpful?