Upscale
Menu
On this page

Get current open interest by ticker

Try it out ↓
GET/positions/{accountId}/{asset}/open-notional
Get current open interest by tickerTrading

Open notional the account currently holds on one market, summed per direction, fp9 raw.

  • Useful before sizing an increase: the market caps open notional per direction, and an order that would breach the cap is rejected with order_exceeds_max_open_notional.
Base URL https://api.upscale.trade

Authorization

bearerhttp · bearerrequired

Personal API key, prefixed with usk_.

Parameters

Path
accountIdstring · uuidrequired

Trader account identifier. Must belong to the caller.

Example: 00000000-0000-4000-8000-000000000000
assetstringrequired

Base asset ticker of the market, as returned by GET /v2/markets.

Example: BTC

Examples

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

Responses

401

Unauthorized

403

The account belongs to another user (account_access_denied), or the request is authenticated with an API key while api_trading is disabled on the account (api_trading_not_enabled).

404

No account with this identifier, or no market for this ticker.

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
openNotionalLongstring · int32required

Open notional the account holds long on this market, summed across positions, fp9 raw.

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

Open notional the account holds short on this market, summed across positions, fp9 raw.

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