/positions/{accountId}/{asset}/open-notionalOpen 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.
https://api.upscale.tradeParameters
accountIdstring · uuidrequiredTrader account identifier. Must belong to the caller.
00000000-0000-4000-8000-000000000000assetstringrequiredBase asset ticker of the market, as returned by GET /v2/markets.
BTCExamples
curl --request GET 'https://api.upscale.trade/positions/{accountId}/{asset}/open-notional' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'const response = await fetch("https://api.upscale.trade/positions/{accountId}/{asset}/open-notional", {
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/positions/{accountId}/{asset}/open-notional",
headers={"Accept":"application/json","Authorization":"Bearer YOUR_API_KEY"},
timeout=30,
)
print(response.status_code, response.text)Responses
Unauthorized
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).
No account with this identifier, or no market for this ticker.
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 · int32requiredOpen notional the account holds long on this market, summed across positions, fp9 raw.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000openNotionalShortstring · int32requiredOpen notional the account holds short on this market, summed across positions, fp9 raw.
- pattern
- ^(?:-?[1-9][0-9]*|0)$
1000000000{
"openNotionalLong": "1000000000",
"openNotionalShort": "1000000000"
}