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

Method fetch_open_orders

python/ccxt/pacifica.py:1908–1958  ·  view source on GitHub ↗

fetch all unfilled currently open orders https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-open-orders :param str symbol: unified market symbol :param int [since]: the earliest time in ms to fetch open orders for :param int [limit]: the max

(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})

Source from the content-addressed store, hash-verified

1906 return self.filter_by_symbol_since_limit(closedOrders, symbol, since, limit)
1907
1908 def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1909 """
1910 fetch all unfilled currently open orders
1911
1912 https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-open-orders
1913
1914 :param str symbol: unified market symbol
1915 :param int [since]: the earliest time in ms to fetch open orders for
1916 :param int [limit]: the maximum number of open orders structures to retrieve
1917 :param dict [params]: extra parameters specific to the exchange API endpoint
1918 :param str [params.account]: will default to walletAddress if not provided
1919 :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
1920 """
1921 self.load_markets()
1922 userAddress = None
1923 userAddress, params = self.handle_origin_and_single_address('fetchOpenOrders', params)
1924 request = {
1925 'account': userAddress,
1926 }
1927 market = None
1928 if symbol is not None:
1929 market = self.market(symbol)
1930 response = self.publicGetOrders(self.extend(request, params))
1931 #
1932 # {
1933 # "success": True,
1934 # "data": [
1935 # {
1936 # "order_id": 315979358,
1937 # "client_order_id": "add9a4b5-c7f7-4124-b57f-86982d86d479",
1938 # "symbol": "ASTER",
1939 # "side": "ask",
1940 # "price": "1.836",
1941 # "initial_amount": "85.33",
1942 # "filled_amount": "0",
1943 # "cancelled_amount": "0",
1944 # "stop_price": null,
1945 # "order_type": "limit",
1946 # "stop_parent_order_id": null,
1947 # "reduce_only": False,
1948 # "created_at": 1759224706737,
1949 # "updated_at": 1759224706737
1950 # }
1951 # ],
1952 # "error": null,
1953 # "code": null,
1954 # "last_order_id": 1557370337
1955 # }
1956 #
1957 data = self.safe_list(response, 'data', [])
1958 return self.parse_orders(data, market, since, limit)
1959
1960 def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1961 """

Callers

nothing calls this directly

Calls 7

safe_listMethod · 0.80
parse_ordersMethod · 0.80
publicGetOrdersMethod · 0.65
load_marketsMethod · 0.45
marketMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected