Atlas LP
  1. Home
  2. Blog
  3. How Exchange API Error Responses Affect Automated Market Making Bots

Exchange API

How Exchange API Error Responses Affect Automated Market Making Bots

Explore the impact of exchange API error responses on automated market making bots and how robust systems like Atlas LP handle, detect, and recover from these errors.

Published

Introduction

Automated market making bots rely on fast, reliable, and accurate connections to crypto exchanges through their APIs. However, even the most robust exchanges occasionally return error responses due to network issues, invalid parameters, permission problems, or service outages. Understanding how these API errors affect market making bots is essential for token projects, trading teams, and exchanges aiming to maintain healthy liquidity and fair markets.

This article explores common types of exchange API error responses, their impact on automated spot market making bots, and how Atlas LP is engineered to detect, handle, and recover from these scenarios.

Common Exchange API Error Responses

Crypto exchange APIs can return a variety of error responses. Some of the most relevant to market making bots include:

Error TypeTypical Cause
Authentication failureInvalid API key/secret, revoked permissions
Permission deniedMissing trading or read permissions
Parameter validation errorOrder size, price, or symbol not matching exchange rules
Rate limit exceededToo many API requests in a short period
Network timeoutExchange or network temporarily unavailable
Order rejectionOrder violates exchange filters or is outside allowed range
Service unavailableExchange maintenance or downtime

Each of these errors can disrupt a bot’s ability to read market data, place or cancel orders, or sync balances and fills.

How API Errors Affect Market Making Bots

1. Authentication and Permission Errors

If a bot’s API credentials are invalid, expired, or lack required permissions, the bot cannot interact with the exchange. For market making, this means:

  • No ability to place, modify, or cancel orders
  • Inability to read balances or open orders
  • Risk of leaving stale or mispriced orders on the book

Atlas LP performs detailed API verification before starting a bot. If the exchange rejects the credentials, the bot stops with an error status, preventing unintended actions.

2. Parameter and Symbol Rule Errors

Exchanges enforce strict rules on order price, size, and notional value. If a bot sends an order that violates these rules, the exchange will reject it. This can happen if:

  • The order size is below the minimum quantity or notional
  • The price does not conform to the tick size
  • The symbol is not supported or delisted

Atlas LP validates all bot settings, including symbol rules, before allowing a bot to start. During operation, each tick checks the latest symbol filters to construct valid orders. Orders that would be rejected are never sent, reducing error frequency.

3. Rate Limiting and Network Errors

Exchanges limit the number of API requests per account or IP to prevent abuse. If a bot exceeds these limits, it receives rate limit errors. Network timeouts can also occur due to connectivity issues or exchange overload.

Consequences include:

  • Delayed order placement or cancellation
  • Missed market data updates
  • Potential for stale orders to remain on the book

Atlas LP allows users to configure tick intervals (from 0.5 seconds, default 3 seconds), balancing responsiveness with rate limit compliance. If market data is stale or crossed, the bot skips the tick, avoiding actions based on unreliable data.

4. Order Rejection and Service Outages

Order rejections can occur if the market moves quickly or if the order book structure changes. Service outages or maintenance windows can result in all API requests failing temporarily.

A robust bot must:

  • Detect when orders are not accepted or canceled
  • Avoid repeated failed attempts that could trigger further rate limits
  • Pause or halt trading if the exchange is unavailable

Atlas LP monitors open orders, recent fills, and bot events in real time. If the exchange is unreachable or credentials are rejected, the bot stops and reports the error in the console.

Engineering Reliable Error Handling in Atlas LP

Atlas LP is designed with several layers of error detection and handling:

  • API Verification: Before a bot starts, Atlas LP checks ticker, order book, symbol rules, balances, open orders, and trades. It can optionally place and immediately cancel a test limit order to verify permissions and filters.
  • Setting Validation: All bot settings are validated against exchange rules before launch, preventing parameter errors.
  • Tick-Based Data Checks: On every tick, the bot reads the latest ticker and order book. If data is stale or the order book is crossed, the bot skips the tick to avoid acting on unreliable information.
  • Order Placement Logic: The bot places only missing levels and cancels only excess or mispriced orders. This minimizes unnecessary API calls and reduces error exposure.
  • Error Status Reporting: If the exchange rejects credentials or critical operations fail, the bot stops with an error status, alerting the user.
  • User Controls: Users can cancel individual or all open orders directly from the bot page, and stopping a bot halts all new order activity.

Best Practices for Managing API Errors in Market Making

  • Monitor Bot Status: Use real-time console monitoring and Telegram alerts to stay informed about bot activity and errors.
  • Regularly Review API Permissions: Ensure API keys have only the required permissions (read and spot trading), and never grant withdrawal access.
  • Validate Settings Before Launch: Double-check symbol, order size, price, and spread settings against exchange rules.
  • Adjust Tick Intervals: Set tick intervals to balance between responsiveness and avoiding rate limit errors.
  • Respond Quickly to Errors: If a bot stops due to an error, investigate the cause (e.g., expired API key, exchange maintenance) before restarting.

Conclusion

Exchange API error responses are an unavoidable part of automated spot market making. By understanding the types of errors and engineering bots to detect, handle, and recover from them, trading teams and token projects can maintain reliable liquidity and minimize operational risk. Atlas LP incorporates multiple safeguards and validation steps to ensure that market making remains compliant, secure, and responsive to the realities of exchange APIs.

Genuine market making means placing resting limit orders that any participant can trade against. Wash trading, self-trading, and volume manipulation are strictly prohibited.

Atlas LP does not guarantee returns, prices, volume, or listings.

Crypto trading involves risk. Atlas LP is software for placing and managing limit orders; it does not guarantee returns, prices, volume or listings. Follow the rules of each exchange and applicable law.

← Back to blog

Frequently asked questions

What happens if an exchange rejects my API key or permissions?

If Atlas LP detects invalid or insufficient API credentials during verification or operation, the bot stops immediately with an error status. This prevents unintended actions and alerts the user to review their API key permissions.

How does Atlas LP minimize errors from invalid order parameters?

Atlas LP validates all bot settings, including order size, price, and symbol rules, before starting. During operation, it checks the latest exchange filters to ensure all orders comply with exchange requirements.

Can API rate limits or network issues disrupt market making bots?

Yes. Rate limits and network errors can delay order placement or data updates. Atlas LP allows users to adjust tick intervals and skips ticks when data is stale or unreliable to reduce the impact of these issues.

What should I do if my bot stops due to an API error?

Review the error message in the Atlas LP console. Common causes include expired API keys, revoked permissions, or exchange maintenance. Address the underlying issue before restarting the bot.

Does Atlas LP support recovery from exchange outages?

Atlas LP detects when the exchange is unreachable and stops the bot with an error status. Once the exchange is available and credentials are valid, you can restart the bot to resume operations.

Related articles

Run your spot liquidity bot with clear controls

Connect an exchange API key, set your spread band and order levels, and monitor orders, fills and balances from one console.

Create an account