Get OMS position
Returns the current position (holdings) of a given account in the Order Management System (OMS), grouped by settlement period and symbol.
GET
/v1/broker/operations/position/orders/{account-id}Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
account-id | integer | Yes | Account number to fetch the OMS position for. |
Not applicable: Query Parameters, Body.
Response
2XX Success
Response shape
positions_by_settlement is an object keyed by settlement period (T0, T1, T2, T3). Each settlement period contains an object keyed by instrument symbol, whose value is the position for that symbol at that settlement period.
| Field | Type | Description |
|---|---|---|
account_number | integer | Account number the position belongs to. |
positions_by_settlement | object | Positions grouped by settlement period. Keys are T0, T1, T2 and T3. |
positions_by_settlement.{settlement_period} | object | Object keyed by instrument symbol for the given settlement period. |
positions_by_settlement.{settlement_period}.{symbol}.settlementType | string | Settlement period this position belongs to. Possible values: T0, T1, T2, T3. |
positions_by_settlement.{settlement_period}.{symbol}.symbol | string | Ticker of the instrument. |
positions_by_settlement.{settlement_period}.{symbol}.total | number | Total quantity held. |
positions_by_settlement.{settlement_period}.{symbol}.unavailable | number | Quantity currently unavailable to operate (e.g. pending settlement or blocked). |
positions_by_settlement.{settlement_period}.{symbol}.available | number | Quantity available to operate. |
positions_by_settlement.{settlement_period}.{symbol}.pending_sell_quantity | number | Quantity involved in pending sell orders that have not yet been filled. |
Error Codes
| Status | Description |
|---|---|
400 | Bad Request — the account number is invalid |
401 | Unauthorized — invalid or missing access token |
403 | Forbidden — the token does not have permission to access this resource |
500 | Internal Server Error |
Error structure:
{
"code": "invalid_request",
"description": "Invalid account number: 70104"
}
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X GET https://b2b.allaria.cloud/v1/broker/operations/position/orders/70104 \
-H "Authorization: Bearer ACCESS_TOKEN"
const accountId = 70104;
const response = await fetch(
`https://b2b.allaria.cloud/v1/broker/operations/position/orders/${accountId}`,
{
method: 'GET',
headers: { 'Authorization': 'Bearer ACCESS_TOKEN' }
}
);
const data = await response.json();
console.log(data);
import requests
account_id = 70104
response = requests.get(
f'https://b2b.allaria.cloud/v1/broker/operations/position/orders/{account_id}',
headers={ 'Authorization': 'Bearer ACCESS_TOKEN' }
)
data = response.json()
print(data)
const axios = require('axios');
const accountId = 70104;
const response = await axios.get(
`https://b2b.allaria.cloud/v1/broker/operations/position/orders/${accountId}`,
{ headers: { Authorization: 'Bearer ACCESS_TOKEN' } }
);
console.log(response.data);
2XX Success
{
"account_number": 70104,
"positions_by_settlement": {
"T0": {
"AL30": {
"settlementType": "T0",
"symbol": "AL30",
"total": 1000.00,
"unavailable": 0.00,
"available": 1000.00,
"pending_sell_quantity": 0.00
}
},
"T1": {
"GD30": {
"settlementType": "T1",
"symbol": "GD30",
"total": 500.00,
"unavailable": 200.00,
"available": 300.00,
"pending_sell_quantity": 100.00
}
}
}
}