MCPcopy Create free account
hub / github.com/Gunthersuper/Binance-Futures-Python-Examples / get_pos

Function get_pos

main1.py:157–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155
156# Your current positions (returns the symbols list):
157def get_pos():
158 try:
159 resp = client.get_position_risk()
160 pos = []
161 for elem in resp:
162 if float(elem['positionAmt']) != 0:
163 pos.append(elem['symbol'])
164 return pos
165 except ClientError as error:
166 print(
167 "Found error. status: {}, error code: {}, error message: {}".format(
168 error.status_code, error.error_code, error.error_message
169 )
170 )
171
172def check_orders():
173 try:

Callers 1

main1.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected