fetch data on a single open contract trade position https://docs.delta.exchange/#get-position :param str symbol: unified market symbol of the market the position is held in, default is None :param dict [params]: extra parameters specific to the exchange API endpoin
(self, symbol: str, params={})
| 1682 | return self.parse_balance(response) |
| 1683 | |
| 1684 | def fetch_position(self, symbol: str, params={}): |
| 1685 | """ |
| 1686 | fetch data on a single open contract trade position |
| 1687 | |
| 1688 | https://docs.delta.exchange/#get-position |
| 1689 | |
| 1690 | :param str symbol: unified market symbol of the market the position is held in, default is None |
| 1691 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1692 | :returns dict: a `position structure <https://docs.ccxt.com/?id=position-structure>` |
| 1693 | """ |
| 1694 | self.load_markets() |
| 1695 | market = self.market(symbol) |
| 1696 | request = { |
| 1697 | 'product_id': market['numericId'], |
| 1698 | } |
| 1699 | response = self.privateGetPositions(self.extend(request, params)) |
| 1700 | # |
| 1701 | # { |
| 1702 | # "result":{ |
| 1703 | # "entry_price":null, |
| 1704 | # "size":0, |
| 1705 | # "timestamp":1605454074268079 |
| 1706 | # }, |
| 1707 | # "success":true |
| 1708 | # } |
| 1709 | # |
| 1710 | result = self.safe_dict(response, 'result', {}) |
| 1711 | return self.parse_position(result, market) |
| 1712 | |
| 1713 | def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]: |
| 1714 | """ |
nothing calls this directly
no test coverage detected