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

Method fetch_open_orders

python/ccxt/coinbaseexchange.py:1398–1431  ·  view source on GitHub ↗

https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders fetch all unfilled currently 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 maxim

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

Source from the content-addressed store, hash-verified

1396 return self.fetch_open_orders(symbol, since, limit, self.extend(request, params))
1397
1398 def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1399 """
1400
1401 https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorders
1402
1403 fetch all unfilled currently open orders
1404 :param str symbol: unified market symbol
1405 :param int [since]: the earliest time in ms to fetch open orders for
1406 :param int [limit]: the maximum number of open orders structures to retrieve
1407 :param dict [params]: extra parameters specific to the exchange API endpoint
1408 :param int [params.until]: the latest time in ms to fetch open orders for
1409 :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)
1410 :returns Order[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
1411 """
1412 self.load_markets()
1413 paginate = False
1414 paginate, params = self.handle_option_and_params(params, 'fetchOpenOrders', 'paginate')
1415 if paginate:
1416 return self.fetch_paginated_call_dynamic('fetchOpenOrders', symbol, since, limit, params, 100)
1417 request = {}
1418 market = None
1419 if symbol is not None:
1420 market = self.market(symbol)
1421 request['product_id'] = market['id']
1422 if limit is not None:
1423 request['limit'] = limit # default 100
1424 if since is not None:
1425 request['start_date'] = self.iso8601(since)
1426 until = self.safe_value_2(params, 'until', 'end_date')
1427 if until is not None:
1428 params = self.omit(params, ['until'])
1429 request['end_date'] = self.iso8601(until)
1430 response = self.privateGetOrders(self.extend(request, params))
1431 return self.parse_orders(response, market, since, limit)
1432
1433 def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1434 """

Callers 2

fetch_ordersMethod · 0.95
fetch_closed_ordersMethod · 0.95

Calls 10

safe_value_2Method · 0.80
parse_ordersMethod · 0.80
privateGetOrdersMethod · 0.65
load_marketsMethod · 0.45
marketMethod · 0.45
iso8601Method · 0.45
omitMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected