Use Query Positions to retrieve your current positions and receive continuous updates.

Query Positions


Request

KeyValueRequiredRequired
typestringqueryposYes
securitystringThe specific asset or currency. If not supplied, the response will contain positions for all securitiesNo
useridstringQuery this specific userid's positions. Note: you must be either be user_type of Firm (F) or (S) global admin. O (Operators) can not see positions other than their own positions.No

Response

KeyTypeValue
typestringquerypos
resultstring"OK" if successful. If not successful, this field will contain the reject reason.
curiosstringThe firm account associated with the login user
securitystringThe associated security
useridstringThe associated userid
total_recnumberThe number of records contained with the data array
dataarrayThe array of securities and the associated position for each
data.accountstringThe account associated with the queried positions
data.firmstringThe firm associated with the account
data.securitystringThe associated security
data.coststring
data.curposstringThe current position for the associated security
data.rec_nonumberThe record index
data.typestringposition
# Request
{
   "type":"querypos",
   "security":"BTC"
}

# Response
{
  'data': [{'account': '[email protected]',
           'cost': '206766266268136928',
           'curpos': '2000001875.9049292',
           'firm': 'SYMB',
           'rec_no': 1,
           'security': 'BTC',
           'type': 'position'
           }],
 'result': 'OK',
 'security': 'BTC',
 'total_rec': 1,
 'type': 'querypos'
}

# Request
{
   "type":"querypos",
   "userid":"[email protected]"
}

# Response
{
  'data': [{'account': '[email protected]',
           'cost': '206766266268136928',
           'curpos': '2000001875.9049292',
           'firm': 'SYMB',
           'rec_no': 1,
           'security': 'BTC',
           'type': 'position'
           }],
 'result': 'OK',
 'userid': '[email protected]',
 'total_rec': 1,
 'type': 'querypos'
}