On this page

# Get order history by ID

This endpoint allows users to get order history by id.

    GET /api/v1/orders/history_by_id

####
Query Parameters

Field
Type
Need
Description
Example

`"order_id"`

integer

required

Order ID to retrieve history for

`13753364`

    /api/v1/orders/history_by_id?order_id=13753364

####
Response

- Status 200: Successfully retrieved open orders

    [
      {
        "history_id": 26698518,
        "order_id": 13753364,
        "client_order_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "symbol": "BTC",
        "side": "bid",
        "price": "50000.00",
        "initial_amount": "0.1",
        "filled_amount": "0.1",
        "cancelled_amount": "0.0",
        "event_type": "fulfill_limit",
        "order_type": "limit",
        "order_status": "filled",
        "stop_price": null,
        "stop_parent_order_id": null,
        "reduce_only": false,
        "created_at": 1748956314604
      },
      {
        "history_id": 26698517,
        "order_id": 13753364,
        "client_order_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "symbol": "BTC",
        "side": "bid",
        "price": "50000.00",
        "initial_amount": "0.1",
        "filled_amount": "0.0",
        "cancelled_amount": "0.0",
        "event_type": "make",
        "order_type": "limit",
        "order_status": "open",
        "stop_price": null,
        "stop_parent_order_id": null,
        "reduce_only": false,
        "created_at": 1748956324604
      }
    ]

Field
Type
Description

`"history_id"`

integer

History ID assigned to the order

`"order_id"`

integer

Order ID assigned to order

`"client_order_id"`

UUID

CLOID of order if assigned by user

`"symbol"`

string

Trading pair symbol

`"side"`

string

Whether the order is a bid or an ask

`"price"`

decimal string

Price set by the order

`"initial_amount"`

decimal string

Amount (in token denomination) of the order placed

`"filled_amount"`

decimal string

Amount (in token denomination) of the order placed that was filled

`"cancelled_amount"`

decimal string

Amount (in token denomination) of the order placed that was cancelled

`"event_type"`

decimal string

Make if user was on maker side. Take if on taker.

`"order_type"`

string

`"limit" "market" "stop_limit" "stop_market" "take_profit_limit" "stop_loss_limit" "take_profit_market" "stop_loss_market"`

`"order_status"`

string

`"open" "partially_filled" "filled" "cancelled" "rejected"`

`"stop_price"`

decimal string

Stop price assigned upon order creation for subsequent position if order is filled if specified by user.

`"stop_parent_order_id"`

integer

Order id of stop order attached to original order

`"reduce_only"`

boolean

If the order is reduce only

`"created_at"`

integer

Timestamp in milliseconds when the order was created on Pacifica

- Status 400: Invalid request parameters

- Status 401: Unauthorized access

- Status 500: Internal server error

####
Code Example (Python)

    import requests

    response = requests.get(
        "/api/v1/orders/history_by_id?order_id=13753364",
        headers={"Accept": "*/*"},
    )

    data = response.json()

PreviousGet order history
NextWebsocket

Last updated 3 months ago