Upscale
Menu
On this page

Obtener mercado por id

Probar ↓
GET/v2/markets/{id}
Obtener mercado por idConfiguración

Un mercado con la misma instantánea que devuelve la lista.

Responde 404 cuando el mercado no existe, está deslistado o está oculto para el llamador.

URL base https://api.upscale.trade

Autorización

bearerhttp · bearerobligatorio

Clave de API personal, con el prefijo usk_.

Parámetros

Ruta
idstring · uuidobligatorio

Identificador de mercado, tal como lo devuelve GET /v2/markets.

Ejemplo: 00000000-0000-4000-8000-000000000000
Consulta
accountIdstring · uuidopcional

Cuenta de trader respecto a la cual resolver la lista de mercados: los límites de apalancamiento y la disponibilidad se devuelven tal como se aplican a esa cuenta. Omitida — se devuelven los valores predeterminados de toda la plataforma.

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})$
Ejemplo: 00000000-0000-4000-8000-000000000000

Ejemplos

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

Respuestas

401

No autorizado

404

Mercado no encontrado, deslistado u oculto para el llamador.

429

Se superó el límite de velocidad de la clave de API (api_key_rate_limit_exceeded). Retry-After indica cuándo volver; el cuerpo incluye el bucket (read / write), la ventana que se activó, su límite y retryAt.

defaultRespuestaapplication/json
idstring · uuidobligatorio

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})$
Ejemplo: 00000000-0000-4000-8000-000000000000
configobjectobligatorio

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

Objeto · 11 campos
baseAssetstringobligatorio

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

Ejemplo: BTC
quoteAssetstringobligatorio

Asset prices and notionals are quoted in.

Ejemplo: USD
settlementTokenstringobligatorio

Asset positions settle in.

Ejemplo: USD
typestringobligatorio

Pricing model of the market.

Ejemplo: base
namestringobligatorio

Display name of the market.

Ejemplo: BTC
descriptionstringobligatorio

Free-form description shown in the app.

Ejemplo: Market description
tickerstringobligatorio

Full pair label.

Ejemplo: BTC/USD
imageLinkstringobligatorio

Icon of the market.

Ejemplo: https://app.storm.tg/markets/btc.png
tagsstring[]obligatorio

Tags the app groups markets by.

Elementos del array · string

string

Ejemplo: "Crypto"
Ver ejemplo
[
  "Crypto"
]
categorystring · enumobligatorio

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

Permitido: "crypto" "rwa"
Ejemplo: crypto
prioritynumber · nullableobligatorio

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

Ejemplo: 0
Ver ejemplo
{
  "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
}
stateobjectobligatorio

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

Objeto · 10 campos
indexPricestring · int32obligatorio

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

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

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

Ejemplo: 0
fundingRatestring · int32obligatorio

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

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

When funding is settled next, unix timestamp in milliseconds.

Ejemplo: 0
lastFundingAtnumber · nullableobligatorio

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

Ejemplo: 0
vpiSpreadstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
vpiMarketDepthLongstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
vpiMarketDepthShortstring · int32obligatorio

Depth available on the short side, fp9 raw.

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
vpiCoefficientLongstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
vpiCoefficientShortstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
Ver ejemplo
{
  "indexPrice": "1000000000",
  "blockTimestamp": 0,
  "fundingRate": "1000000000",
  "nextFundingAt": 0,
  "lastFundingAt": 0,
  "vpiSpread": "1000000000",
  "vpiMarketDepthLong": "1000000000",
  "vpiMarketDepthShort": "1000000000",
  "vpiCoefficientLong": "1000000000",
  "vpiCoefficientShort": "1000000000"
}
settingsobjectobligatorio

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

Objeto · 15 campos
feestring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
minInitMarginRatiostring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
initMarginRatiostring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
maintenanceMarginRatiostring · int32obligatorio

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

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

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

Propiedades adicionales

string · int32

Ejemplo: "1000000000"
pattern
^(?:-?[1-9][0-9]*|0)$
Ver ejemplo
{
  "key": "1000000000"
}
spreadLimitstring · int32obligatorio

Largest spread the market will charge, fp9 raw fraction.

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
maxPriceImpactstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
maxPriceSpreadstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
maxOpenNotionalLongstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
maxOpenNotionalShortstring · int32obligatorio

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

pattern
^(?:-?[1-9][0-9]*|0)$
Ejemplo: 1000000000
minStopTriggerDistanceRatiostring · int32obligatorio

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)$
Ejemplo: 1000000000
isCloseOnlybooleanobligatorio

Whether the market only accepts orders that close a position.

Ejemplo: true
isClosedbooleanobligatorio
Ejemplo: true
isPausedbooleanobligatorio
Ejemplo: true
isZeroSpreadbooleanobligatorio

Whether the market currently trades without a spread.

Ejemplo: true
Ver ejemplo
{
  "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
}
changeobjectobligatorio

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

Objeto · 3 campos
initialPricenumberobligatorio

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

Ejemplo: 0
initialPrice1hnumberobligatorio

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

Ejemplo: 0
initialPrice4hnumberobligatorio

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

Ejemplo: 0
Ver ejemplo
{
  "initialPrice": 0,
  "initialPrice1h": 0,
  "initialPrice4h": 0
}
scheduleobject · nullableobligatorio

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

Objeto · 6 campos
nextPauseAtnumberobligatorio

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.

Ejemplo: 0
nextUnpauseAtnumberobligatorio

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

Ejemplo: 0
closestPauseAtnumberobligatorio

Same value as nextPauseAt. Kept for backward compatibility.

Ejemplo: 0
closestUnpauseAtnumberobligatorio

Same value as nextUnpauseAt. Kept for backward compatibility.

Ejemplo: 0
pausedAtnumberobligatorio

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

Ejemplo: 0
inPausebooleanobligatorio

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

Ejemplo: true
Ver ejemplo
{
  "nextPauseAt": 0,
  "nextUnpauseAt": 0,
  "closestPauseAt": 0,
  "closestUnpauseAt": 0,
  "pausedAt": 0,
  "inPause": true
}