Requires authentication.
Methods
| Method | Endpoint | Description |
|---|---|---|
positions(params?) | GET /v1/portfolio/positions | Get trading positions |
activities(params?) | GET /v1/portfolio/activities | Get activity history |
positions
Get your current trading positions. Returns a map of market slug to position data.Parameters
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | number | Maximum results |
Position Fields
| Field | Type | Description |
|---|---|---|
netPosition | string | Net quantity (positive = long, negative = short) |
qtyBought | string | Total quantity bought |
qtySold | string | Total quantity sold |
cost | Amount | Total cost basis |
realized | Amount | Realized profit/loss |
cashValue | Amount | Current unrealized value |
qtyAvailable | string | Quantity available to trade |
expired | boolean | Whether position has expired |
marketMetadata | object | Market information |
activities
Get your trading activity history including trades, settlements, deposits, and withdrawals.Parameters
| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum results |
cursor | string | Pagination cursor |
types | string[] | Filter by activity types |
marketSlug | string | Filter by market |
sortOrder | string | SORT_ORDER_DESCENDING (default) or SORT_ORDER_ASCENDING |
Activity Types
| Type | Nested Field | Description |
|---|---|---|
ACTIVITY_TYPE_TRADE | trade | Trade execution |
ACTIVITY_TYPE_POSITION_RESOLUTION | positionResolution | Market settlement |
ACTIVITY_TYPE_ACCOUNT_DEPOSIT | accountBalanceChange | Deposit |
ACTIVITY_TYPE_ACCOUNT_WITHDRAWAL | accountBalanceChange | Withdrawal |
Trade Fields
| Field | Type | Description |
|---|---|---|
id | string | Trade ID |
marketSlug | string | Market slug |
price | Amount | Trade price |
qty | string | Trade quantity |
isAggressor | boolean | True if taker |
realizedPnl | Amount | Realized P&L |