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

Method fetch_position

python/ccxt/dydx.py:1097–1110  ·  view source on GitHub ↗

fetch data on an open position https://docs.dydx.xyz/indexer-client/http#list-positions :param str symbol: unified market symbol of the market the position is held in :param dict [params]: extra parameters specific to the exchange API endpoint :param str [p

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

Source from the content-addressed store, hash-verified

1095 })
1096
1097 def fetch_position(self, symbol: str, params={}):
1098 """
1099 fetch data on an open position
1100
1101 https://docs.dydx.xyz/indexer-client/http#list-positions
1102
1103 :param str symbol: unified market symbol of the market the position is held in
1104 :param dict [params]: extra parameters specific to the exchange API endpoint
1105 :param str [params.address]: wallet address that made trades
1106 :param str [params.subAccountNumber]: sub account number
1107 :returns dict: a `position structure <https://docs.ccxt.com/?id=position-structure>`
1108 """
1109 positions = self.fetch_positions([symbol], params)
1110 return self.safe_dict(positions, 0, {})
1111
1112 def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
1113 """

Callers

nothing calls this directly

Calls 2

fetch_positionsMethod · 0.95
safe_dictMethod · 0.80

Tested by

no test coverage detected