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

Method fetch_position

python/ccxt/hyperliquid.py:3355–3367  ·  view source on GitHub ↗

fetch data on an open position https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary :param str symbol: unified market symbol of the market the position is held in :param dict [params]:

(self, symbol: str, params={})

Source from the content-addressed store, hash-verified

3353 }, market)
3354
3355 def fetch_position(self, symbol: str, params={}):
3356 """
3357 fetch data on an open position
3358
3359 https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
3360
3361 :param str symbol: unified market symbol of the market the position is held in
3362 :param dict [params]: extra parameters specific to the exchange API endpoint
3363 :param str [params.user]: user address, will default to self.walletAddress if not provided
3364 :returns dict: a `position structure <https://docs.ccxt.com/?id=position-structure>`
3365 """
3366 positions = self.fetch_positions([symbol], params)
3367 return self.safe_dict(positions, 0, {})
3368
3369 def get_dex_from_symbols(self, methodName: str, symbols: Strings = None):
3370 if symbols is None:

Callers

nothing calls this directly

Calls 2

fetch_positionsMethod · 0.95
safe_dictMethod · 0.80

Tested by

no test coverage detected