Skip to main content
POST
/
trading
/
async-order
Place an async order
curl --request POST \
  --url https://api.anchorage-staging.com/v2/trading/async-order \
  --header 'Api-Access-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "clOrderId": "6fb5fc79-0bb4-446d-82dd-d4687fb56a02",
  "currency": "BTC",
  "quantity": "100.00",
  "symbol": "BTC-USD",
  "timestamp": "2023-11-07T05:31:56Z",
  "accountId": "0e2b2f9d-8d10-4f1e-960b-28567255045f",
  "allocation": [
    {
      "quantity": "10000",
      "subaccountId": "<string>"
    }
  ],
  "limitPrice": "21005.5",
  "parameters": {
    "endTime": "2023-11-07T05:31:56Z",
    "triggerPrice": "21005.5"
  },
  "subaccountId": "343b6c83-6d91-4f13-9982-2109abd2dbb0"
}
'
{
  "data": {
    "clOrderId": "6fb5fc79-0bb4-446d-82dd-d4687fb56a02",
    "orderId": "a94c8d75-6c9d-4903-95f3-5b0893e76cb7",
    "subaccountId": "9236041d-f69d-4cb9-a747-684a288cec81",
    "symbol": "BTC-USD",
    "side": "BUY",
    "currency": "USD",
    "counterCurrency": "BTC",
    "orderQty": "10000.00",
    "orderType": "STOP_LIMIT",
    "timeInForce": "GTC",
    "orderStatus": "PENDING_NEW",
    "execId": "58fd5afc-b85e-45d1-951e-d6429ea9cd54",
    "execType": "PENDING_NEW",
    "avgPx": "21990.01",
    "avgPxAllIn": "21968.02",
    "cumQty": "10000",
    "counterQty": "0.45475",
    "counterQtyAllIn": "0.45430",
    "fillPx": "21990.01",
    "fillQty": "10000",
    "leavesQty": "0",
    "cancelQty": "0",
    "fee": "0.00045521",
    "feeCurrency": "BTC",
    "transactTime": "2023-03-12T22:22:09.925050Z",
    "submitTime": "2023-03-12T22:22:09.909251Z"
  }
}

Authorizations

Api-Access-Key
string
header
required

An API key associated with a security role

Body

application/json

Parameters to place an order.

clOrderId
string
required

Unique client order ID.

Example:

"6fb5fc79-0bb4-446d-82dd-d4687fb56a02"

currency
string
required

The currency in which order quantity is specified in.

Example:

"BTC"

orderType
enum<string>
required

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

Available options:
LIMIT,
STOP_LOSS,
STOP_LIMIT,
TAKE_PROFIT_LIMIT
quantity
string
required

Order quantity in units of currency.

Example:

"100.00"

side
enum<string>
required

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

Available options:
BUY,
SELL
symbol
string
required

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

Example:

"BTC-USD"

timeInForce
enum<string>
required

Time in Force specifies how long the order remains in effect

Available options:
FOK,
IOC,
GTC
timestamp
string<date-time>
required

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

accountId
string

Account ID for this order to book into.

Example:

"0e2b2f9d-8d10-4f1e-960b-28567255045f"

allocation
OrderAllocation · object[]

Order subaccount allocation

limitPrice
string

Limit price for the order, required for limit order

Example:

"21005.5"

parameters
object

Optional order type parameters for STOP_LOSS, STOP_LIMIT and TAKE_PROFIT_LIMIT orders.

subaccountId
string

Subaccount ID for this order to book into.

Example:

"343b6c83-6d91-4f13-9982-2109abd2dbb0"

Response

Successfully placed an ansyc order

data
OrderExecutionReport · object
required