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

Query Positions


Request

Key

Value

Required

Required

type

string

querypos

Yes

security

string

The specific asset or currency. If not supplied, the response will contain positions for all securities

No

userid

string

Query 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

Key

Type

Value

type

string

querypos

result

string

"OK" if successful. If not successful, this field will contain the reject reason.

curios

string

The firm account associated with the login user

security

string

The associated security

userid

string

The associated userid

total_rec

number

The number of records contained with the data array

data

array

The array of securities and the associated position for each

data.account

string

The account associated with the queried positions

data.firm

string

The firm associated with the account

data.security

string

The associated security

data.cost

string

data.curpos

string

The current position for the associated security

data.rec_no

number

The record index

data.type

string

position

# 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'
}