Orders
Get Order by Order ID
REST API
- Introduction
- Requests
- Rate Limits
- Authentication
- Pagination
- CLI Setup
- Activities
- Address Book
- Allocations
- Assets
- Balances
- Commission
- Financing
- Futures
- Invoices
- Onchain Address Book
- Onchain Address Groups
- Orders
- Payment Methods
- Portfolios
- Positions
- Products
- Staking
- Transactions
- Users
- Wallets
FIX API
Orders
Get Order by Order ID
Retrieve an order by order ID.
GET
/
v1
/
portfolios
/
{portfolio_id}
/
orders
/
{order_id}
Get Order by Order ID
Copy
Ask AI
curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/orders/{order_id}
Copy
Ask AI
{
"order": {
"id": "82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"user_id": "42",
"portfolio_id": "3e1fe27e-26fe-46d8-b118-c752a2ae6b47",
"product_id": "BTC-USD",
"side": "BUY",
"client_order_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"type": "MARKET",
"base_quantity": "50",
"quote_value": "100",
"limit_price": "50.12",
"start_time": "2021-05-31T09:59:59.000Z",
"expiry_time": "2021-05-31T10:59:59.000Z",
"status": "OPEN",
"time_in_force": "GOOD_UNTIL_DATE_TIME",
"created_at": "2021-05-31T10:59:59.000Z",
"filled_quantity": "100",
"filled_value": "100",
"average_filled_price": "50.19",
"commission": "4.99",
"exchange_fee": "2.50",
"historical_pov": "2.50",
"stop_price": "50.12",
"net_average_filled_price": "57.68",
"user_context": "User initiated cancellation",
"client_product_id": "BTC-USDC",
"post_only": true,
"order_edit_history": [
{
"price": "100",
"size": "1",
"display_size": "1.00",
"stop_price": "120",
"stop_limit_price": "120",
"end_time": "2021-05-31T10:59:59.000Z",
"accept_time": "2021-06-20T10:59:59.000Z"
}
],
"is_raise_exact": true,
"display_size": "10.5"
}
}
Use the Prime SDK or CLI to test this endpoint by following the quickstart guide and running with the following examples
Copy
Ask AI
OrdersService ordersService = PrimeServiceFactory.createOrdersService(client);
GetOrderByOrderIdRequest request = new GetOrderByOrderIdRequest.Builder()
.portfolioId("PORTFOLIO_ID_HERE")
.orderId("ORDER_ID_HERE")
.build();
GetOrderByOrderIdResponse response = ordersService.getOrderByOrderId(request);
For more information, please visit the Prime Java SDK.
Copy
Ask AI
OrdersService ordersService = PrimeServiceFactory.createOrdersService(client);
GetOrderByOrderIdRequest request = new GetOrderByOrderIdRequest.Builder()
.portfolioId("PORTFOLIO_ID_HERE")
.orderId("ORDER_ID_HERE")
.build();
GetOrderByOrderIdResponse response = ordersService.getOrderByOrderId(request);
For more information, please visit the Prime Java SDK.
Copy
Ask AI
var ordersService = new OrdersService(client);
var request = new GetOrderByOrderIdRequest("PORTFOLIO_ID_HERE", "ORDER_ID_HERE");
var response = ordersService.GetOrderByOrderId(request);
For more information, please visit the Prime .NET SDK.
Copy
Ask AI
ordersService := orders.NewOrdersService(client)
request := &orders.GetOrderRequest{
PortfolioId: "PORTFOLIO_ID_HERE",
OrderId: "ORDER_ID_HERE",
}
response, err := ordersService.GetOrder(context.Background(), request)
For more information, please visit the Prime Go SDK.
Copy
Ask AI
prime_client = PrimeClient(credentials)
request = GetOrderRequest(
portfolio_id="PORTFOLIO_ID_HERE",
order_id="ORDER_ID_HERE",
)
response = prime_client.get_order(request)
For more information, please visit the Prime Python SDK.
Copy
Ask AI
primectl get-order --help
For more information, please visit the Prime CLI.
Copy
Ask AI
const ordersService = new OrdersService(client);
ordersService.getOrder({
portfolioId: 'PORTFOLIO_ID_HERE',
orderId: 'ORDER_ID_HERE'
}).then(async (response) => {
console.log('Order: ', response);
})
For more information, please visit the Prime TS SDK.
Response
200 - application/json
A successful response.
The response is of type object
.
Was this page helpful?
Get Order by Order ID
Copy
Ask AI
curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/orders/{order_id}
Copy
Ask AI
{
"order": {
"id": "82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"user_id": "42",
"portfolio_id": "3e1fe27e-26fe-46d8-b118-c752a2ae6b47",
"product_id": "BTC-USD",
"side": "BUY",
"client_order_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
"type": "MARKET",
"base_quantity": "50",
"quote_value": "100",
"limit_price": "50.12",
"start_time": "2021-05-31T09:59:59.000Z",
"expiry_time": "2021-05-31T10:59:59.000Z",
"status": "OPEN",
"time_in_force": "GOOD_UNTIL_DATE_TIME",
"created_at": "2021-05-31T10:59:59.000Z",
"filled_quantity": "100",
"filled_value": "100",
"average_filled_price": "50.19",
"commission": "4.99",
"exchange_fee": "2.50",
"historical_pov": "2.50",
"stop_price": "50.12",
"net_average_filled_price": "57.68",
"user_context": "User initiated cancellation",
"client_product_id": "BTC-USDC",
"post_only": true,
"order_edit_history": [
{
"price": "100",
"size": "1",
"display_size": "1.00",
"stop_price": "120",
"stop_limit_price": "120",
"end_time": "2021-05-31T10:59:59.000Z",
"accept_time": "2021-06-20T10:59:59.000Z"
}
],
"is_raise_exact": true,
"display_size": "10.5"
}
}
Assistant
Responses are generated using AI and may contain mistakes.