/v2/markets/{id}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.
https://api.upscale.tradeParámetros
idstring · uuidobligatorioIdentificador de mercado, tal como lo devuelve GET /v2/markets.
00000000-0000-4000-8000-000000000000accountIdstring · uuidopcionalCuenta 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})$
00000000-0000-4000-8000-000000000000Ejemplos
curl --request GET 'https://api.upscale.trade/v2/markets/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'const response = await fetch("https://api.upscale.trade/v2/markets/{id}", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
});
console.log(response.status, await response.text());import requests
response = requests.request(
"GET",
"https://api.upscale.trade/v2/markets/{id}",
headers={"Accept":"application/json","Authorization":"Bearer YOUR_API_KEY"},
timeout=30,
)
print(response.status_code, response.text)Respuestas
No autorizado
Mercado no encontrado, deslistado u oculto para el llamador.
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 · uuidobligatorioMarket 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-000000000000configobjectobligatorioStatic description of the market: assets, naming and category.
Objeto · 11 campos
baseAssetstringobligatorioBase asset ticker — the value the per-market endpoints take as asset.
BTCquoteAssetstringobligatorioAsset prices and notionals are quoted in.
USDsettlementTokenstringobligatorioAsset positions settle in.
USDtypestringobligatorioPricing model of the market.
basenamestringobligatorioDisplay name of the market.
BTCdescriptionstringobligatorioFree-form description shown in the app.
Market descriptiontickerstringobligatorioFull pair label.
BTC/USDimageLinkstringobligatorioIcon of the market.
https://app.storm.tg/markets/btc.pngtagsstring[]obligatorioTags the app groups markets by.
Elementos del array · string
string
"Crypto"Ver ejemplo
[
"Crypto"
]categorystring · enumobligatorioWhether the market is crypto or a real-world asset — an account may be limited to one of the two.
"crypto" "rwa"cryptoprioritynumber · nullableobligatorioSort weight in the market list; higher comes first. Null when unranked.
0Ver 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
}stateobjectobligatorioLive state: index price, funding and the depth an order is priced against.
Objeto · 10 campos
indexPricestring · int32obligatorioCurrent index price of the market, fp9 raw — what orders are priced and triggers compared against.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000blockTimestampnumberobligatorioWhen this state snapshot was produced, unix timestamp in milliseconds.
0fundingRatestring · int32obligatorioFunding rate of the running interval, fp9 raw fraction. Positive means longs pay shorts.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000nextFundingAtnumberobligatorioWhen funding is settled next, unix timestamp in milliseconds.
0lastFundingAtnumber · nullableobligatorioWhen funding was last settled, unix timestamp in milliseconds. Null before the first settlement.
0vpiSpreadstring · int32obligatorioCurrent spread charged on top of the index price, fp9 raw fraction.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000vpiMarketDepthLongstring · int32obligatorioDepth available on the long side, fp9 raw. Orders large against it move the execution price.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000vpiMarketDepthShortstring · int32obligatorioDepth available on the short side, fp9 raw.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000vpiCoefficientLongstring · int32obligatorioPrice-impact coefficient applied to long orders, fp9 raw.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000vpiCoefficientShortstring · int32obligatorioPrice-impact coefficient applied to short orders, fp9 raw.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000Ver ejemplo
{
"indexPrice": "1000000000",
"blockTimestamp": 0,
"fundingRate": "1000000000",
"nextFundingAt": 0,
"lastFundingAt": 0,
"vpiSpread": "1000000000",
"vpiMarketDepthLong": "1000000000",
"vpiMarketDepthShort": "1000000000",
"vpiCoefficientLong": "1000000000",
"vpiCoefficientShort": "1000000000"
}settingsobjectobligatorioTrading rules of the market: fees, margin ratios and the caps an order is checked against.
Objeto · 15 campos
feestring · int32obligatorioTrading fee rate, fp9 raw fraction (1000000 = 0.1%).
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000minInitMarginRatiostring · int32obligatorioSmallest initial margin ratio the market accepts, fp9 raw fraction — the cap on leverage.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000initMarginRatiostring · int32obligatorioDefault initial margin ratio of the market, fp9 raw fraction.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000maintenanceMarginRatiostring · int32obligatorioMargin ratio below which a position is liquidated, fp9 raw fraction.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000maxLeverageByAccountobjectobligatorioHighest leverage allowed per account type, fp9 raw, keyed by account type.
Propiedades adicionales
string · int32
"1000000000"- pattern
- ^(?:-?[1-9][0-9]*|0)$
Ver ejemplo
{
"key": "1000000000"
}spreadLimitstring · int32obligatorioLargest spread the market will charge, fp9 raw fraction.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000maxPriceImpactstring · int32obligatorioLargest price impact a single order may cause, fp9 raw fraction.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000maxPriceSpreadstring · int32obligatorioLargest deviation allowed between market and index price, fp9 raw fraction.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000maxOpenNotionalLongstring · int32obligatorioCap on open notional held long on this market, fp9 raw. 0 means no cap.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000maxOpenNotionalShortstring · int32obligatorioCap on open notional held short on this market, fp9 raw. 0 means no cap.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000minStopTriggerDistanceRatiostring · int32obligatorioMinimum 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)$
1000000000isCloseOnlybooleanobligatorioWhether the market only accepts orders that close a position.
trueisClosedbooleanobligatoriotrueisPausedbooleanobligatoriotrueisZeroSpreadbooleanobligatorioWhether the market currently trades without a spread.
trueVer 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
}changeobjectobligatorioReference prices for computing 1h, 4h and 24h price changes.
Objeto · 3 campos
initialPricenumberobligatorioPrice 24 hours ago, as a decimal number — the base of the daily change. 0 when no history is available.
0initialPrice1hnumberobligatorioPrice one hour ago, as a decimal number. 0 when no history is available.
0initialPrice4hnumberobligatorioPrice four hours ago, as a decimal number. 0 when no history is available.
0Ver ejemplo
{
"initialPrice": 0,
"initialPrice1h": 0,
"initialPrice4h": 0
}scheduleobject · nullableobligatorioTrading sessions of the market. Null when it trades around the clock.
Objeto · 6 campos
nextPauseAtnumberobligatorioStart 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.
0nextUnpauseAtnumberobligatorioEnd of the break the market is in, or of the next one, unix timestamp in milliseconds. Same 0 and sentinel rules as nextPauseAt.
0closestPauseAtnumberobligatorioSame value as nextPauseAt. Kept for backward compatibility.
0closestUnpauseAtnumberobligatorioSame value as nextUnpauseAt. Kept for backward compatibility.
0pausedAtnumberobligatorioStart of the break currently running, unix timestamp in milliseconds. 0 when the market is trading.
0inPausebooleanobligatorioWhether the market is inside a scheduled break right now. Orders are refused while it is.
trueVer ejemplo
{
"nextPauseAt": 0,
"nextUnpauseAt": 0,
"closestPauseAt": 0,
"closestUnpauseAt": 0,
"pausedAt": 0,
"inPause": true
}{
"id": "00000000-0000-4000-8000-000000000000",
"config": {
"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
},
"state": {
"indexPrice": "1000000000",
"blockTimestamp": 0,
"fundingRate": "1000000000",
"nextFundingAt": 0,
"lastFundingAt": 0,
"vpiSpread": "1000000000",
"vpiMarketDepthLong": "1000000000",
"vpiMarketDepthShort": "1000000000",
"vpiCoefficientLong": "1000000000",
"vpiCoefficientShort": "1000000000"
},
"settings": {
"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
},
"change": {
"initialPrice": 0,
"initialPrice1h": 0,
"initialPrice4h": 0
},
"schedule": {
"nextPauseAt": 0,
"nextUnpauseAt": 0,
"closestPauseAt": 0,
"closestUnpauseAt": 0,
"pausedAt": 0,
"inPause": true
}
}