> For the complete documentation index, see [llms.txt](https://www.pionex.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pionex.com/docs/api-docs/bot-api/smart-copy.md).

# Smart Copy

Smart Copy Bot management (private)

## Get smart copy order

> Query a smart copy bot order by ID. Weight: 1.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Bot Open API","version":"1.0.0"},"tags":[{"name":"Smart Copy","description":"Smart Copy Bot management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"SmartCopyOrderDetail":{"type":"object","description":"Smart copy bot order detail","properties":{"buOrderId":{"type":"string","description":"Bot order ID"},"buOrderType":{"type":"string","description":"Bot order type (always `smart_copy`)"},"userId":{"type":"string","description":"User ID"},"keyId":{"type":"string","description":"API Key ID"},"exchange":{"type":"string","description":"Exchange identifier"},"base":{"type":"string","description":"Base currency"},"quote":{"type":"string","description":"Quote currency"},"status":{"type":"string","description":"Order status"},"createTime":{"type":"integer","format":"int64","description":"Creation timestamp in milliseconds"},"closeTime":{"type":"integer","format":"int64","description":"Close timestamp in milliseconds"},"copyFrom":{"type":"string","description":"Source order ID (for copy trade orders)"},"copyType":{"type":"string","description":"Copy type"},"strategyId":{"type":"string","description":"Strategy ID"},"canceling":{"type":"integer","format":"int64","description":"Canceling flag"},"note":{"type":"string","description":"Order note"},"closeNote":{"type":"string","description":"Close note"},"customizeName":{"type":"string","description":"Custom name"},"buOrderData":{"$ref":"#/components/schemas/SmartCopyOrderData"}}},"SmartCopyOrderData":{"type":"object","properties":{"buOrderId":{"type":"string","description":"Bot order ID"},"kolSignalId":{"type":"string","description":"KOL signal ID"},"quoteTotalInvestment":{"type":"string","description":"Current total investment in quote currency"},"quoteOriginalInvestment":{"type":"string","description":"Original investment amount in quote currency"},"currentQuoteAmount":{"type":"string","description":"Current quote amount in the bot account"},"initQuotePrice":{"type":"string","description":"Quote/USDT price at order creation"},"closedQuoteAmount":{"type":"string","description":"Quote amount returned on close"},"closedQuotePrice":{"type":"string","description":"Quote/USDT price at close"},"convertIntoEarnCoin":{"type":"integer","format":"int64","description":"Whether assets were converted to earn coin on close"},"reasonBy":{"type":"string","description":"Close reason (e.g. `user_cancel`, `create_failed`)"},"profit":{"type":"string","description":"Total profit in quote currency"},"status":{"type":"string","description":"Order data status"},"shareRatio":{"type":"string","description":"Profit sharing ratio"},"sharedProfit":{"type":"string","description":"Total profit shared"},"closedSharedQuote":{"type":"string","description":"Quote amount deducted for profit sharing on close"},"tradeType":{"type":"string","description":"Trade type: `futures` or `spot`","enum":["futures","spot"]},"fundingFee":{"type":"string","description":"Total funding fee paid"},"roundCount24h":{"type":"integer","format":"int64","description":"Number of completed signal rounds in the last 24 hours"},"kolName":{"type":"string","description":"KOL name"},"kolImage":{"type":"string","description":"KOL avatar URL"},"signalName":{"type":"string","description":"Signal display name"},"market":{"type":"string","description":"Market type"},"portfolio":{"type":"array","description":"Portfolio item details","items":{"$ref":"#/components/schemas/SmartCopyPortfolioItem"}}}},"SmartCopyPortfolioItem":{"type":"object","properties":{"tradeBase":{"type":"string","description":"Actual trading base currency"},"buOrderId":{"type":"string","description":"Bot order ID"},"base":{"type":"string","description":"Base currency for this portfolio item"},"signalType":{"type":"string","description":"Signal type identifier"},"signalParam":{"type":"string","description":"Signal parameters"},"percent":{"type":"string","description":"Allocation percentage"},"initPrice":{"type":"string","description":"Price at position open"},"closedPrice":{"type":"string","description":"Price at position close"},"currentBaseAmount":{"type":"string","description":"Current base amount held"},"closedBaseAmount":{"type":"string","description":"Base amount returned on close"},"closedQuoteAmount":{"type":"string","description":"Quote amount returned on close"},"totalFeeInBase":{"type":"string","description":"Total trading fees in base currency"},"totalFeeInQuote":{"type":"string","description":"Total trading fees in quote currency"},"profit":{"type":"string","description":"Profit for this portfolio item"},"roundCount":{"type":"integer","format":"int64","description":"Total completed signal rounds"},"currentRound":{"type":"integer","format":"int64","description":"Current signal round number"},"currentRoundMonth":{"type":"string","description":"Current round month label"},"status":{"type":"string","description":"Portfolio item status"},"expiredAt":{"type":"integer","format":"int64","description":"Expiry timestamp in milliseconds (0 = no expiry)"},"sharedAmount":{"type":"string","description":"Profit sharing amount for this item"},"leverage":{"type":"integer","format":"int64","description":"Leverage multiplier"},"fundingFee":{"type":"string","description":"Funding fee for this item"},"qtyLong":{"type":"string","description":"Long position quantity"},"qtyShort":{"type":"string","description":"Short position quantity"},"amountLong":{"type":"string","description":"Long position amount in quote"},"amountShort":{"type":"string","description":"Short position amount in quote"},"amountSettle":{"type":"string","description":"Settlement amount"},"maintPrice":{"type":"string","description":"Maintenance margin price"},"profitRoundCount":{"type":"integer","format":"int64","description":"Number of profitable rounds"},"profitPositive":{"type":"string","description":"Total positive profit accumulated"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code. Common bot error codes:\n- `BOT_INVALID_ARGUMENT` — Business validation failure (e.g. invalid parameters, order state conflict, PnL check failure). The `message` field contains the specific reason.\n- `BOT_INTERNAL_ERROR` — System/RPC error (network timeout, downstream service unavailable). Retrying may help.\n- `PARAMETER_ERROR` — Request parameter format error.\n"},"message":{"type":"string","description":"Human-readable error message with specific reason"},"data":{"description":"Optional partial data returned with validation errors (e.g. min_investment, estimate data)"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v1/bot/orders/smartCopy/order":{"get":{"tags":["Smart Copy"],"summary":"Get smart copy order","description":"Query a smart copy bot order by ID. Weight: 1.","operationId":"getSmartCopyOrder","parameters":[{"$ref":"#/components/parameters/Timestamp"},{"name":"buOrderId","in":"query","required":true,"description":"Bot order ID (UUID, 36 chars)","schema":{"type":"string"}},{"name":"lang","in":"query","description":"Language code (e.g. en, zh)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SmartCopyOrderDetail"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Check smart copy parameters

> Validate smart copy bot creation parameters and check the maximum investment limit. Weight: 1.\
> \
> \*\*Requires \`Bot reading\` permission.\*\*\
> \
> Returns the maximum allowed investment, maximum leverage, and notional/available limits for the given base/quote/signal combination.<br>

```json
{"openapi":"3.0.3","info":{"title":"Pionex Bot Open API","version":"1.0.0"},"tags":[{"name":"Smart Copy","description":"Smart Copy Bot management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"CheckSmartCopyParamsRequest":{"type":"object","required":["base","quote","leverage","quote_investment"],"properties":{"base":{"type":"string","description":"Base currency (e.g. BTC)"},"quote":{"type":"string","description":"Quote currency (e.g. USDT)"},"signal_type":{"type":"string","description":"Signal type identifier. Optional — omit to check without a specific signal."},"signal_param":{"type":"string","description":"Signal parameters JSON string. Optional."},"leverage":{"type":"integer","format":"int64","description":"Leverage multiplier (>= 1)","minimum":1},"quote_investment":{"type":"string","description":"Investment amount in quote currency to check against limits."}}},"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"CheckSmartCopyParamsData":{"type":"object","description":"Smart copy parameter check result data.","properties":{"result":{"type":"boolean","description":"Whether the investment is within limits"},"max_investment":{"type":"string","description":"Maximum allowed investment amount in quote currency"},"max_leverage":{"type":"string","description":"Maximum allowed leverage"},"notional_limit":{"type":"string","description":"Total notional limit (quote_investment * leverage ceiling)"},"available_limit":{"type":"string","description":"Remaining available notional for this base/quote/signal combination"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code. Common bot error codes:\n- `BOT_INVALID_ARGUMENT` — Business validation failure (e.g. invalid parameters, order state conflict, PnL check failure). The `message` field contains the specific reason.\n- `BOT_INTERNAL_ERROR` — System/RPC error (network timeout, downstream service unavailable). Retrying may help.\n- `PARAMETER_ERROR` — Request parameter format error.\n"},"message":{"type":"string","description":"Human-readable error message with specific reason"},"data":{"description":"Optional partial data returned with validation errors (e.g. min_investment, estimate data)"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v1/bot/orders/smartCopy/checkParams":{"post":{"tags":["Smart Copy"],"summary":"Check smart copy parameters","description":"Validate smart copy bot creation parameters and check the maximum investment limit. Weight: 1.\n\n**Requires `Bot reading` permission.**\n\nReturns the maximum allowed investment, maximum leverage, and notional/available limits for the given base/quote/signal combination.\n","operationId":"checkSmartCopyParams","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckSmartCopyParamsRequest"}}}},"responses":{"200":{"description":"Check result","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckSmartCopyParamsData"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Create smart copy order

> Create a new smart copy bot order. Weight: 1.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Bot Open API","version":"1.0.0"},"tags":[{"name":"Smart Copy","description":"Smart Copy Bot management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"CreateSmartCopyOrderRequest":{"type":"object","required":["base","quote","bu_order_data"],"properties":{"base":{"type":"string","description":"Base currency (e.g. BTC)"},"quote":{"type":"string","description":"Quote currency (e.g. USDT)"},"key_id":{"type":"string","description":"API Key ID. Optional — derived from the API key used for authentication when omitted."},"note":{"type":"string","description":"Optional order note"},"copy_from":{"type":"string","description":"Source order ID to copy from (for copy trade orders)"},"copy_type":{"type":"string","description":"Copy type identifier"},"bu_order_data":{"$ref":"#/components/schemas/CreateSmartCopyOrderBuOrderData"}}},"CreateSmartCopyOrderBuOrderData":{"type":"object","required":["quote_total_investment","portfolio"],"properties":{"quote_total_investment":{"type":"string","description":"Total investment amount in quote currency"},"compound":{"type":"boolean","description":"Whether to enable compound interest (reinvest profits)","default":false},"profit_stop_maker":{"type":"boolean","description":"Whether to enable profit stop maker","default":false},"portfolio":{"type":"array","description":"List of portfolio items (at least 1 required)","minItems":1,"items":{"$ref":"#/components/schemas/SmartCopyPortfolioItemRequest"}}}},"SmartCopyPortfolioItemRequest":{"type":"object","required":["base","signal_type","leverage"],"properties":{"base":{"type":"string","description":"Base currency for this portfolio item"},"signal_type":{"type":"string","description":"Signal type identifier"},"signal_param":{"type":"string","description":"Signal parameters JSON string. Optional."},"percent":{"type":"string","description":"Allocation percentage of total investment for this item (e.g. \"1\" = 100%)"},"leverage":{"type":"integer","format":"int64","description":"Leverage multiplier for this item (>= 1)","minimum":1},"profit_stop_ratio":{"type":"string","description":"Take profit ratio (e.g. \"0.5\" = 50% profit triggers close)"},"loss_stop_ratio":{"type":"string","description":"Stop loss ratio (e.g. \"-0.2\" = 20% loss triggers close)"}}},"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"CreateSmartCopyOrderResponse":{"type":"object","properties":{"bu_order_id":{"type":"string","description":"Created bot order ID"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code. Common bot error codes:\n- `BOT_INVALID_ARGUMENT` — Business validation failure (e.g. invalid parameters, order state conflict, PnL check failure). The `message` field contains the specific reason.\n- `BOT_INTERNAL_ERROR` — System/RPC error (network timeout, downstream service unavailable). Retrying may help.\n- `PARAMETER_ERROR` — Request parameter format error.\n"},"message":{"type":"string","description":"Human-readable error message with specific reason"},"data":{"description":"Optional partial data returned with validation errors (e.g. min_investment, estimate data)"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v1/bot/orders/smartCopy/create":{"post":{"tags":["Smart Copy"],"summary":"Create smart copy order","description":"Create a new smart copy bot order. Weight: 1.","operationId":"createSmartCopyOrder","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSmartCopyOrderRequest"}}}},"responses":{"200":{"description":"Order created successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreateSmartCopyOrderResponse"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Cancel smart copy order

> Close and cancel a smart copy bot order. Weight: 1.

```json
{"openapi":"3.0.3","info":{"title":"Pionex Bot Open API","version":"1.0.0"},"tags":[{"name":"Smart Copy","description":"Smart Copy Bot management (private)"}],"servers":[{"url":"https://api.pionex.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"PIONEX-KEY","description":"API Key authentication. Requires two headers:\n- `PIONEX-KEY`: Your API Key\n- `PIONEX-SIGNATURE`: HMAC SHA256 hex signature\n\nAnd a `timestamp` query parameter (milliseconds).\n"}},"parameters":{"Timestamp":{"name":"timestamp","in":"query","required":true,"description":"Current timestamp in milliseconds (valid range +/- 20 seconds)","schema":{"type":"integer","format":"int64"}}},"schemas":{"CancelSmartCopyOrderRequest":{"type":"object","required":["bu_order_id"],"properties":{"bu_order_id":{"type":"string","description":"Bot order ID to cancel"},"close_note":{"type":"string","description":"Optional close reason note"},"convert_into_earn_coin":{"type":"boolean","description":"Whether to convert remaining assets into earn coin on close","default":false}}},"BaseResponse":{"type":"object","properties":{"result":{"type":"boolean","description":"Request success indicator"},"timestamp":{"type":"integer","format":"int64","description":"Response timestamp in milliseconds"}}},"CancelSmartCopyOrderResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the cancellation was accepted"}}},"ErrorResponse":{"type":"object","properties":{"result":{"type":"boolean"},"code":{"type":"string","description":"Error code. Common bot error codes:\n- `BOT_INVALID_ARGUMENT` — Business validation failure (e.g. invalid parameters, order state conflict, PnL check failure). The `message` field contains the specific reason.\n- `BOT_INTERNAL_ERROR` — System/RPC error (network timeout, downstream service unavailable). Retrying may help.\n- `PARAMETER_ERROR` — Request parameter format error.\n"},"message":{"type":"string","description":"Human-readable error message with specific reason"},"data":{"description":"Optional partial data returned with validation errors (e.g. min_investment, estimate data)"},"timestamp":{"type":"integer","format":"int64"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/api/v1/bot/orders/smartCopy/cancel":{"post":{"tags":["Smart Copy"],"summary":"Cancel smart copy order","description":"Close and cancel a smart copy bot order. Weight: 1.","operationId":"cancelSmartCopyOrder","parameters":[{"$ref":"#/components/parameters/Timestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSmartCopyOrderRequest"}}}},"responses":{"200":{"description":"Order cancelled successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CancelSmartCopyOrderResponse"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```
