Portal Community

create (ORD01)

Places a live order on the Coinbase exchange.

FieldRequiredDescription
productId✓ YesThe trading pair, e.g. BTC-USD.
side✓ YesBUY or SELL — accepted case-insensitive, normalized to uppercase.
orderType✓ Yeslimit or market — accepted case-insensitive, normalized to lowercase. Any other value is rejected.
baseSizeConditionalMarket orders: at least one of baseSize/quoteSize required, positive. Limit orders: required, positive.
quoteSizeConditionalMarket orders only; see baseSize.
limitPriceLimit onlyRequired and positive when orderType is limit.
clientOrderIdNoOptional idempotency key. If omitted, a fresh GUID is generated. Must stay the same value across any retry of the same logical attempt — see the callout below.

Example response:

{
  "items": [{
    "orderID": "0000-000-000",
    "clientOrderID": "3f6a...-guid",
    "productID": "BTC-USD",
    "side": "BUY",
    "status": "OPEN",
    "orderType": "limit",
    "baseSize": "0.01",
    "quoteSize": null,
    "limitPrice": "60000.00",
    "filledSize": "0",
    "averageFilledPrice": null,
    "createdTime": "2024-06-01T12:00:00Z"
  }]
}
Idempotency matters here. clientOrderId is this node's only dedup safeguard against double-placing the same order on a network retry. Never regenerate it per HTTP retry attempt — generate it once per logical attempt and reuse it. The operation fails with COINBASE_ORDER_REJECTED if Coinbase's HTTP 200 response body carries success: false (the order was rejected, not accepted, even though the transport call succeeded).

preview (ORD02)

Same config as create, minus clientOrderId — this is a non-mutating dry run, so no idempotency key is needed. Output is the same order-record shape as create, but every field except the size/price inputs you supplied is an estimate.

cancel (ORD03)

Batch-cancels one or more open orders.

FieldRequiredDescription
orderIds✓ YesComma-separated list or array of order IDs to cancel.

Output items[] is the subset of orderIds Coinbase confirmed as successfully cancelled — not necessarily all of them.

list (ORD04)

Lists historical and open orders.

FieldRequiredDescription
productIdNoFilter to a single trading pair.
orderStatusNoFilter by order status.
startDateNoFilter to orders created on or after this date.
endDateNoFilter to orders created on or before this date.
limitNoMaximum number of orders to return.

Output items[], one entry per order, same shape as create's order record.

get (ORD05)

Returns a single order record.

FieldRequiredDescription
orderId✓ YesThe order ID to look up.