Positions
Note
Information about all of the user’s current and previous positions
Positions Endpoints
- Client.get_positions(include_count: bool = False) Union[List[jockmkt_sdk.objects.Position], Tuple[List[jockmkt_sdk.objects.Position], int]]
- Parameters
include_count (bool, optional) – Include the total positions count as the second part of a tuple in return value
- Returns
a user’s open positions in all current events, and if include_count==True, the total count of positions.
Position Object
Contains all of the information about a user’s positions
- class jockmkt_sdk.objects.Position(position: dict)
an object containing information about open positions or holdings. Note that instance variables do not include fees
- Variables
tradeable_id – the player’s tradeable_id for the position
event_id – identifier for the event to which the position applies
sold_count – total quantity sold over the course of the event
bought_count – total quantity purchased over the course of the event
buy_interest – amount of shares the user is currently trying to buy
sell_interest – amount of shares the user is currently trying to sell
quantity_owned – number of shares the user owns
cost_basis – total amount spent on shares of the player that the user currently owns
proceeds – total amount of income for open position
cost_basis_all_time – total amount spent on shares of the player whether they are currently owned or not
proceeds_all_time – total realized profit and loss for selling shares of this tradeable