fetch all orders https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-order-history :param str symbol: unified market symbol :param int [since]: the earliest time in ms to fetch open orders for :param int [limit]: the maximum number of open or
(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})
| 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 | """ |
| 1962 | fetch all orders |
| 1963 | |
| 1964 | https://docs.pacifica.fi/api-documentation/api/rest-api/orders/get-order-history |
| 1965 | |
| 1966 | :param str symbol: unified market symbol |
| 1967 | :param int [since]: the earliest time in ms to fetch open orders for |
| 1968 | :param int [limit]: the maximum number of open orders structures to retrieve |
| 1969 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1970 | :param str [params.account]: will default to walletAddress if not provided |
| 1971 | :param str [params.cursor]: pagination cursor from prev request(manual use) |
| 1972 | :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) |
| 1973 | :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>` |
| 1974 | """ |
| 1975 | self.load_markets() |
| 1976 | paginate = False |
| 1977 | paginate, params = self.handle_option_and_params(params, 'fetchOrders', 'paginate', False) |
| 1978 | defaultLimit = 100 # max default 100 |
| 1979 | if paginate: |
| 1980 | return self.fetch_paginated_call_cursor('fetchOrders', symbol, since, limit, params, 'next_cursor', 'cursor', None, defaultLimit) |
| 1981 | userAddress = None |
| 1982 | userAddress, params = self.handle_origin_and_single_address('fetchOrders', params) |
| 1983 | market = None |
| 1984 | if symbol is not None: |
| 1985 | market = self.market(symbol) |
| 1986 | request = { |
| 1987 | 'account': userAddress, |
| 1988 | } |
| 1989 | if limit is not None: |
| 1990 | request['limit'] = limit |
| 1991 | response = self.publicGetOrdersHistory(self.extend(request, params)) |
| 1992 | # |
| 1993 | # { |
| 1994 | # "success": True, |
| 1995 | # "data": [ |
| 1996 | # { |
| 1997 | # "order_id": 315992721, |
| 1998 | # "client_order_id": "ade", |
| 1999 | # "symbol": "XPL", |
| 2000 | # "side": "ask", |
| 2001 | # "initial_price": "1.0865", |
| 2002 | # "average_filled_price": "0", |
| 2003 | # "amount": "984", |
| 2004 | # "filled_amount": "0", |
| 2005 | # "order_status": "open", |
| 2006 | # "order_type": "limit", |
| 2007 | # "stop_price": null, |
| 2008 | # "stop_parent_order_id": null, |
| 2009 | # "reduce_only": False, |
| 2010 | # "reason": null, |
| 2011 | # "created_at": 1759224893638, |
| 2012 | # "updated_at": 1759224893638 |
| 2013 | # }, |
| 2014 | # ... |
| 2015 | # ], |
| 2016 | # "next_cursor": "1111Hyd74", |
| 2017 | # "has_more": True |
no test coverage detected