Skip to main content
Version: release (v0.77)

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.

    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.

    lossSocialisationAmount string

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

    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.

    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...