B2PRIME Docs

Create SPOT order

<p><b>Required operations:</b><br/>trading-ui</p>

POST
/frontoffice/api/v3/orders

Header Parameters

accountId?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/frontoffice/api/v3/orders" \  -H "Content-Type: application/json" \  -d '{    "order": {      "marketId": "btc_usdt",      "orderType": "Market",      "side": "Buy",      "requestedPrice": "0.002",      "requestedAmount": "0.002",      "timeInForce": "Gtc",      "cancellationDate": "2019-08-24T14:15:22Z"    }  }'
{  "order": {    "marketId": "spot.btc_usdt",    "marketDisplayName": "BTC/USDT",    "orderId": "65f1990aae5ec088da163949",    "orderType": "Market",    "side": "Buy",    "status": "Working",    "source": "Manual",    "timeInForce": "Ioc",    "commission": "0",    "requestedAmount": "0.001",    "remainingAmount": "0.001",    "requestedPrice": null,    "executionPrice": "0",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "rejectDetails": "",    "cancellationDate": null,    "fillFactor": "0"  }}
{  "code": "TR0020",  "description": "OrderType is null or empty"}
Empty
Empty