Upscale
Menu
On this page

Получить рынок по id

Попробовать ↓
GET/v2/markets/{id}
Получить рынок по idКонфигурация

Один рынок с тем же снимком, который возвращает список.

Отвечает 404, когда рынок не существует, исключён из листинга или скрыт от вызывающего.

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

Авторизация

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

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

Параметры

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

Идентификатор рынка, возвращаемый GET /v2/markets.

Пример: 00000000-0000-4000-8000-000000000000
Строка запроса
accountIdstring · uuidнеобязательно

Торговый счёт, относительно которого формируется список рынков: границы кредитного плеча и доступность возвращаются применительно к этому счёту. Если не указан — возвращаются значения по умолчанию для всей платформы.

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

Примеры

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

Ответы

401

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

404

Рынок не найден, исключён из листинга или скрыт от вызывающего.

429

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

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

Market identifier — the value order creation takes as marketId.

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
configobjectобязательно

Static description of the market: assets, naming and category.

Объект · 11 поля
baseAssetstringобязательно

Base asset ticker — the value the per-market endpoints take as asset.

Пример: BTC
quoteAssetstringобязательно

Asset prices and notionals are quoted in.

Пример: USD
settlementTokenstringобязательно

Asset positions settle in.

Пример: USD
typestringобязательно

Pricing model of the market.

Пример: base
namestringобязательно

Display name of the market.

Пример: BTC
descriptionstringобязательно

Free-form description shown in the app.

Пример: Market description
tickerstringобязательно

Full pair label.

Пример: BTC/USD
imageLinkstringобязательно

Icon of the market.

Пример: https://app.storm.tg/markets/btc.png
tagsstring[]обязательно

Tags the app groups markets by.

Элементы массива · string

string

Пример: "Crypto"
Посмотреть пример
[
  "Crypto"
]
categorystring · enumобязательно

Whether the market is crypto or a real-world asset — an account may be limited to one of the two.

Допустимо: "crypto" "rwa"
Пример: crypto
prioritynumber · nullableобязательно

Sort weight in the market list; higher comes first. Null when unranked.

Пример: 0
Посмотреть пример
{
  "baseAsset": "BTC",
  "quoteAsset": "USD",
  "settlementToken": "USD",
  "type": "base",
  "name": "BTC",
  "description": "Market description",
  "ticker": "BTC/USD",
  "imageLink": "https://app.storm.tg/markets/btc.png",
  "tags": [
    "Crypto"
  ],
  "category": "crypto",
  "priority": 0
}
stateobjectобязательно

Live state: index price, funding and the depth an order is priced against.

Объект · 10 поля
indexPricestring · int32обязательно

Current index price of the market, fp9 raw — what orders are priced and triggers compared against.

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

When this state snapshot was produced, unix timestamp in milliseconds.

Пример: 0
fundingRatestring · int32обязательно

Funding rate of the running interval, fp9 raw fraction. Positive means longs pay shorts.

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

When funding is settled next, unix timestamp in milliseconds.

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

When funding was last settled, unix timestamp in milliseconds. Null before the first settlement.

Пример: 0
vpiSpreadstring · int32обязательно

Current spread charged on top of the index price, fp9 raw fraction.

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

Depth available on the long side, fp9 raw. Orders large against it move the execution price.

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

Depth available on the short side, fp9 raw.

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

Price-impact coefficient applied to long orders, fp9 raw.

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

Price-impact coefficient applied to short orders, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Пример: 1000000000
Посмотреть пример
{
  "indexPrice": "1000000000",
  "blockTimestamp": 0,
  "fundingRate": "1000000000",
  "nextFundingAt": 0,
  "lastFundingAt": 0,
  "vpiSpread": "1000000000",
  "vpiMarketDepthLong": "1000000000",
  "vpiMarketDepthShort": "1000000000",
  "vpiCoefficientLong": "1000000000",
  "vpiCoefficientShort": "1000000000"
}
settingsobjectобязательно

