Upscale
Menu
On this page

Получить сведения о позиции

Попробовать ↓
GET/positions/{positionId}
Получить сведения о позицииТорговля

Одна позиция по идентификатору, открытая или закрытая, в том же формате, который возвращают списки.

Базовый URL https://api.upscale.trade

Авторизация

bearerhttp · bearerобязательно

Персональный API-ключ с префиксом usk_.

Параметры

Путь
positionIdstring · uuidобязательно

Идентификатор позиции. Его аккаунт должен принадлежать вызывающему.

Пример: 00000000-0000-4000-8000-000000000000

Примеры

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

Ответы

401

Неавторизовано

403

Аккаунт принадлежит другому пользователю (account_access_denied), или запрос аутентифицирован с помощью API-ключа, тогда как api_trading отключён на аккаунте (api_trading_not_enabled).

404

Нет позиции с этим идентификатором.

429

Превышен лимит частоты запросов API-ключа (api_key_rate_limit_exceeded). Retry-After указывает, когда вернуться; тело содержит бакет (read / write), окно, которое сработало, его лимит и retryAt.

defaultОтветapplication/json
idxstring · nullableобязательно

Position identifier.

Пример: string
versionnumberобязательно

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

Пример: 0
openedAtstring · date-timeобязательно

When the position was opened.

Пример: 2026-05-01T12:30:00.000Z
lastUpdatedAtstring · date-timeобязательно

When the last event was applied to the position.

Пример: 2026-05-01T12:30:00.000Z
closedAtstring · date-time · nullableобязательно

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

Пример: 2026-05-01T12:30:00.000Z
statusstring · enumобязательно

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

Допустимо: "opened" "closed" "liquidated"
Пример: opened
marketstring · uuidобязательно

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})$
Пример: 00000000-0000-4000-8000-000000000000
traderstring · uuidобязательно

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})$
Пример: 00000000-0000-4000-8000-000000000000
sizestring · fp9обязательно

Position size in base asset units, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
notionalstring · fp9обязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
marginstring · fp9обязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
pnlstring · fp9 · nullableобязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
fundingstring · fp9 · nullableобязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
feestring · fp9обязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
feeRatestring · fp9обязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
exchangedQuotestring · fp9обязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
exchangedBasestring · fp9обязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
directionstring · enumобязательно

Direction of the position.

Допустимо: "long" "short"
Пример: long
eventNamestring · enumобязательно

Type of the most recent event applied to the position.

Допустимо: "addMargin" "removeMargin" "closePosition" "increasePosition" "liquidate" "forceClose" "payFunding"
Пример: addMargin
pnlInEventstring · fp9обязательно

Realised pnl of the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
rawPnlInEventstring · fp9обязательно

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)$
Пример: 1000000000
profitAdjustmentAppliedbooleanобязательно

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.

Пример: true
holdingTimeMsstring · nullableобязательно

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.

Пример: string
feeInEventstring · fp9обязательно

Fee charged by the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
fundingInEventstring · fp9обязательно

Funding settled by the most recent event, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
roestring · fp9обязательно

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

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
scalpingCoefficientstring · fp9обязательно

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)$
Пример: 1000000000
closeReasonstring · nullableобязательно

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

Пример: string