TT CORE SDK 2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
position.h
Go to the documentation of this file.
1/***************************************************************************
2 *
3 * Unpublished Work Copyright (c) 2018-2020
4 * Trading Technologies International, Inc.
5 * All Rights Reserved Worldwide
6 *
7 * * * * S T R I C T L Y P R O P R I E T A R Y * * *
8 *
9 * WARNING: This program (or document) is unpublished, proprietary property
10 * of Trading Technologies International, Inc. and is to be maintained in
11 * strict confidence. Unauthorized reproduction, distribution or disclosure
12 * of this program (or document), or any program (or document) derived from
13 * it is prohibited by State and Federal law, and by local law outside of
14 * the U.S.
15 *
16 ***************************************************************************/
17#pragma once
18
19#include "enums/SODPriceType.h"
20#include <math.h>
21
22
23namespace ttsdk
24{
25
26 struct Position
27 {
28 public:
29 uint64_t account_id = 0;
30 uint64_t instrument_id = 0;
32
33 double buy_quantity = NAN;
34 double sell_quantity = NAN;
35 double net_position = NAN;
36 double buy_average_price = NAN;
37 double sell_average_price = NAN;
38 double open_average_price = NAN;
39
40 double pnl = NAN;
41 double realized_pnl = NAN;
42 double open_pnl = NAN;
43
44 double native_currency_pnl = NAN;
47
49 double sod_quantity = NAN;
50 double sod_price = NAN;
51
52 double contract_price = NAN;
53
54 };
55
57 {
58 uint64_t account_id = 0;
59 uint64_t instrument_id = 0;
61
63 {
64 double positionLimit = -1.0; // -1 indicated no position has been reserved
65 double maxClipSize = -1.0; // -1 indicated no position has been reserved
66 double workingPosition = 0.0; // qty currently working in the market covered by this bucket
67 double filledQty = 0.0; // qty filled that was included in this bucket
68 };
71 char parent_id[38];
72 };
73
74}
double native_currency_realized_pnl
Definition position.h:45
SODPriceType sod_type
Definition position.h:48
uint64_t account_id
Definition position.h:29
double open_average_price
Definition position.h:38
double contract_price
Definition position.h:52
double sod_quantity
Definition position.h:49
double open_pnl
Definition position.h:42
double buy_quantity
Definition position.h:33
double native_currency_pnl
Definition position.h:44
double net_position
Definition position.h:35
double sell_average_price
Definition position.h:37
double sell_quantity
Definition position.h:34
double native_currency_open_pnl
Definition position.h:46
uint64_t instrument_id
Definition position.h:30
double realized_pnl
Definition position.h:41
InstrumentPtr instrument
Definition position.h:31
double buy_average_price
Definition position.h:36
double sod_price
Definition position.h:50