LogoLogo
Back to HaasOnline.comSwitch to Developer API
3.x
3.x
  • Welcome
  • Getting Started
    • What is Haas Trade Server?
    • System Requirements
    • Installation
      • Windows
      • Linux
        • Downgrading Mono
      • MacOS
    • Configuration
      • License Key
        • Upgrading Your License
      • Price Drivers & Accounts
      • Exchanges
        • Binance
        • Binance USDT Futures
        • Binance COIN Futures
        • Binance US
        • Bitfinex
        • BitMEX
        • Bitpanda Pro
        • Bitstamp
        • Bittrex
        • Bybit
        • (Unsupported) C-Cex
        • Cex.IO
        • (Unsupported) CobinHood
        • Coinbase PRO
        • Deribit
        • (Unsupported) FTX
        • Gemini
        • HitBTC
        • Huobi
        • Ionomy
        • Kraken
        • Kraken Futures
        • KuCoin
        • (Unsupported) NovaExchange
        • OKCoin
        • OKEX
        • OKEX-Futures
        • OKEX-Swap
        • Poloniex
        • Scripted Driver
    • Updating HTS
      • Stable Update
      • Beta Update
    • Apps
      • Discord
      • Telegram
    • Security
      • Two-factor Authentication (2FA)
    • Troubleshooting
      • Frequently Asked Questions
      • Two-factor Authentication (2FA)
      • Debugging & Logs
      • Exchange API
      • Invalid License
      • Lost Login Credentials
      • Orders Being Rejected
      • Unresponsive HTS UI
      • Using Safe Mode
    • Tips & Tricks
      • Keyboard Shortcuts
      • Migrating Your HTS
      • Never Logout
      • Reactivate Bots on Startup
      • Used Symbols
  • Trade Bots
    • Getting Started
    • General Settings
    • Trade Settings
    • Bot Charts
    • Indicators
      • Candlestick Patterns
        • Advance Block
        • Belt Hold
          • Belt Hold Bearish
          • Belt Hold Bullish
        • Break Away
          • Breakaway Bearish
          • Breakaway Bullish
        • Closing Marubozu
        • Concealing Baby Swallow
        • Counter Attack
          • Counter Attack Bullish
          • Counter Attack Bearish
        • Doji
        • Doji Star
        • Dragon Fly Doji
        • Engulfing Bearish
        • Engulfing Bullish
        • Gap Side-by-Side White Lines
        • Gravestone Doji
        • Hammer
        • Hanging Man
        • Harami
          • Harami Bearish
          • Harami Bullish
        • Harami Cross
          • Harami Cross Bearish
          • Harami Cross Bullish
        • High Wave
        • Hikkake
          • Hikkake Bearish
          • Hikkake Bullish
        • Homing Pigeon
        • Identical Three Crows
        • In Neck
        • Inverted Hammer
        • Kicking Bearish
        • Kicking Bullish
        • Ladder Bottom
        • Long Legged Doji
        • Long Line
        • Matching Low
        • Marubozu
          • Marubozu Bearish
          • Marubozu Bullish
        • On Neck
        • Rickshaw Man
        • Rise Fall Three Methods
        • Separating Lines
        • Shooting Star
        • Short Line
        • Simple Double Down Candle
        • Simple Double Up Candle
        • Simple Down Candle
        • Simple Up Candle
        • Spinning Top
        • Stalled Pattern
        • Stick Sandwich Down
        • Stick Sandwich Up
        • Tasuki Gap
        • Three Black Crows
        • Three Inside Down
        • Three Inside Up
        • Three Line Strike
          • Three Line Strike Bearish
          • Three Line Strike Bullish
        • Three Outside Down
        • Three Outside Up
        • Three Stars in North
        • Three Stars in South
        • Three White Soldiers
        • Tristar
        • Thrusting
        • Two Crows
      • Aroon
      • Aroon Oscillator
      • Awesome Oscillator
      • Balance of Power (BOP)
      • Blind Indicator
      • Bollinger Bands
      • Bollinger Bands %B
      • Bollinger Bands %W
      • Commodity Channel Index (CCI)
      • Chande Momentum Oscillator (CMO)
      • Connors RSI (CRSI)
      • Coppock Curve
      • Detrended Price Oscillator (DPO)
      • Donchian Channels
      • Double Exponential Moving Average (DEMA)
      • Dynamic Buy/Sell
      • Elliot Wave Prediction
      • Exponential Moving Average (EMA)
      • Fast RSI
      • Fibonacci Retracements
      • Fixed Buy/Sell
      • Fractals
      • Ichi Clouds
      • Kaufmans Adaptive Moving Average (KAMA)
      • Keltner Channels
      • Momentum
      • Money Flow Index
      • Moving Average Convergence Divergence (MACD)
      • Parabolic SAR
      • Percentage Price Oscillator
      • Rate Of Change (ROC)
      • Rate Of Change Percent (Alternative) (ROC)
      • Regression Slope Cross
      • Relative Strength Index (RSI)
      • Script Indicator (C#)
      • Simple Moving Average (SMA)
      • Slow RSI
      • Small Fractals
      • Stochastic Oscillator
      • StochRSI
      • Stochastic^2
      • Timed Blind Indicator
      • Tom Demark Sequential (TD)
      • Triangular Moving Average (TRIMA)
      • Triple Exponential Average (TRIX)
      • Triple Exponential Moving Average (TEMA)
      • Ultimate Oscillator
      • Weighted Moving Average (WMA)
      • Williams %R
    • Safeties
      • Stop Loss
        • Stop Loss
        • Stop Loss (Fixed)
        • Stop Loss (Dynamic)
        • Stop Loss (Trailing)
        • Close position below % loss
      • Take Profit
        • Take Profit
        • Take Profit (Fixed)
        • Take Profit (Dynamic)
        • Close position above x% profit
      • Roof-In
        • Roof-In
        • Roof-In (Fixed)
        • Roof-In (Dynamic)
        • Roof-In (Trailing)
      • Disable Bot
        • Deactivate bot after buy
        • Deactivate bot after sell
        • Deactivate after X Minutes
        • Deactivate after X Idle Trades
        • Deactivate After X Trades
      • Others
        • Close Before Settlement
        • Force Bot to stay Bought/Long
        • Force Bot to Stay Sold/Short
        • Price Dump
        • Price Pump
        • Reset last buy price
        • Reset last sell price
        • Trade On Trend Lines
      • Script
        • Script Safety (C#)
    • Insurances
      • Fee
        • Overcome Double The Fee Costs
        • Overcome Fee Costs
      • Script
        • Script Insurance (C#)
      • Others
        • Wait after order
      • Price
        • Never Buy Higher
        • Never Sell Lower
        • Absolute Price Change
        • Percentage Price Change
      • Profit/Loss
        • Be Profitable In X Trades
        • Disable on Losses
        • Stay Profitable
      • Trend
        • Trade Only Sideways
        • Trade Only Trending
  • Custom Bots
    • Accumulation Bot
    • Advanced Index Bot
    • C# Script Bot
    • Crypto Index Bot
    • Email Bot
      • Email provider guide
      • Tradingview alert guide
      • Troubleshooting
    • Flash Crash Bot
      • Setup guide
      • Profit calculation
      • Price spread examples
      • Full screen mode
      • Follow the trend
      • Deactivation safety
      • Order management
      • Amount calculator
    • Intelli Alice Bot
    • Inter-Exchange Arbitrage Bot
    • MadHatter Bot
      • Setup Guide
      • Full screen mode
    • Market Making Bot
    • Order Bot
      • Full screen mode
      • Template Manager
    • Ping Pong Bot
    • Scalper Bot
      • Replicating the Scalper Bot in a Trade Bot
    • Trend Lines Bot
    • Zone Recovery Bot
  • Bot Tools
    • Backtesting & Paper Trading
    • Bot Dashboard
    • Bot List
    • Bot Performance Analyzer
    • Haas Labs
  • Bot Extensions
    • Deactivate After Order
    • Deactivate On Safety
    • Flash Crash Bot Manager
    • Manage Bots On Email Alarm
    • Manage Bots On Price Alarm
    • Manage Bots On Indicator
    • Order Persistence
    • Panic Move
    • Trailing Stop
  • Asset Management
    • Portfolio
      • Settings
      • History Synchronisation
      • Dashboard
      • Asset Information
      • Asset Location
      • Asset Trends
      • Trade Profit
      • Trade Volume
      • Trade Frequency
      • Balance Per Day
      • Trade History
      • Deposit & Withdrawal History
      • Position History
    • External Wallet
  • Other Features
    • Advanced Orders
      • Stop Loss
      • Take Profit
      • Trailing Stop
    • Dashboard
      • Alarms
      • Bots Related
      • Bulk Widgets
      • Account Related
      • Calculators
      • Charts
      • Clocks
      • News & Media
      • Order book & Trades
      • Portfolio
      • Tickers
    • Indicator Scanner
    • Manual Trading
    • Marketview
    • Market Compare
    • Order Templates
    • Technical Analysis
  • Changelog
    • Stable Release
    • Beta Release
  • Other Resources
    • YouTube
    • Guides & Tutorials
    • Questions & Answers
    • Community Projects
  • Need Help?
    • Ask on Discord
    • Submit support ticket
Powered by GitBook
On this page
  • Verifying an API
  • Step 1: Check the Connection
  • Step 2: Check the Wallet
  • Step 3: Check Trading
  • API Time-out
  • Communication Rules & Limits
  • Connectivity Handling
  • Exchange Error Handling

Was this helpful?

  1. Getting Started
  2. Troubleshooting

Exchange API

Verifying an API

Sometimes we need to determine if an exchanges API is currently operating or not. The following steps should allow you to verify if an API is working.

Step 1: Check the Connection

Inside the API setup form, there is a field called "Is exchange connected". This field is checked when the software has accepted and stored your connection/authentication credentials. So if this is checked then in theory you should be proceed to the next step. If this field is not checked then you have to enter the your API credentials.

API credentials can be deleted by the software in case the credentials are wrong. If the software has tried to connect 3 times and all 3 times has failed, then and only then can the API credentials be deleted by the software itself.

A connection to an exchange API is not accepted if there are no coins present on the exchange. It is a bit of strange rule, but we do not accept wallets that return empty (for checking the connections) because it might indicate the API is not running and therefore you could get a false reading. So we have hardcoded a limit for this. There must be at least a cent/satoshi/minimal amount of an altcoin inside your wallet to allow the API connection.

Additional information about the connection and related messages is available inside the software its log viewer.

Step 2: Check the Wallet

As soon as an exchange API is connected to HTS it will read the wallet. This wallet update is done almost every minute, depending on how many bots you have running. It can scale to update more or less often. Usually, the wallet updates at least once minute.

Usually, the wallet will always display the coins you have on the exchange. There are a few situations where this might not be the case.

  1. The API has timed out and the wallet temporarily cannot update its contents.

  2. The API has dropped the connection and therefore the wallet could not update.

In both cases, there is nothing you can do except wait. The software is able to update the wallet contents once the connection is restored. In general, if the wallet contents are not present/updated, we recommend to check it again after 5 or 10 minutes. Generally, it is expected that everything will update when the connection is restored.

If the situation arises where the wallet contents are not updating, two things can be done. The API credentials can be setup again, forcing the connection to refresh, or a simple restart of the software can resolve it. If both of these options fail, it is recommended to contact us for support.

If the wallet reading malfunctions because an API update, there should be an error message inside the software logs.

Step 3: Check Trading

Once we have made sure the connection is valid and the wallet is updating in HTS, we can proceed by checking the trade commands to the API.

In order to do this, we have to setup a trade bot. Of course, the bot must have coins, the trade-amount must be correct and the coin position must be valid.

You should be able to press the "Buy now" or "Sell now" button (depending on your coin position of course). This will place your order. You will see a notification confirming the order. The bot’s log will record the forced trade, and the software’s logbook will save any details of the trade.

We expect that this trade will happen normally. If it does not please proceed with the next 2 questions:

  1. Does the account have any coins to trade?

  2. Are the trade-amount and coin position valid?

If you are certain that this is accurate, then we must find out why the trade did not execute. To do so, check the bot’s debug log to see why the trade has failed. The software logs should also be checked for any related messages. The software logs should have recorded the exact details of the trade and any reason it may have failed.

API Time-out

HTS works based on its own framework. This framework and the stability of it is checked daily using automated unit tests, and this way we are sure it works as it should be. However, the underlaying API drivers are most of the times the cause of instability and therefore they have their own error handling system.

These handling systems are located within the drivers itself as they are developed and controlled by the HaasOnline Software Team. We set the rules of whats acceptable or not. Of course, this is not as easy as it appears and therefore we have described the situations that may happen and how we handle it within the driver models.

Communication Rules & Limits

Execution time measurements

  • If we measure a response time of greater then 1 minute for more then 6times in a hour -> 5min timeout

  • If we measure a response time of greater then 30seconds for more then 24times -> 5min timeout

  • If we measure an average response time of greater then 90seconds -> 5minute timeout

We measure (and reset) this during the peak times each hour. When a timeout occurs, then we know an exchange’s API is unstable, so we "reset" the counter to half and we will retry everything after the timeout is completed.

HTML error handling

Error

Description

HTML-403 (access denied)

5-minute timeout (likely flagged as DDoS attack)

HTML-522 (cloudflare)

2-minute timeout (CloudFlare is protecting now)

HTML-1010 (cloudflare)

Total block, software is banned at CloudFlare

HTML-1006,1007,1008 (cloudflare)

Total block, user IP is banned, issue big error

Connectivity Handling

Error

Description

DNS Errors

Small timeout to give the DNS a little room

Exchange Error Handling

Error

Description

Invalid key found

Give warning and disconnect

Nonce

Do reconnect protocol

Limit orders disabled

Give warning only

Market orders disabled

Give warning only

Trade-amount too low on orders

Give warning only

Trade-amount too high on order

Give warning only

PreviousDebugging & LogsNextInvalid License

Last updated 6 years ago

Was this helpful?