Skip to main content
POST
/
trading
/
order
Place an order
curl --request POST \
  --url https://api.anchorage-staging.com/v2/trading/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",
  "subaccountId": "343b6c83-6d91-4f13-9982-2109abd2dbb0"
}
'
{
  "data": {
    "clOrderId": "6fb5fc79-0bb4-446d-82dd-d4687fb56a02",
    "orderId": "a94c8d75-6c9d-4903-95f3-5b0893e76cb7",
    "execId": "3fb532c79-0bb4-446d-82dd-d4687fb56a02",
    "accountId": "0e2b2f9d-8d10-4f1e-960b-28567255045f",
    "symbol": "BTC-USD",
    "side": "BUY",
    "currency": "USD",
    "counterCurrency": "BTC",
    "orderType": "MARKET",
    "orderStatus": "FILLED",
    "avgPx": "21005.4",
    "avgPxAllIn": "21006.00",
    "orderQty": "10000.00",
    "cumQty": "10000.00",
    "counterQty": "0.4760680586896702",
    "fee": "0.00001359805",
    "feeCurrency": "BTC",
    "counterQtyAllIn": "0.4760544606302961",
    "transactTime": "2022-11-20T20:32:16.423Z"
  }
}

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 either MARKET or LIMIT

Available options:
MARKET,
LIMIT,
RFQ,
LIMIT_ALL_IN
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"

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"

subaccountId
string

Subaccount ID for this order to book into.

Example:

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

Response

Successfully executed an order

data
OrderExecutionReport · object
required