Skip to content
UDX
2026-07-15

Get Positions

Returns current position records for your granted accounts, including records with a zero net position. Without an account_id filter, the response covers every account you can read, and an account is included only after its setup and the setup of your access to it have both completed.

GET/portfolio/positions
Authorization
Authorization
UDX-Access-KeyAPI key · headerrequired

Opaque API key ID.

UDX-Access-TimestampAPI key · headerrequired

Unix time in milliseconds, within 30 seconds of server time.

UDX-Access-SignatureAPI key · headerrequired

Standard-base64 RSA-PSS/SHA-256 signature with a 32-byte salt.

or
AuthorizationBearer token (JWT) · headerrequired

Bearer token for an active signed-in UDX user.

Header parameters
Header parameters
UDX-Versionstring

Dated API version (YYYY-MM-DD).

min length 10 · max length 10
Query parameters
account_idEntityId

Filter to a single account.

min length 1
tickerTicker

Filter by market ticker.

min length 1 · max length 128
limitinteger

Maximum number of items to return in one page.

min 1 · max 100 · default: 10
pagestring

Opaque token identifying the requested page.

max length 512
Responses
200A page of current position records.
positionsPosition[]required

One page of current position records.

max items 100
Show properties
Array of Position
account_idstringrequired

The account holding the position.

min length 1
tickerTickerrequired

A human-meaningful natural key naming a single-leg or multi-leg market.

min length 1 · max length 128
positionstringrequired

Net position in contracts; negative for a short position.

max length 25 · matches ^-?[0-9]+(\.[0-9]{1,2})?$
quantity_boughtstring

Total contracts bought.

max length 24 · matches ^[0-9]+(\.[0-9]{1,2})?$
quantity_soldstring

Total contracts sold.

max length 24 · matches ^[0-9]+(\.[0-9]{1,2})?$
coststring

Cost basis of the position, in dollars.

max length 24 · matches ^[0-9]+(\.[0-9]{1,6})?$
realized_pnlstring

Realized profit/loss in dollars; may be negative.

max length 25 · matches ^-?[0-9]+(\.[0-9]{1,6})?$
updated_atstring<date-time>

When the position last changed.

max length 40
next_page_urlNextPageURL | nullrequired

Root-relative URL for the next page. Null when there are no more items.

max length 4096 · matches ^/[^/\s#][^\s#]*$
400The request doesn't conform to this spec.
typestring<uri-reference>required

A stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.

max length 2048
titlestringrequired

A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.

max length 40
statusintegerrequired

The HTTP status code, repeated from the response itself.

detailstring

A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.

max length 500
instancestring<uri-reference>

An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.

max length 100
401No valid credential was provided.
typestring<uri-reference>required

A stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.

max length 2048
titlestringrequired

A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.

max length 40
statusintegerrequired

The HTTP status code, repeated from the response itself.

detailstring

A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.

max length 500
instancestring<uri-reference>

An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.

max length 100
403The credential lacks the read scope.
typestring<uri-reference>required

A stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.

max length 2048
titlestringrequired

A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.

max length 40
statusintegerrequired

The HTTP status code, repeated from the response itself.

detailstring

A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.

max length 500
instancestring<uri-reference>

An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.

max length 100
429The member rate limit was exceeded.
typestring<uri-reference>required

A stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.

max length 2048
titlestringrequired

A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.

max length 40
statusintegerrequired

The HTTP status code, repeated from the response itself.

detailstring

A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.

max length 500
instancestring<uri-reference>

An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.

max length 100
500Something went wrong on UDX's side.
typestring<uri-reference>required

A stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.

max length 2048
titlestringrequired

A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.

max length 40
statusintegerrequired

The HTTP status code, repeated from the response itself.

detailstring

A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.

max length 500
instancestring<uri-reference>

An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.

max length 100
503Request admission or account setup is unavailable, or the read could not be completed in time; retry.
typestring<uri-reference>required

A stable URN identifying the kind of problem, for example urn:udx:problem:insufficient-permissions. Branch on it rather than on the localized detail. It is an identifier, not a URL to dereference.

max length 2048
titlestringrequired

A localized, human-readable summary of the error category. Stable for a given status code and resolved language — clients must not use it as a machine-readable discriminator.

max length 40
statusintegerrequired

The HTTP status code, repeated from the response itself.

detailstring

A localized, human-readable explanation specific to this occurrence. Clients must not parse it for machine-readable information.

max length 500
instancestring<uri-reference>

An identifier for this specific occurrence, so it can be correlated with server-side logs if you need to report it.

max length 100
Request
curl -X GET "https://api.underdogexchange.com/portfolio/positions" \
  -H "UDX-Access-Key: API_KEY_ID" \
  -H "UDX-Access-Timestamp: UNIX_MILLISECONDS" \
  -H "UDX-Access-Signature: BASE64_SIGNATURE"
Response
{
  "positions": [
    {
      "account_id": "6820943174116859281",
      "ticker": "UDX-EXAMPLE-MARKET",
      "position": "60",
      "quantity_bought": "100",
      "quantity_sold": "40",
      "cost": "32.40",
      "realized_pnl": "4.00",
      "updated_at": "2026-01-01T00:00:00.000000Z"
    }
  ],
  "next_page_url": null
}