MultiMarkets API Docs en
HomeGitHubReferenceLanguage
  • Overview
  • Quick Start
    • Status
  • CLIENT API
    • Overview
    • Access
      • Sign
      • Request
      • Limit
      • Error Code
      • API Address
      • API Code
    • Login
      • Captcha
    • Customer
      • Customer registration
      • Replacement Token
      • API Management
        • Apply API
        • Set permissions
        • Delete API
    • Market Data
      • Introduction
      • Limit
      • Error Code
      • Subscribe
        • Ticker
        • Market
        • Cancel
      • Query
        • Heartbeat
        • Historical K-line
    • Open API
      • Readme
        • Sign
        • Request
        • Error Code
        • API Address
      • Order Process
      • Base
        • Symbol Base Info
      • Customer
        • Customer Info
      • Trade
        • Contract order
      • Message
        • Get Msg Token
        • Msg Subscribe
        • Get Msg Token
        • Msg Subscribe
      • More...
    • Auth2 API
      • Readme
      • Auth Code
      • Access Token
      • User Info
      • Refresh Token
    • More...
  • Manager API
    • Overview
    • Access
      • Sign
      • Request
      • Limit
      • Error Code
      • API Address
      • API Code
    • Authorize
    • Basic data
      • Universal dictionaries
      • Company currency
    • Product
      • Product List
    • Customer
      • Customer List
      • Customer registration
      • Customer info
      • Customer Group
      • Account Info
    • Funds
      • Balance Update
      • Get Balance
    • Data Push
    • More...
  • Bridge API
    • Overview
    • Access Instructions
      • Illustrate
      • Sign
      • Request
      • Speed ​​Limit
      • Error Code
      • Product List
    • Basic data
      • Get a list of universal dictionaries
      • Obtain company currency permissions
    • Product Data
      • Product information list
      • Product rule list
    • Customer Management
      • Customer registration
      • Customer list
      • Customer details
      • Customer account cancellation
    • Account Management
      • Add account
      • Update account
      • Check account
      • Delete account
    • Trading interface
      • Check balance
      • Check deposit records
      • Check withdrawal records
      • Query transfer records
      • Place an order
      • Query order
      • Order list
      • Transaction record
      • Current pending order
      • Cancel order
    • News Subscription
      • Notification message description
      • Webhook subscription
      • Information callback notification
  • Webhook API
    • Overview
    • Account balance
    • Execute adjustment balance
    • Cancel adjustment balance
  • Message API
    • Overview
    • Custom message API
  • WEB IFRAME
    • Introduction
    • Process description
  • FAQ
    • How to apply for apikey for an interface?
    • What is the purpose of the public key?
    • What is the interface request timeout?
    • Supported development languages?
    • What are the API call restrictions?
    • How to use APIs more safely?
  • API Reference
    • Manager API
    • Client API
  • CHANGELOGS
    • API
Powered by GitBook
On this page
  1. CLIENT API
  2. Open API
  3. Trade

Contract order

PreviousTradeNextMessage

Last updated 11 months ago

Place an order

post

Description: Contract full position trading order group=tradeApi version=0.0.1 bizType=tradeapi.app.OrderApiService.addMarketOrder Server Screenshot.png

Header parameters
companyIdstringOptionalExample: {{company}}
tokenstringOptionalExample: {{LoginResult.data.token}}
langstringOptionalExample: en-US
groupstringOptionalExample: tradeApi
tracestringOptionalExample: {{mock_trace}}
versionstringOptionalExample: 0.0.1
Body
tradeTypeinteger · longRequired

Game ID, should be filled with 1 for this game

accountIdinteger · longOptional

Account ID, optional. If filled, trading will be conducted with this account

bizTypeinteger · int32Required

Business type, 1-Market price open; 2-Market price close; 10-Limit price pending order; 11-Stop loss pending order; 12-Limit price open

directioninteger · int32Required

Order buy/sell direction, 1-Buy; 2-Sell;

symbolIdinteger · longRequired

Product ID, product ID

positionIdinteger · longOptional

Position ID, required when placing a closing order

requestTimeinteger · longRequired

Order request time, 13-digit timestamp

requestPricestringRequired

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.

requestNumstringRequired

Order quantity

stopLossstringOptional

Stop loss unit price, need to multiply by 10 to the power of 'product quote decimal places', and process it as an integer input.

takeProfitstringOptional

Take profit unit price, need to multiply by 10 to the power of 'product quote decimal places', and process it as an integer input.

expireTypeinteger · int32Optional

Expiration type, only valid for pending orders. 1-Valid for the day; 2-Valid for the week;

remarkstringOptional

Remarks

accountCurrencystringRequired

Account currency

accountDigitsinteger · int32Required

Account Decimal Places

crossLevelNuminteger · int32Optional

Leverage ratio, only valid for opening positions, there should only be one leverage ratio for the same product

Responses
200
Success
application/json
post
POST /api/global/tradeapi.app.CfdMMOrderApiService.addMarketOrder HTTP/1.1
Host: prewppc-3.cmfbl.com
Content-Type: application/json
Accept: */*
Content-Length: 271

{
  "tradeType": 1,
  "accountId": 1,
  "bizType": 1,
  "direction": 1,
  "symbolId": 1,
  "positionId": 1,
  "requestTime": 1,
  "requestPrice": "text",
  "requestNum": "text",
  "stopLoss": "text",
  "takeProfit": "text",
  "expireType": 1,
  "remark": "text",
  "accountCurrency": "text",
  "accountDigits": 1,
  "crossLevelNum": 1
}
200

Success

{
  "msg": "Success",
  "fail": false,
  "trace": "x-dqxq8-qu20y7y-dq58lhn-39i483-1677570581",
  "code": "0",
  "data": {
    "tradeVolume": "0.1",
    "symbolId": 720,
    "orderId": 14460002,
    "fee": "-0.0668",
    "openOrClose": 1,
    "openPrice": "22.25",
    "takeProfit": "0",
    "positionId": 2023022819810,
    "interest": "0",
    "openDirection": 1,
    "stopLoss": "0",
    "executePrice": "22.25",
    "digits": 2,
    "symbolName": "BINAN_SOL_USDT",
    "profit": "0",
    "direction": 1
  },
  "bizCode": "",
  "tm": 162,
  "msgParams": null,
  "ok": true
}