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 | str | Pagination cursor |
limit | int | Maximum results |
Position Fields
| Field | Type | Description |
|---|---|---|
netPosition | str | Net quantity (positive = long, negative = short) |
qtyBought | str | Total quantity bought |
qtySold | str | Total quantity sold |
cost | Amount | Total cost basis |
realized | Amount | Realized profit/loss |
cashValue | Amount | Current unrealized value |
qtyAvailable | str | Quantity available to trade |
expired | bool | 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 | int | Maximum results |
cursor | str | Pagination cursor |
types | list[str] | Filter by activity types |
marketSlug | str | Filter by market |
sortOrder | str | 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 | str | Trade ID |
marketSlug | str | Market slug |
price | Amount | Trade price |
qty | str | Trade quantity |
isAggressor | bool | True if taker |
realizedPnl | Amount | Realized P&L |