v1

latestOpenAPI 3.0.02026-08-04134348905.1 KB
Trading

Place an async order

Permissions required: Execute trades

Place an order, either Limit, StopLoss, StopLimit or TakeProfitLimit currently FillOrKill, ImediateOrCancel or GoodTillCancel are supported.

One of accountId or subaccountId must be specified but not both.

post/trading/async-order

Request body

accountIdstring

Account ID for this order to book into.

clOrderIdstring required

Unique client order ID.

currencystring required

The currency in which order quantity is specified in.

limitPricestring

Limit price for the order, required for limit order

orderType'LIMIT' | 'STOP_LOSS' | 'STOP_LIMIT' | 'TAKE_PROFIT_LIMIT' required

Order type should be for BUY and SELL: LIMIT, STOP_LIMIT, TAKE_PROFIT_LIMIT. Only for SELL: STOP_LOSS

quantitystring required

Order quantity in units of currency.

side'BUY' | 'SELL' required

Order side, either "BUY" or "SELL".

subaccountIdstring

Subaccount ID for this order to book into.

symbolstring required

Symbol for the order, e.g. BTC-USD.

timeInForce'FOK' | 'IOC' | 'GTC' required

Time in Force specifies how long the order remains in effect

timestampstring date-time required

Timestamp when submitting this order. Date-times are always in UTC RFC 3339 'date-time'.

Example request

{
  "accountId": "0e2b2f9d-8d10-4f1e-960b-28567255045f",
  "allocation": [
    {
      "quantity": "10000"
    }
  ],
  "clOrderId": "6fb5fc79-0bb4-446d-82dd-d4687fb56a02",
  "currency": "BTC",
  "limitPrice": "21005.5",
  "parameters": {
    "triggerPrice": "21005.5"
  },
  "quantity": "100.00",
  "subaccountId": "343b6c83-6d91-4f13-9982-2109abd2dbb0",
  "symbol": "BTC-USD"
}

Response

Successfully placed an ansyc order

Example response

{
  "data": {
    "accountId": "0e2b2f9d-8d10-4f1e-960b-28567255045f",
    "allocation": [
      {
        "counterQtyAllIn": "10000",
        "counterQtyAllInToSettle": "10000",
        "cumQty": "10000",
        "executionId": "6290d9bd-494f-11ed-975e-2e567b4c0e09",
        "fee": "10000",
        "quantity": "10000",
        "subaccountId": "905272f0-52f9-404e-b6cd-ad879e671790"
      }
    ],
    "avgPx": "21005.4",
    "avgPxAllIn": "21006.00",
    "cancelQty": "10000.00",
    "clOrderId": "6fb5fc79-0bb4-446d-82dd-d4687fb56a02",
    "counterCurrency": "BTC",
    "counterQty": "0.001",
    "counterQtyAllIn": "0.0012",
    "cumQty": "10000.00",
    "currency": "USD",
    "execId": "3fb532c79-0bb4-446d-82dd-d4687fb56a02",
    "execType": "PENDING_NEW",
    "fee": "10.0",
    "feeCurrency": "BTC",
    "leavesQty": "10000.00",
    "limitPrice": "21005.5",
    "orderId": "a94c8d75-6c9d-4903-95f3-5b0893e76cb7",
    "orderQty": "10000.00",
    "subaccountId": "0e2b2f9d-8d10-4f1e-960b-28567255045f",
    "symbol": "BTC-USD"
  }
}