Trading rules of the market: fees, margin ratios and the caps an order is checked against.

Объект · 15 поля
feestring · int32обязательно

Trading fee rate, fp9 raw fraction (1000000 = 0.1%).

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

Smallest initial margin ratio the market accepts, fp9 raw fraction — the cap on leverage.

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

Default initial margin ratio of the market, fp9 raw fraction.

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

Margin ratio below which a position is liquidated, fp9 raw fraction.

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

Highest leverage allowed per account type, fp9 raw, keyed by account type.

Дополнительные свойства

string · int32

Пример: "1000000000"
pattern
^(?:-?[1-9][0-9]*|0)$
Посмотреть пример
{
  "key": "1000000000"
}
spreadLimitstring · int32обязательно

Largest spread the market will charge, fp9 raw fraction.

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

Largest price impact a single order may cause, fp9 raw fraction.

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

Largest deviation allowed between market and index price, fp9 raw fraction.

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

Cap on open notional held long on this market, fp9 raw. 0 means no cap.

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

Cap on open notional held short on this market, fp9 raw. 0 means no cap.

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

Minimum distance between the current price and a stop trigger, fp9 raw fraction. A closer trigger is pushed out to this distance.

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

Whether the market only accepts orders that close a position.

Пример: true
isClosedbooleanобязательно
Пример: true
isPausedbooleanобязательно
Пример: true
isZeroSpreadbooleanобязательно

Whether the market currently trades without a spread.

Пример: true
Посмотреть пример
{
  "fee": "1000000000",
  "minInitMarginRatio": "1000000000",
  "initMarginRatio": "1000000000",
  "maintenanceMarginRatio": "1000000000",
  "maxLeverageByAccount": {
    "key": "1000000000"
  },
  "spreadLimit": "1000000000",
  "maxPriceImpact": "1000000000",
  "maxPriceSpread": "1000000000",
  "maxOpenNotionalLong": "1000000000",
  "maxOpenNotionalShort": "1000000000",
  "minStopTriggerDistanceRatio": "1000000000",
  "isCloseOnly": true,
  "isClosed": true,
  "isPaused": true,
  "isZeroSpread": true
}
changeobjectобязательно

Reference prices for computing 1h, 4h and 24h price changes.

Объект · 3 поля
initialPricenumberобязательно

Price 24 hours ago, as a decimal number — the base of the daily change. 0 when no history is available.

Пример: 0
initialPrice1hnumberобязательно

Price one hour ago, as a decimal number. 0 when no history is available.

Пример: 0
initialPrice4hnumberобязательно

Price four hours ago, as a decimal number. 0 when no history is available.

Пример: 0
Посмотреть пример
{
  "initialPrice": 0,
  "initialPrice1h": 0,
  "initialPrice4h": 0
}
scheduleobject · nullableобязательно

Trading sessions of the market. Null when it trades around the clock.

Объект · 6 поля
nextPauseAtnumberобязательно

Start of the next scheduled break, unix timestamp in milliseconds. 0 when the market has no breaks at all, and 9007199254740991 when none is scheduled ahead of the current one.

Пример: 0
nextUnpauseAtnumberобязательно

End of the break the market is in, or of the next one, unix timestamp in milliseconds. Same 0 and sentinel rules as nextPauseAt.

Пример: 0
closestPauseAtnumberобязательно

Same value as nextPauseAt. Kept for backward compatibility.

Пример: 0
closestUnpauseAtnumberобязательно

Same value as nextUnpauseAt. Kept for backward compatibility.

Пример: 0
pausedAtnumberобязательно

Start of the break currently running, unix timestamp in milliseconds. 0 when the market is trading.

Пример: 0
inPausebooleanобязательно

Whether the market is inside a scheduled break right now. Orders are refused while it is.

Пример: true
Посмотреть пример
{
  "nextPauseAt": 0,
  "nextUnpauseAt": 0,
  "closestPauseAt": 0,
  "closestUnpauseAt": 0,
  "pausedAt": 0,
  "inPause": true
}