# Trade/Full Margin Contract

## Place an order

> Description: Contract full position trading order   group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.addMarketOrder  &#x20;

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.CfdMMOrderApiService.addMarketOrder":{"post":{"summary":"Place an order","deprecated":false,"description":"Description: Contract full position trading order   group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.addMarketOrder   ","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Game ID, should be filled with 1 for this game","format":"long"},"accountId":{"type":"integer","title":"Account ID","description":"Account ID, optional. If filled, trading will be conducted with this account","format":"long"},"bizType":{"type":"integer","title":"Business type","description":"Business type, 1-Market price open; 2-Market price close; 10-Limit price pending order; 11-Stop loss pending order; 12-Limit price open","format":"int32"},"direction":{"type":"integer","title":"Order buy/sell direction","description":"Order buy/sell direction, 1-Buy; 2-Sell;","format":"int32"},"symbolId":{"type":"integer","title":"Product ID","format":"long","description":"Product ID, product ID"},"positionId":{"type":"integer","title":"Position ID","description":"Position ID, required when placing a closing order","format":"long"},"requestTime":{"type":"integer","title":"Order request time","description":"Order request time, 13-digit timestamp","format":"long"},"requestPrice":{"type":"string","title":"Order price at the time of placing","description":"Price at the time of order placement, needs to be multiplied by 10 to the power of 'product price decimal places', converted to an integer for input. Only for order recording, not the actual transaction price."},"requestNum":{"type":"string","title":"Order quantity","description":"Order quantity"},"stopLoss":{"type":"string","title":"Stop loss unit price","description":"Stop loss unit price, need to multiply by 10 to the power of 'product quote decimal places', and process it as an integer input."},"takeProfit":{"type":"string","title":"Take profit unit price","description":"Take profit unit price, need to multiply by 10 to the power of 'product quote decimal places', and process it as an integer input."},"expireType":{"type":"integer","title":"Expiration type","description":"Expiration type, only valid for pending orders. 1-Valid for the day; 2-Valid for the week； 3-30 days; 4-90 days; Default 2","format":"int32"},"remark":{"type":"string","title":"Remarks","description":"Remarks"},"accountCurrency":{"type":"string","title":"Account currency","description":"Account currency"},"accountDigits":{"type":"integer","title":"Account Decimal Places","format":"int32","description":"Account Decimal Places"},"crossLevelNum":{"type":"integer","title":"Leverage ratio","format":"int32","description":"Leverage ratio, only valid for opening positions, there should only be one leverage ratio for the same product"},"source":{"type":"string","description":"H5: mobile web; PC_Web: pcweb; System: system; Android: Android native app; iOS: Apple native app; HOS: Hongmeng OS; PC_Win: pcwindows client; PC_Mac: pcmac client; default is the same as login source. (limited to 255 characters, enumeration is for reference only,Only letters, numbers, and underscores can be used)"},"thirdPartyOrder":{"type":"string","description":"(limited to 255 characters,Only letters, numbers, and underscores can be used)"},"slippage":{"type":"string","description":"Only market orders are valid. It can be a percentage (only supports 2 decimal places, rounding off any excess) or a floating-point type that only supports 4 decimal places, rounding off any excess). Other formats are not supported."}},"required":["tradeType","bizType","direction","symbolId","requestTime","requestPrice","requestNum","accountCurrency","accountDigits"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code","description":"Module identifier code"},"code":{"type":"string","title":"Status return code","description":"Status return code"},"msg":{"type":"string","title":"Status description","description":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)","description":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code","description":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas","description":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean","description":"Whether the response is successful"},"fail":{"type":"boolean","description":"Whether the response is failed"},"data":{"type":"object","properties":{"orderId":{"type":"integer","title":"Order number","format":"long","description":"Order number"},"positionId":{"type":"integer","title":"Position number","format":"long","description":"Position number"},"tradeVolume":{"type":"string","title":"Trading volume","description":"Trading volume"},"openPrice":{"type":"string","title":"Opening price","description":"Opening price"},"executePrice":{"type":"string","title":"Execution price","description":"Execution price"},"openDirection":{"type":"integer","title":"Buy/sell direction at the time of opening","description":"Buy/sell direction when opening a position, 1-Buy; 2-Sell;","format":"int32"},"direction":{"type":"integer","title":"Buy/sell direction for this order","description":"Buy/sell direction for this order, 1-Buy; 2-Sell;","format":"int32"},"openOrClose":{"type":"integer","title":"Open/close type for this order","description":"Open/close type for this order, 1-Open position; 2-Close position;","format":"int32"},"symbolName":{"type":"string","title":"Product name","description":"Product name"},"symbolId":{"type":"integer","title":"Product Id","format":"long","description":"Product Id"},"stopLoss":{"type":"string","title":"Stop loss price","description":"Stop-loss price, consistent with the input parameters"},"takeProfit":{"type":"string","title":"Take profit price","description":"Take-profit price, consistent with the input parameters"},"digits":{"type":"integer","title":"Product decimal places","format":"int32","description":"Product decimal places"},"fee":{"type":"string","title":"Placing Order Handling Fee","description":"Placing Order Handling Fee"},"interest":{"type":"string","title":"Interest","description":"Interest, only exists when closing a position"},"profit":{"type":"string","title":"Profit and Loss","description":"Profit and loss, only exists when closing a position"}},"title":"Data Body","description":"Data Body"}}}}},"headers":{}}}}}}}
```

## Modify Pending Order

> group=tradeApi\
> version=0.0.1\
> bizType=tradeapi.app.OrderApiService.updatePboOrder

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.OrderApiService.updatePboOrder":{"post":{"summary":"Modify Pending Order","deprecated":false,"description":"group=tradeApi\nversion=0.0.1\nbizType=tradeapi.app.OrderApiService.updatePboOrder","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Should be filled with 1 under this gameplay","format":"long"},"accountId":{"type":"integer","title":"Account ID","description":"Optional. If filled, trading will be conducted with this account","format":"long"},"pboId":{"type":"string","title":"Pending Order ID"},"stopLoss":{"type":"number","title":"Stop loss unit price","description":"Needs to be multiplied by 10 to the power of 'product quote decimal places', processed as an integer and passed in."},"takeProfit":{"type":"number","title":"Take profit unit price","description":"Needs to be multiplied by 10 to the power of 'product quote decimal places', processed as an integer and passed in."},"requestNum":{"type":"number","title":"Request Quantity/Amount"},"requestPrice":{"type":"number","title":"Request Price"}},"required":["tradeType","pboId"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code"},"code":{"type":"string","title":"Status return code"},"msg":{"type":"string","title":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean"},"fail":{"type":"boolean"},"data":{"type":"object","properties":{"orderId":{"type":"integer","title":"Order number","format":"long"},"positionId":{"type":"integer","title":"Position number","format":"long"},"tradeVolume":{"type":"string","title":"Trading volume"},"openPrice":{"type":"string","title":"Opening price"},"executePrice":{"type":"string","title":"Execution price"},"openDirection":{"type":"integer","title":"Buy/sell direction at the time of opening","description":"1-Buy; 2-Sell;","format":"int32"},"direction":{"type":"integer","title":"Buy/sell direction for this order","description":"1-Buy; 2-Sell;","format":"int32"},"openOrClose":{"type":"integer","title":"Open/close type for this order","description":"1- Opening; 2- Closing;","format":"int32"},"symbolName":{"type":"string","title":"Product name"},"symbolId":{"type":"integer","title":"Product Id","format":"long"},"stopLoss":{"type":"string","title":"Stop loss price","description":"Consistent with the input parameters"},"takeProfit":{"type":"string","title":"Take profit price","description":"Consistent with the input parameters"},"digits":{"type":"integer","title":"Product decimal places","format":"int32"},"fee":{"type":"string","title":"Placing Order Handling Fee"},"interest":{"type":"string","title":"Interest","description":"Only Closing Exists"},"profit":{"type":"string","title":"Profit and Loss","description":"Only Closing Exists"}},"title":"Data Body"}}}}},"headers":{}}}}}}}
```

