TT CORE SDK 2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
connection.h
Go to the documentation of this file.
1/***************************************************************************
2 *
3 * Unpublished Work Copyright (c) 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#include <stddef.h>
19#include "shared_ptr.h"
20#include "enums/MarketId.h"
21
22namespace ttsdk {
23
25 {
27 {
28 UNKNOWN = 0,
29 UP = 1,
30 RISK_DOWN = 2,
34 };
35
36 static constexpr size_t MAX_CONNECTIONS = 56;
37 uint64_t account_id = 0;
38
45
46 size_t count;
47
48 };
49
50 inline const char* ToString(const AccountConnectionStatus::ConnectionStatus status)
51 {
52 if (status == AccountConnectionStatus::ConnectionStatus::UP) return "Up";
53 if (status == AccountConnectionStatus::ConnectionStatus::RISK_DOWN) return "Risk Down";
54 if (status == AccountConnectionStatus::ConnectionStatus::ORDER_CONNECTOR_DOWN) return "Order Connector Down";
55 if (status == AccountConnectionStatus::ConnectionStatus::SYNTHETIC_ENGINE_DOWN) return "Synthetic Engine Down";
56 if (status == AccountConnectionStatus::ConnectionStatus::NO_CONNECTIVITY) return "No Connectivity";
57 return "Unknown";
58 }
59}
MarketId
Definition MarketId.h:29
const char * ToString(const AccountConnectionStatus::ConnectionStatus status)
Definition connection.h:50
static constexpr size_t MAX_CONNECTIONS
Definition connection.h:36
struct ttsdk::AccountConnectionStatus::Connection connections[MAX_CONNECTIONS]