vnpy/vn.xtp/xtpapi/xquote_api_struct.h

161 lines
3.5 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////
///@author <20><>̩֤ȯ<D6A4>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD>޹<EFBFBD>˾
///@file xquote_api_struct.h
///@brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
/////////////////////////////////////////////////////////////////////////
#ifndef _XQUOTE_API_STRUCT_H_
#define _XQUOTE_API_STRUCT_H_
#include <stdint.h>
#include "xtp_api_data_type.h"
///ָ<><D6B8><EFBFBD>ĺ<EFBFBD>Լ
typedef struct XTPSpecificTickerStruct
{
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
XTP_EXCHANGE_TYPE exchange_id;
///<2F><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EBA3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"600000 "
char ticker[XTP_TICKER_LEN];
} XTPST;
///<2F><><EFBFBD><EFBFBD>
typedef struct XTPMarketDataStruct
{
// <20><><EFBFBD><EFBFBD>
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
XTP_EXCHANGE_TYPE exchange_id;
///<2F><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EBA3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>
char ticker[XTP_TICKER_LEN];
// <20><>Ʊ<EFBFBD>ȼ۸<C8BC>
///<2F><><EFBFBD>¼<EFBFBD>
double last_price;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double pre_close_price;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double open_price;
///<2F><><EFBFBD>߼<EFBFBD>
double high_price;
///<2F><><EFBFBD>ͼ<EFBFBD>
double low_price;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double close_price;
// <20>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///<2F><><EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double pre_open_interest;
///<2F>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double open_interest;
///<2F>ϴν<CFB4><CEBD><EFBFBD><EFBFBD>ۣ<EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double pre_settlement_price;
///<2F><><EFBFBD>ν<EFBFBD><CEBD><EFBFBD><EFBFBD>ۣ<EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double settlement_price;
///<2F><>ͣ<EFBFBD><CDA3><EFBFBD>ۣ<EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double upper_limit_price;
///<2F><>ͣ<EFBFBD><CDA3><EFBFBD>ۣ<EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double lower_limit_price;
///<2F><><EFBFBD><EFBFBD>ʵ<EFBFBD>ȣ<EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double pre_delta;
///<2F><><EFBFBD><EFBFBD>ʵ<EFBFBD>ȣ<EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
double curr_delta;
/// ʱ<><CAB1><EFBFBD><EFBFBD>
int64_t data_time;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///<2F><><EFBFBD><EFBFBD>
int32_t qty;
///<2F>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>
double turnover;
///<2F><><EFBFBD>վ<EFBFBD><D5BE><EFBFBD>
double avg_price;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///ʮ<><CAAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double bid[10];
///ʮ<><CAAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double ask[10];
///ʮ<><CAAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int32_t bid_qty[10];
///ʮ<><CAAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int32_t ask_qty[10];
// ltsû<73>а<EFBFBD><D0B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>Ŀǰδ<C7B0><CEB4>д<EFBFBD><D0B4>
///<2F>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>
int32_t trades_count;
///<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>״̬˵<CCAC><CBB5>
char ticker_status[8];
///ί<><CEAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int32_t total_bid_qty;
///ί<><CEAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int32_t total_ask_qty;
///<2F><>Ȩƽ<C8A8><C6BD>ί<EFBFBD><CEAF><EFBFBD>۸<EFBFBD>
double ma_bid_price;
///<2F><>Ȩƽ<C8A8><C6BD>ί<EFBFBD><CEAF><EFBFBD>۸<EFBFBD>
double ma_ask_price;
///ծȯ<D5AE><C8AF>Ȩƽ<C8A8><C6BD>ί<EFBFBD><CEAF><EFBFBD>۸<EFBFBD>
double ma_bond_bid_price;
///ծȯ<D5AE><C8AF>Ȩƽ<C8A8><C6BD>ί<EFBFBD><CEAF><EFBFBD>۸<EFBFBD>
double ma_bond_ask_price;
///ծȯ<D5AE><C8AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double yield_to_maturity;
///ETF<54><46>ֵ<EFBFBD><D6B5>ֵ
double iopv;
///ETF<54><EFBFBD><EAB9BA><EFBFBD><EFBFBD>
int32_t etf_buy_count;
///ETF<54><46><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>
int32_t etf_sell_count;
///ETF<54><EFBFBD><EAB9BA><EFBFBD><EFBFBD>
double etf_buy_qty;
///ETF<54><EFBFBD><EAB9BA><EFBFBD><EFBFBD>
double etf_buy_money;
///ETF<54><46><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double etf_sell_qty;
///ETF<54><46><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
double etf_sell_money;
///Ȩִ֤<D6A4>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double total_warrant_exec_qty;
///Ȩ֤<C8A8><D6A4>ͣ<EFBFBD>۸<EFBFBD><DBB8><EFBFBD>Ԫ<EFBFBD><D4AA>
double warrant_lower_price;
///Ȩ֤<C8A8><D6A4>ͣ<EFBFBD>۸<EFBFBD><DBB8><EFBFBD>Ԫ<EFBFBD><D4AA>
double warrant_upper_price;
///<2F><><EFBFBD><EFBFBD><EBB3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int32_t cancel_buy_count;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int32_t cancel_sell_count;
///<2F><><EFBFBD><EFBFBD><EBB3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double cancel_buy_qty;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double cancel_sell_qty;
///<2F><><EFBFBD><EFBFBD><EBB3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double cancel_buy_money;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double cancel_sell_money;
///<2F><><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>
int32_t total_buy_count;
///<2F><><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>
int32_t total_sell_count;
///<2F><><EFBFBD><EFBFBD>ί<EFBFBD>гɽ<D0B3><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>ʱ<EFBFBD><CAB1>
int32_t duration_after_buy;
///<2F><><EFBFBD><EFBFBD>ί<EFBFBD>гɽ<D0B3><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>ʱ<EFBFBD><CAB1>
int32_t duration_after_sell;
///<2F><><EFBFBD><EFBFBD>ί<EFBFBD>м<EFBFBD>λ<EFBFBD><CEBB>
int32_t num_bid_orders;
///<2F><><EFBFBD><EFBFBD>ί<EFBFBD>м<EFBFBD>λ<EFBFBD><CEBB>
int32_t num_ask_orders;
///<2F>ɽ<EFBFBD>ʱ<EFBFBD>䣨UA3113<31><33>
int32_t exec_time;
///<2F><><EFBFBD>б<EFBFBD>־<EFBFBD><D6BE>UA103/UA104<30><34>
char is_market_closed[4];
///<2F><>Լ<EFBFBD>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>UA103<30><33>
double total_position;
///<2F><>ӯ<EFBFBD><D3AF>1<EFBFBD><31>UA103<30><33>
double pe_ratio1;
///<2F><>ӯ<EFBFBD><D3AF>2<EFBFBD><32>UA103<30><33>
double pe_ratio2;
} XTPMD;
#endif