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
23
namespace
ttsdk
24
{
25
26
struct
Position
27
{
28
public
:
29
uint64_t
account_id
= 0;
30
uint64_t
instrument_id
= 0;
31
InstrumentPtr
instrument
=
nullptr
;
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;
45
double
native_currency_realized_pnl
= NAN;
46
double
native_currency_open_pnl
= NAN;
47
48
SODPriceType
sod_type
=
SODPriceType::None
;
49
double
sod_quantity
= NAN;
50
double
sod_price
= NAN;
51
52
double
contract_price
= NAN;
53
54
};
55
56
struct
PositionReserveBucket
57
{
58
uint64_t
account_id
= 0;
59
uint64_t
instrument_id
= 0;
60
InstrumentPtr
instrument
=
nullptr
;
61
62
struct
BucketSide
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
};
69
BucketSide
buySide
;
70
BucketSide
sellSide
;
71
char
parent_id
[38];
72
};
73
74
}
SODPriceType.h
ttsdk::shared_ptr< const Instrument >
ttsdk
Definition
account.h:21
ttsdk::SODPriceType
SODPriceType
Definition
SODPriceType.h:29
ttsdk::SODPriceType::None
@ None
ttsdk::Position
Definition
position.h:27
ttsdk::Position::native_currency_realized_pnl
double native_currency_realized_pnl
Definition
position.h:45
ttsdk::Position::sod_type
SODPriceType sod_type
Definition
position.h:48
ttsdk::Position::account_id
uint64_t account_id
Definition
position.h:29
ttsdk::Position::pnl
double pnl
Definition
position.h:40
ttsdk::Position::open_average_price
double open_average_price
Definition
position.h:38
ttsdk::Position::contract_price
double contract_price
Definition
position.h:52
ttsdk::Position::sod_quantity
double sod_quantity
Definition
position.h:49
ttsdk::Position::open_pnl
double open_pnl
Definition
position.h:42
ttsdk::Position::buy_quantity
double buy_quantity
Definition
position.h:33
ttsdk::Position::native_currency_pnl
double native_currency_pnl
Definition
position.h:44
ttsdk::Position::net_position
double net_position
Definition
position.h:35
ttsdk::Position::sell_average_price
double sell_average_price
Definition
position.h:37
ttsdk::Position::sell_quantity
double sell_quantity
Definition
position.h:34
ttsdk::Position::native_currency_open_pnl
double native_currency_open_pnl
Definition
position.h:46
ttsdk::Position::instrument_id
uint64_t instrument_id
Definition
position.h:30
ttsdk::Position::realized_pnl
double realized_pnl
Definition
position.h:41
ttsdk::Position::instrument
InstrumentPtr instrument
Definition
position.h:31
ttsdk::Position::buy_average_price
double buy_average_price
Definition
position.h:36
ttsdk::Position::sod_price
double sod_price
Definition
position.h:50
ttsdk::PositionReserveBucket::BucketSide
Definition
position.h:63
ttsdk::PositionReserveBucket::BucketSide::positionLimit
double positionLimit
Definition
position.h:64
ttsdk::PositionReserveBucket::BucketSide::workingPosition
double workingPosition
Definition
position.h:66
ttsdk::PositionReserveBucket::BucketSide::maxClipSize
double maxClipSize
Definition
position.h:65
ttsdk::PositionReserveBucket::BucketSide::filledQty
double filledQty
Definition
position.h:67
ttsdk::PositionReserveBucket
Definition
position.h:57
ttsdk::PositionReserveBucket::parent_id
char parent_id[38]
Definition
position.h:71
ttsdk::PositionReserveBucket::account_id
uint64_t account_id
Definition
position.h:58
ttsdk::PositionReserveBucket::buySide
BucketSide buySide
Definition
position.h:69
ttsdk::PositionReserveBucket::instrument_id
uint64_t instrument_id
Definition
position.h:59
ttsdk::PositionReserveBucket::sellSide
BucketSide sellSide
Definition
position.h:70
ttsdk::PositionReserveBucket::instrument
InstrumentPtr instrument
Definition
position.h:60
Header Files
position.h
Generated by
1.10.0