Skip to main content
Version: pre-release (v0.79)

List positions

GET 

/api/v2/positions

Get a list of all of a party's positions

Request

Query Parameters

    filter.partyIds string[]

    Restrict positions to those related to the given parties.

    filter.marketIds string[]

    Restrict positions to those on the given markets.

    filter.includeDerivedParties boolean

    Whether to return all derived parties from AMMs for the given party.

    pagination.first int32

    Number of records to be returned that sort greater than row identified by cursor supplied in 'after'.

    pagination.after string

    If paging forwards, the cursor string for the last row of the previous page.

    pagination.last int32

    Number of records to be returned that sort less than row identified by cursor supplied in 'before'.

    pagination.before string

    If paging forwards, the cursor string for the first row of the previous page.

    pagination.newestFirst boolean

    Whether to order the results with the newest records first. If not set, the default value is true.

Responses

A successful response.

Schema
    positions object

    Page of positions data and corresponding page information.

    edges object[]

    Page of positions data and their corresponding cursors.

  • Array [
  • cursor string

    Cursor that can be used to fetch further pages.

    node object

    Position data for a party on a market.

    averageEntryPrice string

    Average entry price for the position, the price is an integer, for example 123456 is a correctly formatted price of 1.23456 assuming market configured to 5 decimal places.

    feesPaid string

    Total fees paid by a party on a market (liquidity, infrastructure, treasury, buy-back, high volume maker fee).

    feesPaidSince string

    Fees paid since opening the current position.

    fundingPaymentAmount string

    Total funding payment amounts received or paid by a party on a market.

    fundingPaymentAmountSince string

    Funding payments received or paid since opening the current position.

    lossSocialisationAmount string

    Sum of profit that could not be paid due to loss socialisation.

    makerFeesReceived string

    Total maker fees received by a party on a market.

    makerFeesReceivedSince string

    Maker fees received since opening the current position.

    marketId string

    Market ID in which the position is held.

    openVolume int64

    Open volume for the position, value is signed +ve for long and -ve for short.

    partyId string

    Party ID holding the position.

    positionStatus Represents the status of a position (string)

    Possible values: [POSITION_STATUS_UNSPECIFIED, POSITION_STATUS_ORDERS_CLOSED, POSITION_STATUS_CLOSED_OUT, POSITION_STATUS_DISTRESSED]

    Default value: POSITION_STATUS_UNSPECIFIED

    Position status, indicating whether the party was distressed and had orders cancelled or was closed out.

    realisedPnl string

    Realised profit and loss for the position, value is signed +ve for long and -ve for short. This field is a signed integer scaled to the market's decimal places.

    takerFeesPaid string

    Total taker fees paid by a party on a market.

    takerFeesPaidSince string

    Taker fees paid by party on a market since opening their current position. The current position is counted whenever the party changed sides (long <=> short), or a position was opened.

    unrealisedPnl string

    Unrealised profit and loss for the position, value is signed +ve for long and -ve for short. This field is a signed integer scaled to the market's decimal places.

    updatedAt int64

    Timestamp for the latest time the position was updated.

  • ]
  • pageInfo object

    Page information that is used for fetching further pages.

    endCursor string

    End cursor.

    hasNextPage boolean

    Indicator if there is a next page.

    hasPreviousPage boolean

    Indicator if there is a previous page.

    startCursor string

    Start cursor.

Loading...