MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_order

Method fetch_order

python/ccxt/pacifica.py:2037–2108  ·  view source on GitHub ↗

fetches information on an order made by the user https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-order-history-by-id :param str id: order id :param str symbol:(optional) unified symbol of the market the order was made in :param dict [para

(self, id: str, symbol: Str = None, params={})

Source from the content-addressed store, hash-verified

2035 return data
2036
2037 def fetch_order(self, id: str, symbol: Str = None, params={}):
2038 """
2039 fetches information on an order made by the user
2040
2041 https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-order-history-by-id
2042
2043 :param str id: order id
2044 :param str symbol:(optional) unified symbol of the market the order was made in
2045 :param dict [params]: extra parameters specific to the exchange API endpoint
2046 :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
2047 """
2048 self.load_markets()
2049 market = None
2050 if symbol is not None:
2051 market = self.market(symbol)
2052 request = {
2053 'order_id': id,
2054 }
2055 response = self.publicGetOrdersHistoryById(self.extend(request, params))
2056 #
2057 # {
2058 # "success": True,
2059 # "data": [
2060 # {
2061 # "history_id": 641452639,
2062 # "order_id": 315992721,
2063 # "client_order_id": "ade1aa6...",
2064 # "symbol": "XPL",
2065 # "side": "ask",
2066 # "price": "1.0865",
2067 # "initial_amount": "984",
2068 # "filled_amount": "0",
2069 # "cancelled_amount": "984",
2070 # "event_type": "cancel",
2071 # "order_type": "limit",
2072 # "order_status": "cancelled",
2073 # "stop_price": null,
2074 # "stop_parent_order_id": null,
2075 # "reduce_only": False,
2076 # "created_at": 1759224895038
2077 # },
2078 # {
2079 # "history_id": 641452513,
2080 # "order_id": 315992721,
2081 # "client_order_id": "ade1aa6...",
2082 # "symbol": "XPL",
2083 # "side": "ask",
2084 # "price": "1.0865",
2085 # "initial_amount": "984",
2086 # "filled_amount": "0",
2087 # "cancelled_amount": "0",
2088 # "event_type": "make",
2089 # "order_type": "limit",
2090 # "order_status": "open",
2091 # "stop_price": null,
2092 # "stop_parent_order_id": null,
2093 # "reduce_only": False,
2094 # "created_at": 1759224893638

Callers

nothing calls this directly

Calls 7

parse_orderMethod · 0.95
safe_listMethod · 0.80
sort_byMethod · 0.80
load_marketsMethod · 0.45
marketMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected