POST
/
v1
/
portfolios
/
{portfolio_id}
/
order
curl --request POST \
  --url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/order \
  --header 'Content-Type: application/json' \
  --data '{
  "product_id": "<string>",
  "side": "UNKNOWN_ORDER_SIDE",
  "client_order_id": "<string>",
  "type": "UNKNOWN_ORDER_TYPE",
  "base_quantity": "<string>",
  "quote_value": "<string>",
  "limit_price": "<string>",
  "start_time": "2023-11-07T05:31:56Z",
  "expiry_time": "2023-11-07T05:31:56Z",
  "time_in_force": "UNKNOWN_TIME_IN_FORCE",
  "stp_id": "<string>",
  "display_quote_size": "<string>",
  "display_base_size": "<string>",
  "is_raise_exact": true,
  "historical_pov": "<string>",
  "stop_price": "<string>",
  "settl_currency": "<string>"
}'
{
  "order_id": "ba0eb21c-672b-44de-8342-d6363cef87f0"
}

VWAP and TWAP

VWAP and TWAP orders must have a minimum notional of $100/hr and also include these additional parameters: limit_price, start_time and expiry_time.

Use the Prime SDK or CLI to test this endpoint by following the quickstart guide and running with the following examples

OrdersService ordersService = PrimeServiceFactory.createOrdersService(client);

CreateOrderRequest request = new CreateOrderRequest.Builder()
    .portfolioId("PORTFOLIO_ID_HERE")
    .productId("ADA-USD")
    .side(OrderSide.BUY)
    .type(OrderType.MARKET)
    .baseQuantity("10.0")
    .clientOrderId(UUID.randomUUID().toString())
    .build());
CreateOrderResponse orderResponse = ordersService.createOrder(request);

For more information, please visit the Prime Java SDK.

Path Parameters

portfolio_id
string
required

The ID of the portfolio that owns the order

Body

application/json

Response

200
application/json

A successful response.

The response is of type object.