Upscale
Menu
On this page

Get markets list

Try it out ↓
GET/v2/markets
Get markets listConfig

Every market open for trading, each with its current snapshot: price, daily change, leverage bounds, fees and trading schedule. Markets that are hidden or delisted are left out.

Passing accountId reads the snapshot from the trading shard that hosts that account — the state an order placed on it would be priced against. The account is not checked for ownership here: it only selects which shard answers.

Base URL https://api.upscale.trade

Authorization

bearerhttp · bearerrequired

Personal API key, prefixed with usk_.

Parameters

Query
accountIdstring · uuidoptional

Trader account to resolve the market list against: leverage bounds and availability are returned as they apply to that account. Omitted — the platform-wide defaults are returned.

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

Examples

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

Responses

401

Unauthorized

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 MarketV2Response

idstring · uuidrequired

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

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

Object · 11 fields
baseAssetstringrequired

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

Example: BTC
quoteAssetstringrequired

Asset prices and notionals are quoted in.

Example: USD
settlementTokenstringrequired

Asset positions settle in.

Example: USD
typestringrequired

Pricing model of the market.

Example: base
namestringrequired

Display name of the market.

Example: BTC
descriptionstringrequired

Free-form description shown in the app.

Example: Market description
tickerstringrequired

Full pair label.

Example: BTC/USD
imageLinkstringrequired

Icon of the market.

Example: https://app.storm.tg/markets/btc.png
tagsstring[]required

Tags the app groups markets by.

Array items · string

string

Example: "Crypto"
View example
[
  "Crypto"
]
categorystring · enumrequired

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

Allowed: "crypto" "rwa"
Example: crypto
prioritynumber · nullablerequired

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

Example: 0
View example
{
  "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
}
stateobjectrequired

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

Object · 10 fields
indexPricestring · int32required

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

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

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

Example: 0
fundingRatestring · int32required

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

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

When funding is settled next, unix timestamp in milliseconds.

Example: 0
lastFundingAtnumber · nullablerequired

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

Example: 0
vpiSpreadstring · int32required

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

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

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

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

Depth available on the short side, fp9 raw.

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

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

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

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

pattern
^(?:-?[1-9][0-9]*|0)$
Example: 1000000000
View example
{
  "indexPrice": "1000000000",
  "blockTimestamp": 0,
  "fundingRate": "1000000000",
  "nextFundingAt": 0,
  "lastFundingAt": 0,
  "vpiSpread": "1000000000",
  "vpiMarketDepthLong": "1000000000",
  "vpiMarketDepthShort": "1000000000",
  "vpiCoefficientLong": "1000000000",
  "vpiCoefficientShort": "1000000000"
}
settingsobjectrequired

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

Object · 15 fields
feestring · int32required

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

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

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

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

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

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

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

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

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

Additional properties

string · int32

Example: "1000000000"
pattern
^(?:-?[1-9][0-9]*|0)$
View example
{
  "key": "1000000000"
}
spreadLimitstring · int32required

Largest spread the market will charge, fp9 raw fraction.

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

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

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

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

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

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

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

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

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

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)$
Example: 1000000000
isCloseOnlybooleanrequired

Whether the market only accepts orders that close a position.

Example: true
isClosedbooleanrequired
Example: true
isPausedbooleanrequired
Example: true
isZeroSpreadbooleanrequired

Whether the market currently trades without a spread.

Example: true
View example
{
  "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
}
changeobjectrequired

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

Object · 3 fields
initialPricenumberrequired

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

Example: 0
initialPrice1hnumberrequired

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

Example: 0
initialPrice4hnumberrequired

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

Example: 0
View example
{
  "initialPrice": 0,
  "initialPrice1h": 0,
  "initialPrice4h": 0
}
scheduleobject · nullablerequired

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

Object · 6 fields
nextPauseAtnumberrequired

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.

Example: 0
nextUnpauseAtnumberrequired

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

Example: 0
closestPauseAtnumberrequired

Same value as nextPauseAt. Kept for backward compatibility.

Example: 0
closestUnpauseAtnumberrequired

Same value as nextUnpauseAt. Kept for backward compatibility.

Example: 0
pausedAtnumberrequired

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

Example: 0
inPausebooleanrequired

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

Example: true
View example
{
  "nextPauseAt": 0,
  "nextUnpauseAt": 0,
  "closestPauseAt": 0,
  "closestUnpauseAt": 0,
  "pausedAt": 0,
  "inPause": true
}