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

Method fetch_closed_orders

python/ccxt/coinbase.py:3594–3613  ·  view source on GitHub ↗

fetches information on multiple closed orders made by the user https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders :param str symbol: unified market symbol of the orders :param int [since]: timestamp in ms of the earliest orde

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

Source from the content-addressed store, hash-verified

3592 return self.fetch_orders_by_status('OPEN', symbol, since, limit, params)
3593
3594 def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
3595 """
3596 fetches information on multiple closed orders made by the user
3597
3598 https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/orders/list-orders
3599
3600 :param str symbol: unified market symbol of the orders
3601 :param int [since]: timestamp in ms of the earliest order, default is None
3602 :param int [limit]: the maximum number of closed order structures to retrieve
3603 :param dict [params]: extra parameters specific to the exchange API endpoint
3604 :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)
3605 :param int [params.until]: the latest time in ms to fetch trades for
3606 :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
3607 """
3608 self.load_markets()
3609 paginate = False
3610 paginate, params = self.handle_option_and_params(params, 'fetchClosedOrders', 'paginate')
3611 if paginate:
3612 return self.fetch_paginated_call_cursor('fetchClosedOrders', symbol, since, limit, params, 'cursor', 'cursor', None, 100)
3613 return self.fetch_orders_by_status('FILLED', symbol, since, limit, params)
3614
3615 def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3616 """

Callers

nothing calls this directly

Calls 4

load_marketsMethod · 0.45

Tested by

no test coverage detected