Pacifica
  • Getting Started
    • Closed Alpha Guide
      • Link To Guide PDF
    • Closed Alpha Trading Competition
  • Trading on Pacifica
    • Overview
    • Contract Specifications
      • Oracle Price & Mark Price
      • Settlement Mechanism
    • Order Types
      • Market Order
      • Limit Order
      • Order Rules & Constraints
    • Margin & Leverage
    • Funding Rates
    • Liquidations
  • API Documentation
    • API
      • REST API
        • Markets
          • Get market info
          • Get prices
          • Get kline (candle) data
          • Get recent trades
        • Account
          • Get account info
          • Get account settings
          • Update leverage
          • Update margin mode
          • Get positions
          • Get trade history
          • Get funding history
          • Get account equity history
          • Create subaccount
          • Request withdrawal
        • Orders
          • Get open orders
          • Get order history
          • Get order history by ID
          • Create order
          • Create stop order
          • Create position TP/SL
          • Cancel order
          • Cancel all orders
          • Cancel stop order
          • Batch orders
      • Websocket
        • Subscriptions
          • Prices
          • Orderbook
          • Trades
          • Candle
          • Order updates
          • Account balance
          • Account margin
          • Account leverage
          • Account positions
          • Account orders
          • Account order updates
          • Account trades
        • Trading operations
          • Create order
          • Cancel order
          • Cancel all orders
      • Signing
      • Rate limits
    • Specification
  • Other
    • Audits
    • Brand Assets
    • Contact Us
    • Glossary of Terms
Powered by GitBook
On this page
  1. API Documentation
  2. API
  3. REST API
  4. Orders

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

"event_type"

string

"fulfill_taker" if maker "fulfill_maker" if 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"

  • 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 historyNextCreate order

Last updated 2 days ago