FinTech & Trading
Crypto Trading Bots for Funds and Trading Firms: A Hosted Platform, an Open-Source Framework, or Your Own Engine
What breaks when a crypto trading strategy runs with real money, such as exchange rate limits, dropped connections, and funding and liquidation on perpetual futures, and which risk controls and API key settings belong outside the strategy. It also compares hosted bot platforms, open-source frameworks and your own engine, and covers backtest versus live results, monitoring, records that match the exchange, what you keep if you leave, and questions to ask.
By amBrain11 min read
In this article
A crypto trading strategy that works in a backtest or on one laptop needs more software before it trades real money. Something has to keep market data current, send orders, track every fill, enforce limits and keep records that agree with the exchange. There are three ways to get it. A hosted bot platform, such as 3Commas or Cryptohopper, runs bots on its own servers and trades through application programming interface (API) keys from your exchange account. An open-source framework, such as Hummingbot or Freqtrade, is free code that your team runs on its own servers. Your own engine is software you build or commission, including the connection to each exchange. The routes differ in who fixes failures and who holds keys that can trade.
The short answer: use a hosted platform if the strategy fits its bot types or can be sent to it as signals, and you accept that a third party holds keys that can trade. Use an open-source framework if an engineer on your team can run servers and fix a connector. Build your own engine when the strategy needs speed, several exchanges at once or order handling the frameworks lack, and you can pay for its upkeep. On every route, keep loss limits and a kill switch outside the strategy, and reconcile with the exchange every day.
What breaks when a strategy trades on a live exchange?
Exchanges describe these failures in their own API documentation:
- Binance counts requests per IP address (your server's internet address), “not the API keys”, so two bots on one server share one limit. A bot that keeps sending after a rate-limit error gets an automatic ban, and Binance says bans “scale in duration for repeat offenders, from 2 minutes to 3 days.” After the error “403, access too frequent”, Bybit says to stop and wait at least 10 minutes.
- WebSocket connections, which stay open so the exchange can push every update, have time limits. Binance says a market data connection “is only valid for 24 hours”. OKX closes a connection after 30 seconds without data, so the bot has to send its own pings.
- After a gap in updates, a local copy of the order book must be rebuilt from a snapshot. Binance's instruction is: “Discard your local order book and restart the process from the beginning.” Until then, the strategy should not trade on it.
- An order's status can be unknown. Binance says an error on its side means “the execution status is UNKNOWN and could have been a success.” A bot that resends such an order can double its position. Give every order your own client order ID, and query by it before you resend.
- Orders fill in parts. Bybit's documentation says: “You may have multiple executions in a single order.” Record every fill with its price and fee.
- Signed requests depend on time. Binance rejects a signed request outside a window that “defaults to 5000 milliseconds”. Kraken requires a nonce, a number that rises with every request on a key. It warns of problems “from requests arriving out of order due to API keys being shared across processes, or from system clock drift/recalibration.” Keep server clocks synchronised, and give each process its own key.
- Short outages come without notice. OKX says that planned maintenance causing interruptions “lasting less than 5 seconds” or WebSocket disconnections “will not be announced.” Reconnecting has to work without a person.
What changes when the strategy trades perpetual futures?
Perpetual futures have no expiry date. Instead, one side pays the other a funding fee at set times, and funding-rate trades earn from those payments. The schedule can change. For some contracts with large swings in funding rates, OKX says the collection frequency, “currently set at 8 hours, may be adjusted to higher frequencies such as 6 hours, 4 hours, 2 hours, or 1 hour.” Bybit says “Each symbol has a different funding interval.” Read the interval from the exchange's data each time you size a trade.
Margin is the second change. When equity falls to OKX's maintenance margin requirement, “the system begins forced liquidation of positions.” In a hedged trade, the futures leg can be liquidated while the spot leg on another account shows a profit, which leaves a position you did not plan. The exchange can also close a profitable position. OKX ranks positions for auto-deleveraging from 0 to 5, where 5 means “first in queue if the insurance fund is depleted”. Positions with more unrealised profit rank higher.
Which risk controls should sit outside the strategy code?
A strategy with a bug cannot be trusted to stop itself. Put these checks in a separate layer that every order passes through:
- Limits on order size, position size and open orders for each market.
- A price check that rejects orders far from the market, which catches an out-of-date order book or a wrong unit.
- A daily loss limit that blocks new orders and cancels open ones.
- A kill switch that a person can press to stop trading on every exchange.
Hummingbot's kill switch “Automatically stops the bot when it reaches a certain performance threshold”. A switch inside the bot does not help when the bot freezes. For that case, OKX offers a function described as “Cancel all pending orders after the countdown timeout”. Your engine keeps resetting a countdown of 10 to 120 seconds, and if the engine stops, the exchange cancels the orders. Bybit has a similar function, but its documentation says it is “only available for Ins clients” and that “VIP clients cannot access this feature”.
Give each bot its own API key, and where possible its own sub-account, with withdrawals disabled. Cryptohopper gives one reason: when platforms share a key, “it becomes difficult to see which platform performed a specific trade or action on your exchange.” Bind each key to your servers' IP addresses. Exchanges encourage this: OKX says keys with trade or withdraw permissions and no IP binding expire after 14 days of inactivity. Bybit says “An API key created without binding IP address(es) will expire after 90 days.” Keep secrets in a secrets manager, not in configuration files.
What does a hosted bot platform do, and what does it hold?
Cryptohopper says it “forwards buy and sell orders on your behalf” and that “The platform runs on Amazon Web Services (AWS)”. 3Commas offers grid, DCA (dollar-cost averaging) and signal bots. Its Signal Bot turns alerts from sources such as “Java and Python scripts” into orders, so a fund can keep its own signal code and use the platform only to place orders. 3Commas lists plans from $20 to $140 a month, with lower rates for annual payment.
Both platforms say they cannot withdraw your money, but they hold keys that can trade. In a notice from December 2022, 3Commas confirmed that “some of 3Commas' users' API data (API keys, secrets and passphrases) have been disclosed by a third party”. It warned that the data may have been used to “initiate unauthorized trades”. 3Commas says it now signs requests in a separate Sign Center and checks each connection against restrictions set on the exchange, such as IP allow-lists.
The strategy also has to fit a bot type or a signal format. You do not control the servers, how an order is retried after an error, or how far the servers sit from the exchange. If you trade investors' or clients' money, have the platform's terms checked for that use.
What does running an open-source framework take?
Hummingbot calls itself “the open source framework for crypto market makers”, and its FAQ says the most common bot types are “market making and arbitrage bots”. Freqtrade is “a free and open source crypto trading bot written in Python”, and its strategies generate signals from candles: price bars for a set period, such as 5 minutes. Hummingbot is under the Apache 2.0 licence and Freqtrade under the GNU General Public License version 3. The two licences set different conditions for sharing changed code.
The software is free to use, but your team runs it. Hummingbot says users typically run its Docker image “on AWS or another cloud provider”, and that the keys are “as secure as the computer you are running them on.” Connectors need upkeep. The Hummingbot Foundation maintains some itself, assigns bounties to community developers for the others, and lets its community propose “connector removals”. Freqtrade reaches exchanges through a separate library, CCXT, and says the bot “was tested by the development team with only a few exchanges.”
Freqtrade's disclaimer says “USE THE SOFTWARE AT YOUR OWN RISK.” Freqtrade expects to be the only trader on its balance. If someone trades that balance by hand, it tries to find its orders on the exchange again, which it calls “a best-effort approach, and will not work in all cases”.
When is your own trading engine worth building?
Build when the design of the frameworks is the obstacle. Typical reasons:
- Your strategy depends on speed between exchanges, and you need control of every step from market data to order.
- You trade on several exchanges at once and need one view of positions, margin and funding.
- You need order types, hedging or risk checks that the frameworks lack.
- Investors or auditors expect records and controls you can explain line by line.
A build means owning a connector for each exchange, the order handling, the risk layer, reconciliation, monitoring and the servers, and keeping them current as exchanges change their APIs. OKX, for example, sends this notice to clients that still connect on port 8443: “WebSocket port 8443 will be retired soon. Please migrate to port 443.” Someone has to catch such notices and act before the old port closes.
A middle path is a fork: your own changed copy of open-source code. Hummingbot's FAQ says “many developers and professional firms fork the codebase and use it for their own purposes.” Merging later releases into the fork then becomes your job.
Why do live results differ from the backtest?
A backtest replays history under assumptions. Freqtrade lists its own, including that “All orders are filled at the requested price (no slippage) as long as the price is within the candle's high/low range”. It also says “backtesting will never replace running a strategy in dry-run mode”, its term for trading with simulated money. Live orders slip: a large order moves the price, and a late one meets a price that has already moved.
Fees differ too. Exchanges charge separate maker and taker fees, and many lower them with volume. Freqtrade notes that “fee reductions starting with a certain account size or monthly volume” are not visible to its exchange library, so a backtest may use the wrong rate. OKX offers market makers “favourable fees in return for meeting the market making obligations”. For market making, the fee tier can decide whether the strategy makes money at all.
Latency is the third difference. An arbitrage bot acts on a price gap between two exchanges, and the gap can close before its orders arrive, so servers near each exchange's engine matter. Bybit's documentation puts its servers in “AWS Tokyo, Availability Zone ID apne1-az2 & az4”. A notice on its pages says Bybit “migrated its trading and matching engine service to AWS Tokyo (apne1-az4)” in November 2026. Check the location again after such notices. Location also decides access: Bybit says requests from “IP addresses located in the US or Mainland China are restricted”. Start live trading with small orders and compare each fill with the price the backtest expected.
How do you monitor a live strategy and keep records that match the exchange?
Alert on silence as well as on errors: no market data for a set number of seconds, no fills for longer than usual, rejected orders, rising rate-limit errors, a position that differs from the expected one. Alerts need someone who can act at any hour, weekends included.
Log every order, change, cancellation and fill with the exchange's IDs, your client order ID and the time it was sent. Each day, compare balances, positions and fills with the exchange. Compute profit and loss from the exchange's fills, fees and funding payments, not from the strategy's estimates. Check plus and minus signs: Bybit's transaction log shows funding with a sign “opposite to the execFee from Get Trade History”. The log “supports up to 2 years worth of data”, so copy records to your own storage every day.
What do you keep or lose if you change routes?
On a hosted platform, the strategy lives in the platform's settings. 3Commas says that when you remove an exchange account, “Any trading history from within 3Commas for this account will be deleted”, along with its bots and templates. Signal code you wrote yourself stays with you. Delete the API key on the exchange too. Otherwise, 3Commas warns, it “will remain active and could become a security risk.”
With an open-source framework, you keep the code with its connectors, your strategy files and the bot's records, which Freqtrade stores in its own database. Your changes to the framework have to be carried into each new release. With your own engine, you keep everything, including the connectors and their upkeep. If a firm builds it, the contract should give you the repository, deployment scripts and operating instructions, and the right to hire someone else to change the code.
What should you ask a bot platform, or a firm that would build your engine?
- Who holds our API keys, where, and who can use them to sign a request?
- Which exchanges and order types work today, and who fixes a connector when an exchange changes its API?
- What happens to an order whose status is unknown, and to open orders if your service or our server goes down?
- Which limits and kill switches sit outside the strategy, and who can trigger them?
- Can we export every order, fill, fee and funding payment, and in what format?
- Where do your servers run, relative to each exchange we trade on?
- If you build it for us: who owns the code, and which parts reuse your existing components?
Where does amBrain fit?
amBrain publishes this blog. It describes parts of its trading work in two lines: “amBrain builds algorithmic trading infrastructure: order execution, market data and pre-trade risk controls.” “Trading terminal development, order management systems, and FIX protocol exchange integration.” FIX is a message format used in trading. Neither line names a crypto trading bot. They are service descriptions only.
In its own words, “amBrain has been building software since 2019.” On how it works with clients, it says: “Three formats: full delivery, a dedicated team, or engineers embedded in your team.” Its line on ownership is “The client keeps full ownership of the product and the code, except our reusable components.” Ask for the list of those components by name before you sign.
This article is not a case study and describes no client work. Nothing in it says that amBrain has built, run or sold a crypto trading bot or trading engine for any client. The quotations come from the published API documentation of Binance, Bybit, OKX and Kraken, the documentation and licence files of Hummingbot and Freqtrade, and pages published by 3Commas and Cryptohopper, all read on 23 November 2026. The article claims no relationship between amBrain and any of them, recommends none of their products and gives no amBrain prices or timelines.
It is not legal or investment advice either. Have a lawyer check licence terms, platform terms and the rules for trading investors' or clients' money in each market where you operate. If amBrain is on your shortlist, ask it the same questions as any other firm.
Topics
- Crypto Trading
- Trading Bots
- Risk Controls
- Build or Buy