Skip to main content
GET
/
api
/
workflows
/
polymarket
/
getCurrentPositions
Get Current Positions
curl --request GET \
  --url https://api-v2.swaps.xyz/api/workflows/polymarket/getCurrentPositions \
  --header 'x-api-key: <api-key>'
[
  {
    "proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
    "asset": "<string>",
    "conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
    "size": 123,
    "avgPrice": 123,
    "initialValue": 123,
    "currentValue": 123,
    "cashPnl": 123,
    "percentPnl": 123,
    "totalBought": 123,
    "realizedPnl": 123,
    "percentRealizedPnl": 123,
    "curPrice": 123,
    "redeemable": true,
    "mergeable": true,
    "title": "<string>",
    "slug": "<string>",
    "icon": "<string>",
    "eventSlug": "<string>",
    "outcome": "<string>",
    "outcomeIndex": 123,
    "oppositeOutcome": "<string>",
    "oppositeAsset": "<string>",
    "endDate": "<string>",
    "negativeRisk": true,
    "eventId": "<string>"
  }
]

Authorizations

x-api-key
string
header
required

API key for authentication. Contact Swaps.xyz to obtain an API key.

Query Parameters

userId
string
required

User EVM EOA address EVM address (0x prefix + 40 hex characters)

Example:

"0x1234567890123456789012345678901234567890"

proxyWallet
string

Polymarket proxy wallet address EVM address (0x prefix + 40 hex characters)

Example:

"0x1234567890123456789012345678901234567890"

redeemable
boolean
default:false

Filter for redeemable positions only

mergeable
boolean
default:false

Filter for mergeable positions only

Response

Array of current positions

proxyWallet
string
required

Proxy wallet address

Example:

"0x56687bf447db6ffa42ffe2204a05edaa20f55839"

asset
string
required

Asset token ID

conditionId
string
required

Condition ID (0x-prefixed 64-hex string)

Example:

"0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917"

size
number<float>
required

Position size

avgPrice
number<float>
required

Average purchase price

initialValue
number<float>
required

Initial position value

currentValue
number<float>
required

Current position value

cashPnl
number<float>
required

Cash profit/loss

percentPnl
number<float>
required

Percentage profit/loss

totalBought
number<float>
required

Total amount bought

realizedPnl
number<float>
required

Realized profit/loss

percentRealizedPnl
number<float>
required

Percentage realized profit/loss

curPrice
number<float>
required

Current price

redeemable
boolean
required

Whether position is redeemable

mergeable
boolean
required

Whether position is mergeable

title
string
required

Market title

slug
string
required

Market slug

icon
string
required

Market icon URL

eventSlug
string
required

Event slug

outcome
string
required

Outcome name

outcomeIndex
integer
required

Outcome index

oppositeOutcome
string
required

Opposite outcome name

oppositeAsset
string
required

Opposite asset token ID

endDate
string
required

Market end date

negativeRisk
boolean
required

Whether position uses negative risk

eventId
string

Event ID (optional field)