Copy a bot
POST https://rest.haasapi.com/v1/partner/users/{user_id}/bots/{bot_id}/copy
Copies the bot in the path (the master) to the end-user in the path - native copy-trading. Set follow_updates to make the copy a live follower that tracks the master’s edits; config optionally overrides the master’s settings. The target end-user must trade on the master’s exchange. Answers 201 with the created copy. Signal bots and copies-of-copies cannot be copied.
Requires the partner scope.
Request body
Section titled “Request body”{ "follow_updates": true, "config": null}CopyPartnerBotRequest
Section titled “CopyPartnerBotRequest”| Field | Type | Description |
|---|---|---|
follow_updates |
boolean | Make the copy a live follower that tracks the master’s edits. Defaults to false (a one-time independent copy). |
config |
object, nullable | Optional overrides for the master’s settings, by their snake_case keys. Omit to copy the master as-is. |
Example request
Section titled “Example request”curl "https://rest.haasapi.com/v1/partner/users/{user_id}/bots/{bot_id}/copy" \ -X POST \ -H "Authorization: Bearer hk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"follow_updates":true,"config":null}'Response
Section titled “Response”201 Created. Returns a PartnerBot.
{ "bot_id": "7b90995d7434433f81cb652d7bc0ce25", "user_id": "8f14e45f-ceea-467a-9c9a-2b0f1d6a3c77", "status": "running", "type": "spot_grid", "exchange": "BINANCE", "master_bot_id": null, "created_at": "2026-08-28T19:04:11Z", "profit": "128.44", "roi": "0.062", "cloned": 0, "followers": 0, "config": { "symbol": "BTC_USDT", "lower_limit": 25000, "upper_limit": 35000, "grid_count": 20, "investment_asset": "USDT", "investment_amount": 500 }}Fields
Section titled “Fields”PartnerBot
Section titled “PartnerBot”| Field | Type | Description |
|---|---|---|
bot_id |
string | The bot identifier. |
user_id |
string | The end-user that owns this bot. |
status |
BotStatus | Whether the bot is currently running or stopped. |
type |
WhiteLabelScriptType | The strategy type the bot runs. |
exchange |
string, nullable | Exchange the bot trades on. |
master_bot_id |
string, nullable | The master bot this one copies, if it is a copy; null for an original bot. |
created_at |
string | When the bot was created. RFC 3339 UTC. |
profit |
string (decimal) | Realized profit in the quote currency, as a decimal string. |
roi |
string (decimal) | Return on investment as a decimal string (0.15 = 15%). |
cloned |
integer (int32) | How many times this bot has been copied. |
followers |
integer (int32) | Copies currently following this bot’s updates. |
config |
object, nullable | The bot’s current strategy configuration, keyed by the same snake_case keys create and edit take (see GET /v1/partner/strategies). Read it to pre-fill an edit, then send the changed keys back to PUT …/bots/{bot_id}. Null when the bot has no stored config. |
Errors
Section titled “Errors”All errors are RFC 9457 problem documents.
| Status | Description |
|---|---|
400 |
The request is malformed (invalid limit, unusable cursor, …). (code: invalid_request) |
401 |
Missing, malformed, disabled, or revoked API key. (code: invalid_api_key) |
404 |
No accessible bot with that id to copy. (code: bot_not_found) No accessible target end-user with that id. (code: user_not_found) |
409 |
The bot is a copy of another bot, or a signal bot; it cannot be copied. (code: cannot_copy) A request with this Idempotency-Key is still being processed. (code: idempotency_in_progress) |
422 |
The target end-user does not trade on the master bot’s exchange. (code: exchange_mismatch) An override was rejected by the strategy. (code: invalid_config) The Idempotency-Key was already used with a different request. (code: idempotency_key_reuse) |
500 |
An unexpected error inside the API. Nothing about the request caused it; retry, and quote the instance value if it persists. (code: internal_error) |
502 |
An internal service answered in a way the API could not serve. Retry. (code: upstream_error) |
503 |
The request could not be served right now. Retry with the same key - do not discard it. (code: temporarily_unavailable) |
504 |
An internal service did not answer within the deadline. Retry with backoff. (code: upstream_timeout) |
{ "type": "https://docs.haasapi.com/errors/invalid_request", "title": "Invalid request", "status": 400, "detail": "The request is malformed (invalid limit, unusable cursor, …).", "code": "invalid_request"}