Upscale
Menu
On this page

Get active positions by ticker

Try it out ↓
GET/positions/{accountId}/{asset}/active
Get active positions by tickerTrading

The open positions of the account on one market, selected by its base asset ticker.

Base URL https://api.upscale.trade

Authorization

bearerhttp · bearerrequired

Personal API key, prefixed with usk_.

Parameters

Path
accountIdstring · uuidrequired

Trader account identifier. Must belong to the caller.

Example: 00000000-0000-4000-8000-000000000000
assetstringrequired

Base asset ticker of the market, as returned by GET /v2/markets.

Example: BTC

Examples

curl --request GET 'https://api.upscale.trade/positions/{accountId}/{asset}/active' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Responses

401

Unauthorized

403

The account belongs to another user (account_access_denied), or the request is authenticated with an API key while api_trading is disabled on the account (api_trading_not_enabled).

404

No account with this identifier, or no market for this ticker.

429

Rate limit of the API key exceeded (api_key_rate_limit_exceeded). Retry-After says when to come back; the body carries the bucket (read / write), the window that tripped, its limit and retryAt.

defaultResponseapplication/json

Array of PositionResponse

idxstring[]required

Position identifier. Same value as txId.

Array items · string

string

View example
[
  "string"
]
txIdstring[]required

Position identifier. Kept for backward compatibility, always equal to idx.

Array items · string

string

View example
[
  "string"
]
versionnumberrequired

Revision of the position: incremented by every event applied to it.

Example: 0
openedAtstring · date-timerequired

When the position was opened.

Example: 2026-05-01T12:30:00.000Z
lastUpdatedAtstring · date-timerequired

When the last event was applied to the position.

Example: 2026-05-01T12:30:00.000Z
closedAtstring · date-time · nullablerequired

When the position was closed; null while it is still open.

Example: 2026-05-01T12:30:00.000Z
typestring · enumrequired

Direction of the position. Same value as direction.

Allowed: "long" "short"
Example: long
statusstring · enumrequired

Whether the position is still open, closed by the trader, or liquidated.

Allowed: "opened" "closed" "liquidated"
Example: opened
marketstring · uuidrequired

Market the position is held on.

pattern
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
Example: 00000000-0000-4000-8000-000000000000
traderstring · uuidrequired

Trader account the position belongs to.

pattern
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
Example: 00000000-0000-4000-8000-000000000000
sizestring · int32required

Position size in base asset units, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
notionalstring · int32required

Open notional of the position in quote currency, fp9 raw — size at entry price.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
fractionstring · int32required

Always 0. Kept for backward compatibility.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
marginstring · int32required

Margin currently backing the position, fp9 raw. Moves with pnl, funding and manual margin changes.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
pnlstring · int32 · nullablerequired

Realised pnl accumulated over every event of the position, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
fundingstring · int32 · nullablerequired

Funding paid (negative) or received (positive) over the life of the position, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
rolloverFeestring · int32required

Always 0. Kept for backward compatibility.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
settlementOraclePricestring · int32required

Always 1000000000 (1.0). Kept for backward compatibility.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
feestring · int32required

Trading fees charged over the life of the position, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
feeRatestring · int32required

Fee rate applied to the position, fp9 raw fraction (1000000 = 0.1%).

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
exchangedQuotestring · int32required

Quote amount exchanged by the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
exchangedBasestring · int32required

Base amount exchanged by the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
directionstring · enumrequired

Direction of the position.

Allowed: "long" "short"
Example: long
eventNamestring · enumrequired

Type of the most recent event applied to the position.

Allowed: "addMargin" "removeMargin" "closePosition" "increasePosition" "liquidate" "forceClose" "payFunding"
Example: addMargin
pnlInEventstring · int32required

Realised pnl of the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
rawPnlInEventstring · int32required

Realised pnl of the most recent event before the 60-second adjustment, fp9 raw. Differs from pnlInEvent only when the adjustment fired.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
profitAdjustmentAppliedbooleanrequired

Whether the 60-second adjustment capped the profit of the most recent event — inside a minute of an open or increase the position pnl cannot grow above what it was at that moment.

Example: true
holdingTimeMsstring[]required

How long the position was held before the most recent close, in milliseconds, counted from the open or the last increase. Null on events that are not closes.

Array items · string

string

View example
[
  "string"
]
feeInEventstring · int32required

Fee charged by the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
fundingInEventstring · int32required

Funding settled by the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
rolloverFeeInEventstring · int32required

Always 0. Kept for backward compatibility.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
executionFeeRatestring · int32required

Always 0. Kept for backward compatibility.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
executionFeeInEventstring · int32required

Always 0. Kept for backward compatibility.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
executionFeestring · int32required

Always 0. Kept for backward compatibility.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
timestampstring · date-timerequired

Timestamp of the most recent event. Same value as lastUpdatedAt.

Example: 2026-05-01T12:30:00.000Z
isOnchainbooleanrequired

Always true. Kept for backward compatibility.

Example: true
roestring · int32required

Return on equity of the position — realised pnl over the margin put up, fp9 raw fraction.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
scalpingCoefficientstring · int32required

Dynamic spread multiplier the position was charged, fp9 raw (1000000000 = 1.0). Above 1 when the trade fell inside the market scalping window.

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
closeReasonstring[]required

Why the platform closed the position (for example weekly_session_risk_close). Null for positions closed by the trader and for open ones.

Array items · string

string

View example
[
  "string"
]