Positions

Read open positions across the venue, or filter to a single trader. One endpoint, public, no API key required.

Get open positions

GET /v1/positions/open

Returns positions that have been opened and not yet closed or liquidated. Positions are materialized from on-chain position_opened events minus subsequent position_closed and position_liquidated events.

Auth: none (public). Unauthenticated requests fall under the public rate-limit tier (60 requests/min per IP).

Query parameters

ParameterTypeRequiredDescription
traderstringnoStellar address to filter by. Returns only that trader’s open positions.

Rows are returned newest-first (ordered by openedAt descending). There is no limit parameter. The response is hard-capped at 200 rows for the venue-wide query and 500 rows when filtered by trader.

Example request

curl -s "https://noetherapi-production.up.railway.app/v1/positions/open?trader=CCEQJKB3WVADOSCLCMFXL3VBZ4RKYEGFCG4SJVPERLFEWSIFMIWROLZA"

Example response

{
  "positions": [
    {
      "positionId": 331,
      "trader": "CCEQJKB3WVADOSCLCMFXL3VBZ4RKYEGFCG4SJVPERLFEWSIFMIWROLZA",
      "asset": "BTC",
      "direction": 0,
      "size": "285300000000",
      "entryPrice": "622093708225",
      "openedAt": 1780818917,
      "openedTxHash": "eb9260de713579311368a9eba7f3e10a10a1a8e225bec79312d8a1cace7b9b8c"
    }
  ]
}

Response fields

FieldTypeDescription
positionIdintegerOn-chain position ID.
traderstringPosition owner. Can be an account address (G…) or a contract address (C…) — Trader Vaults trade as contracts.
assetstringAsset symbol, e.g. BTC.
directioninteger0 = long, 1 = short.
sizestringPosition size in USDC notional, 7-decimal fixed point ("285300000000" = $28,530).
entryPricestringEntry price, 7-decimal fixed point ("622093708225" = $62,209.37).
openedAtintegerOpen time, unix seconds.
openedTxHashstringHash of the opening transaction.

This endpoint is served from the indexer projection, not a live chain read, so it can lag the chain. Check GET /v1/health and read indexer.ledgerAgeSeconds to see how far behind the projection is. If the projection has no data yet, the endpoint returns {"positions":[]} rather than an error.

Your own positions

If you hold an API key, GET /v1/account/me/positions returns your open positions in the same row shape, plus your recent position events — see Account.

Next steps

  • Authentication — get an API key for the authed endpoints
  • Trading — open and close positions via prepare → sign → submit
  • Markets — recent realized trades and per-asset open interest