## Set position stop loss and take profit

> Explanation: Set position stop loss and take profit   group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.updateOrder

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.CfdMMOrderApiService.updateOrder":{"post":{"summary":"Set position stop loss and take profit","deprecated":false,"description":"Explanation: Set position stop loss and take profit   group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.updateOrder","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Should be filled with 1 under this gameplay","format":"long"},"accountId":{"type":"integer","title":"Account ID","format":"long","description":"Account ID, must fill in either account currency"},"accountCurrency":{"type":"string","title":"Account currency","description":"Account currency, must fill in either account ID"},"orderId":{"type":"integer","title":"Order ID","format":"long","description":"Order ID"},"positionId":{"type":"integer","title":"Position ID","format":"long","description":"Position ID"},"accountDigits":{"type":"integer","title":"Account Decimal Places","format":"long","description":"Account Decimal Places"},"stopLoss":{"type":"string","title":"Stop loss unit price","description":"Stop loss unit price, need to multiply by 10 to the power of 'product quote decimal places', and process it as an integer input."},"takeProfit":{"type":"string","title":"Take profit unit price","description":"Take profit unit price, need to multiply by 10 to the power of 'product quote decimal places', and process it as an integer input."},"remark":{"type":"string","title":"Remarks","description":"Remarks"}},"required":["tradeType","orderId","positionId","accountDigits"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code"},"code":{"type":"string","title":"Status return code"},"msg":{"type":"string","title":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean"},"fail":{"type":"boolean"},"data":{"type":"object","properties":{"positionId":{"type":"integer","title":"Position ID","format":"long"},"orderId":{"type":"integer","title":"Order ID","format":"long"},"dealId":{"type":"integer","title":"Deal ID","format":"long"},"status":{"type":"string","title":"Position status","description":"0-Initialization; 1-Position holding; 2-Completed; 3-Partial closing;"},"direction":{"type":"integer","format":"int32","title":"Buy/Sell Direction","description":"1-Buy; 2-Sell;"},"symbolId":{"type":"integer","title":"Product ID","format":"long"},"symbolName":{"type":"string","title":"Product name"},"openAccountDigits":{"type":"integer","title":"Account decimal places for opening","format":"int32"},"openSymbolDigits":{"type":"integer","format":"int32","title":"Product decimal places for opening"},"openContractSize":{"type":"integer","format":"int32","title":"Contract size"},"openPrice":{"type":"string","title":"Opening unit price"},"openNum":{"type":"string","title":"Opening quantity"},"closeAccountDigits":{"type":"integer","title":"Account decimal places for closing","format":"int32"},"closeSymbolDigits":{"type":"integer","title":"Product decimal places for closing","format":"int32"},"closePrice":{"type":"string","title":"Closing unit price"},"closeFreeDigits":{"type":"string","title":"Closing commission decimal places"},"profit":{"type":"string","title":"Profit and Loss"},"openMargin":{"type":"string","title":"Opening margin used"},"stopLoss":{"type":"string","title":"Stop loss unit price","description":"Original registered value, untreated"},"takeProfit":{"type":"string","title":"Take profit unit price","description":"Original registered value, untreated"},"remark":{"type":"string","title":"Remarks"},"margin":{"type":"string","title":"Real-time margin used"},"openTime":{"type":"integer","format":"long","title":"Opening time","description":"13-digit timestamp"},"closeTime":{"type":"integer","format":"long","title":"Closing time","description":"13-digit timestamp"},"openFee":{"type":"string","title":"Opening commission"},"closeFee":{"type":"string","title":"Closing commission"},"closeNum":{"type":"string","title":"Closing quantity"},"openVolume":{"type":"string","title":"Opening lots"},"closeVolume":{"type":"string","title":"Closing lots"},"minVolume":{"type":"string","title":"Minimum lots per side"},"volume":{"type":"string","title":"Lots"},"marginSetType":{"type":"string","title":"Margin type","description":"1-Ratio; 2-Range;"}}}}}}},"headers":{}}}}}}}
```

## Closing record

> Explanation: Query historical closing records\
> \
> \
> group=tradeApi\
> version=0.0.1\
> bizType=tradeapi.app.OrderApiService.queryHistoryCloseOrderList

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.CfdMMOrderApiService.queryHistoryCloseOrderList":{"post":{"summary":"Closing record","deprecated":false,"description":"Explanation: Query historical closing records\n\n\ngroup=tradeApi\nversion=0.0.1\nbizType=tradeapi.app.OrderApiService.queryHistoryCloseOrderList","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Should be filled with 1 under this gameplay","format":"long"},"accountId":{"type":"integer","title":"Account ID","format":"long"},"sortFieldName":{"type":"string","title":"Sort field name","description":"pnl-Profit; openTime-Opening time; closeTime-Closing time; orderId-Order ID; symbolId-Product ID;"},"sortType":{"type":"string","title":"Sort type","description":"desc-Descending order; asc-Ascending order;"},"symbolId":{"type":"integer","title":"Product ID","format":"long"},"openStartTime":{"type":"integer","title":"Opening start time","description":"13-digit timestamp","format":"long"},"openEndTime":{"type":"integer","title":"Opening end time","description":"13-digit timestamp","format":"long"},"closeStartTime":{"type":"integer","title":"Closing start time","description":"13-digit timestamp","format":"long"},"closeEndTime":{"type":"integer","title":"Closing end time","description":"13-digit timestamp","format":"long"},"current":{"type":"integer","title":"Page number","description":"Default 1","format":"int32"},"size":{"type":"integer","title":"Data quantity per page","description":"Default 20","format":"int32"},"querySource":{"type":"string","description":"H5: mobile web; PC_Web: pcweb; System: system; Android: Android native app; iOS: Apple native app; HOS: Hongmeng OS; PC_Win: pcwindows client; PC_Mac: pcmac client; default is the same as login source. (The enumeration is for reference only)"},"thirdPartyOrder":{"type":"string"}},"required":["tradeType","sortFieldName","sortType"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code"},"code":{"type":"string","title":"Status return code"},"msg":{"type":"string","title":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean"},"fail":{"type":"boolean"},"data":{"type":"object","properties":{"current":{"type":"integer","title":"Current page number","format":"int32"},"totalPnl":{"type":"number","title":"Total profit","format":"double"},"size":{"type":"integer","title":"Data quantity per page","format":"int32"},"totalPage":{"type":"integer","title":"Total number of pages","format":"int32"},"list":{"type":"array","items":{"type":"object","properties":{"symbolId":{"type":"integer","format":"long","title":"Product ID"},"bizType":{"type":"integer","format":"int32","title":"Closing type","description":"2-Market price closing; 3-Stop loss closing; 4-Take profit closing; 5-Liquidation forced closing; 6-Product expiration forced closing; 7-Account closure closing; 8-Manual forced closing;"},"orderId":{"type":"integer","format":"long","title":"Order ID"},"openVolume":{"type":"string","title":"Opening lots"},"openPrice":{"type":"string","title":"Opening price"},"closeVolume":{"type":"string","title":"Closing lots"},"closePrice":{"type":"string","title":"Closing price"},"takeProfit":{"type":"string","title":"Take profit price","description":"Display as '-' if not set"},"stopLoss":{"type":"string","title":"Stop loss price","description":"Display as '-' if not set"},"closeTime":{"type":"integer","title":"Closing time","format":"long","description":"13-digit timestamp"},"commission":{"type":"string","title":"Commission fee"},"symbolName":{"type":"string","title":"Product name"},"openTime":{"type":"integer","format":"long","title":"Opening time","description":"13-digit timestamp"},"profit":{"type":"string","title":"Profit"},"interest":{"type":"string","title":"Position interest"},"openDirection":{"type":"integer","title":"Opening direction","description":"1-Buy; 2-Sell;","format":"int32"},"closeDirection":{"type":"integer","format":"int32","description":"1-Buy; 2-Sell;","title":"Closing direction"},"source":{"type":"string","description":"H5: mobile web; PC_Web: pcweb; System: system; Android: Android native app; iOS: Apple native app; HOS: Hongmeng OS; PC_Win: pcwindows client; PC_Mac: pcmac client; default is the same as login source. (The enumeration is for reference only)"},"thirdPartyOrder":{"type":"string"}}},"title":"Closing List Collection"}},"title":"Data Body"}}}}},"headers":{}}}}}}}
```

## Set leverage multiplier

> Description: Contract-full position gameplay, set the customer's leverage multiplier for the product, affecting all positions of the product\
> \
> group=tradeApi\
> version=0.0.1\
> bizType=tradeapi.app.OrderApiService.setCrossLevelNum

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.CfdMMOrderApiService.setCrossLevelNum":{"post":{"summary":"Set leverage multiplier","deprecated":false,"description":"Description: Contract-full position gameplay, set the customer's leverage multiplier for the product, affecting all positions of the product\n\ngroup=tradeApi\nversion=0.0.1\nbizType=tradeapi.app.OrderApiService.setCrossLevelNum","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Should be filled with 1 under this gameplay","format":"long"},"companyId":{"type":"integer","title":"Company ID","format":"long"},"customerId":{"type":"integer","title":"Client ID","format":"long"},"customerNo":{"type":"string","title":"Client number"},"customerGroupId":{"type":"integer","title":"Client group ID","format":"long"},"symbolId":{"type":"integer","title":"Product ID","format":"long"},"requestTime":{"type":"integer","title":"Leverage ratio","format":"int32"},"trace":{"type":"string","title":"Tracking code"}},"required":["tradeType","customerId","customerNo","customerGroupId","requestTime","companyId","symbolId"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code"},"code":{"type":"string","title":"Status return code"},"msg":{"type":"string","title":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean"},"fail":{"type":"boolean"},"data":{"type":"object","properties":{"crossLevelNum":{"type":"integer","title":"Leverage ratio","format":"int32"}},"title":"Data Body"}}}}},"headers":{}}}}}}}
```

## Order Trial Calculation

> Explanation: Calculate margin and commission for placing orders  group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.calculateMarketOrder

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.CfdMMOrderApiService.calculateMarketOrder":{"post":{"summary":"Order Trial Calculation","deprecated":false,"description":"Explanation: Calculate margin and commission for placing orders  group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.calculateMarketOrder","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Should be filled with 1 under this gameplay","format":"long"},"accountId":{"type":"integer","title":"Account ID","description":"Optional. If filled, trading will be conducted with this account","format":"long"},"bizType":{"type":"integer","title":"Business type","description":"1-Market price open; 2-Market price close; 10-Limit price pending order; 11-Stop loss pending order; 12-Limit price open","format":"int32"},"direction":{"type":"integer","title":"Order buy/sell direction","description":"1-Buy; 2-Sell;","format":"int32"},"symbolId":{"type":"integer","title":"Product ID","format":"long"},"positionId":{"type":"integer","title":"Position ID","description":"Required when placing a closing order","format":"long"},"requestTime":{"type":"integer","title":"Order request time","description":"13-digit timestamp","format":"long"},"requestPrice":{"type":"string","title":"Order price at the time of placing","description":"For order record only, not the actual transaction price*"},"requestNum":{"type":"string","title":"Order quantity"},"expireType":{"type":"integer","title":"Expiration type","description":"Only valid for pending orders. 1-Valid for the day; 2-Valid for the week;","format":"int32"},"remark":{"type":"string","title":"Remarks"},"accountCurrency":{"type":"string","title":"Account currency"},"accountDigits":{"type":"integer","title":"Account Decimal Places","format":"int32"},"crossLevelNum":{"type":"integer","title":"Leverage ratio","format":"int32","description":"Only valid for opening positions, only one leverage ratio should be set for the same product"}},"required":["tradeType","bizType","direction","symbolId","requestTime","requestPrice","requestNum","accountCurrency","accountDigits"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code"},"code":{"type":"string","title":"Status return code"},"msg":{"type":"string","title":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean"},"fail":{"type":"boolean"},"data":{"type":"object","properties":{"fee":{"type":"string","title":"Commission fee"},"margin":{"type":"string","title":"Margin"},"calculatePrice":{"type":"string","title":"Calculation price"}},"title":"Data Body"}}}}},"headers":{}}}}}}}
```

## Position Details

> Description: Query position details\
> \
> group=tradeApi\
> version=0.0.1\
> bizType=tradeapi.app.PositionApiService.queryPositionDetail

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.CfdMMPositionApiService.queryPositionDetail":{"post":{"summary":"Position Details","deprecated":false,"description":"Description: Query position details\n\ngroup=tradeApi\nversion=0.0.1\nbizType=tradeapi.app.PositionApiService.queryPositionDetail","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Should be filled with 1 under this gameplay","format":"long"},"accountId":{"type":"integer","title":"Account ID","format":"long"},"positionId":{"type":"integer","title":"Position ID","format":"long"}},"required":["tradeType","positionId"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code"},"code":{"type":"string","title":"Status return code"},"msg":{"type":"string","title":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean"},"fail":{"type":"boolean"},"data":{"type":"object","properties":{"positionId":{"type":"integer","title":"Position ID","format":"long"},"orderId":{"type":"integer","title":"Order ID","format":"long"},"dealId":{"type":"integer","title":"Deal ID","format":"long"},"status":{"type":"string","title":"Position status","description":"0-Initialization; 1-Position holding; 2-Completed; 3-Partial closing;"},"direction":{"type":"integer","format":"int32","title":"Buy/Sell Direction","description":"1-Buy; 2-Sell;"},"symbolId":{"type":"integer","title":"Product ID","format":"long"},"symbolName":{"type":"string","title":"Product name"},"openAccountDigits":{"type":"integer","title":"Account decimal places for opening","format":"int32"},"openSymbolDigits":{"type":"integer","format":"int32","title":"Product decimal places for opening"},"openContractSize":{"type":"integer","format":"int32","title":"Contract size"},"openPrice":{"type":"string","title":"Opening unit price"},"openNum":{"type":"string","title":"Opening quantity"},"closeAccountDigits":{"type":"integer","title":"Account decimal places for closing","format":"int32"},"closeSymbolDigits":{"type":"integer","title":"Product decimal places for closing","format":"int32"},"closePrice":{"type":"string","title":"Closing unit price"},"closeFreeDigits":{"type":"string","title":"Closing commission decimal places"},"profit":{"type":"string","title":"Profit and Loss"},"openMargin":{"type":"string","title":"Opening margin used"},"stopLoss":{"type":"string","title":"Stop loss unit price","description":"Original registered value, untreated"},"takeProfit":{"type":"string","title":"Take profit unit price","description":"Original registered value, untreated"},"remark":{"type":"string","title":"Remarks"},"margin":{"type":"string","title":"Real-time margin used"},"openTime":{"type":"integer","format":"long","title":"Opening time","description":"13-digit timestamp"},"closeTime":{"type":"integer","format":"long","title":"Closing time","description":"13-digit timestamp"},"openFee":{"type":"string","title":"Opening commission"},"closeFee":{"type":"string","title":"Closing commission"},"closeNum":{"type":"string","title":"Closing quantity"},"openVolume":{"type":"string","title":"Opening lots"},"closeVolume":{"type":"string","title":"Closing lots"},"minVolume":{"type":"string","title":"Minimum lots per side"},"stopLossDecimal":{"type":"string","title":"Stop loss unit price","description":"`stopLoss` processed based on `closeSymbolDigits`. Used for direct display on the frontend"},"takeProfitDecimal":{"type":"string","title":"Take profit unit price","description":"`takeProfit` processed based on `closeSymbolDigits`. Used for direct display on the frontend"},"volume":{"type":"string","title":"Lots"},"marginSetType":{"type":"string","title":"Margin type","description":"1-Ratio; 2-Range;"},"source":{"type":"string","description":"H5: mobile web; PC_Web: pcweb; System: system; Android: Android native app; iOS: Apple native app; HOS: Hongmeng OS; PC_Win: pcwindows client; PC_Mac: pcmac client; default is the same as login source. (The enumeration is for reference only)"},"thirdPartyOrder":{"type":"string"}},"title":"Data Body"}}}}},"headers":{}}}}}}}
```

## Fund Flow

> Explanation: Pagination query account capital flow   group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.queryCapitalFlowList

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Trade/Full Margin Contract"}],"servers":[{"url":"https://prewppc-3.cmfbl.com/api","description":"PRE测试公司439"}],"security":[],"paths":{"/global/tradeapi.app.CfdMMOrderApiService.queryCapitalFlowList":{"post":{"summary":"Fund Flow","deprecated":false,"description":"Explanation: Pagination query account capital flow   group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.queryCapitalFlowList","tags":["Trade/Full Margin Contract"],"parameters":[{"name":"companyId","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"token","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"lang","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"group","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"trace","in":"header","description":"","required":false,"schema":{"type":"string"}},{"name":"version","in":"header","description":"","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tradeType":{"type":"integer","title":"Game ID","description":"Should be filled with 1 under this gameplay","format":"long"},"accountId":{"type":"integer","format":"long","title":"Account ID"},"size":{"type":"integer","title":"Number of data entries per page","format":"long"},"current":{"type":"integer","title":"Current Page","format":"long"},"businessType":{"type":"integer","format":"int32","title":"Business type","description":"0-Unrestricted; 1-Deposit; 2-Withdrawal; 3-System reset; 4-Limit adjustment; 5-Freeze; 6-Transaction; 36-Transfer; 42-Reward;"},"status":{"type":"integer","format":"int32","title":"Status","description":"0-Unrestricted; 1-Initialization; 2-Processing successful; 3-Processing failed;"},"startTime":{"type":"integer","format":"long","description":"13-digit timestamp","title":"Start time"},"endTime":{"type":"integer","format":"long","description":"13-digit timestamp","title":"End Time"},"operate":{"type":"integer","format":"int32","title":"Capital flow","description":"0-Unrestricted; 1-Increase; 2-Decrease;"},"assetsId":{"type":"integer","format":"long","title":"Asset ID"},"lang":{"type":"string","title":"Language"}},"required":["tradeType"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"bizCode":{"type":"string","title":"Module identifier code","description":"Module identifier code"},"code":{"type":"string","title":"Status return code","description":"Status return code, 0 success, others fail"},"msg":{"type":"string","title":"Status description","description":"Status description"},"tm":{"type":"integer","format":"int64","title":"Processing time (milliseconds)","description":"Processing time (milliseconds)"},"trace":{"type":"string","title":"Tracking code","description":"Tracking code"},"msgParams":{"type":"string","title":"Placeholder parameter string in return description, multiple parameters separated by commas","description":"Placeholder parameter string in return description, multiple parameters separated by commas"},"ok":{"type":"boolean","description":"Success flag"},"fail":{"type":"boolean","description":"Failure flag"},"data":{"type":"object","properties":{"total":{"type":"integer","title":"Total","format":"long","description":"Total"},"size":{"type":"integer","format":"long","title":"Number of Items per Page","description":"Number of Items per Page"},"current":{"type":"integer","format":"long","title":"Current Page","description":"Current Page"},"records":{"type":"array","items":{"type":"object","properties":{"remark":{"type":"string","title":"Remarks","description":"Remarks"},"createTime":{"type":"integer","title":"Creation date","description":"Creation date, 13-digit timestamp","format":"long"},"updateTime":{"type":"integer","format":"long","title":"Update Time","description":"Update time, 13-digit timestamp"},"subjectId":{"type":"integer","format":"long","title":"Subject ID","description":"Subject ID"},"bookkeepId":{"type":"integer","format":"long","title":"Voucher ID","description":"Voucher ID"},"amountIn":{"type":"string","title":"Increase amount","description":"Increase amount"},"amountOut":{"type":"string","title":"Decrease amount","description":"Decrease amount"},"status":{"type":"integer","format":"int32","title":"Status","description":"Status, 1-Initialization; 2-Processing successful; 3-Processing failed;"},"amountAfter":{"type":"string","title":"Balance after change","description":"Balance after change"},"businessType":{"type":"integer","title":"Business type","format":"int32","description":"Business type, 1-Deposit; 2-Withdrawal; 3-System reset; 4-Limit adjustment; 5-Freeze; 6-Transaction; 36-Transfer; 42-Reward;"},"businessType1":{"type":"integer","format":"int32","description":"Business sub-type, 1001-Front-end deposit; 1002-Deposit fee; 2001-Front-end withdrawal; 2002-Cancel withdrawal; 2003-Withdrawal fee; 2004-Cancel fee; 2005-Confirm transfer; 3001-System reset; 4001-Limit adjustment_deposit; 4002-Limit adjustment_withdrawal; 4003-Limit adjustment_other; 4004-Limit adjustment_bonus; 4005-Limit adjustment_release non-withdrawable; 4006-Limit adjustment_non-withdrawable; 4007-Limit adjustment_transfer rebate; 5001-Freeze; 5002-Unfreeze; 6001-Open position fee; 6002-Close position fee; 6003-Overnight interest; 6004-Market close profit and loss; 6005-Stop loss close profit and loss; 6006-Take profit close profit and loss; 6007-System forced close profit and loss; 6008-Expiration forced close profit and loss; 6009-Manual forced close profit and loss; 36001-Transfer in amount; 36002-Transfer out amount; 42001-Issue reward; 42002-Deduct reward; 42003-Issue rebate; 42004-Deduct rebate;","title":"Business Subtype"},"customerNo":{"type":"string","title":"Client number","description":"Client number"},"digits":{"type":"string","title":"Decimal Places","description":"Decimal Places"},"currency":{"type":"string","title":"Currency","description":"Currency"},"businessTypeName":{"type":"string","title":"Business Type Name","description":"Business type name, confirm language by passing in `lang`"},"businessType1Name":{"type":"string","title":"Business Subtype Name","description":"Business sub-type name, confirm language by passing in `lang`"},"accountId":{"type":"integer","title":"Account Id","format":"long","description":"Account Id"},"orderId":{"type":"integer","format":"long","description":"Order ID"},"dealId":{"type":"integer","format":"long","description":"Deal ID"}},"title":"Data Body","description":"Data Body"},"title":"Transaction Collection","description":"Transaction Collection"}},"description":"Data Body"}}}}},"headers":{}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.multimarkets.org/client-api/more.../trade-full-margin-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
